@interop/wallet-core 0.36.1 → 0.37.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,4 +1,4 @@
1
- import { WAS_RESOURCE_LOG_METHOD } from '@interop/was-client/log';
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: WAS_RESOURCE_LOG_METHOD,
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,uBAAuB,EAExB,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,uBAAuB;gBACvC,QAAQ,EAAE,WAAW,CAAC,YAAY,CAAC;aACpC,CAAC,CAAA;YACF,IA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BAClD,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;;;;;;;;;;;;;;;;;;;GAmBG;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"}
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"}
@@ -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;;;;;;;;;;;;;;;;;;;GAmBG;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"}
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,94 @@
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 exchange URL is read from the `Location` response header, falling back
52
+ * to the body's `location` member -- deployments differ on which they set,
53
+ * and either alone is enough.
54
+ *
55
+ * @param options {object}
56
+ * @param options.serverUrl {string} the configured WAS server base URL
57
+ * @param options.request {unknown} the VPR details to store
58
+ * @param [options.fetch] {FetchLike}
59
+ * @returns {Promise<{ exchangeUrl: string, interactionUrl: string }>}
60
+ */
61
+ export declare function createOnboardingExchange({ serverUrl, request, fetch: fetchImpl }: {
62
+ serverUrl: string;
63
+ request: unknown;
64
+ fetch?: FetchLike;
65
+ }): Promise<{
66
+ exchangeUrl: string;
67
+ interactionUrl: string;
68
+ }>;
69
+ /**
70
+ * INVITER: polls the exchange until the other wallet posts its response, and
71
+ * resolves with that response body verbatim (the caller's consent panel
72
+ * interprets it, typically through `parseOnboardingResponse`).
73
+ *
74
+ * A `404` means the exchange expired or was never there, and rejects with
75
+ * {@link OnboardingExchangeGoneError}. Every other failure -- a network
76
+ * error, another non-ok status, an unparseable body -- is transient and
77
+ * simply retried on the next tick. An aborted signal rejects promptly with
78
+ * the signal's reason, cancelling any in-flight request.
79
+ *
80
+ * @param options {object}
81
+ * @param options.exchangeUrl {string}
82
+ * @param [options.signal] {AbortSignal}
83
+ * @param [options.intervalMs] {number}
84
+ * @param [options.fetch] {FetchLike}
85
+ * @returns {Promise<unknown>} the completed exchange's `response` member
86
+ */
87
+ export declare function pollOnboardingExchange({ exchangeUrl, signal, intervalMs, fetch: fetchImpl }: {
88
+ exchangeUrl: string;
89
+ signal?: AbortSignal;
90
+ intervalMs?: number;
91
+ fetch?: FetchLike;
92
+ }): Promise<unknown>;
93
+ export {};
94
+ //# 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;;;;;;;;;;;;;;GAcG;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,CA4B3D;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,172 @@
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 exchange URL is read from the `Location` response header, falling back
61
+ * to the body's `location` member -- deployments differ on which they set,
62
+ * and either alone is enough.
63
+ *
64
+ * @param options {object}
65
+ * @param options.serverUrl {string} the configured WAS server base URL
66
+ * @param options.request {unknown} the VPR details to store
67
+ * @param [options.fetch] {FetchLike}
68
+ * @returns {Promise<{ exchangeUrl: string, interactionUrl: string }>}
69
+ */
70
+ export async function createOnboardingExchange({ serverUrl, request, fetch: fetchImpl = globalThis.fetch }) {
71
+ const url = `${normalizedServerUrl({ serverUrl })}/workflows/ephemeral/exchanges`;
72
+ const response = await fetchImpl(url, {
73
+ method: 'POST',
74
+ headers: { 'content-type': 'application/json' },
75
+ body: JSON.stringify({ request })
76
+ });
77
+ if (!response.ok) {
78
+ throw new Error(`Could not create the onboarding exchange (HTTP ${response.status}).`);
79
+ }
80
+ let exchangeUrl = response.headers?.get('location') ?? '';
81
+ if (!exchangeUrl) {
82
+ try {
83
+ const body = (await response.json());
84
+ exchangeUrl = body?.location ?? '';
85
+ }
86
+ catch (err) {
87
+ console.warn('Could not parse the created exchange body:', err);
88
+ }
89
+ }
90
+ if (!exchangeUrl) {
91
+ throw new Error('The created onboarding exchange has no location.');
92
+ }
93
+ return {
94
+ exchangeUrl,
95
+ interactionUrl: `${exchangeUrl}${ONBOARDING_INTERACTION_PATH}`
96
+ };
97
+ }
98
+ /**
99
+ * Sleeps for `delayMs`, rejecting promptly with the signal's reason if the
100
+ * caller aborts first. The timer is always cleared.
101
+ *
102
+ * @param options {object}
103
+ * @param options.delayMs {number}
104
+ * @param [options.signal] {AbortSignal}
105
+ * @returns {Promise<void>}
106
+ */
107
+ function abortableDelay({ delayMs, signal }) {
108
+ return new Promise((resolve, reject) => {
109
+ if (signal?.aborted) {
110
+ reject(signal.reason);
111
+ return;
112
+ }
113
+ const timer = setTimeout(() => {
114
+ signal?.removeEventListener('abort', onAbort);
115
+ resolve();
116
+ }, delayMs);
117
+ function onAbort() {
118
+ clearTimeout(timer);
119
+ reject(signal?.reason);
120
+ }
121
+ signal?.addEventListener('abort', onAbort, { once: true });
122
+ });
123
+ }
124
+ /**
125
+ * INVITER: polls the exchange until the other wallet posts its response, and
126
+ * resolves with that response body verbatim (the caller's consent panel
127
+ * interprets it, typically through `parseOnboardingResponse`).
128
+ *
129
+ * A `404` means the exchange expired or was never there, and rejects with
130
+ * {@link OnboardingExchangeGoneError}. Every other failure -- a network
131
+ * error, another non-ok status, an unparseable body -- is transient and
132
+ * simply retried on the next tick. An aborted signal rejects promptly with
133
+ * the signal's reason, cancelling any in-flight request.
134
+ *
135
+ * @param options {object}
136
+ * @param options.exchangeUrl {string}
137
+ * @param [options.signal] {AbortSignal}
138
+ * @param [options.intervalMs] {number}
139
+ * @param [options.fetch] {FetchLike}
140
+ * @returns {Promise<unknown>} the completed exchange's `response` member
141
+ */
142
+ export async function pollOnboardingExchange({ exchangeUrl, signal, intervalMs = ONBOARDING_POLL_INTERVAL_MS, fetch: fetchImpl = globalThis.fetch }) {
143
+ for (;;) {
144
+ if (signal?.aborted) {
145
+ throw signal.reason;
146
+ }
147
+ try {
148
+ const response = await fetchImpl(exchangeUrl, { signal });
149
+ if (response.status === 404) {
150
+ throw new OnboardingExchangeGoneError();
151
+ }
152
+ if (response.ok) {
153
+ const body = (await response.json());
154
+ if (body?.state === 'complete') {
155
+ return body.response;
156
+ }
157
+ }
158
+ }
159
+ catch (err) {
160
+ if (signal?.aborted) {
161
+ throw signal.reason;
162
+ }
163
+ if (err?.name === 'OnboardingExchangeGoneError') {
164
+ throw err;
165
+ }
166
+ // Anything else is transient -- keep polling.
167
+ console.warn('Polling the onboarding exchange failed; retrying:', err);
168
+ }
169
+ await abortableDelay({ delayMs: intervalMs, signal });
170
+ }
171
+ }
172
+ //# 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;;;;;;;;;;;;;;GAcG;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,GAAG,MAAM,SAAS,CAAC,GAAG,EAAE;QACpC,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;KAClC,CAAC,CAAA;IACF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE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C,CAAA;IACvD,CAAC;AACH,CAAC"}
@@ -1,4 +1,4 @@
1
- import { confirmAppend, WAS_RESOURCE_LOG_METHOD } from '@interop/was-client/log';
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: WAS_RESOURCE_LOG_METHOD,
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: WAS_RESOURCE_LOG_METHOD,
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: WAS_RESOURCE_LOG_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: WAS_RESOURCE_LOG_METHOD,
123
+ expectedMethod: RESOURCE_LOG_METHOD,
124
124
  pinStore,
125
125
  signer
126
126
  });
@@ -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E,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
- * (`WAS_RESOURCE_LOG_METHOD`)
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
- * (`WAS_RESOURCE_LOG_METHOD`)
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 (`WAS_RESOURCE_LOG_METHOD`; also confirmed against any `history`
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 (`WAS_RESOURCE_LOG_METHOD`; also confirmed against any `history`
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.36.1",
4
+ "version": "0.37.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.37.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",