Skip to content

Create new type for an activeWallet object #995

Closed
@ericsharma

Description

@ericsharma

ℹ️ Overview

Define a new typescript type/interface that represents a connected activeWallet object.

Example object to define below

 {
    "address": "J5LH4BD26RXGYJNUO7APRUXV7TMIWXA2WQNP5PCWBNDYOWDWCSK5GYCQLA",
    "name": "Account #3",
    "type": "my-algo-wallet",
    "connector": {
        "bridge": {
            "options": {
                "waitForReply": true,
                "timeout": 250
            },
            "bridge": {
                "channelName": "wallet-bridge-communication-channel",
                "_requests": {},
                "_nextId": 14,
                "_defaultTimeout": 4000
            }
        },
        "timeout": 1600000,
        "url": "https://wallet.myalgo.com/bridge",
        "currentConnectPopup": null,
        "currentSigntxPopup": null,
        "currentSignLogicSigPopup": null,
        "options": {
            "waitForReply": true,
            "timeout": 1600000
        },
        "disableLedgerNano": false,
        "connected": true
    },
    "amount": 30594178,
    "amount-without-pending-rewards": 30594178,
    "assets": [
       
        {
            "amount": 44,
            "asset-id": 159334202,
            "deleted": false,
            "is-frozen": false,
            "opted-in-at-round": 27741177
        },
  
    ],
    "created-assets": [
        {
            "created-at-round": 27740790,
            "deleted": false,
            "index": 159320011,
            "params": {
                "clawback": "J5LH4BD26RXGYJNUO7APRUXV7TMIWXA2WQNP5PCWBNDYOWDWCSK5GYCQLA",
                "creator": "J5LH4BD26RXGYJNUO7APRUXV7TMIWXA2WQNP5PCWBNDYOWDWCSK5GYCQLA",
                "decimals": 6,
                "default-frozen": false,
                "freeze": "J5LH4BD26RXGYJNUO7APRUXV7TMIWXA2WQNP5PCWBNDYOWDWCSK5GYCQLA",
                "manager": "J5LH4BD26RXGYJNUO7APRUXV7TMIWXA2WQNP5PCWBNDYOWDWCSK5GYCQLA",
                "name": "test",
                "name-b64": "dGVzdA==",
                "total": 10000000,
                "unit-name": "test",
                "unit-name-b64": "dGVzdA=="
            }
        },
        
    ],
    "created-at-round": 22992495,
    "deleted": false,
    "pending-rewards": 0,
    "reward-base": 27521,
    "rewards": 0,
    "round": 28098786,
    "sig-type": "sig",
    "status": "Offline",
    "total-apps-opted-in": 0,
    "total-assets-opted-in": 12,
    "total-box-bytes": 0,
    "total-boxes": 0,
    "total-created-apps": 0,
    "total-created-assets": 8
}

Notes

  • connector can be type:any
  • created-assets and assets can be defined as arrays of algorand asset
  • import types from Algosdk whenever possible

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions