tx.txbuilder.addwithdrawal
Home > @blaze-cardano/tx > TxBuilder > addWithdrawal
TxBuilder.addWithdrawal() method
Adds a withdrawal to the transaction. This method allows for the withdrawal of funds from a staking reward account. Optionally, a redeemer can be provided for script validation purposes.
Signature:
addWithdrawal(address: RewardAccount, amount: bigint, redeemer?: PlutusData): TxBuilder;
Parameters
| Parameter | Type | Description | 
|---|---|---|
| address | RewardAccount | The reward account from which to withdraw. | 
| amount | bigint | The amount of ADA to withdraw. | 
| redeemer | PlutusData | (Optional) Optional. The redeemer data for script validation. | 
Returns:
{TxBuilder} The same transaction builder
Exceptions
{Error} If the reward account does not have a stake credential or if any other error occurs.