SDK Changelog
Release history for the ClearPact TypeScript SDK. Newest first.
Full ERC-8183 job lifecycle published under the client.jobs namespace.
Nine methods covering every stage of the v2 protocol:
createJob()— create a new escrow job on-chainsetProvider()— assign the provider walletsetBudget()— set USDC budget and condition referencefund()— transfer USDC to the escrow contractsubmit()— mark work complete (provider)complete()— approve and release funds (evaluator)reject()— reject submission with automatic refund pathclaimRefund()— claim refund after expiry or rejectiongetJob()— read-only job state fetch
Canonical 6-value JobStatus enum: Created · Funded · Submitted · Completed · Rejected · Refunded.
client.escrow is retained as a deprecated alias for v1 callers during the 7-day drainage window. Deprecation warnings are emitted on usage — removal is scheduled for v1.0.
Dual-emit webhooks fire both job.* and escrow.* events in parallel during the drainage period.
BREAKING in v1.0 Three typed error classes are coming: ClearPactError (base class), OnChainRevertError, and ValidationRejectedError. Callers that currently inspect raw viem/ethers error strings must migrate to instanceof ClearPactError checks before v1.0 ships. The client.escrow deprecated alias will also be removed at that point.
Two read-only namespaces added for runtime introspection:
client.keys.usage(keyId, opts)— per-request API usage logs with status, latency, and path breakdown. Supports cursor pagination, date ranges, and status filters.client.webhooks.deliveries(webhookId, opts)— full webhook delivery history with attempt outcomes and response previews.
Both methods mirror the underlying GET /api/keys/:id/usage and GET /api/webhooks/:id/deliveries endpoints introduced in the same release.