@interop/wallet-core 0.106.0 → 0.107.1
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 +1 -1
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +0 -1
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/gc.d.ts +55 -24
- package/dist/clientAnnex/gc.d.ts.map +1 -1
- package/dist/clientAnnex/gc.js +111 -31
- package/dist/clientAnnex/gc.js.map +1 -1
- package/dist/clientAnnex/generationRung.d.ts +5 -21
- package/dist/clientAnnex/generationRung.d.ts.map +1 -1
- package/dist/clientAnnex/generationRung.js +30 -41
- package/dist/clientAnnex/generationRung.js.map +1 -1
- package/dist/clientAnnex/grantRevocation.d.ts +11 -7
- package/dist/clientAnnex/grantRevocation.d.ts.map +1 -1
- package/dist/clientAnnex/grantRevocation.js +1 -1
- package/dist/clientAnnex/grantRevocation.js.map +1 -1
- package/dist/clientAnnex/heal.d.ts +14 -4
- package/dist/clientAnnex/heal.d.ts.map +1 -1
- package/dist/clientAnnex/heal.js +32 -12
- package/dist/clientAnnex/heal.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 +6 -5
- package/dist/clientAnnex/index.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +106 -59
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +156 -111
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +5 -0
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +5 -0
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clients/grantState.d.ts +11 -9
- package/dist/clients/grantState.d.ts.map +1 -1
- package/dist/clients/grantState.js +19 -16
- package/dist/clients/grantState.js.map +1 -1
- package/dist/clients/index.d.ts +9 -9
- package/dist/clients/index.js +9 -9
- package/dist/clients/listing.d.ts +12 -14
- package/dist/clients/listing.d.ts.map +1 -1
- package/dist/clients/listing.js +17 -23
- package/dist/clients/listing.js.map +1 -1
- package/dist/connections/grantProof.d.ts +47 -14
- package/dist/connections/grantProof.d.ts.map +1 -1
- package/dist/connections/grantProof.js +88 -57
- package/dist/connections/grantProof.js.map +1 -1
- package/dist/connections/grants.d.ts +13 -1
- package/dist/connections/grants.d.ts.map +1 -1
- package/dist/connections/grants.js +15 -26
- package/dist/connections/grants.js.map +1 -1
- package/dist/connections/index.d.ts +4 -3
- package/dist/connections/index.d.ts.map +1 -1
- package/dist/connections/index.js +3 -2
- package/dist/connections/index.js.map +1 -1
- package/dist/testing/accountBuilder.d.ts.map +1 -1
- package/dist/testing/accountBuilder.js +0 -1
- package/dist/testing/accountBuilder.js.map +1 -1
- package/dist/testing/signerFixture.d.ts +3 -3
- package/dist/testing/signerFixture.d.ts.map +1 -1
- package/dist/testing/signerFixture.js +7 -5
- package/dist/testing/signerFixture.js.map +1 -1
- package/dist/unlock/retire.d.ts +5 -2
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js.map +1 -1
- package/dist/webvh/clientAnnexDid.d.ts +4 -5
- package/dist/webvh/clientAnnexDid.d.ts.map +1 -1
- package/dist/webvh/clientAnnexDid.js +4 -5
- package/dist/webvh/clientAnnexDid.js.map +1 -1
- package/dist/webvh/index.d.ts +13 -6
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +12 -5
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/ladderDerivation.d.ts +1 -2
- package/dist/webvh/ladderDerivation.d.ts.map +1 -1
- package/dist/webvh/ladderDerivation.js +5 -5
- package/dist/webvh/ladderDerivation.js.map +1 -1
- package/dist/webvh/listClients.d.ts +124 -15
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +148 -43
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/standingZcap.d.ts +4 -1
- package/dist/webvh/standingZcap.d.ts.map +1 -1
- package/dist/webvh/standingZcap.js +13 -14
- package/dist/webvh/standingZcap.js.map +1 -1
- package/package.json +12 -12
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { vmFragmentOf } from '@interop/vh-resource-log';
|
|
1
|
+
import { memberKeyMultibase, parseVersionedVm, relationKeyMultibases, relationMemberNamed, vmFragmentOf } from '@interop/vh-resource-log';
|
|
2
2
|
import { clientKeyAgreementController, effectiveParameters } from './didWebvh.js';
|
|
3
|
-
import { relationIds, resolvedKeyAgreementMethods
|
|
3
|
+
import { enrolledClientKeyMultibases, relationIds, resolvedKeyAgreementMethods } from '../resourceLog/document.js';
|
|
4
4
|
/**
|
|
5
5
|
* The key multibases the document currently publishes: every verification
|
|
6
6
|
* method's `publicKeyMultibase`, plus the fragment of its id (for a did:webvh
|
|
@@ -25,38 +25,138 @@ export function documentKeyMultibases({ doc }) {
|
|
|
25
25
|
return multibases;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* The key
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
28
|
+
* The key a did:key DID URL carries: `did:key:<key>` or `did:key:<key>#<key>`,
|
|
29
|
+
* the forms a client signs under before the account's controller is
|
|
30
|
+
* promoted. By that method's spec the DID itself is the key, so the reading
|
|
31
|
+
* needs no document. A did:key URL whose fragment names another key is
|
|
32
|
+
* malformed and names none, and any other DID names none here.
|
|
33
|
+
*
|
|
34
|
+
* @param id {string} a DID or DID URL
|
|
35
|
+
* @returns {string | undefined} the key multibase
|
|
36
|
+
*/
|
|
37
|
+
export function didKeyMultibase(id) {
|
|
38
|
+
const hash = id.indexOf('#');
|
|
39
|
+
const did = hash === -1 ? id : id.slice(0, hash);
|
|
40
|
+
if (!did.startsWith('did:key:')) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
const key = did.slice('did:key:'.length);
|
|
44
|
+
if (key === '' || key.includes('?')) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
return hash === -1 || id.slice(hash + 1) === key ? key : undefined;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Builds the {@link DelegationSignerReader} over a document. The rule is
|
|
51
|
+
* {@link delegationSignerKey}'s; this is the memoized form.
|
|
34
52
|
*
|
|
35
53
|
* @param options {object}
|
|
36
54
|
* @param options.doc {PublishedKeyDocument} a locally verified document
|
|
37
|
-
* @returns {
|
|
55
|
+
* @returns {DelegationSignerReader}
|
|
38
56
|
*/
|
|
39
|
-
function
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
57
|
+
export function delegationSignerKeyReader({ doc }) {
|
|
58
|
+
const relation = 'capabilityDelegation';
|
|
59
|
+
let published;
|
|
60
|
+
const resolved = new Map();
|
|
61
|
+
const resolve = (signerKeyId) => {
|
|
62
|
+
const parsed = parseVersionedVm(signerKeyId);
|
|
63
|
+
if (parsed === undefined) {
|
|
64
|
+
return undefined;
|
|
45
65
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
66
|
+
const { did, fragment } = parsed;
|
|
67
|
+
if (did.startsWith('did:key:')) {
|
|
68
|
+
// A did:key signer is read by its method's spec: the DID is the key,
|
|
69
|
+
// named while the relation publishes it.
|
|
70
|
+
const key = didKeyMultibase(signerKeyId);
|
|
71
|
+
published ??= relationKeyMultibases({ doc, relation });
|
|
72
|
+
return key !== undefined && published.has(key) ? key : undefined;
|
|
53
73
|
}
|
|
74
|
+
const member = relationMemberNamed({ doc, relation, did, fragment });
|
|
75
|
+
return member === undefined ? undefined : memberKeyMultibase(member);
|
|
76
|
+
};
|
|
77
|
+
return signerKeyId => {
|
|
78
|
+
if (!resolved.has(signerKeyId)) {
|
|
79
|
+
resolved.set(signerKeyId, resolve(signerKeyId));
|
|
80
|
+
}
|
|
81
|
+
return resolved.get(signerKeyId);
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The key the document publishes under `capabilityDelegation` for a
|
|
86
|
+
* delegation's signer id (a proof's `verificationMethod` DID URL), or
|
|
87
|
+
* `undefined` when the id names no listed key: the one reader every
|
|
88
|
+
* delegation-signer check in this library goes through. A URL under the
|
|
89
|
+
* document's DID dereferences to the member it names
|
|
90
|
+
* (`relationMemberNamed`) and takes that member's `publicKeyMultibase`
|
|
91
|
+
* (`memberKeyMultibase`); its fragment is an opaque selector that names no
|
|
92
|
+
* key of its own. The URL is split the way the resource-log verifier splits
|
|
93
|
+
* a proof's method id (`parseVersionedVm`), so a `versionId` DID parameter
|
|
94
|
+
* is dropped and the dereference runs against the current document, which
|
|
95
|
+
* is the current-key-set rule. A did:key URL carries its key in the DID
|
|
96
|
+
* itself, by that method's spec, and names it only while the relation
|
|
97
|
+
* publishes that key. A relative member id resolves against the document's
|
|
98
|
+
* own `id` alone, so a document handed without one lists its absolute
|
|
99
|
+
* members only. Any other DID (a client annex's, say) is one the document
|
|
100
|
+
* does not list, so it names no key here.
|
|
101
|
+
*
|
|
102
|
+
* @param options {object}
|
|
103
|
+
* @param options.doc {PublishedKeyDocument} a locally verified document
|
|
104
|
+
* @param options.signerKeyId {string} the delegation's verification-method
|
|
105
|
+
* id, in either DID form
|
|
106
|
+
* @returns {string | undefined} the published key multibase
|
|
107
|
+
*/
|
|
108
|
+
export function delegationSignerKey({ doc, signerKeyId }) {
|
|
109
|
+
return delegationSignerKeyReader({ doc })(signerKeyId);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The key a signer id names for attribution, as opposed to authorization: a
|
|
113
|
+
* bare multibase is the key itself, a did:key id carries its key by that
|
|
114
|
+
* method's spec whether or not the document still lists it, and an id under
|
|
115
|
+
* the account DID names the key the document publishes for it, through the
|
|
116
|
+
* reader when one is given. An id under the account DID that the document no
|
|
117
|
+
* longer publishes (a key the edit already struck) names no key, and a caller
|
|
118
|
+
* attributing by it falls back to comparing ids verbatim. This is what lets
|
|
119
|
+
* a post-edit sweep still find what a withdrawn key signed.
|
|
120
|
+
*
|
|
121
|
+
* @param options {object}
|
|
122
|
+
* @param options.id {string} a verification-method id in either DID form,
|
|
123
|
+
* or a bare multibase
|
|
124
|
+
* @param [options.signerKey] {DelegationSignerReader} the reader over the
|
|
125
|
+
* verified document, when one is in hand
|
|
126
|
+
* @returns {string | undefined}
|
|
127
|
+
*/
|
|
128
|
+
export function signerKeyNamed({ id, signerKey }) {
|
|
129
|
+
if (!id.startsWith('did:')) {
|
|
130
|
+
return id;
|
|
54
131
|
}
|
|
55
|
-
return
|
|
132
|
+
return didKeyMultibase(id) ?? signerKey?.(id);
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Whether two signer ids name one signer for attribution: the same id
|
|
136
|
+
* verbatim, or two ids that each name a key ({@link signerKeyNamed}) and
|
|
137
|
+
* name the same one. The verbatim arm is what keeps a key the document
|
|
138
|
+
* already struck attributable by its exact id, which a torn ceremony's
|
|
139
|
+
* post-edit sweep depends on.
|
|
140
|
+
*
|
|
141
|
+
* @param options {object}
|
|
142
|
+
* @param options.signerId {string} a verification-method id in either DID
|
|
143
|
+
* form, or a bare multibase
|
|
144
|
+
* @param options.otherId {string} the id to compare it with, in the same
|
|
145
|
+
* forms
|
|
146
|
+
* @param [options.signerKey] {DelegationSignerReader} the reader over the
|
|
147
|
+
* verified document, when one is in hand
|
|
148
|
+
* @returns {boolean}
|
|
149
|
+
*/
|
|
150
|
+
export function sameSigner({ signerId, otherId, signerKey }) {
|
|
151
|
+
if (signerId === otherId) {
|
|
152
|
+
return true;
|
|
153
|
+
}
|
|
154
|
+
const key = signerKeyNamed({ id: signerId, signerKey });
|
|
155
|
+
return key !== undefined && signerKeyNamed({ id: otherId, signerKey }) === key;
|
|
56
156
|
}
|
|
57
157
|
/**
|
|
58
158
|
* The current-key-set rule for a recorded delegation: does the document still
|
|
59
|
-
*
|
|
159
|
+
* publish a key under `capabilityDelegation` for the method that signed it?
|
|
60
160
|
* That relation is the test rather than mere membership in the document,
|
|
61
161
|
* because a delegation proof verifies only against a method published for the
|
|
62
162
|
* delegation purpose as the document resolves NOW. A key kept under
|
|
@@ -65,9 +165,11 @@ function delegationRelationMultibases({ doc }) {
|
|
|
65
165
|
* A `false` is exactly "this recorded grant has rotted" -- the signal behind a
|
|
66
166
|
* re-mint or a health nudge.
|
|
67
167
|
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* controller was promoted names the same key under a different DID)
|
|
168
|
+
* The read is {@link delegationSignerKey}'s, so the did:key and did:webvh
|
|
169
|
+
* forms of one key agree (a delegation signed before the account's
|
|
170
|
+
* controller was promoted names the same key under a different DID), and a
|
|
171
|
+
* member whose id fragment and `publicKeyMultibase` disagree is known by the
|
|
172
|
+
* key it publishes.
|
|
71
173
|
*
|
|
72
174
|
* An ABSENT `delegationKeyId` reports `false`: a record that does not say
|
|
73
175
|
* which key signed it cannot be checked against the document, and the
|
|
@@ -82,11 +184,8 @@ function delegationRelationMultibases({ doc }) {
|
|
|
82
184
|
* @returns {boolean}
|
|
83
185
|
*/
|
|
84
186
|
export function delegationKeyInDocument({ doc, delegationKeyId }) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
return delegationRelationMultibases({ doc }).has(multibase);
|
|
187
|
+
return (delegationKeyId !== undefined &&
|
|
188
|
+
delegationSignerKey({ doc, signerKeyId: delegationKeyId }) !== undefined);
|
|
90
189
|
}
|
|
91
190
|
/**
|
|
92
191
|
* The `keyAgreement` verification methods one client's controller marker
|
|
@@ -274,9 +373,9 @@ function attributeActiveUpdateKeys({ params, addIndexes }) {
|
|
|
274
373
|
/**
|
|
275
374
|
* The index of the entry that published a client's verification methods (its
|
|
276
375
|
* enrollment moment, and the attribution anchor for its update key), or `-1`
|
|
277
|
-
* when the log never published them. Keyed on the signing key's multibase
|
|
278
|
-
*
|
|
279
|
-
*
|
|
376
|
+
* when the log never published them. Keyed on the signing key's multibase as
|
|
377
|
+
* the entry's document publishes it under `capabilityInvocation`
|
|
378
|
+
* (`relationKeyMultibases`, the same read as `enrolledClientKeyMultibases`).
|
|
280
379
|
*
|
|
281
380
|
* @param options {object}
|
|
282
381
|
* @param options.log {DIDLog}
|
|
@@ -284,7 +383,10 @@ function attributeActiveUpdateKeys({ params, addIndexes }) {
|
|
|
284
383
|
* @returns {number}
|
|
285
384
|
*/
|
|
286
385
|
function clientAddIndex({ log, signingKeyMultibase }) {
|
|
287
|
-
return log.findIndex(entry =>
|
|
386
|
+
return log.findIndex(entry => relationKeyMultibases({
|
|
387
|
+
doc: entry.state,
|
|
388
|
+
relation: 'capabilityInvocation'
|
|
389
|
+
}).has(signingKeyMultibase));
|
|
288
390
|
}
|
|
289
391
|
/**
|
|
290
392
|
* One enrolled client's ACTIVE update key as the log states it, keyed on the
|
|
@@ -329,10 +431,11 @@ function clientAddIndexes({ log, signingKeyMultibases }) {
|
|
|
329
431
|
if (addIndexes.size === signingKeyMultibases.size) {
|
|
330
432
|
break;
|
|
331
433
|
}
|
|
332
|
-
for (const
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
434
|
+
for (const signingKeyMultibase of relationKeyMultibases({
|
|
435
|
+
doc: entry.state,
|
|
436
|
+
relation: 'capabilityInvocation'
|
|
437
|
+
})) {
|
|
438
|
+
if (signingKeyMultibases.has(signingKeyMultibase) &&
|
|
336
439
|
!addIndexes.has(signingKeyMultibase)) {
|
|
337
440
|
addIndexes.set(signingKeyMultibase, index);
|
|
338
441
|
}
|
|
@@ -396,9 +499,11 @@ export function listEnrolledWebvhClients({ log }) {
|
|
|
396
499
|
}
|
|
397
500
|
const doc = log[log.length - 1].state;
|
|
398
501
|
const params = effectiveParameters(log);
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
502
|
+
// Each enrolled client's signing key is the key its `capabilityInvocation`
|
|
503
|
+
// member publishes, in document order, deduplicated: the same read as
|
|
504
|
+
// `enrolledClientKeyMultibases`, so the listing and the key census name
|
|
505
|
+
// the same keys. A member publishing no key lists no client.
|
|
506
|
+
const signingKeyMultibases = [...enrolledClientKeyMultibases({ doc })];
|
|
402
507
|
// The entry that published each client's verification methods -- its
|
|
403
508
|
// enrollment moment, and the attribution anchor for its update key.
|
|
404
509
|
const addIndexes = clientAddIndexes({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listClients.js","sourceRoot":"","sources":["../../src/webvh/listClients.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"listClients.js","sourceRoot":"","sources":["../../src/webvh/listClients.ts"],"names":[],"mappings":"AA+DA,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,YAAY,EACb,MAAM,0BAA0B,CAAA;AACjC,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,EACpB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,2BAA2B,EAC3B,WAAW,EACX,2BAA2B,EAC5B,MAAM,4BAA4B,CAAA;AAmCnC;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CAAC,EACpC,GAAG,EAGJ;IACC,MAAM,UAAU,GAAG,IAAI,GAAG,EAAU,CAAA;IACpC,KAAK,MAAM,MAAM,IAAI,GAAG,CAAC,kBAAkB,IAAI,EAAE,EAAE,CAAC;QAClD,IAAI,MAAM,CAAC,kBAAkB,EAAE,CAAC;YAC9B,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAA;QAC3C,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;QAChE,IAAI,QAAQ,EAAE,CAA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AE,CAAC,CAAC,CAAA;IACtE,qEAAqE;IACrE,oEAAoE;IACpE,MAAM,UAAU,GAAG,gBAAgB,CAAC;QAClC,GAAG;QACH,oBAAoB,EAAE,IAAI,GAAG,CAAC,oBAAoB,CAAC;KACpD,CAAC,CAAA;IACF,oEAAoE;IACpE,MAAM,UAAU,GAAG,yBAAyB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAA;IACpE,6EAA6E;IAC7E,6EAA6E;IAC7E,4EAA4E;IAC5E,mBAAmB;IACnB,MAAM,iBAAiB,GAAG,uBAAuB,CAAC,EAAE,GAAG,EAAE,CAAC,CAAA;IAC1D,MAAM,OAAO,GAA0B,EAAE,CAAA;IACzC,KAAK,MAAM,mBAAmB,IAAI,oBAAoB,EAAE,CAAC;QACvD,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;QACpD,OAAO,CAAC,IAAI,CAAC;YACX,mBAAmB;YACnB,yBAAyB,EACvB,iBAAiB,CAAC,GAAG,CACnB,4BAA4B,CAAC,EAAE,mBAAmB,EAAE,CAAC,CACtD,IAAI,EAAE;YACT,kBAAkB,EAAE,UAAU,CAAC,GAAG,CAAC,mBAAmB,CAAC;YACvD,OAAO,EAAE,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAE,CAAC,WAAW;SACzE,CAAC,CAAA;IACJ,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
@@ -151,7 +151,10 @@ export declare function delegationSignerGone({ zcap, doc }: {
|
|
|
151
151
|
* lands (the last-client transition's stages, whose document still lists
|
|
152
152
|
* the forgotten client), and the one that covers authority a client-side
|
|
153
153
|
* predicate cannot read at all -- a delegation about to be revoked
|
|
154
|
-
* server-side.
|
|
154
|
+
* server-side. A retiring key and the recorded key id match under
|
|
155
|
+
* `sameSigner`: the same id, or the same named key. With no `doc` there is
|
|
156
|
+
* nothing to resolve an account-DID id against, so only the same id or a
|
|
157
|
+
* did:key id's own key matches there; no id fragment is read as a key.
|
|
155
158
|
*
|
|
156
159
|
* @param options {object}
|
|
157
160
|
* @param [options.doc] {PublishedKeyDocument} the locally VERIFIED account
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standingZcap.d.ts","sourceRoot":"","sources":["../../src/webvh/standingZcap.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;
|
|
1
|
+
{"version":3,"file":"standingZcap.d.ts","sourceRoot":"","sources":["../../src/webvh/standingZcap.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAMzD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAE5D;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,QAA4B,CAAA;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,QAA2B,CAAA;AAE9D;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,QAAiC,EACjC,GAAgB,EACjB,EAAE;IACD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,GAAG,OAAO,CASV;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,QAAiB,CAAA;AAkBtD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,GAAG,EACJ,EAAE;IACD,IAAI,EAAE,KAAK,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,OAAO,CAGV;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,GAAG,EACJ,EAAE;IACD,IAAI,EAAE,KAAK,CAAA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|
20
20
|
* shown dead must still be revoked.
|
|
21
21
|
*/
|
|
22
22
|
import { vmFragmentOf } from '@interop/vh-resource-log';
|
|
23
|
-
import { delegationKeyInDocument } from './listClients.js';
|
|
23
|
+
import { delegationKeyInDocument, delegationSignerKeyReader, sameSigner } from './listClients.js';
|
|
24
24
|
/**
|
|
25
25
|
* The standing zcap lifetime: one year, following NIST SP 800-57's
|
|
26
26
|
* one-to-two-year cryptoperiod guidance for private signature keys. A
|
|
@@ -216,7 +216,10 @@ export function delegationSignerGone({ zcap, doc }) {
|
|
|
216
216
|
* lands (the last-client transition's stages, whose document still lists
|
|
217
217
|
* the forgotten client), and the one that covers authority a client-side
|
|
218
218
|
* predicate cannot read at all -- a delegation about to be revoked
|
|
219
|
-
* server-side.
|
|
219
|
+
* server-side. A retiring key and the recorded key id match under
|
|
220
|
+
* `sameSigner`: the same id, or the same named key. With no `doc` there is
|
|
221
|
+
* nothing to resolve an account-DID id against, so only the same id or a
|
|
222
|
+
* did:key id's own key matches there; no id fragment is read as a key.
|
|
220
223
|
*
|
|
221
224
|
* @param options {object}
|
|
222
225
|
* @param [options.doc] {PublishedKeyDocument} the locally VERIFIED account
|
|
@@ -233,20 +236,16 @@ export function recordedZcapStale({ doc, delegationKeyId, expires, retiringKeyMu
|
|
|
233
236
|
if (zcapExpiring({ ...(expires !== undefined ? { expires } : {}), now })) {
|
|
234
237
|
return true;
|
|
235
238
|
}
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
// either way the comparison is on the multibase.
|
|
241
|
-
const retiring = retiringKeyMultibases.some(key => multibase !== undefined && (vmFragmentOf(key) ?? key) === multibase);
|
|
242
|
-
if (retiring) {
|
|
239
|
+
const signerKey = doc === undefined ? undefined : delegationSignerKeyReader({ doc });
|
|
240
|
+
// Retiring keys arrive as bare multibases or as verification-method ids.
|
|
241
|
+
if (delegationKeyId !== undefined &&
|
|
242
|
+
retiringKeyMultibases.some(key => sameSigner({ signerId: delegationKeyId, otherId: key, signerKey }))) {
|
|
243
243
|
return true;
|
|
244
244
|
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}));
|
|
245
|
+
// The signer-death axis, `delegationKeyInDocument`'s rule over the reader
|
|
246
|
+
// already built: an absent key id cannot be checked, so it reads stale.
|
|
247
|
+
return (signerKey !== undefined &&
|
|
248
|
+
(delegationKeyId === undefined || signerKey(delegationKeyId) === undefined));
|
|
250
249
|
}
|
|
251
250
|
/**
|
|
252
251
|
* {@link recordedZcapStale} over a delegation in hand: the same three axes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standingZcap.js","sourceRoot":"","sources":["../../src/webvh/standingZcap.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,OAAO,
|
|
1
|
+
{"version":3,"file":"standingZcap.js","sourceRoot":"","sources":["../../src/webvh/standingZcap.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,UAAU,EACX,MAAM,kBAAkB,CAAA;AAGzB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAE7D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;AAE9D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,OAAO,EACP,QAAQ,GAAG,sBAAsB,EACjC,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,EAKjB;IACC,IAAI,CAA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,EACJ,GAAG,EACH,qBAAqB,EACrB,GAAG,EAMJ;IACC,MAAM,EAAE,OAAO,EAAE,GAAG,IAA4B,CAAA;IAChD,MAAM,eAAe,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAA;IAClD,OAAO,iBAAiB,CAAC;QACvB,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrC,GAAG,CAAC,eAAe,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7D,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7C,GAAG,CAAC,qBAAqB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,qBAAqB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzE,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACtC,CAAC,CAAA;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interop/wallet-core",
|
|
3
3
|
"description": "Shared wallet-domain logic (WAS sync engine core and wallet Space layout contracts) for Interop wallet apps.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.107.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "pnpm run clear && tsc",
|
|
@@ -21,16 +21,16 @@
|
|
|
21
21
|
"test:coverage": "vitest run --coverage"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@interop/capability-agent": "^0.2.
|
|
25
|
-
"@interop/data-integrity-core": "^8.
|
|
26
|
-
"@interop/data-integrity-proof": "^3.4.
|
|
27
|
-
"@interop/did-method-webvh": "^5.
|
|
28
|
-
"@interop/ed25519-signature": "^7.2.
|
|
29
|
-
"@interop/ed25519-verification-key": "^8.2.
|
|
30
|
-
"@interop/ezcap": "^7.5.
|
|
24
|
+
"@interop/capability-agent": "^0.2.2",
|
|
25
|
+
"@interop/data-integrity-core": "^8.9.0",
|
|
26
|
+
"@interop/data-integrity-proof": "^3.4.8",
|
|
27
|
+
"@interop/did-method-webvh": "^5.17.0",
|
|
28
|
+
"@interop/ed25519-signature": "^7.2.5",
|
|
29
|
+
"@interop/ed25519-verification-key": "^8.2.2",
|
|
30
|
+
"@interop/ezcap": "^7.5.3",
|
|
31
31
|
"@interop/social-core": "^0.8.1",
|
|
32
|
-
"@interop/vh-resource-log": "^0.
|
|
33
|
-
"@interop/x25519-key-agreement-key": "^5.4.
|
|
32
|
+
"@interop/vh-resource-log": "^0.9.0",
|
|
33
|
+
"@interop/x25519-key-agreement-key": "^5.4.3",
|
|
34
34
|
"@noble/ciphers": "^2.3.0",
|
|
35
35
|
"@noble/hashes": "^2.3.0",
|
|
36
36
|
"@scure/base": "^2.3.0",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@eslint/js": "^10.0.1",
|
|
41
41
|
"@interop/logger": "^0.2.0",
|
|
42
|
-
"@interop/storage-core": "^0.
|
|
43
|
-
"@interop/was-client": "^0.
|
|
42
|
+
"@interop/storage-core": "^0.38.0",
|
|
43
|
+
"@interop/was-client": "^0.98.0",
|
|
44
44
|
"@playwright/test": "^1.60.0",
|
|
45
45
|
"@types/node": "^26.0.1",
|
|
46
46
|
"@vitest/coverage-v8": "^4.1.7",
|