Configuration
Configure RPC endpoints, API keys, and understand how wallet credentials are handled.
WalletConfig
The SDK supports four chains. Each chain is configured with a private key and an optional custom RPC endpoint inside the wallets object.
wallet-config.ts
import { createSkills } from "dex-skills";
const skills = createSkills({
wallets: {
solana: {
privateKey: process.env.SOLANA_PRIVATE_KEY,
rpcUrl: process.env.SOLANA_RPC_URL, // default: public mainnet
},
base: {
privateKey: process.env.BASE_PRIVATE_KEY,
rpcUrl: process.env.BASE_RPC_URL, // default: public Base RPC
},
bnb: {
privateKey: process.env.BNB_PRIVATE_KEY,
rpcUrl: process.env.BNB_RPC_URL, // default: public BSC RPC
},
tron: {
privateKey: process.env.TRON_PRIVATE_KEY,
fullHost: process.env.TRON_FULL_HOST, // default: https://api.trongrid.io
apiKey: process.env.TRON_API_KEY,
},
},
}); Environment Variables
| Parameter | Type | Description |
|---|---|---|
| SOLANA_RPC_URL | string | Solana RPC endpoint URL. Default: Public mainnet |
| BASE_RPC_URL | string | Base chain RPC endpoint URL. Default: Public Base RPC |
| BNB_RPC_URL | string | BNB Smart Chain RPC endpoint URL. Default: Public BSC RPC |
| TRON_FULL_HOST | string | TRON full node API host. Default: https://api.trongrid.io |
| TRON_API_KEY | string | API key for TronGrid access. Required for production TRON usage. |
| BITQUERY_API_KEY | string | Bitquery API key for cross-chain token data queries. |
.env
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
BASE_RPC_URL=https://mainnet.base.org
BNB_RPC_URL=https://bsc-dataseed.binance.org
TRON_FULL_HOST=https://api.trongrid.io
TRON_API_KEY=your-trongrid-api-key
BITQUERY_API_KEY=your-bitquery-api-key Platform-to-Chain Mapping
Each platform identifier maps to a specific chain. The SDK automatically routes requests to the correct chain configuration.
| Platform ID | Platform | Chain | Native Currency |
|---|---|---|---|
| pumpfun | Pump.fun | Solana | SOL |
| letsbonk | LetsBonk | Solana | SOL |
| moonshot | Moonshot | Solana | SOL |
| zora | Zora | Base | ETH |
| clanker | Clanker | Base | ETH |
| fourmeme | Four.meme | BNB | BNB |
| sunpump | SunPump | TRON | TRX |
Security
Private key handling
Private keys are provided in the
wallets configuration and used only for transaction signing. They are never transmitted beyond the RPC call. Store them in environment variables and never commit them to version control.
Environment variables
Never commit
.env files to version control. Add .env to your .gitignore and use a secrets manager in production.