Solana RPC connection
+Wallet keypair for signing transactions
+Public key of the wallet
+Optionalcreators?: { OptionalsellerOptionalrecipient: PublicKeyA powerful toolkit for interacting with the Solana blockchain, providing easy-to-use functions for token operations, NFT management, and trading.
+🪙 Token Operations
+🖼️ NFT Management
+💱 Trading
+npm install solana-agent-kit
+
+
+import { SolanaAgentKit } from 'solana-agent-kit';
// Initialize with private key and optional RPC URL
const agent = new SolanaAgentKit(
'your-private-key',
'https://api.mainnet-beta.solana.com'
);
+
+
+import { deploy_token } from 'solana-agent-kit';
const result = await deploy_token(
agent,
9, // decimals
1000000 // initial supply
);
console.log('Token Mint Address:', result.mint.toString());
+
+
+import { deploy_collection } from 'solana-agent-kit';
const collection = await deploy_collection(agent, {
name: "My NFT Collection",
uri: "https://arweave.net/metadata.json",
royaltyBasisPoints: 500, // 5%
creators: [
{
address: "creator-wallet-address",
percentage: 100
}
]
});
+
+
+import { trade } from 'solana-agent-kit';
import { PublicKey } from '@solana/web3.js';
const signature = await trade(
agent,
new PublicKey('target-token-mint'),
100, // amount
new PublicKey('source-token-mint'),
300 // 3% slippage
);
+
+
+deploy_token(agent, decimals?, initialSupply?)Deploy a new SPL token with optional initial supply.
+deploy_collection(agent, options)Create a new NFT collection with customizable metadata and royalties.
+mintCollectionNFT(agent, collectionMint, metadata, recipient?)Mint a new NFT as part of an existing collection.
+transfer(agent, to, amount, mint?)Transfer SOL or SPL tokens to a recipient.
+trade(agent, outputMint, inputAmount, inputMint?, slippageBps?)Swap tokens using Jupiter Exchange integration.
+get_balance(agent, token_address)Check SOL or token balance for the agent's wallet.
+The toolkit relies on several key Solana and Metaplex libraries:
+Contributions are welcome! Please feel free to submit a Pull Request.
+ISC License
+This toolkit handles private keys and transactions. Always ensure you're using it in a secure environment and never share your private keys.
+
Main class for interacting with Solana blockchain +Provides a unified interface for token operations, NFT management, and trading
+SolanaAgentKit
+