Skip to main content

Wallet

@iota/wallet-standard


@iota/wallet-standard / Wallet

Interface: Wallet

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@wallet-standard/base/lib/types/wallet.d.ts:30

Interface of a Wallet, also referred to as a Standard Wallet.

A Standard Wallet implements and adheres to the Wallet Standard.

Properties

accounts

readonly accounts: readonly WalletAccount[]

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@wallet-standard/base/lib/types/wallet.d.ts:106

Accounts that the app is authorized to use.

This can be set by the Wallet so the app can use authorized accounts on the initial page load.

The "@wallet-standard/features".ConnectFeature | `standard:connect` feature should be used to obtain authorization to the accounts.

The "@wallet-standard/features".EventsFeature | `standard:events` feature should be used to notify the app if the value changes.


chains

readonly chains: IdentifierArray

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@wallet-standard/base/lib/types/wallet.d.ts:62

Chains supported by the Wallet.

A chain is an IdentifierString which identifies a blockchain in a canonical, human-readable format. CAIP-2 chain IDs are compatible with this, but are not required to be used.

Each blockchain should define its own chains by extension of the Wallet Standard, using its own namespace. The standard and experimental namespaces are reserved by the Wallet Standard.

The "@wallet-standard/features".EventsFeature | `standard:events` feature should be used to notify the app if the value changes.


features

readonly features: IdentifierRecord<unknown>

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@wallet-standard/base/lib/types/wallet.d.ts:94

Features supported by the Wallet.

A feature name is an IdentifierString which identifies a feature in a canonical, human-readable format.

Each blockchain should define its own features by extension of the Wallet Standard.

The standard and experimental namespaces are reserved by the Wallet Standard.

A feature may have any type. It may be a single method or value, or a collection of them.

A conventional feature has the following structure:

 export type ExperimentalEncryptFeature = {
// Name of the feature.
'experimental:encrypt': {
// Version of the feature.
version: '1.0.0';
// Properties of the feature.
ciphers: readonly 'x25519-xsalsa20-poly1305'[];
// Methods of the feature.
encrypt (data: Uint8Array): Promise<Uint8Array>;
};
};

The "@wallet-standard/features".EventsFeature | `standard:events` feature should be used to notify the app if the value changes.


icon

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

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@wallet-standard/base/lib/types/wallet.d.ts:48

Icon of the Wallet. This may be displayed by the app.

Must be read-only, static, and canonically defined by the wallet extension or application.


id?

readonly optional id?: string

Defined in: sdk/wallet-standard/src/wallet.ts:20

Unique identifier of the Wallet.

If not provided, the wallet name will be used as the identifier.


name

readonly name: string

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@wallet-standard/base/lib/types/wallet.d.ts:42

Name of the Wallet. This may be displayed by the app.

Must be read-only, static, descriptive, unique, and canonically defined by the wallet extension or application.


version

readonly version: "1.0.0"

Defined in: node_modules/.pnpm/@[email protected]/node_modules/@wallet-standard/base/lib/types/wallet.d.ts:36

Version of the Wallet Standard implemented by the Wallet.

Must be read-only, static, and canonically defined by the Wallet Standard.