thaw_account
Unfreeze a frozen token account on Solana to restore transfer functionality using wallet authority, token mint, and account address.
Instructions
Thaw a frozen token account to allow transfers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| walletName | Yes | Name of the wallet with freeze authority | |
| tokenMint | Yes | Token mint address | |
| accountAddress | Yes | Address of the token account to thaw |
Implementation Reference
- src/index.ts:1058-1084 (handler)The main handler function that performs the thaw operation on a token account using the SPL token library's thawAccount function. It validates the wallet, sets up the connection, and returns the transaction signature.async function handleThawAccount(args: any) { const { walletName, tokenMint, accountAddress } = args; const wallet = wallets.get(walletName); if (!wallet) { throw new Error(`Wallet '${walletName}' not found`); } ensureConnection(); const tokenMintPubkey = new PublicKey(tokenMint); const accountPubkey = new PublicKey(accountAddress); const signature = await thawAccount( connection, wallet.keypair, accountPubkey, tokenMintPubkey, wallet.keypair ); return { success: true, signature, accountAddress, explorerUrl: `https://explorer.solana.com/tx/${signature}?cluster=${currentNetwork}` }; }
- src/index.ts:395-416 (schema)The input schema defining the parameters for the thaw_account tool: walletName, tokenMint, and accountAddress.{ name: "thaw_account", description: "Thaw a frozen token account to allow transfers", inputSchema: { type: "object", properties: { walletName: { type: "string", description: "Name of the wallet with freeze authority" }, tokenMint: { type: "string", description: "Token mint address" }, accountAddress: { type: "string", description: "Address of the token account to thaw" } }, required: ["walletName", "tokenMint", "accountAddress"] } },
- src/index.ts:1342-1344 (registration)Registration in the tool dispatch switch statement that routes calls to the handleThawAccount handler.case "thaw_account": result = await handleThawAccount(args); break;
- src/index.ts:1273-1275 (registration)The tools array (including thaw_account) is returned in the ListToolsRequest handler, registering the tool for discovery.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
- src/index.ts:12-21 (helper)Import of the thawAccount function from @solana/spl-token library, used as the core utility in the handler.import { createTransferInstruction, getAssociatedTokenAddress, createAssociatedTokenAccountInstruction, getAccount, createMint, mintTo, burn, freezeAccount, thawAccount,