@interop/wallet-core 0.104.2 → 0.105.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -18
- package/dist/clientAnnex/gc.d.ts +13 -2
- package/dist/clientAnnex/gc.d.ts.map +1 -1
- package/dist/clientAnnex/gc.js +17 -4
- package/dist/clientAnnex/gc.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +17 -11
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +23 -19
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
- package/dist/clientAnnex/selfEnroll.js +0 -3
- package/dist/clientAnnex/selfEnroll.js.map +1 -1
- package/dist/enrollment/enrollment.d.ts.map +1 -1
- package/dist/enrollment/enrollment.js +0 -3
- package/dist/enrollment/enrollment.js.map +1 -1
- package/dist/genesis/accountGenesis.d.ts +9 -4
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/genesis/accountGenesis.js +8 -9
- package/dist/genesis/accountGenesis.js.map +1 -1
- package/dist/menders/derive.d.ts +16 -15
- package/dist/menders/derive.d.ts.map +1 -1
- package/dist/menders/derive.js +19 -26
- package/dist/menders/derive.js.map +1 -1
- package/dist/menders/index.d.ts +7 -3
- package/dist/menders/index.d.ts.map +1 -1
- package/dist/menders/index.js +7 -3
- package/dist/menders/index.js.map +1 -1
- package/dist/menders/registry.d.ts +15 -10
- package/dist/menders/registry.d.ts.map +1 -1
- package/dist/menders/registry.js +22 -11
- package/dist/menders/registry.js.map +1 -1
- package/dist/menders/runner.d.ts +19 -2
- package/dist/menders/runner.d.ts.map +1 -1
- package/dist/menders/runner.js +17 -8
- package/dist/menders/runner.js.map +1 -1
- package/dist/menders/types.d.ts +9 -6
- package/dist/menders/types.d.ts.map +1 -1
- package/dist/resourceLog/controller.d.ts +5 -4
- package/dist/resourceLog/controller.d.ts.map +1 -1
- package/dist/resourceLog/controller.js.map +1 -1
- package/dist/unlock/standingClient.d.ts.map +1 -1
- package/dist/unlock/standingClient.js +0 -3
- package/dist/unlock/standingClient.js.map +1 -1
- package/dist/webvh/index.d.ts +5 -2
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +5 -2
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/verifyLog.d.ts +35 -2
- package/dist/webvh/verifyLog.d.ts.map +1 -1
- package/dist/webvh/verifyLog.js +105 -26
- package/dist/webvh/verifyLog.js.map +1 -1
- package/package.json +5 -5
package/dist/menders/index.d.ts
CHANGED
|
@@ -23,8 +23,12 @@
|
|
|
23
23
|
* discipline over one registration, shared by the chain runner and a
|
|
24
24
|
* wallet's encounter sites; `runMenderBlock`, that discipline over one
|
|
25
25
|
* chain trigger's registrations; `mendReportAccumulator`, the
|
|
26
|
-
* pre-session report collector its `onOutcome` feeds
|
|
27
|
-
* the
|
|
26
|
+
* pre-session report collector its `onOutcome` feeds; `matchesReports`,
|
|
27
|
+
* the one rule for whether a site's entries name its `reports` in that
|
|
28
|
+
* order and no others, which the runner applies to a converging
|
|
29
|
+
* registration and a report-only site applies to the entries it records;
|
|
30
|
+
* and `errorNameOf`, the name a report carries for a thrown value of any
|
|
31
|
+
* shape
|
|
28
32
|
* - the derived sets a wallet's audit tests pin:
|
|
29
33
|
* `transientReachableInvariants`, `deriveGaps`, `undeclaredGaps`, and
|
|
30
34
|
* `undeclaredInvariants`
|
|
@@ -39,7 +43,7 @@ export type { InvariantId } from './ids.js';
|
|
|
39
43
|
export { heldAuthorities, menderRegistry } from './registry.js';
|
|
40
44
|
export type { MenderRegistry, ResolvedAuthority } from './registry.js';
|
|
41
45
|
export { errorNameOf } from '../errorName.js';
|
|
42
|
-
export { MEND_REPORT_SHAPE_ERROR, mendReportAccumulator, runMenderBlock, runMenderRegistration } from './runner.js';
|
|
46
|
+
export { MEND_REPORT_SHAPE_ERROR, matchesReports, mendReportAccumulator, runMenderBlock, runMenderRegistration } from './runner.js';
|
|
43
47
|
export type { MendReportAccumulator } from './runner.js';
|
|
44
48
|
export type { InvariantDeclaration, InvariantGap, LoginRoute, MendOutcome, MendReport, MendReportEntry, Registration, RegistrationSite } from './types.js';
|
|
45
49
|
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
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/menders/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;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,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACtB,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
|
@@ -23,8 +23,12 @@
|
|
|
23
23
|
* discipline over one registration, shared by the chain runner and a
|
|
24
24
|
* wallet's encounter sites; `runMenderBlock`, that discipline over one
|
|
25
25
|
* chain trigger's registrations; `mendReportAccumulator`, the
|
|
26
|
-
* pre-session report collector its `onOutcome` feeds
|
|
27
|
-
* the
|
|
26
|
+
* pre-session report collector its `onOutcome` feeds; `matchesReports`,
|
|
27
|
+
* the one rule for whether a site's entries name its `reports` in that
|
|
28
|
+
* order and no others, which the runner applies to a converging
|
|
29
|
+
* registration and a report-only site applies to the entries it records;
|
|
30
|
+
* and `errorNameOf`, the name a report carries for a thrown value of any
|
|
31
|
+
* shape
|
|
28
32
|
* - the derived sets a wallet's audit tests pin:
|
|
29
33
|
* `transientReachableInvariants`, `deriveGaps`, `undeclaredGaps`, and
|
|
30
34
|
* `undeclaredInvariants`
|
|
@@ -37,6 +41,6 @@ export { deriveGaps, transientReachableInvariants, undeclaredGaps, undeclaredInv
|
|
|
37
41
|
export { INVARIANT_IDS } from './ids.js';
|
|
38
42
|
export { heldAuthorities, menderRegistry } from './registry.js';
|
|
39
43
|
export { errorNameOf } from '../errorName.js';
|
|
40
|
-
export { MEND_REPORT_SHAPE_ERROR, mendReportAccumulator, runMenderBlock, runMenderRegistration } from './runner.js';
|
|
44
|
+
export { MEND_REPORT_SHAPE_ERROR, matchesReports, mendReportAccumulator, runMenderBlock, runMenderRegistration } from './runner.js';
|
|
41
45
|
export { ACCOUNT_SHAPES, AUTHORITIES, CHAIN_TRIGGERS, EVIDENCE, GAP_KINDS, MEND_OUTCOMES, TRIGGERS } from './vocabulary.js';
|
|
42
46
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/menders/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/menders/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;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,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,qBAAqB,EACtB,MAAM,aAAa,CAAA;AAYpB,OAAO,EACL,cAAc,EACd,WAAW,EACX,cAAc,EACd,QAAQ,EACR,SAAS,EACT,aAAa,EACb,QAAQ,EACT,MAAM,iBAAiB,CAAA"}
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
* Registration order is execution order; there is no dependency graph and
|
|
11
11
|
* no priority. The table and the sites are checked once, at construction: a
|
|
12
12
|
* duplicated declaration id, a site reporting an undeclared invariant, a
|
|
13
|
-
* guard on a non-routing site, an encounter site with no
|
|
14
|
-
* declaration listing `encounter` that no
|
|
15
|
-
* `TypeError` there, so no reader meets
|
|
16
|
-
* a login happens to hold. Both wallets
|
|
17
|
-
* the error surfaces at module load.
|
|
13
|
+
* guard on a non-routing site, an encounter or ceremony-tail site with no
|
|
14
|
+
* reach, or a declaration listing `encounter` or `ceremony-tail` that no
|
|
15
|
+
* site of that trigger reports is a `TypeError` there, so no reader meets
|
|
16
|
+
* the defect later, depending on what a login happens to hold. Both wallets
|
|
17
|
+
* build their registries at import, so the error surfaces at module load.
|
|
18
18
|
*/
|
|
19
19
|
import type { InvariantId } from './ids.js';
|
|
20
20
|
import type { InvariantDeclaration, LoginRoute, RegistrationSite } from './types.js';
|
|
@@ -71,9 +71,13 @@ export declare function heldAuthorities({ kind }: {
|
|
|
71
71
|
/**
|
|
72
72
|
* Builds the readers over one wallet's declarations and sites, checking
|
|
73
73
|
* both once: every declaration id is unique, every reported id is declared,
|
|
74
|
-
* only a `login-routing` site carries `guardedBy`, every `encounter`
|
|
75
|
-
* names at least one session kind in `reachedBy`, and
|
|
76
|
-
*
|
|
74
|
+
* only a `login-routing` site carries `guardedBy`, every `encounter` and
|
|
75
|
+
* `ceremony-tail` site names at least one session kind in `reachedBy`, and
|
|
76
|
+
* every declaration
|
|
77
|
+
* listing `encounter` or `ceremony-tail` among its triggers is reported by
|
|
78
|
+
* a site of that trigger. A tail site is report-only, as a routing site
|
|
79
|
+
* is: the ceremony's own sequenced code converges, and the site says which
|
|
80
|
+
* invariants it reports.
|
|
77
81
|
*
|
|
78
82
|
* @param options {object}
|
|
79
83
|
* @param options.declarations {ReadonlyArray<InvariantDeclaration>}
|
|
@@ -81,8 +85,9 @@ export declare function heldAuthorities({ kind }: {
|
|
|
81
85
|
* registration site, any trigger, in execution order within a trigger
|
|
82
86
|
* @returns {MenderRegistry}
|
|
83
87
|
* @throws {TypeError} on a duplicated declaration id, an undeclared
|
|
84
|
-
* report, a guard on a non-routing site, an encounter
|
|
85
|
-
* or an encounter trigger no
|
|
88
|
+
* report, a guard on a non-routing site, an encounter or ceremony-tail
|
|
89
|
+
* site with no reach, or an encounter or ceremony-tail trigger no site of
|
|
90
|
+
* that trigger backs
|
|
86
91
|
*/
|
|
87
92
|
export declare function menderRegistry<Site extends RegistrationSite, Deps, Ceremony extends string = string>({ declarations, sites }: {
|
|
88
93
|
declarations: ReadonlyArray<InvariantDeclaration<Deps, Ceremony>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/menders/registry.ts"],"names":[],"mappings":"A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IAAI,CAAC,EAAE,iBAAiB,CAAA;CACzB,GAAG,aAAa,CAAC,SAAS,CAAC,CAE3B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,cAAc,CAC5B,IAAI,SAAS,gBAAgB,EAC7B,IAAI,EACJ,QAAQ,SAAS,MAAM,GAAG,MAAM,EAChC,EACA,YAAY,EACZ,KAAK,EACN,EAAE;IACD,YAAY,EAAE,aAAa,CAAC,oBAAoB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAA;IACjE,KAAK,EAAE,aAAa,CAAC,IAAI,CAAC,CAAA;CAC3B,GAAG,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,CA4EvC"}
|
package/dist/menders/registry.js
CHANGED
|
@@ -14,9 +14,13 @@ export function heldAuthorities({ kind }) {
|
|
|
14
14
|
/**
|
|
15
15
|
* Builds the readers over one wallet's declarations and sites, checking
|
|
16
16
|
* both once: every declaration id is unique, every reported id is declared,
|
|
17
|
-
* only a `login-routing` site carries `guardedBy`, every `encounter`
|
|
18
|
-
* names at least one session kind in `reachedBy`, and
|
|
19
|
-
*
|
|
17
|
+
* only a `login-routing` site carries `guardedBy`, every `encounter` and
|
|
18
|
+
* `ceremony-tail` site names at least one session kind in `reachedBy`, and
|
|
19
|
+
* every declaration
|
|
20
|
+
* listing `encounter` or `ceremony-tail` among its triggers is reported by
|
|
21
|
+
* a site of that trigger. A tail site is report-only, as a routing site
|
|
22
|
+
* is: the ceremony's own sequenced code converges, and the site says which
|
|
23
|
+
* invariants it reports.
|
|
20
24
|
*
|
|
21
25
|
* @param options {object}
|
|
22
26
|
* @param options.declarations {ReadonlyArray<InvariantDeclaration>}
|
|
@@ -24,8 +28,9 @@ export function heldAuthorities({ kind }) {
|
|
|
24
28
|
* registration site, any trigger, in execution order within a trigger
|
|
25
29
|
* @returns {MenderRegistry}
|
|
26
30
|
* @throws {TypeError} on a duplicated declaration id, an undeclared
|
|
27
|
-
* report, a guard on a non-routing site, an encounter
|
|
28
|
-
* or an encounter trigger no
|
|
31
|
+
* report, a guard on a non-routing site, an encounter or ceremony-tail
|
|
32
|
+
* site with no reach, or an encounter or ceremony-tail trigger no site of
|
|
33
|
+
* that trigger backs
|
|
29
34
|
*/
|
|
30
35
|
export function menderRegistry({ declarations, sites }) {
|
|
31
36
|
const index = new Map();
|
|
@@ -42,23 +47,29 @@ export function menderRegistry({ declarations, sites }) {
|
|
|
42
47
|
}
|
|
43
48
|
return decl;
|
|
44
49
|
};
|
|
45
|
-
const
|
|
50
|
+
const reachTriggers = ['encounter', 'ceremony-tail'];
|
|
51
|
+
const backedBy = {
|
|
52
|
+
encounter: new Set(),
|
|
53
|
+
'ceremony-tail': new Set()
|
|
54
|
+
};
|
|
46
55
|
for (const site of sites) {
|
|
47
56
|
site.reports.forEach(requireDeclared);
|
|
48
57
|
const { trigger, guardedBy, reachedBy } = site;
|
|
49
58
|
if (guardedBy !== undefined && trigger !== 'login-routing') {
|
|
50
59
|
throw new TypeError(`A ${trigger} site carries a guard; only a login-routing site may`);
|
|
51
60
|
}
|
|
52
|
-
if (trigger === 'encounter') {
|
|
61
|
+
if (trigger === 'encounter' || trigger === 'ceremony-tail') {
|
|
53
62
|
if (!reachedBy || reachedBy.length === 0) {
|
|
54
|
-
throw new TypeError(`
|
|
63
|
+
throw new TypeError(`A ${trigger} site names no session kind that reaches it: ${site.reports.join(', ')}`);
|
|
55
64
|
}
|
|
56
|
-
site.reports.forEach(id =>
|
|
65
|
+
site.reports.forEach(id => backedBy[trigger].add(id));
|
|
57
66
|
}
|
|
58
67
|
}
|
|
59
68
|
for (const decl of declarations) {
|
|
60
|
-
|
|
61
|
-
|
|
69
|
+
for (const trigger of reachTriggers) {
|
|
70
|
+
if (decl.triggers.includes(trigger) && !backedBy[trigger].has(decl.id)) {
|
|
71
|
+
throw new TypeError(`An invariant lists the ${trigger} trigger but no ${trigger} site reports it: ${decl.id}`);
|
|
72
|
+
}
|
|
62
73
|
}
|
|
63
74
|
}
|
|
64
75
|
const admits = ({ site, held, route }) => site.reports.every(id => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/menders/registry.ts"],"names":[],"mappings":"AAoEA;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,EAC9B,IAAI,EAGL;IACC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;AACpD,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/menders/registry.ts"],"names":[],"mappings":"AAoEA;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,EAC9B,IAAI,EAGL;IACC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;AACpD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,cAAc,CAI5B,EACA,YAAY,EACZ,KAAK,EAIN;IACC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAqD,CAAA;IAC1E,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE,CAAC;QAChC,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,SAAS,CAAC,mCAAmC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAA;QACnE,CAAC;QACD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;IAC1B,CAAC;IACD,MAAM,eAAe,GAAG,CACtB,EAAe,EACuB,EAAE;QACxC,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QAC1B,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAA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CAAC,EAAE,CAAC,EAAE,CAAC;gBACvE,MAAM,IAAI,SAAS,CACjB,0BAA0B,OAAO,mBAAmB,OAAO,qBAAqB,IAAI,CAAC,EAAE,EAAE,CAC1F,CAAA;YACH,CAAC;QACH,CAAC;IACH,CAAC;IACD,MAAM,MAAM,GAAG,CAAC,EACd,IAAI,EACJ,IAAI,EACJ,KAAK,EAKN,EAAW,EAAE,CACZ,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;QACtB,MAAM,IAAI,GAAG,eAAe,CAAC,EAAE,CAAC,CAAA;QAChC,OAAO,CACL,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;YAC7B,CAAC,KAAK,KAAK,SAAS,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CACxD,CAAA;IACH,CAAC,CAAC,CAAA;IACJ,OAAO;QACL,GAAG,EAAE,GAAG,EAAE,CAAC,YAAY;QACvB,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;QACzB,KAAK,EAAE,GAAG,EAAE,CAAC,KAAK;QAClB,MAAM;QACN,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CAClC,KAAK,CAAC,MAAM,CACV,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,OAAO,IAAI,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAClE;KACJ,CAAA;AACH,CAAC"}
|
package/dist/menders/runner.d.ts
CHANGED
|
@@ -91,8 +91,9 @@ export declare function mendReportAccumulator<Ceremony extends string = string>(
|
|
|
91
91
|
* reported, once per entry.
|
|
92
92
|
*
|
|
93
93
|
* `trigger` is one of the two chain values, so a `ceremony-tail` entry is
|
|
94
|
-
* out of reach here. Such an entry has
|
|
95
|
-
* stays inside its ceremony's sequenced code and it
|
|
94
|
+
* out of reach here. Such an entry has a report-only site and no
|
|
95
|
+
* `converge`: its body stays inside its ceremony's sequenced code and it
|
|
96
|
+
* reports from there.
|
|
96
97
|
*
|
|
97
98
|
* `Deps` is the wallet's own type, one object per registration block,
|
|
98
99
|
* handed to the seed and to every `converge` unread. This runner never
|
|
@@ -190,4 +191,20 @@ export declare function runMenderRegistration<Deps, Ceremony extends string = st
|
|
|
190
191
|
entries: MendReport<Ceremony>;
|
|
191
192
|
threw: boolean;
|
|
192
193
|
}>;
|
|
194
|
+
/**
|
|
195
|
+
* Whether a site's entries match its `reports`: the entries name the site's
|
|
196
|
+
* reported invariants, in that order, and no others. The runner holds a
|
|
197
|
+
* converging registration's return to this rule, and a report-only site (a
|
|
198
|
+
* routing site, a self-calling encounter site, a ceremony tail) holds the
|
|
199
|
+
* entries it records to the same one.
|
|
200
|
+
*
|
|
201
|
+
* @param options {object}
|
|
202
|
+
* @param options.site {RegistrationSite}
|
|
203
|
+
* @param options.entries {ReadonlyArray<MendReportEntry>}
|
|
204
|
+
* @returns {boolean}
|
|
205
|
+
*/
|
|
206
|
+
export declare function matchesReports<Ceremony extends string = string>({ site, entries }: {
|
|
207
|
+
site: RegistrationSite;
|
|
208
|
+
entries: ReadonlyArray<MendReportEntry<Ceremony>>;
|
|
209
|
+
}): boolean;
|
|
193
210
|
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/menders/runner.ts"],"names":[],"mappings":"AAoBA,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,E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|
package/dist/menders/runner.js
CHANGED
|
@@ -92,8 +92,9 @@ export function mendReportAccumulator({ logger } = {}) {
|
|
|
92
92
|
* reported, once per entry.
|
|
93
93
|
*
|
|
94
94
|
* `trigger` is one of the two chain values, so a `ceremony-tail` entry is
|
|
95
|
-
* out of reach here. Such an entry has
|
|
96
|
-
* stays inside its ceremony's sequenced code and it
|
|
95
|
+
* out of reach here. Such an entry has a report-only site and no
|
|
96
|
+
* `converge`: its body stays inside its ceremony's sequenced code and it
|
|
97
|
+
* reports from there.
|
|
97
98
|
*
|
|
98
99
|
* `Deps` is the wallet's own type, one object per registration block,
|
|
99
100
|
* handed to the seed and to every `converge` unread. This runner never
|
|
@@ -228,7 +229,7 @@ async function convergeUnderDiscipline({ registry, registration, deps, logger })
|
|
|
228
229
|
const { trigger } = registration;
|
|
229
230
|
try {
|
|
230
231
|
const entries = await registration.converge(deps);
|
|
231
|
-
if (!matchesReports({ registration, entries })) {
|
|
232
|
+
if (!matchesReports({ site: registration, entries })) {
|
|
232
233
|
logger.warn('A mender registration returned entries that do not match the invariants it reports', { trigger, reports: [...registration.reports] });
|
|
233
234
|
// A malformed return is a defect in the adapter rather than a mend
|
|
234
235
|
// failure: the step ran to completion, so a malformed seed does not
|
|
@@ -273,12 +274,20 @@ function isRegistration(site) {
|
|
|
273
274
|
return typeof site.converge === 'function';
|
|
274
275
|
}
|
|
275
276
|
/**
|
|
276
|
-
* Whether a
|
|
277
|
-
* order.
|
|
277
|
+
* Whether a site's entries match its `reports`: the entries name the site's
|
|
278
|
+
* reported invariants, in that order, and no others. The runner holds a
|
|
279
|
+
* converging registration's return to this rule, and a report-only site (a
|
|
280
|
+
* routing site, a self-calling encounter site, a ceremony tail) holds the
|
|
281
|
+
* entries it records to the same one.
|
|
282
|
+
*
|
|
283
|
+
* @param options {object}
|
|
284
|
+
* @param options.site {RegistrationSite}
|
|
285
|
+
* @param options.entries {ReadonlyArray<MendReportEntry>}
|
|
286
|
+
* @returns {boolean}
|
|
278
287
|
*/
|
|
279
|
-
function matchesReports({
|
|
280
|
-
return (entries.length ===
|
|
281
|
-
entries.every((entry, index) => entry.invariant ===
|
|
288
|
+
export function matchesReports({ site, entries }) {
|
|
289
|
+
return (entries.length === site.reports.length &&
|
|
290
|
+
entries.every((entry, index) => entry.invariant === site.reports[index]));
|
|
282
291
|
}
|
|
283
292
|
/**
|
|
284
293
|
* One `failed` entry per reported invariant, carrying the declaration's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/menders/runner.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAY7C;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,sBAAsB,CAAA;AAuC7D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,qBAAqB,CAAmC,EACtE,MAAM,KACiB,EAAE;IACzB,MAAM,QAAQ,GAAqC,EAAE,CAAA;IACrD,IAAI,cAAc,GAA2C,GAAG,EAAE,CAAC,SAAS,CAAA;IAC5E,MAAM,OAAO,GAAG,IAAI,OAAO,CAAuB,OAAO,CAAC,EAAE;QAC1D,cAAc,GAAG,OAAO,CAAA;IAC1B,CAAC,CAAC,CAAA;IACF,IAAI,SAA2C,CAAA;IAC/C,OAAO;QACL,MAAM,CAAC,KAAK,EAAE,EAAE,GAAG,KAAwB,EAAE;YAC3C,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;YACpB,IAAI,MAAM,EAAE,CAAC;gBACX,yDAAyD;gBACzD,WAAW,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAA;YAC1C,CAAC;QACH,CAAC;QACD,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC;QAC5B,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;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAAmC,EAC/D,IAAI,EACJ,OAAO,EAIR;IACC,OAAO,CACL,OAAO,CAAC,MAAM,KAAK,IAAI,CAAC,OAAO,CAAC,MAAM;QACtC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CACzE,CAAA;AACH,CAAC;AAED;;;GAGG;AACH,SAAS,aAAa,CAIpB,EACA,QAAQ,EACR,YAAY,EACZ,SAAS,EAKV;IACC,OAAO,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE;QACnC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,UAAU,CAAA;QAChD,OAAO;YACL,SAAS,EAAE,EAAE;YACb,OAAO,EAAE,QAAiB;YAC1B,SAAS;YACT,GAAG,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC/D,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/menders/types.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* feed the same readers.
|
|
13
13
|
*/
|
|
14
14
|
import type { InvariantId } from './ids.js';
|
|
15
|
-
import type { AccountShape, Authority, Evidence, GapKind, MendOutcomeKind, Trigger } from './vocabulary.js';
|
|
15
|
+
import type { AccountShape, Authority, ChainTrigger, Evidence, GapKind, MendOutcomeKind, Trigger } from './vocabulary.js';
|
|
16
16
|
/**
|
|
17
17
|
* The login route a declaration's `when` predicate reads: the popup axis
|
|
18
18
|
* alone today, the CHAPI popup being the one route on which several chain
|
|
@@ -86,12 +86,15 @@ export interface InvariantDeclaration<Deps, Ceremony extends string = string> {
|
|
|
86
86
|
* or ceremony-tail site cannot carry one and the chain readers never have
|
|
87
87
|
* to honor it. An encounter site says which session kinds reach the read or
|
|
88
88
|
* write it rides, in `reachedBy`, since an encounter on a page a transient
|
|
89
|
-
* session never renders mends nothing on a credential-anchored account.
|
|
90
|
-
* site
|
|
91
|
-
*
|
|
89
|
+
* session never renders mends nothing on a credential-anchored account. A
|
|
90
|
+
* ceremony-tail site says the same of the ceremony it closes, since a tail
|
|
91
|
+
* on a ceremony only a remembered session runs (the forget ceremony,
|
|
92
|
+
* update-key rotation) reaches no credential-only visit. One site carries
|
|
93
|
+
* one reach: a call converging two invariants with different reach is
|
|
94
|
+
* declared as two sites.
|
|
92
95
|
*/
|
|
93
96
|
export type RegistrationSite = {
|
|
94
|
-
trigger:
|
|
97
|
+
trigger: ChainTrigger;
|
|
95
98
|
reports: ReadonlyArray<InvariantId>;
|
|
96
99
|
guardedBy?: undefined;
|
|
97
100
|
reachedBy?: undefined;
|
|
@@ -101,7 +104,7 @@ export type RegistrationSite = {
|
|
|
101
104
|
guardedBy?: 'client-key-record';
|
|
102
105
|
reachedBy?: undefined;
|
|
103
106
|
} | {
|
|
104
|
-
trigger: 'encounter';
|
|
107
|
+
trigger: 'encounter' | 'ceremony-tail';
|
|
105
108
|
reports: ReadonlyArray<InvariantId>;
|
|
106
109
|
guardedBy?: undefined;
|
|
107
110
|
reachedBy: ReadonlyArray<'remembered' | 'transient'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/menders/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,OAAO,EACP,eAAe,EACf,OAAO,EACR,MAAM,iBAAiB,CAAA;AAExB;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,OAAO,CAAA;CACf;AAED;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G;IACrB,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAA;CACxE,CAAA;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,eAAe,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAA;IAC9D;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe,CAC9B,QAAQ,SAAS,MAAM,GAAG,MAAM,CAChC,SAAQ,WAAW;IACnB,SAAS,EAAE,WAAW,CAAA;IACtB,UAAU,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;CACrC;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,QAAQ,SAAS,MAAM,GAAG,MAAM,IAAI,aAAa,CACtE,eAAe,CAAC,QAAQ,CAAC,CAC1B,CAAA;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,WAAW,CAAA;IACtB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;IACrC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAA;CACd"}
|
|
@@ -75,10 +75,11 @@ export interface ControllerInventory {
|
|
|
75
75
|
* the credential-inventory accessor at a given version, which is what
|
|
76
76
|
* evaluating the ceremony-tail license and recognizing a ladder-signed
|
|
77
77
|
* append require (neither is answered by `documentAt` alone, which the
|
|
78
|
-
* library reads only for `assertionMethod`), plus the library's optional
|
|
79
|
-
* mandatory -- an account did:webvh
|
|
80
|
-
* over one must answer the
|
|
81
|
-
* obligation), whichever log class's
|
|
78
|
+
* library reads only for `assertionMethod`), plus the library's optional
|
|
79
|
+
* `admitAppend` admission hook made mandatory -- an account did:webvh
|
|
80
|
+
* document can list ladder VMs, so a view over one must answer the
|
|
81
|
+
* admission question (the port's stated obligation), whichever log class's
|
|
82
|
+
* rule that answer comes from. The
|
|
82
83
|
* pre-append license check in the log-governed descriptor store calls
|
|
83
84
|
* `inventoryAt` directly, which is why the accessor stays on the type
|
|
84
85
|
* beside the hook: a verify-time refusal alone would poison the served log
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/resourceLog/controller.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,2BAA2B,CAAA;AACpE,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,0BAA0B,CAAA;AAOjC,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAA;AAGzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACvB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC/B,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC5B,cAAc,EAAE,cAAc,CAAA;CAC/B;AAED
|
|
1
|
+
{"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../src/resourceLog/controller.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,2BAA2B,CAAA;AACpE,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,0BAA0B,CAAA;AAOjC,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAA;AAGzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IACvB,aAAa,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC1B,kBAAkB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC/B,eAAe,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;IAC5B,cAAc,EAAE,cAAc,CAAA;CAC/B;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,0BAA2B,SAAQ,qBAAqB;IACvE;;;;;;;;OAQG;IACH,WAAW,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAA;IAC7D,WAAW,EAAE,WAAW,CAAC,qBAAqB,CAAC,aAAa,CAAC,CAAC,CAAA;CAC/D;AA2DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,0BAA0B,CAAC,EACzC,GAAG,EACH,GAAG,EACJ,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,0BAA0B,CA+E7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controller.js","sourceRoot":"","sources":["../../src/resourceLog/controller.ts"],"names":[],"mappings":"AAiCA,OAAO,EACL,yBAAyB,EAE1B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC3B,qBAAqB,EAEtB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,8BAA8B,EAC9B,iBAAiB,EAElB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"controller.js","sourceRoot":"","sources":["../../src/resourceLog/controller.ts"],"names":[],"mappings":"AAiCA,OAAO,EACL,yBAAyB,EAE1B,MAAM,0BAA0B,CAAA;AACj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AA0B;oBAC1B,SAAS;iBACV,CAAC,CAAA;YACJ,CAAC;QACH,CAAC;KACF,CAAA;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standingClient.d.ts","sourceRoot":"","sources":["../../src/unlock/standingClient.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,yCAAyC,CAAA;AAI1E;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,aAAa,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,wBAAwB,EAAE,MAAM,CAAA;IAChC;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,4BAA4B,CAAC,EACjD,UAAU,EACX,EAAE;IACD,UAAU,EAAE,UAAU,CAAA;CACvB,GAAG,OAAO,CAAC,oBAAoB,CAAC,
|
|
1
|
+
{"version":3,"file":"standingClient.d.ts","sourceRoot":"","sources":["../../src/unlock/standingClient.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAEjE;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,yCAAyC,CAAA;AAI1E;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,aAAa,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,wBAAwB,EAAE,MAAM,CAAA;IAChC;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,4BAA4B,CAAC,EACjD,UAAU,EACX,EAAE;IACD,UAAU,EAAE,UAAU,CAAA;CACvB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAgBhC;AAED;;;;;GAKG;AACH,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAChE,aAAa,EAAE,UAAU,CAAA;CAC1B;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,4BAA4B,CAAC,EACjD,UAAU,EACX,EAAE;IACD,UAAU,EAAE,UAAU,CAAA;CACvB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAkBhC"}
|
|
@@ -48,9 +48,6 @@ const STANDING_BINDING_MAC_INFO = 'binding-mac';
|
|
|
48
48
|
export async function unlockClientIdentityFromSeed({ clientSeed }) {
|
|
49
49
|
const agents = await agentsFromSeed({ seed: clientSeed });
|
|
50
50
|
const { publicKeyMultibase: keyAgreementKeyMultibase } = agents.keyAgreementKey;
|
|
51
|
-
if (!keyAgreementKeyMultibase) {
|
|
52
|
-
throw new Error('The derived key-agreement key has no public multibase.');
|
|
53
|
-
}
|
|
54
51
|
const [, , signingKeyMultibase] = agents.controllerDid.split(':');
|
|
55
52
|
return {
|
|
56
53
|
clientSeed,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standingClient.js","sourceRoot":"","sources":["../../src/unlock/standingClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAG7D;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,sCAAsC,CAAA;AAC1E,MAAM,yBAAyB,GAAG,aAAa,CAAA;AAC/C,MAAM,yBAAyB,GAAG,aAAa,CAAA;AAwB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,EAAE,mBAAoB;YACzC,wBAAwB;SACzB,CAAC;KACH,CAAA;AACH,CAAC;AAYD;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,EACjD,UAAU,EAGX;IACC,MAAM,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAA;IAC3D,MAAM,UAAU,GAAG,IAAI,CACrB,MAAM,EACN,UAAU,EACV,IAAI,EACJ,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,yBAAyB,CAAC,EACnD,EAAE,CACH,CAAA;IACD,MAAM,aAAa,GAAG,IAAI,CACxB,MAAM,EACN,UAAU,EACV,IAAI,EACJ,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,yBAAyB,CAAC,EACnD,EAAE,CACH,CAAA;IACD,MAAM,QAAQ,GAAG,MAAM,4BAA4B,CAAC,EAAE,UAAU,EAAE,CAAC,CAAA;IACnE,OAAO,EAAE,GAAG,QAAQ,EAAE,aAAa,EAAE,CAAA;AACvC,CAAC"}
|
package/dist/webvh/index.d.ts
CHANGED
|
@@ -58,7 +58,10 @@
|
|
|
58
58
|
* fail-safe default (an uncheckable value reads as still standing).
|
|
59
59
|
* - `verifyAccountLog` -- the verification step every one of those ceremonies
|
|
60
60
|
* runs first: fetch the world-readable log, resolve it locally, refuse a log
|
|
61
|
-
* that resolves to another DID.
|
|
61
|
+
* that resolves to another DID or names another log location.
|
|
62
|
+
* - `discoverAccountLog` -- the same reader with no DID known in advance: a
|
|
63
|
+
* requester holding a Space id and nothing naming its owner takes the owner
|
|
64
|
+
* from the log published there, under the location check alone.
|
|
62
65
|
* - `wasWebvhIdStore` -- the WAS-backed `WebvhIdStore` the ceremonies write
|
|
63
66
|
* through, over the parameterized `wasWebvhLogStore` (any collection's
|
|
64
67
|
* `did.jsonl`), which also serves a client-annex generation's log.
|
|
@@ -93,7 +96,7 @@
|
|
|
93
96
|
* ezcap dependency graph (the same isolation pattern as `./keyring`).
|
|
94
97
|
*/
|
|
95
98
|
export { assertCanonicalClientKeys, BYOE_CONTEXT_URL, clientAdditionFields, clientKeyAgreementController, commitmentMatchesKey, didWebvhControllerTemplate, ensureDidWebvh, keyAgreementCommitment, keyAgreementTwinMultibase, MULTIKEY_COMMITMENT_VM_TYPE, markedVerificationMethodPair, mintClientWebvhUpdateKeys, rotateWebvhUpdateKey, servedHead, updateKeyMultibase, WebvhLogConflictError, withLogConflictRetry, withThreadedHeadOnce } from './didWebvh.js';
|
|
96
|
-
export { accountControllerResolver, accountLogPinId, logResourcePinId, AccountLogMissingError, verifiedAccountLogOf, verifyAccountLog } from './verifyLog.js';
|
|
99
|
+
export { accountControllerResolver, accountLogPinId, logResourcePinId, AccountLogMissingError, discoverAccountLog, verifiedAccountLogOf, verifyAccountLog } from './verifyLog.js';
|
|
97
100
|
export type { VerifiedAccountLog } from './verifyLog.js';
|
|
98
101
|
export { wasWebvhIdStore, wasWebvhLogStore } from './wasIdStore.js';
|
|
99
102
|
export type { WebvhLogResourceStore } from './wasIdStore.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AACH,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,oBAAoB,EACpB,0BAA0B,EAC1B,cAAc,EACd,sBAAsB,EACtB,yBAAyB,EACzB,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB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W,EACX,eAAe,EAChB,MAAM,WAAW,CAAA;AAClB,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/webvh/index.js
CHANGED
|
@@ -58,7 +58,10 @@
|
|
|
58
58
|
* fail-safe default (an uncheckable value reads as still standing).
|
|
59
59
|
* - `verifyAccountLog` -- the verification step every one of those ceremonies
|
|
60
60
|
* runs first: fetch the world-readable log, resolve it locally, refuse a log
|
|
61
|
-
* that resolves to another DID.
|
|
61
|
+
* that resolves to another DID or names another log location.
|
|
62
|
+
* - `discoverAccountLog` -- the same reader with no DID known in advance: a
|
|
63
|
+
* requester holding a Space id and nothing naming its owner takes the owner
|
|
64
|
+
* from the log published there, under the location check alone.
|
|
62
65
|
* - `wasWebvhIdStore` -- the WAS-backed `WebvhIdStore` the ceremonies write
|
|
63
66
|
* through, over the parameterized `wasWebvhLogStore` (any collection's
|
|
64
67
|
* `did.jsonl`), which also serves a client-annex generation's log.
|
|
@@ -93,7 +96,7 @@
|
|
|
93
96
|
* ezcap dependency graph (the same isolation pattern as `./keyring`).
|
|
94
97
|
*/
|
|
95
98
|
export { assertCanonicalClientKeys, BYOE_CONTEXT_URL, clientAdditionFields, clientKeyAgreementController, commitmentMatchesKey, didWebvhControllerTemplate, ensureDidWebvh, keyAgreementCommitment, keyAgreementTwinMultibase, MULTIKEY_COMMITMENT_VM_TYPE, markedVerificationMethodPair, mintClientWebvhUpdateKeys, rotateWebvhUpdateKey, servedHead, updateKeyMultibase, WebvhLogConflictError, withLogConflictRetry, withThreadedHeadOnce } from './didWebvh.js';
|
|
96
|
-
export { accountControllerResolver, accountLogPinId, logResourcePinId, AccountLogMissingError, verifiedAccountLogOf, verifyAccountLog } from './verifyLog.js';
|
|
99
|
+
export { accountControllerResolver, accountLogPinId, logResourcePinId, AccountLogMissingError, discoverAccountLog, verifiedAccountLogOf, verifyAccountLog } from './verifyLog.js';
|
|
97
100
|
export { wasWebvhIdStore, wasWebvhLogStore } from './wasIdStore.js';
|
|
98
101
|
export { didWebProjectionCurrent, ensureDidWebProjection, putDidWebProjection } from './didWebProjection.js';
|
|
99
102
|
export { delegatedWebvhLogStore } from './delegatedLogStore.js';
|
package/dist/webvh/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AACH,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,oBAAoB,EACpB,0BAA0B,EAC1B,cAAc,EACd,sBAAsB,EACtB,yBAAyB,EACzB,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,oBAAoB,EACpB,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAEnE,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,EACtB,YAAY,EACb,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,4BAA4B,EAC7B,MAAM,kBAAkB,CAAA;AAKzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnE,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC3B,wBAAwB,EACxB,WAAW,EACX,qBAAqB,EACrB,WAAW,EACX,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,4BAA4B,CAAA;AAKnC,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EACL,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,YAAY,EACb,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACtE,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,kBAAkB,CAAA;AAsBzB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAGzC,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,eAAe,EAChB,MAAM,WAAW,CAAA"}
|
|
@@ -109,8 +109,10 @@ export declare function checkAndAdvanceAccountLogPin({ pinStore, logId, log }: {
|
|
|
109
109
|
* Fetches and locally verifies the account's world-readable DID log.
|
|
110
110
|
*
|
|
111
111
|
* Throws {@link AccountLogMissingError} when the log resource is absent, and
|
|
112
|
-
* an ordinary error when the fetch fails, the log does not resolve,
|
|
113
|
-
*
|
|
112
|
+
* an ordinary error when the fetch fails, the log does not resolve, the
|
|
113
|
+
* resolved DID names another log location than the URL it was served from,
|
|
114
|
+
* or it resolves to a DID other than the one named. The same reader with no
|
|
115
|
+
* expected DID is {@link discoverAccountLog}.
|
|
114
116
|
*
|
|
115
117
|
* Supplied a `pinStore`, the resolved log is additionally checked for
|
|
116
118
|
* continuity against this client's chain-head pin and refused with a
|
|
@@ -157,6 +159,37 @@ export declare function verifyAccountLog({ did, spaceId, host, pinStore, publish
|
|
|
157
159
|
pinStore?: ResourceLogPinStore;
|
|
158
160
|
published?: PublishedWebvhLog;
|
|
159
161
|
}): Promise<VerifiedAccountLog>;
|
|
162
|
+
/**
|
|
163
|
+
* Resolves the account published at a Space with no DID known in advance:
|
|
164
|
+
* fetches the world-readable log out of the Space's `id` collection, resolves
|
|
165
|
+
* it locally, and returns the DID it resolves to beside the verified view.
|
|
166
|
+
*
|
|
167
|
+
* The caller that needs it is a requester holding per-collection grants and
|
|
168
|
+
* nothing that names the Space owner (the grant chain's root is an opaque
|
|
169
|
+
* URN, and the Space Description needs a Space-scoped capability App Connect
|
|
170
|
+
* never delegates). The log is self-certifying, so the owner is the DID whose
|
|
171
|
+
* log is published there and whose identifier maps back to that URL, the
|
|
172
|
+
* location check `readAccountLog` runs. {@link verifyAccountLog} is this same
|
|
173
|
+
* reader plus the expected-DID check.
|
|
174
|
+
*
|
|
175
|
+
* Throws {@link AccountLogMissingError} when the log resource is absent, and
|
|
176
|
+
* an ordinary error when the fetch fails, the log does not resolve, or the
|
|
177
|
+
* resolved DID names another location. A `pinStore` adds the same chain-head
|
|
178
|
+
* check-and-advance {@link verifyAccountLog} runs, under the same slot.
|
|
179
|
+
*
|
|
180
|
+
* @param options {object}
|
|
181
|
+
* @param options.spaceId {string} the Space whose owner is wanted
|
|
182
|
+
* @param options.host {string} the storage server the Space lives on
|
|
183
|
+
* @param [options.pinStore] {ResourceLogPinStore} this client's chain-head
|
|
184
|
+
* pins, keyed by {@link accountLogPinId} over the `spaceId` above
|
|
185
|
+
* @returns {Promise<PublishedWebvhLog>} the owner's DID, the resolved
|
|
186
|
+
* document, the raw log, and the log's effective update-key parameters
|
|
187
|
+
*/
|
|
188
|
+
export declare function discoverAccountLog({ spaceId, host, pinStore }: {
|
|
189
|
+
spaceId: string;
|
|
190
|
+
host: string;
|
|
191
|
+
pinStore?: ResourceLogPinStore;
|
|
192
|
+
}): Promise<PublishedWebvhLog>;
|
|
160
193
|
/**
|
|
161
194
|
* What {@link verifyAccountLog} returns: the account document as the log
|
|
162
195
|
* resolves it, the raw log, and the log's effective update-key parameters.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyLog.d.ts","sourceRoot":"","sources":["../../src/webvh/verifyLog.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verifyLog.d.ts","sourceRoot":"","sources":["../../src/webvh/verifyLog.ts"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,iBAAiB,EAClB,MAAM,2BAA2B,CAAA;AAElC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,8BAA8B,CAAA;AAErC,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAA;AAEjC;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,YAAY,EACb,EAAE;IACD,OAAO,EAAE,MAAM,CAAA;IACf,YAAY,EAAE,MAAM,CAAA;CACrB,GAAG,MAAM,CAMT;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,C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