Staking Transactions

Transactions for delegating ADA and managing stakepools

Register Stake Address

Same as Transaction, with MeshTxBuilder you have to register a stake address before delegate to stakepools. Here's the 2 APIs you need:

Since we need to provide the deserilized hash of pool id, we can use the following util to get it:

Register Stake Address

Register a stake address before delegate to stakepools.

Connect wallet to run this demo

No wallets installed

Delegate Stake

Delegation with MeshTxBuilder is exactly the same as first delegate, but without registering stake key, so only one API is needed:

Delegate Stake

Delegate stake to a stake pool

Connect wallet to run this demo

No wallets installed

Withdraw Rewards

Withdrawal with MeshTxBuilder comes with only one API, to specify the reward address and the amount to withdraw.

  • rewardAddress (string) - the reward address to withdraw from
  • lovelace (number) - the amount to withdraw in Lovelace
Withdraw Reward

Withdraw staking rewards.

Connect wallet to run this demo

No wallets installed

Deregister Stake

Deregister a stake address. The function accepts the following parameters:

  • rewardAddress (string) - the bech32 reward address to deregister
Deregister Stake

Deregister a stake address

Connect wallet to run this demo

No wallets installed

Script Withdrawal - Supporting Withdraw Zero

Withdrawal from script is supported by MeshTxBuilder with this set of APIs:

Withdraw Zero

With that capability, it supports a Cardano technique - withdraw zero - which is a technique to trigger withdrawal script validation without actually withdrawing any value. This is a technique to help boost script ExUnits performance especially comes to validating multiple script inputs. In order to perform withdraw zero, 2 steps are involved:

  • Register script stake key
  • Withdraw Zero
Register Script Stake Key

One off setup before triggering withdraw zero

Connect wallet to run this demo

No wallets installed
Withdraw Zero

Actual withdrawal of zero to trigger script validation

Connect wallet to run this demo

No wallets installed