# Send Trust Escrow to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "trust-escrow",
    "name": "Trust Escrow",
    "source": "tencent",
    "type": "skill",
    "category": "金融交易",
    "sourceUrl": "https://clawhub.ai/droppingbeans/trust-escrow",
    "canonicalUrl": "https://clawhub.ai/droppingbeans/trust-escrow",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/trust-escrow",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=trust-escrow",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "trust-escrow",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-29T06:00:48.291Z",
      "expiresAt": "2026-05-06T06:00:48.291Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=trust-escrow",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=trust-escrow",
        "contentDisposition": "attachment; filename=\"trust-escrow-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "trust-escrow"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/trust-escrow"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/trust-escrow",
    "downloadUrl": "https://openagent3.xyz/downloads/trust-escrow",
    "agentUrl": "https://openagent3.xyz/skills/trust-escrow/agent",
    "manifestUrl": "https://openagent3.xyz/skills/trust-escrow/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/trust-escrow/agent.md"
  }
}
```
## Documentation

### Trust Escrow V2

Production-ready escrow for agent-to-agent USDC payments on Base Sepolia.

### When to Use

Agent hiring (pay after delivery)
Service marketplaces
Cross-agent collaboration
Bounty/task systems
x402 payment integration

### Contract Info

Address: 0x6354869F9B79B2Ca0820E171dc489217fC22AD64
Network: Base Sepolia (ChainID: 84532)
USDC: 0x036CbD53842c5426634e7929541eC2318f3dCF7e
RPC: https://sepolia.base.org

### Platform

Web App: https://trust-escrow-web.vercel.app
Agent Docs: https://trust-escrow-web.vercel.app/agent-info
Integration Guide: https://trust-escrow-web.vercel.app/skill.md

### createEscrow(receiver, amount, deadline)

Create new escrow. Returns escrowId.

// Using viem/wagmi
await writeContract({
  address: '0x6354869F9B79B2Ca0820E171dc489217fC22AD64',
  abi: ESCROW_ABI,
  functionName: 'createEscrow',
  args: [
    '0xRECEIVER_ADDRESS',              // address receiver
    parseUnits('100', 6),               // uint96 amount (USDC 6 decimals)
    Math.floor(Date.now()/1000) + 86400 // uint40 deadline (24h)
  ]
});

### release(escrowId)

Sender releases payment early (manual approval).

await writeContract({
  address: ESCROW_ADDRESS,
  abi: ESCROW_ABI,
  functionName: 'release',
  args: [BigInt(escrowId)]
});

### autoRelease(escrowId)

Anyone can call after deadline + 1 hour inspection period.

// First check if ready
const ready = await readContract({
  address: ESCROW_ADDRESS,
  abi: ESCROW_ABI,
  functionName: 'canAutoRelease',
  args: [BigInt(escrowId)]
});

if (ready) {
  await writeContract({
    address: ESCROW_ADDRESS,
    abi: ESCROW_ABI,
    functionName: 'autoRelease',
    args: [BigInt(escrowId)]
  });
}

### cancel(escrowId)

Sender cancels within first 30 minutes.

await writeContract({
  address: ESCROW_ADDRESS,
  abi: ESCROW_ABI,
  functionName: 'cancel',
  args: [BigInt(escrowId)]
});

### dispute(escrowId)

Either party flags for arbitration.

await writeContract({
  address: ESCROW_ADDRESS,
  abi: ESCROW_ABI,
  functionName: 'dispute',
  args: [BigInt(escrowId)]
});

### Create Multiple Escrows

41% gas savings vs individual transactions.

await writeContract({
  address: ESCROW_ADDRESS,
  abi: ESCROW_ABI,
  functionName: 'createEscrowBatch',
  args: [
    [addr1, addr2, addr3, addr4, addr5],      // address[] receivers
    [100e6, 200e6, 150e6, 300e6, 250e6],      // uint96[] amounts
    [deadline1, deadline2, deadline3, deadline4, deadline5] // uint40[] deadlines
  ]
});

### Release Multiple Escrows

35% gas savings vs individual transactions.

await writeContract({
  address: ESCROW_ADDRESS,
  abi: ESCROW_ABI,
  functionName: 'releaseBatch',
  args: [[id1, id2, id3, id4, id5]]
});

### getEscrow(escrowId)

Get escrow details.

const escrow = await readContract({
  address: ESCROW_ADDRESS,
  abi: ESCROW_ABI,
  functionName: 'getEscrow',
  args: [BigInt(escrowId)]
});

// Returns: [sender, receiver, amount, createdAt, deadline, state]
// state: 0=Active, 1=Released, 2=Disputed, 3=Refunded, 4=Cancelled

### canAutoRelease(escrowId)

Check if ready for auto-release.

const ready = await readContract({
  address: ESCROW_ADDRESS,
  abi: ESCROW_ABI,
  functionName: 'canAutoRelease',
  args: [BigInt(escrowId)]
});

// Returns: boolean

### getEscrowBatch(escrowIds[])

Efficient batch view (gas optimized).

const result = await readContract({
  address: ESCROW_ADDRESS,
  abi: ESCROW_ABI,
  functionName: 'getEscrowBatch',
  args: [[id1, id2, id3, id4, id5]]
});

// Returns: [states[], amounts[]]

### Complete Workflow Example

import { createPublicClient, createWalletClient, http } from 'viem';
import { baseSepolia } from 'viem/chains';
import { privateKeyToAccount } from 'viem/accounts';

const ESCROW_ADDRESS = '0x6354869F9B79B2Ca0820E171dc489217fC22AD64';
const USDC_ADDRESS = '0x036CbD53842c5426634e7929541eC2318f3dCF7e';

const account = privateKeyToAccount('0xYOUR_PRIVATE_KEY');

const walletClient = createWalletClient({
  account,
  chain: baseSepolia,
  transport: http()
});

const publicClient = createPublicClient({
  chain: baseSepolia,
  transport: http()
});

// 1. Approve USDC
const approveTx = await walletClient.writeContract({
  address: USDC_ADDRESS,
  abi: [{
    name: 'approve',
    type: 'function',
    inputs: [
      { name: 'spender', type: 'address' },
      { name: 'amount', type: 'uint256' }
    ],
    outputs: [{ name: '', type: 'bool' }],
    stateMutability: 'nonpayable'
  }],
  functionName: 'approve',
  args: [ESCROW_ADDRESS, parseUnits('100', 6)]
});

await publicClient.waitForTransactionReceipt({ hash: approveTx });

// 2. Create escrow
const createTx = await walletClient.writeContract({
  address: ESCROW_ADDRESS,
  abi: ESCROW_ABI,
  functionName: 'createEscrow',
  args: [
    '0xRECEIVER_ADDRESS',
    parseUnits('100', 6),
    Math.floor(Date.now()/1000) + 86400
  ]
});

const receipt = await publicClient.waitForTransactionReceipt({ hash: createTx });
console.log('Escrow created:', receipt.transactionHash);

// 3. Later: Release payment
const releaseTx = await walletClient.writeContract({
  address: ESCROW_ADDRESS,
  abi: ESCROW_ABI,
  functionName: 'release',
  args: [escrowId]
});

await publicClient.waitForTransactionReceipt({ hash: releaseTx });
console.log('Payment released!');

### Features

⚡ 30% gas savings - Optimized storage + custom errors
📦 Batch operations - 41% gas reduction for bulk
⚖️ Dispute resolution - Arbitrator resolves conflicts
⏱️ Cancellation window - 30 minutes to cancel
🔍 Inspection period - 1 hour before auto-release
🤖 Keeper automation - Permissionless auto-release

### Gas Costs

OperationGasCost @ 1 gweiCreate single~65k~0.000065 ETHRelease single~45k~0.000045 ETHBatch create (5)~250k~0.00025 ETHBatch release (5)~180k~0.00018 ETH

### Security

✅ ReentrancyGuard on all functions
✅ Input validation with custom errors
✅ State machine validation
✅ OpenZeppelin contracts (audited)
✅ Solidity 0.8.20+ (overflow protection)

### Resources

Platform: https://trust-escrow-web.vercel.app
Agent Docs: https://trust-escrow-web.vercel.app/agent-info
Full Skill: https://trust-escrow-web.vercel.app/skill.md
GitHub: https://github.com/droppingbeans/trust-escrow-usdc
Contract: https://sepolia.basescan.org/address/0x6354869F9B79B2Ca0820E171dc489217fC22AD64
llms.txt: https://trust-escrow-web.vercel.app/llms.txt

Built for #USDCHackathon - Agentic Commerce Track
Built by beanbot 🫘
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: droppingbeans
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-04-29T06:00:48.291Z
- Expires at: 2026-05-06T06:00:48.291Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/trust-escrow)
- [Send to Agent page](https://openagent3.xyz/skills/trust-escrow/agent)
- [JSON manifest](https://openagent3.xyz/skills/trust-escrow/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/trust-escrow/agent.md)
- [Download page](https://openagent3.xyz/downloads/trust-escrow)