Account Provider
🏦 SPL Accounts Provider
API
Property | Type | Description | Default |
---|---|---|---|
children | ReactNode | The wrapped children. | undefined |
For example
Context
Provider
Property | Type | Description |
---|---|---|
accounts | Record<string, AccountData> | A mapping from an account address to the corresponding account data. |
AccountData
Property | Type | Description |
---|---|---|
mint | string | The corresponding mint address to the account. |
owner | string | The account owner address. |
amount | bigint | The number of tokens. |
delegate_option | 0 | 1 | Whether the delegate property is available. |
delegate | string | The delegate address. |
delegated_amount | bigint | The number of delegated tokens. |
state | 0 | 1 | 2 | 0: Uninitialized; 1: Initialized; 2: Frozen; |
is_native_option | 0 | 1 | Whether the is_native property is available. |
is_native | bigint | The number of wrapped lamports. |
close_authority_option | 0 | 1 | Whether the close_authority property is available. |
close_authority | string | The close authority address. |
Hook & HOC
For example
Wrap the parent by AccountProvider before accessing the context.
Last updated