Constructor
# new Wallet(walletName, hash)
Create a new Wallet instance.
Parameters:
Name | Type | Description |
---|---|---|
walletName |
string
|
The name of the wallet. |
hash |
string
|
A hash that acts as a unique identifier for the wallet. |
Methods
# createAccount(accountName) → {Account}
Create a new account with pre-built addresses and add it to the wallet.
Parameters:
Name | Type | Description |
---|---|---|
accountName |
string
|
The name of the account to create. |
- The created account with pre-built addresses.
Account
# generateHash(walletName, hash) → {string}
Generate a cryptographic hash based on the wallet name and the provided hash.
This acts as a unique identifier for the wallet.
Parameters:
Name | Type | Description |
---|---|---|
walletName |
string
|
The name of the wallet. |
hash |
string
|
The hash to combine with the wallet name. |
- The resulting hash.
string
# getAccount(accountName) → {Account}
Get an account by its name.
Parameters:
Name | Type | Description |
---|---|---|
accountName |
string
|
The name of the account to retrieve. |
- The requested account.
Account
# getWalletStructure() → {Object}
Get the wallet structure with all accounts and their blockchains.
- The wallet structure.
Object