Token Plugin
Interact with, create and transfer tokens on the Solana blockchain
Token Plugin
The @ ping-agent-kit/plugin-token
plugin provides a set of tools and actions to interact with, create and transfer tokens on the Solana blockchain.
Installation
Install the plugin alongside the core Ping Agent Kit:
Copy
npm install ping-agent-kit @ping-agent-kit/plugin-token
Integration
Add the Token plugin to your agent:
Copy
import { PingAgentKit } from "ping-agent-kit";
import TokenPlugin from "@ping-agent-kit/plugin-token";
const agent = new PingAgentKit(
wallet,
"YOUR_RPC_URL",
{
OPENAI_API_KEY: "YOUR_OPENAI_API_KEY",
}
).use(TokenPlugin);
Available Tools
Dexscreener
getTokenDataByAddress
Get token data using a token’s mint address
getTokenAddressFromTicker
Get a token’s mint address using its ticker symbol
Jupiter
fetchPrice
Get the current price of a token in USDC
stakeWithJup
Stake SOL to receive jupSOL
trade
Swap tokens using Jupiter’s aggregator
getTokenByTicker
Get token data using a token’s ticker symbol
Light Protocol
sendCompressedAirdrop
Send compressed token airdrops to multiple addresses efficiently
Solana
closeEmptyTokenAccounts
Close empty token accounts to reclaim rent
getTPS
Get current transactions per second on Solana
get_balance
Get SOL or token balance for a wallet
get_balance_other
Get balance for another wallet address
get_token_balance
Get detailed token balances including metadata
request_faucet_funds
Request tokens from a faucet (devnet/testnet)
transfer
Transfer SOL or tokens to another address
getWalletAddress
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 oracles
fetchPythPriceFeedID
Get price feed ID for a token
Rugcheck
fetchTokenDetailedReport
Get detailed token security analysis
fetchTokenReportSummary
Get summarized token security report
Soutiofi
burnTokens
Burn tokens using Solutiofi
closeAccounts
Close token accounts using Solutiofi
mergeTokens
Merge multiple tokens into one
spreadToken
Split tokens across multiple addresses
Last updated