2.0.7 • Published 9 days ago
@solana-agent-kit/plugin-token v2.0.7
@solana-agent-kit/token-plugin
This plugin provides a set of tools and actions to interact with, create and transfer tokens on the Solana blockchain.
Tools Available
Dexscreener
getTokenDataByAddress
- Get token data using a token's mint addressgetTokenAddressFromTicker
- Get a token's mint address using its ticker symbol
Jupiter
cancelLimitOrders
- Cancel limit orders on JupitercreateLimitOrder
- Create a limit order on JupiterfetchPrice
- Fetch the price of a tokengetLimitOrderHistory
- Get the history of limit ordersgetOpenLimitOrders
- Get open limit ordersgetTokenDataByTicker
- Get token data using a ticker symbolstakeWithJup
- Stake tokens using Jupitertrade
- Trade tokens using Jupiter
Light Protocol
sendCompressedAirdrop
- Send compressed token airdrops to multiple addresses efficiently
Solana
closeEmptyTokenAccounts
- Close empty token accounts to reclaim rentgetTPS
- Get current transactions per second on Solanaget_balance
- Get SOL or token balance for a walletget_balance_other
- Get balance for another wallet addressget_token_balance
- Get detailed token balances including metadatarequest_faucet_funds
- Request tokens from a faucet (devnet/testnet)transfer
- Transfer SOL or tokens to another addressgetWalletAddress
- Get the wallet address of the current user
Mayan
swap
- Cross-chain token swaps using Mayan DEX
Pumpfun
launchPumpFunToken
- Launch new tokens on pump.fun
Pyth
fetchPythPrice
- Get real-time price data from Pyth oraclesfetchPythPriceFeedID
- Get price feed ID for a token
Rugcheck
fetchTokenDetailedReport
- Get detailed token security analysisfetchTokenReportSummary
- Get summarized token security report
Solana
balance
- Get SOL balance for a walletcloseEmptyTokenAccounts
- Close empty token accountsgetTPS
- Get transactions per second on SolanarequestFunds
- Request funds from a faucet on devnet/testnettokenBalances
- Get token balances for a wallettransfer
- Transfer SOL or tokens to another addresswalletAddress
- Get the wallet address of the current user
Solutiofi
burnTokens
- Burn tokens using SolutioficloseAccounts
- Close token accounts using SolutiofimergeTokens
- Merge multiple tokens into onespreadToken
- Split tokens across multiple addresses
Some example Usage
Checking Token Balances
// Get all token balances for your wallet
const balances = await agent.methods.get_token_balance(agent);
console.log("SOL Balance:", balances.sol);
console.log("Token Balances:", balances.tokens);
// Get specific token balance
const usdcBalance = await agent.methods.get_balance(
agent,
new PublicKey("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v")
);
Trading Tokens
// Swap 1 SOL for USDC
const trade = await agent.methods.trade(
agent,
"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", // USDC mint
1, // amount
undefined, // input mint (undefined means SOL)
100 // 1% slippage
);
Token Security
// Check if a token might be a rugpull
const report = await agent.methods.fetchTokenDetailedReport(
"TokenMintAddress123"
);
console.log("Security Score:", report.score);
console.log("Risk Factors:", report.risks);
Compressed Airdrops
// Send compressed airdrop to multiple addresses
const airdrop = await agent.methods.sendCompressedAirdrop(
agent,
100, // amount per recipient
new PublicKey("TokenMintAddress"), // token mint
[
new PublicKey("Recipient1"),
new PublicKey("Recipient2")
],
30000 // priority fee
);
For more detailed information about each action and its parameters, you can check the individual action files in the source code or refer to the official documentation at docs.sendai.fun.
2.0.7
9 days ago
2.0.6
21 days ago
2.0.5
26 days ago
2.0.4
1 month ago
2.0.3
2 months ago
2.0.2
2 months ago
2.0.0-beta.11
2 months ago
2.0.0-beta.9
2 months ago
2.0.0-beta.8
3 months ago
2.0.0-beta.7
3 months ago
2.0.0-beta.6
3 months ago
2.0.0-beta.5
3 months ago
2.0.0-beta.2
3 months ago
2.0.0
4 months ago