[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6G6695PV9XYEKC974CGVFKC":3,"skill-same:01M6G6695PV9XYEKC974CGVFKC":152},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":59,"commitSha":60,"skillDirectory":61,"forksCount":62,"repositoryHtmlUrl":63,"repositoryHomepageUrl":6,"ownerHtmlUrl":64,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":65,"install":66,"resources":79},"01M6G6695PV9XYEKC974CGVFKC","AGIRAILS Payments",null,"Official ACTP (Agent Commerce Transaction Protocol) SDK — the first trustless payment layer for AI agents. Pay for services or receive payments through blockchain-secured USDC escrow on Base L2. Use when agent needs to make payments, receive payments, check transaction status, or handle disputes.","kbarbel640-del\u002Fskills","kbarbel640-del","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F255315490?v=4","01M6CJPPQGCCESXMG3K7BBGQ5J","01M6CJPPX2PB2BCZERFVM2C2B3",1,"MIT","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002FSKILL.md",[],[5,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"payments","escrow","USDC payments","agent-to-agent commerce","ACTP protocol","trustless escrow","AI agent payments","base-l2","l2","pay","ai agents","agent commerce","commerce","io","agent-to-agent","web3","official","status","ai agent","2026-11-10 10:12:30",false,"---\nname: AGIRAILS Payments\nversion: 2.1.0\ndescription: Official ACTP (Agent Commerce Transaction Protocol) SDK — the first trustless payment layer for AI agents. Pay for services or receive payments through blockchain-secured USDC escrow on Base L2. Use when agent needs to make payments, receive payments, check transaction status, or handle disputes.\nauthor: AGIRAILS Inc.\nhomepage: https:\u002F\u002Fagirails.io\nrepository: https:\u002F\u002Fgithub.com\u002Fagirails\u002Fopenclaw-skill\nlicense: MIT\ntags:\n  - payments\n  - blockchain\n  - escrow\n  - agent-commerce\n  - base-l2\n  - usdc\n  - web3\nkeywords:\n  - AI agent payments\n  - trustless escrow\n  - ACTP protocol\n  - agent-to-agent commerce\n  - USDC payments\nmetadata:\n  openclaw:\n    emoji: \"?\"\n    minVersion: \"1.0.0\"\n    requires:\n      env:\n        - AGENT_PRIVATE_KEY\n        - AGENT_ADDRESS\n---\n\n# AGIRAILS — Trustless Payments for AI Agents\n\nEnable your AI agent to **pay for services** or **receive payments** through blockchain-secured USDC escrow on Base L2.\n\n## ? Quick Start\n\n**Just say:** *\"Pay 10 USDC to 0xProvider for translation service\"*\n\nThe agent will:\n1. Initialize ACTP client\n2. Create transaction with escrow\n3. Track state through completion\n4. Handle disputes if needed\n\n---\n\n## Prerequisites\n\n| Requirement | Check | Install |\n|-------------|-------|---------|\n| **Node.js 18+** | `node --version` | [nodejs.org](https:\u002F\u002Fnodejs.org) |\n| **Private Key** | `echo $AGENT_PRIVATE_KEY` | Export wallet key |\n| **USDC Balance** | Check wallet | Bridge USDC to Base via [bridge.base.org](https:\u002F\u002Fbridge.base.org) |\n\n### Environment Variables\n\n```bash\nexport AGENT_PRIVATE_KEY=\"0x...\"   # Wallet private key\nexport AGENT_ADDRESS=\"0x...\"       # Wallet address\n```\n\n> **Note:** SDK includes default RPC endpoints. For high-volume production use, set up your own RPC via [Alchemy](https:\u002F\u002Falchemy.com) or [QuickNode](https:\u002F\u002Fquicknode.com) and pass `rpcUrl` to client config.\n\n### Installation\n\n```bash\n# TypeScript\u002FNode.js\nnpm install @agirails\u002Fsdk\n\n# Python\npip install agirails\n```\n\n---\n\n## How It Works\n\nACTP uses an **8-state machine** with blockchain-secured escrow:\n\n```\nHuman\u002FAgent requests service\n        ↓\n   INITIATED ──► Provider quotes price\n        ↓\n     QUOTED ──► Requester accepts, locks USDC\n        ↓\n   COMMITTED ──► Provider starts work\n        ↓\n  IN_PROGRESS ──► Provider delivers (REQUIRED step!)\n        ↓\n   DELIVERED ──► Dispute window (48h default)\n        ↓\n    SETTLED ◄── Manual release (requester calls releaseEscrow)\n\n   DISPUTED ──► Mediator resolves (splits funds)\n   CANCELLED ──► Refund to requester\n```\n\n### Key Guarantees\n\n| Guarantee | Description |\n|-----------|-------------|\n| **Escrow Solvency** | Vault always holds ≥ active transaction amounts |\n| **State Monotonicity** | States only move forward, never backwards |\n| **Deadline Enforcement** | No delivery after deadline passes |\n| **Dispute Protection** | 48h window to raise issues before settlement |\n\n---\n\n## Actions\n\n| Action | Who | Description |\n|--------|-----|-------------|\n| `pay` | Requester | Simple payment (create + escrow lock) |\n| `checkStatus` | Anyone | Get transaction state |\n| `createTransaction` | Requester | Create with custom params |\n| `linkEscrow` | Requester | Lock funds in escrow |\n| `transitionState` | Provider | Quote, start, deliver |\n| `releaseEscrow` | Requester | Release funds to provider |\n| `transitionState('DISPUTED')` | Either | Raise dispute for mediation |\n\n---\n\n## Requester Flow (Paying for Services)\n\n### Simple Payment\n\n```typescript\nimport { ACTPClient } from '@agirails\u002Fsdk';\n\nconst client = await ACTPClient.create({\n  mode: 'mainnet',\n  privateKey: process.env.AGENT_PRIVATE_KEY!,\n  requesterAddress: process.env.AGENT_ADDRESS!,\n});\n\n\u002F\u002F One-liner payment\nconst result = await client.basic.pay({\n  to: '0xProviderAddress',\n  amount: '25.00',     \u002F\u002F USDC\n  deadline: '+24h',    \u002F\u002F 24 hours from now\n});\n\nconsole.log(`Transaction: ${result.txId}`);\nconsole.log(`State: ${result.state}`);\n```\n\n### Advanced Payment (Full Control)\n\n```typescript\n\u002F\u002F 1. Create transaction\nconst txId = await client.standard.createTransaction({\n  provider: '0xProviderAddress',\n  amount: '100',  \u002F\u002F 100 USDC (user-friendly)\n  deadline: Math.floor(Date.now() \u002F 1000) + 86400,\n  disputeWindow: 172800,  \u002F\u002F 48 hours\n  serviceDescription: 'Translate 500 words to Spanish',\n});\n\n\u002F\u002F 2. Lock funds in escrow\nconst escrowId = await client.standard.linkEscrow(txId);\n\n\u002F\u002F 3. Wait for delivery... then release\n\u002F\u002F ...wait for DELIVERED\nawait client.standard.releaseEscrow(escrowId);\n```\n\n---\n\n## Provider Flow (Receiving Payments)\n\n```typescript\nimport { ethers } from 'ethers';\nconst abiCoder = ethers.AbiCoder.defaultAbiCoder();\n\n\u002F\u002F 1. Quote the job (encode amount as proof)\nconst quoteAmount = ethers.parseUnits('50', 6);\nconst quoteProof = abiCoder.encode(['uint256'], [quoteAmount]);\nawait client.standard.transitionState(txId, 'QUOTED', quoteProof);\n\n\u002F\u002F 2. Start work (REQUIRED before delivery!)\nawait client.standard.transitionState(txId, 'IN_PROGRESS');\n\n\u002F\u002F 3. Deliver with dispute window proof\nconst disputeWindow = 172800;  \u002F\u002F 48 hours\nconst deliveryProof = abiCoder.encode(['uint256'], [disputeWindow]);\nawait client.standard.transitionState(txId, 'DELIVERED', deliveryProof);\n\n\u002F\u002F 4. Requester releases after dispute window (or earlier if satisfied)\n```\n\n**⚠️ CRITICAL:** `IN_PROGRESS` is **required** before `DELIVERED`. Contract rejects direct `COMMITTED → DELIVERED`.\n\n---\n\n## Proof Encoding\n\nAll proofs must be ABI-encoded hex strings:\n\n| Transition | Proof Format | Example |\n|------------|--------------|---------|\n| QUOTED | `['uint256']` amount | `encode(['uint256'], [parseUnits('50', 6)])` |\n| DELIVERED | `['uint256']` dispute window | `encode(['uint256'], [172800])` |\n| SETTLED (dispute) | `['uint256', 'uint256', 'address', 'uint256']` | `[reqAmt, provAmt, mediator, fee]` |\n\n```typescript\nimport { ethers } from 'ethers';\nconst abiCoder = ethers.AbiCoder.defaultAbiCoder();\n\n\u002F\u002F Quote proof\nconst quoteProof = abiCoder.encode(['uint256'], [ethers.parseUnits('100', 6)]);\n\n\u002F\u002F Delivery proof\nconst deliveryProof = abiCoder.encode(['uint256'], [172800]);\n\n\u002F\u002F Resolution proof (mediator only)\nconst resolutionProof = abiCoder.encode(\n  ['uint256', 'uint256', 'address', 'uint256'],\n  [requesterAmount, providerAmount, mediatorAddress, mediatorFee]\n);\n```\n\n---\n\n## Checking Status\n\n```typescript\nconst status = await client.basic.checkStatus(txId);\n\nconsole.log(`State: ${status.state}`);\nconsole.log(`Can dispute: ${status.canDispute}`);\n```\n\n---\n\n## Disputes\n\nEither party can raise a dispute before settlement:\n\n```typescript\n\u002F\u002F Raise dispute\nawait client.standard.transitionState(txId, 'DISPUTED');\n\n\u002F\u002F Mediator resolves (admin only)\nconst resolution = abiCoder.encode(\n  ['uint256', 'uint256', 'address', 'uint256'],\n  [\n    ethers.parseUnits('30', 6),   \u002F\u002F requester gets 30 USDC\n    ethers.parseUnits('65', 6),   \u002F\u002F provider gets 65 USDC\n    mediatorAddress,\n    ethers.parseUnits('5', 6),    \u002F\u002F mediator fee\n  ]\n);\nawait client.standard.transitionState(txId, 'SETTLED', resolution);\n```\n\n---\n\n## Protocol Fees\n\n| Fee Type | Amount |\n|----------|--------|\n| Platform fee | 1% of transaction |\n| Minimum fee | $0.05 USDC |\n| Maximum cap | 5% (governance limit) |\n\nProvider receives: `amount - max(amount * 0.01, $0.05)`\n\n---\n\n## Client Modes\n\n| Mode | Network | Use Case |\n|------|---------|----------|\n| `mock` | Local simulation | Development, testing |\n| `testnet` | Base Sepolia | Integration testing |\n| `mainnet` | Base | Production |\n\n```typescript\n\u002F\u002F Development\nconst client = await ACTPClient.create({\n  mode: 'mock',\n  requesterAddress: '0x...',\n});\nawait client.mintTokens('0x...', '1000000000');  \u002F\u002F Mint test USDC\n\n\u002F\u002F Production\nconst client = await ACTPClient.create({\n  mode: 'mainnet',\n  privateKey: process.env.AGENT_PRIVATE_KEY!,\n  requesterAddress: process.env.AGENT_ADDRESS!,\n});\n```\n\n---\n\n## Error Handling\n\n```typescript\nimport {\n  InsufficientFundsError,\n  InvalidStateTransitionError,\n  DeadlineExpiredError,\n} from '@agirails\u002Fsdk';\n\ntry {\n  await client.basic.pay({...});\n} catch (error) {\n  if (error instanceof InsufficientFundsError) {\n    console.log(error.message);\n  } else if (error instanceof InvalidStateTransitionError) {\n    console.log(`Invalid state transition`);\n  }\n}\n```\n\n---\n\n## Python Example\n\n```python\nimport asyncio\nimport os\nfrom agirails import ACTPClient\n\nasync def main():\n    client = await ACTPClient.create(\n        mode=\"mainnet\",\n        private_key=os.environ[\"AGENT_PRIVATE_KEY\"],\n        requester_address=os.environ[\"AGENT_ADDRESS\"],\n    )\n\n    result = await client.basic.pay({\n        \"to\": \"0xProviderAddress\",\n        \"amount\": \"25.00\",\n        \"deadline\": \"24h\",\n    })\n\n    print(f\"Transaction: {result.tx_id}\")\n    print(f\"State: {result.state}\")\n\nasyncio.run(main())\n```\n\n---\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| `COMMITTED → DELIVERED` reverts | Missing IN_PROGRESS | Add `transitionState(txId, 'IN_PROGRESS')` first |\n| Invalid proof error | Wrong encoding | Use `ethers.AbiCoder` with correct types |\n| Insufficient balance | Not enough USDC | Bridge USDC to Base via [bridge.base.org](https:\u002F\u002Fbridge.base.org) |\n| Deadline expired | Too slow | Create new transaction with longer deadline |\n\n---\n\n## Files\n\n| File | Purpose |\n|------|---------|\n| `{baseDir}\u002Freferences\u002Frequester-template.md` | Full requester agent template |\n| `{baseDir}\u002Freferences\u002Fprovider-template.md` | Full provider agent template |\n| `{baseDir}\u002Freferences\u002Fstate-machine.md` | Detailed state transitions |\n| `{baseDir}\u002Fexamples\u002Fsimple-payment.md` | Minimal payment example |\n| `{baseDir}\u002Fexamples\u002Ffull-lifecycle.md` | Complete transaction lifecycle |\n\n---\n\n## OpenClaw Integration\n\nReady-to-use templates for OpenClaw agents.\n\n### Quick Setup (5 minutes)\n\n```bash\n# Run setup script\nbash {baseDir}\u002Fscripts\u002Fsetup.sh\n\n# Add agent config to openclaw.json (see agent-config.json)\n# Set environment variables\n# Restart OpenClaw\n```\n\nSee `{baseDir}\u002Fopenclaw\u002FQUICKSTART.md` for detailed guide.\n\n### OpenClaw Files\n\n| File | Purpose |\n|------|---------|\n| `{baseDir}\u002Fopenclaw\u002FQUICKSTART.md` | 5-minute setup guide |\n| `{baseDir}\u002Fopenclaw\u002Fagent-config.json` | Ready-to-use agent configs |\n| `{baseDir}\u002Fopenclaw\u002FSOUL-treasury.md` | Treasury agent template (buyer) |\n| `{baseDir}\u002Fopenclaw\u002FSOUL-provider.md` | Merchant agent template (seller) |\n| `{baseDir}\u002Fopenclaw\u002Fcron-examples.json` | Automation cron jobs |\n| `{baseDir}\u002Fopenclaw\u002Fvalidation-patterns.md` | Delivery validation helpers |\n| `{baseDir}\u002Fopenclaw\u002Fsecurity-checklist.md` | Pre-launch security audit |\n\n### Scripts\n\n| Script | Purpose |\n|--------|---------|\n| `{baseDir}\u002Fscripts\u002Fsetup.sh` | Automated workspace setup |\n| `{baseDir}\u002Fscripts\u002Ftest-balance.ts` | Check wallet balance |\n| `{baseDir}\u002Fscripts\u002Ftest-purchase.ts` | Test purchase on testnet |\n\n---\n\n## Resources\n\n- **Documentation**: https:\u002F\u002Fdocs.agirails.io\n- **SDK Repository**: https:\u002F\u002Fgithub.com\u002Fagirails\u002Fsdk\n- **Discord**: https:\u002F\u002Fdiscord.gg\u002FnuhCt75qe4\n- **Support**: support@agirails.io\n","# AGIRAILS — Trustless Payments for AI Agents\n\nEnable your AI agent to **pay for services** or **receive payments** through blockchain-secured USDC escrow on Base L2.\n\n## ? Quick Start\n\n**Just say:** *\"Pay 10 USDC to 0xProvider for translation service\"*\n\nThe agent will:\n1. Initialize ACTP client\n2. Create transaction with escrow\n3. Track state through completion\n4. Handle disputes if needed\n\n---\n\n## Prerequisites\n\n| Requirement | Check | Install |\n|-------------|-------|---------|\n| **Node.js 18+** | `node --version` | [nodejs.org](https:\u002F\u002Fnodejs.org) |\n| **Private Key** | `echo $AGENT_PRIVATE_KEY` | Export wallet key |\n| **USDC Balance** | Check wallet | Bridge USDC to Base via [bridge.base.org](https:\u002F\u002Fbridge.base.org) |\n\n### Environment Variables\n\n```bash\nexport AGENT_PRIVATE_KEY=\"0x...\"   # Wallet private key\nexport AGENT_ADDRESS=\"0x...\"       # Wallet address\n```\n\n> **Note:** SDK includes default RPC endpoints. For high-volume production use, set up your own RPC via [Alchemy](https:\u002F\u002Falchemy.com) or [QuickNode](https:\u002F\u002Fquicknode.com) and pass `rpcUrl` to client config.\n\n### Installation\n\n```bash\n# TypeScript\u002FNode.js\nnpm install @agirails\u002Fsdk\n\n# Python\npip install agirails\n```\n\n---\n\n## How It Works\n\nACTP uses an **8-state machine** with blockchain-secured escrow:\n\n```\nHuman\u002FAgent requests service\n        ↓\n   INITIATED ──► Provider quotes price\n        ↓\n     QUOTED ──► Requester accepts, locks USDC\n        ↓\n   COMMITTED ──► Provider starts work\n        ↓\n  IN_PROGRESS ──► Provider delivers (REQUIRED step!)\n        ↓\n   DELIVERED ──► Dispute window (48h default)\n        ↓\n    SETTLED ◄── Manual release (requester calls releaseEscrow)\n\n   DISPUTED ──► Mediator resolves (splits funds)\n   CANCELLED ──► Refund to requester\n```\n\n### Key Guarantees\n\n| Guarantee | Description |\n|-----------|-------------|\n| **Escrow Solvency** | Vault always holds ≥ active transaction amounts |\n| **State Monotonicity** | States only move forward, never backwards |\n| **Deadline Enforcement** | No delivery after deadline passes |\n| **Dispute Protection** | 48h window to raise issues before settlement |\n\n---\n\n## Actions\n\n| Action | Who | Description |\n|--------|-----|-------------|\n| `pay` | Requester | Simple payment (create + escrow lock) |\n| `checkStatus` | Anyone | Get transaction state |\n| `createTransaction` | Requester | Create with custom params |\n| `linkEscrow` | Requester | Lock funds in escrow |\n| `transitionState` | Provider | Quote, start, deliver |\n| `releaseEscrow` | Requester | Release funds to provider |\n| `transitionState('DISPUTED')` | Either | Raise dispute for mediation |\n\n---\n\n## Requester Flow (Paying for Services)\n\n### Simple Payment\n\n```typescript\nimport { ACTPClient } from '@agirails\u002Fsdk';\n\nconst client = await ACTPClient.create({\n  mode: 'mainnet',\n  privateKey: process.env.AGENT_PRIVATE_KEY!,\n  requesterAddress: process.env.AGENT_ADDRESS!,\n});\n\n\u002F\u002F One-liner payment\nconst result = await client.basic.pay({\n  to: '0xProviderAddress',\n  amount: '25.00',     \u002F\u002F USDC\n  deadline: '+24h',    \u002F\u002F 24 hours from now\n});\n\nconsole.log(`Transaction: ${result.txId}`);\nconsole.log(`State: ${result.state}`);\n```\n\n### Advanced Payment (Full Control)\n\n```typescript\n\u002F\u002F 1. Create transaction\nconst txId = await client.standard.createTransaction({\n  provider: '0xProviderAddress',\n  amount: '100',  \u002F\u002F 100 USDC (user-friendly)\n  deadline: Math.floor(Date.now() \u002F 1000) + 86400,\n  disputeWindow: 172800,  \u002F\u002F 48 hours\n  serviceDescription: 'Translate 500 words to Spanish',\n});\n\n\u002F\u002F 2. Lock funds in escrow\nconst escrowId = await client.standard.linkEscrow(txId);\n\n\u002F\u002F 3. Wait for delivery... then release\n\u002F\u002F ...wait for DELIVERED\nawait client.standard.releaseEscrow(escrowId);\n```\n\n---\n\n## Provider Flow (Receiving Payments)\n\n```typescript\nimport { ethers } from 'ethers';\nconst abiCoder = ethers.AbiCoder.defaultAbiCoder();\n\n\u002F\u002F 1. Quote the job (encode amount as proof)\nconst quoteAmount = ethers.parseUnits('50', 6);\nconst quoteProof = abiCoder.encode(['uint256'], [quoteAmount]);\nawait client.standard.transitionState(txId, 'QUOTED', quoteProof);\n\n\u002F\u002F 2. Start work (REQUIRED before delivery!)\nawait client.standard.transitionState(txId, 'IN_PROGRESS');\n\n\u002F\u002F 3. Deliver with dispute window proof\nconst disputeWindow = 172800;  \u002F\u002F 48 hours\nconst deliveryProof = abiCoder.encode(['uint256'], [disputeWindow]);\nawait client.standard.transitionState(txId, 'DELIVERED', deliveryProof);\n\n\u002F\u002F 4. Requester releases after dispute window (or earlier if satisfied)\n```\n\n**⚠️ CRITICAL:** `IN_PROGRESS` is **required** before `DELIVERED`. Contract rejects direct `COMMITTED → DELIVERED`.\n\n---\n\n## Proof Encoding\n\nAll proofs must be ABI-encoded hex strings:\n\n| Transition | Proof Format | Example |\n|------------|--------------|---------|\n| QUOTED | `['uint256']` amount | `encode(['uint256'], [parseUnits('50', 6)])` |\n| DELIVERED | `['uint256']` dispute window | `encode(['uint256'], [172800])` |\n| SETTLED (dispute) | `['uint256', 'uint256', 'address', 'uint256']` | `[reqAmt, provAmt, mediator, fee]` |\n\n```typescript\nimport { ethers } from 'ethers';\nconst abiCoder = ethers.AbiCoder.defaultAbiCoder();\n\n\u002F\u002F Quote proof\nconst quoteProof = abiCoder.encode(['uint256'], [ethers.parseUnits('100', 6)]);\n\n\u002F\u002F Delivery proof\nconst deliveryProof = abiCoder.encode(['uint256'], [172800]);\n\n\u002F\u002F Resolution proof (mediator only)\nconst resolutionProof = abiCoder.encode(\n  ['uint256', 'uint256', 'address', 'uint256'],\n  [requesterAmount, providerAmount, mediatorAddress, mediatorFee]\n);\n```\n\n---\n\n## Checking Status\n\n```typescript\nconst status = await client.basic.checkStatus(txId);\n\nconsole.log(`State: ${status.state}`);\nconsole.log(`Can dispute: ${status.canDispute}`);\n```\n\n---\n\n## Disputes\n\nEither party can raise a dispute before settlement:\n\n```typescript\n\u002F\u002F Raise dispute\nawait client.standard.transitionState(txId, 'DISPUTED');\n\n\u002F\u002F Mediator resolves (admin only)\nconst resolution = abiCoder.encode(\n  ['uint256', 'uint256', 'address', 'uint256'],\n  [\n    ethers.parseUnits('30', 6),   \u002F\u002F requester gets 30 USDC\n    ethers.parseUnits('65', 6),   \u002F\u002F provider gets 65 USDC\n    mediatorAddress,\n    ethers.parseUnits('5', 6),    \u002F\u002F mediator fee\n  ]\n);\nawait client.standard.transitionState(txId, 'SETTLED', resolution);\n```\n\n---\n\n## Protocol Fees\n\n| Fee Type | Amount |\n|----------|--------|\n| Platform fee | 1% of transaction |\n| Minimum fee | $0.05 USDC |\n| Maximum cap | 5% (governance limit) |\n\nProvider receives: `amount - max(amount * 0.01, $0.05)`\n\n---\n\n## Client Modes\n\n| Mode | Network | Use Case |\n|------|---------|----------|\n| `mock` | Local simulation | Development, testing |\n| `testnet` | Base Sepolia | Integration testing |\n| `mainnet` | Base | Production |\n\n```typescript\n\u002F\u002F Development\nconst client = await ACTPClient.create({\n  mode: 'mock',\n  requesterAddress: '0x...',\n});\nawait client.mintTokens('0x...', '1000000000');  \u002F\u002F Mint test USDC\n\n\u002F\u002F Production\nconst client = await ACTPClient.create({\n  mode: 'mainnet',\n  privateKey: process.env.AGENT_PRIVATE_KEY!,\n  requesterAddress: process.env.AGENT_ADDRESS!,\n});\n```\n\n---\n\n## Error Handling\n\n```typescript\nimport {\n  InsufficientFundsError,\n  InvalidStateTransitionError,\n  DeadlineExpiredError,\n} from '@agirails\u002Fsdk';\n\ntry {\n  await client.basic.pay({...});\n} catch (error) {\n  if (error instanceof InsufficientFundsError) {\n    console.log(error.message);\n  } else if (error instanceof InvalidStateTransitionError) {\n    console.log(`Invalid state transition`);\n  }\n}\n```\n\n---\n\n## Python Example\n\n```python\nimport asyncio\nimport os\nfrom agirails import ACTPClient\n\nasync def main():\n    client = await ACTPClient.create(\n        mode=\"mainnet\",\n        private_key=os.environ[\"AGENT_PRIVATE_KEY\"],\n        requester_address=os.environ[\"AGENT_ADDRESS\"],\n    )\n\n    result = await client.basic.pay({\n        \"to\": \"0xProviderAddress\",\n        \"amount\": \"25.00\",\n        \"deadline\": \"24h\",\n    })\n\n    print(f\"Transaction: {result.tx_id}\")\n    print(f\"State: {result.state}\")\n\nasyncio.run(main())\n```\n\n---\n\n## Troubleshooting\n\n| Problem | Cause | Solution |\n|---------|-------|----------|\n| `COMMITTED → DELIVERED` reverts | Missing IN_PROGRESS | Add `transitionState(txId, 'IN_PROGRESS')` first |\n| Invalid proof error | Wrong encoding | Use `ethers.AbiCoder` with correct types |\n| Insufficient balance | Not enough USDC | Bridge USDC to Base via [bridge.base.org](https:\u002F\u002Fbridge.base.org) |\n| Deadline expired | Too slow | Create new transaction with longer deadline |\n\n---\n\n## Files\n\n| File | Purpose |\n|------|---------|\n| `{baseDir}\u002Freferences\u002Frequester-template.md` | Full requester agent template |\n| `{baseDir}\u002Freferences\u002Fprovider-template.md` | Full provider agent template |\n| `{baseDir}\u002Freferences\u002Fstate-machine.md` | Detailed state transitions |\n| `{baseDir}\u002Fexamples\u002Fsimple-payment.md` | Minimal payment example |\n| `{baseDir}\u002Fexamples\u002Ffull-lifecycle.md` | Complete transaction lifecycle |\n\n---\n\n## OpenClaw Integration\n\nReady-to-use templates for OpenClaw agents.\n\n### Quick Setup (5 minutes)\n\n```bash\n# Run setup script\nbash {baseDir}\u002Fscripts\u002Fsetup.sh\n\n# Add agent config to openclaw.json (see agent-config.json)\n# Set environment variables\n# Restart OpenClaw\n```\n\nSee `{baseDir}\u002Fopenclaw\u002FQUICKSTART.md` for detailed guide.\n\n### OpenClaw Files\n\n| File | Purpose |\n|------|---------|\n| `{baseDir}\u002Fopenclaw\u002FQUICKSTART.md` | 5-minute setup guide |\n| `{baseDir}\u002Fopenclaw\u002Fagent-config.json` | Ready-to-use agent configs |\n| `{baseDir}\u002Fopenclaw\u002FSOUL-treasury.md` | Treasury agent template (buyer) |\n| `{baseDir}\u002Fopenclaw\u002FSOUL-provider.md` | Merchant agent template (seller) |\n| `{baseDir}\u002Fopenclaw\u002Fcron-examples.json` | Automation cron jobs |\n| `{baseDir}\u002Fopenclaw\u002Fvalidation-patterns.md` | Delivery validation helpers |\n| `{baseDir}\u002Fopenclaw\u002Fsecurity-checklist.md` | Pre-launch security audit |\n\n### Scripts\n\n| Script | Purpose |\n|--------|---------|\n| `{baseDir}\u002Fscripts\u002Fsetup.sh` | Automated workspace setup |\n| `{baseDir}\u002Fscripts\u002Ftest-balance.ts` | Check wallet balance |\n| `{baseDir}\u002Fscripts\u002Ftest-purchase.ts` | Test purchase on testnet |\n\n---\n\n## Resources\n\n- **Documentation**: https:\u002F\u002Fdocs.agirails.io\n- **SDK Repository**: https:\u002F\u002Fgithub.com\u002Fagirails\u002Fsdk\n- **Discord**: https:\u002F\u002Fdiscord.gg\u002FnuhCt75qe4\n- **Support**: support@agirails.io\n",{"name":5,"tags":42,"author":46,"license":14,"version":47,"homepage":48,"keywords":49,"metadata":50,"repository":58,"description":7},[18,43,19,44,25,45,33],"blockchain","agent-commerce","usdc","AGIRAILS Inc.","2.1.0","https:\u002F\u002Fagirails.io",[24,23,22,21,20],{"openclaw":51},{"emoji":52,"requires":53,"minVersion":57},"?",{"env":54},[55,56],"AGENT_PRIVATE_KEY","AGENT_ADDRESS","1.0.0","https:\u002F\u002Fgithub.com\u002Fagirails\u002Fopenclaw-skill","main","e7e336ac628c3e3bd771aff1aaa469c93778f94a","skills\u002Funima3x\u002Fagirails",0,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del","2026-08-23 22:39:37",{"source":8,"skillName":5,"commands":67,"prompt":77,"zipAvailable":78},[68,71,74],{"tool":69,"command":70},"npx","npx skills add kbarbel640-del\u002Fskills --skill \"AGIRAILS Payments\"",{"tool":72,"command":73},"bunx","bunx skills add kbarbel640-del\u002Fskills --skill \"AGIRAILS Payments\"",{"tool":75,"command":76},"pnpm","pnpm dlx skills add kbarbel640-del\u002Fskills --skill \"AGIRAILS Payments\"","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002FSKILL.md",true,[80,86,90,94,98,102,106,110,114,118,122,126,130,134,138,144,148],{"path":81,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":84,"sourceHtmlUrl":85},"_meta.json","REFERENCE","参考文档",278,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002F_meta.json",{"path":87,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":88,"sourceHtmlUrl":89},"examples\u002Ffull-lifecycle.md",6783,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Fexamples\u002Ffull-lifecycle.md",{"path":91,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":92,"sourceHtmlUrl":93},"examples\u002Fsimple-payment.md",6526,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Fexamples\u002Fsimple-payment.md",{"path":95,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":96,"sourceHtmlUrl":97},"openclaw\u002Fagent-config.json",1466,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Fopenclaw\u002Fagent-config.json",{"path":99,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":100,"sourceHtmlUrl":101},"openclaw\u002Fcron-examples.json",2855,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Fopenclaw\u002Fcron-examples.json",{"path":103,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":104,"sourceHtmlUrl":105},"openclaw\u002FQUICKSTART.md",3167,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Fopenclaw\u002FQUICKSTART.md",{"path":107,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":108,"sourceHtmlUrl":109},"openclaw\u002Fsecurity-checklist.md",4057,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Fopenclaw\u002Fsecurity-checklist.md",{"path":111,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":112,"sourceHtmlUrl":113},"openclaw\u002FSOUL-provider.md",2991,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Fopenclaw\u002FSOUL-provider.md",{"path":115,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":116,"sourceHtmlUrl":117},"openclaw\u002FSOUL-treasury.md",3043,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Fopenclaw\u002FSOUL-treasury.md",{"path":119,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":120,"sourceHtmlUrl":121},"openclaw\u002Fvalidation-patterns.md",6208,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Fopenclaw\u002Fvalidation-patterns.md",{"path":123,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":124,"sourceHtmlUrl":125},"README.md",3126,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002FREADME.md",{"path":127,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":128,"sourceHtmlUrl":129},"references\u002Fprovider-template.md",13007,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Freferences\u002Fprovider-template.md",{"path":131,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":132,"sourceHtmlUrl":133},"references\u002Frequester-template.md",13929,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Freferences\u002Frequester-template.md",{"path":135,"resourceType":82,"resourceTypeDesc":83,"sizeBytes":136,"sourceHtmlUrl":137},"references\u002Fstate-machine.md",5447,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Freferences\u002Fstate-machine.md",{"path":139,"resourceType":140,"resourceTypeDesc":141,"sizeBytes":142,"sourceHtmlUrl":143},"scripts\u002Fsetup.sh","SCRIPT","脚本",4127,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Fscripts\u002Fsetup.sh",{"path":145,"resourceType":140,"resourceTypeDesc":141,"sizeBytes":146,"sourceHtmlUrl":147},"scripts\u002Ftest-balance.ts",1906,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Fscripts\u002Ftest-balance.ts",{"path":149,"resourceType":140,"resourceTypeDesc":141,"sizeBytes":150,"sourceHtmlUrl":151},"scripts\u002Ftest-purchase.ts",3629,"https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Funima3x\u002Fagirails\u002Fscripts\u002Ftest-purchase.ts",[153,178,202,220,225,244],{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":37},"01M6G8J55967D6281ACMKAKTEQ","crowd-prompting","A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzzadrian\u002Fcrowd-prompting\u002FSKILL.md",[],[160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,28],"crowd prompting","prompting","api","with","tokens","domain","world","prompts","operations","instructions","text","tool","system","improve","productivity","marketplace","https","content",{"skillNo":179,"name":180,"nameZh":6,"description":181,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":182,"categories":183,"keywords":184,"publishedAt":37},"01M6G8J0PKPAYVET6BWE8W4C26","dilemm-ai","Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzyori\u002Fdilemm-ai\u002FSKILL.md",[],[185,162,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,167,201],"dilemm ai","arena","analyze","browser","openclaw agent","create","automation","browser automation","bot","openclaw","design","strategy","headless","compete","submit","matchmaking","use",{"skillNo":203,"name":204,"nameZh":6,"description":205,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":206,"categories":207,"keywords":208,"publishedAt":37},"01M6G8HWAF3K9SW7NP3Z83CPJ6","arxiv-paper-reviews","Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date\u002Fcategory\u002Finterest, viewing paper details with comments, or submitting paper reviews via API at http:\u002F\u002F150.158.152.82:8000.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Fweak-accept\u002FSKILL.md",[],[209,210,211,212,213,214,215,163,216,199,201,217,162,218,219],"arxiv paper reviews","reviews","arxiv","paper","crawler","papers","comments","fetch","read","http","via",{"skillNo":221,"name":204,"nameZh":6,"description":205,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":222,"categories":223,"keywords":224,"publishedAt":37},"01M6G8HQJ7N7WMY6YV7D7SSJ16","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzxrys\u002Farxiv-paper-reviews\u002FSKILL.md",[],[212,211,210,209,219,214,215,163,213,199,201,216,217,162,218],{"skillNo":226,"name":227,"nameZh":6,"description":228,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":229,"categories":230,"keywords":231,"publishedAt":37},"01M6G8HM95Y64JNVFC2HN4E2BG","git-summary","Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fzweack\u002Fgit-summary\u002FSKILL.md",[],[232,233,234,235,236,237,35,238,239,240,241,242,243],"git","summary","git summary","commits","repository","win32","linux","contributors","true","quick","get","branches",{"skillNo":245,"name":246,"nameZh":6,"description":247,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":248,"categories":249,"keywords":250,"publishedAt":37},"01M6G8HGEGF05CNEJCGVYFSC4R","agent-constitution","Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.","https:\u002F\u002Fgithub.com\u002Fkbarbel640-del\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fztsalexey\u002Fagent-constitution\u002FSKILL.md",[],[251,252,253,254,163,255,256,59,257,217,258,259,260,261,262,176,263,264,265],"agent constitution","constitution","contracts","tree","query","base","log","check","Rules","projects","compliance","actions","state","governance","github"]