@interop/wallet-core 0.40.0 → 0.41.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 +2 -1
- package/dist/clients/listing.d.ts +4 -3
- package/dist/clients/listing.d.ts.map +1 -1
- package/dist/clients/listing.js.map +1 -1
- package/dist/clients/policy.d.ts +3 -2
- package/dist/clients/policy.d.ts.map +1 -1
- package/dist/clients/policy.js +3 -3
- package/dist/clients/policy.js.map +1 -1
- package/dist/clients/revocation.d.ts +14 -4
- package/dist/clients/revocation.d.ts.map +1 -1
- package/dist/clients/revocation.js +29 -14
- package/dist/clients/revocation.js.map +1 -1
- package/dist/enrollment/enrollment.d.ts +30 -2
- package/dist/enrollment/enrollment.d.ts.map +1 -1
- package/dist/enrollment/enrollment.js +44 -4
- package/dist/enrollment/enrollment.js.map +1 -1
- package/dist/enrollment/index.d.ts +4 -1
- package/dist/enrollment/index.d.ts.map +1 -1
- package/dist/enrollment/index.js +4 -1
- package/dist/enrollment/index.js.map +1 -1
- package/dist/keyring/index.d.ts +6 -5
- package/dist/keyring/index.d.ts.map +1 -1
- package/dist/keyring/index.js +6 -5
- package/dist/keyring/index.js.map +1 -1
- package/dist/keyring/record.d.ts +30 -10
- package/dist/keyring/record.d.ts.map +1 -1
- package/dist/keyring/record.js +31 -15
- package/dist/keyring/record.js.map +1 -1
- package/dist/keys/index.d.ts +4 -2
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +2 -1
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/rosterLogStore.d.ts +18 -1
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +28 -5
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/keys/userKeyCascade.d.ts +10 -3
- package/dist/keys/userKeyCascade.d.ts.map +1 -1
- package/dist/keys/userKeyCascade.js +10 -4
- package/dist/keys/userKeyCascade.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +17 -21
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +17 -18
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/recovery/index.d.ts +8 -0
- package/dist/recovery/index.d.ts.map +1 -1
- package/dist/recovery/index.js +7 -0
- package/dist/recovery/index.js.map +1 -1
- package/dist/recovery/recoveryDelegation.d.ts +120 -0
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -0
- package/dist/recovery/recoveryDelegation.js +216 -0
- package/dist/recovery/recoveryDelegation.js.map +1 -0
- package/dist/recovery/recoveryRecord.d.ts +5 -4
- package/dist/recovery/recoveryRecord.d.ts.map +1 -1
- package/dist/recovery/recoveryRecord.js +7 -9
- package/dist/recovery/recoveryRecord.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +20 -14
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +72 -1
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +111 -12
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/index.d.ts +9 -2
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +8 -2
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/keyAgreement.d.ts +56 -0
- package/dist/webvh/keyAgreement.d.ts.map +1 -0
- package/dist/webvh/keyAgreement.js +47 -0
- package/dist/webvh/keyAgreement.js.map +1 -0
- package/dist/webvh/listClients.d.ts +69 -20
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +102 -14
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/revokeClient.d.ts +21 -11
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +31 -14
- package/dist/webvh/revokeClient.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The ONE reference-resolving reader for a did:webvh document's `keyAgreement`
|
|
6
|
+
* relation, and the document shape it reads.
|
|
7
|
+
*
|
|
8
|
+
* The relation may carry either form the DID Core data model allows -- a string
|
|
9
|
+
* reference into `verificationMethod`, or an embedded method -- so every
|
|
10
|
+
* consumer that asks "which key-agreement methods does this document publish"
|
|
11
|
+
* must resolve references first. That resolution lives here once, and the
|
|
12
|
+
* consumers are plain filters over its result: the client listing and the
|
|
13
|
+
* revocation removal keep only the methods carrying a client's controller
|
|
14
|
+
* marker, while the user key roster's recipient resolver deliberately keeps
|
|
15
|
+
* unmarked methods too.
|
|
16
|
+
*
|
|
17
|
+
* Deliberately dependency-light -- it imports nothing at all -- so the `keys`
|
|
18
|
+
* layer can share the reader without pulling the ceremony or signing graph.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* A locally verified did:webvh document, read for the `keyAgreement` methods it
|
|
22
|
+
* publishes and the controller each one carries. Structural on purpose: a
|
|
23
|
+
* resolved `DIDDoc` satisfies it, and so does any narrower document shape a
|
|
24
|
+
* wallet already holds.
|
|
25
|
+
*/
|
|
26
|
+
export interface KeyAgreementDocument {
|
|
27
|
+
verificationMethod?: Array<{
|
|
28
|
+
id?: string;
|
|
29
|
+
controller?: string;
|
|
30
|
+
publicKeyMultibase?: string;
|
|
31
|
+
}>;
|
|
32
|
+
keyAgreement?: Array<string | {
|
|
33
|
+
id?: string;
|
|
34
|
+
controller?: string;
|
|
35
|
+
publicKeyMultibase?: string;
|
|
36
|
+
}>;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The `keyAgreement` verification methods a document publishes, materialized:
|
|
40
|
+
* string references resolved against `verificationMethod` (a reference nothing
|
|
41
|
+
* backs is dropped), embedded methods taken verbatim. Document order is
|
|
42
|
+
* preserved, and nothing is filtered -- deciding which of these methods belongs
|
|
43
|
+
* to whom is each caller's own rule.
|
|
44
|
+
*
|
|
45
|
+
* @param options {object}
|
|
46
|
+
* @param options.doc {KeyAgreementDocument} a locally verified document
|
|
47
|
+
* @returns {Array<{ id?: string, controller?: string, publicKeyMultibase?: string }>}
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolvedKeyAgreementMethods({ doc }: {
|
|
50
|
+
doc: KeyAgreementDocument;
|
|
51
|
+
}): Array<{
|
|
52
|
+
id?: string;
|
|
53
|
+
controller?: string;
|
|
54
|
+
publicKeyMultibase?: string;
|
|
55
|
+
}>;
|
|
56
|
+
//# sourceMappingURL=keyAgreement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyAgreement.d.ts","sourceRoot":"","sources":["../../src/webvh/keyAgreement.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;GAeG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACnC,kBAAkB,CAAC,EAAE,KAAK,CAAC;QACzB,EAAE,CAAC,EAAE,MAAM,CAAA;QACX,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,kBAAkB,CAAC,EAAE,MAAM,CAAA;KAC5B,CAAC,CAAA;IACF,YAAY,CAAC,EAAE,KAAK,CAClB,MAAM,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;KAAE,CAC3E,CAAA;CACF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,GAAG,EACJ,EAAE;IACD,GAAG,EAAE,oBAAoB,CAAA;CAC1B,GAAG,KAAK,CAAC;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAsB3E"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The ONE reference-resolving reader for a did:webvh document's `keyAgreement`
|
|
6
|
+
* relation, and the document shape it reads.
|
|
7
|
+
*
|
|
8
|
+
* The relation may carry either form the DID Core data model allows -- a string
|
|
9
|
+
* reference into `verificationMethod`, or an embedded method -- so every
|
|
10
|
+
* consumer that asks "which key-agreement methods does this document publish"
|
|
11
|
+
* must resolve references first. That resolution lives here once, and the
|
|
12
|
+
* consumers are plain filters over its result: the client listing and the
|
|
13
|
+
* revocation removal keep only the methods carrying a client's controller
|
|
14
|
+
* marker, while the user key roster's recipient resolver deliberately keeps
|
|
15
|
+
* unmarked methods too.
|
|
16
|
+
*
|
|
17
|
+
* Deliberately dependency-light -- it imports nothing at all -- so the `keys`
|
|
18
|
+
* layer can share the reader without pulling the ceremony or signing graph.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* The `keyAgreement` verification methods a document publishes, materialized:
|
|
22
|
+
* string references resolved against `verificationMethod` (a reference nothing
|
|
23
|
+
* backs is dropped), embedded methods taken verbatim. Document order is
|
|
24
|
+
* preserved, and nothing is filtered -- deciding which of these methods belongs
|
|
25
|
+
* to whom is each caller's own rule.
|
|
26
|
+
*
|
|
27
|
+
* @param options {object}
|
|
28
|
+
* @param options.doc {KeyAgreementDocument} a locally verified document
|
|
29
|
+
* @returns {Array<{ id?: string, controller?: string, publicKeyMultibase?: string }>}
|
|
30
|
+
*/
|
|
31
|
+
export function resolvedKeyAgreementMethods({ doc }) {
|
|
32
|
+
const byId = new Map();
|
|
33
|
+
for (const method of doc.verificationMethod ?? []) {
|
|
34
|
+
if (typeof method?.id === 'string') {
|
|
35
|
+
byId.set(method.id, method);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const methods = [];
|
|
39
|
+
for (const entry of doc.keyAgreement ?? []) {
|
|
40
|
+
const method = typeof entry === 'string' ? byId.get(entry) : entry;
|
|
41
|
+
if (method) {
|
|
42
|
+
methods.push(method);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return methods;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=keyAgreement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyAgreement.js","sourceRoot":"","sources":["../../src/webvh/keyAgreement.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;GAeG;AAmBH;;;;;;;;;;GAUG;AACH,MAAM,UAAU,2BAA2B,CAAC,EAC1C,GAAG,EAGJ;IACC,MAAM,IAAI,GAAG,IAAI,GAAG,EAGjB,CAAA;IACH,KAAK,MAAM,MAAM,IAAI,GAAG,CAAC,kBAAkB,IAAI,EAAE,EAAE,CAAC;QAClD,IAAI,OAAO,MAAM,EAAE,EAAE,KAAK,QAAQ,EAAE,CAAC;YACnC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;QAC7B,CAAC;IACH,CAAC;IACD,MAAM,OAAO,GAIR,EAAE,CAAA;IACP,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,YAAY,IAAI,EAAE,EAAE,CAAC;QAC3C,MAAM,MAAM,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;QAClE,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACtB,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
@@ -28,12 +28,18 @@
|
|
|
28
28
|
* - `addedAt` -- the `versionTime` of the entry that published the client's
|
|
29
29
|
* verification methods (its enrollment moment, as the log states it).
|
|
30
30
|
*
|
|
31
|
-
* The X25519 `
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
31
|
+
* The X25519 `keyAgreementKeyMultibases` set is READ from the document, not
|
|
32
|
+
* derived: it is every `keyAgreement` method published under the client's
|
|
33
|
+
* controller marker (`controller: did:key:<signing multibase>`, the write-side
|
|
34
|
+
* convention every enrollment follows). The marker is what tells a client's
|
|
35
|
+
* key-agreement methods apart from the deliberately unmarked ones a recovery
|
|
36
|
+
* continuation publishes beside them. It is hard-required -- a client with no
|
|
37
|
+
* marked method reports an EMPTY set, the same refuse-not-guess rule the
|
|
38
|
+
* update-key attribution follows, since a guessed key-agreement key would make
|
|
39
|
+
* a revocation report success over a method that never left the document. The
|
|
40
|
+
* whole set is built in a single pass over the document's resolved
|
|
41
|
+
* key-agreement methods, grouped by controller once and looked up per client,
|
|
42
|
+
* rather than a per-client rescan.
|
|
37
43
|
*
|
|
38
44
|
* Verification is the CALLER's job: pass a log that was resolved and checked
|
|
39
45
|
* against the account pointer (the wallet's ordinary
|
|
@@ -46,14 +52,22 @@
|
|
|
46
52
|
* decide "does this delegation still chain" decides it in one place.
|
|
47
53
|
*/
|
|
48
54
|
import type { DIDLog } from '@interop/did-method-webvh';
|
|
49
|
-
import type {
|
|
55
|
+
import type { KeyAgreementDocument } from './keyAgreement.js';
|
|
50
56
|
/**
|
|
51
|
-
* One enrolled wallet client as the log states it. `
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
57
|
+
* One enrolled wallet client as the log states it. `keyAgreementKeyMultibases`
|
|
58
|
+
* is REQUIRED and set-valued: every key-agreement method the client's
|
|
59
|
+
* controller marker claims, in document order, deduplicated. An EMPTY array is
|
|
60
|
+
* the refuse-not-guess state -- the document carries no marked method for the
|
|
61
|
+
* client. `updateKeyMultibase` and `addedAt` are absent when the log
|
|
62
|
+
* attribution cannot recover them (see the module doc).
|
|
63
|
+
*
|
|
64
|
+
* A client that published several marked key-agreement methods surfaces the
|
|
65
|
+
* full set here; revoking it removes them all regardless, because the removal
|
|
66
|
+
* filters the document by the marker rather than by this member.
|
|
55
67
|
*/
|
|
56
|
-
export interface EnrolledWebvhClient
|
|
68
|
+
export interface EnrolledWebvhClient {
|
|
69
|
+
signingKeyMultibase: string;
|
|
70
|
+
keyAgreementKeyMultibases: string[];
|
|
57
71
|
updateKeyMultibase?: string;
|
|
58
72
|
addedAt?: string;
|
|
59
73
|
}
|
|
@@ -110,19 +124,54 @@ export declare function delegationKeyInDocument({ doc, delegationKeyId }: {
|
|
|
110
124
|
delegationKeyId?: string;
|
|
111
125
|
}): boolean;
|
|
112
126
|
/**
|
|
113
|
-
* The
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
127
|
+
* The `keyAgreement` verification methods one client's controller marker
|
|
128
|
+
* claims: the document's resolved key-agreement methods
|
|
129
|
+
* ({@link resolvedKeyAgreementMethods}) filtered to those whose `controller` is
|
|
130
|
+
* the client's did:key (see `clientKeyAgreementController`).
|
|
131
|
+
*
|
|
132
|
+
* The marker is HARD-REQUIRED here, and that is where this predicate parts
|
|
133
|
+
* company with the user key roster's recipient resolver, which filters the same
|
|
134
|
+
* reader's result by nothing more than "carries a public key multibase".
|
|
135
|
+
* Listing and revocation are refuse-not-guess surfaces: an unmarked method
|
|
136
|
+
* matched by proximity would make a revocation report success over a method
|
|
137
|
+
* that never left the document. The roster resolver's job is the opposite --
|
|
138
|
+
* it must keep wrapping the user key to the deliberately unmarked
|
|
139
|
+
* key-agreement methods a recovery code publishes, so it matches them too.
|
|
140
|
+
*
|
|
141
|
+
* The ordinary shape is exactly one method, but the result is a SET rather
|
|
142
|
+
* than a first match on purpose: a revocation has to remove every method the
|
|
143
|
+
* marker claims, or a client with a second published key-agreement key would
|
|
144
|
+
* keep a standing wrap target after a revocation reported success.
|
|
145
|
+
*
|
|
146
|
+
* @param options {object}
|
|
147
|
+
* @param options.doc {KeyAgreementDocument} a locally verified document
|
|
148
|
+
* @param options.signingKeyMultibase {string} the client's Ed25519 signing
|
|
149
|
+
* key, as the document publishes it
|
|
150
|
+
* @returns {Array<{ id?: string, publicKeyMultibase?: string }>}
|
|
151
|
+
*/
|
|
152
|
+
export declare function markedKeyAgreementMethods({ doc, signingKeyMultibase }: {
|
|
153
|
+
doc: KeyAgreementDocument;
|
|
154
|
+
signingKeyMultibase: string;
|
|
155
|
+
}): Array<{
|
|
156
|
+
id?: string;
|
|
157
|
+
publicKeyMultibase?: string;
|
|
158
|
+
}>;
|
|
159
|
+
/**
|
|
160
|
+
* The key multibases of the `keyAgreement` methods one client's controller
|
|
161
|
+
* marker claims -- {@link markedKeyAgreementMethods}, reduced to the
|
|
162
|
+
* multibases a roster wrap and a listing row speak in. A method carrying no
|
|
163
|
+
* `publicKeyMultibase` falls back to the fragment of its id (for a did:webvh
|
|
164
|
+
* document the two agree).
|
|
118
165
|
*
|
|
119
166
|
* @param options {object}
|
|
167
|
+
* @param options.doc {KeyAgreementDocument} a locally verified document
|
|
120
168
|
* @param options.signingKeyMultibase {string}
|
|
121
|
-
* @returns {string}
|
|
169
|
+
* @returns {string[]}
|
|
122
170
|
*/
|
|
123
|
-
export declare function
|
|
171
|
+
export declare function markedKeyAgreementMultibases({ doc, signingKeyMultibase }: {
|
|
172
|
+
doc: KeyAgreementDocument;
|
|
124
173
|
signingKeyMultibase: string;
|
|
125
|
-
}): string;
|
|
174
|
+
}): string[];
|
|
126
175
|
/**
|
|
127
176
|
* One enrolled client's ACTIVE update key as the log states it, keyed on the
|
|
128
177
|
* signing key the document publishes for it -- the same attribution the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listClients.d.ts","sourceRoot":"","sources":["../../src/webvh/listClients.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"listClients.d.ts","sourceRoot":"","sources":["../../src/webvh/listClients.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG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BAAoB,CAAA;IACzB,mBAAmB,EAAE,MAAM,CAAA;CAC5B,GAAG,MAAM,EAAE,CAcX;AAyID;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,GAAG,EACH,mBAAmB,EACpB,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,mBAAmB,EAAE,MAAM,CAAA;CAC5B,GAAG,MAAM,GAAG,SAAS,CAKrB;AA0BD;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,GAAG,EACJ,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;CACZ,GAAG,mBAAmB,EAAE,CAmCxB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { x25519RecipientFromDidKey } from '@interop/was-client/edv';
|
|
2
1
|
import { vmFragmentOf } from '../resourceLog/vmFragment.js';
|
|
3
|
-
import { effectiveParameters, relationIds } from './didWebvh.js';
|
|
2
|
+
import { clientKeyAgreementController, effectiveParameters, relationIds } from './didWebvh.js';
|
|
3
|
+
import { resolvedKeyAgreementMethods } from './keyAgreement.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
|
|
@@ -56,19 +56,104 @@ export function delegationKeyInDocument({ doc, delegationKeyId }) {
|
|
|
56
56
|
return documentKeyMultibases({ doc }).has(multibase);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* The
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
59
|
+
* The `keyAgreement` verification methods one client's controller marker
|
|
60
|
+
* claims: the document's resolved key-agreement methods
|
|
61
|
+
* ({@link resolvedKeyAgreementMethods}) filtered to those whose `controller` is
|
|
62
|
+
* the client's did:key (see `clientKeyAgreementController`).
|
|
63
|
+
*
|
|
64
|
+
* The marker is HARD-REQUIRED here, and that is where this predicate parts
|
|
65
|
+
* company with the user key roster's recipient resolver, which filters the same
|
|
66
|
+
* reader's result by nothing more than "carries a public key multibase".
|
|
67
|
+
* Listing and revocation are refuse-not-guess surfaces: an unmarked method
|
|
68
|
+
* matched by proximity would make a revocation report success over a method
|
|
69
|
+
* that never left the document. The roster resolver's job is the opposite --
|
|
70
|
+
* it must keep wrapping the user key to the deliberately unmarked
|
|
71
|
+
* key-agreement methods a recovery code publishes, so it matches them too.
|
|
72
|
+
*
|
|
73
|
+
* The ordinary shape is exactly one method, but the result is a SET rather
|
|
74
|
+
* than a first match on purpose: a revocation has to remove every method the
|
|
75
|
+
* marker claims, or a client with a second published key-agreement key would
|
|
76
|
+
* keep a standing wrap target after a revocation reported success.
|
|
77
|
+
*
|
|
78
|
+
* @param options {object}
|
|
79
|
+
* @param options.doc {KeyAgreementDocument} a locally verified document
|
|
80
|
+
* @param options.signingKeyMultibase {string} the client's Ed25519 signing
|
|
81
|
+
* key, as the document publishes it
|
|
82
|
+
* @returns {Array<{ id?: string, publicKeyMultibase?: string }>}
|
|
83
|
+
*/
|
|
84
|
+
export function markedKeyAgreementMethods({ doc, signingKeyMultibase }) {
|
|
85
|
+
const marker = clientKeyAgreementController({ signingKeyMultibase });
|
|
86
|
+
return resolvedKeyAgreementMethods({ doc }).filter(method => method.controller === marker);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The key multibases of the `keyAgreement` methods one client's controller
|
|
90
|
+
* marker claims -- {@link markedKeyAgreementMethods}, reduced to the
|
|
91
|
+
* multibases a roster wrap and a listing row speak in. A method carrying no
|
|
92
|
+
* `publicKeyMultibase` falls back to the fragment of its id (for a did:webvh
|
|
93
|
+
* document the two agree).
|
|
64
94
|
*
|
|
65
95
|
* @param options {object}
|
|
96
|
+
* @param options.doc {KeyAgreementDocument} a locally verified document
|
|
66
97
|
* @param options.signingKeyMultibase {string}
|
|
67
|
-
* @returns {string}
|
|
98
|
+
* @returns {string[]}
|
|
68
99
|
*/
|
|
69
|
-
export function
|
|
70
|
-
|
|
71
|
-
|
|
100
|
+
export function markedKeyAgreementMultibases({ doc, signingKeyMultibase }) {
|
|
101
|
+
const multibases = [];
|
|
102
|
+
for (const method of markedKeyAgreementMethods({
|
|
103
|
+
doc,
|
|
104
|
+
signingKeyMultibase
|
|
105
|
+
})) {
|
|
106
|
+
const multibase = method.publicKeyMultibase ??
|
|
107
|
+
(method.id ? vmFragmentOf(method.id) : undefined);
|
|
108
|
+
if (multibase) {
|
|
109
|
+
multibases.push(multibase);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return [...new Set(multibases)];
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Every `keyAgreement` method the document publishes, grouped by its
|
|
116
|
+
* `controller` in one pass -- the listing's batch counterpart to
|
|
117
|
+
* {@link markedKeyAgreementMultibases}, which resolves and rescans the whole
|
|
118
|
+
* relation per client. A method carrying no `publicKeyMultibase` falls back to
|
|
119
|
+
* the fragment of its id (for a did:webvh document the two agree), and a
|
|
120
|
+
* method with no `controller` at all, or that yields no multibase, is
|
|
121
|
+
* dropped: it can never be a client's marked method.
|
|
122
|
+
*
|
|
123
|
+
* Keying by controller string is what keeps this MARKED-only without an extra
|
|
124
|
+
* filter: only a client's own methods carry a `did:key:<signing multibase>`
|
|
125
|
+
* controller marker, while the deliberately unmarked methods a recovery
|
|
126
|
+
* continuation publishes carry the account DID as controller instead, so their
|
|
127
|
+
* group is simply never looked up by {@link listEnrolledWebvhClients}.
|
|
128
|
+
*
|
|
129
|
+
* Multibases within a group are deduplicated, first-seen order preserved.
|
|
130
|
+
*
|
|
131
|
+
* @param options {object}
|
|
132
|
+
* @param options.doc {KeyAgreementDocument} a locally verified document
|
|
133
|
+
* @returns {Map<string, string[]>}
|
|
134
|
+
*/
|
|
135
|
+
function markedKeyAgreementIndex({ doc }) {
|
|
136
|
+
const index = new Map();
|
|
137
|
+
for (const method of resolvedKeyAgreementMethods({ doc })) {
|
|
138
|
+
if (!method.controller) {
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
const multibase = method.publicKeyMultibase ??
|
|
142
|
+
(method.id ? vmFragmentOf(method.id) : undefined);
|
|
143
|
+
if (!multibase) {
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
const group = index.get(method.controller);
|
|
147
|
+
if (group) {
|
|
148
|
+
if (!group.includes(multibase)) {
|
|
149
|
+
group.push(multibase);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
index.set(method.controller, [multibase]);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return index;
|
|
72
157
|
}
|
|
73
158
|
/**
|
|
74
159
|
* The update keys an entry newly revealed: the effective `updateKeys` at
|
|
@@ -198,6 +283,11 @@ export function listEnrolledWebvhClients({ log }) {
|
|
|
198
283
|
// The entry that published each client's verification methods -- its
|
|
199
284
|
// enrollment moment, and the attribution anchor for its update key.
|
|
200
285
|
const addIndexes = clientAddIndexes({ log });
|
|
286
|
+
// Every keyAgreement method, grouped by controller, in one pass -- keying by
|
|
287
|
+
// controller string picks up only MARKED methods (a client's own), since the
|
|
288
|
+
// account DID controller a recovery code's unmarked method carries is never
|
|
289
|
+
// looked up below.
|
|
290
|
+
const keyAgreementIndex = markedKeyAgreementIndex({ doc });
|
|
201
291
|
const clients = [];
|
|
202
292
|
for (const vmId of relationIds(doc.capabilityInvocation)) {
|
|
203
293
|
const signingKeyMultibase = vmFragmentOf(vmId);
|
|
@@ -207,9 +297,7 @@ export function listEnrolledWebvhClients({ log }) {
|
|
|
207
297
|
const addIndex = addIndexes.get(signingKeyMultibase);
|
|
208
298
|
clients.push({
|
|
209
299
|
signingKeyMultibase,
|
|
210
|
-
|
|
211
|
-
signingKeyMultibase
|
|
212
|
-
}),
|
|
300
|
+
keyAgreementKeyMultibases: keyAgreementIndex.get(clientKeyAgreementController({ signingKeyMultibase })) ?? [],
|
|
213
301
|
updateKeyMultibase: addIndex === undefined
|
|
214
302
|
? undefined
|
|
215
303
|
: attributeActiveUpdateKey({ params, addIndex }),
|
|
@@ -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":"AAsDA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,EACnB,WAAW,EACZ,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,2BAA2B,EAAE,MAAM,mBAAmB,CAAA;AA+B/D;;;;;;;;;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,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,CAAC,CAAC,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IAC7E,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,KAAK,CAAA;IACd,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B,GAAG,uBAAuB,CAAC,EAAE,GAAG,EAAE,CAAC,CAAA;IAC1D,MAAM,OAAO,GAA0B,EAAE,CAAA;IACzC,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,GAAG,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACzD,MAAM,mBAAmB,GAAG,YAAY,CAAC,IAAI,CAAC,CAAA;QAC9C,IAAI,CAAC,mBAAmB,EAAE,CAAC;YACzB,SAAQ;QACV,CAAC;QACD,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,EAChB,QAAQ,KAAK,SAAS;gBACpB,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC,wBAAwB,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;YACpD,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"}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import type { DIDDoc } from '@interop/did-method-webvh';
|
|
2
|
-
import type { ClientWebvhUpdateKeys,
|
|
1
|
+
import type { DIDDoc, DIDLog } from '@interop/did-method-webvh';
|
|
2
|
+
import type { ClientWebvhUpdateKeys, WebvhIdStore } from './didWebvh.js';
|
|
3
3
|
/**
|
|
4
4
|
* The public halves of the client being revoked, as the document and log
|
|
5
|
-
* carry them: its
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* carry them: its signing-key multibase and its active update key. The
|
|
6
|
+
* staged-key hash is deliberately absent -- it is recovered from the log (see
|
|
7
|
+
* the module doc), since no other party ever held the staged key.
|
|
8
|
+
*
|
|
9
|
+
* The key-agreement half is deliberately absent too: the removal reads every
|
|
10
|
+
* key-agreement method the client's controller marker claims off the document
|
|
11
|
+
* itself, so no caller-supplied key-agreement key is ever needed to revoke the
|
|
12
|
+
* client completely.
|
|
8
13
|
*/
|
|
9
|
-
export interface RevokedClientKeys
|
|
14
|
+
export interface RevokedClientKeys {
|
|
15
|
+
signingKeyMultibase: string;
|
|
10
16
|
updateKeyMultibase: string;
|
|
11
17
|
}
|
|
12
18
|
/**
|
|
@@ -75,11 +81,14 @@ export declare class StagedCommitmentAmbiguousError extends Error {
|
|
|
75
81
|
* excluded from the staged-hash attribution
|
|
76
82
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
77
83
|
* to, from the caller's stored account pointer
|
|
78
|
-
* @returns {Promise<{ did: string, doc: DIDDoc }>} the
|
|
79
|
-
* resolved document AFTER the edit -- what the roster
|
|
80
|
-
* resolves its remaining recipients from, so the
|
|
81
|
-
* the log it just extended
|
|
82
|
-
*
|
|
84
|
+
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the
|
|
85
|
+
* account's DID, its resolved document AFTER the edit -- what the roster
|
|
86
|
+
* rotation that follows resolves its remaining recipients from, so the
|
|
87
|
+
* caller needs no re-fetch of the log it just extended -- and the post-edit
|
|
88
|
+
* log itself, from which that rotation's controller view is built (the
|
|
89
|
+
* revocation cascade's post-edit anchoring). On the idempotent no-op path
|
|
90
|
+
* these are the already-published document and log, which state the same
|
|
91
|
+
* thing.
|
|
83
92
|
*/
|
|
84
93
|
export declare function revokeWebvhClient(options: {
|
|
85
94
|
idStore: WebvhIdStore;
|
|
@@ -90,5 +99,6 @@ export declare function revokeWebvhClient(options: {
|
|
|
90
99
|
}): Promise<{
|
|
91
100
|
did: string;
|
|
92
101
|
doc: DIDDoc;
|
|
102
|
+
log: DIDLog;
|
|
93
103
|
}>;
|
|
94
104
|
//# sourceMappingURL=revokeClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revokeClient.d.ts","sourceRoot":"","sources":["../../src/webvh/revokeClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"revokeClient.d.ts","sourceRoot":"","sources":["../../src/webvh/revokeClient.ts"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EAEP,MAAM,2BAA2B,CAAA;AAgBlC,OAAO,KAAK,EACV,qBAAqB,EAErB,YAAY,EACb,MAAM,eAAe,CAAA;AAEtB;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,EAAE,MAAM,CAAA;IAC3B,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;AAwKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,OAAO,EAAE,YAAY,CAAA;IACrB,UAAU,EAAE,qBAAqB,CAAA;IACjC,aAAa,EAAE,iBAAiB,CAAA;IAChC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAErD"}
|
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
* -- nothing shared rotates, because nothing was shared -- and, because a
|
|
8
8
|
* removal reveals no new key, it is a SINGLE log entry (unlike enrollment's
|
|
9
9
|
* two): the client's Ed25519 verification method leaves all four signing
|
|
10
|
-
* relationships,
|
|
10
|
+
* relationships, EVERY key-agreement method its controller marker claims
|
|
11
|
+
* (`controller: did:key:<signing multibase>`, read off the document rather
|
|
12
|
+
* than derived, so a client with several published keys is fully revoked and
|
|
13
|
+
* a deliberately unmarked recovery-code method is never touched) leaves
|
|
14
|
+
* `keyAgreement`, its update key leaves
|
|
11
15
|
* `updateKeys`, and both of its standing commitments leave `nextKeyHashes` --
|
|
12
16
|
* the carry-over hash of its active update key, and the hash of its staged
|
|
13
17
|
* key.
|
|
@@ -34,7 +38,7 @@
|
|
|
34
38
|
*/
|
|
35
39
|
import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
|
|
36
40
|
import { assertCarryOverCommitments, concludeWithPublishedLog, effectiveParameters, publishUpdatedLog, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner, withLogConflictRetry } from './didWebvh.js';
|
|
37
|
-
import { attributeClientUpdateKey } from './listClients.js';
|
|
41
|
+
import { attributeClientUpdateKey, markedKeyAgreementMultibases } from './listClients.js';
|
|
38
42
|
/**
|
|
39
43
|
* Thrown when the log attribution cannot isolate the revoked client's staged
|
|
40
44
|
* commitment to a single hash -- more than one candidate survives after the
|
|
@@ -244,11 +248,14 @@ async function currentRevokedUpdateKey({ published, revokedClient, vmPresent })
|
|
|
244
248
|
* excluded from the staged-hash attribution
|
|
245
249
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
246
250
|
* to, from the caller's stored account pointer
|
|
247
|
-
* @returns {Promise<{ did: string, doc: DIDDoc }>} the
|
|
248
|
-
* resolved document AFTER the edit -- what the roster
|
|
249
|
-
* resolves its remaining recipients from, so the
|
|
250
|
-
* the log it just extended
|
|
251
|
-
*
|
|
251
|
+
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the
|
|
252
|
+
* account's DID, its resolved document AFTER the edit -- what the roster
|
|
253
|
+
* rotation that follows resolves its remaining recipients from, so the
|
|
254
|
+
* caller needs no re-fetch of the log it just extended -- and the post-edit
|
|
255
|
+
* log itself, from which that rotation's controller view is built (the
|
|
256
|
+
* revocation cascade's post-edit anchoring). On the idempotent no-op path
|
|
257
|
+
* these are the already-published document and log, which state the same
|
|
258
|
+
* thing.
|
|
252
259
|
*/
|
|
253
260
|
export async function revokeWebvhClient(options) {
|
|
254
261
|
return withLogConflictRetry(() => revokeWebvhClientOnce(options));
|
|
@@ -257,7 +264,7 @@ export async function revokeWebvhClient(options) {
|
|
|
257
264
|
* One attempt of {@link revokeWebvhClient}, re-invoked by the conflict retry.
|
|
258
265
|
*
|
|
259
266
|
* @param options {object} see {@link revokeWebvhClient}
|
|
260
|
-
* @returns {Promise<{ did: string, doc: DIDDoc }>}
|
|
267
|
+
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>}
|
|
261
268
|
*/
|
|
262
269
|
async function revokeWebvhClientOnce({ idStore, updateKeys, revokedClient, knownLatentHashes = [], expectedDid }) {
|
|
263
270
|
const published = await readPublishedLog({
|
|
@@ -269,9 +276,18 @@ async function revokeWebvhClientOnce({ idStore, updateKeys, revokedClient, known
|
|
|
269
276
|
}
|
|
270
277
|
const { did, doc } = published;
|
|
271
278
|
const signingVmId = `${did}#${revokedClient.signingKeyMultibase}`;
|
|
272
|
-
|
|
279
|
+
// Every key-agreement method the revoked client's controller marker claims,
|
|
280
|
+
// read off the document rather than paired from the caller's snapshot: a
|
|
281
|
+
// client that published more than one is fully revoked, and a caller whose
|
|
282
|
+
// snapshot named a key the document never carried cannot leave a live
|
|
283
|
+
// method behind.
|
|
284
|
+
const keyAgreementVmIds = new Set(markedKeyAgreementMultibases({
|
|
285
|
+
doc,
|
|
286
|
+
signingKeyMultibase: revokedClient.signingKeyMultibase
|
|
287
|
+
}).map(multibase => `${did}#${multibase}`));
|
|
273
288
|
const existingMethods = (doc.verificationMethod ?? []);
|
|
274
|
-
const vmPresent = existingMethods.some(method => method.id === signingVmId ||
|
|
289
|
+
const vmPresent = existingMethods.some(method => method.id === signingVmId ||
|
|
290
|
+
(method.id !== undefined && keyAgreementVmIds.has(method.id)));
|
|
275
291
|
// The key the log states for this client now, which a self-rotation since
|
|
276
292
|
// the caller's listing may have moved on.
|
|
277
293
|
const revokedUpdateKey = await currentRevokedUpdateKey({
|
|
@@ -291,7 +307,8 @@ async function revokeWebvhClientOnce({ idStore, updateKeys, revokedClient, known
|
|
|
291
307
|
if (!vmPresent && !keyPresent && !hashPresent) {
|
|
292
308
|
// Nothing left to remove, but a torn earlier publish can still have left
|
|
293
309
|
// did.json lagging the log.
|
|
294
|
-
|
|
310
|
+
const concluded = await concludeWithPublishedLog({ idStore, published });
|
|
311
|
+
return { ...concluded, log: published.log };
|
|
295
312
|
}
|
|
296
313
|
if (!published.updateKeys.includes(activeKey)) {
|
|
297
314
|
throw new Error("did:webvh: the published log does not authorize this client's active " +
|
|
@@ -309,7 +326,7 @@ async function revokeWebvhClientOnce({ idStore, updateKeys, revokedClient, known
|
|
|
309
326
|
})
|
|
310
327
|
: undefined;
|
|
311
328
|
const removedHashes = new Set([revokedHash, stagedHash].filter((hash) => hash !== undefined));
|
|
312
|
-
const removedVmIds = new Set([signingVmId,
|
|
329
|
+
const removedVmIds = new Set([signingVmId, ...keyAgreementVmIds]);
|
|
313
330
|
const signer = await updateKeySigner({ seed: updateKeys.updateSeed });
|
|
314
331
|
const updated = await updateDID({
|
|
315
332
|
log: published.log,
|
|
@@ -320,11 +337,11 @@ async function revokeWebvhClientOnce({ idStore, updateKeys, revokedClient, known
|
|
|
320
337
|
verificationMethods: existingMethods.filter(method => !method.id || !removedVmIds.has(method.id)),
|
|
321
338
|
authentication: relationIds(doc.authentication).filter(id => id !== signingVmId),
|
|
322
339
|
assertionMethod: relationIds(doc.assertionMethod).filter(id => id !== signingVmId),
|
|
323
|
-
keyAgreement: relationIds(doc.keyAgreement).filter(id => id
|
|
340
|
+
keyAgreement: relationIds(doc.keyAgreement).filter(id => !keyAgreementVmIds.has(id)),
|
|
324
341
|
capabilityInvocation: relationIds(doc.capabilityInvocation).filter(id => id !== signingVmId),
|
|
325
342
|
capabilityDelegation: relationIds(doc.capabilityDelegation).filter(id => id !== signingVmId)
|
|
326
343
|
});
|
|
327
344
|
await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
|
|
328
|
-
return { did: updated.did, doc: updated.doc };
|
|
345
|
+
return { did: updated.did, doc: updated.doc, log: updated.log };
|
|
329
346
|
}
|
|
330
347
|
//# sourceMappingURL=revokeClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revokeClient.js","sourceRoot":"","sources":["../../src/webvh/revokeClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"revokeClient.js","sourceRoot":"","sources":["../../src/webvh/revokeClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAMxE,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACrB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,kBAAkB,CAAA;AAuBzB;;;;;;;;;;;;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,WAA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AC,EAAE,CAAC,CACjC;QACD,oBAAoB,EAAE,WAAW,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAChE,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,WAAW,CACzB;QACD,oBAAoB,EAAE,WAAW,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,MAAM,CAChE,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,WAAW,CACzB;KACF,CAAC,CAAA;IACF,MAAM,iBAAiB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC,CAAA;IACtE,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAA;AACjE,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.41.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "pnpm run clear && tsc",
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"@interop/security-document-loader": "^10.0.0",
|
|
142
142
|
"@interop/social-core": "^0.8.1",
|
|
143
143
|
"@interop/vc": "^11.0.6",
|
|
144
|
-
"@interop/was-client": "^0.
|
|
144
|
+
"@interop/was-client": "^0.39.0",
|
|
145
145
|
"@interop/webkms-client": "^14.7.1",
|
|
146
146
|
"@interop/x25519-key-agreement-key": "^5.2.1",
|
|
147
147
|
"@noble/ciphers": "^2.3.0",
|