Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create new type for an activeWallet object #995

Closed
Tracked by #942
ericsharma opened this issue Mar 1, 2023 · 0 comments
Closed
Tracked by #942

Create new type for an activeWallet object #995

ericsharma opened this issue Mar 1, 2023 · 0 comments
Assignees

Comments

@ericsharma
Copy link
Collaborator

ericsharma commented Mar 1, 2023

ℹ️ 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants