Constructor of the WalletClient class.
Configuration parameters for the client.
A PublicApiClient instance used for making API calls.
Optional
baseAccount: IBaseAccount(Optional) An IAccount to set as the base account for the wallet.
Private
Optional
basePrivate
Readonly
publicA PublicApiClient instance used for making API calls.
Private
walletAdds a set of accounts to the wallet.
A Promise that resolves to an array of IAccount objects.
Adds a set of private keys to the wallet.
if the number of private keys exceeds the maximum limit.
A Promise that resolves to an array of IAccount objects.
An array of base58 encoded private keys to be added to the wallet.
Buy rolls with wallet address.
if no sender account is available for the transaction.
a promise that resolves to an array of operations ids.
The transaction data
Optional
executor: IBaseAccount(Optional) The account that will execute the transaction. If not specified, the base account is used by default.
Protected
compactCompacts bytes payload per operation.
The compacted bytes payload.
The operation data.
The operation type id.
The expire period.
Retrieves the default (base) account of the wallet.
The default IAccount of the wallet. If no default account is set, it returns null
.
Protected
getProtected
getRetrieves a wallet account based on its address.
The IAccount associated with the provided address
or undefined
if no account with the given address is found in the wallet.
The address of the account to retrieve.
Private
getRetrieves information about specified wallet addresses.
A Promise that resolves to an array of IAddressInfo objects, each containing information about a corresponding wallet address.
An array of wallet addresses for which information is to be retrieved.
Sell rolls with wallet address.
if no sender account is available for the transaction.
a promise that resolves to an array of operations ids.
The transaction data.
Optional
executor: IBaseAccount(Optional) The account that will execute the transaction. If not specified, the base account is used by default.
Protected
sendSends a post JSON rpc request to the node.
An error if the rpc method returns an error.
A promise that resolves as the result of the rpc method.
The rpc method to call.
The parameters to pass to the rpc method.
Sends native MAS from a wallet address to another.
if no sender account is available for the transaction.
a promise that resolves to an array of operations ids.
The transaction data.
Optional
executor: IBaseAccount(Optional) The account that will execute the transaction. If not provided, the base account is used.
Sets a provided account as the default (base) account for the wallet.
A Promise that resolves to void
when the base account has been set successfully.
An IAccount to be set as the base account.
Set new providers as IProvider.
Will throw an error if no public providers are included in the given array of providers.
Will throw an error if no private providers are included in the given array of providers.
The new providers to set as an array of IProvider.
Signs a random message data using a wallet account that has already been added.
Will throw an error if the account associated with the provided address is not found in the wallet.
A Promise that resolves to an ISignature object representing the signature.
The data to be signed.
The address of the wallet account that will sign the data.
Verify a signature.
A Promise that resolves to true
if the signature is valid, false
otherwise.
The signed data to verify.
The signature to verify.
Retrieves detailed information about the wallet.
Will throw an error if the number of retrieved wallets does not match the number of addresses in the wallet.
A Promise that resolves to an array of IFullAddressInfo objects.
Static
getGenerates an account from a given private key.
A Promise that resolves to an IAccount object.
A base58 encoded private key from which the account will be generated.
Static
walletStatic
walletSigns the provided data with the given address.
The address must be present in the wallet.
A Promise that resolves to an ISignature object representing the signature.
The data to be signed.
The account that will be used to sign the data.
Generated using TypeDoc
A client class for interacting with wallets, which can seamlessly work with WebExtensions.
Remarks
The WalletClient manages multiple accounts and handles operations such as transaction signing, fetching account information, and interacting with the blockchain. It extends the BaseClient class and implements the IWalletClient interface.