Class: Wallet
Defined in: bee-js/src/modules/wallet.ts:12
Node wallet operations (balances and external withdrawals).
Accessed as bee.wallet.
Constructors
Constructor
new Wallet(
context):Wallet
Defined in: bee-js/src/modules/wallet.ts:13
Parameters
context
BeeContext
Returns
Wallet
Methods
getBalance()
getBalance(
requestOptions?):Promise<WalletBalance>
Defined in: bee-js/src/modules/wallet.ts:20
Gets DAI and BZZ balances of the Bee node wallet.
Parameters
requestOptions?
Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
Returns
Promise<WalletBalance>
withdrawBZZ()
withdrawBZZ(
amount,address,requestOptions?):Promise<TransactionId>
Defined in: bee-js/src/modules/wallet.ts:31
Withdraws BZZ from the node wallet (not chequebook) to a whitelisted external wallet address.
Parameters
amount
Amount of BZZ tokens to withdraw. If not providing a BZZ instance, the amount is denoted in PLUR.
string | bigint | BZZ | NumberString
address
string | Uint8Array<ArrayBufferLike> | EthAddress
requestOptions?
Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
Returns
Promise<TransactionId>
withdrawDAI()
withdrawDAI(
amount,address,requestOptions?):Promise<TransactionId>
Defined in: bee-js/src/modules/wallet.ts:49
Withdraws DAI from the node wallet (not chequebook) to a whitelisted external wallet address.
Parameters
amount
Amount of DAI tokens to withdraw. If not providing a DAI instance, the amount is denoted in wei.
string | bigint | NumberString | DAI
address
string | Uint8Array<ArrayBufferLike> | EthAddress
requestOptions?
Options for making requests, such as timeouts, custom HTTP agents, headers, etc.
Returns
Promise<TransactionId>