@interop/wallet-core 0.30.1 → 0.31.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/dist/recovery/recoveryWebvh.d.ts +13 -5
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +59 -26
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +136 -9
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +189 -40
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/index.d.ts +4 -1
- 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/revokeClient.d.ts +6 -1
- package/dist/webvh/revokeClient.d.ts.map +1 -1
- package/dist/webvh/revokeClient.js +17 -6
- package/dist/webvh/revokeClient.js.map +1 -1
- package/dist/webvh/wasIdStore.d.ts +6 -0
- package/dist/webvh/wasIdStore.d.ts.map +1 -1
- package/dist/webvh/wasIdStore.js +20 -4
- package/dist/webvh/wasIdStore.js.map +1 -1
- package/package.json +1 -1
|
@@ -44,7 +44,9 @@ export type RecoveryLogStore = Pick<WebvhIdStore, 'getIdResourceRaw' | 'putIdRes
|
|
|
44
44
|
* `keyAgreement` verification method (an ordinary, unmarked Multikey entry)
|
|
45
45
|
* and committing its update-key hash in `nextKeyHashes`. The code's update
|
|
46
46
|
* key joins `updateKeys` nowhere. Idempotent: a posture already published is
|
|
47
|
-
* a no-op, so re-running a torn issuance converges.
|
|
47
|
+
* a no-op, so re-running a torn issuance converges. The entry publishes
|
|
48
|
+
* conditionally on the log this call read; a race lost to a concurrent
|
|
49
|
+
* ceremony re-runs and rebases on the new head.
|
|
48
50
|
*
|
|
49
51
|
* @param options {object}
|
|
50
52
|
* @param options.idStore {WebvhIdStore}
|
|
@@ -53,7 +55,7 @@ export type RecoveryLogStore = Pick<WebvhIdStore, 'getIdResourceRaw' | 'putIdRes
|
|
|
53
55
|
* @param options.recovery {RecoveryPublicKeys} the code's public halves
|
|
54
56
|
* @returns {Promise<{ did: string }>}
|
|
55
57
|
*/
|
|
56
|
-
export declare function publishRecoveryKey(
|
|
58
|
+
export declare function publishRecoveryKey(options: {
|
|
57
59
|
idStore: WebvhIdStore;
|
|
58
60
|
updateKeys: ClientWebvhUpdateKeys;
|
|
59
61
|
recovery: RecoveryPublicKeys;
|
|
@@ -68,6 +70,9 @@ export declare function publishRecoveryKey({ idStore, updateKeys, recovery }: {
|
|
|
68
70
|
* caller's, and runs after this so the resolver's document no longer backs
|
|
69
71
|
* the removed entry.
|
|
70
72
|
*
|
|
73
|
+
* The entry publishes conditionally on the log this call read; a race lost to
|
|
74
|
+
* a concurrent ceremony re-runs and rebases on the new head.
|
|
75
|
+
*
|
|
71
76
|
* @param options {object}
|
|
72
77
|
* @param options.idStore {WebvhIdStore}
|
|
73
78
|
* @param options.updateKeys {ClientWebvhUpdateKeys} the REVOKING client's
|
|
@@ -75,7 +80,7 @@ export declare function publishRecoveryKey({ idStore, updateKeys, recovery }: {
|
|
|
75
80
|
* @param options.recovery {RecoveryPublicKeys} the code's public halves
|
|
76
81
|
* @returns {Promise<{ did: string }>}
|
|
77
82
|
*/
|
|
78
|
-
export declare function removeRecoveryKey(
|
|
83
|
+
export declare function removeRecoveryKey(options: {
|
|
79
84
|
idStore: WebvhIdStore;
|
|
80
85
|
updateKeys: ClientWebvhUpdateKeys;
|
|
81
86
|
recovery: RecoveryPublicKeys;
|
|
@@ -91,7 +96,10 @@ export declare function removeRecoveryKey({ idStore, updateKeys, recovery }: {
|
|
|
91
96
|
* detected by the new client's update key already being authorized (no-op),
|
|
92
97
|
* a torn one by the standing commitments (the commit step re-runs
|
|
93
98
|
* convergently -- the spent code's hash is deliberately carried through the
|
|
94
|
-
* commit entry, so a resumed commit can re-state the revealed key).
|
|
99
|
+
* commit entry, so a resumed commit can re-state the revealed key). Both
|
|
100
|
+
* entries publish conditionally on the read they were built on, and a race
|
|
101
|
+
* lost to a concurrent ceremony re-runs the continuation from the top -- the
|
|
102
|
+
* same resumable path a tear takes.
|
|
95
103
|
*
|
|
96
104
|
* @param options {object}
|
|
97
105
|
* @param options.store {RecoveryLogStore} public log read + delegated PUT
|
|
@@ -111,7 +119,7 @@ export declare function removeRecoveryKey({ idStore, updateKeys, recovery }: {
|
|
|
111
119
|
* when the add entry ran here, the final `did.json` projection for the
|
|
112
120
|
* recovered session to republish
|
|
113
121
|
*/
|
|
114
|
-
export declare function recoverWebvhClient(
|
|
122
|
+
export declare function recoverWebvhClient(options: {
|
|
115
123
|
store: RecoveryLogStore;
|
|
116
124
|
recovery: RecoveryPublicKeys & {
|
|
117
125
|
updateSeed: Uint8Array;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recoveryWebvh.d.ts","sourceRoot":"","sources":["../../src/recovery/recoveryWebvh.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"recoveryWebvh.d.ts","sourceRoot":"","sources":["../../src/recovery/recoveryWebvh.ts"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EACV,qBAAqB,EAErB,mBAAmB,EACnB,YAAY,EACb,MAAM,sBAAsB,CAAA;AAE7B;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,EAC3B,GAAG,EACH,wBAAwB,EACzB,EAAE;IACD,GAAG,EAAE,MAAM,CAAA;IACX,wBAAwB,EAAE,MAAM,CAAA;CACjC,GAAG,MAAM,CAET;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,wBAAwB,EAAE,MAAM,CAAA;IAChC,kBAAkB,EAAE,MAAM,CAAA;CAC3B;AAED;;;;GAIG;AACH,qBAAa,4BAA6B,SAAQ,KAAK;gBAEnD,OAAO,SACuC;CAKjD;AAED;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,YAAY,EACZ,kBAAkB,GAAG,eAAe,CACrC,CAAA;AAiDD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE;IAChD,OAAO,EAAE,YAAY,CAAA;IACrB,UAAU,EAAE,qBAAqB,CAAA;IACjC,QAAQ,EAAE,kBAAkB,CAAA;CAC7B,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAE3B;AAuED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,OAAO,EAAE,YAAY,CAAA;IACrB,UAAU,EAAE,qBAAqB,CAAA;IACjC,QAAQ,EAAE,kBAAkB,CAAA;CAC7B,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAE3B;AAgED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE;IAChD,KAAK,EAAE,gBAAgB,CAAA;IACvB,QAAQ,EAAE,kBAAkB,GAAG;QAAE,UAAU,EAAE,UAAU,CAAA;KAAE,CAAA;IACzD,aAAa,EAAE,mBAAmB,CAAA;IAClC,oBAAoB,EAAE,qBAAqB,CAAA;IAC3C,WAAW,EAAE,kBAAkB,CAAA;CAChC,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAE5C"}
|
|
@@ -33,9 +33,8 @@
|
|
|
33
33
|
* the authorized controller. Every step is idempotent/resumable: re-running
|
|
34
34
|
* with the same key material converges without forking the log.
|
|
35
35
|
*/
|
|
36
|
-
import { deriveNextKeyHash,
|
|
37
|
-
import {
|
|
38
|
-
import { assertCarryOverCommitments, MULTIKEY_VM_TYPE, publishWebvhLog, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner } from '../webvh/didWebvh.js';
|
|
36
|
+
import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
|
|
37
|
+
import { assertCarryOverCommitments, MULTIKEY_VM_TYPE, publishUpdatedLog, putLogResource, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
|
|
39
38
|
/**
|
|
40
39
|
* The verification-method id a code's key-agreement key publishes under --
|
|
41
40
|
* the ordinary `<did>#<multibase>` form, indistinguishable by id from any
|
|
@@ -83,19 +82,18 @@ async function readLogOrThrow({ store }) {
|
|
|
83
82
|
/**
|
|
84
83
|
* Publishes `did.jsonl` through the narrow recovery seam -- the log only,
|
|
85
84
|
* never `did.json` (the delegation covers nothing else; the recovered
|
|
86
|
-
* session republishes the projection once it is the controller).
|
|
85
|
+
* session republishes the projection once it is the controller). The write is
|
|
86
|
+
* conditional on the read the entry was built on, and a lost race surfaces as
|
|
87
|
+
* a `WebvhLogConflictError` (the mapping lives in `putLogResource`).
|
|
87
88
|
*
|
|
88
89
|
* @param options {object}
|
|
89
90
|
* @param options.store {RecoveryLogStore}
|
|
90
|
-
* @param options.log {
|
|
91
|
+
* @param options.log {DIDLog}
|
|
92
|
+
* @param [options.ifMatch] {string} publish only if `did.jsonl` is unchanged
|
|
91
93
|
* @returns {Promise<void>}
|
|
92
94
|
*/
|
|
93
|
-
async function publishLogOnly({ store, log }) {
|
|
94
|
-
await
|
|
95
|
-
resourceId: DID_LOG_RESOURCE,
|
|
96
|
-
content: logToJsonlString(log),
|
|
97
|
-
contentType: 'text/jsonl'
|
|
98
|
-
});
|
|
95
|
+
async function publishLogOnly({ store, log, ifMatch }) {
|
|
96
|
+
await putLogResource({ store, log, ifMatch });
|
|
99
97
|
}
|
|
100
98
|
/**
|
|
101
99
|
* ISSUANCE (run by an enrolled client, root authority): publishes a recovery
|
|
@@ -103,7 +101,9 @@ async function publishLogOnly({ store, log }) {
|
|
|
103
101
|
* `keyAgreement` verification method (an ordinary, unmarked Multikey entry)
|
|
104
102
|
* and committing its update-key hash in `nextKeyHashes`. The code's update
|
|
105
103
|
* key joins `updateKeys` nowhere. Idempotent: a posture already published is
|
|
106
|
-
* a no-op, so re-running a torn issuance converges.
|
|
104
|
+
* a no-op, so re-running a torn issuance converges. The entry publishes
|
|
105
|
+
* conditionally on the log this call read; a race lost to a concurrent
|
|
106
|
+
* ceremony re-runs and rebases on the new head.
|
|
107
107
|
*
|
|
108
108
|
* @param options {object}
|
|
109
109
|
* @param options.idStore {WebvhIdStore}
|
|
@@ -112,7 +112,16 @@ async function publishLogOnly({ store, log }) {
|
|
|
112
112
|
* @param options.recovery {RecoveryPublicKeys} the code's public halves
|
|
113
113
|
* @returns {Promise<{ did: string }>}
|
|
114
114
|
*/
|
|
115
|
-
export async function publishRecoveryKey(
|
|
115
|
+
export async function publishRecoveryKey(options) {
|
|
116
|
+
return withLogConflictRetry(() => publishRecoveryKeyOnce(options));
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* One attempt of {@link publishRecoveryKey}, re-invoked by the conflict retry.
|
|
120
|
+
*
|
|
121
|
+
* @param options {object} see {@link publishRecoveryKey}
|
|
122
|
+
* @returns {Promise<{ did: string }>}
|
|
123
|
+
*/
|
|
124
|
+
async function publishRecoveryKeyOnce({ idStore, updateKeys, recovery }) {
|
|
116
125
|
const published = await readLogOrThrow({ store: idStore });
|
|
117
126
|
const { did, doc } = published;
|
|
118
127
|
const recoveryHash = await deriveNextKeyHash(recovery.updateKeyMultibase);
|
|
@@ -156,10 +165,7 @@ export async function publishRecoveryKey({ idStore, updateKeys, recovery }) {
|
|
|
156
165
|
capabilityInvocation: relationIds(doc.capabilityInvocation),
|
|
157
166
|
capabilityDelegation: relationIds(doc.capabilityDelegation)
|
|
158
167
|
});
|
|
159
|
-
|
|
160
|
-
throw new Error('did:webvh: updateDID returned no webDoc despite the did:web alsoKnownAs.');
|
|
161
|
-
}
|
|
162
|
-
await publishWebvhLog({ idStore, log: updated.log, webDoc: updated.webDoc });
|
|
168
|
+
await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
|
|
163
169
|
return { did: updated.did };
|
|
164
170
|
}
|
|
165
171
|
/**
|
|
@@ -170,6 +176,9 @@ export async function publishRecoveryKey({ idStore, updateKeys, recovery }) {
|
|
|
170
176
|
* caller's, and runs after this so the resolver's document no longer backs
|
|
171
177
|
* the removed entry.
|
|
172
178
|
*
|
|
179
|
+
* The entry publishes conditionally on the log this call read; a race lost to
|
|
180
|
+
* a concurrent ceremony re-runs and rebases on the new head.
|
|
181
|
+
*
|
|
173
182
|
* @param options {object}
|
|
174
183
|
* @param options.idStore {WebvhIdStore}
|
|
175
184
|
* @param options.updateKeys {ClientWebvhUpdateKeys} the REVOKING client's
|
|
@@ -177,7 +186,16 @@ export async function publishRecoveryKey({ idStore, updateKeys, recovery }) {
|
|
|
177
186
|
* @param options.recovery {RecoveryPublicKeys} the code's public halves
|
|
178
187
|
* @returns {Promise<{ did: string }>}
|
|
179
188
|
*/
|
|
180
|
-
export async function removeRecoveryKey(
|
|
189
|
+
export async function removeRecoveryKey(options) {
|
|
190
|
+
return withLogConflictRetry(() => removeRecoveryKeyOnce(options));
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* One attempt of {@link removeRecoveryKey}, re-invoked by the conflict retry.
|
|
194
|
+
*
|
|
195
|
+
* @param options {object} see {@link removeRecoveryKey}
|
|
196
|
+
* @returns {Promise<{ did: string }>}
|
|
197
|
+
*/
|
|
198
|
+
async function removeRecoveryKeyOnce({ idStore, updateKeys, recovery }) {
|
|
181
199
|
const published = await readLogOrThrow({ store: idStore });
|
|
182
200
|
const { did, doc } = published;
|
|
183
201
|
const recoveryHash = await deriveNextKeyHash(recovery.updateKeyMultibase);
|
|
@@ -212,10 +230,7 @@ export async function removeRecoveryKey({ idStore, updateKeys, recovery }) {
|
|
|
212
230
|
capabilityInvocation: relationIds(doc.capabilityInvocation),
|
|
213
231
|
capabilityDelegation: relationIds(doc.capabilityDelegation)
|
|
214
232
|
});
|
|
215
|
-
|
|
216
|
-
throw new Error('did:webvh: updateDID returned no webDoc despite the did:web alsoKnownAs.');
|
|
217
|
-
}
|
|
218
|
-
await publishWebvhLog({ idStore, log: updated.log, webDoc: updated.webDoc });
|
|
233
|
+
await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
|
|
219
234
|
return { did: updated.did };
|
|
220
235
|
}
|
|
221
236
|
/**
|
|
@@ -227,7 +242,10 @@ export async function removeRecoveryKey({ idStore, updateKeys, recovery }) {
|
|
|
227
242
|
* detected by the new client's update key already being authorized (no-op),
|
|
228
243
|
* a torn one by the standing commitments (the commit step re-runs
|
|
229
244
|
* convergently -- the spent code's hash is deliberately carried through the
|
|
230
|
-
* commit entry, so a resumed commit can re-state the revealed key).
|
|
245
|
+
* commit entry, so a resumed commit can re-state the revealed key). Both
|
|
246
|
+
* entries publish conditionally on the read they were built on, and a race
|
|
247
|
+
* lost to a concurrent ceremony re-runs the continuation from the top -- the
|
|
248
|
+
* same resumable path a tear takes.
|
|
231
249
|
*
|
|
232
250
|
* @param options {object}
|
|
233
251
|
* @param options.store {RecoveryLogStore} public log read + delegated PUT
|
|
@@ -247,7 +265,16 @@ export async function removeRecoveryKey({ idStore, updateKeys, recovery }) {
|
|
|
247
265
|
* when the add entry ran here, the final `did.json` projection for the
|
|
248
266
|
* recovered session to republish
|
|
249
267
|
*/
|
|
250
|
-
export async function recoverWebvhClient(
|
|
268
|
+
export async function recoverWebvhClient(options) {
|
|
269
|
+
return withLogConflictRetry(() => recoverWebvhClientOnce(options));
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* One attempt of {@link recoverWebvhClient}, re-invoked by the conflict retry.
|
|
273
|
+
*
|
|
274
|
+
* @param options {object} see {@link recoverWebvhClient}
|
|
275
|
+
* @returns {Promise<{ did: string, webDoc?: object }>}
|
|
276
|
+
*/
|
|
277
|
+
async function recoverWebvhClientOnce({ store, recovery, newClientKeys, newClientUpdateSeeds, replacement }) {
|
|
251
278
|
let published = await readLogOrThrow({ store });
|
|
252
279
|
// Already complete (a torn earlier run finished the add entry): the new
|
|
253
280
|
// client's update key is authorized, which only the add entry writes.
|
|
@@ -288,7 +315,11 @@ export async function recoverWebvhClient({ store, recovery, newClientKeys, newCl
|
|
|
288
315
|
])
|
|
289
316
|
]
|
|
290
317
|
});
|
|
291
|
-
await publishLogOnly({
|
|
318
|
+
await publishLogOnly({
|
|
319
|
+
store,
|
|
320
|
+
log: updated.log,
|
|
321
|
+
ifMatch: published.etag
|
|
322
|
+
});
|
|
292
323
|
published = await readLogOrThrow({ store });
|
|
293
324
|
}
|
|
294
325
|
// The add-and-retire entry: the new client's verification methods and
|
|
@@ -358,7 +389,9 @@ export async function recoverWebvhClient({ store, recovery, newClientKeys, newCl
|
|
|
358
389
|
capabilityInvocation: withReference(doc.capabilityInvocation, signingVmId),
|
|
359
390
|
capabilityDelegation: withReference(doc.capabilityDelegation, signingVmId)
|
|
360
391
|
});
|
|
361
|
-
|
|
392
|
+
// Conditional on the read this entry was built on: the re-read above when
|
|
393
|
+
// the commit entry ran here, the first read when it was skipped.
|
|
394
|
+
await publishLogOnly({ store, log: updated.log, ifMatch: published.etag });
|
|
362
395
|
return { did: updated.did, webDoc: updated.webDoc };
|
|
363
396
|
}
|
|
364
397
|
//# sourceMappingURL=recoveryWebvh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recoveryWebvh.js","sourceRoot":"","sources":["../../src/recovery/recoveryWebvh.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,
|
|
1
|
+
{"version":3,"file":"recoveryWebvh.js","sourceRoot":"","sources":["../../src/recovery/recoveryWebvh.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAExE,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,iBAAiB,EACj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,CAAC,aAAa,CAAC,MAAM,CAC3C,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,YAAY,CAC9B;QACD,mBAAmB;QACnB,cAAc,EAAE,aAAa,CAAC,GAAG,CAAC,cAAc,EAAE,WAAW,CAAC;QAC9D,eAAe,EAAE,aAAa,CAAC,GAAG,CAAC,eAAe,EAAE,WAAW,CAAC;QAChE,YAAY,EAAE;YACZ,GAAG,IAAI,GAAG,CAAC;gBACT,GAAG,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,SAAS,CAAC;gBAC/D,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;gBAC5C,eAAe;aAChB,CAAC;SACH;QACD,oBAAoB,EAAE,aAAa,CAAC,GAAG,CAAC,oBAAoB,EAAE,WAAW,CAAC;QAC1E,oBAAoB,EAAE,aAAa,CAAC,GAAG,CAAC,oBAAoB,EAAE,WAAW,CAAC;KAC3E,CAAC,CAAA;IACF,0EAA0E;IAC1E,iEAAiE;IACjE,MAAM,cAAc,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,CAAC,IAAI,EAAE,CAAC,CAAA;IAC1E,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAA;AACrD,CAAC"}
|
package/dist/webvh/didWebvh.d.ts
CHANGED
|
@@ -9,12 +9,19 @@ import type { DidWebKeyMap } from './didWeb.js';
|
|
|
9
9
|
*/
|
|
10
10
|
export interface WebvhIdStore {
|
|
11
11
|
/**
|
|
12
|
-
* The raw text body of an `id` collection resource (the JSON-Lines log)
|
|
13
|
-
* `undefined` when it is not published.
|
|
12
|
+
* The raw text body of an `id` collection resource (the JSON-Lines log)
|
|
13
|
+
* together with its ETag validator, or `undefined` when it is not published.
|
|
14
|
+
* The `etag` is the compare-and-swap token a ceremony hands back as
|
|
15
|
+
* {@link putIdResource}'s `ifMatch`; it is absent against a backend that does
|
|
16
|
+
* not version resources, in which case the ceremony's publish degrades to an
|
|
17
|
+
* unconditional write.
|
|
14
18
|
*/
|
|
15
19
|
getIdResourceRaw(options: {
|
|
16
20
|
resourceId: string;
|
|
17
|
-
}): Promise<
|
|
21
|
+
}): Promise<{
|
|
22
|
+
text: string;
|
|
23
|
+
etag?: string;
|
|
24
|
+
} | undefined>;
|
|
18
25
|
/**
|
|
19
26
|
* The parsed JSON body of an `id` collection resource (the DID document), or
|
|
20
27
|
* `undefined` when it is not published.
|
|
@@ -23,12 +30,22 @@ export interface WebvhIdStore {
|
|
|
23
30
|
resourceId: string;
|
|
24
31
|
}): Promise<unknown>;
|
|
25
32
|
/**
|
|
26
|
-
* Writes (upserts) an `id` collection resource
|
|
33
|
+
* Writes (upserts) an `id` collection resource, optionally conditionally:
|
|
34
|
+
* `ifMatch` writes only if the resource's current ETag matches (an
|
|
35
|
+
* update-if-unchanged), `ifNoneMatch` writes only if the resource is absent
|
|
36
|
+
* (a create-if-absent). With neither the write is unconditional.
|
|
37
|
+
*
|
|
38
|
+
* Contract: a failed precondition MUST surface as an error whose `name` is
|
|
39
|
+
* `'PreconditionFailedError'` (was-client's class; any implementation may
|
|
40
|
+
* throw its own error carrying that name), which this module maps to
|
|
41
|
+
* {@link WebvhLogConflictError}.
|
|
27
42
|
*/
|
|
28
43
|
putIdResource(options: {
|
|
29
44
|
resourceId: string;
|
|
30
45
|
content: object | string;
|
|
31
46
|
contentType?: string;
|
|
47
|
+
ifMatch?: string;
|
|
48
|
+
ifNoneMatch?: boolean;
|
|
32
49
|
}): Promise<void>;
|
|
33
50
|
/**
|
|
34
51
|
* Writes (upserts) `keys.json` in the private `key-map` collection.
|
|
@@ -134,6 +151,54 @@ export declare function updateKeyMultibase({ seed }: {
|
|
|
134
151
|
export declare function updateKeySigner({ seed }: {
|
|
135
152
|
seed: Uint8Array;
|
|
136
153
|
}): Promise<Signer>;
|
|
154
|
+
/**
|
|
155
|
+
* Thrown when a conditional publish of `did.jsonl` lost a race to a concurrent
|
|
156
|
+
* ceremony: the log moved on between the read this ceremony built its entry on
|
|
157
|
+
* and the PUT that would have appended it. The `cause` is the store's
|
|
158
|
+
* precondition error. A ceremony that meets one either re-runs (rebasing its
|
|
159
|
+
* entry on the new head -- what {@link withLogConflictRetry} does) or refuses,
|
|
160
|
+
* but it never overwrites the winner's entry.
|
|
161
|
+
*/
|
|
162
|
+
export declare class WebvhLogConflictError extends Error {
|
|
163
|
+
constructor(message?: string, options?: {
|
|
164
|
+
cause?: unknown;
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Re-runs `run` when it fails with a {@link WebvhLogConflictError}, up to three
|
|
169
|
+
* total attempts, then rethrows. The retry IS the rebase: every ceremony in
|
|
170
|
+
* this module re-reads the published head and rebuilds its entry on it, and
|
|
171
|
+
* every one of them detects its own completion from durable state alone, so a
|
|
172
|
+
* naive re-run after a lost race appends on top of the winner instead of over
|
|
173
|
+
* it. A ceremony whose preconditions no longer hold after the re-read (the
|
|
174
|
+
* retrying client was itself revoked, the staged key it was about to reveal is
|
|
175
|
+
* no longer committed) surfaces its own typed refusal instead of looping.
|
|
176
|
+
*
|
|
177
|
+
* @param run {Function} the ceremony body, re-invokable from the top
|
|
178
|
+
* @returns {Promise<*>} whatever the ceremony returns
|
|
179
|
+
*/
|
|
180
|
+
export declare function withLogConflictRetry<T>(run: () => Promise<T>): Promise<T>;
|
|
181
|
+
/**
|
|
182
|
+
* PUTs the serialized log to `did.jsonl`, forwarding the conditional-write
|
|
183
|
+
* preconditions and mapping a failed one to {@link WebvhLogConflictError}. The
|
|
184
|
+
* single place that mapping exists: the store seam is app-implemented, so the
|
|
185
|
+
* precondition error is matched on `err.name` rather than by `instanceof`,
|
|
186
|
+
* keeping the check implementation-agnostic. With neither precondition the PUT
|
|
187
|
+
* is unconditional -- the degradation on a backend that serves no ETags.
|
|
188
|
+
*
|
|
189
|
+
* @param options {object}
|
|
190
|
+
* @param options.store {object} anything with the seam's `putIdResource`
|
|
191
|
+
* @param options.log {DIDLog}
|
|
192
|
+
* @param [options.ifMatch] {string} publish only if the log is unchanged
|
|
193
|
+
* @param [options.ifNoneMatch] {boolean} publish only if the log is absent
|
|
194
|
+
* @returns {Promise<void>}
|
|
195
|
+
*/
|
|
196
|
+
export declare function putLogResource({ store, log, ifMatch, ifNoneMatch }: {
|
|
197
|
+
store: Pick<WebvhIdStore, 'putIdResource'>;
|
|
198
|
+
log: DIDLog;
|
|
199
|
+
ifMatch?: string;
|
|
200
|
+
ifNoneMatch?: boolean;
|
|
201
|
+
}): Promise<void>;
|
|
137
202
|
/**
|
|
138
203
|
* Publishes an already-created log: PUT `did.jsonl` (`text/jsonl`) then PUT
|
|
139
204
|
* `did.json` from `webDoc` (`application/did+json`, adopting the webvh
|
|
@@ -142,16 +207,54 @@ export declare function updateKeySigner({ seed }: {
|
|
|
142
207
|
* the publish tail no longer sets per-resource policies. The shared publish
|
|
143
208
|
* tail of the create and rotate paths.
|
|
144
209
|
*
|
|
210
|
+
* The log PUT carries the caller's precondition (`ifMatch`, the ETag of the
|
|
211
|
+
* read the entry was built on, or `ifNoneMatch` for a create), so a ceremony
|
|
212
|
+
* that lost a race to a concurrent one fails with
|
|
213
|
+
* {@link WebvhLogConflictError} instead of silently erasing the winner's entry.
|
|
214
|
+
* The `did.json` projection PUT stays unconditional by design: it runs only
|
|
215
|
+
* after the log's compare-and-swap was WON, so it is already serialized behind
|
|
216
|
+
* that win; the log is the source of truth and the projection a derived cache;
|
|
217
|
+
* and {@link concludeWithPublishedLog} re-derives and republishes the
|
|
218
|
+
* projection from the resolved log on every ceremony's no-op path, healing any
|
|
219
|
+
* lag a race or a torn publish leaves behind.
|
|
220
|
+
*
|
|
145
221
|
* @param options {object}
|
|
146
222
|
* @param options.idStore {WebvhIdStore}
|
|
147
223
|
* @param options.log {DIDLog}
|
|
148
224
|
* @param options.webDoc {object}
|
|
225
|
+
* @param [options.ifMatch] {string} publish only if `did.jsonl` is unchanged
|
|
226
|
+
* @param [options.ifNoneMatch] {boolean} publish only if `did.jsonl` is absent
|
|
149
227
|
* @returns {Promise<void>}
|
|
150
228
|
*/
|
|
151
|
-
export declare function publishWebvhLog({ idStore, log, webDoc }: {
|
|
229
|
+
export declare function publishWebvhLog({ idStore, log, webDoc, ifMatch, ifNoneMatch }: {
|
|
152
230
|
idStore: WebvhIdStore;
|
|
153
231
|
log: DIDLog;
|
|
154
232
|
webDoc: object;
|
|
233
|
+
ifMatch?: string;
|
|
234
|
+
ifNoneMatch?: boolean;
|
|
235
|
+
}): Promise<void>;
|
|
236
|
+
/**
|
|
237
|
+
* The shared guard-and-publish tail of every ceremony that extends the log
|
|
238
|
+
* through `updateDID`: the parallel `webDoc` must be there (it is, whenever
|
|
239
|
+
* `alsoKnownAsWeb` was passed), then log and projection are published under the
|
|
240
|
+
* caller's compare-and-swap token.
|
|
241
|
+
*
|
|
242
|
+
* @param options {object}
|
|
243
|
+
* @param options.idStore {WebvhIdStore}
|
|
244
|
+
* @param options.updated {object} the `updateDID` result
|
|
245
|
+
* @param options.updated.log {DIDLog}
|
|
246
|
+
* @param [options.updated.webDoc] {object}
|
|
247
|
+
* @param [options.ifMatch] {string} the ETag of the read this entry was built
|
|
248
|
+
* on
|
|
249
|
+
* @returns {Promise<void>}
|
|
250
|
+
*/
|
|
251
|
+
export declare function publishUpdatedLog({ idStore, updated, ifMatch }: {
|
|
252
|
+
idStore: WebvhIdStore;
|
|
253
|
+
updated: {
|
|
254
|
+
log: DIDLog;
|
|
255
|
+
webDoc?: object;
|
|
256
|
+
};
|
|
257
|
+
ifMatch?: string;
|
|
155
258
|
}): Promise<void>;
|
|
156
259
|
/**
|
|
157
260
|
* The verified state of the published log: the log itself, the resolved DID
|
|
@@ -164,6 +267,12 @@ export interface PublishedWebvhLog {
|
|
|
164
267
|
doc: DIDDoc;
|
|
165
268
|
updateKeys: string[];
|
|
166
269
|
nextKeyHashes: string[];
|
|
270
|
+
/**
|
|
271
|
+
* The `did.jsonl` ETag observed by the read that produced this state -- the
|
|
272
|
+
* `ifMatch` token for the publish of any entry built on it. Absent against a
|
|
273
|
+
* backend that serves no ETags, where the publish degrades to unconditional.
|
|
274
|
+
*/
|
|
275
|
+
etag?: string;
|
|
167
276
|
}
|
|
168
277
|
/**
|
|
169
278
|
* Reads and resolves the published `did.jsonl`, or returns `undefined` when
|
|
@@ -190,7 +299,9 @@ export declare function readPublishedLog({ idStore }: {
|
|
|
190
299
|
* unconditionally rather than compared first: the write is idempotent and one
|
|
191
300
|
* request either way, and the resolved log is the source of truth for what the
|
|
192
301
|
* projection must say. A ceremony that no-ops on the log therefore still heals
|
|
193
|
-
* a torn earlier publish.
|
|
302
|
+
* a torn earlier publish. The projection PUT is deliberately unconditional
|
|
303
|
+
* here too: healing it is the whole point, and the log it was derived from is
|
|
304
|
+
* the state this call just read and resolved.
|
|
194
305
|
*
|
|
195
306
|
* @param options {object}
|
|
196
307
|
* @param options.idStore {WebvhIdStore}
|
|
@@ -236,6 +347,12 @@ export declare function effectiveParameters(log: DIDLog): Array<{
|
|
|
236
347
|
* client-held update keys a lost seed is lost update authority, and no KMS
|
|
237
348
|
* repair path exists by design.
|
|
238
349
|
*
|
|
350
|
+
* The create publishes `did.jsonl` create-if-absent, so two concurrent signups
|
|
351
|
+
* cannot double-create the log: the loser re-runs (see
|
|
352
|
+
* {@link withLogConflictRetry}) and takes the adoption path against the
|
|
353
|
+
* winner's log -- adopting it when it holds this client's seeds, and raising
|
|
354
|
+
* the lost-seed refusal when it does not.
|
|
355
|
+
*
|
|
239
356
|
* @param options {object}
|
|
240
357
|
* @param options.idStore {WebvhIdStore}
|
|
241
358
|
* @param options.wasServerUrl {string}
|
|
@@ -246,7 +363,7 @@ export declare function effectiveParameters(log: DIDLog): Array<{
|
|
|
246
363
|
* @param options.updateKeys {ClientWebvhUpdateKeys} already durably persisted
|
|
247
364
|
* @returns {Promise<{ did: string }>}
|
|
248
365
|
*/
|
|
249
|
-
export declare function ensureDidWebvh(
|
|
366
|
+
export declare function ensureDidWebvh(options: {
|
|
250
367
|
idStore: WebvhIdStore;
|
|
251
368
|
wasServerUrl: string;
|
|
252
369
|
spaceId: string;
|
|
@@ -277,6 +394,11 @@ export declare function ensureDidWebvh({ idStore, wasServerUrl, spaceId, didWebK
|
|
|
277
394
|
* than left to the resolver, so a diverged client fails with a statement of
|
|
278
395
|
* what diverged instead of persisting rolled seeds and then failing opaquely.
|
|
279
396
|
*
|
|
397
|
+
* The entry publishes conditionally on the log this ceremony read, so a
|
|
398
|
+
* concurrent ceremony's entry is never erased; a lost race re-runs from the top
|
|
399
|
+
* (see {@link withLogConflictRetry}), which mints and persists a fresh staged
|
|
400
|
+
* seed again -- the documented cost of a torn rotation, one unused staged key.
|
|
401
|
+
*
|
|
280
402
|
* @param options {object}
|
|
281
403
|
* @param options.idStore {WebvhIdStore}
|
|
282
404
|
* @param options.updateKeys {ClientWebvhUpdateKeys} the current seeds
|
|
@@ -284,7 +406,7 @@ export declare function ensureDidWebvh({ idStore, wasServerUrl, spaceId, didWebK
|
|
|
284
406
|
* that changes the log's authorized update keys
|
|
285
407
|
* @returns {Promise<{ did: string }>}
|
|
286
408
|
*/
|
|
287
|
-
export declare function rotateWebvhUpdateKey(
|
|
409
|
+
export declare function rotateWebvhUpdateKey(options: {
|
|
288
410
|
idStore: WebvhIdStore;
|
|
289
411
|
updateKeys: ClientWebvhUpdateKeys;
|
|
290
412
|
persistUpdateKeys: (next: ClientWebvhUpdateKeys) => Promise<void>;
|
|
@@ -348,13 +470,18 @@ export declare function relationIds(relation: Array<string | {
|
|
|
348
470
|
* (no-op). Re-running with the same key set converges without forking the
|
|
349
471
|
* log.
|
|
350
472
|
*
|
|
473
|
+
* Each entry publishes conditionally on the read it was built on (the add
|
|
474
|
+
* entry on the mid-ceremony re-read), so a concurrent ceremony -- a revocation,
|
|
475
|
+
* another enrollment -- can never be erased by this one; a lost race re-runs
|
|
476
|
+
* from the top (see {@link withLogConflictRetry}) and rebases on the new head.
|
|
477
|
+
*
|
|
351
478
|
* @param options {object}
|
|
352
479
|
* @param options.idStore {WebvhIdStore}
|
|
353
480
|
* @param options.updateKeys {ClientWebvhUpdateKeys} THIS client's seeds
|
|
354
481
|
* @param options.newClient {WebvhEnrollmentKeys} the enrollee's public halves
|
|
355
482
|
* @returns {Promise<{ did: string }>}
|
|
356
483
|
*/
|
|
357
|
-
export declare function enrollWebvhClient(
|
|
484
|
+
export declare function enrollWebvhClient(options: {
|
|
358
485
|
idStore: WebvhIdStore;
|
|
359
486
|
updateKeys: ClientWebvhUpdateKeys;
|
|
360
487
|
newClient: WebvhEnrollmentKeys;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"didWebvh.d.ts","sourceRoot":"","sources":["../../src/webvh/didWebvh.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"didWebvh.d.ts","sourceRoot":"","sources":["../../src/webvh/didWebvh.ts"],"names":[],"mappings":"AAwEA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,MAAM,EAEP,MAAM,2BAA2B,CAAA;AAElC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAO3D,OAAO,KAAK,EAAa,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1D;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;;;;OAOG;IACH,gBAAgB,CAAC,OAAO,EAAE;QACxB,UAAU,EAAE,MAAM,CAAA;KACnB,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC,CAAA;IACxD;;;OAGG;IACH,aAAa,CAAC,OAAO,EAAE;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IAChE;;;;;;;;;;OAUG;IACH,aAAa,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,aAAa,EACb,OAAO,EACR,EAAE;IACD,aAAa,EAAE,aAAa,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;CACtB,GAAG,OAAO,CAAC,cAAc,CAAC,CAsF1B"}
|
package/dist/webvh/didWebvh.js
CHANGED
|
@@ -37,6 +37,15 @@
|
|
|
37
37
|
* lost seed is lost update authority, so every publish is preceded by a
|
|
38
38
|
* caller-durable write.
|
|
39
39
|
*
|
|
40
|
+
* Every ceremony publishes `did.jsonl` CONDITIONALLY: the read that produced
|
|
41
|
+
* the state an entry was built on carries the log's ETag, and the publish
|
|
42
|
+
* passes it back as the write's precondition (a create passes
|
|
43
|
+
* create-if-absent), so two clients extending the log concurrently can never
|
|
44
|
+
* silently erase each other -- the loser gets a {@link WebvhLogConflictError}
|
|
45
|
+
* and re-runs from the top, rebasing its entry on the winner's head
|
|
46
|
+
* ({@link withLogConflictRetry}). Against a backend that serves no ETags the
|
|
47
|
+
* precondition is absent and the publish degrades to an unconditional write.
|
|
48
|
+
*
|
|
40
49
|
* The Space-side I/O runs through the narrow {@link WebvhIdStore} seam, which
|
|
41
50
|
* each wallet app satisfies with its own remote-store class.
|
|
42
51
|
*
|
|
@@ -238,6 +247,79 @@ async function createWebvhLog({ wasServerUrl, spaceId, didWebKeys, clientKeys, u
|
|
|
238
247
|
}
|
|
239
248
|
return { log: result.log, webDoc: result.webDoc, did: result.did };
|
|
240
249
|
}
|
|
250
|
+
/**
|
|
251
|
+
* Thrown when a conditional publish of `did.jsonl` lost a race to a concurrent
|
|
252
|
+
* ceremony: the log moved on between the read this ceremony built its entry on
|
|
253
|
+
* and the PUT that would have appended it. The `cause` is the store's
|
|
254
|
+
* precondition error. A ceremony that meets one either re-runs (rebasing its
|
|
255
|
+
* entry on the new head -- what {@link withLogConflictRetry} does) or refuses,
|
|
256
|
+
* but it never overwrites the winner's entry.
|
|
257
|
+
*/
|
|
258
|
+
export class WebvhLogConflictError extends Error {
|
|
259
|
+
constructor(message = 'did:webvh: the published did.jsonl changed under this ceremony ' +
|
|
260
|
+
'(a concurrent ceremony extended the log); the entry was not appended.', options) {
|
|
261
|
+
super(message, options);
|
|
262
|
+
this.name = 'WebvhLogConflictError';
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Re-runs `run` when it fails with a {@link WebvhLogConflictError}, up to three
|
|
267
|
+
* total attempts, then rethrows. The retry IS the rebase: every ceremony in
|
|
268
|
+
* this module re-reads the published head and rebuilds its entry on it, and
|
|
269
|
+
* every one of them detects its own completion from durable state alone, so a
|
|
270
|
+
* naive re-run after a lost race appends on top of the winner instead of over
|
|
271
|
+
* it. A ceremony whose preconditions no longer hold after the re-read (the
|
|
272
|
+
* retrying client was itself revoked, the staged key it was about to reveal is
|
|
273
|
+
* no longer committed) surfaces its own typed refusal instead of looping.
|
|
274
|
+
*
|
|
275
|
+
* @param run {Function} the ceremony body, re-invokable from the top
|
|
276
|
+
* @returns {Promise<*>} whatever the ceremony returns
|
|
277
|
+
*/
|
|
278
|
+
export async function withLogConflictRetry(run) {
|
|
279
|
+
const attempts = 3;
|
|
280
|
+
for (let attempt = 1;; attempt++) {
|
|
281
|
+
try {
|
|
282
|
+
return await run();
|
|
283
|
+
}
|
|
284
|
+
catch (err) {
|
|
285
|
+
if (!(err instanceof WebvhLogConflictError) || attempt >= attempts) {
|
|
286
|
+
throw err;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* PUTs the serialized log to `did.jsonl`, forwarding the conditional-write
|
|
293
|
+
* preconditions and mapping a failed one to {@link WebvhLogConflictError}. The
|
|
294
|
+
* single place that mapping exists: the store seam is app-implemented, so the
|
|
295
|
+
* precondition error is matched on `err.name` rather than by `instanceof`,
|
|
296
|
+
* keeping the check implementation-agnostic. With neither precondition the PUT
|
|
297
|
+
* is unconditional -- the degradation on a backend that serves no ETags.
|
|
298
|
+
*
|
|
299
|
+
* @param options {object}
|
|
300
|
+
* @param options.store {object} anything with the seam's `putIdResource`
|
|
301
|
+
* @param options.log {DIDLog}
|
|
302
|
+
* @param [options.ifMatch] {string} publish only if the log is unchanged
|
|
303
|
+
* @param [options.ifNoneMatch] {boolean} publish only if the log is absent
|
|
304
|
+
* @returns {Promise<void>}
|
|
305
|
+
*/
|
|
306
|
+
export async function putLogResource({ store, log, ifMatch, ifNoneMatch }) {
|
|
307
|
+
try {
|
|
308
|
+
await store.putIdResource({
|
|
309
|
+
resourceId: DID_LOG_RESOURCE,
|
|
310
|
+
content: logToJsonlString(log),
|
|
311
|
+
contentType: 'text/jsonl',
|
|
312
|
+
ifMatch,
|
|
313
|
+
ifNoneMatch
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
catch (err) {
|
|
317
|
+
if (err?.name === 'PreconditionFailedError') {
|
|
318
|
+
throw new WebvhLogConflictError(undefined, { cause: err });
|
|
319
|
+
}
|
|
320
|
+
throw err;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
241
323
|
/**
|
|
242
324
|
* Publishes an already-created log: PUT `did.jsonl` (`text/jsonl`) then PUT
|
|
243
325
|
* `did.json` from `webDoc` (`application/did+json`, adopting the webvh
|
|
@@ -246,24 +328,59 @@ async function createWebvhLog({ wasServerUrl, spaceId, didWebKeys, clientKeys, u
|
|
|
246
328
|
* the publish tail no longer sets per-resource policies. The shared publish
|
|
247
329
|
* tail of the create and rotate paths.
|
|
248
330
|
*
|
|
331
|
+
* The log PUT carries the caller's precondition (`ifMatch`, the ETag of the
|
|
332
|
+
* read the entry was built on, or `ifNoneMatch` for a create), so a ceremony
|
|
333
|
+
* that lost a race to a concurrent one fails with
|
|
334
|
+
* {@link WebvhLogConflictError} instead of silently erasing the winner's entry.
|
|
335
|
+
* The `did.json` projection PUT stays unconditional by design: it runs only
|
|
336
|
+
* after the log's compare-and-swap was WON, so it is already serialized behind
|
|
337
|
+
* that win; the log is the source of truth and the projection a derived cache;
|
|
338
|
+
* and {@link concludeWithPublishedLog} re-derives and republishes the
|
|
339
|
+
* projection from the resolved log on every ceremony's no-op path, healing any
|
|
340
|
+
* lag a race or a torn publish leaves behind.
|
|
341
|
+
*
|
|
249
342
|
* @param options {object}
|
|
250
343
|
* @param options.idStore {WebvhIdStore}
|
|
251
344
|
* @param options.log {DIDLog}
|
|
252
345
|
* @param options.webDoc {object}
|
|
346
|
+
* @param [options.ifMatch] {string} publish only if `did.jsonl` is unchanged
|
|
347
|
+
* @param [options.ifNoneMatch] {boolean} publish only if `did.jsonl` is absent
|
|
253
348
|
* @returns {Promise<void>}
|
|
254
349
|
*/
|
|
255
|
-
export async function publishWebvhLog({ idStore, log, webDoc }) {
|
|
256
|
-
await
|
|
257
|
-
resourceId: DID_LOG_RESOURCE,
|
|
258
|
-
content: logToJsonlString(log),
|
|
259
|
-
contentType: 'text/jsonl'
|
|
260
|
-
});
|
|
350
|
+
export async function publishWebvhLog({ idStore, log, webDoc, ifMatch, ifNoneMatch }) {
|
|
351
|
+
await putLogResource({ store: idStore, log, ifMatch, ifNoneMatch });
|
|
261
352
|
await idStore.putIdResource({
|
|
262
353
|
resourceId: DID_DOCUMENT_RESOURCE,
|
|
263
354
|
content: webDoc,
|
|
264
355
|
contentType: 'application/did+json'
|
|
265
356
|
});
|
|
266
357
|
}
|
|
358
|
+
/**
|
|
359
|
+
* The shared guard-and-publish tail of every ceremony that extends the log
|
|
360
|
+
* through `updateDID`: the parallel `webDoc` must be there (it is, whenever
|
|
361
|
+
* `alsoKnownAsWeb` was passed), then log and projection are published under the
|
|
362
|
+
* caller's compare-and-swap token.
|
|
363
|
+
*
|
|
364
|
+
* @param options {object}
|
|
365
|
+
* @param options.idStore {WebvhIdStore}
|
|
366
|
+
* @param options.updated {object} the `updateDID` result
|
|
367
|
+
* @param options.updated.log {DIDLog}
|
|
368
|
+
* @param [options.updated.webDoc] {object}
|
|
369
|
+
* @param [options.ifMatch] {string} the ETag of the read this entry was built
|
|
370
|
+
* on
|
|
371
|
+
* @returns {Promise<void>}
|
|
372
|
+
*/
|
|
373
|
+
export async function publishUpdatedLog({ idStore, updated, ifMatch }) {
|
|
374
|
+
if (!updated.webDoc) {
|
|
375
|
+
throw new Error('did:webvh: updateDID returned no webDoc despite the did:web alsoKnownAs.');
|
|
376
|
+
}
|
|
377
|
+
await publishWebvhLog({
|
|
378
|
+
idStore,
|
|
379
|
+
log: updated.log,
|
|
380
|
+
webDoc: updated.webDoc,
|
|
381
|
+
ifMatch
|
|
382
|
+
});
|
|
383
|
+
}
|
|
267
384
|
/**
|
|
268
385
|
* Writes `keys.json` v2: the did:web relationship map plus the `webvh` block,
|
|
269
386
|
* preserving the three did:web relationships.
|
|
@@ -288,13 +405,13 @@ async function writeKeysJson({ idStore, didWebKeys, webvh }) {
|
|
|
288
405
|
* @returns {Promise<PublishedWebvhLog | undefined>}
|
|
289
406
|
*/
|
|
290
407
|
export async function readPublishedLog({ idStore }) {
|
|
291
|
-
const
|
|
408
|
+
const read = await idStore.getIdResourceRaw({
|
|
292
409
|
resourceId: DID_LOG_RESOURCE
|
|
293
410
|
});
|
|
294
|
-
if (
|
|
411
|
+
if (read === undefined) {
|
|
295
412
|
return undefined;
|
|
296
413
|
}
|
|
297
|
-
const log = readLogFromString(
|
|
414
|
+
const log = readLogFromString(read.text);
|
|
298
415
|
const resolved = await resolveDIDFromLog(log);
|
|
299
416
|
if (resolved.meta.error || !resolved.did || !resolved.doc) {
|
|
300
417
|
throw new Error(`did:webvh: existing did.jsonl failed to resolve (${resolved.meta.error}).`);
|
|
@@ -304,7 +421,8 @@ export async function readPublishedLog({ idStore }) {
|
|
|
304
421
|
did: resolved.did,
|
|
305
422
|
doc: resolved.doc,
|
|
306
423
|
updateKeys: resolved.meta.updateKeys ?? [],
|
|
307
|
-
nextKeyHashes: resolved.meta.nextKeyHashes ?? []
|
|
424
|
+
nextKeyHashes: resolved.meta.nextKeyHashes ?? [],
|
|
425
|
+
etag: read.etag
|
|
308
426
|
};
|
|
309
427
|
}
|
|
310
428
|
/**
|
|
@@ -320,7 +438,9 @@ export async function readPublishedLog({ idStore }) {
|
|
|
320
438
|
* unconditionally rather than compared first: the write is idempotent and one
|
|
321
439
|
* request either way, and the resolved log is the source of truth for what the
|
|
322
440
|
* projection must say. A ceremony that no-ops on the log therefore still heals
|
|
323
|
-
* a torn earlier publish.
|
|
441
|
+
* a torn earlier publish. The projection PUT is deliberately unconditional
|
|
442
|
+
* here too: healing it is the whole point, and the log it was derived from is
|
|
443
|
+
* the state this call just read and resolved.
|
|
324
444
|
*
|
|
325
445
|
* @param options {object}
|
|
326
446
|
* @param options.idStore {WebvhIdStore}
|
|
@@ -421,6 +541,12 @@ function advancedSeeds({ published, multibases, updateKeys }) {
|
|
|
421
541
|
* client-held update keys a lost seed is lost update authority, and no KMS
|
|
422
542
|
* repair path exists by design.
|
|
423
543
|
*
|
|
544
|
+
* The create publishes `did.jsonl` create-if-absent, so two concurrent signups
|
|
545
|
+
* cannot double-create the log: the loser re-runs (see
|
|
546
|
+
* {@link withLogConflictRetry}) and takes the adoption path against the
|
|
547
|
+
* winner's log -- adopting it when it holds this client's seeds, and raising
|
|
548
|
+
* the lost-seed refusal when it does not.
|
|
549
|
+
*
|
|
424
550
|
* @param options {object}
|
|
425
551
|
* @param options.idStore {WebvhIdStore}
|
|
426
552
|
* @param options.wasServerUrl {string}
|
|
@@ -431,7 +557,16 @@ function advancedSeeds({ published, multibases, updateKeys }) {
|
|
|
431
557
|
* @param options.updateKeys {ClientWebvhUpdateKeys} already durably persisted
|
|
432
558
|
* @returns {Promise<{ did: string }>}
|
|
433
559
|
*/
|
|
434
|
-
export async function ensureDidWebvh(
|
|
560
|
+
export async function ensureDidWebvh(options) {
|
|
561
|
+
return withLogConflictRetry(() => ensureDidWebvhOnce(options));
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* One attempt of {@link ensureDidWebvh}, re-invoked by the conflict retry.
|
|
565
|
+
*
|
|
566
|
+
* @param options {object} see {@link ensureDidWebvh}
|
|
567
|
+
* @returns {Promise<{ did: string }>}
|
|
568
|
+
*/
|
|
569
|
+
async function ensureDidWebvhOnce({ idStore, wasServerUrl, spaceId, didWebKeys, clientKeys, updateKeys }) {
|
|
435
570
|
const published = await readPublishedLog({ idStore });
|
|
436
571
|
const multibases = await updateKeyMultibases({ updateKeys });
|
|
437
572
|
if (published) {
|
|
@@ -481,7 +616,11 @@ export async function ensureDidWebvh({ idStore, wasServerUrl, spaceId, didWebKey
|
|
|
481
616
|
await publishWebvhLog({
|
|
482
617
|
idStore,
|
|
483
618
|
log: created.log,
|
|
484
|
-
webDoc: created.webDoc
|
|
619
|
+
webDoc: created.webDoc,
|
|
620
|
+
// Create-if-absent: a concurrent signup that already published its own
|
|
621
|
+
// log wins, and this run re-reads and adopts (or refuses) instead of
|
|
622
|
+
// erasing it.
|
|
623
|
+
ifNoneMatch: true
|
|
485
624
|
});
|
|
486
625
|
await writeKeysJson({
|
|
487
626
|
idStore,
|
|
@@ -511,6 +650,11 @@ export async function ensureDidWebvh({ idStore, wasServerUrl, spaceId, didWebKey
|
|
|
511
650
|
* than left to the resolver, so a diverged client fails with a statement of
|
|
512
651
|
* what diverged instead of persisting rolled seeds and then failing opaquely.
|
|
513
652
|
*
|
|
653
|
+
* The entry publishes conditionally on the log this ceremony read, so a
|
|
654
|
+
* concurrent ceremony's entry is never erased; a lost race re-runs from the top
|
|
655
|
+
* (see {@link withLogConflictRetry}), which mints and persists a fresh staged
|
|
656
|
+
* seed again -- the documented cost of a torn rotation, one unused staged key.
|
|
657
|
+
*
|
|
514
658
|
* @param options {object}
|
|
515
659
|
* @param options.idStore {WebvhIdStore}
|
|
516
660
|
* @param options.updateKeys {ClientWebvhUpdateKeys} the current seeds
|
|
@@ -518,7 +662,17 @@ export async function ensureDidWebvh({ idStore, wasServerUrl, spaceId, didWebKey
|
|
|
518
662
|
* that changes the log's authorized update keys
|
|
519
663
|
* @returns {Promise<{ did: string }>}
|
|
520
664
|
*/
|
|
521
|
-
export async function rotateWebvhUpdateKey(
|
|
665
|
+
export async function rotateWebvhUpdateKey(options) {
|
|
666
|
+
return withLogConflictRetry(() => rotateWebvhUpdateKeyOnce(options));
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* One attempt of {@link rotateWebvhUpdateKey}, re-invoked by the conflict
|
|
670
|
+
* retry.
|
|
671
|
+
*
|
|
672
|
+
* @param options {object} see {@link rotateWebvhUpdateKey}
|
|
673
|
+
* @returns {Promise<{ did: string }>}
|
|
674
|
+
*/
|
|
675
|
+
async function rotateWebvhUpdateKeyOnce({ idStore, updateKeys, persistUpdateKeys }) {
|
|
522
676
|
const published = await readPublishedLog({ idStore });
|
|
523
677
|
if (!published) {
|
|
524
678
|
throw new Error('did:webvh: did.jsonl is missing; nothing to rotate.');
|
|
@@ -594,17 +748,10 @@ export async function rotateWebvhUpdateKey({ idStore, updateKeys, persistUpdateK
|
|
|
594
748
|
])
|
|
595
749
|
]
|
|
596
750
|
});
|
|
597
|
-
if (!updated.webDoc) {
|
|
598
|
-
throw new Error('did:webvh: updateDID returned no webDoc despite the did:web alsoKnownAs.');
|
|
599
|
-
}
|
|
600
751
|
// Publish the extended log and republish did.json (its did:web projection),
|
|
601
752
|
// then finalize the local seeds: the staged key is now active, the pending
|
|
602
753
|
// one is the new staged key.
|
|
603
|
-
await
|
|
604
|
-
idStore,
|
|
605
|
-
log: updated.log,
|
|
606
|
-
webDoc: updated.webDoc
|
|
607
|
-
});
|
|
754
|
+
await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
|
|
608
755
|
await persistUpdateKeys({
|
|
609
756
|
updateSeed: updateKeys.stagedSeed,
|
|
610
757
|
stagedSeed: newStagedSeed
|
|
@@ -669,13 +816,27 @@ export function relationIds(relation) {
|
|
|
669
816
|
* (no-op). Re-running with the same key set converges without forking the
|
|
670
817
|
* log.
|
|
671
818
|
*
|
|
819
|
+
* Each entry publishes conditionally on the read it was built on (the add
|
|
820
|
+
* entry on the mid-ceremony re-read), so a concurrent ceremony -- a revocation,
|
|
821
|
+
* another enrollment -- can never be erased by this one; a lost race re-runs
|
|
822
|
+
* from the top (see {@link withLogConflictRetry}) and rebases on the new head.
|
|
823
|
+
*
|
|
672
824
|
* @param options {object}
|
|
673
825
|
* @param options.idStore {WebvhIdStore}
|
|
674
826
|
* @param options.updateKeys {ClientWebvhUpdateKeys} THIS client's seeds
|
|
675
827
|
* @param options.newClient {WebvhEnrollmentKeys} the enrollee's public halves
|
|
676
828
|
* @returns {Promise<{ did: string }>}
|
|
677
829
|
*/
|
|
678
|
-
export async function enrollWebvhClient(
|
|
830
|
+
export async function enrollWebvhClient(options) {
|
|
831
|
+
return withLogConflictRetry(() => enrollWebvhClientOnce(options));
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* One attempt of {@link enrollWebvhClient}, re-invoked by the conflict retry.
|
|
835
|
+
*
|
|
836
|
+
* @param options {object} see {@link enrollWebvhClient}
|
|
837
|
+
* @returns {Promise<{ did: string }>}
|
|
838
|
+
*/
|
|
839
|
+
async function enrollWebvhClientOnce({ idStore, updateKeys, newClient }) {
|
|
679
840
|
let published = await readPublishedLog({ idStore });
|
|
680
841
|
if (!published) {
|
|
681
842
|
throw new Error('did:webvh: did.jsonl is missing; nothing to enroll into.');
|
|
@@ -730,14 +891,7 @@ export async function enrollWebvhClient({ idStore, updateKeys, newClient }) {
|
|
|
730
891
|
])
|
|
731
892
|
]
|
|
732
893
|
});
|
|
733
|
-
|
|
734
|
-
throw new Error('did:webvh: updateDID returned no webDoc despite the did:web alsoKnownAs.');
|
|
735
|
-
}
|
|
736
|
-
await publishWebvhLog({
|
|
737
|
-
idStore,
|
|
738
|
-
log: updated.log,
|
|
739
|
-
webDoc: updated.webDoc
|
|
740
|
-
});
|
|
894
|
+
await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
|
|
741
895
|
// Re-read through the same verifying path the resume case uses, so the
|
|
742
896
|
// add entry below always builds on the published, resolved state.
|
|
743
897
|
published = await readPublishedLog({ idStore });
|
|
@@ -748,7 +902,7 @@ export async function enrollWebvhClient({ idStore, updateKeys, newClient }) {
|
|
|
748
902
|
// The add entry: the new client's two verification methods and its update
|
|
749
903
|
// key, on top of the full existing document (updateDID replaces the
|
|
750
904
|
// verification-method set and relationship arrays wholesale).
|
|
751
|
-
const { did, doc, log, updateKeys: authorizedKeys, nextKeyHashes } = published;
|
|
905
|
+
const { did, doc, log, updateKeys: authorizedKeys, nextKeyHashes, etag } = published;
|
|
752
906
|
const vmId = (publicKeyMultibase) => `${did}#${publicKeyMultibase}`;
|
|
753
907
|
const addedMethods = [
|
|
754
908
|
newClient.signingKeyMultibase,
|
|
@@ -780,14 +934,9 @@ export async function enrollWebvhClient({ idStore, updateKeys, newClient }) {
|
|
|
780
934
|
capabilityInvocation: withReference(doc.capabilityInvocation, signingVmId),
|
|
781
935
|
capabilityDelegation: withReference(doc.capabilityDelegation, signingVmId)
|
|
782
936
|
});
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
}
|
|
786
|
-
await publishWebvhLog({
|
|
787
|
-
idStore,
|
|
788
|
-
log: updated.log,
|
|
789
|
-
webDoc: updated.webDoc
|
|
790
|
-
});
|
|
937
|
+
// The etag of the read this entry was built on: the mid-ceremony re-read
|
|
938
|
+
// when the commit entry ran here, the original read when it was skipped.
|
|
939
|
+
await publishUpdatedLog({ idStore, updated, ifMatch: etag });
|
|
791
940
|
return { did: updated.did };
|
|
792
941
|
}
|
|
793
942
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"didWebvh.js","sourceRoot":"","sources":["../../src/webvh/didWebvh.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,SAAS,EACV,MAAM,2BAA2B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CAAC,IAAI,CAAC,IAAI,CAC/C,CAAA;QACH,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC,CAAA;IACD,MAAM,QAAQ,GAAmB;QAC/B,cAAc,EAAE,IAAI,CAAC,gBAAgB,CAAC;QACtC,YAAY,EAAE,IAAI,CAAC,cAAc,CAAC;KACnC,CAAA;IAED,yEAAyE;IACzE,sEAAsE;IACtE,MAAM,SAAS,GAAG,MAAM,gBAAgB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;IACrD,IAAI,SAAS,EAAE,CAAC;QACd,QAAQ,CAAC,KAAK,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,GAAG,EAAE,CAAA;IACzC,CAAC;IAED,2CAA2C;IAC3C,MAAM,OAAO,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAA;IAC9C,OAAO,QAAQ,CAAA;AACjB,CAAC"}
|
package/dist/webvh/index.d.ts
CHANGED
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
* - `wasWebvhIdStore` -- the WAS-backed `WebvhIdStore` the ceremonies write
|
|
24
24
|
* through.
|
|
25
25
|
* - `repairKeyBindings` -- the lost-`keys.json` recovery path.
|
|
26
|
+
* - `WebvhLogConflictError` / `withLogConflictRetry` -- the lost-race outcome
|
|
27
|
+
* of a ceremony's conditional `did.jsonl` publish, and the rebase-by-re-run
|
|
28
|
+
* wrapper every ceremony here already applies to itself.
|
|
26
29
|
* - `webvhZcapClient` / `webvhSigner` / `didKeyZcapClient` -- ZCap signing
|
|
27
30
|
* under the account's did:webvh verification-method id (and the
|
|
28
31
|
* pre-promotion did:key form).
|
|
@@ -30,7 +33,7 @@
|
|
|
30
33
|
* Kept out of the root export: this subpath pulls the did:webvh, ed25519, and
|
|
31
34
|
* ezcap dependency graph (the same isolation pattern as `./identity`).
|
|
32
35
|
*/
|
|
33
|
-
export { didWebvhControllerTemplate, ensureDidWebvh, enrollWebvhClient, mintClientWebvhUpdateKeys, relationIds, repairKeyBindings, rotateWebvhUpdateKey, updateKeyMultibase } from './didWebvh.js';
|
|
36
|
+
export { didWebvhControllerTemplate, ensureDidWebvh, enrollWebvhClient, mintClientWebvhUpdateKeys, relationIds, repairKeyBindings, rotateWebvhUpdateKey, updateKeyMultibase, WebvhLogConflictError, withLogConflictRetry } from './didWebvh.js';
|
|
34
37
|
export { AccountLogMissingError, verifyAccountLog } from './verifyLog.js';
|
|
35
38
|
export { wasWebvhIdStore } from './wasIdStore.js';
|
|
36
39
|
export { attributeClientUpdateKey, delegationKeyInDocument, documentKeyMultibases, keyAgreementTwinMultibase, listEnrolledWebvhClients } from './listClients.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EACL,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAA;AAC1B,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,YAAY,EACV,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,YAAY,EACb,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AACzC,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE1D,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,eAAe,EAChB,MAAM,WAAW,CAAA;AAClB,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA"}
|
package/dist/webvh/index.js
CHANGED
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
* - `wasWebvhIdStore` -- the WAS-backed `WebvhIdStore` the ceremonies write
|
|
24
24
|
* through.
|
|
25
25
|
* - `repairKeyBindings` -- the lost-`keys.json` recovery path.
|
|
26
|
+
* - `WebvhLogConflictError` / `withLogConflictRetry` -- the lost-race outcome
|
|
27
|
+
* of a ceremony's conditional `did.jsonl` publish, and the rebase-by-re-run
|
|
28
|
+
* wrapper every ceremony here already applies to itself.
|
|
26
29
|
* - `webvhZcapClient` / `webvhSigner` / `didKeyZcapClient` -- ZCap signing
|
|
27
30
|
* under the account's did:webvh verification-method id (and the
|
|
28
31
|
* pre-promotion did:key form).
|
|
@@ -30,7 +33,7 @@
|
|
|
30
33
|
* Kept out of the root export: this subpath pulls the did:webvh, ed25519, and
|
|
31
34
|
* ezcap dependency graph (the same isolation pattern as `./identity`).
|
|
32
35
|
*/
|
|
33
|
-
export { didWebvhControllerTemplate, ensureDidWebvh, enrollWebvhClient, mintClientWebvhUpdateKeys, relationIds, repairKeyBindings, rotateWebvhUpdateKey, updateKeyMultibase } from './didWebvh.js';
|
|
36
|
+
export { didWebvhControllerTemplate, ensureDidWebvh, enrollWebvhClient, mintClientWebvhUpdateKeys, relationIds, repairKeyBindings, rotateWebvhUpdateKey, updateKeyMultibase, WebvhLogConflictError, withLogConflictRetry } from './didWebvh.js';
|
|
34
37
|
export { AccountLogMissingError, verifyAccountLog } from './verifyLog.js';
|
|
35
38
|
export { wasWebvhIdStore } from './wasIdStore.js';
|
|
36
39
|
export { attributeClientUpdateKey, delegationKeyInDocument, documentKeyMultibases, keyAgreementTwinMultibase, listEnrolledWebvhClients } from './listClients.js';
|
package/dist/webvh/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/webvh/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,EACL,0BAA0B,EAC1B,cAAc,EACd,iBAAiB,EACjB,yBAAyB,EACzB,WAAW,EACX,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,kBAAkB,CAAA;AAKzB,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC/B,MAAM,mBAAmB,CAAA;AAW1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAGzC,OAAO,EACL,yBAAyB,EACzB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,WAAW,EACX,eAAe,EAChB,MAAM,WAAW,CAAA"}
|
|
@@ -57,6 +57,11 @@ export declare class StagedCommitmentAmbiguousError extends Error {
|
|
|
57
57
|
* follows the document edit). Revoking the last remaining client is refused
|
|
58
58
|
* by the same guard.
|
|
59
59
|
*
|
|
60
|
+
* The removal entry publishes conditionally on the log this call read, so a
|
|
61
|
+
* concurrent enrollment landing in between is never erased by the revocation
|
|
62
|
+
* (nor the revocation by it): the loser re-runs and rebases its entry on the
|
|
63
|
+
* winner's head (see `withLogConflictRetry`).
|
|
64
|
+
*
|
|
60
65
|
* @param options {object}
|
|
61
66
|
* @param options.idStore {WebvhIdStore}
|
|
62
67
|
* @param options.updateKeys {ClientWebvhUpdateKeys} the REVOKING client's
|
|
@@ -72,7 +77,7 @@ export declare class StagedCommitmentAmbiguousError extends Error {
|
|
|
72
77
|
* the log it just extended. On the idempotent no-op path this is the
|
|
73
78
|
* already-published document, which states the same thing.
|
|
74
79
|
*/
|
|
75
|
-
export declare function revokeWebvhClient(
|
|
80
|
+
export declare function revokeWebvhClient(options: {
|
|
76
81
|
idStore: WebvhIdStore;
|
|
77
82
|
updateKeys: ClientWebvhUpdateKeys;
|
|
78
83
|
revokedClient: RevokedClientKeys;
|
|
@@ -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;AAalC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;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;CAC7B,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAExC"}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* standing commitment.
|
|
34
34
|
*/
|
|
35
35
|
import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
|
|
36
|
-
import { assertCarryOverCommitments, concludeWithPublishedLog, effectiveParameters,
|
|
36
|
+
import { assertCarryOverCommitments, concludeWithPublishedLog, effectiveParameters, publishUpdatedLog, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner, withLogConflictRetry } from './didWebvh.js';
|
|
37
37
|
import { attributeClientUpdateKey } from './listClients.js';
|
|
38
38
|
/**
|
|
39
39
|
* Thrown when the log attribution cannot isolate the revoked client's staged
|
|
@@ -212,6 +212,11 @@ async function currentRevokedUpdateKey({ published, revokedClient, vmPresent })
|
|
|
212
212
|
* follows the document edit). Revoking the last remaining client is refused
|
|
213
213
|
* by the same guard.
|
|
214
214
|
*
|
|
215
|
+
* The removal entry publishes conditionally on the log this call read, so a
|
|
216
|
+
* concurrent enrollment landing in between is never erased by the revocation
|
|
217
|
+
* (nor the revocation by it): the loser re-runs and rebases its entry on the
|
|
218
|
+
* winner's head (see `withLogConflictRetry`).
|
|
219
|
+
*
|
|
215
220
|
* @param options {object}
|
|
216
221
|
* @param options.idStore {WebvhIdStore}
|
|
217
222
|
* @param options.updateKeys {ClientWebvhUpdateKeys} the REVOKING client's
|
|
@@ -227,7 +232,16 @@ async function currentRevokedUpdateKey({ published, revokedClient, vmPresent })
|
|
|
227
232
|
* the log it just extended. On the idempotent no-op path this is the
|
|
228
233
|
* already-published document, which states the same thing.
|
|
229
234
|
*/
|
|
230
|
-
export async function revokeWebvhClient(
|
|
235
|
+
export async function revokeWebvhClient(options) {
|
|
236
|
+
return withLogConflictRetry(() => revokeWebvhClientOnce(options));
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* One attempt of {@link revokeWebvhClient}, re-invoked by the conflict retry.
|
|
240
|
+
*
|
|
241
|
+
* @param options {object} see {@link revokeWebvhClient}
|
|
242
|
+
* @returns {Promise<{ did: string, doc: DIDDoc }>}
|
|
243
|
+
*/
|
|
244
|
+
async function revokeWebvhClientOnce({ idStore, updateKeys, revokedClient, knownLatentHashes = [] }) {
|
|
231
245
|
const published = await readPublishedLog({ idStore });
|
|
232
246
|
if (!published) {
|
|
233
247
|
throw new Error('did:webvh: did.jsonl is missing; nothing to revoke from.');
|
|
@@ -289,10 +303,7 @@ export async function revokeWebvhClient({ idStore, updateKeys, revokedClient, kn
|
|
|
289
303
|
capabilityInvocation: relationIds(doc.capabilityInvocation).filter(id => id !== signingVmId),
|
|
290
304
|
capabilityDelegation: relationIds(doc.capabilityDelegation).filter(id => id !== signingVmId)
|
|
291
305
|
});
|
|
292
|
-
|
|
293
|
-
throw new Error('did:webvh: updateDID returned no webDoc despite the did:web alsoKnownAs.');
|
|
294
|
-
}
|
|
295
|
-
await publishWebvhLog({ idStore, log: updated.log, webDoc: updated.webDoc });
|
|
306
|
+
await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
|
|
296
307
|
return { did: updated.did, doc: updated.doc };
|
|
297
308
|
}
|
|
298
309
|
//# sourceMappingURL=revokeClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"revokeClient.js","sourceRoot":"","sources":["../../src/webvh/revokeClient.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;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,CAAC,GAAG,CAAC,IAAI,CAAC,CACjC;QACD,mBAAmB,EAAE,eAAe,CAAC,MAAM,CACzC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CACrD;QACD,cAAc,EAAE,WAAW,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,MAAM,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,EAAE,KAAK,gBAAgB,CAC9B;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,CAAA;AAC/C,CAAC"}
|
|
@@ -14,6 +14,12 @@
|
|
|
14
14
|
* Bodies are written as raw bytes under the content type the caller states --
|
|
15
15
|
* load-bearing, since the log is JSON Lines (`text/jsonl`), not JSON, and the
|
|
16
16
|
* DID document is served as `application/did+json`.
|
|
17
|
+
*
|
|
18
|
+
* Reads carry the resource's ETag and writes forward the ceremonies'
|
|
19
|
+
* conditional-write preconditions, so a did:webvh ceremony's `did.jsonl`
|
|
20
|
+
* publish is a compare-and-swap. A backend that does not advertise
|
|
21
|
+
* `conditional-writes` serves no ETag, and the publish degrades to an
|
|
22
|
+
* unconditional write.
|
|
17
23
|
*/
|
|
18
24
|
import type { WasClient } from '@interop/was-client';
|
|
19
25
|
import type { WebvhIdStore } from './didWebvh.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wasIdStore.d.ts","sourceRoot":"","sources":["../../src/webvh/wasIdStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"wasIdStore.d.ts","sourceRoot":"","sources":["../../src/webvh/wasIdStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAMpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAC9B,GAAG,EACH,OAAO,EACR,EAAE;IACD,GAAG,EAAE,SAAS,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB,GAAG,YAAY,CAwDf"}
|
package/dist/webvh/wasIdStore.js
CHANGED
|
@@ -16,17 +16,33 @@ export function wasWebvhIdStore({ was, spaceId }) {
|
|
|
16
16
|
.resource(resourceId);
|
|
17
17
|
return {
|
|
18
18
|
getIdResourceRaw: async ({ resourceId }) => {
|
|
19
|
-
const
|
|
20
|
-
|
|
19
|
+
const read = await idResource(resourceId).getWithEtag();
|
|
20
|
+
if (read === null) {
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
// The log is served as `text/jsonl`, so the body decodes to a Blob; the
|
|
24
|
+
// string and stringify arms are defensive fallbacks for a backend that
|
|
25
|
+
// served (and the codec parsed) a JSON content type instead.
|
|
26
|
+
const { data, etag } = read;
|
|
27
|
+
const text = data instanceof Blob
|
|
28
|
+
? await data.text()
|
|
29
|
+
: typeof data === 'string'
|
|
30
|
+
? data
|
|
31
|
+
: JSON.stringify(data);
|
|
32
|
+
return { text, etag };
|
|
21
33
|
},
|
|
22
34
|
getIdResource: async ({ resourceId }) => {
|
|
23
35
|
const data = await idResource(resourceId).get();
|
|
24
36
|
return data === null ? undefined : data;
|
|
25
37
|
},
|
|
26
|
-
putIdResource: async ({ resourceId, content, contentType = 'application/json' }) => {
|
|
38
|
+
putIdResource: async ({ resourceId, content, contentType = 'application/json', ifMatch, ifNoneMatch }) => {
|
|
27
39
|
const serialized = typeof content === 'string' ? content : JSON.stringify(content);
|
|
40
|
+
// was-client's own PreconditionFailedError propagates as-is: its `name`
|
|
41
|
+
// is exactly what the seam contract names.
|
|
28
42
|
await idResource(resourceId).put(new TextEncoder().encode(serialized), {
|
|
29
|
-
contentType
|
|
43
|
+
contentType,
|
|
44
|
+
ifMatch,
|
|
45
|
+
ifNoneMatch
|
|
30
46
|
});
|
|
31
47
|
},
|
|
32
48
|
putKeyMap: async ({ content }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wasIdStore.js","sourceRoot":"","sources":["../../src/webvh/wasIdStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wasIdStore.js","sourceRoot":"","sources":["../../src/webvh/wasIdStore.ts"],"names":[],"mappings":"AAwBA,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,kBAAkB,EACnB,MAAM,yBAAyB,CAAA;AAGhC;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,EAC9B,GAAG,EACH,OAAO,EAIR;IACC,MAAM,UAAU,GAAG,CAAC,UAAkB,EAAE,EAAE,CACxC,GAAG;SACA,KAAK,CAAC,OAAO,CAAC;SACd,UAAU,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC;SACzD,QAAQ,CAAC,UAAU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AC,UAAU,CAAC,EAAE;gBACrE,WAAW;gBACX,OAAO;gBACP,WAAW;aACZ,CAAC,CAAA;QACJ,CAAC;QACD,SAAS,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;YAC/B,MAAM,GAAG;iBACN,KAAK,CAAC,OAAO,CAAC;iBACd,UAAU,CAAC,kBAAkB,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,CAAC;iBAC9D,QAAQ,CAAC,iBAAiB,CAAC;iBAC3B,GAAG,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE;gBACtD,WAAW,EAAE,kBAAkB;aAChC,CAAC,CAAA;QACN,CAAC;KACF,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.31.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "pnpm run clear && tsc",
|