@interop/wallet-core 0.86.0 → 0.88.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 +41 -34
- package/dist/menders/runner.d.ts.map +1 -1
- package/dist/menders/runner.js +56 -24
- 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 +3 -1
- package/dist/space/ceremony.d.ts.map +1 -1
- package/dist/space/ceremony.js +3 -1
- package/dist/space/ceremony.js.map +1 -1
- 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 +2 -2
package/dist/menders/ids.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../../src/menders/ids.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../../src/menders/ids.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI;IACJ,2CAA2C;IAC3C,IAAI;IACJ,sDAAsD;IACtD,IAAI;IACJ,6CAA6C;IAC7C,IAAI;IACJ,kDAAkD;IAClD,IAAI;IACJ,yDAAyD;IACzD,IAAI;IACJ,kDAAkD;IAClD,IAAI;IACJ,sCAAsC;IACtC,IAAI;IACJ,wDAAwD;IACxD,IAAI;IACJ,4CAA4C;IAC5C,KAAK;IACL,yCAAyC;IACzC,KAAK;IACL,uCAAuC;IACvC,KAAK;IACL,qCAAqC;IACrC,KAAK;IACL,oCAAoC;IACpC,KAAK;IACL,8CAA8C;IAC9C,KAAK;IACL,+BAA+B;IAC/B,KAAK;IACL,kCAAkC;IAClC,KAAK;IACL,0CAA0C;IAC1C,KAAK;IACL,oCAAoC;IACpC,KAAK;IACL,0CAA0C;IAC1C,KAAK;IACL,uCAAuC;IACvC,KAAK;IACL,+CAA+C;IAC/C,KAAK;IACL,0CAA0C;IAC1C,KAAK;IACL,oCAAoC;IACpC,KAAK;IACL,6BAA6B;IAC7B,KAAK;IACL,8CAA8C;IAC9C,KAAK;IACL,sCAAsC;IACtC,KAAK;IACL,wCAAwC;IACxC,KAAK;IACL,kDAAkD;IAClD,KAAK;IACL,+DAA+D;IAC/D,KAAK;IACL,yCAAyC;IACzC,KAAK;IACL,kCAAkC;IAClC,KAAK;IACL,2CAA2C;IAC3C,KAAK;IACL,sCAAsC;IACtC,KAAK;IACL,mCAAmC;IACnC,KAAK;IACL,0CAA0C;CAClC,CAAA"}
|
package/dist/menders/index.d.ts
CHANGED
|
@@ -34,7 +34,8 @@ export { INVARIANT_IDS } from './ids.js';
|
|
|
34
34
|
export type { InvariantId } from './ids.js';
|
|
35
35
|
export { heldAuthorities, menderRegistry } from './registry.js';
|
|
36
36
|
export type { MenderRegistry, ResolvedAuthority } from './registry.js';
|
|
37
|
-
export { errorNameOf
|
|
37
|
+
export { errorNameOf } from '../errorName.js';
|
|
38
|
+
export { MEND_REPORT_SHAPE_ERROR, mendReportAccumulator, runMenderBlock } from './runner.js';
|
|
38
39
|
export type { MendReportAccumulator } from './runner.js';
|
|
39
40
|
export type { InvariantDeclaration, InvariantGap, LoginRoute, MendOutcome, MendReport, MendReportEntry, Registration, RegistrationSite } from './types.js';
|
|
40
41
|
export { ACCOUNT_SHAPES, AUTHORITIES, CHAIN_TRIGGERS, EVIDENCE, GAP_KINDS, MEND_OUTCOMES, TRIGGERS } from './vocabulary.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/menders/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EACL,UAAU,EACV,4BAA4B,EAC5B,cAAc,EACd,oBAAoB,EACrB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC/D,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACtE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/menders/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EACL,UAAU,EACV,4BAA4B,EAC5B,cAAc,EACd,oBAAoB,EACrB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC/D,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,cAAc,EACf,MAAM,aAAa,CAAA;AACpB,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAA;AACxD,YAAY,EACV,oBAAoB,EACpB,YAAY,EACZ,UAAU,EACV,WAAW,EACX,UAAU,EACV,eAAe,EACf,YAAY,EACZ,gBAAgB,EACjB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,cAAc,EACd,WAAW,EACX,cAAc,EACd,QAAQ,EACR,SAAS,EACT,aAAa,EACb,QAAQ,EACT,MAAM,iBAAiB,CAAA;AACxB,YAAY,EACV,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,OAAO,EACP,eAAe,EACf,OAAO,EACR,MAAM,iBAAiB,CAAA"}
|
package/dist/menders/index.js
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
export { deriveGaps, transientReachableInvariants, undeclaredGaps, undeclaredInvariants } from './derive.js';
|
|
33
33
|
export { INVARIANT_IDS } from './ids.js';
|
|
34
34
|
export { heldAuthorities, menderRegistry } from './registry.js';
|
|
35
|
-
export { errorNameOf
|
|
35
|
+
export { errorNameOf } from '../errorName.js';
|
|
36
|
+
export { MEND_REPORT_SHAPE_ERROR, mendReportAccumulator, runMenderBlock } from './runner.js';
|
|
36
37
|
export { ACCOUNT_SHAPES, AUTHORITIES, CHAIN_TRIGGERS, EVIDENCE, GAP_KINDS, MEND_OUTCOMES, TRIGGERS } from './vocabulary.js';
|
|
37
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/menders/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EACL,UAAU,EACV,4BAA4B,EAC5B,cAAc,EACd,oBAAoB,EACrB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE/D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/menders/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EACL,UAAU,EACV,4BAA4B,EAC5B,cAAc,EACd,oBAAoB,EACrB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAC7C,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,cAAc,EACf,MAAM,aAAa,CAAA;AAYpB,OAAO,EACL,cAAc,EACd,WAAW,EACX,cAAc,EACd,QAAQ,EACR,SAAS,EACT,aAAa,EACb,QAAQ,EACT,MAAM,iBAAiB,CAAA"}
|
package/dist/menders/runner.d.ts
CHANGED
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* The mender runner: one try, warn, and skip discipline over the
|
|
6
|
-
* registrations listed under one chain trigger. `runMenderBlock` runs them
|
|
7
|
-
* in list order, since registration order is execution order and there is
|
|
8
|
-
* no dependency graph. A seed step's failure aborts the block; a
|
|
9
|
-
* registration's failure warns through the wallet's own `Logger` and the
|
|
10
|
-
* block continues. Beside it sits `mendReportAccumulator`, the report
|
|
11
|
-
* collector a wallet creates before a `Session` exists, so the entries a
|
|
12
|
-
* routing site reports and the entries this runner reports assemble into
|
|
13
|
-
* one `MendReport`.
|
|
14
|
-
*/
|
|
15
1
|
import type { Logger } from '../log.js';
|
|
16
2
|
import type { MenderRegistry } from './registry.js';
|
|
17
3
|
import type { LoginRoute, MendReport, MendReportEntry, Registration, RegistrationSite } from './types.js';
|
|
@@ -25,15 +11,25 @@ export declare const MEND_REPORT_SHAPE_ERROR = "MendReportShapeError";
|
|
|
25
11
|
* The report collector a wallet creates ahead of session assembly. A
|
|
26
12
|
* routing entry reports into it from its own call site before a `Session`
|
|
27
13
|
* exists, {@link runMenderBlock} reports the chain's entries into it
|
|
28
|
-
* through `
|
|
29
|
-
* mend report.
|
|
14
|
+
* through its `mends` option, and the wallet hands `settled` to the session
|
|
15
|
+
* as its mend report. When the accumulator was created with a logger, each
|
|
16
|
+
* `report` call also emits that entry's `'ceremony mender'` event.
|
|
30
17
|
*/
|
|
31
18
|
export interface MendReportAccumulator<Ceremony extends string = string> {
|
|
32
19
|
/**
|
|
33
|
-
* Records one entry.
|
|
34
|
-
*
|
|
20
|
+
* Records one entry. When the accumulator has a logger, it also emits one
|
|
21
|
+
* `'ceremony mender'` event (`menderEvent`) from the same entry, carrying
|
|
22
|
+
* `err` when one is given. The event never throws. Bound to the
|
|
23
|
+
* accumulator, so it can be passed around as a function.
|
|
24
|
+
*
|
|
25
|
+
* @param entry {MendReportEntry} the entry to record
|
|
26
|
+
* @param [options] {object}
|
|
27
|
+
* @param [options.err] {unknown} the error behind the entry, carried on
|
|
28
|
+
* the event only. The recorded entry keeps `errorName` alone
|
|
35
29
|
*/
|
|
36
|
-
report(entry: MendReportEntry<Ceremony
|
|
30
|
+
report(entry: MendReportEntry<Ceremony>, options?: {
|
|
31
|
+
err?: unknown;
|
|
32
|
+
}): void;
|
|
37
33
|
/**
|
|
38
34
|
* Every entry recorded so far, in report order.
|
|
39
35
|
*/
|
|
@@ -53,9 +49,18 @@ export interface MendReportAccumulator<Ceremony extends string = string> {
|
|
|
53
49
|
* Creates a report accumulator. Generic over the wallet's ceremony-id
|
|
54
50
|
* union, which defaults to `string`.
|
|
55
51
|
*
|
|
52
|
+
* With a `logger`, every `report` call records the entry and emits its
|
|
53
|
+
* `'ceremony mender'` event through that logger, so the diagnostics stream
|
|
54
|
+
* and the report cannot diverge. Without one, `report` only records.
|
|
55
|
+
*
|
|
56
|
+
* @param [options] {object}
|
|
57
|
+
* @param [options.logger] {Logger} the wallet's own sink for the mender
|
|
58
|
+
* events
|
|
56
59
|
* @returns {MendReportAccumulator}
|
|
57
60
|
*/
|
|
58
|
-
export declare function mendReportAccumulator<Ceremony extends string = string>(
|
|
61
|
+
export declare function mendReportAccumulator<Ceremony extends string = string>({ logger }?: {
|
|
62
|
+
logger?: Logger;
|
|
63
|
+
}): MendReportAccumulator<Ceremony>;
|
|
59
64
|
/**
|
|
60
65
|
* Runs one registration block: the registrations listed under `trigger`
|
|
61
66
|
* whose every reported invariant declares an authority the session holds
|
|
@@ -76,6 +81,13 @@ export declare function mendReportAccumulator<Ceremony extends string = string>(
|
|
|
76
81
|
* carrying {@link MEND_REPORT_SHAPE_ERROR} rather than throwing, so a
|
|
77
82
|
* mismatched adapter cannot tear a login.
|
|
78
83
|
*
|
|
84
|
+
* Each entry emits exactly one `'ceremony mender'` event (`menderEvent`),
|
|
85
|
+
* so the diagnostics stream and the report cannot diverge. Given `mends`,
|
|
86
|
+
* the block reports each entry into that accumulator, and the accumulator's
|
|
87
|
+
* own logger emits the event; the block does not emit it again. Without
|
|
88
|
+
* `mends`, the block emits the event through `logger` itself. A `noop`
|
|
89
|
+
* entry emits at debug. `onOutcome` runs after the report, once per entry.
|
|
90
|
+
*
|
|
79
91
|
* `trigger` is one of the two chain values, so a `ceremony-tail` entry is
|
|
80
92
|
* out of reach here. Such an entry has no registration at all: its body
|
|
81
93
|
* stays inside its ceremony's sequenced code and it reports from there.
|
|
@@ -104,22 +116,26 @@ export declare function mendReportAccumulator<Ceremony extends string = string>(
|
|
|
104
116
|
* `when` predicate reads
|
|
105
117
|
* @param options.deps {Deps} passed to the seed and to every `converge`
|
|
106
118
|
* @param options.logger {Logger} the wallet's own sink, so its warn
|
|
107
|
-
* copy keeps the wallet's namespace
|
|
119
|
+
* copy keeps the wallet's namespace. The block emits the mender events
|
|
120
|
+
* through it when no `mends` is given
|
|
108
121
|
* @param [options.registrations] {ReadonlyArray<Registration>} the
|
|
109
122
|
* registrations to run, in place of the ones the registry lists under
|
|
110
123
|
* `trigger`. Each is admitted by the same authority and route tests
|
|
111
124
|
* @param [options.seed] {Registration} the step whose failure aborts the
|
|
112
125
|
* block. Admitted by the same authority and route tests as any other
|
|
113
126
|
* registration; one it does not pass is skipped rather than failed
|
|
127
|
+
* @param [options.mends] {MendReportAccumulator} the accumulator the
|
|
128
|
+
* block reports each entry into. It emits the entry's mender event, so
|
|
129
|
+
* the block emits none of its own. An accumulator created without a
|
|
130
|
+
* logger then emits nothing
|
|
114
131
|
* @param [options.onOutcome] {(entry: MendReportEntry) => void} called
|
|
115
|
-
* once per reported entry, in order
|
|
116
|
-
* outcome is reported
|
|
132
|
+
* once per reported entry, in order, after the entry is reported
|
|
117
133
|
* @returns {Promise<MendReport>} the block's entries in order. It never
|
|
118
134
|
* rejects; a seed failure resolves with the seed's `failed` entries alone
|
|
119
135
|
* @throws {TypeError} when the seed or an override registration is listed
|
|
120
136
|
* under a trigger other than `trigger`, a programming error
|
|
121
137
|
*/
|
|
122
|
-
export declare function runMenderBlock<Deps, Ceremony extends string = string, Site extends RegistrationSite = Registration<Deps, Ceremony>>({ registry, trigger, held, route, deps, logger, registrations, seed, onOutcome }: {
|
|
138
|
+
export declare function runMenderBlock<Deps, Ceremony extends string = string, Site extends RegistrationSite = Registration<Deps, Ceremony>>({ registry, trigger, held, route, deps, logger, registrations, seed, mends, onOutcome }: {
|
|
123
139
|
registry: MenderRegistry<Site, Deps, Ceremony>;
|
|
124
140
|
trigger: ChainTrigger;
|
|
125
141
|
held: ReadonlyArray<Authority>;
|
|
@@ -128,16 +144,7 @@ export declare function runMenderBlock<Deps, Ceremony extends string = string, S
|
|
|
128
144
|
logger: Logger;
|
|
129
145
|
registrations?: ReadonlyArray<Registration<Deps, Ceremony>>;
|
|
130
146
|
seed?: Registration<Deps, Ceremony>;
|
|
147
|
+
mends?: MendReportAccumulator<Ceremony>;
|
|
131
148
|
onOutcome?: (entry: MendReportEntry<Ceremony>) => void;
|
|
132
149
|
}): Promise<MendReport<Ceremony>>;
|
|
133
|
-
/**
|
|
134
|
-
* The thrown value's class name alone. Its message may carry a DID or a
|
|
135
|
-
* Space id, so a report keeps the name and the logger keeps the error. A
|
|
136
|
-
* value that is not an `Error` still yields a name, so a report site never
|
|
137
|
-
* carries `undefined` where a name belongs.
|
|
138
|
-
*
|
|
139
|
-
* @param err {unknown}
|
|
140
|
-
* @returns {string}
|
|
141
|
-
*/
|
|
142
|
-
export declare function errorNameOf(err: unknown): string;
|
|
143
150
|
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/menders/runner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/menders/runner.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,KAAK,EACV,UAAU,EACV,UAAU,EACV,eAAe,EACf,YAAY,EACZ,gBAAgB,EACjB,MAAM,YAAY,CAAA;AACnB,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9D;;;GAGG;AACH,eAAO,MAAM,uBAAuB,yBAAyB,CAAA;AAE7D;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB,CAAC,QAAQ,SAAS,MAA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,aAAa,CAAC,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAA;IAC3D,IAAI,CAAC,EAAE,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;IACnC,KAAK,CAAC,EAAE,qBAAqB,CAAC,QAAQ,CAAC,CAAA;IACvC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAA;CACvD,GAAG,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CA8ChC"}
|
package/dist/menders/runner.js
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The mender runner: one try, warn, and skip discipline over the
|
|
6
|
+
* registrations listed under one chain trigger. `runMenderBlock` runs them
|
|
7
|
+
* in list order, since registration order is execution order and there is
|
|
8
|
+
* no dependency graph. A seed step's failure aborts the block; a
|
|
9
|
+
* registration's failure warns through the wallet's own `Logger` and the
|
|
10
|
+
* block continues. Beside it sits `mendReportAccumulator`, the report
|
|
11
|
+
* collector a wallet creates before a `Session` exists, so the entries a
|
|
12
|
+
* routing site reports and the entries this runner reports assemble into
|
|
13
|
+
* one `MendReport`. An accumulator given a logger emits each entry's
|
|
14
|
+
* `'ceremony mender'` event from the same `report` call that records it, so
|
|
15
|
+
* a caller cannot report an entry without emitting it.
|
|
16
|
+
*/
|
|
17
|
+
import { menderEvent } from '../ceremonyEvents.js';
|
|
18
|
+
import { errorNameOf } from '../errorName.js';
|
|
1
19
|
/**
|
|
2
20
|
* The `errorName` a normalized entry carries when a registration resolves
|
|
3
21
|
* with entries that do not match the invariants it reports.
|
|
@@ -7,9 +25,16 @@ export const MEND_REPORT_SHAPE_ERROR = 'MendReportShapeError';
|
|
|
7
25
|
* Creates a report accumulator. Generic over the wallet's ceremony-id
|
|
8
26
|
* union, which defaults to `string`.
|
|
9
27
|
*
|
|
28
|
+
* With a `logger`, every `report` call records the entry and emits its
|
|
29
|
+
* `'ceremony mender'` event through that logger, so the diagnostics stream
|
|
30
|
+
* and the report cannot diverge. Without one, `report` only records.
|
|
31
|
+
*
|
|
32
|
+
* @param [options] {object}
|
|
33
|
+
* @param [options.logger] {Logger} the wallet's own sink for the mender
|
|
34
|
+
* events
|
|
10
35
|
* @returns {MendReportAccumulator}
|
|
11
36
|
*/
|
|
12
|
-
export function mendReportAccumulator() {
|
|
37
|
+
export function mendReportAccumulator({ logger } = {}) {
|
|
13
38
|
const recorded = [];
|
|
14
39
|
let resolveSettled = () => undefined;
|
|
15
40
|
const settled = new Promise(resolve => {
|
|
@@ -17,8 +42,12 @@ export function mendReportAccumulator() {
|
|
|
17
42
|
});
|
|
18
43
|
let assembled;
|
|
19
44
|
return {
|
|
20
|
-
report(entry) {
|
|
45
|
+
report(entry, { err } = {}) {
|
|
21
46
|
recorded.push(entry);
|
|
47
|
+
if (logger) {
|
|
48
|
+
// menderEvent never throws and drops an undefined `err`.
|
|
49
|
+
menderEvent({ log: logger, entry, err });
|
|
50
|
+
}
|
|
22
51
|
},
|
|
23
52
|
entries: () => [...recorded],
|
|
24
53
|
settle() {
|
|
@@ -51,6 +80,13 @@ export function mendReportAccumulator() {
|
|
|
51
80
|
* carrying {@link MEND_REPORT_SHAPE_ERROR} rather than throwing, so a
|
|
52
81
|
* mismatched adapter cannot tear a login.
|
|
53
82
|
*
|
|
83
|
+
* Each entry emits exactly one `'ceremony mender'` event (`menderEvent`),
|
|
84
|
+
* so the diagnostics stream and the report cannot diverge. Given `mends`,
|
|
85
|
+
* the block reports each entry into that accumulator, and the accumulator's
|
|
86
|
+
* own logger emits the event; the block does not emit it again. Without
|
|
87
|
+
* `mends`, the block emits the event through `logger` itself. A `noop`
|
|
88
|
+
* entry emits at debug. `onOutcome` runs after the report, once per entry.
|
|
89
|
+
*
|
|
54
90
|
* `trigger` is one of the two chain values, so a `ceremony-tail` entry is
|
|
55
91
|
* out of reach here. Such an entry has no registration at all: its body
|
|
56
92
|
* stays inside its ceremony's sequenced code and it reports from there.
|
|
@@ -79,26 +115,40 @@ export function mendReportAccumulator() {
|
|
|
79
115
|
* `when` predicate reads
|
|
80
116
|
* @param options.deps {Deps} passed to the seed and to every `converge`
|
|
81
117
|
* @param options.logger {Logger} the wallet's own sink, so its warn
|
|
82
|
-
* copy keeps the wallet's namespace
|
|
118
|
+
* copy keeps the wallet's namespace. The block emits the mender events
|
|
119
|
+
* through it when no `mends` is given
|
|
83
120
|
* @param [options.registrations] {ReadonlyArray<Registration>} the
|
|
84
121
|
* registrations to run, in place of the ones the registry lists under
|
|
85
122
|
* `trigger`. Each is admitted by the same authority and route tests
|
|
86
123
|
* @param [options.seed] {Registration} the step whose failure aborts the
|
|
87
124
|
* block. Admitted by the same authority and route tests as any other
|
|
88
125
|
* registration; one it does not pass is skipped rather than failed
|
|
126
|
+
* @param [options.mends] {MendReportAccumulator} the accumulator the
|
|
127
|
+
* block reports each entry into. It emits the entry's mender event, so
|
|
128
|
+
* the block emits none of its own. An accumulator created without a
|
|
129
|
+
* logger then emits nothing
|
|
89
130
|
* @param [options.onOutcome] {(entry: MendReportEntry) => void} called
|
|
90
|
-
* once per reported entry, in order
|
|
91
|
-
* outcome is reported
|
|
131
|
+
* once per reported entry, in order, after the entry is reported
|
|
92
132
|
* @returns {Promise<MendReport>} the block's entries in order. It never
|
|
93
133
|
* rejects; a seed failure resolves with the seed's `failed` entries alone
|
|
94
134
|
* @throws {TypeError} when the seed or an override registration is listed
|
|
95
135
|
* under a trigger other than `trigger`, a programming error
|
|
96
136
|
*/
|
|
97
|
-
export async function runMenderBlock({ registry, trigger, held, route, deps, logger, registrations, seed, onOutcome }) {
|
|
137
|
+
export async function runMenderBlock({ registry, trigger, held, route, deps, logger, registrations, seed, mends, onOutcome }) {
|
|
98
138
|
const report = [];
|
|
99
139
|
const collect = (entries) => {
|
|
100
140
|
for (const entry of entries) {
|
|
101
141
|
report.push(entry);
|
|
142
|
+
// The diagnostics twin of the report entry, emitted once: by the
|
|
143
|
+
// accumulator when one is given, by the block otherwise. The entry
|
|
144
|
+
// carries `errorName` alone, so the event carries no `err`; the
|
|
145
|
+
// registration's declared warn keeps the error.
|
|
146
|
+
if (mends) {
|
|
147
|
+
mends.report(entry);
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
menderEvent({ log: logger, entry });
|
|
151
|
+
}
|
|
102
152
|
onOutcome?.(entry);
|
|
103
153
|
}
|
|
104
154
|
};
|
|
@@ -201,22 +251,4 @@ function failedEntries({ registry, registration, errorName }) {
|
|
|
201
251
|
};
|
|
202
252
|
});
|
|
203
253
|
}
|
|
204
|
-
/**
|
|
205
|
-
* The thrown value's class name alone. Its message may carry a DID or a
|
|
206
|
-
* Space id, so a report keeps the name and the logger keeps the error. A
|
|
207
|
-
* value that is not an `Error` still yields a name, so a report site never
|
|
208
|
-
* carries `undefined` where a name belongs.
|
|
209
|
-
*
|
|
210
|
-
* @param err {unknown}
|
|
211
|
-
* @returns {string}
|
|
212
|
-
*/
|
|
213
|
-
export function errorNameOf(err) {
|
|
214
|
-
if (err instanceof Error) {
|
|
215
|
-
return err.name;
|
|
216
|
-
}
|
|
217
|
-
if (typeof err === 'object' && err !== null && 'name' in err) {
|
|
218
|
-
return String(err.name);
|
|
219
|
-
}
|
|
220
|
-
return 'Error';
|
|
221
|
-
}
|
|
222
254
|
//# sourceMappingURL=runner.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/menders/runner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/menders/runner.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAY7C;;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
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* account shapes a violation can stand on, the evidence a detector trusts,
|
|
8
8
|
* the mend outcomes, and the two gap kinds. Each is an `as const` array with
|
|
9
9
|
* its union, so extending one is a compile error rather than a drift. All
|
|
10
|
-
* are code-only
|
|
10
|
+
* are code-only: no stored record and no account or annex log entry carries
|
|
11
|
+
* one. The ceremony event channel (`ceremonyEvents.ts`) is a separate
|
|
12
|
+
* diagnostics surface, and its events carry the mend outcomes.
|
|
11
13
|
*/
|
|
12
14
|
/**
|
|
13
15
|
* The one authority context a converger needs. `enrolled` and `ladder` are
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vocabulary.d.ts","sourceRoot":"","sources":["../../src/menders/vocabulary.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"vocabulary.d.ts","sourceRoot":"","sources":["../../src/menders/vocabulary.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,oDAAqD,CAAA;AAE7E;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AAEpD;;;;;;;;;GASG;AACH,eAAO,MAAM,QAAQ,6GAMX,CAAA;AAEV;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAA;AAE/C;;;GAGG;AACH,eAAO,MAAM,cAAc,8DAGjB,CAAA;AAEV;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,cAAc,0CAA2C,CAAA;AAEtE;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE1D;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,8KAUX,CAAA;AAEV;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhD;;;GAGG;AACH,eAAO,MAAM,aAAa,4DAMhB,CAAA;AAEV;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAA;AAE5D;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,kCAAmC,CAAA;AAEzD;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* account shapes a violation can stand on, the evidence a detector trusts,
|
|
8
8
|
* the mend outcomes, and the two gap kinds. Each is an `as const` array with
|
|
9
9
|
* its union, so extending one is a compile error rather than a drift. All
|
|
10
|
-
* are code-only
|
|
10
|
+
* are code-only: no stored record and no account or annex log entry carries
|
|
11
|
+
* one. The ceremony event channel (`ceremonyEvents.ts`) is a separate
|
|
12
|
+
* diagnostics surface, and its events carry the mend outcomes.
|
|
11
13
|
*/
|
|
12
14
|
/**
|
|
13
15
|
* The one authority context a converger needs. `enrolled` and `ladder` are
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../../src/menders/vocabulary.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../../src/menders/vocabulary.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;GASG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAU,CAAA;AAO7E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,eAAe;IACf,eAAe;IACf,WAAW;CACH,CAAA;AAOV;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,wBAAwB;IACxB,uBAAuB;CACf,CAAA;AAOV;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,iBAAiB,EAAE,UAAU,CAAU,CAAA;AAOtE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,cAAc;IACd,mBAAmB;IACnB,iBAAiB;IACjB,sBAAsB;IACtB,cAAc;IACd,aAAa;IACb,mBAAmB;IACnB,cAAc;IACd,aAAa;CACL,CAAA;AAOV;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO;IACP,MAAM;IACN,SAAS;IACT,SAAS;IACT,QAAQ;CACA,CAAA;AAOV;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,aAAa,CAAU,CAAA"}
|
|
@@ -1,6 +1,24 @@
|
|
|
1
|
+
import type { CeremonyEmitter, CeremonyOutcome } from '../ceremonyEvents.js';
|
|
1
2
|
import type { DIDDoc, DIDLog, ServiceEndpoint, VerificationMethod } from '@interop/did-method-webvh';
|
|
2
3
|
import type { WebvhIdStore } from '../webvh/didWebvh.js';
|
|
3
4
|
import type { RelationMembership } from '../webvh/mergeMethods.js';
|
|
5
|
+
/**
|
|
6
|
+
* The recovery-code spend's stages on the ceremony event channel, in the
|
|
7
|
+
* order they land: the reveal-and-commit entry, the caller's
|
|
8
|
+
* persist-before-publish seam, and the add-and-retire entry (the pivot).
|
|
9
|
+
* Both continuation variants report them.
|
|
10
|
+
*/
|
|
11
|
+
export declare const RECOVERY_CODE_SPEND_STAGES: readonly ["reveal-commit", "successor-persisted", "add-retire"];
|
|
12
|
+
/**
|
|
13
|
+
* One value of {@link RECOVERY_CODE_SPEND_STAGES}.
|
|
14
|
+
*/
|
|
15
|
+
export type RecoveryCodeSpendStage = (typeof RECOVERY_CODE_SPEND_STAGES)[number];
|
|
16
|
+
/**
|
|
17
|
+
* The spend's typed refusals, matched by `err.name`: a code the document no
|
|
18
|
+
* longer commits (revoked or already spent), a fresh credential the account
|
|
19
|
+
* already stands on, and an account with no log to recover.
|
|
20
|
+
*/
|
|
21
|
+
export declare const RECOVERY_CODE_SPEND_REFUSALS: string[];
|
|
4
22
|
/**
|
|
5
23
|
* What the add-and-retire entry retired, read back OFF THE LOG -- the resumed
|
|
6
24
|
* spend's answer to the same question the live run answers from the document
|
|
@@ -221,9 +239,12 @@ export interface RecoveryContinuationOutcome extends RecoverySpendRetirement {
|
|
|
221
239
|
* variant supplies its fresh credential's; the remembered variant's new
|
|
222
240
|
* client publishes a marked pair, which is never credential-class
|
|
223
241
|
* @param [options.expectedDid] {string}
|
|
242
|
+
* @param [options.events] {CeremonyEmitter} the running spend's emitter,
|
|
243
|
+
* which each landed stage reports through. The conflict retry re-enters
|
|
244
|
+
* this body, and the emitter reports a stage once per run
|
|
224
245
|
* @returns {Promise<RecoveryContinuationOutcome>}
|
|
225
246
|
*/
|
|
226
|
-
export declare function recoveryContinuationOnce<Persisted>({ store, recovery, successor, replacement, onCommitted, added, credentialVmIds, expectedDid }: {
|
|
247
|
+
export declare function recoveryContinuationOnce<Persisted>({ store, recovery, successor, replacement, onCommitted, added, credentialVmIds, expectedDid, events }: {
|
|
227
248
|
store: RecoveryLogStore;
|
|
228
249
|
recovery: RecoveryPublicKeys & {
|
|
229
250
|
updateSeed: Uint8Array;
|
|
@@ -247,5 +268,23 @@ export declare function recoveryContinuationOnce<Persisted>({ store, recovery, s
|
|
|
247
268
|
}) => RecoveryAddedInventory;
|
|
248
269
|
credentialVmIds?: (did: string) => string[];
|
|
249
270
|
expectedDid?: string;
|
|
271
|
+
events?: CeremonyEmitter<RecoveryCodeSpendStage>;
|
|
250
272
|
}): Promise<RecoveryContinuationOutcome>;
|
|
273
|
+
/**
|
|
274
|
+
* Classifies a returned recovery continuation for the ceremony event channel:
|
|
275
|
+
* `noop` when the pivot entry already stood (a resumed, completed spend),
|
|
276
|
+
* `partial` when a retired credential could not be anchored and kept its
|
|
277
|
+
* rungs (reported to the caller rather than struck), and `clean` otherwise.
|
|
278
|
+
*
|
|
279
|
+
* @param outcome {object}
|
|
280
|
+
* @param outcome.committed {boolean}
|
|
281
|
+
* @param outcome.unclaimedCredentialVmIds {string[]}
|
|
282
|
+
* @returns {{ outcome: CeremonyOutcome }}
|
|
283
|
+
*/
|
|
284
|
+
export declare function spendOutcome({ committed, unclaimedCredentialVmIds }: {
|
|
285
|
+
committed: boolean;
|
|
286
|
+
unclaimedCredentialVmIds: string[];
|
|
287
|
+
}): {
|
|
288
|
+
outcome: CeremonyOutcome;
|
|
289
|
+
};
|
|
251
290
|
//# sourceMappingURL=continuation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"continuation.d.ts","sourceRoot":"","sources":["../../src/recovery/continuation.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,eAAe,EACf,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAOlC,OAAO,KAAK,EAAqB,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAG3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAgBlE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,6BAA6B,CAAC,EAC5C,GAAG,EACH,GAAG,EACH,qBAAqB,EACrB,SAAS,EACV,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,qBAAqB,EAAE,MAAM,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB,GAAG,MAAM,EAAE,CAeX;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,uBAAuB;IACtC,sBAAsB,EAAE,MAAM,EAAE,CAAA;IAChC,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1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IAC5B,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,EAAE,CAAA;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,eAAe,CAAC,sBAAsB,CAAC,CAAA;CACjD,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAwQvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,wBAAwB,EACzB,EAAE;IACD,SAAS,EAAE,OAAO,CAAA;IAClB,wBAAwB,EAAE,MAAM,EAAE,CAAA;CACnC,GAAG;IAAE,OAAO,EAAE,eAAe,CAAA;CAAE,CAK/B"}
|
|
@@ -29,6 +29,27 @@ import { credentialKeyAgreementMethods, ladderVmIds, retiredCredentialKeys } fro
|
|
|
29
29
|
// helpers only, never the annex log machinery. The add-and-retire entry
|
|
30
30
|
// resolves each retired credential's standing rungs from the log with them.
|
|
31
31
|
import { assertNextKeyHashesRemain, attributeRetiredCredentialRungs, retiredCredentialRungsBeforeKey } from '../clientAnnex/ladder.js';
|
|
32
|
+
/**
|
|
33
|
+
* The recovery-code spend's stages on the ceremony event channel, in the
|
|
34
|
+
* order they land: the reveal-and-commit entry, the caller's
|
|
35
|
+
* persist-before-publish seam, and the add-and-retire entry (the pivot).
|
|
36
|
+
* Both continuation variants report them.
|
|
37
|
+
*/
|
|
38
|
+
export const RECOVERY_CODE_SPEND_STAGES = [
|
|
39
|
+
'reveal-commit',
|
|
40
|
+
'successor-persisted',
|
|
41
|
+
'add-retire'
|
|
42
|
+
];
|
|
43
|
+
/**
|
|
44
|
+
* The spend's typed refusals, matched by `err.name`: a code the document no
|
|
45
|
+
* longer commits (revoked or already spent), a fresh credential the account
|
|
46
|
+
* already stands on, and an account with no log to recover.
|
|
47
|
+
*/
|
|
48
|
+
export const RECOVERY_CODE_SPEND_REFUSALS = [
|
|
49
|
+
'RecoveryKeyNotCommittedError',
|
|
50
|
+
'RecoveryCredentialStandingError',
|
|
51
|
+
'AccountLogMissingError'
|
|
52
|
+
];
|
|
32
53
|
/**
|
|
33
54
|
* What the add-and-retire entry retired, read back OFF THE LOG -- the resumed
|
|
34
55
|
* spend's answer to the same question the live run answers from the document
|
|
@@ -226,9 +247,12 @@ export class RecoveryCredentialStandingError extends Error {
|
|
|
226
247
|
* variant supplies its fresh credential's; the remembered variant's new
|
|
227
248
|
* client publishes a marked pair, which is never credential-class
|
|
228
249
|
* @param [options.expectedDid] {string}
|
|
250
|
+
* @param [options.events] {CeremonyEmitter} the running spend's emitter,
|
|
251
|
+
* which each landed stage reports through. The conflict retry re-enters
|
|
252
|
+
* this body, and the emitter reports a stage once per run
|
|
229
253
|
* @returns {Promise<RecoveryContinuationOutcome>}
|
|
230
254
|
*/
|
|
231
|
-
export async function recoveryContinuationOnce({ store, recovery, successor, replacement, onCommitted, added, credentialVmIds, expectedDid }) {
|
|
255
|
+
export async function recoveryContinuationOnce({ store, recovery, successor, replacement, onCommitted, added, credentialVmIds, expectedDid, events }) {
|
|
232
256
|
const pinned = {
|
|
233
257
|
...(expectedDid !== undefined ? { expectedDid } : {})
|
|
234
258
|
};
|
|
@@ -288,6 +312,9 @@ export async function recoveryContinuationOnce({ store, recovery, successor, rep
|
|
|
288
312
|
build: () => ({ commitHashes: protectedHashes })
|
|
289
313
|
});
|
|
290
314
|
let published = accountEntryHead({ outcome: reveal });
|
|
315
|
+
events?.stage('reveal-commit', {
|
|
316
|
+
...(reveal.updated ? {} : { prior: true })
|
|
317
|
+
});
|
|
291
318
|
// The seam is deliberately NOT entered on the completed branch -- nothing
|
|
292
319
|
// is about to be published, so there is no pivot to persist ahead of.
|
|
293
320
|
if (complete(published)) {
|
|
@@ -306,6 +333,7 @@ export async function recoveryContinuationOnce({ store, recovery, successor, rep
|
|
|
306
333
|
replacementUpdateKeyMultibase: replacement.updateKeyMultibase,
|
|
307
334
|
spentKeyAgreementKeyMultibase: recovery.keyAgreementKeyMultibase
|
|
308
335
|
});
|
|
336
|
+
events?.stage('add-retire', { prior: true });
|
|
309
337
|
return {
|
|
310
338
|
did: published.did,
|
|
311
339
|
doc: published.doc,
|
|
@@ -331,6 +359,7 @@ export async function recoveryContinuationOnce({ store, recovery, successor, rep
|
|
|
331
359
|
const persisted = await onCommitted({
|
|
332
360
|
builtOnHead: servedHead(published.log)
|
|
333
361
|
});
|
|
362
|
+
events?.stage('successor-persisted');
|
|
334
363
|
// The add-and-retire entry: the variant's successor inventory in, the
|
|
335
364
|
// replacement code's inventory in after it, every pre-recovery standing
|
|
336
365
|
// credential fully retired -- the spent code by name, and every other one
|
|
@@ -454,6 +483,7 @@ export async function recoveryContinuationOnce({ store, recovery, successor, rep
|
|
|
454
483
|
});
|
|
455
484
|
// The build never declines, so the seam published.
|
|
456
485
|
const updated = add.updated;
|
|
486
|
+
events?.stage('add-retire');
|
|
457
487
|
return {
|
|
458
488
|
did: updated.did,
|
|
459
489
|
doc: updated.doc,
|
|
@@ -465,4 +495,21 @@ export async function recoveryContinuationOnce({ store, recovery, successor, rep
|
|
|
465
495
|
unclaimedCredentialVmIds: strike.unclaimedCredentialVmIds
|
|
466
496
|
};
|
|
467
497
|
}
|
|
498
|
+
/**
|
|
499
|
+
* Classifies a returned recovery continuation for the ceremony event channel:
|
|
500
|
+
* `noop` when the pivot entry already stood (a resumed, completed spend),
|
|
501
|
+
* `partial` when a retired credential could not be anchored and kept its
|
|
502
|
+
* rungs (reported to the caller rather than struck), and `clean` otherwise.
|
|
503
|
+
*
|
|
504
|
+
* @param outcome {object}
|
|
505
|
+
* @param outcome.committed {boolean}
|
|
506
|
+
* @param outcome.unclaimedCredentialVmIds {string[]}
|
|
507
|
+
* @returns {{ outcome: CeremonyOutcome }}
|
|
508
|
+
*/
|
|
509
|
+
export function spendOutcome({ committed, unclaimedCredentialVmIds }) {
|
|
510
|
+
if (unclaimedCredentialVmIds.length > 0) {
|
|
511
|
+
return { outcome: 'partial' };
|
|
512
|
+
}
|
|
513
|
+
return { outcome: committed ? 'clean' : 'noop' };
|
|
514
|
+
}
|
|
468
515
|
//# sourceMappingURL=continuation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"continuation.js","sourceRoot":"","sources":["../../src/recovery/continuation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAO7D,OAAO,EACL,mBAAmB,EACnB,wBAAwB,EACxB,uBAAuB,EACvB,UAAU,EACX,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AAEnE,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AACxE,OAAO,EACL,6BAA6B,EAC7B,WAAW,EACX,qBAAqB,EACtB,MAAM,4BAA4B,CAAA;AACnC,wEAAwE;AACxE,wEAAwE;AACxE,4EAA4E;AAC5E,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,+BAA+B,EAChC,MAAM,0BAA0B,CAAA;AAEjC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,6BAA6B,CAAC,EAC5C,GAAG,EACH,GAAG,EACH,qBAAqB,EACrB,SAAS,EAMV;IACC,MAAM,MAAM,GAAG,mBAAmB,CAAC,GAAG,CAAC,CAAA;IACvC,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CACrC,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CACzD,CAAA;IACD,MAAM,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;IAC9D,MAAM,QAAQ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AAC,GAAG;QAChB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,SAAS,EAAE,IAAI;QACf,sBAAsB;QACtB,gBAAgB,EAAE,MAAM,CAAC,YAAY;QACrC,wBAAwB,EAAE,MAAM,CAAC,wBAAwB;KAC1D,CAAA;AACH,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,SAAS,EACT,wBAAwB,EAIzB;IACC,IAAI,wBAAwB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAA;IAC/B,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,EAAE,CAAA;AAClD,CAAC"}
|
package/dist/recovery/index.d.ts
CHANGED
|
@@ -51,6 +51,6 @@ export type { SignedUnlockRecord, UnlockRecordContents, UnlockRecordProofState }
|
|
|
51
51
|
export { delegateLogWrite, delegationProofKeyId, RECOVERY_DELEGATION_TTL_MS, recordedDelegationFields, ZCAP_RENEWAL_WINDOW_MS, zcapExpiring } from './recoveryDelegation.js';
|
|
52
52
|
export { recoverySpendRetirementFromLog } from './continuation.js';
|
|
53
53
|
export type { RecoverySpendRetirement } from './continuation.js';
|
|
54
|
-
export { publishRecoveryKey, recoverWebvhClient, RecoveryCredentialStandingError, RecoveryKeyNotCommittedError, recoveryVmId, removeRecoveryKey } from './recoveryWebvh.js';
|
|
55
|
-
export type { RecoveryLogStore, RecoveryPublicKeys, ReplacementRecoveryPublicKeys } from './recoveryWebvh.js';
|
|
54
|
+
export { publishRecoveryKey, RECOVERY_CODE_ISSUANCE_STAGES, RECOVERY_CODE_REVOCATION_STAGES, RECOVERY_CODE_SPEND_STAGES, recoverWebvhClient, RecoveryCredentialStandingError, RecoveryKeyNotCommittedError, recoveryVmId, removeRecoveryKey } from './recoveryWebvh.js';
|
|
55
|
+
export type { RecoveryCodeIssuanceStage, RecoveryCodeRevocationStage, RecoveryCodeSpendStage, RecoveryLogStore, RecoveryPublicKeys, ReplacementRecoveryPublicKeys } from './recoveryWebvh.js';
|
|
56
56
|
//# sourceMappingURL=index.d.ts.map
|