@interop/wallet-core 0.85.0 → 0.87.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/ceremonyEvents.d.ts +116 -0
- package/dist/ceremonyEvents.d.ts.map +1 -0
- package/dist/ceremonyEvents.js +282 -0
- package/dist/ceremonyEvents.js.map +1 -0
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +17 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.js +45 -3
- package/dist/clientAnnex/credentialAnchoredGenesis.js.map +1 -1
- package/dist/clientAnnex/establish.d.ts +22 -0
- package/dist/clientAnnex/establish.d.ts.map +1 -1
- package/dist/clientAnnex/establish.js +67 -7
- package/dist/clientAnnex/establish.js.map +1 -1
- package/dist/clientAnnex/forget.d.ts +35 -2
- package/dist/clientAnnex/forget.d.ts.map +1 -1
- package/dist/clientAnnex/forget.js +85 -8
- package/dist/clientAnnex/forget.js.map +1 -1
- package/dist/clientAnnex/forgetLast.d.ts +26 -2
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +82 -2
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/index.d.ts +6 -5
- package/dist/clientAnnex/index.d.ts.map +1 -1
- package/dist/clientAnnex/index.js +3 -3
- package/dist/clientAnnex/index.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts +7 -4
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +11 -5
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +15 -4
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/selfEnroll.d.ts +23 -1
- package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
- package/dist/clientAnnex/selfEnroll.js +45 -1
- package/dist/clientAnnex/selfEnroll.js.map +1 -1
- package/dist/clients/index.d.ts +2 -2
- package/dist/clients/index.d.ts.map +1 -1
- package/dist/clients/index.js +1 -1
- package/dist/clients/index.js.map +1 -1
- package/dist/clients/revocation.d.ts +20 -1
- package/dist/clients/revocation.d.ts.map +1 -1
- package/dist/clients/revocation.js +76 -1
- package/dist/clients/revocation.js.map +1 -1
- package/dist/enrollment/enrollment.d.ts +23 -2
- package/dist/enrollment/enrollment.d.ts.map +1 -1
- package/dist/enrollment/enrollment.js +75 -4
- package/dist/enrollment/enrollment.js.map +1 -1
- package/dist/enrollment/index.d.ts +2 -2
- package/dist/enrollment/index.d.ts.map +1 -1
- package/dist/enrollment/index.js +1 -1
- package/dist/enrollment/index.js.map +1 -1
- package/dist/enrollment/onboardingResponse.d.ts +26 -5
- package/dist/enrollment/onboardingResponse.d.ts.map +1 -1
- package/dist/enrollment/onboardingResponse.js +2 -14
- package/dist/enrollment/onboardingResponse.js.map +1 -1
- package/dist/errorName.d.ts +19 -0
- package/dist/errorName.d.ts.map +1 -0
- package/dist/errorName.js +27 -0
- package/dist/errorName.js.map +1 -0
- package/dist/genesis/accountGenesis.d.ts +27 -1
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/genesis/accountGenesis.js +60 -2
- package/dist/genesis/accountGenesis.js.map +1 -1
- package/dist/genesis/index.d.ts +2 -2
- package/dist/genesis/index.d.ts.map +1 -1
- package/dist/genesis/index.js +1 -1
- package/dist/genesis/index.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/labelText.d.ts +24 -0
- package/dist/labelText.d.ts.map +1 -0
- package/dist/labelText.js +26 -0
- package/dist/labelText.js.map +1 -0
- package/dist/log.d.ts +6 -4
- package/dist/log.d.ts.map +1 -1
- package/dist/log.js +8 -5
- package/dist/log.js.map +1 -1
- package/dist/menders/ids.d.ts +4 -1
- package/dist/menders/ids.d.ts.map +1 -1
- package/dist/menders/ids.js +4 -1
- package/dist/menders/ids.js.map +1 -1
- package/dist/menders/index.d.ts +2 -1
- package/dist/menders/index.d.ts.map +1 -1
- package/dist/menders/index.js +2 -1
- package/dist/menders/index.js.map +1 -1
- package/dist/menders/runner.d.ts +5 -24
- package/dist/menders/runner.d.ts.map +1 -1
- package/dist/menders/runner.js +25 -18
- package/dist/menders/runner.js.map +1 -1
- package/dist/menders/vocabulary.d.ts +3 -1
- package/dist/menders/vocabulary.d.ts.map +1 -1
- package/dist/menders/vocabulary.js +3 -1
- package/dist/menders/vocabulary.js.map +1 -1
- package/dist/recovery/continuation.d.ts +40 -1
- package/dist/recovery/continuation.d.ts.map +1 -1
- package/dist/recovery/continuation.js +48 -1
- package/dist/recovery/continuation.js.map +1 -1
- package/dist/recovery/index.d.ts +2 -2
- package/dist/recovery/index.d.ts.map +1 -1
- package/dist/recovery/index.js +1 -1
- package/dist/recovery/index.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +21 -2
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +88 -31
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/space/ceremony.d.ts +11 -5
- package/dist/space/ceremony.d.ts.map +1 -1
- package/dist/space/ceremony.js +15 -5
- package/dist/space/ceremony.js.map +1 -1
- package/dist/space/index.d.ts +2 -2
- package/dist/space/index.js +2 -2
- package/dist/unlock/index.d.ts +2 -2
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js +1 -1
- package/dist/unlock/index.js.map +1 -1
- package/dist/unlock/retire.d.ts +21 -1
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +79 -1
- package/dist/unlock/retire.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,13 +1,34 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The onboarding-response envelope: what a fresh wallet (the enrollee) POSTs
|
|
6
|
+
* back to an ephemeral exchange whose request carried a
|
|
7
|
+
* `WalletOnboardingQuery` (`@interop/wallet-request`). It is transport
|
|
8
|
+
* vocabulary only -- the enrollment ceremony is untouched.
|
|
9
|
+
*
|
|
10
|
+
* The envelope carries an ordinary connect code VERBATIM as its payload, so
|
|
11
|
+
* the ceremony's strict validation applies unchanged and the inviter hands the
|
|
12
|
+
* string it receives straight to `approveEnrollment`; the connect-code payload
|
|
13
|
+
* version is deliberately NOT bumped by this transport. Beside it rides an
|
|
14
|
+
* optional display label the enrollee suggests for itself. The label lives in
|
|
15
|
+
* the envelope rather than in the code because its durable home is the
|
|
16
|
+
* account's client-labels record, which the approving client writes -- the
|
|
17
|
+
* code stays the ceremony's own artifact.
|
|
18
|
+
*
|
|
19
|
+
* The label is attacker-adjacent free text that renders on the approver's
|
|
20
|
+
* consent screen, so it is stripped of control characters, trimmed, and
|
|
21
|
+
* length-capped, and an over-cap label is REFUSED rather than silently
|
|
22
|
+
* truncated: a truncated label would be a silently different name for a client
|
|
23
|
+
* the person is about to authorize, where a refusal costs only a fresh code.
|
|
24
|
+
*/
|
|
25
|
+
import { ONBOARDING_LABEL_MAX_LENGTH } from '../labelText.js';
|
|
1
26
|
import type { EnrollmentRequest } from './enrollment.js';
|
|
2
27
|
/**
|
|
3
28
|
* The onboarding-response envelope version this build mints and accepts.
|
|
4
29
|
*/
|
|
5
30
|
export declare const ONBOARDING_RESPONSE_VERSION = 1;
|
|
6
|
-
|
|
7
|
-
* The longest suggested display label an onboarding response may carry, in
|
|
8
|
-
* code points, after control characters are stripped and whitespace trimmed.
|
|
9
|
-
*/
|
|
10
|
-
export declare const ONBOARDING_LABEL_MAX_LENGTH = 64;
|
|
31
|
+
export { ONBOARDING_LABEL_MAX_LENGTH };
|
|
11
32
|
/**
|
|
12
33
|
* The onboarding-response envelope as it travels: the versioned wrapper, the
|
|
13
34
|
* connect code verbatim, and the enrollee's optional suggested display label.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboardingResponse.d.ts","sourceRoot":"","sources":["../../src/enrollment/onboardingResponse.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"onboardingResponse.d.ts","sourceRoot":"","sources":["../../src/enrollment/onboardingResponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAEL,2BAA2B,EAC5B,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAA;AAE5C,OAAO,EAAE,2BAA2B,EAAE,CAAA;AAEtC;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,gBAAgB,EAAE;QAChB,CAAC,EAAE,MAAM,CAAA;QACT,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;CACF,CAAA;AAoCD;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,KAAK,EACN,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,wBAAwB,CAU3B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GAAG;IACpE,OAAO,EAAE,iBAAiB,CAAA;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAsBA"}
|
|
@@ -22,25 +22,13 @@
|
|
|
22
22
|
* truncated: a truncated label would be a silently different name for a client
|
|
23
23
|
* the person is about to authorize, where a refusal costs only a fresh code.
|
|
24
24
|
*/
|
|
25
|
+
import { LABEL_STRIPPED_CHARACTERS, ONBOARDING_LABEL_MAX_LENGTH } from '../labelText.js';
|
|
25
26
|
import { parseEnrollmentRequest } from './enrollment.js';
|
|
26
27
|
/**
|
|
27
28
|
* The onboarding-response envelope version this build mints and accepts.
|
|
28
29
|
*/
|
|
29
30
|
export const ONBOARDING_RESPONSE_VERSION = 1;
|
|
30
|
-
|
|
31
|
-
* The longest suggested display label an onboarding response may carry, in
|
|
32
|
-
* code points, after control characters are stripped and whitespace trimmed.
|
|
33
|
-
*/
|
|
34
|
-
export const ONBOARDING_LABEL_MAX_LENGTH = 64;
|
|
35
|
-
/**
|
|
36
|
-
* Characters stripped from a suggested label before it is measured: the C0 and
|
|
37
|
-
* C1 control ranges (including DEL) plus the bidirectional formatting and
|
|
38
|
-
* isolate controls, none of which a display name needs and all of which can
|
|
39
|
-
* reorder or hide what a consent screen shows.
|
|
40
|
-
*/
|
|
41
|
-
const LABEL_STRIPPED_CHARACTERS =
|
|
42
|
-
// eslint-disable-next-line no-control-regex
|
|
43
|
-
/[\u0000-\u001f\u007f-\u009f\u200e\u200f\u202a-\u202e\u2066-\u2069]/gu;
|
|
31
|
+
export { ONBOARDING_LABEL_MAX_LENGTH };
|
|
44
32
|
/**
|
|
45
33
|
* Sanitizes a suggested display label: strips the control and bidi characters
|
|
46
34
|
* above, trims surrounding whitespace, and refuses anything still longer than
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboardingResponse.js","sourceRoot":"","sources":["../../src/enrollment/onboardingResponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAGxD;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAA;AAE5C
|
|
1
|
+
{"version":3,"file":"onboardingResponse.js","sourceRoot":"","sources":["../../src/enrollment/onboarding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|
5
|
+
* The one reading of a thrown value's class name. An import-free leaf, so
|
|
6
|
+
* the mender runner and the ceremony event helpers take it without importing
|
|
7
|
+
* each other. `@interop/wallet-core/menders` re-exports it.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The thrown value's class name alone. Its message may carry a DID or a
|
|
11
|
+
* Space id, so a report keeps the name and the logger keeps the error. A
|
|
12
|
+
* value that is not an `Error` still yields a name, so a report site never
|
|
13
|
+
* carries `undefined` where a name belongs.
|
|
14
|
+
*
|
|
15
|
+
* @param err {unknown}
|
|
16
|
+
* @returns {string}
|
|
17
|
+
*/
|
|
18
|
+
export declare function errorNameOf(err: unknown): string;
|
|
19
|
+
//# sourceMappingURL=errorName.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorName.d.ts","sourceRoot":"","sources":["../src/errorName.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;GAIG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAQhD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The one reading of a thrown value's class name. An import-free leaf, so
|
|
6
|
+
* the mender runner and the ceremony event helpers take it without importing
|
|
7
|
+
* each other. `@interop/wallet-core/menders` re-exports it.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The thrown value's class name alone. Its message may carry a DID or a
|
|
11
|
+
* Space id, so a report keeps the name and the logger keeps the error. A
|
|
12
|
+
* value that is not an `Error` still yields a name, so a report site never
|
|
13
|
+
* carries `undefined` where a name belongs.
|
|
14
|
+
*
|
|
15
|
+
* @param err {unknown}
|
|
16
|
+
* @returns {string}
|
|
17
|
+
*/
|
|
18
|
+
export function errorNameOf(err) {
|
|
19
|
+
if (err instanceof Error) {
|
|
20
|
+
return err.name;
|
|
21
|
+
}
|
|
22
|
+
if (typeof err === 'object' && err !== null && 'name' in err) {
|
|
23
|
+
return String(err.name);
|
|
24
|
+
}
|
|
25
|
+
return 'Error';
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=errorName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorName.js","sourceRoot":"","sources":["../src/errorName.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;GAIG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,GAAY;IACtC,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;QACzB,OAAO,GAAG,CAAC,IAAI,CAAA;IACjB,CAAC;IACD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,MAAM,IAAI,GAAG,EAAE,CAAC;QAC7D,OAAO,MAAM,CAAE,GAAyB,CAAC,IAAI,CAAC,CAAA;IAChD,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
@@ -3,6 +3,7 @@ import type { EncryptionDescriptorStore } from '@interop/was-client/edv/core';
|
|
|
3
3
|
import type { IKeyAgreementKey } from '@interop/data-integrity-core';
|
|
4
4
|
import { type ClientWebvhUpdateKeys, type ICapabilityAgent, type KmsAuthenticationBinding, type PublishedWebvhLog, type WebvhIdStore } from '../webvh/index.js';
|
|
5
5
|
import { type UserKey, type WalletSpaceEpochsResult } from '../keys/index.js';
|
|
6
|
+
import { type CeremonyEmitter } from '../ceremonyEvents.js';
|
|
6
7
|
import { type StageNotifier } from '../log.js';
|
|
7
8
|
/**
|
|
8
9
|
* The complete key set a brand-new account mints locally before anything
|
|
@@ -103,6 +104,17 @@ export declare class AccountGenesisSpaceError extends Error {
|
|
|
103
104
|
* the module doc for the split).
|
|
104
105
|
*/
|
|
105
106
|
export type AccountGenesisStage = 'kmsAuthentication' | 'roster' | 'epochs' | 'promotion';
|
|
107
|
+
/**
|
|
108
|
+
* The stages the ceremony reports on the ceremony event channel, in the order
|
|
109
|
+
* they land. The names match the credential-anchored genesis's stage
|
|
110
|
+
* vocabulary, since both ceremonies run the same stage order. A stage is
|
|
111
|
+
* emitted once its write has landed; a collected failure emits no stage.
|
|
112
|
+
*/
|
|
113
|
+
export declare const ACCOUNT_GENESIS_EVENT_STAGES: readonly ["space-provisioning", "kms-authentication", "webvh-genesis", "roster-genesis", "collection-epochs", "controller-promotion"];
|
|
114
|
+
/**
|
|
115
|
+
* One value of {@link ACCOUNT_GENESIS_EVENT_STAGES}.
|
|
116
|
+
*/
|
|
117
|
+
export type AccountGenesisEventStage = (typeof ACCOUNT_GENESIS_EVENT_STAGES)[number];
|
|
106
118
|
/**
|
|
107
119
|
* What a completed ceremony reports: the account DID, each collected stage's
|
|
108
120
|
* outcome where it ran (the roster descriptor, the per-collection epoch
|
|
@@ -227,7 +239,11 @@ export interface AccountGenesisResult {
|
|
|
227
239
|
* genesis emits at the same point
|
|
228
240
|
* @returns {Promise<AccountGenesisResult>}
|
|
229
241
|
*/
|
|
230
|
-
export declare function ensureAccountGenesis(
|
|
242
|
+
export declare function ensureAccountGenesis(options: Omit<Parameters<typeof runAccountGenesis>[0], 'events'>): Promise<AccountGenesisResult>;
|
|
243
|
+
/**
|
|
244
|
+
* The body of {@link ensureAccountGenesis}, one run under its event emitter.
|
|
245
|
+
*/
|
|
246
|
+
declare function runAccountGenesis({ was, wasAsClient, wasServerUrl, spaceId, keyAgent, clientKeyAgreementKey, userKey, updateKeys, idStore, rosterStoreFor, collectionStoreFor, provideKmsAuthentication, expectedDid, onDidPublished, promoteController, onStage, events }: {
|
|
231
247
|
was: WasClient;
|
|
232
248
|
wasAsClient?: WasClient;
|
|
233
249
|
wasServerUrl: string;
|
|
@@ -252,5 +268,15 @@ export declare function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, s
|
|
|
252
268
|
}) => Promise<void>;
|
|
253
269
|
promoteController?: boolean;
|
|
254
270
|
onStage?: StageNotifier;
|
|
271
|
+
events: CeremonyEmitter<AccountGenesisEventStage>;
|
|
255
272
|
}): Promise<AccountGenesisResult>;
|
|
273
|
+
/**
|
|
274
|
+
* Whether an epoch fan-out installed epoch[0] on at least one collection,
|
|
275
|
+
* rather than adopting every one an earlier run landed.
|
|
276
|
+
*
|
|
277
|
+
* @param fanOut {WalletSpaceEpochsResult}
|
|
278
|
+
* @returns {boolean}
|
|
279
|
+
*/
|
|
280
|
+
export declare function installedAny(fanOut: WalletSpaceEpochsResult): boolean;
|
|
281
|
+
export {};
|
|
256
282
|
//# sourceMappingURL=accountGenesis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountGenesis.d.ts","sourceRoot":"","sources":["../../src/genesis/accountGenesis.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAGpE,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAA;AAEzB,OAAO,
|
|
1
|
+
{"version":3,"file":"accountGenesis.d.ts","sourceRoot":"","sources":["../../src/genesis/accountGenesis.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AAC7E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAGpE,OAAO,EAIL,KAAK,qBAAq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AAE,SAAS,CAAA;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,qBAAqB,EAAE,gBAAgB,CAAA;IACvC,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,qBAAqB,CAAA;IACjC,OAAO,EAAE,YAAY,CAAA;IACrB,cAAc,EAAE,CAAC,OAAO,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,yBAAyB,CAAA;IACvE,kBAAkB,EAAE,CAAC,OAAO,EAAE;QAC5B,GAAG,EAAE,MAAM,CAAA;KACZ,KAAK,CAAC,YAAY,EAAE,MAAM,KAAK,yBAAyB,CAAA;IACzD,wBAAwB,CAAC,EAAE,CAAC,OAAO,EAAE;QACnC,UAAU,EAAE,OAAO,CAAC,OAAO,CAAC,CAAA;KAC7B,KAAK,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC,CAAA;IACnD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9D,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,MAAM,EAAE,eAAe,CAAC,wBAAwB,CAAC,CAAA;CAClD,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAiJhC;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAErE"}
|
|
@@ -38,7 +38,8 @@ import { provisionWalletSpace, WALLET_SPACE_NAME } from '../space/index.js';
|
|
|
38
38
|
import { clientSigningKeyMultibase, ensureDidWebvh, mintClientWebvhUpdateKeys } from '../webvh/index.js';
|
|
39
39
|
import { ensureUserKeyRoster, ensureWalletSpaceEpochs, mintUserKey } from '../keys/index.js';
|
|
40
40
|
import { startKmsAuthentication } from './kmsAuthentication.js';
|
|
41
|
-
import {
|
|
41
|
+
import { ceremonyEvents } from '../ceremonyEvents.js';
|
|
42
|
+
import { log, stageNotifier } from '../log.js';
|
|
42
43
|
import { KMS_AUTHENTICATION_STAGE } from '../stages.js';
|
|
43
44
|
/**
|
|
44
45
|
* The byte length of a freshly minted data-Space id.
|
|
@@ -153,6 +154,20 @@ export class AccountGenesisSpaceError extends Error {
|
|
|
153
154
|
this.name = 'AccountGenesisSpaceError';
|
|
154
155
|
}
|
|
155
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* The stages the ceremony reports on the ceremony event channel, in the order
|
|
159
|
+
* they land. The names match the credential-anchored genesis's stage
|
|
160
|
+
* vocabulary, since both ceremonies run the same stage order. A stage is
|
|
161
|
+
* emitted once its write has landed; a collected failure emits no stage.
|
|
162
|
+
*/
|
|
163
|
+
export const ACCOUNT_GENESIS_EVENT_STAGES = [
|
|
164
|
+
'space-provisioning',
|
|
165
|
+
KMS_AUTHENTICATION_STAGE,
|
|
166
|
+
'webvh-genesis',
|
|
167
|
+
'roster-genesis',
|
|
168
|
+
'collection-epochs',
|
|
169
|
+
'controller-promotion'
|
|
170
|
+
];
|
|
156
171
|
/**
|
|
157
172
|
* Runs the account-genesis ceremony against an already-minted
|
|
158
173
|
* {@link AccountKeySet} (whose update-key seeds the caller has already
|
|
@@ -232,7 +247,26 @@ export class AccountGenesisSpaceError extends Error {
|
|
|
232
247
|
* genesis emits at the same point
|
|
233
248
|
* @returns {Promise<AccountGenesisResult>}
|
|
234
249
|
*/
|
|
235
|
-
export async function ensureAccountGenesis(
|
|
250
|
+
export async function ensureAccountGenesis(options) {
|
|
251
|
+
const events = ceremonyEvents({
|
|
252
|
+
ceremony: 'account-genesis',
|
|
253
|
+
log
|
|
254
|
+
});
|
|
255
|
+
return events.run(() => runAccountGenesis({ ...options, events }), result => ({
|
|
256
|
+
outcome: result.failed.length > 0 || result.epochsSkipped !== undefined
|
|
257
|
+
? 'partial'
|
|
258
|
+
: 'clean',
|
|
259
|
+
detail: {
|
|
260
|
+
failedStages: result.failed.length,
|
|
261
|
+
failedCollections: result.epochs?.failed.length ?? 0,
|
|
262
|
+
epochsSkipped: result.epochsSkipped !== undefined
|
|
263
|
+
}
|
|
264
|
+
}));
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* The body of {@link ensureAccountGenesis}, one run under its event emitter.
|
|
268
|
+
*/
|
|
269
|
+
async function runAccountGenesis({ was, wasAsClient, wasServerUrl, spaceId, keyAgent, clientKeyAgreementKey, userKey, updateKeys, idStore, rosterStoreFor, collectionStoreFor, provideKmsAuthentication, expectedDid, onDidPublished, promoteController = true, onStage, events }) {
|
|
236
270
|
const failed = [];
|
|
237
271
|
const stage = stageNotifier(onStage);
|
|
238
272
|
// 1. The Space and its collection roster, create-if-absent under this
|
|
@@ -261,12 +295,16 @@ export async function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spa
|
|
|
261
295
|
catch (err) {
|
|
262
296
|
throw new AccountGenesisSpaceError({ spaceId, cause: err });
|
|
263
297
|
}
|
|
298
|
+
events.stage('space-provisioning');
|
|
264
299
|
// The join: the genesis entry carries the KMS binding, so it waits on the
|
|
265
300
|
// whole stage even though the Space no longer does.
|
|
266
301
|
const kmsAuthentication = await kms.join();
|
|
267
302
|
if (kmsAuthentication.failed) {
|
|
268
303
|
failed.push({ stage: 'kmsAuthentication', error: kmsAuthentication.error });
|
|
269
304
|
}
|
|
305
|
+
else {
|
|
306
|
+
events.stage(KMS_AUTHENTICATION_STAGE);
|
|
307
|
+
}
|
|
270
308
|
stage(KMS_AUTHENTICATION_STAGE);
|
|
271
309
|
const didWebKeys = kmsAuthentication.binding?.keys;
|
|
272
310
|
// 3. The did:webvh genesis -- probe, adopt, or create-and-publish. Fatal on
|
|
@@ -291,6 +329,7 @@ export async function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spa
|
|
|
291
329
|
...(expectedDid !== undefined ? { expectedDid } : {})
|
|
292
330
|
});
|
|
293
331
|
await onDidPublished?.({ did });
|
|
332
|
+
events.stage('webvh-genesis');
|
|
294
333
|
// 4. The user-key roster genesis, strictly after the DID publication: the
|
|
295
334
|
// roster log's entry proofs anchor in the published document, so a roster
|
|
296
335
|
// created first could never verify.
|
|
@@ -301,6 +340,7 @@ export async function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spa
|
|
|
301
340
|
userKey,
|
|
302
341
|
clientKeyAgreementKey
|
|
303
342
|
});
|
|
343
|
+
events.stage('roster-genesis');
|
|
304
344
|
}
|
|
305
345
|
catch (err) {
|
|
306
346
|
failed.push({ stage: 'roster', error: err });
|
|
@@ -328,6 +368,11 @@ export async function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spa
|
|
|
328
368
|
}
|
|
329
369
|
else {
|
|
330
370
|
epochs = fanOut;
|
|
371
|
+
if (fanOut.failed.length === 0) {
|
|
372
|
+
events.stage('collection-epochs', {
|
|
373
|
+
...(installedAny(fanOut) ? {} : { prior: true })
|
|
374
|
+
});
|
|
375
|
+
}
|
|
331
376
|
}
|
|
332
377
|
}
|
|
333
378
|
catch (err) {
|
|
@@ -346,6 +391,9 @@ export async function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spa
|
|
|
346
391
|
spaceId,
|
|
347
392
|
did
|
|
348
393
|
});
|
|
394
|
+
events.stage('controller-promotion', {
|
|
395
|
+
...(promotion === 'confirmed' ? { prior: true } : {})
|
|
396
|
+
});
|
|
349
397
|
}
|
|
350
398
|
catch (err) {
|
|
351
399
|
failed.push({ stage: 'promotion', error: err });
|
|
@@ -360,4 +408,14 @@ export async function ensureAccountGenesis({ was, wasAsClient, wasServerUrl, spa
|
|
|
360
408
|
failed
|
|
361
409
|
};
|
|
362
410
|
}
|
|
411
|
+
/**
|
|
412
|
+
* Whether an epoch fan-out installed epoch[0] on at least one collection,
|
|
413
|
+
* rather than adopting every one an earlier run landed.
|
|
414
|
+
*
|
|
415
|
+
* @param fanOut {WalletSpaceEpochsResult}
|
|
416
|
+
* @returns {boolean}
|
|
417
|
+
*/
|
|
418
|
+
export function installedAny(fanOut) {
|
|
419
|
+
return Object.values(fanOut.outcomes).some(outcome => outcome.installed);
|
|
420
|
+
}
|
|
363
421
|
//# sourceMappingURL=accountGenesis.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountGenesis.js","sourceRoot":"","sources":["../../src/genesis/accountGenesis.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAK5C,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,EACL,yBAAyB,EACzB,cAAc,EACd,yBAAyB,EAM1B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,WAAW,EAGZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAsB,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"accountGenesis.js","sourceRoot":"","sources":["../../src/genesis/accountGenesis.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAK5C,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,EACL,yBAAyB,EACzB,cAAc,EACd,yBAAyB,EAM1B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,WAAW,EAGZ,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,c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CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7B,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3C,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACnC,MAAM;KACP,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,MAA+B;IAC1D,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;AAC1E,CAAC"}
|
package/dist/genesis/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* `@interop/wallet-core/clientAnnex` with the rest of the annex-anchored
|
|
24
24
|
* ceremonies.
|
|
25
25
|
*/
|
|
26
|
-
export { AccountGenesisSpaceError, ensureAccountGenesis, ensurePromotedSpaceController, mintAccountKeySet, mintSpaceId } from './accountGenesis.js';
|
|
26
|
+
export { ACCOUNT_GENESIS_EVENT_STAGES, AccountGenesisSpaceError, ensureAccountGenesis, ensurePromotedSpaceController, mintAccountKeySet, mintSpaceId } from './accountGenesis.js';
|
|
27
27
|
export { KMS_AUTHENTICATION_STAGE } from '../stages.js';
|
|
28
|
-
export type { AccountGenesisResult, AccountGenesisStage, AccountKeySet, SpaceControllerPromotion } from './accountGenesis.js';
|
|
28
|
+
export type { AccountGenesisEventStage, AccountGenesisResult, AccountGenesisStage, AccountKeySet, SpaceControllerPromotion } from './accountGenesis.js';
|
|
29
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/genesis/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,6BAA6B,EAC7B,iBAAiB,EACjB,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AACvD,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,wBAAwB,EACzB,MAAM,qBAAqB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/genesis/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,oBAAoB,EACpB,6BAA6B,EAC7B,iBAAiB,EACjB,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AACvD,YAAY,EACV,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,wBAAwB,EACzB,MAAM,qBAAqB,CAAA"}
|
package/dist/genesis/index.js
CHANGED
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
* `@interop/wallet-core/clientAnnex` with the rest of the annex-anchored
|
|
24
24
|
* ceremonies.
|
|
25
25
|
*/
|
|
26
|
-
export { AccountGenesisSpaceError, ensureAccountGenesis, ensurePromotedSpaceController, mintAccountKeySet, mintSpaceId } from './accountGenesis.js';
|
|
26
|
+
export { ACCOUNT_GENESIS_EVENT_STAGES, AccountGenesisSpaceError, ensureAccountGenesis, ensurePromotedSpaceController, mintAccountKeySet, mintSpaceId } from './accountGenesis.js';
|
|
27
27
|
export { KMS_AUTHENTICATION_STAGE } from '../stages.js';
|
|
28
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/genesis/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,6BAA6B,EAC7B,iBAAiB,EACjB,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/genesis/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,oBAAoB,EACpB,6BAA6B,EAC7B,iBAAiB,EACjB,WAAW,EACZ,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -32,6 +32,12 @@
|
|
|
32
32
|
* composing its own per-stage timing wraps that helper rather than
|
|
33
33
|
* re-implementing its swallow.
|
|
34
34
|
*
|
|
35
|
+
* The root also exports the ceremony event channel (`src/ceremonyEvents.ts`):
|
|
36
|
+
* `ceremonyEvents`, the per-run emitter a ceremony's entry point mints for
|
|
37
|
+
* its stage and outcome events, `menderEvent`, the one-line emit of a landed
|
|
38
|
+
* mend report entry, and `servedIdentifier`, the sanitizer for a
|
|
39
|
+
* server-served identifier in event detail.
|
|
40
|
+
*
|
|
35
41
|
* This root re-exports `sync` and `space` for convenience. `identity`,
|
|
36
42
|
* `webvh`, `keys`, `descriptors`, `keyring`, `enrollment`, and `recovery`
|
|
37
43
|
* are deliberately NOT re-exported here, so plaintext consumers of the root
|
|
@@ -42,4 +48,6 @@ export * from './sync/index.js';
|
|
|
42
48
|
export * from './space/index.js';
|
|
43
49
|
export { setLogger, stageNotifier } from './log.js';
|
|
44
50
|
export type { Logger, StageNotifier } from './log.js';
|
|
51
|
+
export { ceremonyEvents, menderEvent, servedIdentifier } from './ceremonyEvents.js';
|
|
52
|
+
export type { CeremonyDetail, CeremonyEmitter, CeremonyOutcome } from './ceremonyEvents.js';
|
|
45
53
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACnD,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACrD,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,cAAc,EACd,eAAe,EACf,eAAe,EAChB,MAAM,qBAAqB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -32,6 +32,12 @@
|
|
|
32
32
|
* composing its own per-stage timing wraps that helper rather than
|
|
33
33
|
* re-implementing its swallow.
|
|
34
34
|
*
|
|
35
|
+
* The root also exports the ceremony event channel (`src/ceremonyEvents.ts`):
|
|
36
|
+
* `ceremonyEvents`, the per-run emitter a ceremony's entry point mints for
|
|
37
|
+
* its stage and outcome events, `menderEvent`, the one-line emit of a landed
|
|
38
|
+
* mend report entry, and `servedIdentifier`, the sanitizer for a
|
|
39
|
+
* server-served identifier in event detail.
|
|
40
|
+
*
|
|
35
41
|
* This root re-exports `sync` and `space` for convenience. `identity`,
|
|
36
42
|
* `webvh`, `keys`, `descriptors`, `keyring`, `enrollment`, and `recovery`
|
|
37
43
|
* are deliberately NOT re-exported here, so plaintext consumers of the root
|
|
@@ -41,4 +47,5 @@
|
|
|
41
47
|
export * from './sync/index.js';
|
|
42
48
|
export * from './space/index.js';
|
|
43
49
|
export { setLogger, stageNotifier } from './log.js';
|
|
50
|
+
export { ceremonyEvents, menderEvent, servedIdentifier } from './ceremonyEvents.js';
|
|
44
51
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAEnD,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EACjB,MAAM,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The character set and length every attacker-adjacent display string is
|
|
6
|
+
* held to: the onboarding response's suggested label, and a server-served
|
|
7
|
+
* identifier the ceremony event helpers carry. An import-free leaf, so a
|
|
8
|
+
* layer that must not load the enrollment ceremony can still take it.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The longest suggested display label an onboarding response may carry, in
|
|
12
|
+
* code points, after control characters are stripped and whitespace trimmed.
|
|
13
|
+
* The ceremony event helpers truncate a server-served identifier to the same
|
|
14
|
+
* length.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ONBOARDING_LABEL_MAX_LENGTH = 64;
|
|
17
|
+
/**
|
|
18
|
+
* Characters stripped from a display string before it is measured: the C0
|
|
19
|
+
* and C1 control ranges (including DEL) plus the bidirectional formatting and
|
|
20
|
+
* isolate controls, none of which a display name needs and all of which can
|
|
21
|
+
* reorder or hide what a consent screen or a log line shows.
|
|
22
|
+
*/
|
|
23
|
+
export declare const LABEL_STRIPPED_CHARACTERS: RegExp;
|
|
24
|
+
//# sourceMappingURL=labelText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelText.d.ts","sourceRoot":"","sources":["../src/labelText.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;GAKG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,KAAK,CAAA;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,QAEkC,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The character set and length every attacker-adjacent display string is
|
|
6
|
+
* held to: the onboarding response's suggested label, and a server-served
|
|
7
|
+
* identifier the ceremony event helpers carry. An import-free leaf, so a
|
|
8
|
+
* layer that must not load the enrollment ceremony can still take it.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The longest suggested display label an onboarding response may carry, in
|
|
12
|
+
* code points, after control characters are stripped and whitespace trimmed.
|
|
13
|
+
* The ceremony event helpers truncate a server-served identifier to the same
|
|
14
|
+
* length.
|
|
15
|
+
*/
|
|
16
|
+
export const ONBOARDING_LABEL_MAX_LENGTH = 64;
|
|
17
|
+
/**
|
|
18
|
+
* Characters stripped from a display string before it is measured: the C0
|
|
19
|
+
* and C1 control ranges (including DEL) plus the bidirectional formatting and
|
|
20
|
+
* isolate controls, none of which a display name needs and all of which can
|
|
21
|
+
* reorder or hide what a consent screen or a log line shows.
|
|
22
|
+
*/
|
|
23
|
+
export const LABEL_STRIPPED_CHARACTERS =
|
|
24
|
+
// eslint-disable-next-line no-control-regex
|
|
25
|
+
/[\u0000-\u001f\u007f-\u009f\u200e\u200f\u202a-\u202e\u2066-\u2069]/gu;
|
|
26
|
+
//# sourceMappingURL=labelText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"labelText.js","sourceRoot":"","sources":["../src/labelText.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;GAKG;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,CAAA;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB;AACpC,4CAA4C;AAC5C,sEAAsE,CAAA"}
|
package/dist/log.d.ts
CHANGED
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
* (enforced by the eslint `no-restricted-imports` rule); this one file is
|
|
14
14
|
* the stated exception.
|
|
15
15
|
*
|
|
16
|
-
* A consumer that never calls {@link setLogger} keeps a console fallback
|
|
17
|
-
*
|
|
18
|
-
* `'[wallet-core]'` prefix and the call's `data` passed as a
|
|
19
|
-
* trailing argument (present only when supplied).
|
|
16
|
+
* A consumer that never calls {@link setLogger} keeps a console fallback
|
|
17
|
+
* for info, warn, and error: the same channel as a bare `console.*` call,
|
|
18
|
+
* but with a `'[wallet-core]'` prefix and the call's `data` passed as a
|
|
19
|
+
* single trailing argument (present only when supplied). Debug calls are
|
|
20
|
+
* dropped there, since the ceremony stage events ride debug and would
|
|
21
|
+
* otherwise print on every run. An app wires a real
|
|
20
22
|
* logger once at bootstrap, e.g. `setLogger(createLogger('wc'))`.
|
|
21
23
|
*/
|
|
22
24
|
/**
|
package/dist/log.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,MAAM;IACrB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACxD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACvD,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACvD,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CACzD;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;AAEnD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EACzD,OAAO,CAAC,EAAE,aAAa,GACtB,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAWxB;AAeD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI9C;AAED;;;;GAIG;AACH,eAAO,MAAM,GAAG,EAAE,MAKjB,CAAA"}
|
package/dist/log.js
CHANGED
|
@@ -13,10 +13,12 @@
|
|
|
13
13
|
* (enforced by the eslint `no-restricted-imports` rule); this one file is
|
|
14
14
|
* the stated exception.
|
|
15
15
|
*
|
|
16
|
-
* A consumer that never calls {@link setLogger} keeps a console fallback
|
|
17
|
-
*
|
|
18
|
-
* `'[wallet-core]'` prefix and the call's `data` passed as a
|
|
19
|
-
* trailing argument (present only when supplied).
|
|
16
|
+
* A consumer that never calls {@link setLogger} keeps a console fallback
|
|
17
|
+
* for info, warn, and error: the same channel as a bare `console.*` call,
|
|
18
|
+
* but with a `'[wallet-core]'` prefix and the call's `data` passed as a
|
|
19
|
+
* single trailing argument (present only when supplied). Debug calls are
|
|
20
|
+
* dropped there, since the ceremony stage events ride debug and would
|
|
21
|
+
* otherwise print on every run. An app wires a real
|
|
20
22
|
* logger once at bootstrap, e.g. `setLogger(createLogger('wc'))`.
|
|
21
23
|
*/
|
|
22
24
|
/**
|
|
@@ -47,7 +49,8 @@ export function stageNotifier(onStage) {
|
|
|
47
49
|
};
|
|
48
50
|
}
|
|
49
51
|
const consoleFallback = {
|
|
50
|
-
|
|
52
|
+
// The debug cutoff: an unwired consumer receives info and above.
|
|
53
|
+
debug: () => undefined,
|
|
51
54
|
info: (msg, data) => console.info('[wallet-core]', msg, ...(data === undefined ? [] : [data])),
|
|
52
55
|
warn: (msg, data) => console.warn('[wallet-core]', msg, ...(data === undefined ? [] : [data])),
|
|
53
56
|
error: (msg, data) => console.error('[wallet-core]', msg, ...(data === undefined ? [] : [data]))
|
package/dist/log.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log.js","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"log.js","sourceRoot":"","sources":["../src/log.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AAyBH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,aAAa,CAC3B,OAAuB;IAEvB,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,GAAG,EAAE,CAAC,SAAS,CAAA;IACxB,CAAC;IACD,OAAO,SAAS,MAAM,CAAC,KAAY;QACjC,IAAI,CAAC;YACH,OAAO,CAAC,KAAK,CAAC,CAAA;QAChB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,GAAG,CAAC,IAAI,CAAC,kCAAkC,EA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,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC;IAC3C,IAAI,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC;IAC3C,KAAK,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC;CAC9C,CAAA"}
|
package/dist/menders/ids.d.ts
CHANGED
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
* The invariant ids: the closed census both wallets declare against and the
|
|
6
6
|
* mender event channel keys on. Each names the predicate an entry makes
|
|
7
7
|
* true rather than the code that converges it, so moving a converger between
|
|
8
|
-
* modules renames nothing. The ids are code-only
|
|
8
|
+
* modules renames nothing. The ids are code-only: no stored record and no
|
|
9
|
+
* account or annex log entry carries one. The ceremony event channel
|
|
10
|
+
* (`ceremonyEvents.ts`) is a separate diagnostics surface, and its mender
|
|
11
|
+
* events do carry them.
|
|
9
12
|
* Numbered in the order the design table assigned them, and a new one takes
|
|
10
13
|
* the next free number rather than renumbering.
|
|
11
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/menders/ids.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/menders/ids.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,6hDAuEhB,CAAA;AAEV;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
package/dist/menders/ids.js
CHANGED
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
* The invariant ids: the closed census both wallets declare against and the
|
|
6
6
|
* mender event channel keys on. Each names the predicate an entry makes
|
|
7
7
|
* true rather than the code that converges it, so moving a converger between
|
|
8
|
-
* modules renames nothing. The ids are code-only
|
|
8
|
+
* modules renames nothing. The ids are code-only: no stored record and no
|
|
9
|
+
* account or annex log entry carries one. The ceremony event channel
|
|
10
|
+
* (`ceremonyEvents.ts`) is a separate diagnostics surface, and its mender
|
|
11
|
+
* events do carry them.
|
|
9
12
|
* Numbered in the order the design table assigned them, and a new one takes
|
|
10
13
|
* the next free number rather than renumbering.
|
|
11
14
|
*/
|