Sign and send Solana transactions using the multichain client's invokeMethod. Covers signTransaction, signAndSendTransaction, signMessage, building transactions with @solana/web3.js, base64 encoding, mainnet/devnet scopes, and selective disconnect.
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Sign and send Solana transactions using the multichain client's invokeMethod. Covers signTransaction, signAndSendTransaction, signMessage, building transactions with @solana/web3.js, base64 encoding, mainnet/devnet scopes, and selective disconnect.
Sign Solana Transactions via Multichain Client
When to use
Use this skill when:
Signing or sending Solana transactions through invokeMethod on a multichain client
Building Solana transactions with @solana/web3.js and encoding them for the multichain API
Signing Solana messages through the multichain client
Selecting the correct Solana CAIP-2 scope (mainnet, devnet)
Disconnecting only Solana scopes while keeping EVM sessions active
// resolves with no value — read session via client.provider.getSession()
Solana CAIP-2 scope identifiers:
Network
CAIP-2 Scope
Mainnet
solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp
Devnet
solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1
Testnet
solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z
All three Solana scopes are modeled by the SDK; non-mainnet availability depends on the connected MetaMask build/version, so handle connection errors rather than assuming a cluster is present.
Step 2: Understand Solana RPC routing
All Solana methods route through the wallet. Unlike EVM where read calls go to an RPC node, every Solana invokeMethod call is handled by MetaMask. There is no RPC node fallback for Solana.
Step 3: Sign a message (signMessage)
Method names have no solana_ prefix. The message must be base64 encoded, and the signing account is passed as account: { address }.
Disconnect only Solana scopes while keeping EVM sessions active:
// Disconnect only Solana mainnet — EVM scopes remain connectedawait client.disconnect(['solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp']);
// Disconnect all scopes (full session teardown)await client.disconnect();
Step 9: Error handling
invokeMethod errors are wrapped in RPCInvokeMethodErr — its own code is always 53, and the wallet's original EIP-1193 / JSON-RPC code (e.g. 4001 user rejection) is on rpcCode:
All Solana methods go to the wallet. There is no RPC node routing for Solana — every invokeMethod call with a Solana scope prompts MetaMask.
Base64 encoding required. Transactions and messages must be base64-encoded strings, not raw buffers or hex.
Use @solana/web3.js to build transactions. Construct Transaction objects, set recentBlockhash and feePayer, serialize with requireAllSignatures: false, then base64-encode.
CAIP-2 genesis hash IDs. Mainnet is solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp. Devnet is solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1. These are not cluster URLs — they are genesis hash identifiers.
Solana networks. Mainnet, devnet, and testnet scopes are all modeled by the SDK; non-mainnet availability depends on the connected MetaMask build/version, so handle connection errors rather than assuming a cluster is present.
Selective disconnect preserves other scopes. Passing specific Solana scopes to disconnect() only revokes those scopes. EVM scopes remain active.
Connected scopes required.invokeMethod fails if the Solana scope was not included in the original connect() call.
Method names have no solana_ prefix. The MetaMask Multichain API methods are signMessage, signTransaction, and signAndSendTransaction, each taking account: { address } in params. (solana_*-prefixed names are WalletConnect's schema, not MetaMask's.)
signTransaction vs signAndSendTransaction: Use signTransaction when you need to inspect or modify the signed output before broadcasting (result field: signedTransaction, base64). Use signAndSendTransaction for the common case where you want a single atomic operation (result field: signature, base58).