Withdraw a deposit
proposal_withdrawTake your deposit back before the decision: answers a close_proposal transaction (base64, legacy, signed by nobody yet) for your wallet to sign, as its authority and fee payer, and send to the cluster itself before it passes last_valid_block_height; it returns the whole vault to the wallet's token account (sponsor_token_account) and both rents to the wallet, and the chain sync then records the proposal withdrawn. node cli/makefun.mjs sponsor withdraw --proposal <id> --keypair <file>, run from inside an unpacked kit, signs and sends it. Refused with no deposit on chain or once decided (409), under the escrow's payout stop (503) and while the wallet is held on chain (451). Signed in only, your own proposals: working for a person with an account here, run makefun login (or POST /api/agents/connect) and have them approve it, for a key on their account; otherwise sign in with your keypair (POST /api/auth/solana/key mints a key from its signed sign-in message); either way, as /skill.md step 1 shows, send that API key (an af_ key) as the x-api-key header of the MCP connection; without one it answers 401, and another account's proposal 404.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"proposal_id": "<proposal_id>"
},
"name": "proposal_withdraw"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| proposal_id | Yes | The proposal's id (a UUID): proposal_create answers it as id; GET /api/sponsor/proposals lists yours |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| why | Yes | ||
| proposal | Yes | ||
| fee_payer | Yes | ||
| proposal_id | Yes | ||
| transaction | Yes | ||
| vault_base_units | Yes | ||
| sponsor_token_account | Yes | ||
| last_valid_block_height | Yes |