Accounts
@aeternity/aepp-sdk/es/accounts
Accounts module
Example
import Accounts from '@aeternity/aepp-sdk/es/accounts'
- @aeternity/aepp-sdk/es/accounts
- removeAccount(address) ⇒
Void
⏏ - addresses() ⇒
Array.<String>
⏏ - Accounts([options]) ⇒
Object
⏏ - async
- addAccount(account, [options]) ⇒
Void
⏏
- addAccount(account, [options]) ⇒
- removeAccount(address) ⇒
removeAccount(address) ⇒ Void
⏏
Remove specific account
Kind: Exported function
rtype: (address: String) => Void
Param | Type | Description |
---|---|---|
address | String |
Address of account to remove |
Example
removeAccount(address)
addresses() ⇒ Array.<String>
⏏
Get accounts addresses
Kind: Exported function
rtype: () => String[]
Example
addresses()
Accounts([options]) ⇒ Object
⏏
Accounts Stamp
The purpose of the Accounts Stamp is to wrap up Account objects and provide a common interface to all of them. Accounts are a substantial part of module:@aeternity/aepp-sdk/es/ae/wallet--Wallets.
Kind: Exported function
Returns: Object
- Accounts instance
rtype: Stamp
Param | Type | Default | Description |
---|---|---|---|
[options] | Object |
{} |
Initializer object |
[options.accounts] | Array |
Accounts array |
Example
const accounts = await Accounts({ accounts: [ MemmoryAccount({ keypair: 'keypair_object' }) ] })
await accounts.addAccount(account, { select: true }) // Add account and make it selected
accounts.removeAccount(address) // Remove account
accounts.selectAccount(address) // Select account
accounts.addresses() // Get available accounts
addAccount(account, [options]) ⇒ Void
⏏
Add specific account
Kind: Exported function
Category: async
rtype: (account: Account, { select: Boolean }) => Void
Param | Type | Default | Description |
---|---|---|---|
account | Object |
Account instance | |
[options] | Object |
{} |
Options |
[options.select] | Boolean |
Select account |
Example
addAccount(account)