A plugin for interacting with the XDC blockchain network within the ElizaOS ecosystem.
The XDC plugin enables seamless token transfers and balance checking on the XDC blockchain networks (mainnet and Apothem testnet). It provides functionality to transfer native XDC tokens, check wallet balances, and manage your portfolio.
pnpm install @elizaos/plugin-xdc
The plugin requires the following environment variables to be set:
XDC_PRIVATE_KEY=<Your XDC wallet private key>
XDC_NETWORK=<Network to use: mainnet or apothem>
import { xdcPlugin } from '@elizaos/plugin-xdc';
// The plugin responds to natural language commands like:
"Transfer 100 XDC to xdc7989f8..4623"
"Check my XDC balance"
"Show my portfolio on XDC network"
Transfers XDC tokens from the agent's wallet to another address.
Aliases:
- TRANSFER_ON_XDC
- SEND_ON_XDC
- PAY_ON_XDC
Retrieves the balance of XDC tokens for a specified address.
Aliases:
- CHECK_BALANCE_ON_XDC
- VIEW_BALANCE_ON_XDC
Provides a comprehensive view of your token holdings on the XDC network.
Aliases:
- VIEW_PORTFOLIO_ON_XDC
- CHECK_PORTFOLIO_ON_XDC
-
Transaction Failures
- Verify wallet has sufficient balance
- Check recipient address format
- Ensure private key is correctly set
- Verify network connectivity
-
Configuration Issues
- Verify all required environment variables are set
- Ensure private key format is correct
- Check that XDC_NETWORK is set to either "mainnet" or "apothem"
- Private Key Management
- Store private key securely using environment variables
- Never commit private keys to version control
- Use separate wallets for development and production
- Monitor wallet activity regularly
- Clone the repository
- Install dependencies:
pnpm install
- Build the plugin:
pnpm run build
- Run the plugin:
pnpm run dev
We welcome community feedback and contributions.
Contributions are welcome!
This plugin integrates with and builds upon the XDC Network technology:
Special thanks to:
- The XDC development team
- The Eliza community for their contributions and feedback
For more information about XDC capabilities: