botwallet_confirm_withdrawal
Complete approved USDC withdrawals on Solana by performing FROST threshold signing to authorize on-chain transactions using the transaction ID from previous approval events.
Instructions
Complete a withdrawal that was previously approved by the owner. Performs FROST threshold signing to authorize the on-chain transaction.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transaction_id | Yes | Transaction ID from the withdrawal or approval event |
Implementation Reference
- src/tools/withdrawals.ts:96-126 (handler)Handler function for 'botwallet_confirm_withdrawal' which triggers the FROST signing process for an approved withdrawal.
async handler(args, ctx) { try { if (!ctx.config.hasSeed || !ctx.config.walletName) { return noSeedError('confirm withdrawal (FROST signing)'); } const { transaction_id } = args as { transaction_id: string }; const confirmResult = await ctx.sdk.confirmWithdrawal({ withdrawal_id: transaction_id }); if (!confirmResult.message) { return formatToolError(new Error( 'Withdrawal may have expired or already been completed. Check status with botwallet_get_withdrawal.' )); } const mnemonic = loadSeed(ctx.config.walletName); const signResult = await frostSignAndSubmit( ctx.sdk, mnemonic, transaction_id, confirmResult.message, ); return formatResult({ withdrawn: true, ...signResult, }); } catch (e) { return formatToolError(e); } }, - src/tools/withdrawals.ts:93-95 (schema)Input schema definition for the 'botwallet_confirm_withdrawal' tool.
inputSchema: z.object({ transaction_id: z.string().describe('Transaction ID from the withdrawal or approval event'), }), - src/tools/withdrawals.ts:146-150 (registration)Registration of 'botwallet_confirm_withdrawal' (as 'confirmWithdrawal') within the withdrawalTools array.
export const withdrawalTools: ToolDefinition[] = [ withdraw, confirmWithdrawal, getWithdrawal, ];