/phantom-connect:send-sol-transactionfrom phantom-connect
Build and send SOL transfers on Solana using Phantom Connect SDK, covering transaction construction, signing, and verification for both React and browser SDKs.
Ships in phantom-connect. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
import {
Connection,
PublicKey,
Transaction,
SystemProgram,
LAMPORTS_PER_SOL,
} from "@solana/web3.js";
const connection = new Connection("https://api.devnet.solana.com");
function buildTransferTransaction(
fromPubkey: PublicKey,
toPubkey: PublicKey,
solAmount: number
): Transaction {
const transaction = new Transaction().add(
SystemProgram.transfer({
fromPubkey,
toPubkey,
lamports: Math.round(solAmount * LAMPORTS_PER_SOL),
})
);
return transaction;
}
Always use LAMPORTS_PER_SOL for conversion. Never hardcode 1000000000.
import { useSolana, useAccounts } from "@phantom/react-sdk";
import { PublicKey, Transaction, SystemProgram, LAMPORTS_PER_SOL } from "@solana/web3.js";
function SendSol() {
const solana = useSolana();
const { accounts } = useAccounts();
const sendTransaction = async () => {
const solanaAccount = accounts.find((a) => a.chain === "solana");
if (!solanaAccount) {
console.error("No Solana account connected");
return;
}
const fromPubkey = new PublicKey(solanaAccount.address);
const toPubkey = new PublicKey("RECIPIENT_ADDRESS_HERE");
const transaction = new Transaction().add(
SystemProgram.transfer({
fromPubkey,
toPubkey,
lamports: Math.round(0.01 * LAMPORTS_PER_SOL),
})
);
try {
const { signature } = await solana.signAndSendTransaction(transaction);
console.log("Transaction signature:", signature);
console.log(
`View on Explorer: https://explorer.solana.com/tx/${signature}?cluster=devnet`
);
} catch (error) {
console.error("Transaction failed:", error);
}
};
return <button onClick={sendTransaction}>Send 0.01 SOL</button>;
}
import { PublicKey, Transaction, SystemProgram, LAMPORTS_PER_SOL } from "@solana/web3.js";
async function sendSol(sdk: BrowserSDK) {
const solanaAccount = sdk.accounts.find((a) => a.chain === "solana");
if (!solanaAccount) {
throw new Error("No Solana account connected");
}
const fromPubkey = new PublicKey(solanaAccount.address);
const toPubkey = new PublicKey("RECIPIENT_ADDRESS_HERE");
const transaction = new Transaction().add(
SystemProgram.transfer({
fromPubkey,
toPubkey,
lamports: Math.round(0.01 * LAMPORTS_PER_SOL),
})
);
try {
const { signature } = await sdk.solana.signAndSendTransaction(transaction);
console.log("Transaction signature:", signature);
console.log(
`View on Explorer: https://explorer.solana.com/tx/${signature}?cluster=devnet`
);
} catch (error) {
console.error("Transaction failed:", error);
}
}
async function verifyTransaction(signature: string) {
const connection = new Connection("https://api.devnet.solana.com");
const status = await connection.getSignatureStatus(signature);
if (status.value?.confirmationStatus === "confirmed" ||
status.value?.confirmationStatus === "finalized") {
console.log("Transaction confirmed!");
} else {
console.log("Transaction status:", status.value);
}
}
signAndSendTransaction — NOT signTransaction. Embedded wallets do not support signTransaction.LAMPORTS_PER_SOL for SOL-to-lamport conversion.https://api.devnet.solana.com) for testing, mainnet-beta (https://api.mainnet-beta.solana.com) for production.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: agents: Invalid string: must end with ".md", mcpServers: Invalid string: must start with "./"
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
8 skills in this plugin
/add-social-loginConfigure Google and Apple social login with Phantom Connect SDK to enable embedded wallet creation/phantom-connectBuild wallet-connected applications with the Phantom Connect SDK for Solana. Use when integrating Phantom wallets into React, React Native, or vanilla JS/TS apps — including wallet connection, social login (Google/Apple), transaction signing, message signing, token-gated access, crypto payments, and NFT minting. Covers @phantom/react-sdk, @phantom/react-native-sdk, and @phantom/browser-sdk.
/phantom-wallet-mcpExecute wallet operations through the Phantom MCP server — get addresses, sign transactions, transfer tokens, buy tokens, and sign messages across Solana, Ethereum, Bitcoin, and SuiOther plugins' skills for the same job