@interop/wallet-core 0.36.1 → 0.38.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/dist/descriptors/logSource.js +2 -2
- package/dist/descriptors/logSource.js.map +1 -1
- package/dist/enrollment/index.d.ts +4 -0
- package/dist/enrollment/index.d.ts.map +1 -1
- package/dist/enrollment/index.js +4 -0
- package/dist/enrollment/index.js.map +1 -1
- package/dist/enrollment/onboardingInvite.d.ts +99 -0
- package/dist/enrollment/onboardingInvite.d.ts.map +1 -0
- package/dist/enrollment/onboardingInvite.js +179 -0
- package/dist/enrollment/onboardingInvite.js.map +1 -0
- package/dist/keys/rosterLogStore.js +5 -5
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/resourceLog/entry.d.ts +1 -1
- package/dist/resourceLog/entry.js +1 -1
- package/dist/resourceLog/verify.d.ts +1 -1
- package/dist/resourceLog/verify.js +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RESOURCE_LOG_METHOD } from '@interop/was-client/log';
|
|
2
2
|
import { readResourceLog, ResourceLogIntegrityError } from '../resourceLog/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* The state-document schema identifier an encryption descriptor carries in a
|
|
@@ -31,7 +31,7 @@ export function logGovernedDescriptorSource({ logFor, resolveController, pinStor
|
|
|
31
31
|
const current = await readResourceLog({
|
|
32
32
|
store: logFor(collectionId),
|
|
33
33
|
controller,
|
|
34
|
-
expectedMethod:
|
|
34
|
+
expectedMethod: RESOURCE_LOG_METHOD,
|
|
35
35
|
pinStore: pinStoreFor(collectionId)
|
|
36
36
|
});
|
|
37
37
|
if (current === null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logSource.js","sourceRoot":"","sources":["../../src/descriptors/logSource.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"logSource.js","sourceRoot":"","sources":["../../src/descriptors/logSource.ts"],"names":[],"mappings":"AAgBA,OAAO,EACL,mBAAmB,EAEpB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,eAAe,EACf,yBAAyB,EAG1B,MAAM,yBAAyB,CAAA;AAGhC;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,uBAAuB,CAAA;AAErE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,2BAA2B,CAAC,EAC1C,MAAM,EACN,iBAAiB,EACjB,WAAW,EAKZ;IACC,OAAO;QACL,KAAK,CAAC,oBAAoB,CAAC,EAAE,YAAY,EAAE;YACzC,MAAM,UAAU,GAAG,MAAM,iBAAiB,EAAE,CAAA;YAC5C,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC;gBACpC,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC;gBAC3B,UAAU;gBACV,cAAc,EAAE,mBAAmB;gBACnC,QAAQ,EAAE,WAAW,CAAC,YAAY,CAAC;aACpC,CAAC,CAAA;YACF,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;gBACrB,OAAO,SAAS,CAAA;YAClB,CAAC;YACD,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAA;YACpC,IAAI,KAAK,CAAC,IAAI,KAAK,8BAA8B,EAAE,CAAC;gBAClD,MAAM,IAAI,yBAAyB,CACjC,oDAAoD;oBAClD,IAAI,KAAK,CAAC,IAAI,WAAW,8BAA8B,IAAI,CAC9D,CAAA;YACH,CAAC;YACD,OAAO,KAA6B,CAAA;QACtC,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
* response envelope, the transport that carries a connect code (verbatim)
|
|
18
18
|
* plus a suggested display label back over an exchange whose request asked
|
|
19
19
|
* with a `WalletOnboardingQuery` (`@interop/wallet-core/request`).
|
|
20
|
+
* - `createOnboardingExchange` / `pollOnboardingExchange` -- the inviter's
|
|
21
|
+
* transport for that same exchange: creating the ephemeral exchange that
|
|
22
|
+
* carries the query, and polling it until the response envelope arrives.
|
|
20
23
|
* - `completeEnrollmentCore` -- the enrollee's half: verify from the published
|
|
21
24
|
* log, read the roster, hand back the user key and the epoch to pin. Persisting
|
|
22
25
|
* the key set stays with the caller's own unlock layer.
|
|
@@ -26,4 +29,5 @@ export type { EnrollmentRequest } from './enrollment.js';
|
|
|
26
29
|
export { CONNECT_CODE_PREFIX, isConnectCode } from './connectCode.js';
|
|
27
30
|
export { encodeOnboardingResponse, ONBOARDING_LABEL_MAX_LENGTH, ONBOARDING_RESPONSE_VERSION, parseOnboardingResponse } from './onboardingResponse.js';
|
|
28
31
|
export type { WalletOnboardingResponse } from './onboardingResponse.js';
|
|
32
|
+
export { createOnboardingExchange, ONBOARDING_INTERACTION_PATH, ONBOARDING_INVITE_TTL_MS, ONBOARDING_POLL_INTERVAL_MS, OnboardingExchangeGoneError, pollOnboardingExchange } from './onboardingInvite.js';
|
|
29
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enrollment/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enrollment/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iBAAiB,CAAA;AACxB,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,yBAAyB,CAAA;AAChC,YAAY,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AACvE,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACvB,MAAM,uBAAuB,CAAA"}
|
package/dist/enrollment/index.js
CHANGED
|
@@ -17,6 +17,9 @@
|
|
|
17
17
|
* response envelope, the transport that carries a connect code (verbatim)
|
|
18
18
|
* plus a suggested display label back over an exchange whose request asked
|
|
19
19
|
* with a `WalletOnboardingQuery` (`@interop/wallet-core/request`).
|
|
20
|
+
* - `createOnboardingExchange` / `pollOnboardingExchange` -- the inviter's
|
|
21
|
+
* transport for that same exchange: creating the ephemeral exchange that
|
|
22
|
+
* carries the query, and polling it until the response envelope arrives.
|
|
20
23
|
* - `completeEnrollmentCore` -- the enrollee's half: verify from the published
|
|
21
24
|
* log, read the roster, hand back the user key and the epoch to pin. Persisting
|
|
22
25
|
* the key set stays with the caller's own unlock layer.
|
|
@@ -24,4 +27,5 @@
|
|
|
24
27
|
export { approveEnrollment, completeEnrollmentCore, encodeEnrollmentRequest, EnrollmentPendingError, enrollmentClientDid, enrollmentRecipientKid, mintEnrollmentRequest, parseEnrollmentRequest } from './enrollment.js';
|
|
25
28
|
export { CONNECT_CODE_PREFIX, isConnectCode } from './connectCode.js';
|
|
26
29
|
export { encodeOnboardingResponse, ONBOARDING_LABEL_MAX_LENGTH, ONBOARDING_RESPONSE_VERSION, parseOnboardingResponse } from './onboardingResponse.js';
|
|
30
|
+
export { createOnboardingExchange, ONBOARDING_INTERACTION_PATH, ONBOARDING_INVITE_TTL_MS, ONBOARDING_POLL_INTERVAL_MS, OnboardingExchangeGoneError, pollOnboardingExchange } from './onboardingInvite.js';
|
|
27
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enrollment/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/enrollment/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACvB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrE,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,uBAAuB,EACxB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EACL,wBAAwB,EACxB,2BAA2B,EAC3B,wBAAwB,EACxB,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACvB,MAAM,uBAAuB,CAAA"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The inviter's half of the wallet-onboarding invite: creating an ephemeral
|
|
6
|
+
* exchange on the WAS server that carries a `WalletOnboardingQuery`
|
|
7
|
+
* (`@interop/wallet-core/request`) as its stored request, and polling that
|
|
8
|
+
* exchange until the other wallet posts its response envelope
|
|
9
|
+
* (`onboardingResponse.ts`). Pure logic -- no UI framework, no DOM, and no
|
|
10
|
+
* module-level mutable state: every run is per-instance, cancelled through the
|
|
11
|
+
* caller's `AbortSignal`, with the network transport injected.
|
|
12
|
+
*
|
|
13
|
+
* These routes are deliberately unauthenticated (a capability-URL posture: the
|
|
14
|
+
* exchange URL is the secret, and it travels point-to-point through the QR
|
|
15
|
+
* code), so nothing here signs a request.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* How often the inviter polls the exchange for the enrollee's response.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ONBOARDING_POLL_INTERVAL_MS = 3000;
|
|
21
|
+
/**
|
|
22
|
+
* How long an invite is offered for, comfortably inside the server's
|
|
23
|
+
* ten-minute exchange TTL so the countdown expires before the server does.
|
|
24
|
+
*/
|
|
25
|
+
export declare const ONBOARDING_INVITE_TTL_MS: number;
|
|
26
|
+
/**
|
|
27
|
+
* The exchange path the interaction URL adds, with the interaction-URL
|
|
28
|
+
* version query the other wallet's scanner expects.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ONBOARDING_INTERACTION_PATH = "/protocols?iuv=1";
|
|
31
|
+
/**
|
|
32
|
+
* The subset of `fetch` this module uses, so a caller (or a test) injects its
|
|
33
|
+
* own transport instead of relying on the global.
|
|
34
|
+
*/
|
|
35
|
+
type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
|
|
36
|
+
/**
|
|
37
|
+
* Raised when the exchange is no longer on the server (a `404`): it either
|
|
38
|
+
* expired or was never created. The remedy is a fresh invite, so a caller
|
|
39
|
+
* renders its "code expired" state. Dispatch on `err.name` rather than
|
|
40
|
+
* `instanceof`: the transport is injected and may resolve to a different copy
|
|
41
|
+
* of this package, which makes the name the stable contract.
|
|
42
|
+
*/
|
|
43
|
+
export declare class OnboardingExchangeGoneError extends Error {
|
|
44
|
+
constructor(message?: string);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* INVITER: creates an ephemeral exchange holding the onboarding request as its
|
|
48
|
+
* stored request, and returns both the exchange URL (the inviter polls it) and
|
|
49
|
+
* the interaction URL (the QR code carries it).
|
|
50
|
+
*
|
|
51
|
+
* The server relays the stored request verbatim as its reply to the begin
|
|
52
|
+
* POST, so the VPR details are stored wrapped as a VC-API exchange response
|
|
53
|
+
* (`{ verifiablePresentationRequest: request }`) -- the shape the joining
|
|
54
|
+
* wallet's classifier reads.
|
|
55
|
+
*
|
|
56
|
+
* The exchange URL is read from the `Location` response header, falling back
|
|
57
|
+
* to the body's `location` member -- deployments differ on which they set,
|
|
58
|
+
* and either alone is enough.
|
|
59
|
+
*
|
|
60
|
+
* @param options {object}
|
|
61
|
+
* @param options.serverUrl {string} the configured WAS server base URL
|
|
62
|
+
* @param options.request {unknown} the VPR details to store
|
|
63
|
+
* @param [options.fetch] {FetchLike}
|
|
64
|
+
* @returns {Promise<{ exchangeUrl: string, interactionUrl: string }>}
|
|
65
|
+
*/
|
|
66
|
+
export declare function createOnboardingExchange({ serverUrl, request, fetch: fetchImpl }: {
|
|
67
|
+
serverUrl: string;
|
|
68
|
+
request: unknown;
|
|
69
|
+
fetch?: FetchLike;
|
|
70
|
+
}): Promise<{
|
|
71
|
+
exchangeUrl: string;
|
|
72
|
+
interactionUrl: string;
|
|
73
|
+
}>;
|
|
74
|
+
/**
|
|
75
|
+
* INVITER: polls the exchange until the other wallet posts its response, and
|
|
76
|
+
* resolves with that response body verbatim (the caller's consent panel
|
|
77
|
+
* interprets it, typically through `parseOnboardingResponse`).
|
|
78
|
+
*
|
|
79
|
+
* A `404` means the exchange expired or was never there, and rejects with
|
|
80
|
+
* {@link OnboardingExchangeGoneError}. Every other failure -- a network
|
|
81
|
+
* error, another non-ok status, an unparseable body -- is transient and
|
|
82
|
+
* simply retried on the next tick. An aborted signal rejects promptly with
|
|
83
|
+
* the signal's reason, cancelling any in-flight request.
|
|
84
|
+
*
|
|
85
|
+
* @param options {object}
|
|
86
|
+
* @param options.exchangeUrl {string}
|
|
87
|
+
* @param [options.signal] {AbortSignal}
|
|
88
|
+
* @param [options.intervalMs] {number}
|
|
89
|
+
* @param [options.fetch] {FetchLike}
|
|
90
|
+
* @returns {Promise<unknown>} the completed exchange's `response` member
|
|
91
|
+
*/
|
|
92
|
+
export declare function pollOnboardingExchange({ exchangeUrl, signal, intervalMs, fetch: fetchImpl }: {
|
|
93
|
+
exchangeUrl: string;
|
|
94
|
+
signal?: AbortSignal;
|
|
95
|
+
intervalMs?: number;
|
|
96
|
+
fetch?: FetchLike;
|
|
97
|
+
}): Promise<unknown>;
|
|
98
|
+
export {};
|
|
99
|
+
//# sourceMappingURL=onboardingInvite.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboardingInvite.d.ts","sourceRoot":"","sources":["../../src/enrollment/onboardingInvite.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;GAYG;AAEH;;GAEG;AACH,eAAO,MAAM,2BAA2B,OAAO,CAAA;AAE/C;;;GAGG;AACH,eAAO,MAAM,wBAAwB,QAAgB,CAAA;AAErD;;;GAGG;AACH,eAAO,MAAM,2BAA2B,qBAAqB,CAAA;AAE7D;;;GAGG;AACH,KAAK,SAAS,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAEzE;;;;;;GAMG;AACH,qBAAa,2BAA4B,SAAQ,KAAK;gBACxC,OAAO,SAAoD;CAIxE;AAcD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,wBAAwB,CAAC,EAC7C,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;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,sBAAsB,CAAC,EAC3C,WAAW,EACX,MAAM,EACN,UAAwC,EACxC,KAAK,EAAE,SAA4B,EACpC,EAAE;IACD,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB,GAAG,OAAO,CAAC,OAAO,CAAC,CA+BnB"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The inviter's half of the wallet-onboarding invite: creating an ephemeral
|
|
6
|
+
* exchange on the WAS server that carries a `WalletOnboardingQuery`
|
|
7
|
+
* (`@interop/wallet-core/request`) as its stored request, and polling that
|
|
8
|
+
* exchange until the other wallet posts its response envelope
|
|
9
|
+
* (`onboardingResponse.ts`). Pure logic -- no UI framework, no DOM, and no
|
|
10
|
+
* module-level mutable state: every run is per-instance, cancelled through the
|
|
11
|
+
* caller's `AbortSignal`, with the network transport injected.
|
|
12
|
+
*
|
|
13
|
+
* These routes are deliberately unauthenticated (a capability-URL posture: the
|
|
14
|
+
* exchange URL is the secret, and it travels point-to-point through the QR
|
|
15
|
+
* code), so nothing here signs a request.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* How often the inviter polls the exchange for the enrollee's response.
|
|
19
|
+
*/
|
|
20
|
+
export const ONBOARDING_POLL_INTERVAL_MS = 3000;
|
|
21
|
+
/**
|
|
22
|
+
* How long an invite is offered for, comfortably inside the server's
|
|
23
|
+
* ten-minute exchange TTL so the countdown expires before the server does.
|
|
24
|
+
*/
|
|
25
|
+
export const ONBOARDING_INVITE_TTL_MS = 5 * 60 * 1000;
|
|
26
|
+
/**
|
|
27
|
+
* The exchange path the interaction URL adds, with the interaction-URL
|
|
28
|
+
* version query the other wallet's scanner expects.
|
|
29
|
+
*/
|
|
30
|
+
export const ONBOARDING_INTERACTION_PATH = '/protocols?iuv=1';
|
|
31
|
+
/**
|
|
32
|
+
* Raised when the exchange is no longer on the server (a `404`): it either
|
|
33
|
+
* expired or was never created. The remedy is a fresh invite, so a caller
|
|
34
|
+
* renders its "code expired" state. Dispatch on `err.name` rather than
|
|
35
|
+
* `instanceof`: the transport is injected and may resolve to a different copy
|
|
36
|
+
* of this package, which makes the name the stable contract.
|
|
37
|
+
*/
|
|
38
|
+
export class OnboardingExchangeGoneError extends Error {
|
|
39
|
+
constructor(message = 'The onboarding exchange is no longer available.') {
|
|
40
|
+
super(message);
|
|
41
|
+
this.name = 'OnboardingExchangeGoneError';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Strips a trailing slash from a configured base URL, so joining a path onto
|
|
46
|
+
* it cannot produce a doubled separator.
|
|
47
|
+
*
|
|
48
|
+
* @param options {object}
|
|
49
|
+
* @param options.serverUrl {string}
|
|
50
|
+
* @returns {string}
|
|
51
|
+
*/
|
|
52
|
+
function normalizedServerUrl({ serverUrl }) {
|
|
53
|
+
return serverUrl.replace(/\/+$/, '');
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* INVITER: creates an ephemeral exchange holding the onboarding request as its
|
|
57
|
+
* stored request, and returns both the exchange URL (the inviter polls it) and
|
|
58
|
+
* the interaction URL (the QR code carries it).
|
|
59
|
+
*
|
|
60
|
+
* The server relays the stored request verbatim as its reply to the begin
|
|
61
|
+
* POST, so the VPR details are stored wrapped as a VC-API exchange response
|
|
62
|
+
* (`{ verifiablePresentationRequest: request }`) -- the shape the joining
|
|
63
|
+
* wallet's classifier reads.
|
|
64
|
+
*
|
|
65
|
+
* The exchange URL is read from the `Location` response header, falling back
|
|
66
|
+
* to the body's `location` member -- deployments differ on which they set,
|
|
67
|
+
* and either alone is enough.
|
|
68
|
+
*
|
|
69
|
+
* @param options {object}
|
|
70
|
+
* @param options.serverUrl {string} the configured WAS server base URL
|
|
71
|
+
* @param options.request {unknown} the VPR details to store
|
|
72
|
+
* @param [options.fetch] {FetchLike}
|
|
73
|
+
* @returns {Promise<{ exchangeUrl: string, interactionUrl: string }>}
|
|
74
|
+
*/
|
|
75
|
+
export async function createOnboardingExchange({ serverUrl, request, fetch: fetchImpl = globalThis.fetch }) {
|
|
76
|
+
const url = `${normalizedServerUrl({ serverUrl })}/workflows/ephemeral/exchanges`;
|
|
77
|
+
const response = await fetchImpl(url, {
|
|
78
|
+
method: 'POST',
|
|
79
|
+
headers: { 'content-type': 'application/json' },
|
|
80
|
+
body: JSON.stringify({
|
|
81
|
+
request: { verifiablePresentationRequest: request }
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
if (!response.ok) {
|
|
85
|
+
throw new Error(`Could not create the onboarding exchange (HTTP ${response.status}).`);
|
|
86
|
+
}
|
|
87
|
+
let exchangeUrl = response.headers?.get('location') ?? '';
|
|
88
|
+
if (!exchangeUrl) {
|
|
89
|
+
try {
|
|
90
|
+
const body = (await response.json());
|
|
91
|
+
exchangeUrl = body?.location ?? '';
|
|
92
|
+
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
console.warn('Could not parse the created exchange body:', err);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
if (!exchangeUrl) {
|
|
98
|
+
throw new Error('The created onboarding exchange has no location.');
|
|
99
|
+
}
|
|
100
|
+
return {
|
|
101
|
+
exchangeUrl,
|
|
102
|
+
interactionUrl: `${exchangeUrl}${ONBOARDING_INTERACTION_PATH}`
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Sleeps for `delayMs`, rejecting promptly with the signal's reason if the
|
|
107
|
+
* caller aborts first. The timer is always cleared.
|
|
108
|
+
*
|
|
109
|
+
* @param options {object}
|
|
110
|
+
* @param options.delayMs {number}
|
|
111
|
+
* @param [options.signal] {AbortSignal}
|
|
112
|
+
* @returns {Promise<void>}
|
|
113
|
+
*/
|
|
114
|
+
function abortableDelay({ delayMs, signal }) {
|
|
115
|
+
return new Promise((resolve, reject) => {
|
|
116
|
+
if (signal?.aborted) {
|
|
117
|
+
reject(signal.reason);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const timer = setTimeout(() => {
|
|
121
|
+
signal?.removeEventListener('abort', onAbort);
|
|
122
|
+
resolve();
|
|
123
|
+
}, delayMs);
|
|
124
|
+
function onAbort() {
|
|
125
|
+
clearTimeout(timer);
|
|
126
|
+
reject(signal?.reason);
|
|
127
|
+
}
|
|
128
|
+
signal?.addEventListener('abort', onAbort, { once: true });
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* INVITER: polls the exchange until the other wallet posts its response, and
|
|
133
|
+
* resolves with that response body verbatim (the caller's consent panel
|
|
134
|
+
* interprets it, typically through `parseOnboardingResponse`).
|
|
135
|
+
*
|
|
136
|
+
* A `404` means the exchange expired or was never there, and rejects with
|
|
137
|
+
* {@link OnboardingExchangeGoneError}. Every other failure -- a network
|
|
138
|
+
* error, another non-ok status, an unparseable body -- is transient and
|
|
139
|
+
* simply retried on the next tick. An aborted signal rejects promptly with
|
|
140
|
+
* the signal's reason, cancelling any in-flight request.
|
|
141
|
+
*
|
|
142
|
+
* @param options {object}
|
|
143
|
+
* @param options.exchangeUrl {string}
|
|
144
|
+
* @param [options.signal] {AbortSignal}
|
|
145
|
+
* @param [options.intervalMs] {number}
|
|
146
|
+
* @param [options.fetch] {FetchLike}
|
|
147
|
+
* @returns {Promise<unknown>} the completed exchange's `response` member
|
|
148
|
+
*/
|
|
149
|
+
export async function pollOnboardingExchange({ exchangeUrl, signal, intervalMs = ONBOARDING_POLL_INTERVAL_MS, fetch: fetchImpl = globalThis.fetch }) {
|
|
150
|
+
for (;;) {
|
|
151
|
+
if (signal?.aborted) {
|
|
152
|
+
throw signal.reason;
|
|
153
|
+
}
|
|
154
|
+
try {
|
|
155
|
+
const response = await fetchImpl(exchangeUrl, { signal });
|
|
156
|
+
if (response.status === 404) {
|
|
157
|
+
throw new OnboardingExchangeGoneError();
|
|
158
|
+
}
|
|
159
|
+
if (response.ok) {
|
|
160
|
+
const body = (await response.json());
|
|
161
|
+
if (body?.state === 'complete') {
|
|
162
|
+
return body.response;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
catch (err) {
|
|
167
|
+
if (signal?.aborted) {
|
|
168
|
+
throw signal.reason;
|
|
169
|
+
}
|
|
170
|
+
if (err?.name === 'OnboardingExchangeGoneError') {
|
|
171
|
+
throw err;
|
|
172
|
+
}
|
|
173
|
+
// Anything else is transient -- keep polling.
|
|
174
|
+
console.warn('Polling the onboarding exchange failed; retrying:', err);
|
|
175
|
+
}
|
|
176
|
+
await abortableDelay({ delayMs: intervalMs, signal });
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=onboardingInvite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"onboardingInvite.js","sourceRoot":"","sources":["../../src/enrollment/onboardingInvite.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;GAYG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,CAAA;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAA;AAErD;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,kBAAkB,CAAA;AAQ7D;;;;;;GAMG;AACH,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IACpD,YAAY,OAAO,GAAG,iDAAiD;QACrE,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAA;IAC3C,CAAC;CACF;AAED;;;;;;;GAOG;AACH,SAAS,mBAAmB,CAAC,EAAE,SAAS,EAAyB;IAC/D,OAAO,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;AACtC,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,EAC7C,SAAS,EACT,OAAO,EACP,KAAK,EAAE,SAAS,GAAG,UAAU,CAAC,KAAK,EAKpC;IACC,MAAM,GAAG,GAAG,GAAG,mBAAmB,CAAC,EAAE,SAAS,EAAE,CAAC,gCAAgC,CAAA;IACjF,MAAM,QAAQ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MAAM,CAAA;YACrB,CAAC;YACD,IAAK,GAAa,EAAE,IAAI,KAAK,6BAA6B,EAAE,CAAC;gBAC3D,MAAM,GAAG,CAAA;YACX,CAAC;YACD,8CAA8C;YAC9C,OAAO,CAAC,IAAI,CAAC,mDAAmD,EAAE,GAAG,CAAC,CAAA;QACxE,CAAC;QACD,MAAM,cAAc,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,CAAA;IACvD,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { confirmAppend,
|
|
1
|
+
import { confirmAppend, RESOURCE_LOG_METHOD } from '@interop/was-client/log';
|
|
2
2
|
import { buildResourceLogEntry, buildResourceLogGenesis, readResourceLog, ResourceLogClosedError, ResourceLogIntegrityError, sealResourceLog, verifyResourceLog } from '../resourceLog/index.js';
|
|
3
3
|
import { EPOCH_CONFIGURATION_STATE_TYPE } from '../descriptors/logSource.js';
|
|
4
4
|
export { EPOCH_CONFIGURATION_STATE_TYPE };
|
|
@@ -48,7 +48,7 @@ export function logGovernedDescriptorStore({ log, resolveController, pinStore, s
|
|
|
48
48
|
const confirmed = await verifyResourceLog({
|
|
49
49
|
entries: readBack.entries,
|
|
50
50
|
controller,
|
|
51
|
-
expectedMethod:
|
|
51
|
+
expectedMethod: RESOURCE_LOG_METHOD,
|
|
52
52
|
pin: await pinStore.read()
|
|
53
53
|
});
|
|
54
54
|
await pinStore.write(confirmed.pin);
|
|
@@ -60,7 +60,7 @@ export function logGovernedDescriptorStore({ log, resolveController, pinStore, s
|
|
|
60
60
|
const current = await readResourceLog({
|
|
61
61
|
store: log,
|
|
62
62
|
controller,
|
|
63
|
-
expectedMethod:
|
|
63
|
+
expectedMethod: RESOURCE_LOG_METHOD,
|
|
64
64
|
pinStore
|
|
65
65
|
});
|
|
66
66
|
if (current === null) {
|
|
@@ -106,7 +106,7 @@ export function logGovernedDescriptorStore({ log, resolveController, pinStore, s
|
|
|
106
106
|
const controller = await resolveController();
|
|
107
107
|
const genesis = await buildResourceLogGenesis({
|
|
108
108
|
state: toState(descriptor),
|
|
109
|
-
method:
|
|
109
|
+
method: RESOURCE_LOG_METHOD,
|
|
110
110
|
controller,
|
|
111
111
|
signer
|
|
112
112
|
});
|
|
@@ -120,7 +120,7 @@ export function logGovernedDescriptorStore({ log, resolveController, pinStore, s
|
|
|
120
120
|
const { sealed, verified } = await sealResourceLog({
|
|
121
121
|
store: log,
|
|
122
122
|
controller,
|
|
123
|
-
expectedMethod:
|
|
123
|
+
expectedMethod: RESOURCE_LOG_METHOD,
|
|
124
124
|
pinStore,
|
|
125
125
|
signer
|
|
126
126
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterLogStore.js","sourceRoot":"","sources":["../../src/keys/rosterLogStore.ts"],"names":[],"mappings":"AA6BA,OAAO,EACL,aAAa,EACb,
|
|
1
|
+
{"version":3,"file":"rosterLogStore.js","sourceRoot":"","sources":["../../src/keys/rosterLogStore.ts"],"names":[],"mappings":"AA6BA,OAAO,EACL,aAAa,EACb,mBAAmB,EAEpB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,eAAe,EACf,sBAAsB,EACtB,yBAAyB,EACzB,eAAe,EACf,iBAAiB,EAKlB,MAAM,yBAAyB,CAAA;AAChC,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAA;AAE5E,OAAO,EAAE,8BAA8B,EAAE,CAAA;AAezC;;;;;;;;GAQG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAAgC;IAEhC,OAAO,CACL,OAAQ,KAAoD,CAAC,IAAI;QACjE,UAAU,CACX,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,0BAA0B,CAAC,EACzC,GAAG,EACH,iBAAiB,EACjB,QAAQ,EACR,MAAM,EAMP;IACC,4EAA4E;IAC5E,2EAA2E;IAC3E,oDAAoD;IAC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;aACP,CAAC,CAAA;YACF,qEAAqE;YACrE,6DAA6D;YAC7D,MAAM,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;YACzB,MAAM,MAAM,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAA;QAC9C,CAAC;QAED,KAAK,CAAC,IAAI;YACR,MAAM,UAAU,GAAG,MAAM,iBAAiB,EAAE,CAAA;YAC5C,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,eAAe,CAAC;gBACjD,KAAK,EAAE,GAAG;gBACV,UAAU;gBACV,cAAc,EAAE,mBAAmB;gBACnC,QAAQ;gBACR,MAAM;aACP,CAAC,CAAA;YACF,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;gBACtB,YAAY,GAAG,QAAQ,CAAA;YACzB,CAAC;YACD,OAAO,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAA;QACnC,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -24,7 +24,7 @@ export interface ResourceLogSigner {
|
|
|
24
24
|
* @param options.state {ResourceLogEntry['state']} the full initial state
|
|
25
25
|
* (with its `type`)
|
|
26
26
|
* @param options.method {string} the format identifier
|
|
27
|
-
* (`
|
|
27
|
+
* (`RESOURCE_LOG_METHOD`)
|
|
28
28
|
* @param options.controller {ResourceLogController} the verified controller
|
|
29
29
|
* view -- the anchor source
|
|
30
30
|
* @param options.signer {ResourceLogSigner}
|
|
@@ -78,7 +78,7 @@ async function signEntry({ entry, signer, verificationMethod, created }) {
|
|
|
78
78
|
* @param options.state {ResourceLogEntry['state']} the full initial state
|
|
79
79
|
* (with its `type`)
|
|
80
80
|
* @param options.method {string} the format identifier
|
|
81
|
-
* (`
|
|
81
|
+
* (`RESOURCE_LOG_METHOD`)
|
|
82
82
|
* @param options.controller {ResourceLogController} the verified controller
|
|
83
83
|
* view -- the anchor source
|
|
84
84
|
* @param options.signer {ResourceLogSigner}
|
|
@@ -59,7 +59,7 @@ export declare function isTerminalResourceLogEntry(entry: ResourceLogEntry): boo
|
|
|
59
59
|
* @param options.controller {ResourceLogController} the verified controller
|
|
60
60
|
* view ({@link webvhResourceLogController})
|
|
61
61
|
* @param options.expectedMethod {string} the format identifier this caller
|
|
62
|
-
* expects (`
|
|
62
|
+
* expects (`RESOURCE_LOG_METHOD`; also confirmed against any `history`
|
|
63
63
|
* dispatch hint the caller followed)
|
|
64
64
|
* @param [options.pin] {ResourceLogHeadPin} the held chain-head pin, when
|
|
65
65
|
* this client has verified the log before
|
|
@@ -232,7 +232,7 @@ function parseAnchoredVm(verificationMethod, ordinal) {
|
|
|
232
232
|
* @param options.controller {ResourceLogController} the verified controller
|
|
233
233
|
* view ({@link webvhResourceLogController})
|
|
234
234
|
* @param options.expectedMethod {string} the format identifier this caller
|
|
235
|
-
* expects (`
|
|
235
|
+
* expects (`RESOURCE_LOG_METHOD`; also confirmed against any `history`
|
|
236
236
|
* dispatch hint the caller followed)
|
|
237
237
|
* @param [options.pin] {ResourceLogHeadPin} the held chain-head pin, when
|
|
238
238
|
* this client has verified the log before
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interop/wallet-core",
|
|
3
3
|
"description": "Shared wallet-domain logic (WAS sync engine core and wallet Space layout contracts) for Interop wallet apps.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.38.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "pnpm run clear && tsc",
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"@interop/security-document-loader": "^10.0.0",
|
|
142
142
|
"@interop/social-core": "^0.8.0",
|
|
143
143
|
"@interop/vc": "^11.0.6",
|
|
144
|
-
"@interop/was-client": "^0.
|
|
144
|
+
"@interop/was-client": "^0.38.0",
|
|
145
145
|
"@interop/webkms-client": "^14.7.1",
|
|
146
146
|
"@interop/x25519-key-agreement-key": "^5.2.1",
|
|
147
147
|
"@noble/hashes": "^2.3.0",
|