@elizaos/plugin-attps
Foundation plugin that enables advanced agent interactions, data verification, and price queries on the Eliza OS platform. It streamlines agent creation, verification processes, and provides a flexible framework for building robust agent-based solutions.
Overviewβ
The ATTPs plugin bridges agent-based logic with the Eliza ecosystem. It handles agent registration, data verification, and price queries, empowering both automated and user-driven workflows.
Featuresβ
Agent Operationsβ
- Agent Creation: Deploy new agents with custom settings
- Registration: Register agents on-chain or via standardized processes
- Multi-Signer Framework: Supports threshold-based approval flows
Data Verificationβ
- Chain Validation: Verify data authenticity on-chain
- Transaction Execution: Handle verification logic with built-in security checks
- Auto-Hashing: Convert raw data to hashed formats when needed
- Metadata Parsing: Validate content type, encoding, and compression
Price Queriesβ
- Live Price Data: Fetch price information for various pairs
- Format Validation: Normalize user query inputs to standard trading-pair formats
- APIs Integration: Retrieve real-time or near-real-time pricing information
Security Featuresβ
Access Controlβ
- Private Key Management: Safe usage of private keys for transaction signing
- Environment Variables: Secure injection of credentials
- On-Chain Validation: Leverage on-chain contract checks
Verificationβ
- Input Validation: Strict schema checks before on-chain operations
- Transaction Receipts: Provide verifiable transaction details
- Error Handling: Detailed error logs for quick debugging
Installationβ
npm install @elizaos/plugin-attps
Configurationβ
Configure the plugin by setting environment variables or runtime settings:
- ATTPS_RPC_URL
- ATTPS_PROXY_ADDRESS
- ATTPS_PRIVATE_KEY
- ATTPS_CONVERTER_ADDRESS
- ATTPS_AUTO_HASH_DATA
Usageβ
Basic Setupβ
import { attpsPlugin } from '@elizaos/plugin-attps';
// Initialize the plugin
const runtime = await initializeRuntime({
plugins: [attpsPlugin],
});
Actionsβ
CREATE_AND_REGISTER_AGENTβ
Creates and registers an agent using specified settings.
const result = await runtime.executeAction("CREATE_AND_REGISTER_AGENT", {
signers: [...],
threshold: 3,
agentHeader: { ... },
// ...other fields...
});
VERIFYβ
Verifies data on-chain via the Agent SDK.
const result = await runtime.executeAction("VERIFY", {
payload: {
data: "0x...hexData",
signatures: [...],
},
agent: "0x...agentAddress",
digest: "0x...digestString",
});
PRICE_QUERYβ
Fetches live price data for a specified trading pair.
const result = await runtime.executeAction('PRICE_QUERY', {
pair: 'BTC/USD',
});
Performance Optimizationβ
-
Cache Management
- Implement caching for frequent queries
- Monitor retrieval times and cache hits
-
Network Efficiency
- Batch requests where possible
- Validate response parsing to reduce overhead
System Requirementsβ
- Node.js 16.x or higher
- Sufficient network access to on-chain endpoints
- Basic configuration of environment variables
- Minimum 4GB RAM recommended
Troubleshootingβ
-
Invalid Agent Settings
- Ensure signers and threshold are correct
- Validate agentHeader for proper UUIDs and numeric values
-
Verification Failures
- Check the input data formats
- Confirm environment variables are set
-
Price Query Errors
- Verify the trading pair format
- Check external API availability
Safety & Securityβ
-
Credential Management
- Store private keys securely
- Do not commit secrets to version control
-
Transaction Limits
- Configure thresholds to mitigate abuse
- Log transaction attempts and failures
-
Monitoring & Logging
- Track unusual activity
- Maintain detailed audit logs
Supportβ
For issues or feature requests:
- Check existing documentation
- Submit a GitHub issue with relevant details
- Include transaction logs and system info if applicable
Contributingβ
We welcome pull requests! Refer to the projectβs CONTRIBUTING.md and open discussions to coordinate efforts.
Creditsβ
- APRO - Plugin sponsor and partner
- ATTPs SDK JS - Underlying agent SDK
- ethers.js - Transaction and contract interaction
- Community contributors for feedback and testing
For more information about Apro plugin capabilities:
Licenseβ
This plugin is part of the Eliza project. Refer to the main project repository for licensing details.