@metalabel/dfos-client 0.51.0 → 0.52.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.
@@ -1,5 +1,5 @@
1
1
  export { ApiRequestVerifyError, DEFAULT_PROOF_SKEW_SECONDS, DEFAULT_PROOF_WINDOW_SECONDS, DFOS_AUTH_SCHEME, EMPTY_BODY_SHA256, IDENTITY_PROOF_JWS_TYP, IdentityProofPayload, MAX_BODY_BYTES, MAX_PROOF_FRESHNESS_SPAN_SECONDS, MAX_REQUEST_PROOF_SIZE, ProofExtraMembers, REQUEST_PROOF_JWS_TYP, RequestProofFailurePhase, RequestProofFailureReason, RequestProofPayload, SignApiIdentityRequestInput, SignApiRequestInput, apiIdentitySigningInput, apiRequestSigningInput, assertProofVerifierConfig, buildApiAuthHeaders, buildApiIdentityHeaders, parseDfosAuthorization, sha256BodyHash, signApiIdentityRequest, signApiRequest } from '@metalabel/dfos-protocol/credentials';
2
- import { a as Client } from './types-CSKl-wYe.js';
2
+ import { a as Client } from './types-BbIEz7BN.js';
3
3
  import '@metalabel/dfos-protocol/chain';
4
4
  import '@metalabel/dfos-web-relay/peer-client';
5
5
 
@@ -36,7 +36,7 @@ interface CreateApiAuthFetchOptions {
36
36
  *
37
37
  * `signApiRequest` stays exported for the backends that must NOT proxy. A
38
38
  * signing backend fronting a browser MUST authorize the coordinates it is about
39
- * to sign against its own session (API-AUTH.md, Security Considerations) — it
39
+ * to sign against its own session (INTEGRATIONS.md, API security notes) — it
40
40
  * describes the one request it is willing to make rather than receiving one, so
41
41
  * there is no `Request` for this adapter to cover.
42
42
  *
@@ -118,7 +118,8 @@ interface VerifiedRequestProof {
118
118
  credentialCID: string;
119
119
  }
120
120
  /**
121
- * Verify a credential-gated request — API-AUTH.md's eleven steps, in an order
121
+ * Verify a credential-gated request — INTEGRATIONS.md, Verification algorithm's
122
+ * eleven steps, in an order
122
123
  * that honors both load-bearing ordering rules: the proof signature gates every
123
124
  * credential-chain step, and body hashing runs after the cheaper binding checks.
124
125
  *
@@ -132,24 +133,10 @@ interface VerifiedRequestProof {
132
133
  * message text. `status` is the recommended HTTP code (401 proof-invalid, 403
133
134
  * credential-invalid, 503 unverifiable, 500 config).
134
135
  *
135
- * REVOCATION AND RESOLUTION AVAILABILITY read before deploying. This helper
136
- * rejects a credential it KNOWS is revoked (`isRevoked` true at any chain level).
137
- * It does NOT, with the default client, fail closed when the revocation source is
138
- * unreachable: the stock `createRevocationChecker` is fail-open by design
139
- * ("no revocation found" and "could not reach any relay" both return false), the
140
- * system-wide v1 stance that "non-revocation is never provable." Likewise a
141
- * credential-issuer that is unresolvable because relays are down surfaces from the
142
- * protocol verifier as a `CredentialVerificationError` and is reported here as
143
- * `invalid` (403), not `unverifiable` (503) — the underlying callback cannot
144
- * distinguish "genuinely absent" from "transiently unreachable." The PRESENTER
145
- * side is availability-aware (a resolution failure or unverified/stale tip is
146
- * `unverifiable`, failing closed unless `allowStale`); the CREDENTIAL side inherits
147
- * the v1 primitives' limitation. A deployment that needs fail-closed-on-outage for
148
- * the credential/revocation phase MUST inject an availability-aware `isRevoked`
149
- * (one that THROWS when it reaches zero sources — the throw is surfaced here as
150
- * `unverifiable`) via the client config. Tightening the default is a client-level
151
- * change to the shared revocation/resolution contract (it governs SIWD and relay
152
- * verification too), tracked outside this kit.
136
+ * Missing issuer dependencies and an unavailable revocation source are
137
+ * unverifiable (503). The default checker throws when no relay answers; an
138
+ * answered negative still cannot prove non-revocation. Custom checkers must
139
+ * likewise throw when status cannot be obtained.
153
140
  */
154
141
  declare const verifyApiRequest: (client: Client, input: VerifyApiRequestInput) => Promise<VerifiedRequestProof>;
155
142
  interface VerifyApiIdentityRequestInput {
@@ -212,7 +199,8 @@ interface VerifiedIdentityProof {
212
199
  rawPayload: Record<string, unknown>;
213
200
  }
214
201
  /**
215
- * Verify an identity-proven request — API-AUTH.md's PROOF PHASE (steps 1–7) with
202
+ * Verify an identity-proven request — INTEGRATIONS.md, Verification algorithm's
203
+ * PROOF PHASE (steps 1–7) with
216
204
  * the identity `typ`, and nothing more. Steps 8–11 do not exist for this
217
205
  * artifact: there is no credential to walk, so there is no chain, no revocation
218
206
  * lookup, and no attenuation coverage.
package/dist/api-auth.js CHANGED
@@ -1,4 +1,5 @@
1
1
  // src/api-auth.ts
2
+ import { isDependencyMissing } from "@metalabel/dfos-protocol";
2
3
  import {
3
4
  apiIdentitySigningInput,
4
5
  apiRequestSigningInput,
@@ -145,6 +146,9 @@ var verifyApiRequest = async (client, input) => {
145
146
  chain = verifiedChain.chain;
146
147
  } catch (err) {
147
148
  if (err instanceof ApiRequestVerifyError) throw err;
149
+ if (isDependencyMissing(err)) {
150
+ throw unverifiableCredential(err instanceof Error ? err.message : String(err));
151
+ }
148
152
  if (err instanceof CredentialVerificationError) throw invalidCredential(err.message);
149
153
  throw unverifiableCredential(
150
154
  `credential verification could not complete: ${err instanceof Error ? err.message : String(err)}`
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { C as ClientConfig, a as Client, b as Callbacks, R as RevChecker } from './types-CSKl-wYe.js';
2
- export { c as CallOptions, D as DocumentBlob, G as GlobalLogOptions, d as GlobalLogPage, e as GlobalLogResult, I as IndexCapabilities, f as IndexContentPage, g as IndexContentRow, h as IndexCountersignatureRow, i as IndexCountersignaturesPage, j as IndexCredentialRow, k as IndexCredentialsPage, l as IndexIdentitiesPage, m as IndexIdentityProfile, n as IndexIdentityRow, o as IndexOrder, p as IndexRecencyOrder, L as LogOp, P as Provenance, q as RelayHealth, r as RelayResponse, s as Resolution, t as Resolved, u as ResolvedContent, v as ResolvedCredential, S as Store, T as Trust, U as UnverifiableAxis, V as VerifyResult } from './types-CSKl-wYe.js';
3
- export { m as memoryStore } from './memory-Ca1F2EBW.js';
1
+ import { C as ClientConfig, a as Client, b as Callbacks, R as RevChecker } from './types-BbIEz7BN.js';
2
+ export { c as CallOptions, D as DocumentBlob, E as EffectiveIdentity, d as EverProvedIdentity, G as GlobalLogOptions, e as GlobalLogPage, f as GlobalLogResult, I as IndexCapabilities, g as IndexContentPage, h as IndexContentRow, i as IndexCountersignatureRow, j as IndexCountersignaturesPage, k as IndexCredentialRow, l as IndexCredentialsPage, m as IndexIdentitiesPage, n as IndexIdentityProfile, o as IndexIdentityRow, p as IndexOrder, q as IndexRecencyOrder, L as LogOp, P as Provenance, r as RelayHealth, s as RelayResponse, t as Resolution, u as Resolved, v as ResolvedContent, w as ResolvedCredential, S as Store, T as Trust, U as UnverifiableAxis, V as VerifyResult } from './types-BbIEz7BN.js';
3
+ export { m as memoryStore } from './memory-B5WMnEUQ.js';
4
4
  import '@metalabel/dfos-protocol/chain';
5
5
  import '@metalabel/dfos-protocol/credentials';
6
6
  import '@metalabel/dfos-web-relay/peer-client';
@@ -64,7 +64,8 @@ declare const divergenceErrorFrom: (err: unknown) => DivergenceError | undefined
64
64
  * (`verifyRevocation`: signature, CID integrity, issuer-only rule) and whose
65
65
  * payload binds exactly the queried (issuerDID, credentialCID). Anything less —
66
66
  * unreachable relay, negative answer, forged or mismatched proof — moves on to
67
- * the next relay; false only after the full set has been consulted.
67
+ * the next relay; false only after the full set has been consulted and at least
68
+ * one relay answered with a parseable status body. Zero answers throws.
68
69
  *
69
70
  * When the caller supplies `asOfUnix` (the protocol does, on every cold fold, with
70
71
  * each operation's own `createdAt`), a verified revocation only counts if its own
package/dist/index.js CHANGED
@@ -279,6 +279,7 @@ var opMeta = (jws) => {
279
279
  };
280
280
  var historicalIdentity = (state) => ({
281
281
  ...state,
282
+ resolution: "ever-proved",
282
283
  ...state.provedKeys ?? {
283
284
  authKeys: state.authKeys,
284
285
  assertKeys: state.assertKeys,
@@ -510,6 +511,7 @@ import { REVOCATIONS_BASE_PATH } from "@metalabel/dfos-web-relay/peer-client";
510
511
  var createRevocationChecker = (relays, fetchImpl, resolveKey) => {
511
512
  const relaySet = normalizeRelays(relays);
512
513
  return async (issuerDID, credentialCID, asOfUnix) => {
514
+ let answered = false;
513
515
  for (const url of relaySet) {
514
516
  let body = null;
515
517
  try {
@@ -521,6 +523,10 @@ var createRevocationChecker = (relays, fetchImpl, resolveKey) => {
521
523
  if (res.status === 501) continue;
522
524
  if (!res.ok) continue;
523
525
  body = await res.json();
526
+ if (body === null || typeof body !== "object" || typeof body.revoked !== "boolean") {
527
+ continue;
528
+ }
529
+ answered = true;
524
530
  } catch {
525
531
  continue;
526
532
  }
@@ -536,6 +542,7 @@ var createRevocationChecker = (relays, fetchImpl, resolveKey) => {
536
542
  } catch {
537
543
  }
538
544
  }
545
+ if (!answered) throw new Error("revocation status unavailable: no relay answered");
539
546
  return false;
540
547
  };
541
548
  };
@@ -620,7 +627,11 @@ var createClient = (config) => {
620
627
  resolveIdentity: resolvers2.callbacks().resolveIdentity,
621
628
  nowUnix: Math.floor(nowMs() / 1e3)
622
629
  });
623
- const revoked = await isRevoked(verified.iss, verified.credentialCID);
630
+ let revoked = false;
631
+ try {
632
+ revoked = await isRevoked(verified.iss, verified.credentialCID);
633
+ } catch {
634
+ }
624
635
  const axes = [];
625
636
  if (issuer.tipUnverified) axes.push("tip");
626
637
  if (!revoked) axes.push("revocation");
@@ -666,7 +677,11 @@ var createClient = (config) => {
666
677
  resolveIdentity: cb.resolveIdentity,
667
678
  nowUnix: Math.floor(nowMs() / 1e3)
668
679
  });
669
- const revoked = await isRevoked(verified.iss, verified.credentialCID);
680
+ let revoked = false;
681
+ try {
682
+ revoked = await isRevoked(verified.iss, verified.credentialCID);
683
+ } catch {
684
+ }
670
685
  if (revoked) return { ok: false, error: "credential revoked", value: verified };
671
686
  return { ok: true, value: verified, unverifiable: ["revocation"] };
672
687
  }
@@ -1,4 +1,4 @@
1
- import { S as Store } from './types-CSKl-wYe.js';
1
+ import { S as Store } from './types-BbIEz7BN.js';
2
2
 
3
3
  declare const memoryStore: () => Store;
4
4
 
package/dist/siwd.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { Signer, VerifiedIdentity, VerifiedSignRequest } from '@metalabel/dfos-protocol/chain';
2
- import { a as Client, V as VerifyResult } from './types-CSKl-wYe.js';
2
+ import { a as Client, V as VerifyResult } from './types-BbIEz7BN.js';
3
3
  import '@metalabel/dfos-protocol/credentials';
4
4
  import '@metalabel/dfos-web-relay/peer-client';
5
5
 
6
6
  /**
7
- * The normative JWS header `typ` for a signed SIWD challenge (SIWD.md). Signers
7
+ * The normative JWS header `typ` for a signed SIWD challenge (INTEGRATIONS.md,
8
+ * Challenge schema). Signers
8
9
  * MUST set it; `verifySiwd` rejects anything else — it is also what lets typ-
9
10
  * routing dispatchers tell a SIWD proof apart from credentials and chain ops.
10
11
  */
@@ -12,7 +13,7 @@ declare const SIWD_JWS_TYP = "did:dfos:siwd";
12
13
  /**
13
14
  * The normative JWS header `typ` for a client ASK PROOF — the artifact a
14
15
  * loopback client signs to prove key control at ask-time, registered alongside
15
- * `SIWD_JWS_TYP` by SIWD.md §The ask proof.
16
+ * `SIWD_JWS_TYP` by INTEGRATIONS.md, The ask proof.
16
17
  *
17
18
  * The two artifacts cover the SAME canonical challenge bytes, so the distinct
18
19
  * `typ` is the only thing keeping them from being fungible: without it, an ask
@@ -191,8 +192,8 @@ declare const createSiwdLoginRequest: (input: SiwdLoginRequestInput) => SiwdLogi
191
192
  /**
192
193
  * Sign the ask proof for a loopback authorize request: a JWS over the exact
193
194
  * canonical bytes of the request's own challenge, under `SIWD_ASK_JWS_TYP`,
194
- * signed by a CURRENT auth key of the client identity's chain (SIWD.md §The ask
195
- * proof). It is what makes a `client_did` on a loopback request mean something
195
+ * signed by a CURRENT auth key of the client identity's chain (INTEGRATIONS.md,
196
+ * The ask proof). It is what makes a `client_did` on a loopback request mean something
196
197
  * — the host verifies it against the chain's current state before rendering any
197
198
  * consent, so key control is established at ask-time, not just at spend-time.
198
199
  *
@@ -209,11 +210,9 @@ declare const createSiwdLoginRequest: (input: SiwdLoginRequestInput) => SiwdLogi
209
210
  * because a proof that names a key it was not signed with is a lie the wire
210
211
  * format has no reason to carry.
211
212
  *
212
- * The `client_proof` param that carries this is the REFERENCE wire surface, not
213
- * a normative name: SIWD.md defers how the ask proof travels to the hosted
214
- * endpoint's reference implementation, exactly as it does the endpoint itself.
215
- * What is normative is that it arrives WITH the ask and verifies BEFORE any
216
- * consent is rendered.
213
+ * The `client_proof` param that carries this is the parameter the spec names
214
+ * (INTEGRATIONS.md, The ask proof): the proof arrives WITH the ask and verifies
215
+ * BEFORE any consent is rendered.
217
216
  */
218
217
  declare const signSiwdAskProof: (input: {
219
218
  challenge: SiwdChallenge;
@@ -221,7 +220,8 @@ declare const signSiwdAskProof: (input: {
221
220
  kid: string;
222
221
  signer: Signer;
223
222
  }) => Promise<string>;
224
- /** SIWD.md carriage cap an identity that has outgrown it has outgrown carriage. */
223
+ /** The carriage cap of INTEGRATIONS.md, `identity_chain`: chain carriage an
224
+ * identity that has outgrown it has outgrown carriage. */
225
225
  declare const MAX_SIWD_CLIENT_CHAIN_OPS = 100;
226
226
  /**
227
227
  * Encode a client identity chain for carriage on the authorize request: the
@@ -231,7 +231,7 @@ declare const MAX_SIWD_CLIENT_CHAIN_OPS = 100;
231
231
  * THIS IS THE LOOPBACK CARRIAGE FORM, and only that. An application that holds a
232
232
  * domain encodes nothing: it publishes the very same log as the raw JSON array
233
233
  * of the `identity_chain` member of its `/.well-known/dfos-app.json` app
234
- * description (SIWD.md §`identity_chain` chain carriage), where the origin
234
+ * description (INTEGRATIONS.md, `identity_chain`: chain carriage), where the origin
235
235
  * serving the file is what associates the domain with the DID. Same chain, same
236
236
  * carriage rules — a URL is simply the carrier available to software that holds
237
237
  * no origin to publish from.
@@ -239,7 +239,7 @@ declare const MAX_SIWD_CLIENT_CHAIN_OPS = 100;
239
239
  * The DID derived from the genesis operation MUST equal the `client_did` the
240
240
  * request names; a request where the two disagree makes no claim at all and the
241
241
  * host refuses it WHOLE rather than ingesting the chain and ignoring the
242
- * mismatch (SIWD.md §Chain residence). Carriage is only needed when the DID is
242
+ * mismatch (INTEGRATIONS.md, Chain residence). Carriage is only needed when the DID is
243
243
  * not already resident on the verifying host.
244
244
  *
245
245
  * The 100-operation cap is spec-normative and enforced here. Hosts MAY
@@ -248,10 +248,10 @@ declare const MAX_SIWD_CLIENT_CHAIN_OPS = 100;
248
248
  * protocol, so it is not a client-side throw; the practical reading is that a
249
249
  * chain anywhere near the op cap belongs on relays, not in a URL.
250
250
  *
251
- * As with the ask proof, the `client_chain` param is the REFERENCE wire surface
252
- * rather than a normative name SIWD.md leaves the carriage encoding to the
253
- * hosted endpoint's reference implementation and pins only that the chain
254
- * arrives with the ask and verifies before any consent is rendered.
251
+ * As with the ask proof, the `client_chain` param is the parameter the spec
252
+ * names (INTEGRATIONS.md, Chain residence): base64url of the JSON array of the
253
+ * verbatim operation JWS strings, genesis first, arriving with the ask and
254
+ * verifying before any consent is rendered.
255
255
  */
256
256
  declare const encodeSiwdClientChain: (log: string[]) => string;
257
257
  interface SiwdClientIdentity {
@@ -345,14 +345,16 @@ interface SiwdLoopbackLoginRequestInput {
345
345
  * Build a loopback authorize URL under the LOOPBACK CREDENTIAL TIER — the
346
346
  * outbound half of what `createSiwdLoginRequest` alone cannot produce. It is
347
347
  * that function plus the two things that back the `client_did` it now carries:
348
- * an ask proof (SIWD.md §The ask proof) and, unless the DID is already resident
349
- * on the host, the client's identity chain (SIWD.md §Chain residence).
348
+ * an ask proof (INTEGRATIONS.md, The ask proof) and, unless the DID is already
349
+ * resident on the host, the client's identity chain (INTEGRATIONS.md, Chain
350
+ * residence).
350
351
  *
351
- * `domain` is DERIVED, not accepted. SIWD.md pins a loopback challenge's domain
352
- * to the BARE loopback host — the port is not part of the binding, because a
353
- * local application cannot reserve one — and the host compares that value
354
- * literally against the redirect's host. Taking a `domain` input here would be
355
- * an invitation to a mismatch that fails only after the redirect.
352
+ * `domain` is DERIVED, not accepted. INTEGRATIONS.md, Loopback redirect targets
353
+ * pins a loopback challenge's domain to the BARE loopback host — the port is
354
+ * not part of the binding, because a local application cannot reserve one — and
355
+ * the host compares that value literally against the redirect's host. Taking a
356
+ * `domain` input here would be an invitation to a mismatch that fails only
357
+ * after the redirect.
356
358
  *
357
359
  * WHAT THIS PROVES IS KEY CONTROL, NOT PROVENANCE. The chain says which keys
358
360
  * the asking party holds; nothing about a loopback client's origin or authorship
@@ -404,7 +406,7 @@ type SiwdCallbackResult = {
404
406
  * THAT SAME PROPERTY IS A PROBLEM FOR A CLI, and this tier's primary consumer is
405
407
  * a CLI. A browser does not send the fragment to the loopback listener either,
406
408
  * so the request line a local HTTP server sees carries the query and nothing
407
- * else. The standard resolution (SIWD.md §4's loopback note) is for the listener
409
+ * else. The standard resolution (INTEGRATIONS.md, 4. Callback) is for the listener
408
410
  * to answer with a small page whose script reads `location.href` and posts the
409
411
  * whole URL back to the local server; feed THAT to this function. A browser RP
410
412
  * passes `location.href` directly and needs no relay.
@@ -1,5 +1,5 @@
1
- export { m as memoryStore } from '../memory-Ca1F2EBW.js';
2
- import { S as Store } from '../types-CSKl-wYe.js';
1
+ export { m as memoryStore } from '../memory-B5WMnEUQ.js';
2
+ import { S as Store } from '../types-BbIEz7BN.js';
3
3
  import '@metalabel/dfos-protocol/chain';
4
4
  import '@metalabel/dfos-protocol/credentials';
5
5
  import '@metalabel/dfos-web-relay/peer-client';
@@ -2,6 +2,14 @@ import { VerifiedIdentity, VerifiedContentChain } from '@metalabel/dfos-protocol
2
2
  import { VerifiedDFOSCredential, Attenuation } from '@metalabel/dfos-protocol/credentials';
3
3
  import { PeerClient } from '@metalabel/dfos-web-relay/peer-client';
4
4
 
5
+ /** Head/as-of state; excludes the credit-claim projection. */
6
+ type EffectiveIdentity = VerifiedIdentity & {
7
+ readonly resolution?: 'effective';
8
+ };
9
+ /** Every key ever proved, including memberships absent from effective state. */
10
+ type EverProvedIdentity = VerifiedIdentity & {
11
+ readonly resolution: 'ever-proved';
12
+ };
5
13
  /**
6
14
  * The two axes v1 genuinely cannot check:
7
15
  * - `revocation` — non-revocation is never provable (a relay can only attest to
@@ -48,14 +56,14 @@ interface VerifyResult<T> {
48
56
  interface ResolvedContent {
49
57
  chain: VerifiedContentChain;
50
58
  /** The creator identity — resolved as a side effect of key resolution. */
51
- creator: VerifiedIdentity;
59
+ creator: EffectiveIdentity;
52
60
  /** The current document blob, when fetched. */
53
61
  document?: DocumentBlob;
54
62
  }
55
63
  interface ResolvedCredential {
56
64
  credential: VerifiedDFOSCredential;
57
65
  /** The issuer identity, verified. */
58
- issuer: VerifiedIdentity;
66
+ issuer: EffectiveIdentity;
59
67
  /** Revocation status per the effective revocation checker (see Trust.unverifiable). */
60
68
  revoked: boolean;
61
69
  }
@@ -71,13 +79,13 @@ interface DocumentBlob {
71
79
  /** Discriminated result of the paste-a-string dispatcher. */
72
80
  type Resolution = ({
73
81
  kind: 'identity';
74
- } & Resolved<VerifiedIdentity>) | ({
82
+ } & Resolved<EffectiveIdentity>) | ({
75
83
  kind: 'content';
76
84
  } & Resolved<ResolvedContent>) | ({
77
85
  kind: 'credential';
78
86
  } & Resolved<ResolvedCredential>);
79
87
  /**
80
- * Check whether a credential has been revoked. Default: `() => false` (honest).
88
+ * Check whether a credential has been revoked. The default queries relays and throws when none answers.
81
89
  *
82
90
  * `asOfUnix` is the protocol's revocation as-of basis (see the protocol's
83
91
  * `RevocationChecker`): supplied when folding committed history, so a credential
@@ -99,12 +107,12 @@ interface Callbacks {
99
107
  */
100
108
  resolveKey: (kid: string, basis?: string) => Promise<Uint8Array>;
101
109
  /** Resolve a DID to its verified identity state as of `basis`. */
102
- resolveIdentity: (did: string, basis?: string) => Promise<VerifiedIdentity | undefined>;
110
+ resolveIdentity: (did: string, basis?: string) => Promise<EffectiveIdentity | undefined>;
103
111
  /**
104
112
  * Resolve a DID to its identity with every key it has ever proved — the
105
113
  * credit-claim carve-out, which runs no temporal check and so has no basis.
106
114
  */
107
- resolveClaimantIdentity: (did: string) => Promise<VerifiedIdentity | undefined>;
115
+ resolveClaimantIdentity: (did: string) => Promise<EverProvedIdentity | undefined>;
108
116
  isRevoked: RevChecker;
109
117
  }
110
118
  /**
@@ -267,7 +275,7 @@ interface ClientConfig {
267
275
  store?: Store;
268
276
  /** Distinct-digest agreement threshold. Default 1 (first-wins). */
269
277
  quorum?: number;
270
- /** Revocation checker. Default `() => false` (honest status is unverifiable). */
278
+ /** Revocation checker. Default queries relays; throws when none answers. */
271
279
  isRevoked?: RevChecker;
272
280
  /** Injected fetch for blob/health/revocation calls. Default `globalThis.fetch`. */
273
281
  fetch?: typeof fetch;
@@ -287,7 +295,7 @@ interface Client {
287
295
  callbacks(options?: CallOptions): Callbacks;
288
296
  /** Paste-a-string dispatcher → a typed, trust-wrapped resolution. */
289
297
  resolve(ref: string, options?: CallOptions): Promise<Resolution>;
290
- identity(did: string, options?: CallOptions): Promise<Resolved<VerifiedIdentity>>;
298
+ identity(did: string, options?: CallOptions): Promise<Resolved<EffectiveIdentity>>;
291
299
  content(contentId: string, options?: CallOptions): Promise<Resolved<ResolvedContent>>;
292
300
  credential(jws: string, options?: CallOptions): Promise<Resolved<ResolvedCredential>>;
293
301
  document(contentId: string, options?: CallOptions): Promise<Resolved<DocumentBlob>>;
@@ -351,4 +359,4 @@ interface Client {
351
359
  }, options?: CallOptions): Promise<IndexCredentialsPage>;
352
360
  }
353
361
 
354
- export type { ClientConfig as C, DocumentBlob as D, GlobalLogOptions as G, IndexCapabilities as I, LogOp as L, Provenance as P, RevChecker as R, Store as S, Trust as T, UnverifiableAxis as U, VerifyResult as V, Client as a, Callbacks as b, CallOptions as c, GlobalLogPage as d, GlobalLogResult as e, IndexContentPage as f, IndexContentRow as g, IndexCountersignatureRow as h, IndexCountersignaturesPage as i, IndexCredentialRow as j, IndexCredentialsPage as k, IndexIdentitiesPage as l, IndexIdentityProfile as m, IndexIdentityRow as n, IndexOrder as o, IndexRecencyOrder as p, RelayHealth as q, RelayResponse as r, Resolution as s, Resolved as t, ResolvedContent as u, ResolvedCredential as v };
362
+ export type { ClientConfig as C, DocumentBlob as D, EffectiveIdentity as E, GlobalLogOptions as G, IndexCapabilities as I, LogOp as L, Provenance as P, RevChecker as R, Store as S, Trust as T, UnverifiableAxis as U, VerifyResult as V, Client as a, Callbacks as b, CallOptions as c, EverProvedIdentity as d, GlobalLogPage as e, GlobalLogResult as f, IndexContentPage as g, IndexContentRow as h, IndexCountersignatureRow as i, IndexCountersignaturesPage as j, IndexCredentialRow as k, IndexCredentialsPage as l, IndexIdentitiesPage as m, IndexIdentityProfile as n, IndexIdentityRow as o, IndexOrder as p, IndexRecencyOrder as q, RelayHealth as r, RelayResponse as s, Resolution as t, Resolved as u, ResolvedContent as v, ResolvedCredential as w };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metalabel/dfos-client",
3
- "version": "0.51.0",
3
+ "version": "0.52.0",
4
4
  "type": "module",
5
5
  "description": "DFOS Client — the client-side kit for participating in the protocol: resolve, verify, prove. Fetch, resolve, verify-orchestration and cache over untrusted relays, plus the SIWD and API-AUTH proof surfaces. Holds no keys; all crypto truth comes from @metalabel/dfos-protocol",
6
6
  "license": "MIT",
@@ -47,16 +47,16 @@
47
47
  "README.md"
48
48
  ],
49
49
  "peerDependencies": {
50
- "@metalabel/dfos-protocol": "^0.51.0",
51
- "@metalabel/dfos-web-relay": "^0.51.0"
50
+ "@metalabel/dfos-protocol": "^0.52.0",
51
+ "@metalabel/dfos-web-relay": "^0.52.0"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/node": "^24.10.4",
55
55
  "tsup": "^8.5.1",
56
56
  "typescript": "^5.9.3",
57
57
  "vitest": "^4.1.8",
58
- "@metalabel/dfos-protocol": "0.51.0",
59
- "@metalabel/dfos-web-relay": "0.51.0"
58
+ "@metalabel/dfos-protocol": "0.52.0",
59
+ "@metalabel/dfos-web-relay": "0.52.0"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "tsup",