Skip to main content
Glama
botwallet-co

BotWallet MCP Server

by botwallet-co

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
NameRequiredDescriptionDefault
transaction_idYesTransaction ID from the withdrawal or approval event

Implementation Reference

  • 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);
      }
    },
  • 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'),
    }),
  • Registration of 'botwallet_confirm_withdrawal' (as 'confirmWithdrawal') within the withdrawalTools array.
    export const withdrawalTools: ToolDefinition[] = [
      withdraw,
      confirmWithdrawal,
      getWithdrawal,
    ];

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/botwallet-co/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server