Internet Computer Protocol (ICP) plugin for Eliza OS.
- Create meme tokens on PickPump
- Interact with ICP canisters
- Handle ICRC-1 token standard
- Manage ICP wallets and identities
- Support for anonymous and authenticated calls
pnpm install @elizaos/plugin-icp
The plugin requires the following environment variables:
INTERNET_COMPUTER_PRIVATE_KEY=<your-ed25519-private-key>
import { icpPlugin } from "@elizaos/plugin-icp";
// Register the plugin with Eliza
eliza.registerPlugin(icpPlugin);
Creates a new meme token on PickPump with AI-generated logo and description.
// Example usage in chat
"Create a space cat token on PickPump";
"Help me create a pizza-themed funny token on PP";
Manages ICP wallet operations and canister interactions.
const { wallet } = await icpWalletProvider.get(runtime, message, state);
-
Identity Creation Failures
- Ensure private key is exactly 32 bytes
- Verify private key is properly hex-encoded
- Check if private key has correct permissions
-
Canister Interaction Issues
- Verify canister ID is valid
- Ensure proper network configuration (mainnet/testnet)
- Check if canister is available and running
-
Transaction Failures
- Verify sufficient balance for operation
- Check cycle balance for canister calls
- Ensure proper fee calculation
-
Authentication Problems
- Verify identity is properly initialized
- Check if agent is configured correctly
- Ensure proper network connectivity
-
Key Management
- Never expose private keys in code or logs
- Use environment variables for sensitive data
- Rotate keys periodically
- Use separate keys for development and production
-
Identity Security
- Create separate identities for different purposes
- Limit identity permissions appropriately
- Monitor identity usage and access patterns
-
Canister Interaction Safety
- Validate all input parameters
- Implement proper error handling
- Use query calls when possible to save cycles
- Implement rate limiting for calls
-
Network Security
- Use secure endpoints
- Implement proper timeout handling
- Validate responses from canisters
- Handle network errors gracefully
// Token Creation Arguments
export type CreateMemeTokenArg = {
name: string;
symbol: string;
description: string;
logo: string;
twitter?: string;
website?: string;
telegram?: string;
};
// ICP Configuration
export interface ICPConfig {
privateKey: string;
network?: "mainnet" | "testnet";
}
The plugin provides various utility functions for:
- Principal/Account conversions
- Candid type handling
- Result/Variant unwrapping
- Array/Hex conversions
// Convert principal to account
principal2account(principal: string, subaccount?: number[]): string
// Check if text is valid principal
isPrincipalText(text: string): boolean
// Create anonymous actor for public queries
createAnonymousActor<T>(idlFactory, canisterId, host?)
- Clone the repository
- Install dependencies:
pnpm install
- Build the plugin:
pnpm run build
- Run tests:
pnpm test
- Start a local Internet Computer replica
- Configure environment for local testing
- Use test identities for development
- @dfinity/agent: ^2.1.3
- @dfinity/candid: ^2.1.3
- @dfinity/identity: ^2.1.3
- @dfinity/principal: ^2.1.3
- @elizaos/core: workspace:*
- Support for additional canister standards
- Enhanced error handling and recovery
- Batch transaction support
- Advanced identity management
- Improved cycle management
- Extended canister interaction capabilities
Contributions are welcome! Please see the CONTRIBUTING.md file for more information.
This plugin integrates with and builds upon several key technologies:
- Internet Computer: Decentralized cloud computing platform
- @dfinity/agent: ICP HTTP client and agent
- @dfinity/candid: Candid interface description language
- @dfinity/principal: Principal identifier handling
- @dfinity/identity: Identity management
Special thanks to:
- The DFINITY Foundation for developing the Internet Computer
- The ICP Developer community
- The DFINITY SDK maintainers
- The PickPump team for meme token infrastructure
- The Eliza community for their contributions and feedback
For more information about Internet Computer capabilities:
This plugin is part of the Eliza project. See the main project repository for license information.