@interop/wallet-core 0.39.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 +5 -3
- 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 +32 -22
- 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/fetch.d.ts +2 -1
- package/dist/keyring/fetch.d.ts.map +1 -1
- package/dist/keyring/fetch.js +7 -2
- package/dist/keyring/fetch.js.map +1 -1
- package/dist/keyring/index.d.ts +16 -9
- package/dist/keyring/index.d.ts.map +1 -1
- package/dist/keyring/index.js +15 -8
- package/dist/keyring/index.js.map +1 -1
- package/dist/keyring/kdf.d.ts +3 -1
- package/dist/keyring/kdf.d.ts.map +1 -1
- package/dist/keyring/kdf.js +16 -2
- package/dist/keyring/kdf.js.map +1 -1
- package/dist/keyring/record.d.ts +236 -50
- package/dist/keyring/record.d.ts.map +1 -1
- package/dist/keyring/record.js +348 -46
- package/dist/keyring/record.js.map +1 -1
- package/dist/keyring/unlockSpace.d.ts +25 -0
- package/dist/keyring/unlockSpace.d.ts.map +1 -1
- package/dist/keyring/unlockSpace.js +31 -2
- package/dist/keyring/unlockSpace.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 +34 -6
- 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 +39 -24
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +28 -77
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/recovery/index.d.ts +16 -3
- package/dist/recovery/index.d.ts.map +1 -1
- package/dist/recovery/index.js +14 -2
- package/dist/recovery/index.js.map +1 -1
- package/dist/recovery/recoveryCode.d.ts +7 -0
- package/dist/recovery/recoveryCode.d.ts.map +1 -1
- package/dist/recovery/recoveryCode.js +10 -0
- package/dist/recovery/recoveryCode.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 +138 -46
- package/dist/recovery/recoveryRecord.d.ts.map +1 -1
- package/dist/recovery/recoveryRecord.js +231 -30
- 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/request/index.d.ts +1 -1
- package/dist/request/index.js +1 -1
- package/dist/request/matching.d.ts +24 -5
- package/dist/request/matching.d.ts.map +1 -1
- package/dist/request/matching.js +36 -39
- package/dist/request/matching.js.map +1 -1
- package/dist/request/walletInput.d.ts.map +1 -1
- package/dist/request/walletInput.js +3 -6
- package/dist/request/walletInput.js.map +1 -1
- package/dist/resourceLog/controller.d.ts +7 -4
- package/dist/resourceLog/controller.d.ts.map +1 -1
- package/dist/resourceLog/controller.js +17 -35
- package/dist/resourceLog/controller.js.map +1 -1
- package/dist/resourceLog/index.d.ts +1 -0
- package/dist/resourceLog/index.d.ts.map +1 -1
- package/dist/resourceLog/index.js +1 -0
- package/dist/resourceLog/index.js.map +1 -1
- package/dist/resourceLog/seal.d.ts +9 -1
- package/dist/resourceLog/seal.d.ts.map +1 -1
- package/dist/resourceLog/seal.js +21 -11
- package/dist/resourceLog/seal.js.map +1 -1
- package/dist/resourceLog/verify.d.ts.map +1 -1
- package/dist/resourceLog/verify.js +26 -9
- package/dist/resourceLog/verify.js.map +1 -1
- package/dist/resourceLog/vmFragment.d.ts +33 -0
- package/dist/resourceLog/vmFragment.d.ts.map +1 -0
- package/dist/resourceLog/vmFragment.js +39 -0
- package/dist/resourceLog/vmFragment.js.map +1 -0
- package/dist/space/publicLink.d.ts +2 -0
- package/dist/space/publicLink.d.ts.map +1 -1
- package/dist/space/publicLink.js +13 -1
- package/dist/space/publicLink.js.map +1 -1
- package/dist/space/wasLink.d.ts +5 -0
- package/dist/space/wasLink.d.ts.map +1 -1
- package/dist/space/wasLink.js +7 -2
- package/dist/space/wasLink.js.map +1 -1
- package/dist/webvh/didWeb.d.ts +3 -11
- package/dist/webvh/didWeb.d.ts.map +1 -1
- package/dist/webvh/didWeb.js +5 -1
- package/dist/webvh/didWeb.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 -18
- package/dist/webvh/listClients.d.ts.map +1 -1
- package/dist/webvh/listClients.js +141 -36
- 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/dist/webvh/verifyLog.d.ts.map +1 -1
- package/dist/webvh/verifyLog.js +5 -1
- package/dist/webvh/verifyLog.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { vmFragmentOf } from '../resourceLog/vmFragment.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
|
|
@@ -17,7 +17,7 @@ export function documentKeyMultibases({ doc }) {
|
|
|
17
17
|
if (method.publicKeyMultibase) {
|
|
18
18
|
multibases.add(method.publicKeyMultibase);
|
|
19
19
|
}
|
|
20
|
-
const fragment = method.id
|
|
20
|
+
const fragment = method.id ? vmFragmentOf(method.id) : undefined;
|
|
21
21
|
if (fragment) {
|
|
22
22
|
multibases.add(fragment);
|
|
23
23
|
}
|
|
@@ -49,34 +49,111 @@ export function documentKeyMultibases({ doc }) {
|
|
|
49
49
|
* @returns {boolean}
|
|
50
50
|
*/
|
|
51
51
|
export function delegationKeyInDocument({ doc, delegationKeyId }) {
|
|
52
|
-
const multibase = delegationKeyId
|
|
52
|
+
const multibase = delegationKeyId ? vmFragmentOf(delegationKeyId) : undefined;
|
|
53
53
|
if (!multibase) {
|
|
54
54
|
return false;
|
|
55
55
|
}
|
|
56
56
|
return documentKeyMultibases({ doc }).has(multibase);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* The
|
|
60
|
-
*
|
|
61
|
-
*
|
|
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).
|
|
62
94
|
*
|
|
63
95
|
* @param options {object}
|
|
96
|
+
* @param options.doc {KeyAgreementDocument} a locally verified document
|
|
64
97
|
* @param options.signingKeyMultibase {string}
|
|
65
|
-
* @returns {string}
|
|
98
|
+
* @returns {string[]}
|
|
99
|
+
*/
|
|
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[]>}
|
|
66
134
|
*/
|
|
67
|
-
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
+
}
|
|
78
155
|
}
|
|
79
|
-
return
|
|
156
|
+
return index;
|
|
80
157
|
}
|
|
81
158
|
/**
|
|
82
159
|
* The update keys an entry newly revealed: the effective `updateKeys` at
|
|
@@ -100,13 +177,13 @@ function addedUpdateKeys(params, index) {
|
|
|
100
177
|
* is not authorized by the final entry.
|
|
101
178
|
*
|
|
102
179
|
* @param options {object}
|
|
103
|
-
* @param options.
|
|
180
|
+
* @param options.params {Array<{ updateKeys: string[]; nextKeyHashes: string[] }>}
|
|
181
|
+
* the log's effective parameters, one entry per log entry
|
|
104
182
|
* @param options.addIndex {number} the entry that published the client's
|
|
105
183
|
* verification methods
|
|
106
184
|
* @returns {string | undefined}
|
|
107
185
|
*/
|
|
108
|
-
function attributeActiveUpdateKey({
|
|
109
|
-
const params = effectiveParameters(log);
|
|
186
|
+
function attributeActiveUpdateKey({ params, addIndex }) {
|
|
110
187
|
const initial = addedUpdateKeys(params, addIndex);
|
|
111
188
|
if (initial.length !== 1) {
|
|
112
189
|
return undefined;
|
|
@@ -140,7 +217,7 @@ function attributeActiveUpdateKey({ log, addIndex }) {
|
|
|
140
217
|
* @returns {number}
|
|
141
218
|
*/
|
|
142
219
|
function clientAddIndex({ log, signingKeyMultibase }) {
|
|
143
|
-
return log.findIndex(entry => relationIds(entry.state.capabilityInvocation).some(vmId => vmId
|
|
220
|
+
return log.findIndex(entry => relationIds(entry.state.capabilityInvocation).some(vmId => vmFragmentOf(vmId) === signingKeyMultibase));
|
|
144
221
|
}
|
|
145
222
|
/**
|
|
146
223
|
* One enrolled client's ACTIVE update key as the log states it, keyed on the
|
|
@@ -161,7 +238,30 @@ export function attributeClientUpdateKey({ log, signingKeyMultibase }) {
|
|
|
161
238
|
const addIndex = clientAddIndex({ log, signingKeyMultibase });
|
|
162
239
|
return addIndex === -1
|
|
163
240
|
? undefined
|
|
164
|
-
: attributeActiveUpdateKey({ log, addIndex });
|
|
241
|
+
: attributeActiveUpdateKey({ params: effectiveParameters(log), addIndex });
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* A map from an enrolled client's signing-key multibase to the index of the
|
|
245
|
+
* FIRST entry that published it under `capabilityInvocation` -- the whole log's
|
|
246
|
+
* enrollment moments in one forward pass, so a listing attributes every client
|
|
247
|
+
* without rescanning. A multibase the log never published is absent from the
|
|
248
|
+
* map.
|
|
249
|
+
*
|
|
250
|
+
* @param options {object}
|
|
251
|
+
* @param options.log {DIDLog}
|
|
252
|
+
* @returns {Map<string, number>}
|
|
253
|
+
*/
|
|
254
|
+
function clientAddIndexes({ log }) {
|
|
255
|
+
const addIndexes = new Map();
|
|
256
|
+
for (const [index, entry] of log.entries()) {
|
|
257
|
+
for (const vmId of relationIds(entry.state.capabilityInvocation)) {
|
|
258
|
+
const signingKeyMultibase = vmFragmentOf(vmId);
|
|
259
|
+
if (signingKeyMultibase && !addIndexes.has(signingKeyMultibase)) {
|
|
260
|
+
addIndexes.set(signingKeyMultibase, index);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
return addIndexes;
|
|
165
265
|
}
|
|
166
266
|
/**
|
|
167
267
|
* Lists the enrolled wallet clients of a VERIFIED did:webvh log (see the
|
|
@@ -179,24 +279,29 @@ export function listEnrolledWebvhClients({ log }) {
|
|
|
179
279
|
return [];
|
|
180
280
|
}
|
|
181
281
|
const doc = log[log.length - 1].state;
|
|
282
|
+
const params = effectiveParameters(log);
|
|
283
|
+
// The entry that published each client's verification methods -- its
|
|
284
|
+
// enrollment moment, and the attribution anchor for its update key.
|
|
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 });
|
|
182
291
|
const clients = [];
|
|
183
292
|
for (const vmId of relationIds(doc.capabilityInvocation)) {
|
|
184
|
-
const signingKeyMultibase = vmId
|
|
293
|
+
const signingKeyMultibase = vmFragmentOf(vmId);
|
|
185
294
|
if (!signingKeyMultibase) {
|
|
186
295
|
continue;
|
|
187
296
|
}
|
|
188
|
-
|
|
189
|
-
// enrollment moment, and the attribution anchor for its update key.
|
|
190
|
-
const addIndex = clientAddIndex({ log, signingKeyMultibase });
|
|
297
|
+
const addIndex = addIndexes.get(signingKeyMultibase);
|
|
191
298
|
clients.push({
|
|
192
299
|
signingKeyMultibase,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}),
|
|
196
|
-
updateKeyMultibase: addIndex === -1
|
|
300
|
+
keyAgreementKeyMultibases: keyAgreementIndex.get(clientKeyAgreementController({ signingKeyMultibase })) ?? [],
|
|
301
|
+
updateKeyMultibase: addIndex === undefined
|
|
197
302
|
? undefined
|
|
198
|
-
: attributeActiveUpdateKey({
|
|
199
|
-
addedAt: addIndex ===
|
|
303
|
+
: attributeActiveUpdateKey({ params, addIndex }),
|
|
304
|
+
addedAt: addIndex === undefined ? undefined : log[addIndex].versionTime
|
|
200
305
|
});
|
|
201
306
|
}
|
|
202
307
|
return clients;
|
|
@@ -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;I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
|
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,UAA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M,CACpD,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,WAAW,CACzB;QACD,eAAe,EAAE,WAAW,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,MAAM,CACtD,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,WAAW,CACzB;QACD,YAAY,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,MAAM,CAChD,EAAE,CAAC,EAAE,CAAC,CAAC,iBAAiB,CAAC,GAAG,CAAC,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyLog.d.ts","sourceRoot":"","sources":["../../src/webvh/verifyLog.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"verifyLog.d.ts","sourceRoot":"","sources":["../../src/webvh/verifyLog.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAI/D,OAAO,KAAK,EACV,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,uBAAuB,CAAA;AAE9B;;;;;;GAMG;AACH,qBAAa,sBAAuB,SAAQ,KAAK;gBACnC,OAAO,SAA0C;CAI9D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,GAAG,EACH,GAAG,EACJ,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,kBAAkB,GAAG,IAAI,CAAA;CAC/B,GAAG,kBAAkB,CA4CrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,GAAG,EACH,OAAO,EACP,IAAI,EACJ,QAAQ,EACT,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,mBAAmB,CAAA;CAC/B,GAAG,OAAO,CAAC;IACV,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,aAAa,EAAE,MAAM,EAAE,CAAA;CACxB,CAAC,CA4CD"}
|
package/dist/webvh/verifyLog.js
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
* rollback, a fork, or an SCID/method switch relative to the pinned head.
|
|
28
28
|
*/
|
|
29
29
|
import { readLogFromString, resolveDIDFromLog } from '@interop/did-method-webvh';
|
|
30
|
+
import { resourcePath, toUrl } from '@interop/was-client/paths';
|
|
30
31
|
import { DID_LOG_RESOURCE, ID_COLLECTION } from '../space/collections.js';
|
|
31
32
|
import { ResourceLogContinuityError } from '../resourceLog/errors.js';
|
|
32
33
|
/**
|
|
@@ -137,7 +138,10 @@ export function checkAccountLogContinuity({ log, pin }) {
|
|
|
137
138
|
* log's effective `updateKeys` / `nextKeyHashes`
|
|
138
139
|
*/
|
|
139
140
|
export async function verifyAccountLog({ did, spaceId, host, pinStore }) {
|
|
140
|
-
const url =
|
|
141
|
+
const url = toUrl({
|
|
142
|
+
serverUrl: host,
|
|
143
|
+
path: resourcePath(spaceId, ID_COLLECTION.id, DID_LOG_RESOURCE)
|
|
144
|
+
});
|
|
141
145
|
const response = await fetch(url);
|
|
142
146
|
if (response.status === 404) {
|
|
143
147
|
throw new AccountLogMissingError();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyLog.js","sourceRoot":"","sources":["../../src/webvh/verifyLog.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAEhF,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAA;AAMrE;;;;;;GAMG;AACH,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC/C,YAAY,OAAO,GAAG,uCAAuC;QAC3D,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAA;IACtC,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,yBAAyB,CAAC,EACxC,GAAG,EACH,GAAG,EAIJ;IACC,MAAM,OAAO,GAAG,GAAG,CAAC,CAAC,CAAC,CAAA;IACtB,MAAM,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAChC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;IAClD,CAAC;IACD,MAAM,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,MAAM,IAAI,EAAE,CAAA;IAC9C,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,IAAI,IAAI,EAAE,CAAA;IAC1C,IA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MAAM,GAAG,yBAAyB,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAA;QACtD,wEAAwE;QACxE,4DAA4D;QAC5D,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC;YACrC,MAAM,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;QAC9B,CAAC;IACH,CAAC;IACD,OAAO;QACL,GAAG,EAAE,QAAQ,CAAC,GAAG;QACjB,GAAG;QACH,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE;QAC1C,aAAa,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa,IAAI,EAAE;KACjD,CAAA;AACH,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,13 +141,13 @@
|
|
|
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
|
+
"@noble/ciphers": "^2.3.0",
|
|
147
148
|
"@noble/hashes": "^2.3.0",
|
|
148
149
|
"@scure/base": "^2.3.0",
|
|
149
|
-
"byoe-context": "^0.3.0"
|
|
150
|
-
"jsonpath-plus": "^10.3.0"
|
|
150
|
+
"byoe-context": "^0.3.0"
|
|
151
151
|
},
|
|
152
152
|
"devDependencies": {
|
|
153
153
|
"@eslint/js": "^10.0.1",
|