{"skill":{"slug":"openclaw-skill-usdc-dance-evvm","displayName":"Usdc Dance Evvm Payment","summary":"Pay with USDC.d via x402 protocol on Story Aeneid EVVM using Privy server wallets. Uses BridgeUSDC (custom bridge) until LayerZero supports Story Aeneid.","description":"---\nname: usdc-dance-evvm-payment\ndescription: Pay with USDC.d via x402 protocol on Story Aeneid EVVM using Privy server wallets. Uses BridgeUSDC (custom bridge) until LayerZero supports Story Aeneid.\nversion: 1.1.0\nauthor: LayerZero Story Aeneid Integration\ntags: [payment, evvm, x402, usdc, layerzero, story-aeneid, openclaw, privy, bridge]\nrequires: [privy]\n---\n\n# USDC.d EVVM Payment Skill\n\nEnables OpenClaw agents to autonomously pay with **USDC.d** (USDC Dance) tokens via the **x402 protocol** on **Story Aeneid EVVM** using **Privy server wallets**.\n\n## Features\n\n- ✅ **Privy Integration**: Uses Privy server wallets for autonomous agent transactions\n- ✅ **x402 Protocol Support**: EIP-3009 `transferWithAuthorization` for gasless payments\n- ✅ **EVVM Integration**: Seamless payment routing through EVVM Core\n- ✅ **Autonomous Payments**: Agents can pay each other without human intervention\n- ✅ **USDC.d on Story Aeneid**: BridgeUSDC from custom bridge (Base Sepolia → Story Aeneid); LayerZero path when LZ supports Story Aeneid\n- ✅ **Policy-Based Security**: Leverage Privy policies for transaction guardrails\n- ✅ **Receipt Tracking**: Payment receipts for verification and accounting\n\n## Prerequisites\n\n1. **Privy Account**: Get credentials from [dashboard.privy.io](https://dashboard.privy.io)\n2. **Privy Skill Installed**: `clawhub install privy`\n3. **OpenClaw Config**: Add Privy credentials to `~/.openclaw/openclaw.json`:\n\n```json\n{\n  \"env\": {\n    \"vars\": {\n      \"PRIVY_APP_ID\": \"your-app-id\",\n      \"PRIVY_APP_SECRET\": \"your-app-secret\"\n    }\n  }\n}\n```\n\n## Quick Start\n\n### Option 1: Using Privy Wallet (Recommended)\n\n```typescript\nimport { payViaEVVMWithPrivy } from './src/index';\n\n// Agent makes payment using Privy wallet (Bridge USDC.d on Story Aeneid testnet)\nconst receipt = await payViaEVVMWithPrivy({\n  walletId: 'privy-wallet-id',\n  to: humanOwnerAddress,\n  amount: '1000000', // 1 USDC.d (6 decimals)\n  receiptId: 'payment_123',\n  adapterAddress: '0x00ed0E80E5EAE285d98eC50236aE97e2AF615314', // Bridge EVVM adapter\n  usdcDanceAddress: '0x5f7aEf47131ab78a528eC939ac888D15FcF40C40', // BridgeUSDC\n  evvmCoreAddress: '0xa6a02E8e17b819328DDB16A0ad31dD83Dd14BA3b',\n  evvmId: 1140,\n  rpcUrl: 'https://aeneid.storyrpc.io'\n});\n```\n\n### Option 2: Using Private Key (Legacy)\n\n```typescript\nimport { payViaEVVM } from './src/index';\n\nconst receipt = await payViaEVVM({\n  from: agentAddress,\n  to: humanOwnerAddress,\n  amount: '1000000',\n  receiptId: 'payment_123',\n  privateKey: agentPrivateKey,\n  adapterAddress: '0x00ed0E80E5EAE285d98eC50236aE97e2AF615314', // Bridge EVVM adapter\n  usdcDanceAddress: '0x5f7aEf47131ab78a528eC939ac888D15FcF40C40', // BridgeUSDC\n  // ... other options\n});\n```\n\n## Configuration\n\n### Required Addresses (Story Aeneid Testnet)\n\n- **EVVM Core**: `0xa6a02E8e17b819328DDB16A0ad31dD83Dd14BA3b`\n- **EVVM ID**: `1140`\n- **USDC.d Token (Bridge)**: `0x5f7aEf47131ab78a528eC939ac888D15FcF40C40` — BridgeUSDC (custom bridge; use for OpenClaw until LayerZero supports Story Aeneid)\n- **Payment Adapter (Bridge)**: `0x00ed0E80E5EAE285d98eC50236aE97e2AF615314` — EVVMPaymentAdapter for BridgeUSDC\n\n**When LayerZero supports Story Aeneid:** You can switch to the LayerZero USDC.d and adapter; see lz-bridge deployments.\n\n### Network Details\n\n- **Chain**: Story Aeneid Testnet\n- **Chain ID**: `1315`\n- **Native Currency**: IP\n- **RPC**: `https://aeneid.storyrpc.io`\n\n## Privy Integration\n\nThis skill integrates with the [Privy OpenClaw skill](https://docs.privy.io/recipes/agent-integrations/openclaw-agentic-wallets) to enable:\n\n- **Autonomous Wallet Management**: Agents have their own Privy server wallets\n- **Policy-Based Security**: Use Privy policies to limit spending, restrict chains, or whitelist contracts\n- **No Private Key Storage**: Privy handles key management securely\n- **Transaction Signing**: Privy signs EIP-3009 and EIP-191 signatures via API\n\n### Creating a Privy Wallet for Your Agent\n\nAsk your OpenClaw agent:\n\n> \"Create an Ethereum wallet for yourself using Privy on Story Aeneid testnet\"\n\nThe agent will create a Privy server wallet and return the wallet ID.\n\n### Setting Up Policies\n\nCreate spending limits and restrictions:\n\n> \"Create a Privy policy that limits USDC.d payments to 10 USDC.d max per transaction\"\n\n> \"Attach the spending limit policy to my Privy wallet\"\n\n## Functions\n\n### `payViaEVVMWithPrivy(options)`\n\nProcess a payment through EVVM using x402 protocol with Privy wallet.\n\n**Parameters:**\n- `walletId`: Privy wallet ID\n- `to`: Recipient address (human owner or other agent)\n- `toIdentity`: Optional EVVM username (empty string if using address)\n- `amount`: Payment amount in smallest unit (6 decimals for USDC.d)\n- `receiptId`: Unique receipt identifier\n- `adapterAddress`: EVVMPaymentAdapter contract address (use Bridge adapter for BridgeUSDC on testnet)\n- `usdcDanceAddress`: USDC.d token contract address (use BridgeUSDC for current testnet)\n- `evvmCoreAddress`: EVVM Core contract address\n- `evvmId`: EVVM instance ID (1140 for Story Aeneid)\n- `rpcUrl`: Story Aeneid RPC endpoint\n- `privyAppId`: Privy App ID (optional, uses env var if not provided)\n- `privyAppSecret`: Privy App Secret (optional, uses env var if not provided)\n\n**Returns:** Transaction receipt\n\n### `payViaEVVM(options)` (Legacy)\n\nProcess payment using private key directly (not recommended for production).\n\n### `checkPaymentStatus(receiptId, adapterAddress, rpcUrl)`\n\nCheck if a payment was successfully processed.\n\n## Examples\n\nSee `examples/` directory for:\n- `agent-payment-privy-example.ts` - Using Privy wallets\n- `agent-payment-example.ts` - Using private keys (legacy)\n\n## Security Considerations\n\n⚠️ **Important**: When using Privy wallets:\n\n1. **Set Policies**: Always configure spending limits and restrictions\n2. **Test First**: Test on testnet before using real funds\n3. **Monitor Activity**: Regularly check wallet activity in Privy dashboard\n4. **Rotate Credentials**: If compromised, rotate Privy App Secret immediately\n\n## Requirements\n\n- Node.js 18+\n- ethers.js v6\n- Privy skill installed (`clawhub install privy`)\n- Access to Story Aeneid RPC endpoint\n- Privy account with App ID and App Secret\n\n## License\n\nMIT\n","tags":{"latest":"0.1.0"},"stats":{"comments":0,"downloads":281,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1771636160874,"updatedAt":1779077104200},"latestVersion":{"version":"0.1.0","createdAt":1771636160874,"changelog":"Initial release of USDC.d EVVM Payment Skill for OpenClaw.\n\n- Enables autonomous agent payments with USDC.d on the Story Aeneid EVVM testnet using x402 protocol and Privy server wallets.\n- Supports gasless EIP-3009-based payments routed through EVVM Core and a custom BridgeUSDC adapter.\n- Integrates Privy for secure wallet management, policy-based transaction guardrails, and API-based signature handling.\n- Includes APIs for submitting payments with Privy or legacy private key, and for checking payment status.\n- Provides detailed setup instructions, code examples, and guidance for security and configuration.","license":null},"metadata":null,"owner":{"handle":"arunnadarasa","userId":"s175spnx5m2qksm07wmc9jw9qh83hq8x","displayName":"Arun Nadarasa","image":"https://avatars.githubusercontent.com/u/186420617?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1779943778381}}