- erc8183-viem: rewritten to the REAL deployed AgenticCommerce ABI/address (createJob/setBudget/approve+fund/submit/complete/getJob, JobCreated jobId decode, status enum, USDC 6-dec); refund now throws (no on-chain function). - @settlekit/erc8004-dcw + @settlekit/erc8183-dcw: Circle Developer-Controlled-Wallet adapters via circle-wallets contract-execution + polling (injected keccak + reader; no viem dep). - circle-wallets: ARC/ARC-TESTNET added to CircleBlockchain. - apps/examples: runnable offline erc8004-agent + erc8183-job lifecycle demos (Local ports; live viem/DCW wiring documented). - 1302 tests / 213 suites, typecheck + full build green.
@settlekit/erc8183-dcw
A Circle Developer-Controlled-Wallet (DCW) adapter implementing
@settlekit/erc8183's Erc8183Port against the real AgenticCommerce
ERC-8183 reference contract on Arc Testnet, via @settlekit/circle-wallets
createContractExecution + pollTransaction.
No viem / chain SDK dependency. DCW posts abiFunctionSignature strings and
string abiParameters (the Arc-docs convention), so this package carries no
chain SDK.
Contract (verbatim, Arc docs)
- AgenticCommerce:
0x0747EEf0706327138c69792bF28Cd525089e4583(Arc Testnet) - USDC:
0x3600000000000000000000000000000000000000(6 decimals) - Blockchain id:
ARC-TESTNET
Port → contract mapping
| Port method | On-chain call |
|---|---|
createJob |
createJob(...) then setBudget(...) (when amount > 0) |
fundEscrow |
USDC approve(contract, amount) THEN fund(jobId) |
submitDeliverable |
submit(jobId, bytes32, 0x) |
evaluate({passed:true}) |
complete(jobId, bytes32, 0x) (escrow releases) |
settle |
complete(jobId, bytes32, 0x) |
evaluate({passed:false}) |
No on-chain call — throws (Rejected/Expired path) |
refund |
No on-chain function — throws |
getJob |
injected readJob (DCW has no read API) |
Injected dependencies (never faked)
The DCW path can only POST transactions — it has no contract-read API and
createContractExecution does not return contract return-values. The consumer
must supply (typically via a separate RPC / viem-free reader outside this
package):
hashToBytes32(value)— keccak256 → 0x 32-byte hex forbytes32deliverable / reason. One-way: the original URI/score is not recoverable on-chain.decodeJobCreated(tx)— decode theJobCreatedevent from the completedcreateJobreceipt to recoverjobId.readJob(jobId)— read thegetJobtuple.
Also required (no Erc8183Port field exists for them): evaluator and
defaultExpiredAt.
Lossy mapping notes
- On-chain Status enum (
0 Open .. 5 Expired) → SettleKitJobStatusis lossy:0→created, 1→funded, 2→submitted, 3→settled, 4→refunded, 5→cancelled. There is no on-chainevaluatedstate. getJobcannot reconstructdeliverableUri/ evaluation (bytes32 hashes are one-way).fundEscrowis two non-atomic DCW calls; the fund tx hash is surfaced and an approve failure aborts before fund.- Circle requires a fresh entity-secret ciphertext per call; for the
multi-call flows (
createJob,fundEscrow) prefer anentitySecretProvideron the wallets client over a single static ciphertext.
Usage
import { configureDcwErc8183 } from "@settlekit/erc8183-dcw";
const jobs = configureDcwErc8183({
walletsClientConfig: { apiKey: process.env.CIRCLE_API_KEY!, entitySecretProvider },
walletAddress: "0x...", // the DCW signer (on-chain client)
evaluator: "0x...",
defaultExpiredAt: "1750000000",
hashToBytes32: (s) => keccak256(toHex(s)),
decodeJobCreated: async (tx) => decodeJobCreatedFromReceipt(tx.txHash!),
readJob: async (jobId) => readJobViaRpc(jobId),
});