@interop/wallet-core 0.50.0 → 0.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -11
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts +17 -8
- package/dist/clientAnnex/credentialAnchoredGenesis.d.ts.map +1 -1
- package/dist/clientAnnex/credentialAnchoredGenesis.js +33 -12
- package/dist/clientAnnex/credentialAnchoredGenesis.js.map +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 +65 -28
- package/dist/clientAnnex/forgetLast.d.ts.map +1 -1
- package/dist/clientAnnex/forgetLast.js +78 -18
- 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 +36 -7
- package/dist/clientAnnex/ladderAnchored.d.ts.map +1 -1
- package/dist/clientAnnex/ladderAnchored.js +80 -18
- 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 +7 -7
- package/dist/clientAnnex/recoveryLadderAnchored.js +9 -9
- package/dist/clientAnnex/recoveryLadderAnchored.js.map +1 -1
- package/dist/clientAnnex/selfEnroll.d.ts +6 -4
- package/dist/clientAnnex/selfEnroll.d.ts.map +1 -1
- package/dist/clientAnnex/selfEnroll.js +19 -7
- 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/descriptors/acquire.js +1 -1
- package/dist/descriptors/logSource.d.ts +1 -2
- package/dist/descriptors/logSource.d.ts.map +1 -1
- package/dist/descriptors/logSource.js +2 -2
- 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 +13 -1
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/genesis/accountGenesis.js +1 -1
- package/dist/genesis/accountGenesis.js.map +1 -1
- package/dist/index.d.ts +1 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -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/rosterLogStore.d.ts +16 -14
- package/dist/keys/rosterLogStore.d.ts.map +1 -1
- package/dist/keys/rosterLogStore.js +149 -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/recovery/index.d.ts +2 -2
- package/dist/recovery/index.js +2 -2
- package/dist/recovery/recoveryDelegation.js +1 -1
- package/dist/recovery/recoveryDelegation.js.map +1 -1
- package/dist/recovery/recoveryWebvh.d.ts +4 -4
- package/dist/recovery/recoveryWebvh.js +5 -5
- 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/classify.d.ts.map +1 -1
- package/dist/request/classify.js +13 -1
- package/dist/request/classify.js.map +1 -1
- package/dist/request/ephemeralExchange.d.ts +6 -1
- package/dist/request/ephemeralExchange.d.ts.map +1 -1
- package/dist/request/ephemeralExchange.js +6 -1
- 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 +20 -1
- package/dist/request/interactionUrl.js.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 +40 -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 +27 -26
- package/dist/resourceLog/license.d.ts.map +1 -1
- package/dist/resourceLog/license.js +31 -30
- package/dist/resourceLog/license.js.map +1 -1
- package/dist/unlock/index.d.ts +6 -6
- package/dist/unlock/index.d.ts.map +1 -1
- package/dist/unlock/index.js +5 -5
- 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.js +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 +3 -3
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +5 -5
- package/dist/webvh/didWebvh.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 +6 -10
- 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,5 +1,6 @@
|
|
|
1
1
|
import type { DIDDoc, DIDLog, VerificationMethod } from '@interop/did-method-webvh';
|
|
2
2
|
import type { ClientWebvhUpdateKeys, PublishedWebvhLog, WebvhIdStore } from '../webvh/didWebvh.js';
|
|
3
|
+
import type { ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
3
4
|
/**
|
|
4
5
|
* The narrow store seam the self-enrolling and delegated-bridge ceremonies
|
|
5
6
|
* write through: a public read of the log and the delegated `did.jsonl` PUT.
|
|
@@ -20,7 +21,7 @@ export type UnlockKeyAgreementPublication = {
|
|
|
20
21
|
commitment: string;
|
|
21
22
|
};
|
|
22
23
|
/**
|
|
23
|
-
* A standing credential's public
|
|
24
|
+
* A standing credential's public inventory as the document and log carry it:
|
|
24
25
|
* its key-agreement publication and the update key whose hash stands in
|
|
25
26
|
* `nextKeyHashes` (ladder rung 0 at bind time; a code's single derived key).
|
|
26
27
|
*/
|
|
@@ -70,18 +71,26 @@ export declare function unlockKeyVerificationMethod({ did, keyAgreement }: {
|
|
|
70
71
|
* @param options.store {UnlockLogStore}
|
|
71
72
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
72
73
|
* to, where the caller holds one
|
|
74
|
+
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
75
|
+
* pins; a served log that is a rollback, a fork, or an identity switch
|
|
76
|
+
* against the pinned head is refused (`ResourceLogContinuityError`)
|
|
77
|
+
* @param [options.logId] {string} the account log's pin slot
|
|
78
|
+
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
79
|
+
* supplied
|
|
73
80
|
* @returns {Promise<PublishedWebvhLog>}
|
|
74
81
|
*/
|
|
75
|
-
export declare function readLogOrThrow({ store, expectedDid }: {
|
|
82
|
+
export declare function readLogOrThrow({ store, expectedDid, pinStore, logId }: {
|
|
76
83
|
store: UnlockLogStore;
|
|
77
84
|
expectedDid?: string;
|
|
85
|
+
pinStore?: ResourceLogPinStore;
|
|
86
|
+
logId?: string;
|
|
78
87
|
}): Promise<PublishedWebvhLog>;
|
|
79
88
|
/**
|
|
80
89
|
* BIND (run by an enrolled client, root authority): publishes a standing
|
|
81
|
-
* credential's split
|
|
90
|
+
* credential's split configuration into the document -- one entry adding the
|
|
82
91
|
* credential's `keyAgreement` entry (verbatim or commitment) and committing
|
|
83
92
|
* its current update key's hash in `nextKeyHashes`. The update key joins
|
|
84
|
-
* `updateKeys` nowhere. Idempotent:
|
|
93
|
+
* `updateKeys` nowhere. Idempotent: an inventory already published is a no-op,
|
|
85
94
|
* so re-running a torn bind converges. The entry publishes conditionally on
|
|
86
95
|
* the log this call read; a race lost to a concurrent ceremony re-runs and
|
|
87
96
|
* rebases on the new head.
|
|
@@ -91,14 +100,14 @@ export declare function readLogOrThrow({ store, expectedDid }: {
|
|
|
91
100
|
* @param options.updateKeys {ClientWebvhUpdateKeys} the BINDING client's own
|
|
92
101
|
* did:webvh update-key seeds
|
|
93
102
|
* @param options.unlockKeys {StandingUnlockKeys} the credential's public
|
|
94
|
-
*
|
|
103
|
+
* inventory
|
|
95
104
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
96
105
|
* to, from the caller's stored account pointer
|
|
97
106
|
* @param [options.verb] {string} what the caller is doing, for the
|
|
98
107
|
* pending-rotation refusal message (e.g. `'issuing a recovery code'`)
|
|
99
108
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the account
|
|
100
109
|
* DID and the document and log as this call leaves them (unchanged when the
|
|
101
|
-
*
|
|
110
|
+
* inventory was already settled), which is what the caller's roster-side half
|
|
102
111
|
* converges onto
|
|
103
112
|
*/
|
|
104
113
|
export declare function publishUnlockKey(options: {
|
|
@@ -114,7 +123,7 @@ export declare function publishUnlockKey(options: {
|
|
|
114
123
|
}>;
|
|
115
124
|
/**
|
|
116
125
|
* REMOVAL (run by an enrolled client, root authority): removes a standing
|
|
117
|
-
* credential's
|
|
126
|
+
* credential's inventory from the document -- its `keyAgreement` entry and
|
|
118
127
|
* everything of its ladder that still stands -- in one entry. Idempotent. The
|
|
119
128
|
* roster-side half (rotating the user key epoch off the credential's wrap) is
|
|
120
129
|
* the caller's, and runs after this so the resolver's document no longer
|
|
@@ -123,18 +132,27 @@ export declare function publishUnlockKey(options: {
|
|
|
123
132
|
* The recorded `unlockKeys.updateKeyMultibase` is treated as an ANCHOR, not
|
|
124
133
|
* as truth: a credential that has self-enrolled since its bind advanced its
|
|
125
134
|
* standing commitment past the recorded rung, so the removal resolves the
|
|
126
|
-
* ladder's current
|
|
127
|
-
* ({@link
|
|
135
|
+
* ladder's current inventory from the log itself
|
|
136
|
+
* ({@link attributeLadderInventory}) and strikes all of it -- every committed
|
|
128
137
|
* hash the ladder accounts for AND, for a torn self-enrollment, the revealed
|
|
129
138
|
* rung key still sitting in `updateKeys` (plus the never-claimed hashes its
|
|
130
139
|
* reveal entry committed). Trusting the recorded multibase alone would leave
|
|
131
140
|
* the live rung commitment standing: a latent re-seizure credential via the
|
|
132
141
|
* reveal mechanism. A supplied `ladderSeed` strengthens the attribution (every
|
|
133
142
|
* rung known a priori, independent of the anchor's staleness); without it the
|
|
134
|
-
* log walk alone resolves the
|
|
143
|
+
* log walk alone resolves the inventory. For a single-key credential (a
|
|
135
144
|
* recovery code, a never-self-enrolled bind) the resolution degenerates to
|
|
136
145
|
* exactly the recorded key's hash, as before.
|
|
137
146
|
*
|
|
147
|
+
* The seed also names the credential's LADDER VM -- the stable sibling a
|
|
148
|
+
* last-client forget's install entry publishes under `assertionMethod` and
|
|
149
|
+
* `capabilityDelegation`, left standing by a forget torn after that entry --
|
|
150
|
+
* and the removal strikes it in the same entry, so a retired seed no longer
|
|
151
|
+
* signs governed-log appends or account delegations. The sibling is derived
|
|
152
|
+
* from the seed alone, with nothing in the log attributing it to a ladder, so
|
|
153
|
+
* a removal without the seed leaves it: rotation is the remedy for a leaked
|
|
154
|
+
* seed exactly when the ceremony holds the credential.
|
|
155
|
+
*
|
|
138
156
|
* @param options {object} see {@link publishUnlockKey}, plus
|
|
139
157
|
* `[ladderSeed]` -- the retired credential's ladder seed, when in hand
|
|
140
158
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} see
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standingWebvh.d.ts","sourceRoot":"","sources":["../../src/unlock/standingWebvh.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAalC,OAAO,KAAK,EACV,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,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAY7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE;IAC9C,OAAO,EAAE,YAAY,CAAA;IACrB,UAAU,EAAE,qBAAqB,CAAA;IACjC,UAAU,EAAE,kBAAkB,CAAA;IAC9B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAIrD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE;IAC7C,OAAO,EAAE,YAAY,CAAA;IACrB,UAAU,EAAE,qBAAqB,CAAA;IACjC,UAAU,EAAE,kBAAkB,CAAA;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAIrD"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
* The did:webvh
|
|
6
|
-
* split
|
|
5
|
+
* The did:webvh INVENTORY half of the standing unlock-credential lifecycle: the
|
|
6
|
+
* split configuration every unlock method holds under the standing model, as one
|
|
7
7
|
* merged add/remove document edit.
|
|
8
8
|
*
|
|
9
9
|
* At bind time the document gains the credential's `keyAgreement` entry --
|
|
@@ -22,16 +22,18 @@
|
|
|
22
22
|
* The ceremonies that EXERCISE a credential's ladder against the account log
|
|
23
23
|
* -- the ladder-anchored genesis, the self-enrolling continuation, the
|
|
24
24
|
* one-entry forget -- live in `clientAnnex/ladderAnchored.ts`. What stays
|
|
25
|
-
* here is the verify-side half every wallet needs regardless of
|
|
25
|
+
* here is the verify-side half every wallet needs regardless of account configuration.
|
|
26
26
|
*/
|
|
27
27
|
import { deriveNextKeyHash, updateDID } from '@interop/did-method-webvh';
|
|
28
|
-
import { assertCarryOverCommitments,
|
|
28
|
+
import { assertCarryOverCommitments, MULTIKEY_COMMITMENT_VM_TYPE, MULTIKEY_VM_TYPE, publishUpdatedLog, readPublishedLog, relationIds, updateKeyMultibase, updateKeySigner, withLogConflictRetry } from '../webvh/didWebvh.js';
|
|
29
|
+
import { ladderVmIds } from '../webvh/listClients.js';
|
|
29
30
|
// The one deliberate base-side dependency on the annex subpath, pinned as an
|
|
30
31
|
// exception in the lint rule: `removeUnlockKey` resolves the retired
|
|
31
|
-
// credential's CURRENT ladder
|
|
32
|
+
// credential's CURRENT ladder inventory from the log itself (the shared
|
|
32
33
|
// attribution helpers in `clientAnnex/ladder.ts`), never touching the annex
|
|
33
|
-
// log machinery
|
|
34
|
-
|
|
34
|
+
// log machinery, and derives the credential's ladder VM id from a supplied
|
|
35
|
+
// seed so the removal strikes that too.
|
|
36
|
+
import { attributeLadderInventory, ladderVmKeyMultibase } from '../clientAnnex/ladder.js';
|
|
35
37
|
/**
|
|
36
38
|
* The verification-method id a credential's key-agreement entry publishes
|
|
37
39
|
* under: `<did>#<multibase>` for a verbatim key (indistinguishable by id from
|
|
@@ -89,13 +91,21 @@ export function unlockKeyVerificationMethod({ did, keyAgreement }) {
|
|
|
89
91
|
* @param options.store {UnlockLogStore}
|
|
90
92
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
91
93
|
* to, where the caller holds one
|
|
94
|
+
* @param [options.pinStore] {ResourceLogPinStore} the caller's chain-head
|
|
95
|
+
* pins; a served log that is a rollback, a fork, or an identity switch
|
|
96
|
+
* against the pinned head is refused (`ResourceLogContinuityError`)
|
|
97
|
+
* @param [options.logId] {string} the account log's pin slot
|
|
98
|
+
* (`accountLogPinId({ spaceId })`); required whenever a `pinStore` is
|
|
99
|
+
* supplied
|
|
92
100
|
* @returns {Promise<PublishedWebvhLog>}
|
|
93
101
|
*/
|
|
94
|
-
export async function readLogOrThrow({ store, expectedDid }) {
|
|
102
|
+
export async function readLogOrThrow({ store, expectedDid, pinStore, logId }) {
|
|
95
103
|
// readPublishedLog only calls getIdResourceRaw, so the narrow seam is safe.
|
|
96
104
|
const published = await readPublishedLog({
|
|
97
105
|
idStore: store,
|
|
98
|
-
...(expectedDid !== undefined ? { expectedDid } : {})
|
|
106
|
+
...(expectedDid !== undefined ? { expectedDid } : {}),
|
|
107
|
+
...(pinStore ? { pinStore } : {}),
|
|
108
|
+
...(logId !== undefined ? { logId } : {})
|
|
99
109
|
});
|
|
100
110
|
if (!published) {
|
|
101
111
|
throw new Error('did:webvh: did.jsonl is missing; nothing to enroll into.');
|
|
@@ -104,10 +114,10 @@ export async function readLogOrThrow({ store, expectedDid }) {
|
|
|
104
114
|
}
|
|
105
115
|
/**
|
|
106
116
|
* BIND (run by an enrolled client, root authority): publishes a standing
|
|
107
|
-
* credential's split
|
|
117
|
+
* credential's split configuration into the document -- one entry adding the
|
|
108
118
|
* credential's `keyAgreement` entry (verbatim or commitment) and committing
|
|
109
119
|
* its current update key's hash in `nextKeyHashes`. The update key joins
|
|
110
|
-
* `updateKeys` nowhere. Idempotent:
|
|
120
|
+
* `updateKeys` nowhere. Idempotent: an inventory already published is a no-op,
|
|
111
121
|
* so re-running a torn bind converges. The entry publishes conditionally on
|
|
112
122
|
* the log this call read; a race lost to a concurrent ceremony re-runs and
|
|
113
123
|
* rebases on the new head.
|
|
@@ -117,22 +127,22 @@ export async function readLogOrThrow({ store, expectedDid }) {
|
|
|
117
127
|
* @param options.updateKeys {ClientWebvhUpdateKeys} the BINDING client's own
|
|
118
128
|
* did:webvh update-key seeds
|
|
119
129
|
* @param options.unlockKeys {StandingUnlockKeys} the credential's public
|
|
120
|
-
*
|
|
130
|
+
* inventory
|
|
121
131
|
* @param [options.expectedDid] {string} the account DID the log must resolve
|
|
122
132
|
* to, from the caller's stored account pointer
|
|
123
133
|
* @param [options.verb] {string} what the caller is doing, for the
|
|
124
134
|
* pending-rotation refusal message (e.g. `'issuing a recovery code'`)
|
|
125
135
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} the account
|
|
126
136
|
* DID and the document and log as this call leaves them (unchanged when the
|
|
127
|
-
*
|
|
137
|
+
* inventory was already settled), which is what the caller's roster-side half
|
|
128
138
|
* converges onto
|
|
129
139
|
*/
|
|
130
140
|
export async function publishUnlockKey(options) {
|
|
131
|
-
return withLogConflictRetry(() =>
|
|
141
|
+
return withLogConflictRetry(() => setUnlockKeyInventoryOnce({ ...options, polarity: 'publish' }));
|
|
132
142
|
}
|
|
133
143
|
/**
|
|
134
144
|
* REMOVAL (run by an enrolled client, root authority): removes a standing
|
|
135
|
-
* credential's
|
|
145
|
+
* credential's inventory from the document -- its `keyAgreement` entry and
|
|
136
146
|
* everything of its ladder that still stands -- in one entry. Idempotent. The
|
|
137
147
|
* roster-side half (rotating the user key epoch off the credential's wrap) is
|
|
138
148
|
* the caller's, and runs after this so the resolver's document no longer
|
|
@@ -141,28 +151,37 @@ export async function publishUnlockKey(options) {
|
|
|
141
151
|
* The recorded `unlockKeys.updateKeyMultibase` is treated as an ANCHOR, not
|
|
142
152
|
* as truth: a credential that has self-enrolled since its bind advanced its
|
|
143
153
|
* standing commitment past the recorded rung, so the removal resolves the
|
|
144
|
-
* ladder's current
|
|
145
|
-
* ({@link
|
|
154
|
+
* ladder's current inventory from the log itself
|
|
155
|
+
* ({@link attributeLadderInventory}) and strikes all of it -- every committed
|
|
146
156
|
* hash the ladder accounts for AND, for a torn self-enrollment, the revealed
|
|
147
157
|
* rung key still sitting in `updateKeys` (plus the never-claimed hashes its
|
|
148
158
|
* reveal entry committed). Trusting the recorded multibase alone would leave
|
|
149
159
|
* the live rung commitment standing: a latent re-seizure credential via the
|
|
150
160
|
* reveal mechanism. A supplied `ladderSeed` strengthens the attribution (every
|
|
151
161
|
* rung known a priori, independent of the anchor's staleness); without it the
|
|
152
|
-
* log walk alone resolves the
|
|
162
|
+
* log walk alone resolves the inventory. For a single-key credential (a
|
|
153
163
|
* recovery code, a never-self-enrolled bind) the resolution degenerates to
|
|
154
164
|
* exactly the recorded key's hash, as before.
|
|
155
165
|
*
|
|
166
|
+
* The seed also names the credential's LADDER VM -- the stable sibling a
|
|
167
|
+
* last-client forget's install entry publishes under `assertionMethod` and
|
|
168
|
+
* `capabilityDelegation`, left standing by a forget torn after that entry --
|
|
169
|
+
* and the removal strikes it in the same entry, so a retired seed no longer
|
|
170
|
+
* signs governed-log appends or account delegations. The sibling is derived
|
|
171
|
+
* from the seed alone, with nothing in the log attributing it to a ladder, so
|
|
172
|
+
* a removal without the seed leaves it: rotation is the remedy for a leaked
|
|
173
|
+
* seed exactly when the ceremony holds the credential.
|
|
174
|
+
*
|
|
156
175
|
* @param options {object} see {@link publishUnlockKey}, plus
|
|
157
176
|
* `[ladderSeed]` -- the retired credential's ladder seed, when in hand
|
|
158
177
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>} see
|
|
159
178
|
* {@link publishUnlockKey}
|
|
160
179
|
*/
|
|
161
180
|
export async function removeUnlockKey(options) {
|
|
162
|
-
return withLogConflictRetry(() =>
|
|
181
|
+
return withLogConflictRetry(() => setUnlockKeyInventoryOnce({ ...options, polarity: 'remove' }));
|
|
163
182
|
}
|
|
164
183
|
/**
|
|
165
|
-
* One attempt of the merged
|
|
184
|
+
* One attempt of the merged inventory edit, re-invoked by the conflict retry.
|
|
166
185
|
* The publish and remove polarities are one function because the entry they
|
|
167
186
|
* build is the same edit with the set operations inverted -- a divergence
|
|
168
187
|
* between two copies would be published into an append-only log.
|
|
@@ -170,7 +189,7 @@ export async function removeUnlockKey(options) {
|
|
|
170
189
|
* @param options {object} see {@link publishUnlockKey}, plus `polarity`
|
|
171
190
|
* @returns {Promise<{ did: string, doc: DIDDoc, log: DIDLog }>}
|
|
172
191
|
*/
|
|
173
|
-
async function
|
|
192
|
+
async function setUnlockKeyInventoryOnce({ idStore, updateKeys, unlockKeys, ladderSeed, expectedDid, verb, polarity }) {
|
|
174
193
|
const published = await readLogOrThrow({
|
|
175
194
|
store: idStore,
|
|
176
195
|
...(expectedDid !== undefined ? { expectedDid } : {})
|
|
@@ -179,26 +198,40 @@ async function setUnlockKeyPostureOnce({ idStore, updateKeys, unlockKeys, ladder
|
|
|
179
198
|
const keyHash = await deriveNextKeyHash(unlockKeys.updateKeyMultibase);
|
|
180
199
|
const vmId = unlockKeyVmId({ did, keyAgreement: unlockKeys.keyAgreement });
|
|
181
200
|
const vmPresent = (doc.verificationMethod ?? []).some(method => method.id === vmId);
|
|
182
|
-
// The remove polarity strikes the ladder's CURRENT
|
|
201
|
+
// The remove polarity strikes the ladder's CURRENT inventory, resolved from
|
|
183
202
|
// the log with the recorded key as anchor -- never just the recorded key's
|
|
184
203
|
// hash, which a self-enrollment since the bind leaves stale (see
|
|
185
204
|
// {@link removeUnlockKey}). The credential's own verification-method id
|
|
186
205
|
// goes along: it is what tells the walk a climb from a spend, so the
|
|
187
206
|
// removal never annexes the commitment a spend handed to its replacement.
|
|
188
|
-
const
|
|
189
|
-
? await
|
|
207
|
+
const inventory = polarity === 'remove'
|
|
208
|
+
? await attributeLadderInventory({
|
|
190
209
|
log: published.log,
|
|
191
210
|
anchorKeyMultibase: unlockKeys.updateKeyMultibase,
|
|
192
211
|
credentialVmId: vmId,
|
|
193
212
|
...(ladderSeed ? { ladderSeed } : {})
|
|
194
213
|
})
|
|
195
214
|
: { revealedKeys: [], committedHashes: [] };
|
|
196
|
-
const removedHashes = new Set(
|
|
197
|
-
const removedKeys = new Set(
|
|
215
|
+
const removedHashes = new Set(inventory.committedHashes);
|
|
216
|
+
const removedKeys = new Set(inventory.revealedKeys);
|
|
217
|
+
// The credential's ladder VM, where one stands: the stable sibling a
|
|
218
|
+
// last-client forget's install entry publishes, which stays behind when
|
|
219
|
+
// that forget is torn after its first entry. It is derived from the ladder
|
|
220
|
+
// seed and nothing else, so ownership is attributable only with the seed in
|
|
221
|
+
// hand; a removal without it leaves the sibling standing (see
|
|
222
|
+
// {@link removeUnlockKey}).
|
|
223
|
+
const ladderVmId = polarity === 'remove' && ladderSeed
|
|
224
|
+
? `${did}#${await ladderVmKeyMultibase({ ladderSeed })}`
|
|
225
|
+
: undefined;
|
|
226
|
+
const ladderVmPresent = ladderVmId !== undefined && ladderVmIds({ doc }).includes(ladderVmId);
|
|
227
|
+
const struckIds = new Set([vmId, ...(ladderVmPresent ? [ladderVmId] : [])]);
|
|
198
228
|
const hashCommitted = published.nextKeyHashes.includes(keyHash);
|
|
199
229
|
const settled = polarity === 'publish'
|
|
200
230
|
? vmPresent && hashCommitted
|
|
201
|
-
: !vmPresent &&
|
|
231
|
+
: !vmPresent &&
|
|
232
|
+
!ladderVmPresent &&
|
|
233
|
+
removedHashes.size === 0 &&
|
|
234
|
+
removedKeys.size === 0;
|
|
202
235
|
if (settled) {
|
|
203
236
|
return { did, doc, log: published.log };
|
|
204
237
|
}
|
|
@@ -229,26 +262,31 @@ async function setUnlockKeyPostureOnce({ idStore, updateKeys, unlockKeys, ladder
|
|
|
229
262
|
keyAgreement: unlockKeys.keyAgreement
|
|
230
263
|
})
|
|
231
264
|
]
|
|
232
|
-
: existingMethods.filter(method => method.id
|
|
265
|
+
: existingMethods.filter(method => method.id === undefined || !struckIds.has(method.id));
|
|
266
|
+
// On the remove polarity every relation drops the struck ids: the
|
|
267
|
+
// credential's entry sits under `keyAgreement` alone and the ladder VM under
|
|
268
|
+
// `assertionMethod` and `capabilityDelegation` alone, so one filter serves
|
|
269
|
+
// all five without restating either placement here.
|
|
270
|
+
const relation = (ids) => polarity === 'publish'
|
|
271
|
+
? relationIds(ids)
|
|
272
|
+
: relationIds(ids).filter(id => !struckIds.has(id));
|
|
233
273
|
const keyAgreement = polarity === 'publish'
|
|
234
274
|
? [...new Set([...relationIds(doc.keyAgreement), vmId])]
|
|
235
|
-
:
|
|
275
|
+
: relation(doc.keyAgreement);
|
|
236
276
|
const updated = await updateDID({
|
|
237
277
|
log: published.log,
|
|
238
278
|
signer,
|
|
239
279
|
alsoKnownAsWeb: true,
|
|
240
|
-
//
|
|
241
|
-
//
|
|
242
|
-
// is deduplicated, so a document already carrying it is unchanged.
|
|
243
|
-
additionalContext: [BYOE_CONTEXT_URL],
|
|
280
|
+
// The byoe context that defines a commitment entry's terms is installed
|
|
281
|
+
// at genesis and carried forward by every update, so no edit re-appends it.
|
|
244
282
|
updateKeys: statedUpdateKeys,
|
|
245
283
|
nextKeyHashes,
|
|
246
284
|
verificationMethods,
|
|
247
|
-
authentication:
|
|
248
|
-
assertionMethod:
|
|
285
|
+
authentication: relation(doc.authentication),
|
|
286
|
+
assertionMethod: relation(doc.assertionMethod),
|
|
249
287
|
keyAgreement,
|
|
250
|
-
capabilityInvocation:
|
|
251
|
-
capabilityDelegation:
|
|
288
|
+
capabilityInvocation: relation(doc.capabilityInvocation),
|
|
289
|
+
capabilityDelegation: relation(doc.capabilityDelegation)
|
|
252
290
|
});
|
|
253
291
|
await publishUpdatedLog({ idStore, updated, ifMatch: published.etag });
|
|
254
292
|
return { did: updated.did, doc: updated.doc, log: updated.log };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standingWebvh.js","sourceRoot":"","sources":["../../src/unlock/standingWebvh.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAMxE,OAAO,EACL,0BAA0B,EAC1B,
|
|
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OAAO,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAA;AACjE,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/**
|
|
5
5
|
* The unlock record codec for credentials with standing authority: the
|
|
6
6
|
* envelope stored as the one resource of a credential's unlock Space, for
|
|
7
|
-
* every unlock method in the standing
|
|
7
|
+
* every unlock method in the standing configuration -- a passphrase, a passkey PRF
|
|
8
8
|
* output, or a recovery code. Its frame is the ordinary keyring record's
|
|
9
9
|
* (`{ version, encryption, wrapped, proof }`), extended with three
|
|
10
10
|
* record-kind members the proof also covers:
|
|
@@ -38,9 +38,9 @@ export type DelegatedWebvhLogStore = Pick<WebvhIdStore, 'getIdResourceRaw' | 'pu
|
|
|
38
38
|
* Builds a delegated log store over one collection of one Space.
|
|
39
39
|
*
|
|
40
40
|
* Reads: with `publicRead` the GET is an unauthenticated fetch of the
|
|
41
|
-
* world-readable resource (the account
|
|
41
|
+
* world-readable resource (the account-log case -- the bridge delegation
|
|
42
42
|
* allows PUT only); without it the GET invokes the same delegation (the
|
|
43
|
-
* annex
|
|
43
|
+
* annex inventory -- the collection is capability-gated and the sibling
|
|
44
44
|
* delegation allows GET and PUT). Either way a 404 reads as "not published"
|
|
45
45
|
* and the response's ETag rides back as the compare-and-swap token.
|
|
46
46
|
*
|
|
@@ -14,9 +14,9 @@ function statusOf(err) {
|
|
|
14
14
|
* Builds a delegated log store over one collection of one Space.
|
|
15
15
|
*
|
|
16
16
|
* Reads: with `publicRead` the GET is an unauthenticated fetch of the
|
|
17
|
-
* world-readable resource (the account
|
|
17
|
+
* world-readable resource (the account-log case -- the bridge delegation
|
|
18
18
|
* allows PUT only); without it the GET invokes the same delegation (the
|
|
19
|
-
* annex
|
|
19
|
+
* annex inventory -- the collection is capability-gated and the sibling
|
|
20
20
|
* delegation allows GET and PUT). Either way a 404 reads as "not published"
|
|
21
21
|
* and the response's ETag rides back as the compare-and-swap token.
|
|
22
22
|
*
|
package/dist/webvh/didWeb.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* verification-method id already carries the key's `publicKeyMultibase` and no
|
|
10
10
|
* separate key-description fetch is ever needed.
|
|
11
11
|
*/
|
|
12
|
-
import { vmFragmentOf } from '
|
|
12
|
+
import { vmFragmentOf } from '@interop/vh-resource-log';
|
|
13
13
|
/**
|
|
14
14
|
* The bare `publicKeyMultibase` a KMS key alias or verification-method id
|
|
15
15
|
* carries in its fragment. The KMS expanded `#{publicKeyMultibase}` at generate
|
package/dist/webvh/didWeb.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"didWeb.js","sourceRoot":"","sources":["../../src/webvh/didWeb.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;GAOG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"didWeb.js","sourceRoot":"","sources":["../../src/webvh/didWeb.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;GAOG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AA2BvD;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,WAAW,CAAC,EAAU;IACpC,OAAO,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,CAAA;AAC/B,CAAC"}
|
package/dist/webvh/didWebvh.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DIDDoc, DIDLog, Signer, VerificationMethod } from '@interop/did-method-webvh';
|
|
2
2
|
import type { KeystoreAgent } from '@interop/webkms-client';
|
|
3
|
-
import type
|
|
3
|
+
import { type ResourceLogHeadPin, type ResourceLogPinStore } from '@interop/vh-resource-log';
|
|
4
4
|
import type { DidWebKeyMap } from './didWeb.js';
|
|
5
5
|
/**
|
|
6
6
|
* The Space-side seam this module reads and writes through: the world-readable
|
|
@@ -363,7 +363,7 @@ export declare function genesisNextKeyHashes({ activeKeyMultibase, stagedKeyMult
|
|
|
363
363
|
* clients, anchored on the minting credential's ladder alone. The document is the ladder-anchored
|
|
364
364
|
* assembly's ({@link assembleWebvhVerificationMethods}): the ladder VM under
|
|
365
365
|
* `assertionMethod` and `capabilityDelegation` only, the credential's
|
|
366
|
-
* key-agreement
|
|
366
|
+
* key-agreement entry as the sole `keyAgreement` member (folded into
|
|
367
367
|
* genesis -- no enrolled client exists to run the separate bind entry), and
|
|
368
368
|
* nothing invocable.
|
|
369
369
|
*
|
|
@@ -383,7 +383,7 @@ export declare function genesisNextKeyHashes({ activeKeyMultibase, stagedKeyMult
|
|
|
383
383
|
* @param options.spaceId {string}
|
|
384
384
|
* @param options.ladderVmKeyMultibase {string} the credential's ladder VM
|
|
385
385
|
* @param options.credentialKeyAgreementMethod {VerificationMethod} the
|
|
386
|
-
* credential's
|
|
386
|
+
* credential's key-agreement entry (commitment or verbatim), built over the
|
|
387
387
|
* `{SCID}` controller template ({@link didWebvhControllerTemplate})
|
|
388
388
|
* @param options.updateKeyPublicKeyMultibase {string} ladder rung 0's key
|
|
389
389
|
* @param options.nextKeyHashes {string[]} [hash(rung 0), hash(rung 1)]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"didWebvh.d.ts","sourceRoot":"","sources":["../../src/webvh/didWebvh.ts"],"names":[],"mappings":"AA4EA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAUlC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"didWebvh.d.ts","sourceRoot":"","sources":["../../src/webvh/didWebvh.ts"],"names":[],"mappings":"AA4EA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAUlC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAU3D,OAAO,EAEL,KAAK,kBAAkB,EACvB,K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AAE,iBAAiB,CAAA;CAC7B,GAAG,OAAO,CAAC,IAAI,CAAC,CAUhB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAoB,SAAQ,eAAe;IAC1D,kBAAkB,EAAE,MAAM,CAAA;IAC1B,wBAAwB,EAAE,MAAM,CAAA;CACjC;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,KAAK,CAAC,MAAM,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,GACpD,MAAM,EAAE,CASV;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,OAAO,EAAE,YAAY,CAAA;IACrB,UAAU,EAAE,qBAAqB,CAAA;IACjC,SAAS,EAAE,mBAAmB,CAAA;CAC/B,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAE3B;AAqJD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAsB,iBAAiB,CAAC,EACtC,aAAa,EACb,OAAO,EACP,WAAW,EACX,QAAQ,EACR,KAAK,EACN,EAAE;IACD,aAAa,EAAE,aAAa,CAAA;IAC5B,OAAO,EAAE,YAAY,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,mBAAmB,CAAA;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,GAAG,OAAO,CAAC,cAAc,CAAC,CA6F1B"}
|
package/dist/webvh/didWebvh.js
CHANGED
|
@@ -72,7 +72,7 @@ import { sha256 } from '@noble/hashes/sha2.js';
|
|
|
72
72
|
import { base58, base64urlnopad } from '@scure/base';
|
|
73
73
|
import { VOCAB_CONTEXT_URL } from 'byoe-context';
|
|
74
74
|
import { DID_DOCUMENT_RESOURCE, DID_LOG_RESOURCE, ID_COLLECTION } from '../space/collections.js';
|
|
75
|
-
import { ResourceLogContinuityError } from '
|
|
75
|
+
import { ResourceLogContinuityError } from '@interop/vh-resource-log';
|
|
76
76
|
import { multibaseOf } from './didWeb.js';
|
|
77
77
|
import { accountLogPinId, checkAccountLogContinuity } from './verifyLog.js';
|
|
78
78
|
/**
|
|
@@ -451,7 +451,7 @@ export async function updateKeySigner({ seed }) {
|
|
|
451
451
|
* the document a credential-anchored genesis publishes -- an account with zero
|
|
452
452
|
* enrolled durable clients: the credential's ladder VM under
|
|
453
453
|
* `assertionMethod` and `capabilityDelegation` only, its key-agreement
|
|
454
|
-
*
|
|
454
|
+
* entry (prebuilt by the unlock layer, commitment or verbatim) as the
|
|
455
455
|
* sole `keyAgreement` member, and `authentication` and `capabilityInvocation`
|
|
456
456
|
* empty. No KMS key either -- the keystore is provisioned by the first
|
|
457
457
|
* enrolled client, and a ladder-anchored document must list nothing invocable.
|
|
@@ -465,7 +465,7 @@ export async function updateKeySigner({ seed }) {
|
|
|
465
465
|
* @param [options.ladderVm] {object} the ladder-anchored variant's inputs
|
|
466
466
|
* @param [options.ladderVm.keyMultibase] {string} the credential's ladder VM
|
|
467
467
|
* @param [options.ladderVm.credentialKeyAgreementMethod] {VerificationMethod}
|
|
468
|
-
* the credential's
|
|
468
|
+
* the credential's inventory entry, built over the same `{SCID}` template
|
|
469
469
|
* @returns {object} `verificationMethods` + relationship arrays for createDID
|
|
470
470
|
*/
|
|
471
471
|
function assembleWebvhVerificationMethods({ controllerTemplate, didWebKeys, clientKeys, ladderVm }) {
|
|
@@ -626,7 +626,7 @@ export async function genesisNextKeyHashes({ activeKeyMultibase, stagedKeyMultib
|
|
|
626
626
|
* clients, anchored on the minting credential's ladder alone. The document is the ladder-anchored
|
|
627
627
|
* assembly's ({@link assembleWebvhVerificationMethods}): the ladder VM under
|
|
628
628
|
* `assertionMethod` and `capabilityDelegation` only, the credential's
|
|
629
|
-
* key-agreement
|
|
629
|
+
* key-agreement entry as the sole `keyAgreement` member (folded into
|
|
630
630
|
* genesis -- no enrolled client exists to run the separate bind entry), and
|
|
631
631
|
* nothing invocable.
|
|
632
632
|
*
|
|
@@ -646,7 +646,7 @@ export async function genesisNextKeyHashes({ activeKeyMultibase, stagedKeyMultib
|
|
|
646
646
|
* @param options.spaceId {string}
|
|
647
647
|
* @param options.ladderVmKeyMultibase {string} the credential's ladder VM
|
|
648
648
|
* @param options.credentialKeyAgreementMethod {VerificationMethod} the
|
|
649
|
-
* credential's
|
|
649
|
+
* credential's key-agreement entry (commitment or verbatim), built over the
|
|
650
650
|
* `{SCID}` controller template ({@link didWebvhControllerTemplate})
|
|
651
651
|
* @param options.updateKeyPublicKeyMultibase {string} ladder rung 0's key
|
|
652
652
|
* @param options.nextKeyHashes {string[]} [hash(rung 0), hash(rung 1)]
|