plugin-my
v0.1.0
Published
COTI blockchain plugin for ElizaOS - enables private token operations and encrypted transactions
Downloads
2
Maintainers
Readme
My COTI Plugin
COTI blockchain plugin for ElizaOS - enables private token operations and encrypted transactions on the COTI network.
Features
- Native COTI Balance Checking: Get COTI token balances for any address
- COTI Token Transfers: Send COTI tokens to other addresses
- Account Management: List and manage COTI accounts
- Wallet Information: Get detailed wallet and network information
- Privacy-Focused: Built for COTI's privacy-enhanced blockchain
Installation
npm install plugin-myConfiguration
Set the following environment variables:
COTI_PRIVATE_KEY: Private key for your COTI wallet (required)COTI_RPC_URL: RPC URL for COTI network (optional, defaults to testnet)COTI_NETWORK_ID: Network ID for COTI blockchain (optional, defaults to 7701)
Example .env file:
COTI_PRIVATE_KEY=your_private_key_here
COTI_RPC_URL=https://testnet.coti.io/rpc
COTI_NETWORK_ID=7701Usage
import { myPlugin } from 'plugin-my';
// Use the plugin in your ElizaOS agentAvailable Actions
GET_NATIVE_BALANCE
Check COTI token balance for an address.
Triggers: "What's my COTI balance?", "Check balance for 0x..."
TRANSFER_NATIVE
Transfer COTI tokens to another address.
Triggers: "Send 10 COTI to 0x...", "Transfer 5.5 COTI to alice"
LIST_ACCOUNTS
List all configured COTI accounts.
Triggers: "Show me my COTI accounts", "What accounts do I have?"
WALLET_INFO
Get detailed wallet and network information.
Triggers: "Show me my wallet information", "What's my wallet status?"
Structure
plugin-my/
├── src/
│ ├── actions/ # COTI blockchain actions
│ │ ├── getNativeBalance.ts
│ │ ├── transferNative.ts
│ │ ├── listAccounts.ts
│ │ └── walletInfo.ts
│ ├── providers/ # Blockchain providers
│ │ ├── cotiProvider.ts
│ │ └── wallet.ts
│ ├── types/ # Type definitions
│ │ └── index.ts
│ └── index.ts # Plugin export
├── package.json # Dependencies and config
└── README.md # This fileDevelopment Commands
# Start in development mode with hot reload
bun run dev
# Start in production mode
bun run start
# Build the plugin
bun run build
# Run tests
bun test
# Format code
bun run formatSecurity
- Never share your private key
- Use testnet for development and testing
- Verify all transaction details before confirming
License
UNLICENSED
