@interop/wallet-core 0.49.0 → 0.50.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/README.md +5 -2
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +118 -0
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -0
- package/dist/clientAnnex/credentialAnchoredGenesis.js +174 -0
- package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -0
- package/dist/clientAnnex/forget.d.ts +138 -0
- package/dist/clientAnnex/forget.d.ts.map +1 -0
- package/dist/clientAnnex/forget.js +133 -0
- package/dist/clientAnnex/forget.js.map +1 -0
- package/dist/clientAnnex/forgetLast.d.ts +267 -0
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -0
- package/dist/clientAnnex/forgetLast.js +374 -0
- package/dist/clientAnnex/forgetLast.js.map +1 -0
- package/dist/{webvh/companionGc.d.ts → clientAnnex/gc.d.ts} +50 -16
- package/dist/clientAnnex/gc.d.ts.map +1 -0
- package/dist/{webvh/companionGc.js → clientAnnex/gc.js} +103 -71
- package/dist/clientAnnex/gc.js.map +1 -0
- package/dist/clientAnnex/index.d.ts +60 -0
- package/dist/clientAnnex/index.d.ts.map +1 -0
- package/dist/clientAnnex/index.js +60 -0
- package/dist/clientAnnex/index.js.map +1 -0
- package/dist/{unlock → clientAnnex}/ladder.d.ts +89 -15
- package/dist/clientAnnex/ladder.d.ts.map +1 -0
- package/dist/clientAnnex/ladder.js +474 -0
- package/dist/clientAnnex/ladder.js.map +1 -0
- package/dist/clientAnnex/ladderAnchored.d.ts +276 -0
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -0
- package/dist/clientAnnex/ladderAnchored.js +631 -0
- package/dist/clientAnnex/ladderAnchored.js.map +1 -0
- package/dist/{webvh/companion.d.ts → clientAnnex/log.d.ts} +333 -119
- package/dist/clientAnnex/log.d.ts.map +1 -0
- package/dist/{webvh/companion.js → clientAnnex/log.js} +583 -199
- package/dist/clientAnnex/log.js.map +1 -0
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +103 -0
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -0
- package/dist/clientAnnex/recoveryLadderAnchored.js +263 -0
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -0
- package/dist/{unlock → clientAnnex}/selfEnroll.d.ts +1 -1
- package/dist/clientAnnex/selfEnroll.d.ts.map +1 -0
- package/dist/{unlock → clientAnnex}/selfEnroll.js +1 -1
- package/dist/clientAnnex/selfEnroll.js.map +1 -0
- package/dist/clientAnnex/zcap.d.ts +49 -0
- package/dist/clientAnnex/zcap.d.ts.map +1 -0
- package/dist/clientAnnex/zcap.js +101 -0
- package/dist/clientAnnex/zcap.js.map +1 -0
- package/dist/clients/index.d.ts +9 -6
- package/dist/clients/index.d.ts.map +1 -1
- package/dist/clients/index.js +8 -5
- package/dist/clients/index.js.map +1 -1
- package/dist/clients/listing.d.ts +32 -0
- package/dist/clients/listing.d.ts.map +1 -1
- package/dist/clients/listing.js +47 -1
- package/dist/clients/listing.js.map +1 -1
- package/dist/clients/revocation.d.ts +33 -1
- package/dist/clients/revocation.d.ts.map +1 -1
- package/dist/clients/revocation.js +16 -4
- package/dist/clients/revocation.js.map +1 -1
- package/dist/enrollment/index.d.ts +6 -4
- package/dist/enrollment/index.d.ts.map +1 -1
- package/dist/enrollment/index.js +6 -4
- package/dist/enrollment/index.js.map +1 -1
- package/dist/enrollment/onboardingInvite.d.ts +5 -88
- package/dist/enrollment/onboardingInvite.d.ts.map +1 -1
- package/dist/enrollment/onboardingInvite.js +5 -168
- package/dist/enrollment/onboardingInvite.js.map +1 -1
- package/dist/genesis/index.d.ts +5 -0
- package/dist/genesis/index.d.ts.map +1 -1
- package/dist/genesis/index.js +5 -0
- package/dist/genesis/index.js.map +1 -1
- package/dist/keys/index.d.ts +1 -1
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +1 -1
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/spaceEpochs.d.ts +7 -2
- package/dist/keys/spaceEpochs.d.ts.map +1 -1
- package/dist/keys/spaceEpochs.js +8 -2
- package/dist/keys/spaceEpochs.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +39 -0
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +43 -1
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/recovery/index.d.ts +5 -3
- package/dist/recovery/index.d.ts.map +1 -1
- package/dist/recovery/index.js +4 -2
- package/dist/recovery/index.js.map +1 -1
- package/dist/recovery/recoveryDelegation.d.ts +35 -12
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +84 -86
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +32 -1
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +2 -2
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/request/capabilityRequest.d.ts +33 -0
- package/dist/request/capabilityRequest.d.ts.map +1 -0
- package/dist/request/capabilityRequest.js +35 -0
- package/dist/request/capabilityRequest.js.map +1 -0
- package/dist/request/ephemeralExchange.d.ts +118 -0
- package/dist/request/ephemeralExchange.d.ts.map +1 -0
- package/dist/request/ephemeralExchange.js +224 -0
- package/dist/request/ephemeralExchange.js.map +1 -0
- package/dist/request/index.d.ts +6 -0
- package/dist/request/index.d.ts.map +1 -1
- package/dist/request/index.js +6 -0
- package/dist/request/index.js.map +1 -1
- package/dist/space/activity.d.ts +2 -2
- package/dist/space/activity.js +3 -3
- package/dist/space/activity.js.map +1 -1
- package/dist/unlock/index.d.ts +11 -23
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js +10 -21
- package/dist/unlock/index.js.map +1 -1
- package/dist/unlock/retire.d.ts +47 -3
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +21 -5
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingWebvh.d.ts +37 -82
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +64 -247
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/unlock/unlockRecord.d.ts +13 -6
- package/dist/unlock/unlockRecord.d.ts.map +1 -1
- package/dist/unlock/unlockRecord.js +14 -8
- package/dist/unlock/unlockRecord.js.map +1 -1
- package/dist/webvh/delegatedLogStore.d.ts +5 -5
- package/dist/webvh/delegatedLogStore.js +1 -1
- package/dist/webvh/didWebvh.d.ts +19 -9
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +16 -16
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/index.d.ts +9 -25
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +9 -23
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/revokeClient.d.ts +77 -5
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +154 -61
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/standingZcap.d.ts +11 -1
- package/dist/webvh/standingZcap.d.ts.map +1 -1
- package/dist/webvh/standingZcap.js +13 -14
- package/dist/webvh/standingZcap.js.map +1 -1
- package/dist/webvh/wasIdStore.d.ts +13 -7
- package/dist/webvh/wasIdStore.d.ts.map +1 -1
- package/dist/webvh/wasIdStore.js +8 -4
- package/dist/webvh/wasIdStore.js.map +1 -1
- package/dist/webvh/zcap.d.ts +0 -24
- package/dist/webvh/zcap.d.ts.map +1 -1
- package/dist/webvh/zcap.js +0 -42
- package/dist/webvh/zcap.js.map +1 -1
- package/package.json +40 -34
- package/dist/unlock/ladder.d.ts.map +0 -1
- package/dist/unlock/ladder.js +0 -258
- package/dist/unlock/ladder.js.map +0 -1
- package/dist/unlock/selfEnroll.d.ts.map +0 -1
- package/dist/unlock/selfEnroll.js.map +0 -1
- package/dist/webvh/companion.d.ts.map +0 -1
- package/dist/webvh/companion.js.map +0 -1
- package/dist/webvh/companionGc.d.ts.map +0 -1
- package/dist/webvh/companionGc.js.map +0 -1
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The requester's half of an ephemeral exchange on a WAS server: creating an
|
|
6
|
+
* exchange that carries a Verifiable Presentation Request as its stored
|
|
7
|
+
* request, and polling that exchange until the answering wallet posts its
|
|
8
|
+
* response. Generic over what the request asks for -- a wallet's onboarding
|
|
9
|
+
* invite stores a `WalletOnboardingQuery` (`onboarding.ts`), a CLI asking for
|
|
10
|
+
* capabilities stores a zcap-only request (`capabilityRequest.ts`). Pure
|
|
11
|
+
* logic: no UI framework, no DOM, and no module-level mutable state; every
|
|
12
|
+
* run is per-instance, cancelled through the caller's `AbortSignal` or the
|
|
13
|
+
* poll's own deadline, with the network transport injected.
|
|
14
|
+
*
|
|
15
|
+
* These routes are deliberately unauthenticated (a capability-URL posture:
|
|
16
|
+
* the exchange URL is the secret, and it travels point-to-point, as a QR code
|
|
17
|
+
* or a printed link), so nothing here signs a request.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* How often the requester polls the exchange for the wallet's response.
|
|
21
|
+
*/
|
|
22
|
+
export declare const EPHEMERAL_EXCHANGE_POLL_INTERVAL_MS = 3000;
|
|
23
|
+
/**
|
|
24
|
+
* How long the server keeps an ephemeral exchange. A poll past it can only
|
|
25
|
+
* ever find the exchange gone, so a caller with no other bound (a CLI) passes
|
|
26
|
+
* this as its `timeoutMs`; a UI offering the exchange for a shorter window
|
|
27
|
+
* (an invite countdown) picks its own.
|
|
28
|
+
*/
|
|
29
|
+
export declare const EPHEMERAL_EXCHANGE_TTL_MS: number;
|
|
30
|
+
/**
|
|
31
|
+
* The exchange path the interaction URL adds, with the interaction-URL
|
|
32
|
+
* version query the answering wallet's scanner expects.
|
|
33
|
+
*/
|
|
34
|
+
export declare const EPHEMERAL_EXCHANGE_INTERACTION_PATH = "/protocols?iuv=1";
|
|
35
|
+
/**
|
|
36
|
+
* The subset of `fetch` this module uses, so a caller (or a test) injects its
|
|
37
|
+
* own transport instead of relying on the global.
|
|
38
|
+
*/
|
|
39
|
+
type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
|
|
40
|
+
/**
|
|
41
|
+
* Raised when the exchange is no longer on the server (a `404`): it either
|
|
42
|
+
* expired or was never created. The remedy is a fresh exchange, so a caller
|
|
43
|
+
* renders its "expired" state. Dispatch on `err.name` rather than
|
|
44
|
+
* `instanceof`: the transport is injected and may resolve to a different copy
|
|
45
|
+
* of this package, which makes the name the stable contract.
|
|
46
|
+
*/
|
|
47
|
+
export declare class EphemeralExchangeGoneError extends Error {
|
|
48
|
+
constructor(message?: string);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Raised when the poll's own `timeoutMs` elapses before the exchange
|
|
52
|
+
* completes. Distinct from {@link EphemeralExchangeGoneError}: the exchange
|
|
53
|
+
* may still be on the server and approvable, the requester just stopped
|
|
54
|
+
* waiting. Dispatch on `err.name`, for the same reason as the gone error.
|
|
55
|
+
*/
|
|
56
|
+
export declare class EphemeralExchangeTimeoutError extends Error {
|
|
57
|
+
constructor(message?: string);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* REQUESTER: creates an ephemeral exchange holding the request as its stored
|
|
61
|
+
* request, and returns both the exchange URL (the requester polls it) and the
|
|
62
|
+
* interaction URL (what the QR code or printed link carries).
|
|
63
|
+
*
|
|
64
|
+
* The server relays the stored request verbatim as its reply to the begin
|
|
65
|
+
* POST, so the VPR details are stored wrapped as a VC-API exchange response
|
|
66
|
+
* (`{ verifiablePresentationRequest: request }`) -- the shape the answering
|
|
67
|
+
* wallet's classifier reads.
|
|
68
|
+
*
|
|
69
|
+
* The exchange URL is read from the `Location` response header, falling back
|
|
70
|
+
* to the body's `location` member -- deployments differ on which they set,
|
|
71
|
+
* and either alone is enough.
|
|
72
|
+
*
|
|
73
|
+
* @param options {object}
|
|
74
|
+
* @param options.serverUrl {string} the WAS server base URL
|
|
75
|
+
* @param options.request {unknown} the VPR details to store
|
|
76
|
+
* @param [options.fetch] {FetchLike}
|
|
77
|
+
* @returns {Promise<{ exchangeUrl: string, interactionUrl: string }>}
|
|
78
|
+
*/
|
|
79
|
+
export declare function createEphemeralExchange({ serverUrl, request, fetch: fetchImpl }: {
|
|
80
|
+
serverUrl: string;
|
|
81
|
+
request: unknown;
|
|
82
|
+
fetch?: FetchLike;
|
|
83
|
+
}): Promise<{
|
|
84
|
+
exchangeUrl: string;
|
|
85
|
+
interactionUrl: string;
|
|
86
|
+
}>;
|
|
87
|
+
/**
|
|
88
|
+
* REQUESTER: polls the exchange until the wallet posts its response, and
|
|
89
|
+
* resolves with that response body verbatim (the caller interprets it: an
|
|
90
|
+
* onboarding invite through `parseOnboardingResponse`, a capability request
|
|
91
|
+
* by reading the presentation's `zcap` member).
|
|
92
|
+
*
|
|
93
|
+
* A `404` means the exchange expired or was never there, and rejects with
|
|
94
|
+
* {@link EphemeralExchangeGoneError}. Every other failure -- a network error,
|
|
95
|
+
* another non-ok status, an unparseable body -- is transient and simply
|
|
96
|
+
* retried on the next tick. Two bounds end the wait early: the caller's
|
|
97
|
+
* `signal` rejects promptly with its own reason, and `timeoutMs` (measured
|
|
98
|
+
* from the call) rejects with {@link EphemeralExchangeTimeoutError}; either
|
|
99
|
+
* cancels an in-flight request. Without both, the poll runs until the
|
|
100
|
+
* exchange completes or disappears.
|
|
101
|
+
*
|
|
102
|
+
* @param options {object}
|
|
103
|
+
* @param options.exchangeUrl {string}
|
|
104
|
+
* @param [options.signal] {AbortSignal}
|
|
105
|
+
* @param [options.timeoutMs] {number} the poll's own deadline
|
|
106
|
+
* @param [options.intervalMs] {number}
|
|
107
|
+
* @param [options.fetch] {FetchLike}
|
|
108
|
+
* @returns {Promise<unknown>} the completed exchange's `response` member
|
|
109
|
+
*/
|
|
110
|
+
export declare function pollEphemeralExchange({ exchangeUrl, signal, timeoutMs, intervalMs, fetch: fetchImpl }: {
|
|
111
|
+
exchangeUrl: string;
|
|
112
|
+
signal?: AbortSignal;
|
|
113
|
+
timeoutMs?: number;
|
|
114
|
+
intervalMs?: number;
|
|
115
|
+
fetch?: FetchLike;
|
|
116
|
+
}): Promise<unknown>;
|
|
117
|
+
export {};
|
|
118
|
+
//# sourceMappingURL=ephemeralExchange.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ephemeralExchange.d.ts","sourceRoot":"","sources":["../../src/request/ephemeralExchange.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,eAAO,MAAM,mCAAmC,OAAO,CAAA;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,QAAiB,CAAA;AAEvD;;;GAGG;AACH,eAAO,MAAM,mCAAmC,qBAAqB,CAAA;AAErE;;;GAGG;AACH,KAAK,SAAS,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAEzE;;;;;;GAMG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;gBACvC,OAAO,SAAmD;CAIvE;AAED;;;;;GAKG;AACH,qBAAa,6BAA8B,SAAQ,KAAK;gBAEpD,OAAO,SAA8D;CAKxE;AAcD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,uBAAuB,CAAC,EAC5C,SAAS,EACT,OAAO,EACP,KAAK,EAAE,SAA4B,EACpC,EAAE;IACD,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,GAAG,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAAC,CA8B3D;AAmCD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,qBAAqB,CAAC,EAC1C,WAAW,EACX,MAAM,EACN,SAAS,EACT,UAAgD,EAChD,KAAK,EAAE,SAA4B,EACpC,EAAE;IACD,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,GAAG,OAAO,CAAC,OAAO,CAAC,CAyDnB"}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The requester's half of an ephemeral exchange on a WAS server: creating an
|
|
6
|
+
* exchange that carries a Verifiable Presentation Request as its stored
|
|
7
|
+
* request, and polling that exchange until the answering wallet posts its
|
|
8
|
+
* response. Generic over what the request asks for -- a wallet's onboarding
|
|
9
|
+
* invite stores a `WalletOnboardingQuery` (`onboarding.ts`), a CLI asking for
|
|
10
|
+
* capabilities stores a zcap-only request (`capabilityRequest.ts`). Pure
|
|
11
|
+
* logic: no UI framework, no DOM, and no module-level mutable state; every
|
|
12
|
+
* run is per-instance, cancelled through the caller's `AbortSignal` or the
|
|
13
|
+
* poll's own deadline, with the network transport injected.
|
|
14
|
+
*
|
|
15
|
+
* These routes are deliberately unauthenticated (a capability-URL posture:
|
|
16
|
+
* the exchange URL is the secret, and it travels point-to-point, as a QR code
|
|
17
|
+
* or a printed link), so nothing here signs a request.
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* How often the requester polls the exchange for the wallet's response.
|
|
21
|
+
*/
|
|
22
|
+
export const EPHEMERAL_EXCHANGE_POLL_INTERVAL_MS = 3000;
|
|
23
|
+
/**
|
|
24
|
+
* How long the server keeps an ephemeral exchange. A poll past it can only
|
|
25
|
+
* ever find the exchange gone, so a caller with no other bound (a CLI) passes
|
|
26
|
+
* this as its `timeoutMs`; a UI offering the exchange for a shorter window
|
|
27
|
+
* (an invite countdown) picks its own.
|
|
28
|
+
*/
|
|
29
|
+
export const EPHEMERAL_EXCHANGE_TTL_MS = 10 * 60 * 1000;
|
|
30
|
+
/**
|
|
31
|
+
* The exchange path the interaction URL adds, with the interaction-URL
|
|
32
|
+
* version query the answering wallet's scanner expects.
|
|
33
|
+
*/
|
|
34
|
+
export const EPHEMERAL_EXCHANGE_INTERACTION_PATH = '/protocols?iuv=1';
|
|
35
|
+
/**
|
|
36
|
+
* Raised when the exchange is no longer on the server (a `404`): it either
|
|
37
|
+
* expired or was never created. The remedy is a fresh exchange, so a caller
|
|
38
|
+
* renders its "expired" state. Dispatch on `err.name` rather than
|
|
39
|
+
* `instanceof`: the transport is injected and may resolve to a different copy
|
|
40
|
+
* of this package, which makes the name the stable contract.
|
|
41
|
+
*/
|
|
42
|
+
export class EphemeralExchangeGoneError extends Error {
|
|
43
|
+
constructor(message = 'The ephemeral exchange is no longer available.') {
|
|
44
|
+
super(message);
|
|
45
|
+
this.name = 'EphemeralExchangeGoneError';
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Raised when the poll's own `timeoutMs` elapses before the exchange
|
|
50
|
+
* completes. Distinct from {@link EphemeralExchangeGoneError}: the exchange
|
|
51
|
+
* may still be on the server and approvable, the requester just stopped
|
|
52
|
+
* waiting. Dispatch on `err.name`, for the same reason as the gone error.
|
|
53
|
+
*/
|
|
54
|
+
export class EphemeralExchangeTimeoutError extends Error {
|
|
55
|
+
constructor(message = 'Timed out waiting for the ephemeral exchange to complete.') {
|
|
56
|
+
super(message);
|
|
57
|
+
this.name = 'EphemeralExchangeTimeoutError';
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Strips a trailing slash from a configured base URL, so joining a path onto
|
|
62
|
+
* it cannot produce a doubled separator.
|
|
63
|
+
*
|
|
64
|
+
* @param options {object}
|
|
65
|
+
* @param options.serverUrl {string}
|
|
66
|
+
* @returns {string}
|
|
67
|
+
*/
|
|
68
|
+
function normalizedServerUrl({ serverUrl }) {
|
|
69
|
+
return serverUrl.replace(/\/+$/, '');
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* REQUESTER: creates an ephemeral exchange holding the request as its stored
|
|
73
|
+
* request, and returns both the exchange URL (the requester polls it) and the
|
|
74
|
+
* interaction URL (what the QR code or printed link carries).
|
|
75
|
+
*
|
|
76
|
+
* The server relays the stored request verbatim as its reply to the begin
|
|
77
|
+
* POST, so the VPR details are stored wrapped as a VC-API exchange response
|
|
78
|
+
* (`{ verifiablePresentationRequest: request }`) -- the shape the answering
|
|
79
|
+
* wallet's classifier reads.
|
|
80
|
+
*
|
|
81
|
+
* The exchange URL is read from the `Location` response header, falling back
|
|
82
|
+
* to the body's `location` member -- deployments differ on which they set,
|
|
83
|
+
* and either alone is enough.
|
|
84
|
+
*
|
|
85
|
+
* @param options {object}
|
|
86
|
+
* @param options.serverUrl {string} the WAS server base URL
|
|
87
|
+
* @param options.request {unknown} the VPR details to store
|
|
88
|
+
* @param [options.fetch] {FetchLike}
|
|
89
|
+
* @returns {Promise<{ exchangeUrl: string, interactionUrl: string }>}
|
|
90
|
+
*/
|
|
91
|
+
export async function createEphemeralExchange({ serverUrl, request, fetch: fetchImpl = globalThis.fetch }) {
|
|
92
|
+
const url = `${normalizedServerUrl({ serverUrl })}/workflows/ephemeral/exchanges`;
|
|
93
|
+
const response = await fetchImpl(url, {
|
|
94
|
+
method: 'POST',
|
|
95
|
+
headers: { 'content-type': 'application/json' },
|
|
96
|
+
body: JSON.stringify({
|
|
97
|
+
request: { verifiablePresentationRequest: request }
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
if (!response.ok) {
|
|
101
|
+
throw new Error(`Could not create the ephemeral exchange (HTTP ${response.status}).`);
|
|
102
|
+
}
|
|
103
|
+
let exchangeUrl = response.headers?.get('location') ?? '';
|
|
104
|
+
if (!exchangeUrl) {
|
|
105
|
+
try {
|
|
106
|
+
const body = (await response.json());
|
|
107
|
+
exchangeUrl = body?.location ?? '';
|
|
108
|
+
}
|
|
109
|
+
catch (err) {
|
|
110
|
+
console.warn('Could not parse the created exchange body:', err);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (!exchangeUrl) {
|
|
114
|
+
throw new Error('The created ephemeral exchange has no location.');
|
|
115
|
+
}
|
|
116
|
+
return {
|
|
117
|
+
exchangeUrl,
|
|
118
|
+
interactionUrl: `${exchangeUrl}${EPHEMERAL_EXCHANGE_INTERACTION_PATH}`
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Sleeps for `delayMs`, rejecting promptly with the signal's reason if the
|
|
123
|
+
* signal aborts first. The timer is always cleared.
|
|
124
|
+
*
|
|
125
|
+
* @param options {object}
|
|
126
|
+
* @param options.delayMs {number}
|
|
127
|
+
* @param options.signal {AbortSignal}
|
|
128
|
+
* @returns {Promise<void>}
|
|
129
|
+
*/
|
|
130
|
+
function abortableDelay({ delayMs, signal }) {
|
|
131
|
+
return new Promise((resolve, reject) => {
|
|
132
|
+
if (signal.aborted) {
|
|
133
|
+
reject(signal.reason);
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
const timer = setTimeout(() => {
|
|
137
|
+
signal.removeEventListener('abort', onAbort);
|
|
138
|
+
resolve();
|
|
139
|
+
}, delayMs);
|
|
140
|
+
function onAbort() {
|
|
141
|
+
clearTimeout(timer);
|
|
142
|
+
reject(signal.reason);
|
|
143
|
+
}
|
|
144
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* REQUESTER: polls the exchange until the wallet posts its response, and
|
|
149
|
+
* resolves with that response body verbatim (the caller interprets it: an
|
|
150
|
+
* onboarding invite through `parseOnboardingResponse`, a capability request
|
|
151
|
+
* by reading the presentation's `zcap` member).
|
|
152
|
+
*
|
|
153
|
+
* A `404` means the exchange expired or was never there, and rejects with
|
|
154
|
+
* {@link EphemeralExchangeGoneError}. Every other failure -- a network error,
|
|
155
|
+
* another non-ok status, an unparseable body -- is transient and simply
|
|
156
|
+
* retried on the next tick. Two bounds end the wait early: the caller's
|
|
157
|
+
* `signal` rejects promptly with its own reason, and `timeoutMs` (measured
|
|
158
|
+
* from the call) rejects with {@link EphemeralExchangeTimeoutError}; either
|
|
159
|
+
* cancels an in-flight request. Without both, the poll runs until the
|
|
160
|
+
* exchange completes or disappears.
|
|
161
|
+
*
|
|
162
|
+
* @param options {object}
|
|
163
|
+
* @param options.exchangeUrl {string}
|
|
164
|
+
* @param [options.signal] {AbortSignal}
|
|
165
|
+
* @param [options.timeoutMs] {number} the poll's own deadline
|
|
166
|
+
* @param [options.intervalMs] {number}
|
|
167
|
+
* @param [options.fetch] {FetchLike}
|
|
168
|
+
* @returns {Promise<unknown>} the completed exchange's `response` member
|
|
169
|
+
*/
|
|
170
|
+
export async function pollEphemeralExchange({ exchangeUrl, signal, timeoutMs, intervalMs = EPHEMERAL_EXCHANGE_POLL_INTERVAL_MS, fetch: fetchImpl = globalThis.fetch }) {
|
|
171
|
+
// One internal signal folds the caller's abort and the deadline together,
|
|
172
|
+
// so a single `signal` reaches fetch and the delay. The caller's reason is
|
|
173
|
+
// forwarded verbatim; the deadline aborts with the timeout error.
|
|
174
|
+
const controller = new AbortController();
|
|
175
|
+
const onCallerAbort = () => controller.abort(signal?.reason);
|
|
176
|
+
if (signal?.aborted) {
|
|
177
|
+
onCallerAbort();
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
signal?.addEventListener('abort', onCallerAbort, { once: true });
|
|
181
|
+
}
|
|
182
|
+
const deadline = timeoutMs === undefined
|
|
183
|
+
? undefined
|
|
184
|
+
: setTimeout(() => controller.abort(new EphemeralExchangeTimeoutError()), timeoutMs);
|
|
185
|
+
try {
|
|
186
|
+
for (;;) {
|
|
187
|
+
if (controller.signal.aborted) {
|
|
188
|
+
throw controller.signal.reason;
|
|
189
|
+
}
|
|
190
|
+
try {
|
|
191
|
+
const response = await fetchImpl(exchangeUrl, {
|
|
192
|
+
signal: controller.signal
|
|
193
|
+
});
|
|
194
|
+
if (response.status === 404) {
|
|
195
|
+
throw new EphemeralExchangeGoneError();
|
|
196
|
+
}
|
|
197
|
+
if (response.ok) {
|
|
198
|
+
const body = (await response.json());
|
|
199
|
+
if (body?.state === 'complete') {
|
|
200
|
+
return body.response;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
catch (err) {
|
|
205
|
+
if (controller.signal.aborted) {
|
|
206
|
+
throw controller.signal.reason;
|
|
207
|
+
}
|
|
208
|
+
if (err?.name === 'EphemeralExchangeGoneError') {
|
|
209
|
+
throw err;
|
|
210
|
+
}
|
|
211
|
+
// Anything else is transient -- keep polling.
|
|
212
|
+
console.warn('Polling the ephemeral exchange failed; retrying:', err);
|
|
213
|
+
}
|
|
214
|
+
await abortableDelay({ delayMs: intervalMs, signal: controller.signal });
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
finally {
|
|
218
|
+
signal?.removeEventListener('abort', onCallerAbort);
|
|
219
|
+
if (deadline !== undefined) {
|
|
220
|
+
clearTimeout(deadline);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
//# sourceMappingURL=ephemeralExchange.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ephemeralExchange.js","sourceRoot":"","sources":["../../src/request/ephemeralExchange.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,mCAAmC,GAAG,IAAI,CAAA;AAEvD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,GAAG,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,MAAM,IAAI,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAGlC,CAAA;oBACD,IAAI,IAAI,EAAE,KAAK,KAAK,UAAU,EAAE,CAAC;wBAC/B,OAAO,IAAI,CAAC,QAAQ,CAAA;oBACtB,CAAC;gBACH,CAAC;YACH,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;oBAC9B,MAAM,UAAU,CAAC,MAAM,CAAC,MAAM,CAAA;gBAChC,CAAC;gBACD,IAAK,GAAa,EAAE,IAAI,KAAK,4BAA4B,EAAE,CAAC;oBAC1D,MAAM,GAAG,CAAA;gBACX,CAAC;gBACD,8CAA8C;gBAC9C,OAAO,CAAC,IAAI,CAAC,kDAAkD,EAAE,GAAG,CAAC,CAAA;YACvE,CAAC;YACD,MAAM,cAAc,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,CAAA;QAC1E,CAAC;IACH,CAAC;YAAS,CAAC;QACT,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAA;QACnD,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,YAAY,CAAC,QAAQ,CAAC,CAAA;QACxB,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/dist/request/index.d.ts
CHANGED
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
* the (optionally signed, optionally grant-embedding) response VP.
|
|
26
26
|
* - `exchangeClient` is the fetch-injectable VC-API exchange client;
|
|
27
27
|
* `interactionUrl` resolves VCALM `interaction:` URLs.
|
|
28
|
+
* - `ephemeralExchange` is the requester's side of a WAS server's ephemeral
|
|
29
|
+
* exchange: create one carrying a VPR, poll it (with an optional deadline)
|
|
30
|
+
* until the wallet answers. `capabilityRequest` composes the zcap-only VPR
|
|
31
|
+
* a requester stores on it.
|
|
28
32
|
* - `processRequest` is the pure request-to-response pipeline, with the
|
|
29
33
|
* app-side side effects injected.
|
|
30
34
|
* - `classifyWalletInput` / `handleWalletInput` are the ordered
|
|
@@ -44,6 +48,8 @@ export * from './presentationSuite.js';
|
|
|
44
48
|
export * from './composeVp.js';
|
|
45
49
|
export * from './exchangeClient.js';
|
|
46
50
|
export * from './interactionUrl.js';
|
|
51
|
+
export * from './ephemeralExchange.js';
|
|
52
|
+
export * from './capabilityRequest.js';
|
|
47
53
|
export * from './processRequest.js';
|
|
48
54
|
export * from './walletInput.js';
|
|
49
55
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/request/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/request/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
|
package/dist/request/index.js
CHANGED
|
@@ -25,6 +25,10 @@
|
|
|
25
25
|
* the (optionally signed, optionally grant-embedding) response VP.
|
|
26
26
|
* - `exchangeClient` is the fetch-injectable VC-API exchange client;
|
|
27
27
|
* `interactionUrl` resolves VCALM `interaction:` URLs.
|
|
28
|
+
* - `ephemeralExchange` is the requester's side of a WAS server's ephemeral
|
|
29
|
+
* exchange: create one carrying a VPR, poll it (with an optional deadline)
|
|
30
|
+
* until the wallet answers. `capabilityRequest` composes the zcap-only VPR
|
|
31
|
+
* a requester stores on it.
|
|
28
32
|
* - `processRequest` is the pure request-to-response pipeline, with the
|
|
29
33
|
* app-side side effects injected.
|
|
30
34
|
* - `classifyWalletInput` / `handleWalletInput` are the ordered
|
|
@@ -44,6 +48,8 @@ export * from './presentationSuite.js';
|
|
|
44
48
|
export * from './composeVp.js';
|
|
45
49
|
export * from './exchangeClient.js';
|
|
46
50
|
export * from './interactionUrl.js';
|
|
51
|
+
export * from './ephemeralExchange.js';
|
|
52
|
+
export * from './capabilityRequest.js';
|
|
47
53
|
export * from './processRequest.js';
|
|
48
54
|
export * from './walletInput.js';
|
|
49
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/request/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/request/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA;AACtC,cAAc,wBAAwB,CAAA;AACtC,cAAc,qBAAqB,CAAA;AACnC,cAAc,kBAAkB,CAAA"}
|
package/dist/space/activity.d.ts
CHANGED
|
@@ -230,7 +230,7 @@ export declare function addHistoryClientRevoked({ user, signingKeyMultibase, lab
|
|
|
230
230
|
created?: string;
|
|
231
231
|
}): WalletActivity;
|
|
232
232
|
/**
|
|
233
|
-
* The GenerationCollect activity:
|
|
233
|
+
* The GenerationCollect activity: client-annex GC collected one generation --
|
|
234
234
|
* the owner-side digest written BEFORE the generation collection is deleted,
|
|
235
235
|
* and the only record of the collected window's visits that survives the
|
|
236
236
|
* delete. One row per collected generation.
|
|
@@ -240,7 +240,7 @@ export declare function addHistoryClientRevoked({ user, signingKeyMultibase, lab
|
|
|
240
240
|
* the deterministic payload id is what lets a torn re-run's second row
|
|
241
241
|
* collapse at read time under the store's documented dedupe model.
|
|
242
242
|
*
|
|
243
|
-
* `firstEntry` / `lastEntry` quote the collected
|
|
243
|
+
* `firstEntry` / `lastEntry` quote the collected annex log's first and
|
|
244
244
|
* last entries' `versionTime` strings verbatim (the digest outlives the log
|
|
245
245
|
* it describes, so it does not launder its source), and `entryCount` is the
|
|
246
246
|
* log's total entry count, genesis included -- an entry count, deliberately
|
package/dist/space/activity.js
CHANGED
|
@@ -268,7 +268,7 @@ export function addHistoryClientRevoked({ user, signingKeyMultibase, label, rota
|
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
270
|
/**
|
|
271
|
-
* The GenerationCollect activity:
|
|
271
|
+
* The GenerationCollect activity: client-annex GC collected one generation --
|
|
272
272
|
* the owner-side digest written BEFORE the generation collection is deleted,
|
|
273
273
|
* and the only record of the collected window's visits that survives the
|
|
274
274
|
* delete. One row per collected generation.
|
|
@@ -278,7 +278,7 @@ export function addHistoryClientRevoked({ user, signingKeyMultibase, label, rota
|
|
|
278
278
|
* the deterministic payload id is what lets a torn re-run's second row
|
|
279
279
|
* collapse at read time under the store's documented dedupe model.
|
|
280
280
|
*
|
|
281
|
-
* `firstEntry` / `lastEntry` quote the collected
|
|
281
|
+
* `firstEntry` / `lastEntry` quote the collected annex log's first and
|
|
282
282
|
* last entries' `versionTime` strings verbatim (the digest outlives the log
|
|
283
283
|
* it describes, so it does not launder its source), and `entryCount` is the
|
|
284
284
|
* log's total entry count, genesis included -- an entry count, deliberately
|
|
@@ -300,7 +300,7 @@ export function addHistoryGenerationCollected({ user, generationId, firstEntry,
|
|
|
300
300
|
return {
|
|
301
301
|
id: generationId,
|
|
302
302
|
type: [ACTIVITY_TYPE.GenerationCollect],
|
|
303
|
-
summary: `Collected
|
|
303
|
+
summary: `Collected client-annex generation "${generationId}".`,
|
|
304
304
|
actor: { email: user.email },
|
|
305
305
|
object: { generationId, firstEntry, lastEntry, entryCount },
|
|
306
306
|
created: created ?? new Date().toISOString()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity.js","sourceRoot":"","sources":["../../src/space/activity.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;GAiBG;AAgBH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,cAAc;IAC5B,eAAe,EAAE,iBAAiB;IAClC,iBAAiB,EAAE,mBAAmB;IACtC,iBAAiB,EAAE,mBAAmB;CAC9B,CAAA;AAOV;;GAEG;AACH,SAAS,KAAK,CAAC,EAAW,EAAE,OAAgB;IAC1C,OAAO;QACL,EAAE,EAAE,EAAE,IAAI,MAAM,CAAC,UAAU,EAAE;QAC7B,OAAO,EAAE,OAAO,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KAC7C,CAAA;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,IAAI,EACJ,EAAE,EACF,OAAO,EAKR;IACC,MAAM,OAAO,GAAG,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;IAClC,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,IAAI,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC;QAC5B,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AAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;QAC5B,MAAM,EAAE,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE;QAC3D,OAAO,EAAE,OAAO,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KAC7C,CAAA;AACH,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,EAClC,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,GAAG,EACH,OAAO,EACP,OAAO,EACP,EAAE,EACF,OAAO,EAUR;IACC,MAAM,OAAO,GAAG,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;IAClC,MAAM,OAAO,GACX,OAAO,OAAO,KAAK,QAAQ;QACzB,CAAC,CAAC,WAAW,IAAI,KAAK,MAAM,iBAAiB,OAAO,YAAY;YAC9D,UAAU,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG;QACpD,CAAC,CAAC,WAAW,IAAI,KAAK,MAAM,eAAe,CAAA;IAC/C,OAAO;QACL,EAAE,EAAE,OAAO,CAAC,EAAE;QACd,IAAI,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC;QAC5B,OAAO;QACP,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;QAC5B,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;QAC/D,OAAO,EAAE,OAAO,CAAC,OAAO;KACzB,CAAA;AACH,CAAC"}
|
package/dist/unlock/index.d.ts
CHANGED
|
@@ -10,45 +10,33 @@
|
|
|
10
10
|
* - `standingClientFromUnlockSeed` / `unlockClientIdentityFromSeed` -- the
|
|
11
11
|
* deterministic client identity a credential derives (roster wrap target,
|
|
12
12
|
* binding MAC key), shared with the recovery-code derivation.
|
|
13
|
-
* - `generateLadderSeed` / `ladderRung` / `attributeLadderRung` -- the
|
|
14
|
-
* update-key ladder: latent-and-consumed did:webvh update authority from a
|
|
15
|
-
* random seed carried in the unlock record, current rung recovered from the
|
|
16
|
-
* log itself, ambiguity failing closed. `ladderVmKeyMultibase` derives the
|
|
17
|
-
* ladder VM (the stable sibling), the document-visible key a client-less
|
|
18
|
-
* account anchors on.
|
|
19
|
-
* - `createClientlessAccountLog` -- the client-less genesis log: an account
|
|
20
|
-
* with zero enrolled durable clients, `updateKeys` = [rung 0], the ladder
|
|
21
|
-
* VM under `assertionMethod` and `capabilityDelegation` only, and the
|
|
22
|
-
* credential's `keyAgreement` posture folded into genesis. The window it
|
|
23
|
-
* opens is closed atomically by the first durable self-enrollment's add
|
|
24
|
-
* entry.
|
|
25
13
|
* - `wrapUnlockRecord` / `unwrapUnlockRecord` / `remintUnlockRecordDelegations`
|
|
26
14
|
* -- the unlock record codec: the credential-authenticated shell-and-core
|
|
27
15
|
* layout (controller, email, pointer under the binding MAC; the bridge and
|
|
28
|
-
*
|
|
29
|
-
* seed sealed and carried verbatim
|
|
16
|
+
* client-annex Space `delegatedClients` delegations re-mintable; the ladder
|
|
17
|
+
* seed sealed and carried verbatim, its `LADDER_SEED_BYTES` size owned by
|
|
18
|
+
* the record format).
|
|
30
19
|
* - `publishUnlockKey` / `removeUnlockKey` -- the merged document posture
|
|
31
20
|
* edit, parameterized by credential class: a verbatim `keyAgreement` entry,
|
|
32
21
|
* or a `MultikeyCommitment` entry for a low-entropy-derived key.
|
|
33
22
|
* - `retireUnlockCredential` -- the retirement ceremony behind "change my
|
|
34
23
|
* passphrase" and "remove this passkey": the posture edit, then the shared
|
|
35
24
|
* roster rotation and collection fan-out off the retired credential's wrap.
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
25
|
+
*
|
|
26
|
+
* The ladder itself, and every ceremony that exercises it (the ladder-anchored
|
|
27
|
+
* genesis, self-enrollment, the forget ceremony), live in
|
|
28
|
+
* `@interop/wallet-core/clientAnnex` -- what stays here is the posture and
|
|
29
|
+
* record machinery every wallet needs regardless of posture.
|
|
39
30
|
*
|
|
40
31
|
* Kept out of the root export: this subpath pulls the webkms-client / ezcap /
|
|
41
32
|
* was-client dependency graph (the same isolation pattern as `./keyring`).
|
|
42
33
|
*/
|
|
43
34
|
export { standingClientFromUnlockSeed, STANDING_CLIENT_SALT, unlockClientIdentityFromSeed } from './standingClient.js';
|
|
44
35
|
export type { StandingUnlockClient, UnlockClientIdentity } from './standingClient.js';
|
|
45
|
-
export {
|
|
46
|
-
export type { LadderRung, LadderRungState } from './ladder.js';
|
|
47
|
-
export { computeUnlockBinding, remintUnlockRecordDelegations, UnlockBindingError, unlockRecordBinding, unwrapUnlockRecord, wrapUnlockRecord } from './unlockRecord.js';
|
|
36
|
+
export { computeUnlockBinding, LADDER_SEED_BYTES, remintUnlockRecordDelegations, UnlockBindingError, unlockRecordBinding, unwrapUnlockRecord, wrapUnlockRecord } from './unlockRecord.js';
|
|
48
37
|
export type { SealedRecordMember, SignedUnlockRecord, UnlockRecordContents, UnlockRecordProofState } from './unlockRecord.js';
|
|
49
|
-
export {
|
|
38
|
+
export { publishUnlockKey, removeUnlockKey, unlockKeyVerificationMethod, unlockKeyVmId } from './standingWebvh.js';
|
|
50
39
|
export type { StandingUnlockKeys, UnlockKeyAgreementPublication, UnlockLogStore } from './standingWebvh.js';
|
|
51
40
|
export { retireUnlockCredential } from './retire.js';
|
|
52
|
-
export type { UnlockCredentialRetirementResult } from './retire.js';
|
|
53
|
-
export { selfEnrollClientCore } from './selfEnroll.js';
|
|
41
|
+
export type { ClientAnnexPostureRetirement, UnlockCredentialRetirementResult } from './retire.js';
|
|
54
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/unlock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/unlock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACvB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,2BAA2B,EAC3B,aAAa,EACd,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EACV,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACf,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AACpD,YAAY,EACV,4BAA4B,EAC5B,gCAAgC,EACjC,MAAM,aAAa,CAAA"}
|
package/dist/unlock/index.js
CHANGED
|
@@ -10,40 +10,29 @@
|
|
|
10
10
|
* - `standingClientFromUnlockSeed` / `unlockClientIdentityFromSeed` -- the
|
|
11
11
|
* deterministic client identity a credential derives (roster wrap target,
|
|
12
12
|
* binding MAC key), shared with the recovery-code derivation.
|
|
13
|
-
* - `generateLadderSeed` / `ladderRung` / `attributeLadderRung` -- the
|
|
14
|
-
* update-key ladder: latent-and-consumed did:webvh update authority from a
|
|
15
|
-
* random seed carried in the unlock record, current rung recovered from the
|
|
16
|
-
* log itself, ambiguity failing closed. `ladderVmKeyMultibase` derives the
|
|
17
|
-
* ladder VM (the stable sibling), the document-visible key a client-less
|
|
18
|
-
* account anchors on.
|
|
19
|
-
* - `createClientlessAccountLog` -- the client-less genesis log: an account
|
|
20
|
-
* with zero enrolled durable clients, `updateKeys` = [rung 0], the ladder
|
|
21
|
-
* VM under `assertionMethod` and `capabilityDelegation` only, and the
|
|
22
|
-
* credential's `keyAgreement` posture folded into genesis. The window it
|
|
23
|
-
* opens is closed atomically by the first durable self-enrollment's add
|
|
24
|
-
* entry.
|
|
25
13
|
* - `wrapUnlockRecord` / `unwrapUnlockRecord` / `remintUnlockRecordDelegations`
|
|
26
14
|
* -- the unlock record codec: the credential-authenticated shell-and-core
|
|
27
15
|
* layout (controller, email, pointer under the binding MAC; the bridge and
|
|
28
|
-
*
|
|
29
|
-
* seed sealed and carried verbatim
|
|
16
|
+
* client-annex Space `delegatedClients` delegations re-mintable; the ladder
|
|
17
|
+
* seed sealed and carried verbatim, its `LADDER_SEED_BYTES` size owned by
|
|
18
|
+
* the record format).
|
|
30
19
|
* - `publishUnlockKey` / `removeUnlockKey` -- the merged document posture
|
|
31
20
|
* edit, parameterized by credential class: a verbatim `keyAgreement` entry,
|
|
32
21
|
* or a `MultikeyCommitment` entry for a low-entropy-derived key.
|
|
33
22
|
* - `retireUnlockCredential` -- the retirement ceremony behind "change my
|
|
34
23
|
* passphrase" and "remove this passkey": the posture edit, then the shared
|
|
35
24
|
* roster rotation and collection fan-out off the retired credential's wrap.
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
25
|
+
*
|
|
26
|
+
* The ladder itself, and every ceremony that exercises it (the ladder-anchored
|
|
27
|
+
* genesis, self-enrollment, the forget ceremony), live in
|
|
28
|
+
* `@interop/wallet-core/clientAnnex` -- what stays here is the posture and
|
|
29
|
+
* record machinery every wallet needs regardless of posture.
|
|
39
30
|
*
|
|
40
31
|
* Kept out of the root export: this subpath pulls the webkms-client / ezcap /
|
|
41
32
|
* was-client dependency graph (the same isolation pattern as `./keyring`).
|
|
42
33
|
*/
|
|
43
34
|
export { standingClientFromUnlockSeed, STANDING_CLIENT_SALT, unlockClientIdentityFromSeed } from './standingClient.js';
|
|
44
|
-
export {
|
|
45
|
-
export {
|
|
46
|
-
export { createClientlessAccountLog, publishUnlockKey, removeUnlockKey, selfEnrollWebvhClient, unlockKeyVerificationMethod, unlockKeyVmId } from './standingWebvh.js';
|
|
35
|
+
export { computeUnlockBinding, LADDER_SEED_BYTES, remintUnlockRecordDelegations, UnlockBindingError, unlockRecordBinding, unwrapUnlockRecord, wrapUnlockRecord } from './unlockRecord.js';
|
|
36
|
+
export { publishUnlockKey, removeUnlockKey, unlockKeyVerificationMethod, unlockKeyVmId } from './standingWebvh.js';
|
|
47
37
|
export { retireUnlockCredential } from './retire.js';
|
|
48
|
-
export { selfEnrollClientCore } from './selfEnroll.js';
|
|
49
38
|
//# sourceMappingURL=index.js.map
|
package/dist/unlock/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/unlock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/unlock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,qBAAqB,CAAA;AAM5B,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,EAC7B,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,mBAAmB,CAAA;AAQ1B,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,2BAA2B,EAC3B,aAAa,EACd,MAAM,oBAAoB,CAAA;AAO3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA"}
|