You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/content/docs/apis/txbuilder/staking.mdx
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: "Transactions for delegating ADA and managing stakepools"
4
4
icon: ArrowsPointingInIcon
5
5
---
6
6
7
-
In the code snippet, you will find `txBuilder`, which is an instance of `MeshTxBuilder`, a powerful low-level APIs that allows you to build transactions. Learn how to initialize MeshTxBuilder.
7
+
In the code snippet, you will find `txBuilder`, which is an instance of `MeshTxBuilder`, with powerful low-level APIs that allow you to build transactions. Here's how to initialize **MeshTxBuilder**.
8
8
9
9
```tsx
10
10
const txBuilder =newMeshTxBuilder({
@@ -15,15 +15,15 @@ const txBuilder = new MeshTxBuilder({
15
15
16
16
## Register Stake Address
17
17
18
-
Same as Transaction, with `MeshTxBuilder` you have to register a stake address before delegate to stakepools. Here's the 2 APIs you need:
18
+
Same as Transaction, with `MeshTxBuilder`, you have to register a stake address before delegating to stakepools. Here are the 2 APIs you need:
Delegation with `MeshTxBuilder` is exactly the same as first delegate, but without registering stake key, so only one API is needed:
73
+
Stake delegation with `MeshTxBuilder` is the same as the first delegate, but without registering the stake key, so only one API call is needed:
74
74
75
75
```tsx
76
76
txBuilder
@@ -115,7 +115,7 @@ txBuilder
115
115
116
116
## Withdraw Rewards
117
117
118
-
Withdrawal with `MeshTxBuilder` comes with only one API, to specify the reward address and the amount to withdraw.
118
+
Use MeshTxBuilder’s withdrawal method to specify the reward address and amount.
119
119
120
120
- rewardAddress (string) - the reward address to withdraw from
121
121
- lovelace (number) - the amount to withdraw in Lovelace
@@ -161,7 +161,7 @@ txBuilder
161
161
162
162
## Deregister Stake
163
163
164
-
Deregister a stake address. The function accepts the following parameters:
164
+
To deregister a stake address with MeshTxBuilder, use the following method:
165
165
166
166
- rewardAddress (string) - the bech32 reward address to deregister
167
167
@@ -204,7 +204,7 @@ txBuilder
204
204
205
205
## Script Withdrawal - Supporting Withdraw Zero
206
206
207
-
Withdrawal from script is supported by `MeshTxBuilder` with this set of APIs:
207
+
Withdrawal from a script is supported by `MeshTxBuilder` with this set of APIs:
208
208
209
209
```tsx
210
210
txBuilder
@@ -216,7 +216,7 @@ txBuilder
216
216
217
217
**Withdraw Zero**
218
218
219
-
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:
219
+
This is a technique commonly used on Cardano to prove control of a stake key without actually withdrawing any rewards from its withdrawal account. To perform a "withdraw zero", you have to follow these steps:
0 commit comments