For each delegation relationship that was created, the delegator calls the [`delegator-stack-stx`](/references/stacking-contract#delegate-stack-stx) method to lock up the STX token from the account holder. This method must be called until the delegator locked up enough STX tokens required to participate in Stacking
This function calls the [`delegator-stack-stx`](/references/stacking-contract#delegate-stack-stx) method of the Stacking contract to lock up the STX token from the account holder.
This method must be called until the delegator locked up enough STX tokens required to participate in Stacking.
## Step 4: Commit to Stacking
As soon as pooling is completed and the minimum STX token threshold reached, the delegator needs to confirm participation for the next cycle(s):
With pooling being completed and the minimum STX token threshold reached, the delegator calls the [`stack-aggregation-commit`](/references/stacking-contract#stack-aggregation-commit) to confirm participation in the next cycle(s)
This method calls the [`stack-aggregation-commit`](/references/stacking-contract#stack-aggregation-commit) function of the Stacking contract.
**Congratulations!** With the completion of this step, you successfully learnt how to ...
**Congratulations!** With the completion of this step, you successfully learnt how to use the Stacking library to ...
- Generate Stacks accounts
- Delegate STX tokens as an account holder
- Display stacking info
- Stack STX token on behalf of an account holder
- Verify stacking eligibility
- Commit to Stacking with all delegated STX tokens
To display the unlocking time, you need to use the `firstRewardCycle` and the `lockPeriod` fields.
To display the unlocking time, you need to use the `firstRewardCycle` and the `lockPeriod` fields.
// TODO: Rewards and get-stacker-info
**Congratulations!** With the completion of this step, you successfully learnt how to ...
**Congratulations!** With the completion of this step, you successfully learnt how to ...
- Generate Stacks accounts
- Generate Stacks accounts
@ -320,3 +318,14 @@ To display the unlocking time, you need to use the `firstRewardCycle` and the `l
- Verify stacking eligibility
- Verify stacking eligibility
- Add stacking action
- Add stacking action
- Display stacking status
- Display stacking status
## Optional: Rewards
Currently, the Stacking library does not provide methods to get the paid rewards for a set address. However, the [Stacks Blockchain API exposes endpoints](https://blockstack.github.io/stacks-blockchain-api/#tag/Burnchain) to get more details.
As an example, if you want to get the rewards paid to `btcAddress`, you can make the following API call: