cascrow-sdk 0.4.0 → 0.8.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0 — 2026-10-20
4
+
5
+ Not published yet when the second half of these changes landed; everything below ships in one 0.8.0.
6
+
7
+ - **`requestHumanReview(contractId, { milestoneId?, reason? })` and `humanReviews(contractId)`.** Either party of a contract can ask for a person at cascrow to review a verification outcome (Art. 22(3) GDPR); a person decides within one month and both parties receive the decision with its reasons (`human_review.decided`). A request already open on that milestone returns `{ status: "ALREADY_OPEN", dueAt }` instead of throwing. New types `HumanReviewRequestResult` and `HumanReviewEntry`.
8
+ - **`verifyCascrowSignature(rawBody, headers, secret, { toleranceSeconds })`** and the header names (`CASCROW_SIGNATURE_HEADER`, `CASCROW_TIMESTAMP_HEADER`, `CASCROW_REPLAY_WINDOW_SECONDS`): verify a webhook or agent callback — HMAC-SHA256 over `"t=" + <unix ms> + "." + <raw body>`, refused outside a 300-second window. WebCrypto, Node 18 falls back to `node:crypto`.
9
+ - **`rotateCallbackSecret()`** returns a new callback signing secret once (409 `NO_CALLBACK_URL` without a callback URL); `setDiscoverable()` returns `callbackSecretSet`, and `callbackSecret` only in the answer that first set a callback URL.
10
+ - **`createContract()` takes `reviewWindowDays` and `panelDecidesAlone`** and returns `reviewTerms` (`ReviewTerms`; null on an older server). Refusals: `REVIEW_WINDOW_OUT_OF_RANGE`, `REVIEW_WINDOW_NEEDS_BUSINESS`, `REVIEW_MODE_CONFLICT`.
11
+ - **Type change: `ReputationResult.stats` is `null`** when the builder has not consented to publishing their figures; `getReputation()` throws the server's 404 for an address that publishes nothing. Code that read `stats.successRate` unguarded must check for null.
12
+ - `V3_CLIENT_TEXT` carries `noArbiterVeto` (the sentence every acceptance door shows) and a hint for `SCREENING_UNAVAILABLE` (the new-money sanctions screen fails closed; retry).
13
+ - **`setDiscoverable()` takes `showNameOnCertificates` and `consentVersion`**, and returns `showNameOnCertificates`. Turning `discoverable` or `showNameOnCertificates` ON publishes the account holder's name and needs their consent: without `consentVersion` the server changes nothing and answers 400 `CONSENT_REQUIRED` with the exact text to show and the version to send (`GET /api/agent/settings` returns the same texts). Send `consentVersion` only after the account holder agreed; turning either off needs nothing.
14
+ - `CASCROW_SIGNER_PIN` is `cascrow-signer@0.2.0`: cascrow's wallet challenge is now a Sign-In with Ethereum message, which 0.1.0 refuses to sign. The doc comment on `register()`'s `walletNote` describes the new flow (`GET /api/user/wallet/challenge?address=<your wallet>` → sign the message → `POST /api/user/wallet`, or `npx cascrow-signer link`).
15
+
16
+ ## 0.7.0 — 2026-09-27
17
+
18
+ - **`joinContract()` returns `{ contractId, status, activated }`**, and the new export `joinedLine(result)` renders it: `activated: true` — a $0 contract, active now; `false` — wait for the payer's MilestoneEscrowV3 offer and accept it with your own key.
19
+ - **`reviewContract()` returns `{ status }`** — the `txHash` in its type never existed: a review completes a verification-only milestone and moves no money.
20
+ - **New stream action `NOT_COMPLETABLE_WITHOUT_ESCROW`** (with `error` and `remedy`): the panel approved a milestone that carries an amount without a MilestoneEscrowV3 escrow, so nothing completed it and no money moved — contact support, do not resubmit. `mcpSubmit` throws the server's 409 with that code and its hint; `watchVerification` / `waitForProof` return on the first poll with `notCompletableWithoutEscrow: true`. An exhaustive `switch` over `action` will ask for the new arm — that is intended.
21
+ - **Breaking: `releaseHoldUntil` is removed** from `VerificationResult`, `ProofStatus`, `WatchResult` and the `mcpSubmit` result, with the v2 release window it reported.
22
+ - New hint for `RELEASE_HOLD_REMOVED` (the server refuses `releaseHoldHours` on contract creation).
23
+ - **Breaking: `fundMilestone()` is removed** (cascrow Phase 6 — the v2 RLUSD escrow is gone). A contract whose milestones have `amountUSD` 0 is active by itself once the builder has joined; there is nothing to fund. A milestone with an amount above 0 is a MilestoneEscrowV3 escrow in native XRP: the payer offers terms with `client.v3.offer`, the builder accepts with its own key, and the payer funds it with one transaction from its own machine — `npx cascrow-signer@0.2.0 fund --milestone <id>`. The SDK signs nothing.
24
+ - `ReputationResult.stats.totalReleasedUsd` (the value released over every escrow version) and `totalXrpReleased` (native XRP released by MilestoneEscrowV3 escrows). `totalRlusdReleased` is deprecated — the retired v2 escrow only, same value — and goes at the next major.
25
+ - Doc comments no longer say "funds released" for a COMPLETED milestone: a verification-only milestone held no money, and a MilestoneEscrowV3 milestone is paid out on chain by its parties.
26
+
27
+ ## 0.6.0 — not published on its own, released as part of 0.7.0
28
+
29
+ - `client.v3.offer / acceptance / submitAcceptance / prepare / reportTx / attestation / claims` — the MilestoneEscrowV3 remote calls. The SDK signs nothing and has no keystore or file access; signing is the separate, pinned `cascrow-signer` package (`CASCROW_SIGNER_PIN`). `reportTx` accepts a transaction hash only.
30
+ - `V3Signer` is deliberately NOT part of the SDK: the one implementation of the signer's checks lives in `cascrow-signer` (import its API directly, `import { createSigner } from "cascrow-signer"`), so a browser bundle of this SDK can never pull in a keystore.
31
+ - The verification stream's `action` may be `V3_RECOMMENDATION` (a MilestoneEscrowV3 verdict — a recommendation that moves no money); `mcpSubmit` returns `verdict: "v3_recommendation"` with `decision` and `manifestHash`. Errors with a V3 code carry `.hint` (who can act, and how), also appended to the message.
32
+
33
+ ## 0.5.0 — not published on its own, released as part of 0.7.0
34
+
35
+ - **Breaking: `escrowFund()` is removed.** It sent the agent's EVM private key to cascrow, which signed the deposit server-side; cascrow no longer accepts, stores or signs with anyone's key. Fund a v2 escrow by signing locally: `GET /api/agent/escrow-prepare` returns the two unsigned transactions, you sign and broadcast them with your own wallet, then `POST /api/escrow/sync`. Funding a MilestoneEscrowV3 contract from an API client is not available yet. **If you ever passed a private key to `escrowFund`, treat that key as exposed and move its funds to a new wallet.**
36
+ - `register()` returns `wallet: null` and `walletNote`: cascrow no longer generates a wallet at registration. Link your own with `GET /api/user/wallet/challenge` → sign → `POST /api/user/wallet`.
37
+
3
38
  ## 0.4.0 — 2026-09-25
4
39
 
5
40
  - `waitForProof(proofId, { timeoutMs, intervalMs })` — wait for a proof already submitted. Upload starts verification by itself, so this, not `verify()`, is the call after `submitProof`. Stops by throwing on 401 / 403 / 404 (waiting does not change them), returns `{ pending: true, interrupted: true }` when the run died, and honours `Retry-After` on 429 / 503.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # cascrow-sdk
2
2
 
3
- TypeScript client for [Cascrow](https://cascrow.com) — trust infrastructure for the agent economy: AI verification, on-chain reputation, and milestone escrow on the XRP Ledger.
3
+ TypeScript client for [Cascrow](https://cascrow.com) — trust infrastructure for the agent economy: AI verification, on-chain reputation, and — for paid work — the remote half of a non-custodial milestone escrow (MilestoneEscrowV3, native XRP).
4
4
 
5
5
  For AI agents connecting through Claude, Cursor, or Codex, use [`cascrow-mcp`](https://www.npmjs.com/package/cascrow-mcp) instead — it's the same API, exposed as MCP tools. This package is for plain application code (backends, scripts, other platforms) that want to call Cascrow directly without going through an LLM tool call.
6
6
 
@@ -21,7 +21,9 @@ const { contractId, inviteLink } = await client.createContract({
21
21
  milestones: [
22
22
  {
23
23
  title: "Ship the landing page", // printed on the certificate — keep it short
24
- amountUSD: 500,
24
+ // 0 / absent = verification only, active once the builder joins. Above 0 = a
25
+ // MilestoneEscrowV3 escrow in native XRP (see "Agent-to-agent flow" below).
26
+ amountUSD: 0,
25
27
  daysUntilDeadline: 7,
26
28
  // The bar the AI panel judges the proof against:
27
29
  verificationCriteria: "Responsive down to 320px, LCP under 2 s on mobile, CTA links to /signup",
@@ -38,11 +40,11 @@ Get an API key via `client.register({ email, password })` (no CAPTCHA, no email
38
40
 
39
41
  ## Sandbox
40
42
 
41
- Escrow currently settles on the XRPL EVM Testnet (chain 1449000) using MockRLUSD, a freely mintable test token — every `amountUSD` you see in the examples below moves test funds, not real money. AI verification is real (live calls to the 5-model panel), and NFT certificates are issued on XRP Ledger Mainnet. See the [Guide](https://cascrow.com/guide) for wallet setup and getting test RLUSD from the faucet.
43
+ MilestoneEscrowV3 runs on the XRPL EVM Sidechain **testnet** (chain 1449000) with native test XRP from the faucet — an `amountUSD` above 0 in the examples below moves test XRP, not real money. The escrow is a smart contract with no platform role: cascrow holds no key that can move escrowed funds, never signs an escrow transaction and is never the arbiter. AI verification is real (live calls to the 5-model panel), and NFT certificates are issued on XRP Ledger Mainnet. See the [Guide](https://cascrow.com/guide) for wallet setup and test XRP.
42
44
 
43
45
  ## Verification without escrow
44
46
 
45
- Get an independent second opinion from 5 AI models on any AI-generated work — no contract, no payment:
47
+ Get a second opinion from 5 AI models from different providers on any AI-generated work — no contract, no payment:
46
48
 
47
49
  ```ts
48
50
  const client = new CascrowClient(); // no apiKey needed — anonymous mode
@@ -68,15 +70,26 @@ const builder = new CascrowClient({ apiKey: builderKey });
68
70
  const { contractId, inviteLink } = await requester.createContract({
69
71
  milestones: [{ title: "Build the API", amountUSD: 1000 }],
70
72
  });
71
- await requester.escrowFund({ contractId, agentPrivateKey: requesterEvmKey }); // escrows the milestone's own amountUSD; testnet MockRLUSD, not real funds — see Sandbox above
72
-
73
73
  await builder.joinContract(inviteLink!);
74
+
75
+ // MilestoneEscrowV3 (native XRP, testnet): the payer offers terms, the builder accepts with
76
+ // its own key, the payer funds with ONE transaction from its own machine. The SDK signs
77
+ // nothing — signing is the separate, pinned local signer (npx cascrow-signer@0.2.0):
78
+ await requester.v3.offer({ milestoneId, reviewPeriodSec: 72 * 3600, watcherDeclared: false });
79
+ // builder: npx cascrow-signer@0.2.0 accept --milestone <milestoneId>
80
+ // requester: npx cascrow-signer@0.2.0 fund --milestone <milestoneId>
81
+ // cascrow never accepts, creates, stores or signs with a private key (escrowFund(), which
82
+ // took one, was removed in 0.5.0 — if you ever passed a key to it, treat that key as exposed).
83
+ // A contract with amountUSD 0 needs none of this: it is active once the builder has joined.
84
+
74
85
  const { proofId } = await builder.submitProof({ milestoneId, content: "Done — see PR #12, all tests pass." });
75
86
  // Upload starts verification by itself — wait for it, don't start it again.
76
87
  const result = await builder.waitForProof(proofId);
77
-
88
+ // For a MilestoneEscrowV3 milestone the AI verdict is a signed, non-binding recommendation:
89
+ // the builder claims on chain (npx cascrow-signer@0.2.0 submit-claim --milestone <id> --proof-hash <manifestHash>),
90
+ // the payer releases or objects before the objection deadline.
78
91
  if (!result.pending && result.milestoneStatus === "COMPLETED") {
79
- console.log("Funds released automatically.");
92
+ console.log("Milestone complete.");
80
93
  }
81
94
  ```
82
95
 
@@ -93,11 +106,13 @@ if (!result.pending && result.milestoneStatus === "COMPLETED") {
93
106
  | `listMyContracts` | `GET /api/agent/my-contracts` |
94
107
  | `joinContract` | `POST /api/contracts/join` |
95
108
  | `reviewContract` | `POST /api/contracts/review` — pass `milestoneId` when more than one milestone is pending review |
96
- | `reviewQueue` | `GET /api/agent/review-queue` — the contracts on which you, as funder, still owe a verdict. The pull behind the `manual_review.required` webhook: an undecided milestone auto-approves after 48 h and releases the escrow |
109
+ | `requestHumanReview` | `POST /api/human-review` — either party asks a person at cascrow to review a verification outcome (Art. 22(3) GDPR); an open one returns `{ status: "ALREADY_OPEN", dueAt }` |
110
+ | `humanReviews` | `GET /api/human-review` (`?contractId=`) — the requests on a contract and their decisions |
111
+ | `reviewQueue` | `GET /api/agent/review-queue` — the contracts on which you, as funder, still owe a verdict. The pull behind the `manual_review.required` webhook: verification-only ($0) contracts; an undecided milestone is completed automatically when its review window closes only when the panel's own verdict opened the review with a YES — any other review goes to cascrow's human review instead; the window is the contract's `reviewWindowDays` (default 14 days; 48h on an agent contract created before 2026-10-20 in review mode `MANUAL_AUTO` or `AUTO`). Moves no money |
112
+ | `v3Claims` | `GET /api/agent/v3-claims` — as payer of a MilestoneEscrowV3 escrow, the claims that release it unless your own wallet calls `object(escrowId)` before `objectionDeadline`. Throws `V3_INDEX_STALE` (503) while the index is not current: read the chain then |
113
+ | `v3.offer` / `v3.acceptance` / `v3.submitAcceptance` / `v3.prepare` / `v3.reportTx` / `v3.attestation` / `v3.claims` | MilestoneEscrowV3, remote half. `prepare` returns an UNSIGNED transaction — rebuild `data` and check `to`/`chainId` yourself before signing; `reportTx` takes a hash only. This SDK signs nothing: use the separate local signer, pinned — `npx cascrow-signer@0.2.0` (or `import { createSigner } from "cascrow-signer"` in Node). There is deliberately no `V3Signer` in this package. |
97
114
  | `checkInvites` | `GET /api/agent/pending-invites` |
98
115
  | `handoff` | `POST /api/agent/handoff` |
99
- | `fundMilestone` | `POST /api/agent/fund-milestone` |
100
- | `escrowFund` | `POST /api/agent/escrow-fund` |
101
116
  | `submitProof` | `POST /api/proof/upload` |
102
117
  | `getProofStatus` | `GET /api/agent/proof-status/{proofId}` |
103
118
  | `waitForProof` | poll `getProofStatus` until the proof settles — the call to make after `submitProof` |
@@ -107,7 +122,28 @@ if (!result.pending && result.milestoneStatus === "COMPLETED") {
107
122
  | `watchVerification` | `submitProof` + poll |
108
123
  | `getReputation` | `GET /api/agent/reputation/{walletAddress}` |
109
124
  | `discoverAgents` | `GET /api/agent/discover` |
110
- | `setDiscoverable` | `PATCH /api/agent/settings` |
125
+ | `setDiscoverable` | `PATCH /api/agent/settings` — setting `callbackUrl` on an account without a callback secret returns `callbackSecret`, once |
126
+ | `rotateCallbackSecret` | `POST /api/agent/settings/callback-secret` — a new callback signing secret, shown once; the previous one stops verifying |
127
+
128
+ ## Verifying webhooks and callbacks
129
+
130
+ Every webhook and agent callback is signed the same way: `X-Cascrow-Timestamp` (ISO 8601) and
131
+ `X-Cascrow-Signature: sha256=HMAC-SHA256(secret, "t=" + <unix ms of the timestamp> + "." + <raw body>)`.
132
+ Verify the RAW body, before JSON parsing, and refuse a timestamp more than 5 minutes off:
133
+
134
+ ```ts
135
+ import { verifyCascrowSignature } from "cascrow-sdk";
136
+
137
+ const check = await verifyCascrowSignature({
138
+ secret: process.env.CASCROW_CALLBACK_SECRET!, // or the webhook endpoint's secret
139
+ body: rawBody,
140
+ signature: req.headers["x-cascrow-signature"],
141
+ timestamp: req.headers["x-cascrow-timestamp"],
142
+ });
143
+ if (!check.ok) return res.status(401).send(check.reason);
144
+ ```
145
+
146
+ Delivery is at least once for chain-driven events — dedupe on `data.outboxId`.
111
147
 
112
148
  ## Errors
113
149
 
package/dist/client.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { Contract, CreateContractInput, CreateContractResult, DiscoverAgentsResult, MyContractSummary, ReviewQueueResult, RegisterInput, RegisterResult, ReputationResult, VerificationResult, VerifyWorkInput, VerifyWorkResult } from "./types.js";
1
+ import type { Contract, CreateContractInput, CreateContractResult, DiscoverAgentsResult, MyContractSummary, ReviewQueueResult, HumanReviewEntry, HumanReviewRequestResult, V3ClaimsResult, RegisterInput, RegisterResult, ReputationResult, VerificationResult, VerifyWorkInput, VerifyWorkResult } from "./types.js";
2
+ import type { V3AcceptanceData, V3Action, V3Attestation, V3OfferInput, V3PreparedTx } from "./v3.js";
2
3
  export interface CascrowClientOptions {
3
4
  /** API key starting with csk_. Omit only for endpoints that support anonymous use (register, getReputation, verifyWork). */
4
5
  apiKey?: string;
@@ -11,10 +12,14 @@ export type WatchResult = {
11
12
  /** The verdict on this proof, or `null` when the route reported none. */
12
13
  decision: "YES" | "NO" | null;
13
14
  confidence: number | null;
14
- /** `"COMPLETED"` means the funds were released. */
15
+ /** `"COMPLETED"`: the milestone is complete (see `escrowVersion` for whether money was held). */
15
16
  milestoneStatus?: string;
16
- /** Set when the payout is only SCHEDULED — no funds have moved. */
17
- releaseHoldUntil?: string | null;
17
+ /**
18
+ * The milestone carries an amount without a MilestoneEscrowV3 escrow, so no
19
+ * verdict can complete it (cascrow has a case open; contact support, do not
20
+ * resubmit). Read it BEFORE `decision`: a YES here is not done.
21
+ */
22
+ notCompletableWithoutEscrow: boolean;
18
23
  /**
19
24
  * The milestone is TERMINAL (`terminalStatus`: EXPIRED or COMPLETED) and this
20
25
  * proof's verdict cannot move it. Read this BEFORE `decision`.
@@ -29,6 +34,21 @@ export type WatchResult = {
29
34
  * this proof's `"NO"` or `null`; the payout, if any, is not this proof's.
30
35
  */
31
36
  approvedWithoutThisVerdict: boolean;
37
+ /**
38
+ * `3` for a MilestoneEscrowV3 milestone, `2` otherwise (absent on an older server).
39
+ * On `3` the verdict is a RECOMMENDATION and moves no money: read
40
+ * `submissionVerdict` / `claimReady`, and claim on chain with `manifestHash`
41
+ * (`npx cascrow-signer submit-claim --proof-hash <manifestHash>`).
42
+ */
43
+ escrowVersion?: 2 | 3;
44
+ /** V3 only: the sealed submission this proof belongs to (one evidence request = one submission). */
45
+ submissionId?: string | null;
46
+ /** V3 only: the submission's manifest hash — the proofHash a claim names on chain. */
47
+ manifestHash?: string | null;
48
+ /** V3 only: the SUBMISSION's write-once verdict — YES only when every proof in it has a definite yes. */
49
+ submissionVerdict?: "YES" | "NO" | "PENDING" | null;
50
+ /** V3 only: `submissionVerdict === "YES"` — the claim cascrow recommends. */
51
+ claimReady?: boolean;
32
52
  reasoning?: string;
33
53
  } | {
34
54
  pending: true;
@@ -45,6 +65,35 @@ export declare class CascrowClient {
45
65
  private readonly apiKey?;
46
66
  private readonly baseUrl;
47
67
  constructor(options?: CascrowClientOptions);
68
+ /**
69
+ * MilestoneEscrowV3 — the remote half. cascrow prepares and reads; YOU sign and
70
+ * send with your own key. This SDK never signs: use the separate, pinned
71
+ * `cascrow-signer` package (`npx cascrow-signer@<pin> …`, see CASCROW_SIGNER_PIN),
72
+ * which checks every prepared transaction against its own chain and contract.
73
+ */
74
+ readonly v3: {
75
+ /** As PAYER: offer terms for a milestone. 409 `OFFER_EXISTS` names the open offer. */
76
+ offer: (input: V3OfferInput) => Promise<Record<string, unknown>>;
77
+ /** As PAYEE: the frozen offer to check and sign (EIP-712). 409 `V3_NOT_OFFERED` before the payer offered. */
78
+ acceptance: (milestoneId: string) => Promise<V3AcceptanceData>;
79
+ /** As PAYEE: hand over the acceptance signature — binding until acceptBy. */
80
+ submitAcceptance: (offerId: string, signature: string) => Promise<{
81
+ escrowId: string;
82
+ acceptBy: string;
83
+ }>;
84
+ /** An UNSIGNED transaction. Rebuild `data` and check `to`/`chainId` yourself before signing. */
85
+ prepare: (milestoneId: string, action: V3Action, extra?: {
86
+ proofHash?: string;
87
+ reasonHash?: string;
88
+ newDeadline?: string | number;
89
+ }) => Promise<V3PreparedTx>;
90
+ /** After YOU broadcast: the hash as a hint to re-read the chain. Only a hash — never a signed transaction. */
91
+ reportTx: (milestoneId: string, txHash: string) => Promise<Record<string, unknown>>;
92
+ /** cascrow's signed, NON-BINDING AI recommendation for a claim. 409 `ATTESTATION_PENDING` while the panel runs. */
93
+ attestation: (escrowId: string, claimIndex: number) => Promise<V3Attestation>;
94
+ /** As PAYER: open claims you can still object to (same as `v3Claims()`). */
95
+ claims: () => Promise<V3ClaimsResult>;
96
+ };
48
97
  private authHeaders;
49
98
  /**
50
99
  * Every non-streaming call carries a deadline (SEC-073).
@@ -78,9 +127,20 @@ export declare class CascrowClient {
78
127
  contracts: MyContractSummary[];
79
128
  total: number;
80
129
  }>;
81
- /** Join an existing contract as the Builder using an invite code. */
130
+ /**
131
+ * Join an existing contract as the Builder using an invite code.
132
+ *
133
+ * `activated: true` — a $0 verification contract: it is active (`status: "FUNDED"`)
134
+ * and you can submit proof now. `activated: false` — the milestones carry an amount:
135
+ * wait for the payer's MilestoneEscrowV3 offer and accept it with your own wallet key
136
+ * (`npx cascrow-signer@0.2.0 accept --milestone <id>`, or `client.v3.acceptance` +
137
+ * `client.v3.submitAcceptance`); proof is accepted once the payer has funded it.
138
+ * `joinedLine(result)` renders that as one sentence.
139
+ */
82
140
  joinContract(inviteCode: string): Promise<{
83
141
  contractId: string;
142
+ status: string;
143
+ activated: boolean;
84
144
  }>;
85
145
  /**
86
146
  * Approve or reject a borderline (PENDING_REVIEW) MILESTONE. Only valid when
@@ -101,8 +161,31 @@ export declare class CascrowClient {
101
161
  * Additive optional third argument — every existing call site still compiles.
102
162
  */
103
163
  reviewContract(contractId: string, decision: "APPROVE" | "REJECT", milestoneId?: string): Promise<{
164
+ /**
165
+ * The contract's status after the decision. APPROVE completes a verification-only
166
+ * ($0) milestone — no money moves; there is no transaction. A MilestoneEscrowV3
167
+ * milestone is refused here: its payer releases or objects on chain.
168
+ */
104
169
  status: string;
105
- txHash: string | null;
170
+ }>;
171
+ /**
172
+ * Ask for a person at cascrow to review a verification outcome (Art. 22(3) GDPR) —
173
+ * as the funder OR the builder, at any time, on any milestone the panel decided. A
174
+ * person decides within one month (`dueAt`); both parties receive the decision with
175
+ * its reasons (webhook `human_review.decided`, or read it with {@link humanReviews}).
176
+ * On a verification-only contract the decision can complete, reject or revoke a
177
+ * completion (withdrawing its certificate); on a MilestoneEscrowV3 milestone it is a
178
+ * statement and changes nothing on chain. `milestoneId` is required once the contract
179
+ * has more than one milestone. A request already open on that milestone is NOT
180
+ * thrown: it returns `{ status: "ALREADY_OPEN", dueAt }` — there is nothing to retry.
181
+ */
182
+ requestHumanReview(contractId: string, opts?: {
183
+ milestoneId?: string;
184
+ reason?: string;
185
+ }): Promise<HumanReviewRequestResult>;
186
+ /** The human-review requests on a contract you are a party to, newest first, with their decisions. */
187
+ humanReviews(contractId: string): Promise<{
188
+ requests: HumanReviewEntry[];
106
189
  }>;
107
190
  /**
108
191
  * The contracts on which THIS agent, as funder, still owes a manual verdict.
@@ -110,8 +193,9 @@ export declare class CascrowClient {
110
193
  * The pull behind the `manual_review.required` webhook. A webhook that does
111
194
  * not arrive — the agent was down, the endpoint 500'd, the subscription was
112
195
  * never made — is a decision that never gets made, and `cron/cancel-expired`
113
- * then auto-approves the milestone after 48 h (agent contracts) or 14 days
114
- * (human) and releases the escrow. The whole point of the 60–85 confidence
196
+ * then completes the milestone after 48 h (agent contracts in MANUAL_AUTO or
197
+ * AUTO) or 14 days (every other contract) — verification-only contracts, so
198
+ * no money moves, and nobody decided it. The whole point of the 60–85 confidence
115
199
  * band is that somebody looks.
116
200
  *
117
201
  * Every browser surface the funder has for this asks
@@ -128,6 +212,14 @@ export declare class CascrowClient {
128
212
  * not read a short list as "that was all".
129
213
  */
130
214
  reviewQueue(): Promise<ReviewQueueResult>;
215
+ /**
216
+ * As the PAYER of a MilestoneEscrowV3 escrow: the claims that release it to the
217
+ * builder unless your own wallet calls `object(escrowId)` before
218
+ * `objectionDeadline` — the pull behind the `claim.submitted` webhook. cascrow
219
+ * cannot object for you. Throws with code `V3_INDEX_STALE` (503) while the index
220
+ * is not current; read the chain directly then.
221
+ */
222
+ v3Claims(): Promise<V3ClaimsResult>;
131
223
  /** Check for pending contract invites sent to this agent. */
132
224
  checkInvites(): Promise<{
133
225
  invites: unknown[];
@@ -141,46 +233,6 @@ export declare class CascrowClient {
141
233
  }): Promise<{
142
234
  handoffId: string;
143
235
  }>;
144
- /** Fund (activate) a milestone via MetaMask/browser flow so it can receive proof. */
145
- fundMilestone(contractId: string, milestoneId?: string): Promise<{
146
- milestoneId: string;
147
- contractId: string;
148
- status: string;
149
- }>;
150
- /**
151
- * Fund a milestone with real on-chain RLUSD escrow using the agent's own EVM
152
- * private key.
153
- *
154
- * **The escrowed amount is the milestone's own `amountUSD`.** The route
155
- * destructures `{ contractId, milestoneId, agentPrivateKey }` and funds
156
- * `milestone.amountUSD`; a body `amountUSD` has never been read.
157
- *
158
- * SEC-120 removed the parameter from both MCP tool schemas, the OpenAPI spec
159
- * and the CLI — and stopped here, at the one surface where the demand was
160
- * enforced by the COMPILER rather than merely written down: `amountUSD:
161
- * number`, no `?`, and `input` forwarded whole. That is the same defect the
162
- * removal was about, at the door that states it most strongly, and it
163
- * survived because the correction was checked against the places that
164
- * document the parameter rather than against the places that require it.
165
- *
166
- * It is deprecated rather than deleted: deleting it would break compilation
167
- * for every existing caller, which is a worse answer than telling them the
168
- * truth. It is no longer forwarded, so the request body now says what the
169
- * server actually reads.
170
- */
171
- escrowFund(input: {
172
- contractId: string;
173
- agentPrivateKey: string;
174
- /** @deprecated Ignored. The escrowed amount is the milestone's own `amountUSD`. */
175
- amountUSD?: number;
176
- milestoneId?: string;
177
- }): Promise<{
178
- milestoneId: string;
179
- contractId: string;
180
- txHash: string;
181
- amountUSD: number;
182
- status: string;
183
- }>;
184
236
  /**
185
237
  * Submit a text proof report for a milestone. Verification starts by itself —
186
238
  * wait for the verdict with `waitForProof(proofId)`; do not call `verify()` for it,
@@ -218,17 +270,18 @@ export declare class CascrowClient {
218
270
  milestoneTitle?: string;
219
271
  /**
220
272
  * The MILESTONE's state, which is the question most callers are actually asking.
221
- * `"COMPLETED"` means the funds were released.
273
+ * `"COMPLETED"`: the milestone is complete — a verification-only milestone held no
274
+ * money; a MilestoneEscrowV3 milestone was paid out on chain by its parties.
222
275
  */
223
276
  milestoneStatus?: string;
224
277
  /**
225
- * SEC-058. Set when the payout is SCHEDULED rather than done: the milestone is at
226
- * `VERIFIED`, the funds are still in escrow, the funder can contest until this
227
- * instant, and the instant itself can move. The route has returned it since
228
- * 2026-09-12; a TypeScript caller could not read it without a cast, so
229
- * `milestoneStatus: "VERIFIED"` looked like a completed payout.
278
+ * `true`: this proof's milestone carries an amount without a MilestoneEscrowV3
279
+ * escrow, so no verdict can complete it — the verdict doors answer 409
280
+ * `NOT_COMPLETABLE_WITHOUT_ESCROW` and cascrow has a case open. Stop polling,
281
+ * contact support, do not resubmit. (Replaces `releaseHoldUntil`, which reported
282
+ * the removed v2 release window.)
230
283
  */
231
- releaseHoldUntil?: string | null;
284
+ notCompletableWithoutEscrow?: boolean;
232
285
  /**
233
286
  * `true` when the milestone (or, for a legacy contract-level proof, the contract)
234
287
  * is TERMINAL — `EXPIRED` or `COMPLETED` — so no verdict on this proof can move it
@@ -247,6 +300,21 @@ export declare class CascrowClient {
247
300
  * refunded or no escrow existed. Null when not recorded.
248
301
  */
249
302
  terminalReason?: string | null;
303
+ /**
304
+ * `3` for a MilestoneEscrowV3 milestone, `2` otherwise (absent on an older server).
305
+ * On `3` the verdict is a RECOMMENDATION and moves no money: read
306
+ * `submissionVerdict` / `claimReady`, and claim on chain with `manifestHash`
307
+ * (`npx cascrow-signer submit-claim --proof-hash <manifestHash>`).
308
+ */
309
+ escrowVersion?: 2 | 3;
310
+ /** V3 only: the sealed submission this proof belongs to (one evidence request = one submission). */
311
+ submissionId?: string | null;
312
+ /** V3 only: the submission's manifest hash — the proofHash a claim names on chain. */
313
+ manifestHash?: string | null;
314
+ /** V3 only: the SUBMISSION's write-once verdict — YES only when every proof in it has a definite yes. */
315
+ submissionVerdict?: "YES" | "NO" | "PENDING" | null;
316
+ /** V3 only: `submissionVerdict === "YES"` — the claim cascrow recommends. */
317
+ claimReady?: boolean;
250
318
  reasoning?: string;
251
319
  }>;
252
320
  /**
@@ -264,7 +332,9 @@ export declare class CascrowClient {
264
332
  }): Promise<VerificationResult>;
265
333
  /**
266
334
  * Submit proof and get an immediate verdict in one call — runs the full
267
- * 5-model pipeline and, on approval, releases funds and mints the NFT.
335
+ * 5-model pipeline. On approval a verification-only milestone completes and its NFT
336
+ * is minted; for a MilestoneEscrowV3 milestone the verdict is a recommendation
337
+ * (`verdict: "v3_recommendation"`) and moves no money.
268
338
  */
269
339
  mcpSubmit(input: {
270
340
  contractId: string;
@@ -292,16 +362,28 @@ export declare class CascrowClient {
292
362
  * - `panel_unavailable` — fewer than three of the five models answered. OUR
293
363
  * outage, not a judgement of the work, and resubmitting will not help.
294
364
  *
295
- * `releaseHoldUntil` is the other half: an `approved` verdict with a hold means
296
- * APPROVED and NOT PAID — the funder can contest until then, and the date can move.
365
+ * An approved milestone that nothing can complete (an amount without a
366
+ * MilestoneEscrowV3 escrow) is not a 200: the route answers 409
367
+ * `NOT_COMPLETABLE_WITHOUT_ESCROW`, thrown as a `CascrowApiError` with its hint.
368
+ */
369
+ /**
370
+ * `v3_recommendation`: the milestone is a MilestoneEscrowV3 escrow and the panel's
371
+ * verdict is a RECOMMENDATION — it moves no money. `decision` carries it; the payee
372
+ * claims on chain with the same evidence (`manifestHash`), the payer releases or objects.
297
373
  */
298
- verdict: "approved" | "rejected" | "pending_review" | "decided_elsewhere" | "panel_unavailable";
374
+ verdict: "approved" | "rejected" | "pending_review" | "decided_elsewhere" | "panel_unavailable" | "v3_recommendation";
375
+ /** With `v3_recommendation`: the panel's YES/NO on this one file — NOT the claim verdict; read `submissionVerdict`. */
376
+ decision?: string | null;
377
+ /** With `v3_recommendation`: the sealed submission's manifest hash (the claim's proofHash). */
378
+ manifestHash?: string | null;
379
+ /** With `v3_recommendation`: the submission's verdict — YES only when every file has a definite AI yes. */
380
+ submissionVerdict?: "YES" | "NO" | "PENDING";
381
+ /** With `v3_recommendation`: true exactly when `submissionVerdict` is YES. */
382
+ claimReady?: boolean;
299
383
  confidence: number | null;
300
384
  reasoning: string;
301
385
  onChainUrl: string | null;
302
386
  proofId: string | null;
303
- /** Set when `verdict` is `approved` but the payout is scheduled rather than done. */
304
- releaseHoldUntil: string | null;
305
387
  /**
306
388
  * With `decided_elsewhere`: the TERMINAL status the milestone was already in
307
389
  * (`"EXPIRED"`, `"COMPLETED"`) — it was closed before this submission could settle
@@ -403,16 +485,47 @@ export declare class CascrowClient {
403
485
  minRate?: number;
404
486
  limit?: number;
405
487
  }): Promise<DiscoverAgentsResult>;
406
- /** Configure this agent's discovery settings, skills, and callback URL. */
488
+ /**
489
+ * Configure this agent's discovery settings, whether its name is shown on the
490
+ * public check page of its certificates, skills, and callback URL.
491
+ *
492
+ * Turning `discoverable` or `showNameOnCertificates` ON publishes the account
493
+ * holder's name and needs their consent. Without `consentVersion` the server
494
+ * changes nothing and answers 400 `CONSENT_REQUIRED` with the exact text to
495
+ * show and the version to send; `GET /api/agent/settings` returns the same texts.
496
+ * Send `consentVersion` only after the account holder agreed. Turning either
497
+ * off needs nothing.
498
+ */
407
499
  setDiscoverable(options: {
408
500
  discoverable?: boolean;
501
+ showNameOnCertificates?: boolean;
502
+ consentVersion?: string;
409
503
  skills?: string[];
410
- callbackUrl?: string;
504
+ callbackUrl?: string | null;
411
505
  }): Promise<{
412
506
  discoverable?: boolean;
507
+ showNameOnCertificates?: boolean;
413
508
  skills?: string[];
414
- callbackUrl?: string;
509
+ callbackUrl?: string | null;
415
510
  profileUrl?: string;
511
+ /** Whether callbacks are signed with a secret this account has. */
512
+ callbackSecretSet?: boolean;
513
+ /**
514
+ * Present ONLY in the answer that set a callback URL on an account without a
515
+ * secret: the signing secret for callbacks, shown once. Store it; verify each
516
+ * callback with `verifyCascrowSignature`. Lost it? `rotateCallbackSecret()`.
517
+ */
518
+ callbackSecret?: string;
519
+ callbackSecretNotice?: string;
520
+ }>;
521
+ /**
522
+ * Replace this agent's callback signing secret and return the new one, once.
523
+ * The previous secret stops verifying immediately. 409 `NO_CALLBACK_URL` when
524
+ * no callback URL is set (set one with `setDiscoverable({ callbackUrl })`).
525
+ */
526
+ rotateCallbackSecret(): Promise<{
527
+ callbackSecret: string;
528
+ message: string;
416
529
  }>;
417
530
  }
418
531
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,QAAQ,EACR,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EAEpB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EACjB,MAAM,YAAY,CAAC;AA6BpB,MAAM,WAAW,oBAAoB;IACnC,4HAA4H;IAC5H,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AA6GD,8DAA8D;AAC9D,MAAM,MAAM,WAAW,GAEjB;IACE,OAAO,EAAE,KAAK,CAAC;IACf,yEAAyE;IACzE,QAAQ,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,mDAAmD;IACnD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC;;;OAGG;IACH,eAAe,EAAE,OAAO,CAAC;IACzB,cAAc,EAAE,MAAM,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