Interface of a WalletAccount, also referred to as an Account.

An account is a read-only data object that is provided from the Wallet to the app, authorizing the app to use it.

The app can use an account to display and query information from a chain.

The app can also act using an account by passing it to features of the Wallet.

Wallets may use or extend "@wallet-standard/wallet".ReadonlyWalletAccount which implements this interface.

interface WalletAccount {
    address: string;
    chains: IdentifierArray;
    features: IdentifierArray;
    icon?:
        | `data:image/svg+xml;base64,${string}`
        | `data:image/webp;base64,${string}`
        | `data:image/png;base64,${string}`
        | `data:image/gif;base64,${string}`;
    label?: string;
    publicKey: Uint8Array;
}

Implemented by

Properties

address: string

Address of the account, corresponding with a public key.

Chains supported by the account.

This must be a subset of the chains of the Wallet.

features: IdentifierArray

Feature names supported by the account.

This must be a subset of the names of features of the Wallet.

icon?:
    | `data:image/svg+xml;base64,${string}`
    | `data:image/webp;base64,${string}`
    | `data:image/png;base64,${string}`
    | `data:image/gif;base64,${string}`

Optional user-friendly icon for the account. This may be displayed by the app.

label?: string

Optional user-friendly descriptive label or name for the account. This may be displayed by the app.

publicKey: Uint8Array

Public key of the account, corresponding with a secret key to use.