Solana Plugin
The Solana Plugin provides blockchain functionality including wallet management and transaction trust evaluation.
Installation
Section titled “Installation”-
Install the package:
Terminal window npm i github:elizaos-plugins/plugin-solanaTerminal window pnpm add github:elizaos-plugins/plugin-solanaTerminal window yarn add github:elizaos-plugins/plugin-solana -
Configure environment:
Terminal window SOLANA_PRIVATE_KEY=your-wallet-private-keySOLANA_RPC_URL=your-rpc-endpoint
import { createSolanaPlugin } from "@eliza/plugin-solana";
const solanaPlugin = createSolanaPlugin({ privateKey: process.env.SOLANA_PRIVATE_KEY, rpcUrl: process.env.SOLANA_RPC_URL});
const agent = new AgentBuilder() .withPlugin(solanaPlugin) .build();
Features
Section titled “Features”Evaluators
Section titled “Evaluators”Evaluator | Description |
---|---|
trustEvaluator | Assess transaction trust scores |
Providers
Section titled “Providers”Provider | Description |
---|---|
walletProvider | Wallet management and operations |
trustScoreProvider | Transaction trust metrics |
Configuration
Section titled “Configuration”interface SolanaPluginConfig { privateKey: string; rpcUrl: string; network?: "mainnet" | "testnet" | "devnet"; trustScoreThreshold?: number;}
Best Practices
Section titled “Best Practices”- Implement proper error handling for transactions
- Validate addresses before operations
- Monitor trust scores for suspicious activity
- Use appropriate network for testing