@interop/wallet-core 0.15.0 → 0.17.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/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/listing.d.ts +24 -3
- package/dist/clients/listing.d.ts.map +1 -1
- package/dist/clients/listing.js +20 -7
- package/dist/clients/listing.js.map +1 -1
- package/dist/clients/revocation.d.ts +5 -2
- package/dist/clients/revocation.d.ts.map +1 -1
- package/dist/clients/revocation.js +27 -11
- package/dist/clients/revocation.js.map +1 -1
- package/dist/clients/rosterPolicy.d.ts +26 -5
- package/dist/clients/rosterPolicy.d.ts.map +1 -1
- package/dist/clients/rosterPolicy.js +93 -35
- package/dist/clients/rosterPolicy.js.map +1 -1
- package/dist/descriptors/refresh.d.ts +3 -1
- package/dist/descriptors/refresh.d.ts.map +1 -1
- package/dist/descriptors/refresh.js +3 -1
- package/dist/descriptors/refresh.js.map +1 -1
- package/dist/display/alignment.d.ts +8 -2
- package/dist/display/alignment.d.ts.map +1 -1
- package/dist/display/alignment.js +11 -8
- package/dist/display/alignment.js.map +1 -1
- package/dist/display/displayFields.d.ts +6 -2
- package/dist/display/displayFields.d.ts.map +1 -1
- package/dist/display/displayFields.js.map +1 -1
- package/dist/display/evidence.d.ts +9 -3
- package/dist/display/evidence.d.ts.map +1 -1
- package/dist/display/evidence.js +3 -1
- package/dist/display/evidence.js.map +1 -1
- package/dist/display/index.d.ts +1 -1
- package/dist/display/index.d.ts.map +1 -1
- package/dist/display/index.js +1 -1
- package/dist/display/index.js.map +1 -1
- package/dist/display/issuer.d.ts +12 -4
- package/dist/display/issuer.d.ts.map +1 -1
- package/dist/display/issuer.js.map +1 -1
- package/dist/display/obv3.d.ts +7 -2
- package/dist/display/obv3.d.ts.map +1 -1
- package/dist/display/obv3.js +14 -24
- package/dist/display/obv3.js.map +1 -1
- package/dist/display/parse.d.ts +6 -2
- package/dist/display/parse.d.ts.map +1 -1
- package/dist/display/parse.js +6 -2
- package/dist/display/parse.js.map +1 -1
- package/dist/display/subject.d.ts +4 -0
- package/dist/display/subject.d.ts.map +1 -1
- package/dist/display/subject.js +12 -10
- package/dist/display/subject.js.map +1 -1
- package/dist/display/text.d.ts +11 -0
- package/dist/display/text.d.ts.map +1 -1
- package/dist/display/text.js +20 -4
- package/dist/display/text.js.map +1 -1
- package/dist/display/types.js +1 -1
- package/dist/display/types.js.map +1 -1
- package/dist/display/validity.js +4 -4
- package/dist/display/validity.js.map +1 -1
- package/dist/display/verificationView.d.ts +21 -7
- package/dist/display/verificationView.d.ts.map +1 -1
- package/dist/display/verificationView.js.map +1 -1
- package/dist/enrollment/enrollment.d.ts +5 -3
- package/dist/enrollment/enrollment.d.ts.map +1 -1
- package/dist/enrollment/enrollment.js +79 -15
- package/dist/enrollment/enrollment.js.map +1 -1
- package/dist/keys/clientKeyRecord.d.ts +3 -1
- package/dist/keys/clientKeyRecord.d.ts.map +1 -1
- package/dist/keys/clientKeyRecord.js +42 -10
- package/dist/keys/clientKeyRecord.js.map +1 -1
- package/dist/keys/index.d.ts +1 -1
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +1 -1
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/pukCascade.d.ts.map +1 -1
- package/dist/keys/pukCascade.js +13 -14
- package/dist/keys/pukCascade.js.map +1 -1
- package/dist/keys/pukRoster.d.ts +85 -7
- package/dist/keys/pukRoster.d.ts.map +1 -1
- package/dist/keys/pukRoster.js +136 -11
- package/dist/keys/pukRoster.js.map +1 -1
- package/dist/request/classify.d.ts +15 -1
- package/dist/request/classify.d.ts.map +1 -1
- package/dist/request/classify.js +38 -14
- package/dist/request/classify.js.map +1 -1
- package/dist/request/composeVp.d.ts.map +1 -1
- package/dist/request/composeVp.js +10 -3
- package/dist/request/composeVp.js.map +1 -1
- package/dist/request/matching.d.ts +6 -0
- package/dist/request/matching.d.ts.map +1 -1
- package/dist/request/matching.js +33 -8
- package/dist/request/matching.js.map +1 -1
- package/dist/request/parse.d.ts +5 -2
- package/dist/request/parse.d.ts.map +1 -1
- package/dist/request/parse.js +30 -5
- package/dist/request/parse.js.map +1 -1
- package/dist/request/presentationSuite.d.ts.map +1 -1
- package/dist/request/presentationSuite.js +6 -2
- package/dist/request/presentationSuite.js.map +1 -1
- package/dist/request/processRequest.js +1 -1
- package/dist/request/processRequest.js.map +1 -1
- package/dist/space/activity.d.ts +21 -7
- package/dist/space/activity.d.ts.map +1 -1
- package/dist/space/activity.js +18 -6
- package/dist/space/activity.js.map +1 -1
- package/dist/space/collections.d.ts +18 -6
- package/dist/space/collections.d.ts.map +1 -1
- package/dist/space/collections.js +18 -6
- package/dist/space/collections.js.map +1 -1
- package/dist/space/wasLink.d.ts +6 -2
- package/dist/space/wasLink.d.ts.map +1 -1
- package/dist/space/wasLink.js +5 -2
- package/dist/space/wasLink.js.map +1 -1
- package/dist/sync/contactsConflict.d.ts +1 -1
- package/dist/sync/contactsConflict.js +1 -1
- package/dist/sync/engine.d.ts +33 -11
- package/dist/sync/engine.d.ts.map +1 -1
- package/dist/sync/engine.js +4 -3
- package/dist/sync/engine.js.map +1 -1
- package/dist/sync/pull.d.ts +5 -3
- package/dist/sync/pull.d.ts.map +1 -1
- package/dist/sync/pull.js +34 -10
- package/dist/sync/pull.js.map +1 -1
- package/dist/sync/push.d.ts.map +1 -1
- package/dist/sync/push.js +24 -8
- package/dist/sync/push.js.map +1 -1
- package/dist/sync/types.d.ts +30 -6
- package/dist/sync/types.d.ts.map +1 -1
- package/dist/webvh/didWebvh.d.ts +34 -0
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +56 -5
- package/dist/webvh/didWebvh.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 +4 -1
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/listClients.d.ts +77 -0
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +91 -1
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/revokeClient.d.ts +11 -3
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +83 -14
- package/dist/webvh/revokeClient.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,60 @@
|
|
|
1
1
|
import { Ed25519VerificationKey } from '@interop/ed25519-verification-key';
|
|
2
2
|
import { X25519KeyAgreementKey2020 } from '@interop/x25519-key-agreement-key';
|
|
3
3
|
import { effectiveParameters, relationIds } from './didWebvh.js';
|
|
4
|
+
/**
|
|
5
|
+
* The key multibases the document currently publishes: every verification
|
|
6
|
+
* method's `publicKeyMultibase`, plus the fragment of its id (for a did:webvh
|
|
7
|
+
* document the two agree, and taking both is what makes the did:key and
|
|
8
|
+
* did:webvh spellings of one key match).
|
|
9
|
+
*
|
|
10
|
+
* @param options {object}
|
|
11
|
+
* @param options.doc {PublishedKeyDocument} a locally verified document
|
|
12
|
+
* @returns {Set<string>}
|
|
13
|
+
*/
|
|
14
|
+
export function documentKeyMultibases({ doc }) {
|
|
15
|
+
const multibases = new Set();
|
|
16
|
+
for (const method of doc.verificationMethod ?? []) {
|
|
17
|
+
if (method.publicKeyMultibase) {
|
|
18
|
+
multibases.add(method.publicKeyMultibase);
|
|
19
|
+
}
|
|
20
|
+
const fragment = method.id?.split('#').pop();
|
|
21
|
+
if (fragment) {
|
|
22
|
+
multibases.add(fragment);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return multibases;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The current-key-set rule for a recorded delegation: is the verification
|
|
29
|
+
* method that signed it still published by the document? A delegation whose
|
|
30
|
+
* signing key has left the document stops verifying the moment it does, so a
|
|
31
|
+
* `false` here is exactly "this recorded grant has rotted" -- the signal
|
|
32
|
+
* behind a re-mint or a health nudge.
|
|
33
|
+
*
|
|
34
|
+
* Matching is on the key multibase, not the whole id, so the did:key and
|
|
35
|
+
* did:webvh spellings of one key agree (a delegation signed before the
|
|
36
|
+
* account's controller was promoted names the same key under a different
|
|
37
|
+
* DID).
|
|
38
|
+
*
|
|
39
|
+
* An ABSENT `delegationKeyId` reports `false`: a record that does not say
|
|
40
|
+
* which key signed it cannot be checked against the document, and the
|
|
41
|
+
* conservative reading of an uncheckable grant is that it does not stand.
|
|
42
|
+
* That is the one decision here, taken once so no caller re-decides it -- a
|
|
43
|
+
* record predating the field is flagged rather than assumed healthy.
|
|
44
|
+
*
|
|
45
|
+
* @param options {object}
|
|
46
|
+
* @param options.doc {PublishedKeyDocument} a locally verified document
|
|
47
|
+
* @param [options.delegationKeyId] {string} the recorded delegation's
|
|
48
|
+
* verification-method id, in either DID spelling
|
|
49
|
+
* @returns {boolean}
|
|
50
|
+
*/
|
|
51
|
+
export function delegationKeyInDocument({ doc, delegationKeyId }) {
|
|
52
|
+
const multibase = delegationKeyId?.split('#').pop();
|
|
53
|
+
if (!multibase) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
return documentKeyMultibases({ doc }).has(multibase);
|
|
57
|
+
}
|
|
4
58
|
/**
|
|
5
59
|
* The multibase of an Ed25519 signing key's canonical X25519 twin -- the
|
|
6
60
|
* key-agreement key the client's enrollment published and its roster wraps
|
|
@@ -73,6 +127,42 @@ function attributeActiveUpdateKey({ log, addIndex }) {
|
|
|
73
127
|
? active
|
|
74
128
|
: undefined;
|
|
75
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* The index of the entry that published a client's verification methods (its
|
|
132
|
+
* enrollment moment, and the attribution anchor for its update key), or `-1`
|
|
133
|
+
* when the log never published them. Keyed on the signing key's multibase, the
|
|
134
|
+
* fragment of the `capabilityInvocation` reference every enrolled client
|
|
135
|
+
* publishes.
|
|
136
|
+
*
|
|
137
|
+
* @param options {object}
|
|
138
|
+
* @param options.log {DIDLog}
|
|
139
|
+
* @param options.signingKeyMultibase {string}
|
|
140
|
+
* @returns {number}
|
|
141
|
+
*/
|
|
142
|
+
function clientAddIndex({ log, signingKeyMultibase }) {
|
|
143
|
+
return log.findIndex(entry => relationIds(entry.state.capabilityInvocation).some(vmId => vmId.split('#')[1] === signingKeyMultibase));
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* One enrolled client's ACTIVE update key as the log states it, keyed on the
|
|
147
|
+
* signing key the document publishes for it -- the same attribution the
|
|
148
|
+
* listing performs, for a caller that already knows which client it means (the
|
|
149
|
+
* revocation edit, re-deriving a target whose key rotated since the listing).
|
|
150
|
+
* `undefined` when the log never published the client's verification methods,
|
|
151
|
+
* or when the attribution cannot isolate a single key (see the module doc: a
|
|
152
|
+
* wrong update key would revoke a different client's authority).
|
|
153
|
+
*
|
|
154
|
+
* @param options {object}
|
|
155
|
+
* @param options.log {DIDLog} a resolved, caller-verified log
|
|
156
|
+
* @param options.signingKeyMultibase {string} the client's Ed25519 signing
|
|
157
|
+
* key, as the document publishes it
|
|
158
|
+
* @returns {string | undefined}
|
|
159
|
+
*/
|
|
160
|
+
export function attributeClientUpdateKey({ log, signingKeyMultibase }) {
|
|
161
|
+
const addIndex = clientAddIndex({ log, signingKeyMultibase });
|
|
162
|
+
return addIndex === -1
|
|
163
|
+
? undefined
|
|
164
|
+
: attributeActiveUpdateKey({ log, addIndex });
|
|
165
|
+
}
|
|
76
166
|
/**
|
|
77
167
|
* Lists the enrolled wallet clients of a VERIFIED did:webvh log (see the
|
|
78
168
|
* module doc: enumeration keyed on the final document's
|
|
@@ -97,7 +187,7 @@ export function listEnrolledWebvhClients({ log }) {
|
|
|
97
187
|
}
|
|
98
188
|
// The entry that published this client's verification methods -- its
|
|
99
189
|
// enrollment moment, and the attribution anchor for its update key.
|
|
100
|
-
const addIndex =
|
|
190
|
+
const addIndex = clientAddIndex({ log, signingKeyMultibase });
|
|
101
191
|
clients.push({
|
|
102
192
|
signingKeyMultibase,
|
|
103
193
|
keyAgreementKeyMultibase: keyAgreementTwinMultibase({
|
|
@@ -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":"AAgDA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAA;AAC1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAC7E,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAuBhE;;;;;;;;;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,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAA;QAC5C,IAAI,QAAQ,EAAE,CAAC;YACb,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;QAC1B,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAA;AACnB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,uBAAuB,CAAC,EACtC,GAAG,EACH,eAAe,EAIhB;IACC,MAAM,SAAS,GAAG,eAAe,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAA;IACnD,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,KAAK,CAAA;IACd,CAAC;IACD,OAAO,qBAAqB,CAAC,EAAE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40
|
* verification method leaves the document.
|
|
41
41
|
*
|
|
42
42
|
* Idempotent: a client with no remaining presence (verification methods,
|
|
43
|
-
* update key, commitments all gone) is a no-op
|
|
44
|
-
*
|
|
43
|
+
* update key, commitments all gone) is a no-op on the log (it still republishes
|
|
44
|
+
* `did.json` from the resolved log, healing a torn earlier publish), so a naive
|
|
45
|
+
* re-run after a mid-cascade crash converges without forking the log.
|
|
46
|
+
*
|
|
47
|
+
* The supplied `updateKeyMultibase` is treated as a snapshot, not as truth: a
|
|
48
|
+
* client that self-rotated between the caller's listing and this call is
|
|
49
|
+
* revoked at the key the LOG states, re-derived by attribution (see
|
|
50
|
+
* {@link currentRevokedUpdateKey}). Without that, the stale key would strike
|
|
51
|
+
* nothing out of `updateKeys` and the call would report success over a client
|
|
52
|
+
* that kept full log-update authority.
|
|
45
53
|
*
|
|
46
54
|
* Self-revocation is refused: the entry is signed by THIS client's active
|
|
47
55
|
* update key, and a client that removed its own key could not have signed
|
|
@@ -54,7 +62,7 @@ export declare class StagedCommitmentAmbiguousError extends Error {
|
|
|
54
62
|
* @param options.updateKeys {ClientWebvhUpdateKeys} the REVOKING client's
|
|
55
63
|
* own did:webvh update-key seeds
|
|
56
64
|
* @param options.revokedClient {RevokedClientKeys} the revoked client's
|
|
57
|
-
* public halves
|
|
65
|
+
* public halves; a stale `updateKeyMultibase` is re-derived from the log
|
|
58
66
|
* @param [options.knownLatentHashes] {string[]} standing latent commitments
|
|
59
67
|
* the caller vouches for (the recovery registry's update-key hashes),
|
|
60
68
|
* excluded from the staged-hash attribution
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revokeClient.d.ts","sourceRoot":"","sources":["../../src/webvh/revokeClient.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EACV,MAAM,EAGP,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"revokeClient.d.ts","sourceRoot":"","sources":["../../src/webvh/revokeClient.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EACV,MAAM,EAGP,MAAM,2BAA2B,CAAA;AAYlC,OAAO,KAAK,EACV,qBAAqB,EAErB,eAAe,EACf,YAAY,EACb,MAAM,eAAe,CAAA;AAEtB;;;;;GAKG;AACH,MAAM,WAAW,iBAAkB,SAAQ,eAAe;IACxD,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,8BAA+B,SAAQ,KAAK;IACvD,UAAU,EAAE,MAAM,EAAE,CAAA;gBACR,EAAE,UAAU,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,EAAE,CAAA;KAAE;CASrD;AA4JD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,OAAO,EACP,UAAU,EACV,aAAa,EACb,iBAAsB,EACvB,EAAE;IACD,OAAO,EAAE,YAAY,CAAA;IACrB,UAAU,EAAE,qBAAqB,CAAA;IACjC,aAAa,EAAE,iBAAiB,CAAA;IAChC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC7B,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAqGxC"}
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
* standing commitment.
|
|
34
34
|
*/
|
|
35
35
|
import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
|
|
36
|
-
import { assertCarryOverCommitments, effectiveParameters, publishWebvhLog, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner } from './didWebvh.js';
|
|
36
|
+
import { assertCarryOverCommitments, concludeWithPublishedLog, effectiveParameters, publishWebvhLog, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner } from './didWebvh.js';
|
|
37
|
+
import { attributeClientUpdateKey } from './listClients.js';
|
|
37
38
|
/**
|
|
38
39
|
* Thrown when the log attribution cannot isolate the revoked client's staged
|
|
39
40
|
* commitment to a single hash -- more than one candidate survives after the
|
|
@@ -132,6 +133,56 @@ async function attributeStagedHash({ log, revokedUpdateKey, knownLatentHashes })
|
|
|
132
133
|
}
|
|
133
134
|
return atCommit.size === 1 ? [...atCommit][0] : undefined;
|
|
134
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* The revoked client's update key as the log states it NOW, which is not
|
|
138
|
+
* necessarily the one the caller supplied: a listing is a snapshot, and the
|
|
139
|
+
* client being revoked can self-rotate between the listing and the revocation
|
|
140
|
+
* (its old key retired, a fresh one revealed). Acting on the stale key is the
|
|
141
|
+
* dangerous shape -- the removal entry would strike nothing out of
|
|
142
|
+
* `updateKeys` while the document edit still went through, returning success
|
|
143
|
+
* over a client that kept full log-update authority.
|
|
144
|
+
*
|
|
145
|
+
* So a supplied key that the log no longer authorizes AND no longer commits,
|
|
146
|
+
* for a client whose verification methods are still published, is re-derived
|
|
147
|
+
* from the log by attribution on the client's signing key (the same
|
|
148
|
+
* attribution the listing performs). Re-deriving beats refusing here because
|
|
149
|
+
* the identity being revoked is the verification method, not the key snapshot:
|
|
150
|
+
* telling the caller to re-list would send it back into the same race, and the
|
|
151
|
+
* log states the answer already. An attribution that cannot isolate a single
|
|
152
|
+
* key throws rather than guessing -- removing a wrong key would revoke another
|
|
153
|
+
* client's authority.
|
|
154
|
+
*
|
|
155
|
+
* @param options {object}
|
|
156
|
+
* @param options.published {PublishedWebvhLog}
|
|
157
|
+
* @param options.revokedClient {RevokedClientKeys}
|
|
158
|
+
* @param options.vmPresent {boolean} whether the document still publishes
|
|
159
|
+
* the revoked client's verification methods
|
|
160
|
+
* @returns {Promise<string>}
|
|
161
|
+
*/
|
|
162
|
+
async function currentRevokedUpdateKey({ published, revokedClient, vmPresent }) {
|
|
163
|
+
const supplied = revokedClient.updateKeyMultibase;
|
|
164
|
+
const suppliedHash = await deriveNextKeyHash(supplied);
|
|
165
|
+
if (published.updateKeys.includes(supplied) ||
|
|
166
|
+
published.nextKeyHashes.includes(suppliedHash)) {
|
|
167
|
+
return supplied;
|
|
168
|
+
}
|
|
169
|
+
if (!vmPresent) {
|
|
170
|
+
// Nothing of this client stands in the log or the document: the
|
|
171
|
+
// idempotent no-op below, not a stale key.
|
|
172
|
+
return supplied;
|
|
173
|
+
}
|
|
174
|
+
const attributed = attributeClientUpdateKey({
|
|
175
|
+
log: published.log,
|
|
176
|
+
signingKeyMultibase: revokedClient.signingKeyMultibase
|
|
177
|
+
});
|
|
178
|
+
if (!attributed) {
|
|
179
|
+
throw new Error('did:webvh: the update key supplied for the revoked client is no longer ' +
|
|
180
|
+
'authorized or committed by the log (it rotated), and the log ' +
|
|
181
|
+
"attribution cannot isolate the client's current update key; re-list " +
|
|
182
|
+
'the enrolled clients and revoke with a key the listing states.');
|
|
183
|
+
}
|
|
184
|
+
return attributed;
|
|
185
|
+
}
|
|
135
186
|
/**
|
|
136
187
|
* REVOCATION (run by another enrolled client, root authority): removes an
|
|
137
188
|
* enrolled wallet client from the published document -- its two verification
|
|
@@ -144,8 +195,16 @@ async function attributeStagedHash({ log, revokedUpdateKey, knownLatentHashes })
|
|
|
144
195
|
* verification method leaves the document.
|
|
145
196
|
*
|
|
146
197
|
* Idempotent: a client with no remaining presence (verification methods,
|
|
147
|
-
* update key, commitments all gone) is a no-op
|
|
148
|
-
*
|
|
198
|
+
* update key, commitments all gone) is a no-op on the log (it still republishes
|
|
199
|
+
* `did.json` from the resolved log, healing a torn earlier publish), so a naive
|
|
200
|
+
* re-run after a mid-cascade crash converges without forking the log.
|
|
201
|
+
*
|
|
202
|
+
* The supplied `updateKeyMultibase` is treated as a snapshot, not as truth: a
|
|
203
|
+
* client that self-rotated between the caller's listing and this call is
|
|
204
|
+
* revoked at the key the LOG states, re-derived by attribution (see
|
|
205
|
+
* {@link currentRevokedUpdateKey}). Without that, the stale key would strike
|
|
206
|
+
* nothing out of `updateKeys` and the call would report success over a client
|
|
207
|
+
* that kept full log-update authority.
|
|
149
208
|
*
|
|
150
209
|
* Self-revocation is refused: the entry is signed by THIS client's active
|
|
151
210
|
* update key, and a client that removed its own key could not have signed
|
|
@@ -158,7 +217,7 @@ async function attributeStagedHash({ log, revokedUpdateKey, knownLatentHashes })
|
|
|
158
217
|
* @param options.updateKeys {ClientWebvhUpdateKeys} the REVOKING client's
|
|
159
218
|
* own did:webvh update-key seeds
|
|
160
219
|
* @param options.revokedClient {RevokedClientKeys} the revoked client's
|
|
161
|
-
* public halves
|
|
220
|
+
* public halves; a stale `updateKeyMultibase` is re-derived from the log
|
|
162
221
|
* @param [options.knownLatentHashes] {string[]} standing latent commitments
|
|
163
222
|
* the caller vouches for (the recovery registry's update-key hashes),
|
|
164
223
|
* excluded from the staged-hash attribution
|
|
@@ -174,20 +233,30 @@ export async function revokeWebvhClient({ idStore, updateKeys, revokedClient, kn
|
|
|
174
233
|
throw new Error('did:webvh: did.jsonl is missing; nothing to revoke from.');
|
|
175
234
|
}
|
|
176
235
|
const { did, doc } = published;
|
|
177
|
-
const activeKey = await updateKeyMultibase({ seed: updateKeys.updateSeed });
|
|
178
|
-
if (revokedClient.updateKeyMultibase === activeKey) {
|
|
179
|
-
throw new Error('did:webvh: a client cannot revoke itself; disconnect this client ' +
|
|
180
|
-
'from another enrolled client instead.');
|
|
181
|
-
}
|
|
182
236
|
const signingVmId = `${did}#${revokedClient.signingKeyMultibase}`;
|
|
183
237
|
const keyAgreementVmId = `${did}#${revokedClient.keyAgreementKeyMultibase}`;
|
|
184
|
-
const revokedHash = await deriveNextKeyHash(revokedClient.updateKeyMultibase);
|
|
185
238
|
const existingMethods = (doc.verificationMethod ?? []);
|
|
186
239
|
const vmPresent = existingMethods.some(method => method.id === signingVmId || method.id === keyAgreementVmId);
|
|
187
|
-
|
|
240
|
+
// The key the log states for this client now, which a self-rotation since
|
|
241
|
+
// the caller's listing may have moved on.
|
|
242
|
+
const revokedUpdateKey = await currentRevokedUpdateKey({
|
|
243
|
+
published,
|
|
244
|
+
revokedClient,
|
|
245
|
+
vmPresent
|
|
246
|
+
});
|
|
247
|
+
const activeKey = await updateKeyMultibase({ seed: updateKeys.updateSeed });
|
|
248
|
+
if (revokedUpdateKey === activeKey ||
|
|
249
|
+
revokedClient.updateKeyMultibase === activeKey) {
|
|
250
|
+
throw new Error('did:webvh: a client cannot revoke itself; disconnect this client ' +
|
|
251
|
+
'from another enrolled client instead.');
|
|
252
|
+
}
|
|
253
|
+
const revokedHash = await deriveNextKeyHash(revokedUpdateKey);
|
|
254
|
+
const keyPresent = published.updateKeys.includes(revokedUpdateKey);
|
|
188
255
|
const hashPresent = published.nextKeyHashes.includes(revokedHash);
|
|
189
256
|
if (!vmPresent && !keyPresent && !hashPresent) {
|
|
190
|
-
|
|
257
|
+
// Nothing left to remove, but a torn earlier publish can still have left
|
|
258
|
+
// did.json lagging the log.
|
|
259
|
+
return concludeWithPublishedLog({ idStore, published });
|
|
191
260
|
}
|
|
192
261
|
if (!published.updateKeys.includes(activeKey)) {
|
|
193
262
|
throw new Error("did:webvh: the published log does not authorize this client's active " +
|
|
@@ -200,7 +269,7 @@ export async function revokeWebvhClient({ idStore, updateKeys, revokedClient, kn
|
|
|
200
269
|
const stagedHash = keyPresent
|
|
201
270
|
? await attributeStagedHash({
|
|
202
271
|
log: published.log,
|
|
203
|
-
revokedUpdateKey
|
|
272
|
+
revokedUpdateKey,
|
|
204
273
|
knownLatentHashes
|
|
205
274
|
})
|
|
206
275
|
: undefined;
|
|
@@ -210,7 +279,7 @@ export async function revokeWebvhClient({ idStore, updateKeys, revokedClient, kn
|
|
|
210
279
|
const updated = await updateDID({
|
|
211
280
|
log: published.log,
|
|
212
281
|
signer,
|
|
213
|
-
updateKeys: published.updateKeys.filter(key => key !==
|
|
282
|
+
updateKeys: published.updateKeys.filter(key => key !== revokedUpdateKey),
|
|
214
283
|
nextKeyHashes: published.nextKeyHashes.filter(hash => !removedHashes.has(hash)),
|
|
215
284
|
verificationMethods: existingMethods.filter(method => !method.id || !removedVmIds.has(method.id)),
|
|
216
285
|
authentication: relationIds(doc.authentication).filter(id => id !== signingVmId),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revokeClient.js","sourceRoot":"","sources":["../../src/webvh/revokeClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAMxE,OAAO,EACL,0BAA0B,EAC1B,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,eAAe,EAChB,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"revokeClient.js","sourceRoot":"","sources":["../../src/webvh/revokeClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAMxE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,eAAe,EAChB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AAkB3D;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,8BAA+B,SAAQ,KAAK;IACvD,UAAU,CAAU;IACpB,YAAY,EAAE,UAAU,EAA4B;QAClD,KAAK,CACH,kEAAkE;YAChE,qEAAqE;YACrE,kEAAkE,CACrE,CAAA;QACD,IAAI,CAAC,IAAI,GAAG,gCAAgC,CAAA;QAC5C,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9B,CAAC;CACF;AAED;;;;;;;;;;;;;;GAcG;AACH,KAAK,UAAU,mBAAmB,CAAC,EACjC,GAAG,EACH,gBAAgB,EAChB,iBAAiB,EAKlB;IACC,MAAM,WAAW,GAAG,MAAM,iBAAiB,CAAC,gBAAgB,CAAC,CA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
|
{
|
|
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.17.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "pnpm run clear && tsc",
|
|
@@ -127,9 +127,9 @@
|
|
|
127
127
|
"@interop/ed25519-verification-key": "^8.0.3",
|
|
128
128
|
"@interop/ezcap": "^7.4.1",
|
|
129
129
|
"@interop/security-document-loader": "^9.5.1",
|
|
130
|
-
"@interop/social-core": "^0.
|
|
130
|
+
"@interop/social-core": "^0.8.0",
|
|
131
131
|
"@interop/vc": "^11.0.6",
|
|
132
|
-
"@interop/was-client": "^0.
|
|
132
|
+
"@interop/was-client": "^0.27.0",
|
|
133
133
|
"@interop/webkms-client": "^14.7.1",
|
|
134
134
|
"@interop/x25519-key-agreement-key": "^5.2.1",
|
|
135
135
|
"@noble/hashes": "^2.2.0",
|