@interop/wallet-core 0.51.0 → 0.53.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 +7 -11
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +2 -2
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.js +1 -1
- package/dist/clientAnnex/forget.d.ts +18 -6
- package/dist/clientAnnex/forget.d.ts.map +1 -1
- package/dist/clientAnnex/forget.js +19 -6
- package/dist/clientAnnex/forget.js.map +1 -1
- package/dist/clientAnnex/forgetLast.d.ts +51 -30
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +72 -26
- package/dist/clientAnnex/forgetLast.js.map +1 -1
- package/dist/clientAnnex/gc.d.ts +3 -3
- package/dist/clientAnnex/gc.d.ts.map +1 -1
- package/dist/clientAnnex/gc.js +2 -2
- package/dist/clientAnnex/gc.js.map +1 -1
- package/dist/clientAnnex/index.d.ts +6 -6
- package/dist/clientAnnex/index.d.ts.map +1 -1
- package/dist/clientAnnex/index.js +5 -5
- package/dist/clientAnnex/index.js.map +1 -1
- package/dist/clientAnnex/ladder.d.ts +19 -11
- package/dist/clientAnnex/ladder.d.ts.map +1 -1
- package/dist/clientAnnex/ladder.js +77 -14
- package/dist/clientAnnex/ladder.js.map +1 -1
- package/dist/clientAnnex/ladderAnchored.d.ts +146 -10
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +230 -26
- package/dist/clientAnnex/ladderAnchored.js.map +1 -1
- package/dist/clientAnnex/log.d.ts +6 -6
- package/dist/clientAnnex/log.d.ts.map +1 -1
- package/dist/clientAnnex/log.js +8 -8
- package/dist/clientAnnex/log.js.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts +18 -7
- package/dist/clientAnnex/recoveryLadderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/recoveryLadderAnchored.js +54 -14
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/selfEnroll.d.ts +67 -6
- package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
- package/dist/clientAnnex/selfEnroll.js +91 -15
- package/dist/clientAnnex/selfEnroll.js.map +1 -1
- package/dist/clients/listing.d.ts +1 -1
- package/dist/clients/listing.d.ts.map +1 -1
- package/dist/clients/listing.js +1 -1
- package/dist/clients/listing.js.map +1 -1
- package/dist/clients/revocation.d.ts +1 -1
- package/dist/clients/rosterPolicy.d.ts +1 -1
- package/dist/clients/rosterPolicy.d.ts.map +1 -1
- package/dist/clients/rosterPolicy.js +10 -7
- package/dist/clients/rosterPolicy.js.map +1 -1
- package/dist/descriptors/acquire.js +1 -1
- package/dist/descriptors/logSource.d.ts +6 -4
- package/dist/descriptors/logSource.d.ts.map +1 -1
- package/dist/descriptors/logSource.js +7 -4
- package/dist/descriptors/logSource.js.map +1 -1
- package/dist/enrollment/enrollment.d.ts +1 -1
- package/dist/enrollment/enrollment.d.ts.map +1 -1
- package/dist/enrollment/enrollment.js +2 -1
- package/dist/enrollment/enrollment.js.map +1 -1
- package/dist/genesis/accountGenesis.d.ts +1 -1
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/genesis/accountGenesis.js +1 -1
- package/dist/index.d.ts +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/keyring/kdf.d.ts +6 -20
- package/dist/keyring/kdf.d.ts.map +1 -1
- package/dist/keyring/kdf.js +8 -5
- package/dist/keyring/kdf.js.map +1 -1
- package/dist/keyring/unlockSpace.js +1 -1
- package/dist/keys/clientKeyRecord.d.ts +68 -1
- package/dist/keys/clientKeyRecord.d.ts.map +1 -1
- package/dist/keys/clientKeyRecord.js +155 -20
- package/dist/keys/clientKeyRecord.js.map +1 -1
- package/dist/keys/index.d.ts +2 -2
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +1 -1
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/rosterLogStore.d.ts +16 -14
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +164 -32
- package/dist/keys/rosterLogStore.js.map +1 -1
- package/dist/keys/rosterStore.d.ts +8 -7
- package/dist/keys/rosterStore.d.ts.map +1 -1
- package/dist/keys/rosterStore.js +6 -6
- package/dist/keys/rosterStore.js.map +1 -1
- package/dist/keys/spaceEpochs.d.ts +1 -1
- package/dist/keys/spaceEpochs.js +1 -1
- package/dist/keys/userKeyRoster.d.ts +3 -3
- package/dist/keys/userKeyRoster.d.ts.map +1 -1
- package/dist/keys/userKeyRoster.js +3 -3
- package/dist/keys/userKeyRoster.js.map +1 -1
- package/dist/log.d.ts +49 -0
- package/dist/log.d.ts.map +1 -0
- package/dist/log.js +53 -0
- package/dist/log.js.map +1 -0
- package/dist/recovery/index.d.ts +2 -2
- package/dist/recovery/index.js +2 -2
- package/dist/recovery/recoveryDelegation.d.ts +6 -2
- package/dist/recovery/recoveryDelegation.d.ts.map +1 -1
- package/dist/recovery/recoveryDelegation.js +32 -6
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +67 -8
- package/dist/recovery/recoveryWebvh.d.ts.map +1 -1
- package/dist/recovery/recoveryWebvh.js +114 -19
- package/dist/recovery/recoveryWebvh.js.map +1 -1
- package/dist/request/appKey.d.ts +9 -3
- package/dist/request/appKey.d.ts.map +1 -1
- package/dist/request/appKey.js +13 -8
- package/dist/request/appKey.js.map +1 -1
- package/dist/request/capabilityRequest.d.ts +9 -1
- package/dist/request/capabilityRequest.d.ts.map +1 -1
- package/dist/request/capabilityRequest.js +13 -2
- package/dist/request/capabilityRequest.js.map +1 -1
- package/dist/request/classify.d.ts +37 -1
- package/dist/request/classify.d.ts.map +1 -1
- package/dist/request/classify.js +74 -3
- package/dist/request/classify.js.map +1 -1
- package/dist/request/ephemeralExchange.d.ts +5 -18
- package/dist/request/ephemeralExchange.d.ts.map +1 -1
- package/dist/request/ephemeralExchange.js +9 -3
- package/dist/request/ephemeralExchange.js.map +1 -1
- package/dist/request/exchangeClient.d.ts +0 -23
- package/dist/request/exchangeClient.d.ts.map +1 -1
- package/dist/request/exchangeClient.js +30 -1
- package/dist/request/exchangeClient.js.map +1 -1
- package/dist/request/index.d.ts +4 -1
- package/dist/request/index.d.ts.map +1 -1
- package/dist/request/index.js +4 -1
- package/dist/request/index.js.map +1 -1
- package/dist/request/interactionRequest.d.ts +23 -0
- package/dist/request/interactionRequest.d.ts.map +1 -0
- package/dist/request/interactionRequest.js +46 -0
- package/dist/request/interactionRequest.js.map +1 -0
- package/dist/request/interactionUrl.d.ts +3 -14
- package/dist/request/interactionUrl.d.ts.map +1 -1
- package/dist/request/interactionUrl.js +24 -3
- package/dist/request/interactionUrl.js.map +1 -1
- package/dist/request/parse.d.ts +0 -10
- package/dist/request/parse.d.ts.map +1 -1
- package/dist/request/parse.js +15 -1
- package/dist/request/parse.js.map +1 -1
- package/dist/request/processRequest.d.ts.map +1 -1
- package/dist/request/processRequest.js +2 -1
- package/dist/request/processRequest.js.map +1 -1
- package/dist/request/types.d.ts +23 -2
- package/dist/request/types.d.ts.map +1 -1
- package/dist/resourceLog/controller.d.ts +48 -49
- package/dist/resourceLog/controller.d.ts.map +1 -1
- package/dist/resourceLog/controller.js +41 -20
- package/dist/resourceLog/controller.js.map +1 -1
- package/dist/resourceLog/errors.d.ts +12 -78
- package/dist/resourceLog/errors.d.ts.map +1 -1
- package/dist/resourceLog/errors.js +12 -79
- package/dist/resourceLog/errors.js.map +1 -1
- package/dist/resourceLog/index.d.ts +17 -22
- package/dist/resourceLog/index.d.ts.map +1 -1
- package/dist/resourceLog/index.js +16 -21
- package/dist/resourceLog/index.js.map +1 -1
- package/dist/resourceLog/license.d.ts +42 -27
- package/dist/resourceLog/license.d.ts.map +1 -1
- package/dist/resourceLog/license.js +53 -30
- package/dist/resourceLog/license.js.map +1 -1
- package/dist/space/activity.d.ts +48 -1
- package/dist/space/activity.d.ts.map +1 -1
- package/dist/space/activity.js +52 -4
- package/dist/space/activity.js.map +1 -1
- package/dist/space/index.d.ts +1 -1
- package/dist/space/index.d.ts.map +1 -1
- package/dist/space/index.js +1 -1
- package/dist/space/index.js.map +1 -1
- package/dist/sync/pull.d.ts +0 -22
- package/dist/sync/pull.d.ts.map +1 -1
- package/dist/sync/pull.js +30 -2
- package/dist/sync/pull.js.map +1 -1
- package/dist/unlock/index.d.ts +7 -7
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js +6 -6
- package/dist/unlock/index.js.map +1 -1
- package/dist/unlock/retire.d.ts +29 -28
- package/dist/unlock/retire.d.ts.map +1 -1
- package/dist/unlock/retire.js +25 -16
- package/dist/unlock/retire.js.map +1 -1
- package/dist/unlock/standingClient.d.ts +1 -1
- package/dist/unlock/standingClient.js +3 -3
- package/dist/unlock/standingWebvh.d.ts +28 -10
- package/dist/unlock/standingWebvh.d.ts.map +1 -1
- package/dist/unlock/standingWebvh.js +75 -37
- package/dist/unlock/standingWebvh.js.map +1 -1
- package/dist/unlock/unlockRecord.d.ts +37 -0
- package/dist/unlock/unlockRecord.d.ts.map +1 -1
- package/dist/unlock/unlockRecord.js +54 -1
- package/dist/unlock/unlockRecord.js.map +1 -1
- package/dist/webvh/delegatedLogStore.d.ts +2 -2
- package/dist/webvh/delegatedLogStore.js +2 -2
- package/dist/webvh/didWeb.js +1 -1
- package/dist/webvh/didWeb.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts +33 -3
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +40 -11
- package/dist/webvh/didWebvh.js.map +1 -1
- package/dist/webvh/index.d.ts +1 -1
- package/dist/webvh/index.d.ts.map +1 -1
- package/dist/webvh/index.js +1 -1
- package/dist/webvh/index.js.map +1 -1
- package/dist/webvh/listClients.js +1 -1
- package/dist/webvh/listClients.js.map +1 -1
- package/dist/webvh/verifyLog.d.ts +1 -1
- package/dist/webvh/verifyLog.d.ts.map +1 -1
- package/dist/webvh/verifyLog.js +1 -2
- package/dist/webvh/verifyLog.js.map +1 -1
- package/package.json +9 -11
- package/dist/display/alignment.d.ts +0 -55
- package/dist/display/alignment.d.ts.map +0 -1
- package/dist/display/alignment.js +0 -117
- package/dist/display/alignment.js.map +0 -1
- package/dist/display/credentialName.d.ts +0 -42
- package/dist/display/credentialName.d.ts.map +0 -1
- package/dist/display/credentialName.js +0 -106
- package/dist/display/credentialName.js.map +0 -1
- package/dist/display/displayFields.d.ts +0 -59
- package/dist/display/displayFields.d.ts.map +0 -1
- package/dist/display/displayFields.js +0 -136
- package/dist/display/displayFields.js.map +0 -1
- package/dist/display/evidence.d.ts +0 -50
- package/dist/display/evidence.d.ts.map +0 -1
- package/dist/display/evidence.js +0 -67
- package/dist/display/evidence.js.map +0 -1
- package/dist/display/image.d.ts +0 -18
- package/dist/display/image.d.ts.map +0 -1
- package/dist/display/image.js +0 -23
- package/dist/display/image.js.map +0 -1
- package/dist/display/index.d.ts +0 -38
- package/dist/display/index.d.ts.map +0 -1
- package/dist/display/index.js +0 -32
- package/dist/display/index.js.map +0 -1
- package/dist/display/issuer.d.ts +0 -105
- package/dist/display/issuer.d.ts.map +0 -1
- package/dist/display/issuer.js +0 -126
- package/dist/display/issuer.js.map +0 -1
- package/dist/display/obv3.d.ts +0 -82
- package/dist/display/obv3.d.ts.map +0 -1
- package/dist/display/obv3.js +0 -117
- package/dist/display/obv3.js.map +0 -1
- package/dist/display/parse.d.ts +0 -66
- package/dist/display/parse.d.ts.map +0 -1
- package/dist/display/parse.js +0 -104
- package/dist/display/parse.js.map +0 -1
- package/dist/display/subject.d.ts +0 -79
- package/dist/display/subject.d.ts.map +0 -1
- package/dist/display/subject.js +0 -124
- package/dist/display/subject.js.map +0 -1
- package/dist/display/text.d.ts +0 -53
- package/dist/display/text.d.ts.map +0 -1
- package/dist/display/text.js +0 -78
- package/dist/display/text.js.map +0 -1
- package/dist/display/types.d.ts +0 -55
- package/dist/display/types.d.ts.map +0 -1
- package/dist/display/types.js +0 -41
- package/dist/display/types.js.map +0 -1
- package/dist/display/validity.d.ts +0 -51
- package/dist/display/validity.d.ts.map +0 -1
- package/dist/display/validity.js +0 -51
- package/dist/display/validity.js.map +0 -1
- package/dist/display/verificationView.d.ts +0 -115
- package/dist/display/verificationView.d.ts.map +0 -1
- package/dist/display/verificationView.js +0 -199
- package/dist/display/verificationView.js.map +0 -1
- package/dist/resourceLog/append.d.ts +0 -112
- package/dist/resourceLog/append.d.ts.map +0 -1
- package/dist/resourceLog/append.js +0 -197
- package/dist/resourceLog/append.js.map +0 -1
- package/dist/resourceLog/entry.d.ts +0 -68
- package/dist/resourceLog/entry.d.ts.map +0 -1
- package/dist/resourceLog/entry.js +0 -167
- package/dist/resourceLog/entry.js.map +0 -1
- package/dist/resourceLog/pin.d.ts +0 -82
- package/dist/resourceLog/pin.d.ts.map +0 -1
- package/dist/resourceLog/pin.js +0 -57
- package/dist/resourceLog/pin.js.map +0 -1
- package/dist/resourceLog/seal.d.ts +0 -97
- package/dist/resourceLog/seal.d.ts.map +0 -1
- package/dist/resourceLog/seal.js +0 -113
- package/dist/resourceLog/seal.js.map +0 -1
- package/dist/resourceLog/verify.d.ts +0 -96
- package/dist/resourceLog/verify.d.ts.map +0 -1
- package/dist/resourceLog/verify.js +0 -474
- package/dist/resourceLog/verify.js.map +0 -1
- package/dist/resourceLog/vmFragment.d.ts +0 -33
- package/dist/resourceLog/vmFragment.d.ts.map +0 -1
- package/dist/resourceLog/vmFragment.js +0 -39
- package/dist/resourceLog/vmFragment.js.map +0 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { agentsFromSeed } from '../identity/agents.js';
|
|
2
2
|
import { addUserKeyRosterRecipient, readUserKeyRoster, rosterRecipientKid, userKeyRosterLogSigner } from '../keys/userKeyRoster.js';
|
|
3
3
|
import { userKeyRosterDescriptorStore } from '../keys/rosterStore.js';
|
|
4
|
-
import { memoryResourceLogPinStore
|
|
4
|
+
import { memoryResourceLogPinStore } from '@interop/vh-resource-log';
|
|
5
|
+
import { webvhResourceLogController } from '../resourceLog/index.js';
|
|
5
6
|
import { mintClientWebvhUpdateKeys, updateKeyMultibase } from '../webvh/didWebvh.js';
|
|
6
|
-
import { verifyAccountLog } from '../webvh/verifyLog.js';
|
|
7
|
+
import { accountLogPinId, verifyAccountLog } from '../webvh/verifyLog.js';
|
|
7
8
|
import { clientSigningKeyMultibase, isWebvhDid, webvhZcapClient } from '../webvh/zcap.js';
|
|
8
|
-
import { selfEnrollWebvhClient } from './ladderAnchored.js';
|
|
9
|
+
import { assertBuiltOnHeadShape, selfEnrollWebvhClient } from './ladderAnchored.js';
|
|
9
10
|
/**
|
|
10
11
|
* Runs the whole self-enrollment described in the module doc. The caller has
|
|
11
12
|
* already unwrapped the credential's unlock record (so it holds the
|
|
@@ -26,22 +27,75 @@ import { selfEnrollWebvhClient } from './ladderAnchored.js';
|
|
|
26
27
|
* delegated `did.jsonl` PUT, built by the app around the record's bridge
|
|
27
28
|
* delegation
|
|
28
29
|
* @param [options.accountLogPinStore] {ResourceLogPinStore} this client's
|
|
29
|
-
* chain-head pin for the account log
|
|
30
|
-
*
|
|
31
|
-
*
|
|
30
|
+
* chain-head pin for the account log, checked on every read the two log
|
|
31
|
+
* entries are built on and advanced as each publishes, then checked again
|
|
32
|
+
* by the verify that follows. A fresh browser normally has none (this is
|
|
33
|
+
* its first contact), which is exactly the pin's trust-on-first-use
|
|
34
|
+
* establishment
|
|
35
|
+
* @param options.onCommitted {function}
|
|
36
|
+
* `(committed: { builtOnHead, clientSeed, webvhUpdateKeys }) =>
|
|
37
|
+
* Promise<void>` -- the REQUIRED persist-before-publish seam. The caller
|
|
38
|
+
* writes the pending client-key record there -- the `pending` codec group
|
|
39
|
+
* of `keys/clientKeyRecord.ts`, ceremony `'self-enrollment'` -- so the add
|
|
40
|
+
* entry never publishes a client this browser cannot re-derive, per the
|
|
41
|
+
* post-pivot derivability rule (`decisions/0010`). The argument carries
|
|
42
|
+
* everything that record needs beyond what the caller already holds: the
|
|
43
|
+
* key set is minted INSIDE this call, so the seeds are handed over here,
|
|
44
|
+
* while the record's `controller` and pointer DID are the caller's own
|
|
45
|
+
* `pointer`. On a resume the seeds handed back are the resumed record's own,
|
|
46
|
+
* verbatim, so re-persisting is idempotent. The ceremony's own seam
|
|
47
|
+
* ({@link selfEnrollWebvhClient}'s) takes `{ builtOnHead }` alone -- its
|
|
48
|
+
* callers hold the key set already -- and this call passes it a wrapper.
|
|
49
|
+
* The rest of the contract is the ceremony's: it runs after the
|
|
50
|
+
* reveal-and-commit entry stands and before the add entry is built, once
|
|
51
|
+
* per attempt, a throw withholds the pivot, and the idempotent completed
|
|
52
|
+
* branch never enters it. A call omitting the seam is refused with a
|
|
53
|
+
* `TypeError` before any read
|
|
54
|
+
* @param [options.resume] {object} the pending record's contents, replayed:
|
|
55
|
+
* `{ clientSeed, webvhUpdateKeys, builtOnHead }`. Supplied, the local key
|
|
56
|
+
* mint is SKIPPED and the whole enrollment key set is re-derived from the
|
|
57
|
+
* recorded seeds, so the resumed run publishes the same client the torn run
|
|
58
|
+
* was publishing, and `builtOnHead` is passed through as the ceremony's
|
|
59
|
+
* resume marker (refusing a served log that never reached that head with
|
|
60
|
+
* `BuiltOnHeadNotReachedError`). Everything downstream is unchanged: the
|
|
61
|
+
* ceremony's own revealed / committed / completed detection publishes only
|
|
62
|
+
* what is missing
|
|
32
63
|
* @returns {Promise<object>} the new client's key set (for the caller to
|
|
33
64
|
* persist under its unlock layer), its did:key, the account DID, the user
|
|
34
|
-
* key,
|
|
65
|
+
* key, the roster epoch to pin, and `committed` -- whether THIS call
|
|
66
|
+
* published the ceremony's pivot entry, propagated verbatim from
|
|
67
|
+
* {@link selfEnrollWebvhClient}. A resume that met an already-complete
|
|
68
|
+
* continuation returns `committed: false` and is a full success: the clear
|
|
69
|
+
* condition for the pending record is that the call RETURNED, never
|
|
70
|
+
* `committed === true`, or a resumed-onto-completed record would never be
|
|
71
|
+
* cleared. The member exists so a build skew that dropped it surfaces
|
|
72
|
+
* instead of reading as `false`
|
|
35
73
|
*/
|
|
36
|
-
export async function selfEnrollClientCore({ pointer, ladderSeed, credentialKeyAgreementKey, logStore, accountLogPinStore }) {
|
|
74
|
+
export async function selfEnrollClientCore({ pointer, ladderSeed, credentialKeyAgreementKey, logStore, accountLogPinStore, onCommitted, resume }) {
|
|
75
|
+
// Refused before any read, on the ceremony's own rule: without the seam the
|
|
76
|
+
// pivot entry can publish a client whose seed nothing persisted.
|
|
77
|
+
if (typeof onCommitted !== 'function') {
|
|
78
|
+
throw new TypeError('selfEnrollClientCore requires onCommitted: the pending client-key ' +
|
|
79
|
+
'record must be persisted before the add entry publishes the client.');
|
|
80
|
+
}
|
|
81
|
+
// A resume skips the mint on the strength of the recorded seeds, so its
|
|
82
|
+
// marker must be usable as the fork guard: refused here, before any read,
|
|
83
|
+
// rather than silently resuming unguarded.
|
|
84
|
+
if (resume) {
|
|
85
|
+
assertBuiltOnHeadShape({ builtOnHead: resume.builtOnHead });
|
|
86
|
+
}
|
|
37
87
|
const expectedDid = pointer.did;
|
|
38
88
|
if (!expectedDid || !isWebvhDid(expectedDid)) {
|
|
39
89
|
throw new Error('The account pointer names no did:webvh; only a promoted account can ' +
|
|
40
90
|
'self-enroll a client.');
|
|
41
91
|
}
|
|
42
92
|
// The new client's whole key set, minted locally; nothing travels but the
|
|
43
|
-
// public halves the log entries publish.
|
|
44
|
-
|
|
93
|
+
// public halves the log entries publish. A resume mints nothing: every
|
|
94
|
+
// member below is a pure derivation of the recorded seeds, so the replayed
|
|
95
|
+
// key set is the torn run's, byte for byte.
|
|
96
|
+
const clientSeed = resume
|
|
97
|
+
? resume.clientSeed
|
|
98
|
+
: crypto.getRandomValues(new Uint8Array(32));
|
|
45
99
|
const { keyAgent, keyAgreementKey } = await agentsFromSeed({
|
|
46
100
|
seed: clientSeed
|
|
47
101
|
});
|
|
@@ -50,7 +104,9 @@ export async function selfEnrollClientCore({ pointer, ladderSeed, credentialKeyA
|
|
|
50
104
|
throw new Error('The minted key-agreement key has no public multibase.');
|
|
51
105
|
}
|
|
52
106
|
const signingKeyMultibase = clientSigningKeyMultibase({ keyAgent });
|
|
53
|
-
const webvhUpdateKeys =
|
|
107
|
+
const webvhUpdateKeys = resume
|
|
108
|
+
? resume.webvhUpdateKeys
|
|
109
|
+
: await mintClientWebvhUpdateKeys();
|
|
54
110
|
const newClientKeys = {
|
|
55
111
|
signingKeyMultibase,
|
|
56
112
|
keyAgreementKeyMultibase,
|
|
@@ -61,13 +117,29 @@ export async function selfEnrollClientCore({ pointer, ladderSeed, credentialKeyA
|
|
|
61
117
|
seed: webvhUpdateKeys.stagedSeed
|
|
62
118
|
})
|
|
63
119
|
};
|
|
64
|
-
// The loud half: two log entries through the delegated bridge
|
|
65
|
-
|
|
120
|
+
// The loud half: two log entries through the delegated bridge, each built
|
|
121
|
+
// on a pinned read -- a served prefix of the log is refused before the
|
|
122
|
+
// reveal-and-commit entry lands, rather than being rebased under the new
|
|
123
|
+
// client's entries and only then caught by the verify below.
|
|
124
|
+
const enrolled = await selfEnrollWebvhClient({
|
|
66
125
|
store: logStore,
|
|
67
126
|
ladderSeed,
|
|
68
127
|
newClientKeys,
|
|
69
128
|
newClientUpdateSeeds: webvhUpdateKeys,
|
|
70
|
-
|
|
129
|
+
// The ceremony's seam hands over the head alone; the key set it publishes
|
|
130
|
+
// was minted here, so the wrapper adds it -- everything the caller's
|
|
131
|
+
// pending record needs that the caller does not already hold. On a resume
|
|
132
|
+
// these are the resumed record's own seeds, so the re-persist is a
|
|
133
|
+
// rewrite of what already stands.
|
|
134
|
+
onCommitted: async ({ builtOnHead }) => onCommitted({ builtOnHead, clientSeed, webvhUpdateKeys }),
|
|
135
|
+
...(resume ? { builtOnHead: resume.builtOnHead } : {}),
|
|
136
|
+
expectedDid,
|
|
137
|
+
...(accountLogPinStore
|
|
138
|
+
? {
|
|
139
|
+
pinStore: accountLogPinStore,
|
|
140
|
+
logId: accountLogPinId({ spaceId: pointer.spaceId })
|
|
141
|
+
}
|
|
142
|
+
: {})
|
|
71
143
|
});
|
|
72
144
|
// Verify the continuation from the world-readable log -- the same
|
|
73
145
|
// first-contact read an enrollee's completion runs, and the controller the
|
|
@@ -120,7 +192,11 @@ export async function selfEnrollClientCore({ pointer, ladderSeed, credentialKeyA
|
|
|
120
192
|
clientDid: keyAgent.id,
|
|
121
193
|
did: expectedDid,
|
|
122
194
|
userKey: read.userKey,
|
|
123
|
-
latestEpochId: read.latestEpochId
|
|
195
|
+
latestEpochId: read.latestEpochId,
|
|
196
|
+
// Propagated verbatim: whether THIS call published the pivot entry. The
|
|
197
|
+
// pending record is cleared because the call returned, not because this
|
|
198
|
+
// reads `true`.
|
|
199
|
+
committed: enrolled.committed
|
|
124
200
|
};
|
|
125
201
|
}
|
|
126
202
|
//# sourceMappingURL=selfEnroll.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selfEnroll.js","sourceRoot":"","sources":["../../src/clientAnnex/selfEnroll.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"selfEnroll.js","sourceRoot":"","sources":["../../src/clientAnnex/selfEnroll.ts"],"names":[],"mappings":"AA2CA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAA;AAGrE,OAAO,EACL,yBAAyB,EAE1B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAA;AACpE,OAAO,EACL,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,EAAE,eAAe,EAAE,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YACT,EAAE,EAAE,kBAAkB,CAAC;gBACrB,mBAAmB;gBACnB,wBAAwB;aACzB,CAAC;YACF,kBAAkB,EAAE,wBAAwB;SAC7C;QACD,oBAAoB,EAAE,yBAAyB;KAChD,CAAC,CAAA;IAEF,OAAO;QACL,UAAU;QACV,eAAe;QACf,SAAS,EAAE,QAAQ,CAAC,EAAE;QACtB,GAAG,EAAE,WAAW;QAChB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,wEAAwE;QACxE,wEAAwE;QACxE,gBAAgB;QAChB,SAAS,EAAE,QAAQ,CAAC,SAAS;KAC9B,CAAA;AACH,CAAC"}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
*/
|
|
29
29
|
import { verifyAccountLog, type EnrolledWebvhClient } from '../webvh/index.js';
|
|
30
30
|
import { type ClientLabelsStore } from '../keys/index.js';
|
|
31
|
-
import type { ResourceLogPinStore } from '
|
|
31
|
+
import type { ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
32
32
|
/**
|
|
33
33
|
* Where an account's did:webvh log is published: the account DID plus the
|
|
34
34
|
* Space and host its `id` collection is served from.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listing.d.ts","sourceRoot":"","sources":["../../src/clients/listing.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAGL,gBAAgB,EAChB,KAAK,mBAAmB,EACzB,MAAM,mBAAmB,CAAA;AAE1B,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAC3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"listing.d.ts","sourceRoot":"","sources":["../../src/clients/listing.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAGL,gBAAgB,EAChB,K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G;AACH,wBAAsB,2BAA2B,CAAC,EAChD,OAAO,EACP,WAAW,EACX,kBAAkB,EACnB,EAAE;IACD,OAAO,EAAE,iBAAiB,CAAA;IAC1B,WAAW,CAAC,EAAE,kBAAkB,CAAA;IAChC,kBAAkB,CAAC,EAAE,mBAAmB,CAAA;CACzC,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAkBvB"}
|
package/dist/clients/listing.js
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* and what invalidates it, is the caller's call.
|
|
28
28
|
*/
|
|
29
29
|
import { ladderVmIds, listEnrolledWebvhClients, verifyAccountLog } from '../webvh/index.js';
|
|
30
|
-
import { vmFragmentOf } from '
|
|
30
|
+
import { vmFragmentOf } from '@interop/vh-resource-log';
|
|
31
31
|
import { readClientLabels } from '../keys/index.js';
|
|
32
32
|
/**
|
|
33
33
|
* Lists the wallet clients enrolled on an account, from the locally verified
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listing.js","sourceRoot":"","sources":["../../src/clients/listing.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EACL,WAAW,EACX,wBAAwB,EACxB,gBAAgB,EAEjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"listing.js","sourceRoot":"","sources":["../../src/clients/listing.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EACL,WAAW,EACX,wBAAwB,EACxB,gBAAgB,EAEjB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,gBAAgB,EAA0B,MAAM,kBAAkB,CAAA;AAmC3E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CA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C,CAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAChE,CAAC,CAAC,CAAA;IACL,OAAO,IAAI,GAAG,CACZ,wBAAwB,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAC5E,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,EAChD,OAAO,EACP,WAAW,EACX,kBAAkB,EAKnB;IACC,MAAM,QAAQ,GACZ,WAAW;QACX,CAAC,MAAM,gBAAgB,CAAC;YACtB,GAAG,OAAO;YACV,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAChE,CAAC,CAAC,CAAA;IACL,MAAM,IAAI,GAAG,MAAM,yBAAyB,CAAC;QAC3C,OAAO;QACP,WAAW,EAAE,QAAQ;KACtB,CAAC,CAAA;IACF,KAAK,MAAM,EAAE,IAAI,WAAW,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC;QACpD,MAAM,SAAS,GAAG,YAAY,CAAC,EAAE,CAAC,CAAA;QAClC,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;YAC5B,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;QACrB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -79,7 +79,7 @@ export type { CascadeCollections, RosterSealReport };
|
|
|
79
79
|
* What the generation-delegation re-mint stage reports: whether an annex
|
|
80
80
|
* entry replaced the service entry's delegation on this run, and -- when the
|
|
81
81
|
* stage could not run -- why it was skipped (`no-pointer`: the account has no
|
|
82
|
-
* annex
|
|
82
|
+
* annex inventory; `no-ladder-seed`: the session holds no ladder seed to
|
|
83
83
|
* sign the annex entry with; `failed`: the closure's own best-effort
|
|
84
84
|
* catch, reported rather than thrown so the cascade's remedy stages never
|
|
85
85
|
* abort on it).
|
|
@@ -59,7 +59,7 @@ import type { IKeyAgreementKey } from '@interop/data-integrity-core';
|
|
|
59
59
|
import type { CollectionEncryption } from '@interop/was-client';
|
|
60
60
|
import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
|
|
61
61
|
import { type UserKey, type UserKeyRosterReadResult } from '../keys/index.js';
|
|
62
|
-
import type { ResourceLogPinStore } from '
|
|
62
|
+
import type { ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
63
63
|
import type { AccountLogPointer } from './listing.js';
|
|
64
64
|
/**
|
|
65
65
|
* What an adopted user key carries: the key itself, the roster epoch to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterPolicy.d.ts","sourceRoot":"","sources":["../../src/clients/rosterPolicy.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAC/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"rosterPolicy.d.ts","sourceRoot":"","sources":["../../src/clients/rosterPolicy.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACp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BAAgB,CAAA;IACvC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,kBAAkB,CAAC,EAAE,mBAAmB,CAAA;IACxC,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CAC9D,GAAG,OAAO,CAAC;IACV,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,iBAAiB,EAAE,MAAM,EAAE,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,oBAAoB,CAAA;CACjC,CAAC,CA0GD"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { convergeUserKeyRosterToDocument, isSealableDescriptorStore, readUserKeyRoster } from '../keys/index.js';
|
|
2
|
+
import { log } from '../log.js';
|
|
2
3
|
import { verifyAccountLog } from '../webvh/index.js';
|
|
3
4
|
/**
|
|
4
5
|
* Whether a thrown error is one of the roster refusals -- a fabricated or
|
|
@@ -86,8 +87,9 @@ export async function checkUserKeyRosterAtLogin({ store, userKey, clientKeyAgree
|
|
|
86
87
|
}
|
|
87
88
|
// An unreachable server (or any transport hiccup) must not lock the user
|
|
88
89
|
// out of an offline start: the cached key stays authoritative.
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
log.warn('The wrap-set roster check failed; continuing with the cached user key', {
|
|
91
|
+
err
|
|
92
|
+
});
|
|
91
93
|
return null;
|
|
92
94
|
}
|
|
93
95
|
if (!read) {
|
|
@@ -168,7 +170,9 @@ export async function convergeUserKeyRosterToAccount({ pointer, store, userKey,
|
|
|
168
170
|
if (isRosterRefusal(err)) {
|
|
169
171
|
throw err;
|
|
170
172
|
}
|
|
171
|
-
|
|
173
|
+
log.warn('Could not converge the wrap-set roster onto the account document', {
|
|
174
|
+
err
|
|
175
|
+
});
|
|
172
176
|
return unchanged;
|
|
173
177
|
}
|
|
174
178
|
// The seal backstop, on a sealable (log-governed) store: a converged
|
|
@@ -189,15 +193,14 @@ export async function convergeUserKeyRosterToAccount({ pointer, store, userKey,
|
|
|
189
193
|
if (isRosterRefusal(err)) {
|
|
190
194
|
throw err;
|
|
191
195
|
}
|
|
192
|
-
|
|
196
|
+
log.warn('Could not seal the wrap-set roster log', { err });
|
|
193
197
|
}
|
|
194
198
|
}
|
|
195
199
|
if (!rotated) {
|
|
196
200
|
return { ...unchanged, sealed };
|
|
197
201
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
'longer keys; the rotation has been completed.');
|
|
202
|
+
log.warn('The wrap-set roster still wrapped the current key to recipient(s) ' +
|
|
203
|
+
'the account document no longer keys; the rotation has been completed', { staleRecipientCount: staleRecipientIds.length });
|
|
201
204
|
// Rotated: the fresh key is only readable from the roster, so re-read it
|
|
202
205
|
// and adopt it before the collection fan-out runs against it. A failure
|
|
203
206
|
// here cannot resolve to the unchanged input -- the roster HAS moved.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterPolicy.js","sourceRoot":"","sources":["../../src/clients/rosterPolicy.ts"],"names":[],"mappings":"AA4DA,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,iBAAiB,EAGlB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAapD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,SAAS,eAAe,CAAC,GAAY;IACnC,MAAM,IAAI,GAAI,GAAiC,EAAE,IAAI,CAAA;IACrD,IAAI,IAAI,KAAK,4BAA4B,EAAE,CAAC;QAC1C,OAAQ,GAA4B,CAAC,MAAM,KAAK,UAAU,CAAA;IAC5D,CAAC;IACD,OAAO,CACL,IAAI,KAAK,2BAA2B;QACpC,IAAI,KAAK,8BAA8B;QACvC,IAAI,KAAK,6BAA6B;QACtC,IAAI,KAAK,0BAA0B,CACpC,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAC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AO,EAAE,CAAC;QACb,OAAO,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,CAAA;IACjC,CAAC;IACD,GAAG,CAAC,IAAI,CACN,oEAAoE;QAClE,sEAAsE,EACxE,EAAE,mBAAmB,EAAE,iBAAiB,CAAC,MAAM,EAAE,CAClD,CAAA;IAED,yEAAyE;IACzE,wEAAwE;IACxE,sEAAsE;IACtE,IAAI,IAAoC,CAAA;IACxC,IAAI,CAAC;QACH,IAAI,GAAG,MAAM,iBAAiB,CAAC;YAC7B,KAAK;YACL,OAAO;YACP,qBAAqB;YACrB,aAAa;SACd,CAAC,CAAA;IACJ,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,eAAe,CAAC,GAAG,CAAC,EAAE,CAAC;YACzB,MAAM,GAAG,CAAA;QACX,CAAC;QACD,MAAM,IAAI,KAAK,CACb,iEAAiE;YAC/D,mEAAmE;YACnE,kBAAkB,EACpB,EAAE,KAAK,EAAE,GAAG,EAAE,CACf,CAAA;IACH,CAAC;IACD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,MAAM,IAAI,KAAK,CACb,iEAAiE;YAC/D,oEAAoE;YACpE,MAAM,CACT,CAAA;IACH,CAAC;IACD,MAAM,gBAAgB,EAAE,CAAC;QACvB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,UAAU,EAAE,IAAI,CAAC,UAAU;KAC5B,CAAC,CAAA;IACF,OAAO;QACL,OAAO,EAAE,IAAI;QACb,MAAM;QACN,iBAAiB;QACjB,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,UAAU,EAAE,IAAI,CAAC,UAAU;KAC5B,CAAA;AACH,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* (`ResourceLogContinuityError`) -- EXCEPT continuity reason `rollback`,
|
|
6
6
|
* which is reconcilable divergence (possibly replication lag): the pin is
|
|
7
7
|
* never regressed and nothing rolled-back is adopted, so serving the cached
|
|
8
|
-
* copy in the meantime is exactly the offline
|
|
8
|
+
* copy in the meantime is exactly the offline case. Matched on `err.name`
|
|
9
9
|
* rather than `instanceof`, which keeps this file dependency-light and
|
|
10
10
|
* survives a linked or duplicated copy of the package.
|
|
11
11
|
*
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
* handed out as a descriptor.
|
|
15
15
|
*/
|
|
16
16
|
import type { CollectionEncryption } from '@interop/was-client';
|
|
17
|
-
import { type ResourceLogStore } from '@interop/
|
|
18
|
-
import { type ResourceLogController, type ResourceLogPinStore, type VerifiedResourceLog } from '../resourceLog/index.js';
|
|
17
|
+
import { type ResourceLogController, type ResourceLogPinStore, type ResourceLogStore, type VerifiedResourceLog } from '@interop/vh-resource-log';
|
|
19
18
|
import type { EncryptionDescriptorSource } from './acquire.js';
|
|
20
19
|
/**
|
|
21
20
|
* The state-document schema identifier an encryption descriptor carries in a
|
|
@@ -29,7 +28,9 @@ export declare const EPOCH_CONFIGURATION_STATE_TYPE = "WasEpochConfiguration";
|
|
|
29
28
|
* (chain, proofs, external authorization, and the chain-head pin, via
|
|
30
29
|
* `readResourceLog`), and refuses a verified head whose state is not a
|
|
31
30
|
* `WasEpochConfiguration` rather than handing it out as a descriptor.
|
|
32
|
-
* Resolves `null` for an absent log (the pre-genesis state)
|
|
31
|
+
* Resolves `null` for an absent log (the pre-genesis state) only while no pin
|
|
32
|
+
* is held for it; under a held pin an absent log is refused as a `rollback`,
|
|
33
|
+
* the library's rule. Both governed
|
|
33
34
|
* descriptor consumers -- the log-governed descriptor source below and the
|
|
34
35
|
* roster's log-governed descriptor store -- read through this helper, so a
|
|
35
36
|
* hardening applied here reaches every trusted descriptor read.
|
|
@@ -59,7 +60,8 @@ export declare function readGovernedEpochConfiguration({ store, resolveControlle
|
|
|
59
60
|
* Builds the {@link EncryptionDescriptorSource} over per-collection resource
|
|
60
61
|
* logs. An absent log resolves `undefined` exactly like an absent
|
|
61
62
|
* Collection Description `encryption` member (a plaintext collection, or one
|
|
62
|
-
* whose provisioning has not landed)
|
|
63
|
+
* whose provisioning has not landed), unless a pin is held for it, in which
|
|
64
|
+
* case the read refuses as a `rollback`; verification failures throw through --
|
|
63
65
|
* {@link acquireDescriptor} rethrows the refusal classes rather than falling
|
|
64
66
|
* back to the cache.
|
|
65
67
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logSource.d.ts","sourceRoot":"","sources":["../../src/descriptors/logSource.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"logSource.d.ts","sourceRoot":"","sources":["../../src/descriptors/logSource.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAE/D,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACzB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAA;AAE9D;;;GAGG;AACH,eAAO,MAAM,8BAA8B,0BAA0B,CAAA;AAErE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,8BAA8B,CAAC,EACnD,KAAK,EACL,iBAAiB,EACjB,QAAQ,EACR,KAAK,EACN,EAAE;IACD,KAAK,EAAE,gBAAgB,CAAA;IACvB,iBAAiB,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAAA;IACvD,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,KAAK,EAAE,MAAM,CAAA;CACd,GAAG,OAAO,CAAC;IACV,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,UAAU,EAAE,oBAAoB,CAAA;IAChC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,IAAI,CAAC,CAwBR;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACT,EAAE;IACD,MAAM,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,gBAAgB,CAAA;IAClD,iBAAiB,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAAA;IACvD,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,CAAA;CAC3C,GAAG,0BAA0B,CAe7B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RESOURCE_LOG_METHOD } from '@interop/
|
|
2
|
-
import { readResourceLog, ResourceLogIntegrityError } from '
|
|
1
|
+
import { RESOURCE_LOG_METHOD } from '@interop/storage-core';
|
|
2
|
+
import { readResourceLog, ResourceLogIntegrityError } from '@interop/vh-resource-log';
|
|
3
3
|
/**
|
|
4
4
|
* The state-document schema identifier an encryption descriptor carries in a
|
|
5
5
|
* governed log entry, per WAS-EC.
|
|
@@ -12,7 +12,9 @@ export const EPOCH_CONFIGURATION_STATE_TYPE = 'WasEpochConfiguration';
|
|
|
12
12
|
* (chain, proofs, external authorization, and the chain-head pin, via
|
|
13
13
|
* `readResourceLog`), and refuses a verified head whose state is not a
|
|
14
14
|
* `WasEpochConfiguration` rather than handing it out as a descriptor.
|
|
15
|
-
* Resolves `null` for an absent log (the pre-genesis state)
|
|
15
|
+
* Resolves `null` for an absent log (the pre-genesis state) only while no pin
|
|
16
|
+
* is held for it; under a held pin an absent log is refused as a `rollback`,
|
|
17
|
+
* the library's rule. Both governed
|
|
16
18
|
* descriptor consumers -- the log-governed descriptor source below and the
|
|
17
19
|
* roster's log-governed descriptor store -- read through this helper, so a
|
|
18
20
|
* hardening applied here reaches every trusted descriptor read.
|
|
@@ -55,7 +57,8 @@ export async function readGovernedEpochConfiguration({ store, resolveController,
|
|
|
55
57
|
* Builds the {@link EncryptionDescriptorSource} over per-collection resource
|
|
56
58
|
* logs. An absent log resolves `undefined` exactly like an absent
|
|
57
59
|
* Collection Description `encryption` member (a plaintext collection, or one
|
|
58
|
-
* whose provisioning has not landed)
|
|
60
|
+
* whose provisioning has not landed), unless a pin is held for it, in which
|
|
61
|
+
* case the read refuses as a `rollback`; verification failures throw through --
|
|
59
62
|
* {@link acquireDescriptor} rethrows the refusal classes rather than falling
|
|
60
63
|
* back to the cache.
|
|
61
64
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logSource.js","sourceRoot":"","sources":["../../src/descriptors/logSource.ts"],"names":[],"mappings":"AAgBA,OAAO,
|
|
1
|
+
{"version":3,"file":"logSource.js","sourceRoot":"","sources":["../../src/descriptors/logSource.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EACL,eAAe,EACf,yBAAyB,EAK1B,MAAM,0BAA0B,CAAA;AAGjC;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,uBAAuB,CAAA;AAErE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAAC,EACnD,KAAK,EACL,iBAAiB,EACjB,QAAQ,EACR,KAAK,EAMN;IAKC,MAAM,UAAU,GAAG,MAAM,iBAAiB,EAAE,CAAA;IAC5C,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC;QACpC,KAAK;QACL,UAAU;QACV,cAAc,EAAE,mBAAmB;QACnC,QAAQ;QACR,KAAK;KACN,CAAC,CAAA;IACF,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,OAAO,IAAI,CAAA;IACb,CAAC;IACD,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAA;IACpC,IAAI,KAAK,CAAC,IAAI,KAAK,8BAA8B,EAAE,CAAC;QAClD,MAAM,IAAI,yBAAyB,CACjC,oDAAoD;YAClD,IAAI,KAAK,CAAC,IAAI,WAAW,8BAA8B,IAAI,CAC9D,CAAA;IACH,CAAC;IACD,OAAO;QACL,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,UAAU,EAAE,KAA6B;QACzC,IAAI,EAAE,OAAO,CAAC,IAAI;KACnB,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,2BAA2B,CAAC,EAC1C,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EAMT;IACC,OAAO;QACL,KAAK,CAAC,oBAAoB,CAAC,EAAE,YAAY,EAAE;YACzC,MAAM,OAAO,GAAG,MAAM,8BAA8B,CAAC;gBACnD,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC;gBAC3B,iBAAiB;gBACjB,QAAQ;gBACR,KAAK,EAAE,QAAQ,CAAC,YAAY,CAAC;aAC9B,CAAC,CAAA;YACF,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;gBACrB,OAAO,SAAS,CAAA;YAClB,CAAC;YACD,OAAO,OAAO,CAAC,UAAU,CAAA;QAC3B,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
import type { IKeyAgreementKey } from '@interop/data-integrity-core';
|
|
31
31
|
import type { EncryptionDescriptorStore } from '@interop/was-client/edv';
|
|
32
32
|
import type { ClientWebvhUpdateKeys, WebvhEnrollmentKeys, WebvhIdStore } from '../webvh/didWebvh.js';
|
|
33
|
-
import { type ResourceLogPinStore } from '
|
|
33
|
+
import { type ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
34
34
|
import type { UserKey } from '../keys/userKey.js';
|
|
35
35
|
import type { AccountPointer } from '../keyring/record.js';
|
|
36
36
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enrollment.d.ts","sourceRoot":"","sources":["../../src/enrollment/enrollment.ts"],"names":[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BAAkB,CAAC,EAAE,mBAAmB,CAAA;CACzC,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,CAyEvD"}
|
|
@@ -7,7 +7,8 @@ import { AccountLogMissingError, verifyAccountLog } from '../webvh/verifyLog.js'
|
|
|
7
7
|
import { addUserKeyRosterRecipient } from '../keys/userKeyRoster.js';
|
|
8
8
|
import { readUserKeyRoster, rosterRecipientKid, userKeyRosterLogSigner } from '../keys/userKeyRoster.js';
|
|
9
9
|
import { userKeyRosterDescriptorStore } from '../keys/rosterStore.js';
|
|
10
|
-
import { memoryResourceLogPinStore
|
|
10
|
+
import { memoryResourceLogPinStore } from '@interop/vh-resource-log';
|
|
11
|
+
import { webvhResourceLogController } from '../resourceLog/index.js';
|
|
11
12
|
import { CONNECT_CODE_PREFIX } from './connectCode.js';
|
|
12
13
|
/**
|
|
13
14
|
* The connect-code payload version this build mints and accepts.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enrollment.js","sourceRoot":"","sources":["../../src/enrollment/enrollment.ts"],"names":[],"mappings":"AA+BA,OAAO,EACL,cAAc,EACd,aAAa,EACd,MAAM,wCAAwC,CAAA;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EACzB,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAM7B,OAAO,EACL,yBAAyB,EACzB,UAAU,EACV,eAAe,EAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAA;AACpE,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,0B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{ EncryptionDescriptorStore } from '@interop/was-client/edv';
|
|
|
3
3
|
import type { IKeyAgreementKey } from '@interop/data-integrity-core';
|
|
4
4
|
import { type ClientWebvhUpdateKeys, type DidWebKeyMapV2, type ICapabilityAgent, type WebvhIdStore } from '../webvh/index.js';
|
|
5
5
|
import { type UserKey, type WalletSpaceEpochsResult } from '../keys/index.js';
|
|
6
|
-
import type { ResourceLogPinStore } from '
|
|
6
|
+
import type { ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
7
7
|
/**
|
|
8
8
|
* The complete key set a brand-new account mints locally before anything
|
|
9
9
|
* touches the network: the data Space id, this founding client's identity
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accountGenesis.d.ts","sourceRoot":"","sources":["../../src/genesis/accountGenesis.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAGpE,OAAO,EAIL,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,uBAAuB,EAC7B,MAAM,kBAAkB,CAAA;AACzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"accountGenesis.d.ts","sourceRoot":"","sources":["../../src/genesis/accountGenesis.ts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC1E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAA;AACxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAGpE,OAAO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AC,SAAS,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9D,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAiGhC"}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* an unlock-layer concern, not an account-genesis one.
|
|
20
20
|
*
|
|
21
21
|
* Every stage detects its own completion from durable state alone (the
|
|
22
|
-
* cascade/sweep
|
|
22
|
+
* cascade/sweep pattern): the Space provisioning and the epoch install are
|
|
23
23
|
* create-if-absent and adopt what an earlier provisioner landed, the
|
|
24
24
|
* did:webvh genesis probes `did.jsonl` and adopts a log its seeds still
|
|
25
25
|
* authorize, the roster genesis returns an existing roster untouched, and
|
package/dist/index.d.ts
CHANGED
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
* handling (classification and parsing, QueryByExample matching, cryptosuite
|
|
15
15
|
* negotiation, VP composition, the VC-API exchange client, and VCALM
|
|
16
16
|
* `interaction:` URL handling).
|
|
17
|
-
* - `@interop/wallet-core/display` -- pure VC derivation / display helpers and
|
|
18
|
-
* credential input parsing (raw values out; formatting stays in the UI).
|
|
19
17
|
* - `@interop/wallet-core/webvh` -- the account's did:webvh identity: the
|
|
20
18
|
* hosted DID log, its per-client update-key rotation, the client enrollment
|
|
21
19
|
* entries, and ZCap signing under the did:webvh verification-method id.
|
|
@@ -31,12 +29,19 @@
|
|
|
31
29
|
* - `@interop/wallet-core/recovery` -- recovery codes on the roster identity
|
|
32
30
|
* model: a code as a minimal always-enrolled wallet client.
|
|
33
31
|
*
|
|
32
|
+
* The root also exports the logging port: `setLogger` and the `Logger`
|
|
33
|
+
* type (`src/log.ts`), the seam an app wires once at bootstrap so this
|
|
34
|
+
* package's internal `console` fallback is replaced with a real logger
|
|
35
|
+
* (the sibling logging package's `createLogger`, for one).
|
|
36
|
+
*
|
|
34
37
|
* This root re-exports `sync` and `space` for convenience. `identity`,
|
|
35
|
-
* `request`, `
|
|
38
|
+
* `request`, `webvh`, `keys`, `descriptors`, `keyring`,
|
|
36
39
|
* `enrollment`, and `recovery` are deliberately NOT re-exported here, so
|
|
37
40
|
* plaintext consumers of the root never pull the signing / KMS /
|
|
38
41
|
* document-loader dependency graph (the was-client subpath-isolation pattern).
|
|
39
42
|
*/
|
|
40
43
|
export * from './sync/index.js';
|
|
41
44
|
export * from './space/index.js';
|
|
45
|
+
export { setLogger } from './log.js';
|
|
46
|
+
export type { Logger } from './log.js';
|
|
42
47
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AACpC,YAAY,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -14,8 +14,6 @@
|
|
|
14
14
|
* handling (classification and parsing, QueryByExample matching, cryptosuite
|
|
15
15
|
* negotiation, VP composition, the VC-API exchange client, and VCALM
|
|
16
16
|
* `interaction:` URL handling).
|
|
17
|
-
* - `@interop/wallet-core/display` -- pure VC derivation / display helpers and
|
|
18
|
-
* credential input parsing (raw values out; formatting stays in the UI).
|
|
19
17
|
* - `@interop/wallet-core/webvh` -- the account's did:webvh identity: the
|
|
20
18
|
* hosted DID log, its per-client update-key rotation, the client enrollment
|
|
21
19
|
* entries, and ZCap signing under the did:webvh verification-method id.
|
|
@@ -31,12 +29,18 @@
|
|
|
31
29
|
* - `@interop/wallet-core/recovery` -- recovery codes on the roster identity
|
|
32
30
|
* model: a code as a minimal always-enrolled wallet client.
|
|
33
31
|
*
|
|
32
|
+
* The root also exports the logging port: `setLogger` and the `Logger`
|
|
33
|
+
* type (`src/log.ts`), the seam an app wires once at bootstrap so this
|
|
34
|
+
* package's internal `console` fallback is replaced with a real logger
|
|
35
|
+
* (the sibling logging package's `createLogger`, for one).
|
|
36
|
+
*
|
|
34
37
|
* This root re-exports `sync` and `space` for convenience. `identity`,
|
|
35
|
-
* `request`, `
|
|
38
|
+
* `request`, `webvh`, `keys`, `descriptors`, `keyring`,
|
|
36
39
|
* `enrollment`, and `recovery` are deliberately NOT re-exported here, so
|
|
37
40
|
* plaintext consumers of the root never pull the signing / KMS /
|
|
38
41
|
* document-loader dependency graph (the was-client subpath-isolation pattern).
|
|
39
42
|
*/
|
|
40
43
|
export * from './sync/index.js';
|
|
41
44
|
export * from './space/index.js';
|
|
45
|
+
export { setLogger } from './log.js';
|
|
42
46
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA"}
|