{"skill":{"slug":"usdckrump","displayName":"USDC Krump EVVM x402 Payment","summary":"Pay with USDC Krump (USDC.k) via x402 on Story Aeneid EVVM. Supports EVVM Native adapter (no EIP-3009 on token) and legacy Bridge adapter. Requires PRIVY_APP...","description":"---\nname: usdc-dance-evvm-payment\ndescription: Pay with USDC Krump (USDC.k) via x402 on Story Aeneid EVVM. Supports EVVM Native adapter (no EIP-3009 on token) and legacy Bridge adapter. Requires PRIVY_APP_ID and PRIVY_APP_SECRET (or private key for legacy path); credentials are user-supplied, not stored by the skill.\nversion: 1.2.0\nauthor: OpenClaw USDC Krump\ntags: [payment, evvm, x402, usdc, layerzero, story-aeneid, openclaw, privy, bridge, usdc-krump]\nrequires: [privy]\n---\n\n# USDC Krump (USDC.k) EVVM Payment Skill\n\nEnables OpenClaw agents to pay with **USDC Krump (USDC.k)** via the **x402 protocol** on **Story Aeneid EVVM**, using **Privy server wallets** or a private key.\n\n## Scope\n\nThis skill provides **instructions and parameter reference** for USDC Krump (USDC.k) payments via x402 on Story Aeneid. Executable code, examples, and scripts (e.g. EVVM deposit, two-agent flows) live in the full [USDC Krump repository](https://github.com/arunnadarasa/usdckrump); use that repo to run scripts or integrate the payment logic. Only create wallets or initiate payments when the user has **explicitly requested** a payment and the required credentials are configured.\n\n## Required credentials\n\nThe skill **does not store or provide** credentials. You must supply one of:\n\n- **Privy (recommended):** Set `PRIVY_APP_ID` and `PRIVY_APP_SECRET` (e.g. in `~/.openclaw/openclaw.json` under `env.vars`, or as environment variables). Get these from [dashboard.privy.io](https://dashboard.privy.io).\n- **Legacy / private key:** For the legacy `payViaEVVM` path, the payer private key must be supplied (e.g. `AGENT_PRIVATE_KEY`). Prefer Privy-managed wallets over raw private keys; do not store private keys in plain environment variables if avoidable.\n\n## Features\n\n- ✅ **Privy Integration**: Privy server wallets for autonomous agent transactions\n- ✅ **x402 Protocol**: EIP-3009-style auth; **EVVM Native adapter** (Core internal balances) or legacy adapter (EIP-3009 on token)\n- ✅ **EVVM Integration**: Payment routing through EVVM Core (ID 1140)\n- ✅ **EVVM Deposit**: Script to deposit USDC.k into EVVM Treasury so payers have internal balance for Native adapter\n- ✅ **Two-Agent Examples**: Direct x402, legacy adapter, and **native adapter** (`two-agents-x402-native.ts`)\n- ✅ **Policy-Based Security**: Privy policies for spending limits and guardrails\n- ✅ **Receipt Tracking**: `checkPaymentStatus(receiptId, adapterAddress, rpcUrl)`\n\n## Prerequisites\n\n1. **Privy account** (for Privy path): Get credentials from [dashboard.privy.io](https://dashboard.privy.io).\n2. **Privy skill installed**: `clawhub install privy`\n3. **OpenClaw config**: Add the required credentials (see **Required credentials** above). For Privy, add 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### EVVM deposit before using Native adapter\n\nEVVM Core moves **internal ledger balances**; it does not pull tokens from the wallet. For the **EVVM Native x402 adapter**, the payer must deposit USDC.k into EVVM first. **Run this in the full USDC Krump repo** (clone from [github.com/arunnadarasa/usdckrump](https://github.com/arunnadarasa/usdckrump)):\n\n```bash\ncd lz-bridge\nPRIVATE_KEY=0x<payer_key> DEPOSIT_AMOUNT=1000000 npm run evvm:deposit-usdck\n```\n\nThen use `useNativeAdapter: true` and the Native adapter address below.\n\n### Option 1: Using Privy Wallet (Recommended)\n\nCode reference (implement in your environment or use the full repo’s `src/`):\n\n```typescript\nimport { payViaEVVMWithPrivy } from './src/index';\n\n// EVVM Native adapter (no EIP-3009 on token; payer must have deposited USDC.k via Treasury)\nconst receipt = await payViaEVVMWithPrivy({\n  walletId: 'privy-wallet-id',\n  to: recipientAddress,\n  amount: '1000000', // 1 USDC.k (6 decimals)\n  receiptId: 'payment_123',\n  adapterAddress: '0xDf5eaED856c2f8f6930d5F3A5BCE5b5d7E4C73cc', // EVVM Native x402 adapter\n  usdcDanceAddress: '0xd35890acdf3BFFd445C2c7fC57231bDE5cAFbde5', // USDC.k (BridgeUSDC)\n  evvmCoreAddress: '0xa6a02E8e17b819328DDB16A0ad31dD83Dd14BA3b',\n  evvmId: 1140,\n  rpcUrl: 'https://aeneid.storyrpc.io',\n  useNativeAdapter: true,\n});\n```\n\n### Option 2: Using Private Key (Legacy)\n\nCode reference (use the full repo’s `src/` when running):\n\n```typescript\nimport { payViaEVVM } from './src/index';\n\nconst receipt = await payViaEVVM({\n  from: agentAddress,\n  to: recipientAddress,\n  amount: '1000000',\n  receiptId: 'payment_123',\n  privateKey: agentPrivateKey,\n  adapterAddress: '0xDf5eaED856c2f8f6930d5F3A5BCE5b5d7E4C73cc', // Native adapter\n  usdcDanceAddress: '0xd35890acdf3BFFd445C2c7fC57231bDE5cAFbde5',\n  evvmCoreAddress: '0xa6a02E8e17b819328DDB16A0ad31dD83Dd14BA3b',\n  evvmId: 1140,\n  rpcUrl: 'https://aeneid.storyrpc.io',\n  useNativeAdapter: true,\n});\n```\n\n### Two-agent native example\n\nIn the **full USDC Krump repo**, run:\n\n```bash\nAGENT_A_PRIVATE_KEY=0x... AGENT_B_ADDRESS=0x... npx tsx examples/two-agents-x402-native.ts\n```\n\nSee the repo’s `examples/README-two-agents-x402.md` for direct x402 and legacy adapter flows.\n\n## Configuration\n\n### Required Addresses (Story Aeneid Testnet)\n\n- **EVVM Core**: `0xa6a02E8e17b819328DDB16A0ad31dD83Dd14BA3b`\n- **EVVM ID**: `1140`\n- **USDC.k (BridgeUSDC)**: `0xd35890acdf3BFFd445C2c7fC57231bDE5cAFbde5`\n- **EVVM Native x402 adapter**: `0xDf5eaED856c2f8f6930d5F3A5BCE5b5d7E4C73cc` — use with `useNativeAdapter: true` (payer must deposit USDC.k via Treasury first)\n- **Bridge EVVM adapter (legacy)**: `0x00ed0E80E5EAE285d98eC50236aE97e2AF615314` — EIP-3009 on token\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 Krump (USDC.k) payments to 10 USDC.k 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`, `to`, `toIdentity`, `amount`, `receiptId`, `adapterAddress`, `usdcDanceAddress`, `evvmCoreAddress`, `evvmId`, `rpcUrl` (see Option 1 example)\n- `useNativeAdapter`: Set `true` for EVVM Native x402 adapter (payer must have deposited USDC.k via Treasury first)\n- `privyAppId`, `privyAppSecret`: Optional; use env vars 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\nIn the **full [USDC Krump repository](https://github.com/arunnadarasa/usdckrump)**, see the `examples/` directory:\n\n- `two-agents-x402-native.ts` — Two agents with EVVM Native adapter (recommended)\n- `two-agents-x402-simulation.ts` — Two agents with legacy Bridge adapter\n- `two-agents-x402-direct.ts` — Direct x402 transfer (no EVVM)\n- `agent-payment-privy-example.ts` — Privy wallets\n- `agent-payment-example.ts` — Private keys (legacy)\n\nSee the repo’s `examples/README-two-agents-x402.md` for the EVVM deposit step and all flows.\n\n## Security Considerations\n\nCredentials are **user-supplied only**; this skill does not store or transmit secrets. Only create wallets or initiate payments when the user has **explicitly requested** a payment and you have configured the required credentials (see **Required credentials**).\n\n⚠️ **When using Privy wallets:**\n\n1. **Set policies**: Always configure spending limits and restrictions (e.g. max per transaction, whitelisted chains/contracts).\n2. **Test first**: Use testnet and minimal amounts before any mainnet or real funds.\n3. **Monitor activity**: Regularly check wallet activity in the Privy dashboard.\n4. **Rotate credentials**: If compromised, rotate Privy App Secret immediately.\n5. **Prefer Privy over raw keys**: Prefer Privy-managed wallets over supplying a private key; avoid storing private keys in plain environment variables.\n\n## Requirements\n\n- Node.js 18+, ethers.js v6 (when running code from the full repo)\n- Privy skill installed: `clawhub install privy`\n- Access to Story Aeneid RPC endpoint\n- Required credentials: `PRIVY_APP_ID` and `PRIVY_APP_SECRET` (Privy path), or payer private key (legacy path)\n\n## License\n\nMIT\n","tags":{"latest":"0.1.2"},"stats":{"comments":0,"downloads":366,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":2},"createdAt":1771711392561,"updatedAt":1779077215828},"latestVersion":{"version":"0.1.2","createdAt":1771711980594,"changelog":"**Initial public release with full code and documentation.**\n\n- Added core logic and utilities for USDC Krump (USDC.k) payment over x402 on Story Aeneid EVVM.\n- Includes support for both Privy server wallet integration and legacy private key signing.\n- Provides reference implementation, parameter documentation, and example agent flows (single and two-agent).\n- Includes scripts for EVVM deposit, payment status checks, and policy-based security using Privy.\n- Example usage and required configuration included in examples and README.\n- Credentials (Privy or private key) are always user-supplied; never stored in the skill.","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":1779948110449}}