From chaingpt
Builds unsigned Solana native SOL and SPL token transfers. Returns base64 VersionedTransaction for external signing with Phantom, Backpack, or hardware wallets.
How this skill is triggered — by the user, by Claude, or both
Slash command
/chaingpt:solanaThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill exposes a small foundation for building **unsigned Solana transactions** from chat. The plugin never sees a Solana private key — every state-changing tool returns a base64-encoded `VersionedTransaction` that the user signs in their wallet.
This skill exposes a small foundation for building unsigned Solana transactions from chat. The plugin never sees a Solana private key — every state-changing tool returns a base64-encoded VersionedTransaction that the user signs in their wallet.
lib/solana-sign.ts directly.chaingpt_solana_build_transfer_tx — build an unsigned transfer.
mint is omitted. Decimals: 9 (LAMPORTS_PER_SOL).mint is provided. Decimals fetched from the mint account. Source + destination Associated Token Accounts derived automatically. Idempotent CreateATAIdempotent instruction included so first-time-recipient transfers work without an extra setup step.acknowledgeMainnet: true required when network=mainnet. Same gate as the EVM tools.chaingpt_solana_decode_tx — decode an unsigned base64 versioned transaction for review (payer, blockhash, instruction count, program ids with annotations).Identical to the rest of the plugin: custody-free. The plugin builds the transaction; the user signs it elsewhere. There is no MCP tool that accepts a secretKey, mnemonic, or seedPhrase parameter, and a unit test asserts this surface contract so future additions cannot accidentally break it.
If the user wants policy-gated signing (agent wallet pattern), the existing agent wallet skill provides that for EVM. A Solana counterpart is queued as a follow-up to this foundation.
When network=mainnet, the build tool refuses unless acknowledgeMainnet=true is also passed. The refusal message lists what to verify before re-call (recipient address, amount, mint, network). This matches feedback_mainnet_default: mainnet is the target, but mainnet transactions require an explicit ack.
User: "Build a 0.5 USDC transfer from 7uDsTC...EUd to 9WzDXw...WWM on mainnet"
Agent: chaingpt_solana_build_transfer_tx({
from: "7uDsTC1u4eRkxsfvQHvi3vCSqGBHc4uS9wpYbobcdEUd",
to: "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
amount: "0.5",
mint: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", // USDC mint
network: "mainnet",
acknowledgeMainnet: true
})
→ returns:
- decoded summary (from ATA, to ATA, amount in base units, decimals)
- the base64 VersionedTransaction
- the blockhash + lastValidBlockHeight
- next-step instructions for the signer
User: paste base64 into Phantom → review → sign → submit.
Default public RPC fallback per network:
| Network | Endpoints |
|---|---|
| mainnet | api.mainnet-beta.solana.com → solana-rpc.publicnode.com |
| devnet | api.devnet.solana.com |
| testnet | api.testnet.solana.com |
Override via SOLANA_RPC_URL env var (Helius / QuickNode / Triton recommended for production loads).
TransferChecked instead of TransferThe classic SPL Token program has two transfer instructions:
Transfer (discriminator 3): minimal — source, destination, owner, amount.TransferChecked (discriminator 12): also takes mint + decimals and the runtime verifies they match the source account's mint.We always emit TransferChecked. The mint/decimals check prevents an attacker from swapping an unrelated ATA into the destination slot to redirect funds.
chaingpt_drift_* today. Signed placePerpOrder, deposit, withdraw are queued as follow-up PRs that will use the foundation here.chaingpt_dex_jupiter_quote (the unsigned-swap-tx call from Jupiter's API is returned directly; no foundation needed).When you build those follow-ups, the pattern is:
buildVersionedTransaction, serializeUnsigned, makeConnection, parseAddress from lib/solana-sign.ts.TransactionInstruction[] (account derivation + IDL-encoded data).buildVersionedTransaction({ payer, instructions, connection }).serializeUnsigned(tx) plus a decoded summary.acknowledgeMainnet:true.Connection.getLatestBlockhash so the test never touches the network.mcp-server/src/lib/solana-sign.ts — utilities (RPC fallback, parseAddress, instruction builders, ATA derivation, mint info fetch, v0 message build, base64 ser/de).mcp-server/src/tools/solana.ts — tool surface (build_transfer_tx, decode_tx).mcp-server/src/__tests__/solana.test.ts — 29 cases.npx claudepluginhub chaingpt-org/chaingpt-claude-skill --plugin chaingptProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Searches MemPalace before answering questions about past work, people, projects, or prior decisions. Returns verbatim stored content instead of guessing from model memory.