tx.txbuilder.delegate
Home > @blaze-cardano/tx > TxBuilder > delegate
TxBuilder.delegate() method
This method delegates the selected reward address to a pool. It first checks if the reward address is set and if it has a stake component. If both conditions are met, it adds a delegation to the transaction.
Signature:
delegate(poolId: PoolId, redeemer?: PlutusData): this;
Parameters
| Parameter | Type | Description | 
|---|---|---|
| poolId | PoolId | The ID of the pool to delegate the reward address to. | 
| redeemer | PlutusData | (Optional) | 
Returns:
this
Exceptions
{Error} If the reward address is not set or if the method is unimplemented.