@cra-agent/escrow 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/package.json +23 -5
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# @cra-agent/escrow
|
|
2
|
+
|
|
3
|
+
A client for ERC-8183 AgenticCommerce: money held until work is accepted. For jobs with a deliverable, or amounts too large for a pay-per-call nanopayment.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npm i @cra-agent/escrow
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { createEscrowClient } from "@cra-agent/escrow";
|
|
11
|
+
|
|
12
|
+
const escrow = createEscrowClient({ network: "arcTestnet", signer, evaluator });
|
|
13
|
+
const { jobId } = await escrow.createJob({ provider, description: "Translate the report", expiresInSeconds: 86_400 });
|
|
14
|
+
await escrow.setBudget(jobId, parseUsdc6("5")); // from @cra-agent/accounting
|
|
15
|
+
await escrow.fund(jobId); // approves USDC if needed, then funds
|
|
16
|
+
await escrow.complete(jobId, "delivered as agreed"); // or reject(jobId, reason), or claimRefund(jobId) after expiry
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The ABI comes from the verified implementation on chain. **Testnet only for now:** the contract has no bytecode on Arc mainnet, and the client says so instead of guessing an address.
|
|
20
|
+
|
|
21
|
+
## Part of CRA AGENT
|
|
22
|
+
|
|
23
|
+
Payments for AI agents on [Arc](https://arc.io), Circle's USDC-native L1. Site: [cra-agent.tech](https://cra-agent.tech) · Source: [github.com/giupy997/arcagentx402](https://github.com/giupy997/arcagentx402) · MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cra-agent/escrow",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "ERC-8183 AgenticCommerce escrow client for Arc: create, fund, submit, complete or reject a job, claim a refund.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"agent-payments",
|
|
7
|
+
"agentic-commerce",
|
|
8
|
+
"ai-agents",
|
|
9
|
+
"arc",
|
|
10
|
+
"circle",
|
|
11
|
+
"erc-8183",
|
|
12
|
+
"escrow",
|
|
13
|
+
"jobs",
|
|
14
|
+
"micropayments",
|
|
15
|
+
"usdc",
|
|
16
|
+
"x402"
|
|
17
|
+
],
|
|
4
18
|
"type": "module",
|
|
5
19
|
"main": "./dist/index.js",
|
|
6
20
|
"types": "./dist/index.d.ts",
|
|
@@ -14,8 +28,8 @@
|
|
|
14
28
|
"build": "tsc -b"
|
|
15
29
|
},
|
|
16
30
|
"dependencies": {
|
|
17
|
-
"@cra-agent/accounting": "0.0.
|
|
18
|
-
"@cra-agent/identity": "0.0.
|
|
31
|
+
"@cra-agent/accounting": "0.0.3",
|
|
32
|
+
"@cra-agent/identity": "0.0.3",
|
|
19
33
|
"viem": "^2.31.0"
|
|
20
34
|
},
|
|
21
35
|
"files": [
|
|
@@ -28,8 +42,12 @@
|
|
|
28
42
|
"license": "MIT",
|
|
29
43
|
"repository": {
|
|
30
44
|
"type": "git",
|
|
31
|
-
"url": "https://github.com/giupy997/arcagentx402.git",
|
|
45
|
+
"url": "git+https://github.com/giupy997/arcagentx402.git",
|
|
32
46
|
"directory": "packages/escrow"
|
|
33
47
|
},
|
|
34
|
-
"homepage": "https://cra-agent.tech"
|
|
48
|
+
"homepage": "https://cra-agent.tech",
|
|
49
|
+
"bugs": {
|
|
50
|
+
"url": "https://github.com/giupy997/arcagentx402/issues"
|
|
51
|
+
},
|
|
52
|
+
"author": "cra-agent"
|
|
35
53
|
}
|