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
mnsPrivate
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.
An array of base58 encoded private keys to be added to the wallet.
A Promise that resolves to an array of IAccount objects.
if the number of private keys exceeds the maximum limit.
Buy rolls with wallet address.
The transaction data
Optional
executor: IBaseAccount(Optional) The account that will execute the transaction. If not specified, the base account is used by default.
a promise that resolves to an array of operations ids.
if no sender account is available for the transaction.
Protected
compactCompacts bytes payload per operation.
The operation data.
The operation type id.
The expire period.
The compacted bytes payload.
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
getPrivate
getRetrieves information about specified wallet addresses.
An array of wallet addresses for which information is to be retrieved.
A Promise that resolves to an array of IAddressInfo objects, each containing information about a corresponding wallet address.
Sell rolls with wallet address.
The transaction data.
Optional
executor: IBaseAccount(Optional) The account that will execute the transaction. If not specified, the base account is used by default.
a promise that resolves to an array of operations ids.
if no sender account is available for the transaction.
Protected
sendSends a post JSON rpc request to the node.
The rpc method to call.
The parameters to pass to the rpc method.
A promise that resolves as the result of the rpc method.
An error if the rpc method returns an error.
Sends native MAS from a wallet address to another.
The transaction data.
Optional
executor: IBaseAccount(Optional) The account that will execute the transaction. If not provided, the base account is used.
a promise that resolves to an array of operations ids.
if no sender account is available for the transaction.
Sets a provided account as the default (base) account for the wallet.
An IAccount to be set as the base account.
A Promise that resolves to void
when the base account has been set successfully.
Set new providers as IProvider.
The new providers to set as an array of 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.
Signs a random message data using a wallet account that has already been added.
The data to be signed.
The address of the wallet account that will sign the data.
A Promise that resolves to an ISignature object representing the signature.
Will throw an error if the account associated with the provided address is not found in the wallet.
Verify a signature.
The signed data to verify.
The signature to verify.
A Promise that resolves to true
if the signature is valid, false
otherwise.
Retrieves detailed information about the wallet.
A Promise that resolves to an array of IFullAddressInfo objects.
Will throw an error if the number of retrieved wallets does not match the number of addresses in the wallet.
Static
getStatic
walletStatic
walletSigns the provided data with the given address.
The data to be signed.
The account that will be used to sign the data.
A Promise that resolves to an ISignature object representing the signature.
The address must be present in the wallet.
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.