q402_unstake
Unstake matured Q from QuackAiStake on BNB back to your wallet gaslessly. Exit one matured stake by record index or all at once, with user confirmation.
Instructions
WRITE - MOVES FUNDS. Unstakes the Agent Wallet's matured Q from QuackAiStake on BNB back to the wallet, gaslessly (Mode C, server-signed, relayer-sponsored gas). Unstake is PER-RECORD: QuackAiStake exits one matured stake at a time by its index. Pass ith (a record index from q402_stake_positions) to exit one stake, or all: true to exit EVERY matured stake (one tx per record). A stake can only be unstaked after its lock elapses.
REQUIRES CONFIRMATION (confirm:true + consentToken) and the same SANDBOX / live-key gate + uncertain-retry semantics as q402_stake. Use q402_stake_positions first to see which records are exitable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Exit EVERY matured stake (one on-chain exit per record). Mutually exclusive with ith. | |
| ith | No | Record index to exit (one matured stake). From q402_stake_positions. Must be >= 1. | |
| confirm | No | MUST be true to actually unstake - only after user approval. Omit to preview. | |
| walletId | No | Optional Agent Wallet address. Defaults to the owner's default wallet. | |
| consentToken | No | Two-phase consent token. Leave unset to preview + get a token; re-call with confirm:true + this token. |