@interop/wallet-core 0.72.0 → 0.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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/zcap.d.ts.map +1 -1
- package/dist/clientAnnex/zcap.js +3 -10
- package/dist/clientAnnex/zcap.js.map +1 -1
- package/dist/genesis/accountGenesis.d.ts +1 -1
- package/dist/genesis/accountGenesis.d.ts.map +1 -1
- package/dist/keyring/index.d.ts +8 -5
- package/dist/keyring/index.d.ts.map +1 -1
- package/dist/keyring/index.js +8 -5
- package/dist/keyring/index.js.map +1 -1
- package/dist/keyring/record.d.ts +15 -0
- package/dist/keyring/record.d.ts.map +1 -1
- package/dist/keyring/record.js +22 -0
- package/dist/keyring/record.js.map +1 -1
- package/dist/keys/clientKeyRecord.d.ts +3 -4
- package/dist/keys/clientKeyRecord.d.ts.map +1 -1
- package/dist/keys/clientKeyRecord.js +6 -25
- package/dist/keys/clientKeyRecord.js.map +1 -1
- package/dist/keys/collectionLogStore.d.ts +99 -1
- package/dist/keys/collectionLogStore.d.ts.map +1 -1
- package/dist/keys/collectionLogStore.js +96 -0
- package/dist/keys/collectionLogStore.js.map +1 -1
- package/dist/keys/index.d.ts +16 -2
- package/dist/keys/index.d.ts.map +1 -1
- package/dist/keys/index.js +15 -2
- package/dist/keys/index.js.map +1 -1
- package/dist/keys/userKey.d.ts +57 -11
- package/dist/keys/userKey.d.ts.map +1 -1
- package/dist/keys/userKey.js +76 -11
- package/dist/keys/userKey.js.map +1 -1
- package/dist/keys/userKeyRoster.d.ts +3 -3
- package/dist/menders/vocabulary.d.ts +6 -4
- package/dist/menders/vocabulary.d.ts.map +1 -1
- package/dist/menders/vocabulary.js +6 -3
- package/dist/menders/vocabulary.js.map +1 -1
- package/dist/webvh/didWebvh.d.ts.map +1 -1
- package/dist/webvh/didWebvh.js +2 -7
- 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/verifyLog.d.ts +34 -0
- package/dist/webvh/verifyLog.d.ts.map +1 -1
- package/dist/webvh/verifyLog.js +39 -0
- package/dist/webvh/verifyLog.js.map +1 -1
- package/package.json +8 -8
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { WasClient } from '@interop/was-client';
|
|
1
2
|
import { resourceLogStore } from '@interop/was-client/log';
|
|
2
3
|
import { collectionDescriptorLogPinId } from '../descriptors/logSource.js';
|
|
4
|
+
import { accountControllerResolver } from '../webvh/verifyLog.js';
|
|
3
5
|
import { logGovernedDescriptorStore } from './rosterLogStore.js';
|
|
4
6
|
/**
|
|
5
7
|
* Builds the log-governed, sealable descriptor store over one collection's
|
|
@@ -57,4 +59,98 @@ export function collectionDescriptorLogStore({ collection, resolveController, pi
|
|
|
57
59
|
logClass: 'collection-descriptor'
|
|
58
60
|
});
|
|
59
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Builds the per-collection store lookup from a collection reach and a
|
|
64
|
+
* controller resolver, both functions: the generic builder a caller with a
|
|
65
|
+
* live session wires with its own verified-log memo and a collection handle
|
|
66
|
+
* that rides whatever capability the session holds at call time (a transient
|
|
67
|
+
* visit's generation delegation, renewed mid-run included).
|
|
68
|
+
*
|
|
69
|
+
* Each lookup builds a fresh store over {@link collectionDescriptorLogStore}
|
|
70
|
+
* for the collection named, sharing the resolver, the pin store, and the
|
|
71
|
+
* signer across them; nothing is reached until the first lookup, so a lookup
|
|
72
|
+
* handed to a ceremony that never installs or rotates an epoch costs nothing.
|
|
73
|
+
*
|
|
74
|
+
* @param options {object}
|
|
75
|
+
* @param options.collectionFor {function} `(collectionId) => Collection` --
|
|
76
|
+
* how the caller reaches a collection handle (a `Space` handle's
|
|
77
|
+
* `collection()`, or a wrapper that rides a capability the caller renews)
|
|
78
|
+
* @param options.resolveController {function}
|
|
79
|
+
* `() => Promise<WebvhResourceLogController>` -- the caller's currently
|
|
80
|
+
* verified controller view, resolved per operation
|
|
81
|
+
* @param options.pinStore {ResourceLogPinStore} this client's chain-head
|
|
82
|
+
* pins, keyed per log
|
|
83
|
+
* @param options.signer {ResourceLogSigner} the signing key every store's
|
|
84
|
+
* appends are proved by; it must be listed under `assertionMethod` in the
|
|
85
|
+
* account document at the version each append anchors at
|
|
86
|
+
* @returns {CollectionStoreFor}
|
|
87
|
+
*/
|
|
88
|
+
export function collectionDescriptorStores({ collectionFor, resolveController, pinStore, signer }) {
|
|
89
|
+
return collectionId => collectionDescriptorLogStore({
|
|
90
|
+
collection: collectionFor(collectionId),
|
|
91
|
+
resolveController,
|
|
92
|
+
pinStore,
|
|
93
|
+
signer
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Builds the per-collection store lookup from bare parts, for callers with
|
|
98
|
+
* no session: the geneses, the mend, the recovery continuations, and a
|
|
99
|
+
* wallet whose every caller acts on its account with a signing client and a
|
|
100
|
+
* pin store. The parameter shape is {@link userKeyRosterDescriptorStore}'s,
|
|
101
|
+
* plus the account DID and the optional account log, so the roster store and
|
|
102
|
+
* its per-collection twin are built from the same parts.
|
|
103
|
+
*
|
|
104
|
+
* The controller view is {@link accountControllerResolver}'s, built here
|
|
105
|
+
* over the same parts, so a fan-out over every collection verifies the
|
|
106
|
+
* account log once. A caller that also builds the roster store and wants one
|
|
107
|
+
* verification for the pair builds that resolver itself and hands it to
|
|
108
|
+
* both {@link userKeyRosterDescriptorStore} and
|
|
109
|
+
* {@link collectionDescriptorStores}. Nothing is reached until the first
|
|
110
|
+
* lookup, so a lookup handed to a ceremony that never installs or rotates an
|
|
111
|
+
* epoch costs nothing.
|
|
112
|
+
*
|
|
113
|
+
* @param options {object}
|
|
114
|
+
* @param options.storageServerUrl {string} the storage server the account
|
|
115
|
+
* lives on
|
|
116
|
+
* @param options.zcapClient {ZcapClient} the signing client every request
|
|
117
|
+
* rides
|
|
118
|
+
* @param options.spaceId {string} the data Space id
|
|
119
|
+
* @param options.did {string} the account's did:webvh, the controller
|
|
120
|
+
* every collection log's entry proofs anchor to
|
|
121
|
+
* @param options.pinStore {ResourceLogPinStore} this client's chain-head
|
|
122
|
+
* pins, for the collection logs and for the account log's own slot when
|
|
123
|
+
* it is verified here
|
|
124
|
+
* @param options.signer {ResourceLogSigner} the signing key every store's
|
|
125
|
+
* appends are proved by ({@link userKeyRosterLogSigner} for an enrolled
|
|
126
|
+
* client, a standing credential's ladder VM on a credential-anchored
|
|
127
|
+
* account)
|
|
128
|
+
* @param [options.log] {DIDLog} the account log this run already stands on
|
|
129
|
+
* (a ceremony that just read or published it); given, no fetch runs
|
|
130
|
+
* @param [options.capability] {IZcap} an invocation capability every
|
|
131
|
+
* request rides (a transient visit's generation delegation); absent,
|
|
132
|
+
* requests invoke the root capability
|
|
133
|
+
* @returns {CollectionStoreFor}
|
|
134
|
+
*/
|
|
135
|
+
export function accountCollectionStores({ storageServerUrl, zcapClient, spaceId, did, pinStore, signer, log, capability }) {
|
|
136
|
+
let space;
|
|
137
|
+
return collectionDescriptorStores({
|
|
138
|
+
collectionFor: collectionId => {
|
|
139
|
+
space ??= new WasClient({
|
|
140
|
+
serverUrl: storageServerUrl,
|
|
141
|
+
zcapClient
|
|
142
|
+
}).space(spaceId, { capability });
|
|
143
|
+
return space.collection(collectionId);
|
|
144
|
+
},
|
|
145
|
+
resolveController: accountControllerResolver({
|
|
146
|
+
did,
|
|
147
|
+
spaceId,
|
|
148
|
+
host: storageServerUrl,
|
|
149
|
+
pinStore,
|
|
150
|
+
log
|
|
151
|
+
}),
|
|
152
|
+
pinStore,
|
|
153
|
+
signer
|
|
154
|
+
});
|
|
155
|
+
}
|
|
60
156
|
//# sourceMappingURL=collectionLogStore.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectionLogStore.js","sourceRoot":"","sources":["../../src/keys/collectionLogStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"collectionLogStore.js","sourceRoot":"","sources":["../../src/keys/collectionLogStore.ts"],"names":[],"mappings":"AA6BA,OAAO,EACL,SAAS,EAIV,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAK1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAE1E,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,EACL,0BAA0B,EAE3B,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,MAAM,UAAU,4BAA4B,CAAC,EAC3C,UAAU,EACV,iBAAiB,EACjB,QAAQ,EACR,MAAM,EAMP;IACC,OAAO,0BAA0B,CAAC;QAChC,GAAG,EAAE,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC;QACrC,iBAAiB;QACjB,QAAQ;QACR,KAAK,EAAE,4BAA4B,CAAC;YAClC,OAAO,EAAE,UAAU,CAAC,OAAO;YAC3B,YAAY,EAAE,UAAU,CAAC,EAAE;SAC5B,CAAC;QACF,MAAM;QACN,QAAQ,EAAE,uBAAuB;KAClC,CAAC,CAAA;AACJ,CAAC;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,0BAA0B,CAAC,EACzC,aAAa,EACb,iBAAiB,EACjB,QAAQ,EACR,MAAM,EAMP;IACC,OAAO,YAAY,CAAC,EAAE,CACpB,4BAA4B,CAAC;QAC3B,UAAU,EAAE,aAAa,CAAC,YAAY,CAAC;QACvC,iBAAiB;QACjB,QAAQ;QACR,MAAM;KACP,CAAC,CAAA;AACN,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAM,UAAU,uBAAuB,CAAC,EACtC,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,GAAG,EACH,QAAQ,EACR,MAAM,EACN,GAAG,EACH,UAAU,EAUX;IACC,IAAI,KAAwB,CAAA;IAC5B,OAAO,0BAA0B,CAAC;QAChC,aAAa,EAAE,YAAY,CAAC,EAAE;YAC5B,KAAK,KAAK,IAAI,SAAS,CAAC;gBACtB,SAAS,EAAE,gBAAgB;gBAC3B,UAAU;aACX,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,CAAC,CAAA;YACjC,OAAO,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAA;QACvC,CAAC;QACD,iBAAiB,EAAE,yBAAyB,CAAC;YAC3C,GAAG;YACH,OAAO;YACP,IAAI,EAAE,gBAAgB;YACtB,QAAQ;YACR,GAAG;SACJ,CAAC;QACF,QAAQ;QACR,MAAM;KACP,CAAC,CAAA;AACJ,CAAC"}
|
package/dist/keys/index.d.ts
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
* - `mintUserKey` / `userKeyVaultKeys` -- minting the account's user key and
|
|
10
10
|
* rebuilding the
|
|
11
11
|
* vault key-agreement key + resolver from stored material.
|
|
12
|
+
* - `userKeySigningSeed` / `userKeyRecordSigner` /
|
|
13
|
+
* `userKeySigningKeyMultibase` / `USER_KEY_SALT` -- the user key's Ed25519
|
|
14
|
+
* signing half, derived from its X25519 secret rather than stored, and the
|
|
15
|
+
* record signer and verification allowlist an app-side record sealed to the
|
|
16
|
+
* vault KAK signs and checks its proof with.
|
|
12
17
|
* - `encodeClientKeyRecord` / `decodeClientKeyRecord` -- the contents codec and
|
|
13
18
|
* strict validation of the local client-key record each client keeps its own
|
|
14
19
|
* key material in (storage and wrapping stay app-side).
|
|
@@ -39,6 +44,14 @@
|
|
|
39
44
|
* Those two builders are the subpath's whole store surface. Each states its
|
|
40
45
|
* log class at construction, and the generic wrapper under them takes a
|
|
41
46
|
* caller-chosen class and log id, so it stays module-internal.
|
|
47
|
+
* - `collectionDescriptorStores` / `accountCollectionStores` -- the
|
|
48
|
+
* `(collectionId) => store` lookup (`CollectionStoreFor`) the epoch
|
|
49
|
+
* installers, the geneses' `collectionStoreFor`, and the cascade take,
|
|
50
|
+
* over `collectionDescriptorLogStore`. The generic one takes the collection
|
|
51
|
+
* reach and the controller resolver as functions (a session's handle and
|
|
52
|
+
* verified-log memo); the account one takes the roster store's bare parts
|
|
53
|
+
* plus the account DID, builds the Space handle on the first lookup, and
|
|
54
|
+
* resolves the controller through `webvh`'s `accountControllerResolver`.
|
|
42
55
|
* - `rosterRecipientKid` -- the one builder of a client's roster kid, shared by
|
|
43
56
|
* the enrollment wrap and the roster read. A retiring rotation names no kid:
|
|
44
57
|
* it converges onto the account document instead.
|
|
@@ -82,7 +95,7 @@
|
|
|
82
95
|
* `WalletSpaceProvisioningError` when a collection was left without its
|
|
83
96
|
* epoch so the engine never memoizes a torn run.
|
|
84
97
|
*/
|
|
85
|
-
export { mintUserKey, userKeyVaultKeys } from './userKey.js';
|
|
98
|
+
export { mintUserKey, USER_KEY_SALT, userKeyRecordSigner, userKeySigningKeyMultibase, userKeySigningSeed, userKeyVaultKeys } from './userKey.js';
|
|
86
99
|
export type { UserKey } from './userKey.js';
|
|
87
100
|
export { assertEnrolledClientKeyRecord, decodeClientKeyRecord, encodeClientKeyRecord, isEnrolledClientKeyRecord, parseClientRecordPending, parseClientRecordUserKey, parseClientRecordWebvhKeys } from './clientKeyRecord.js';
|
|
88
101
|
export type { ClientKeyRecord, ClientKeyRecordJson, ClientKeyRecordPending, EnrolledClientKeyRecord } from './clientKeyRecord.js';
|
|
@@ -93,7 +106,8 @@ export { anchorRosterStoreAt, retireRosterRecipientAndCascade, rotateRosterToDoc
|
|
|
93
106
|
export type { CascadeCollections, RosterCascadeResult, RosterSealReport, UserKeyAdoptedHook } from './userKeyRosterCascade.js';
|
|
94
107
|
export type { DescriptorStoreRead, UserKeyRosterReadResult } from './userKeyRoster.js';
|
|
95
108
|
export type { KeyAgreementDocument } from '../resourceLog/document.js';
|
|
96
|
-
export { collectionDescriptorLogStore } from './collectionLogStore.js';
|
|
109
|
+
export { accountCollectionStores, collectionDescriptorLogStore, collectionDescriptorStores } from './collectionLogStore.js';
|
|
110
|
+
export type { CollectionStoreFor } from './collectionLogStore.js';
|
|
97
111
|
export { userKeyRosterDescriptorStore, userKeyRosterPinId } from './rosterStore.js';
|
|
98
112
|
export { isSealableDescriptorStore } from './rosterLogStore.js';
|
|
99
113
|
export type { SealableEncryptionDescriptorStore } from './rosterLogStore.js';
|
package/dist/keys/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AACH,OAAO,EACL,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,0BAA0B,EAC1B,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,cAAc,CAAA;AACrB,YAAY,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAE3C,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAA;AAC7B,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,cAAc,EACd,8BAA8B,EAC9B,mBAAmB,EACn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,EAAE,MAAM,mBAAmB,CAAA;AAE9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA"}
|
package/dist/keys/index.js
CHANGED
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
* - `mintUserKey` / `userKeyVaultKeys` -- minting the account's user key and
|
|
10
10
|
* rebuilding the
|
|
11
11
|
* vault key-agreement key + resolver from stored material.
|
|
12
|
+
* - `userKeySigningSeed` / `userKeyRecordSigner` /
|
|
13
|
+
* `userKeySigningKeyMultibase` / `USER_KEY_SALT` -- the user key's Ed25519
|
|
14
|
+
* signing half, derived from its X25519 secret rather than stored, and the
|
|
15
|
+
* record signer and verification allowlist an app-side record sealed to the
|
|
16
|
+
* vault KAK signs and checks its proof with.
|
|
12
17
|
* - `encodeClientKeyRecord` / `decodeClientKeyRecord` -- the contents codec and
|
|
13
18
|
* strict validation of the local client-key record each client keeps its own
|
|
14
19
|
* key material in (storage and wrapping stay app-side).
|
|
@@ -39,6 +44,14 @@
|
|
|
39
44
|
* Those two builders are the subpath's whole store surface. Each states its
|
|
40
45
|
* log class at construction, and the generic wrapper under them takes a
|
|
41
46
|
* caller-chosen class and log id, so it stays module-internal.
|
|
47
|
+
* - `collectionDescriptorStores` / `accountCollectionStores` -- the
|
|
48
|
+
* `(collectionId) => store` lookup (`CollectionStoreFor`) the epoch
|
|
49
|
+
* installers, the geneses' `collectionStoreFor`, and the cascade take,
|
|
50
|
+
* over `collectionDescriptorLogStore`. The generic one takes the collection
|
|
51
|
+
* reach and the controller resolver as functions (a session's handle and
|
|
52
|
+
* verified-log memo); the account one takes the roster store's bare parts
|
|
53
|
+
* plus the account DID, builds the Space handle on the first lookup, and
|
|
54
|
+
* resolves the controller through `webvh`'s `accountControllerResolver`.
|
|
42
55
|
* - `rosterRecipientKid` -- the one builder of a client's roster kid, shared by
|
|
43
56
|
* the enrollment wrap and the roster read. A retiring rotation names no kid:
|
|
44
57
|
* it converges onto the account document instead.
|
|
@@ -82,12 +95,12 @@
|
|
|
82
95
|
* `WalletSpaceProvisioningError` when a collection was left without its
|
|
83
96
|
* epoch so the engine never memoizes a torn run.
|
|
84
97
|
*/
|
|
85
|
-
export { mintUserKey, userKeyVaultKeys } from './userKey.js';
|
|
98
|
+
export { mintUserKey, USER_KEY_SALT, userKeyRecordSigner, userKeySigningKeyMultibase, userKeySigningSeed, userKeyVaultKeys } from './userKey.js';
|
|
86
99
|
export { assertEnrolledClientKeyRecord, decodeClientKeyRecord, encodeClientKeyRecord, isEnrolledClientKeyRecord, parseClientRecordPending, parseClientRecordUserKey, parseClientRecordWebvhKeys } from './clientKeyRecord.js';
|
|
87
100
|
export { addUserKeyRosterRecipient, convergeUserKeyRosterToDocument, currentEpochOf, enrolledClientRosterRecipients, ensureUserKeyRoster, UserKeyRosterContinuityError, UserKeyRosterIntegrityError, UserKeyRosterUnwrapError, userKeyRosterLogSigner, userKeyRosterRecipientResolver, readUserKeyRoster, replaceUserKeyRosterRecipients, rosterRecipientKid, rosterRecipientsToRetire, rosterWrapsRecipient, rotateUserKeyRoster } from './userKeyRoster.js';
|
|
88
101
|
export { cascadeCollectionsToUserKey, userKeyAsRecipient, rotateCollectionEpochsToUserKey, unwrapUserKeyGenerations } from './userKeyCascade.js';
|
|
89
102
|
export { anchorRosterStoreAt, retireRosterRecipientAndCascade, rotateRosterToDocumentAndCascade } from './userKeyRosterCascade.js';
|
|
90
|
-
export { collectionDescriptorLogStore } from './collectionLogStore.js';
|
|
103
|
+
export { accountCollectionStores, collectionDescriptorLogStore, collectionDescriptorStores } from './collectionLogStore.js';
|
|
91
104
|
export { userKeyRosterDescriptorStore, userKeyRosterPinId } from './rosterStore.js';
|
|
92
105
|
export { isSealableDescriptorStore } from './rosterLogStore.js';
|
|
93
106
|
export { ensureIndexedFirstEpoch, ensureWalletSpaceEpochs, WalletSpaceProvisioningError, walletSpaceProvisioner } from './spaceEpochs.js';
|
package/dist/keys/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/keys/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AACH,OAAO,EACL,WAAW,EACX,aAAa,EACb,mBAAmB,EACnB,0BAA0B,EAC1B,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,cAAc,CAAA;AAGrB,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,sBAAsB,CAAA;AAQ7B,OAAO,EACL,yBAAyB,EACzB,+BAA+B,EAC/B,cAAc,EACd,8BAA8B,EAC9B,mBAAmB,EACnB,4BAA4B,EAC5B,2BAA2B,EAC3B,wBAAwB,EACxB,sBAAsB,EACtB,8BAA8B,EAC9B,iBAAiB,EACjB,8BAA8B,EAC9B,kBAAkB,EAClB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,qBAAqB,CAAA;AAK5B,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAC/B,gCAAgC,EACjC,MAAM,2BAA2B,CAAA;AAalC,OAAO,EACL,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,EAC3B,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EACL,4BAA4B,EAC5B,kBAAkB,EACnB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAA;AAG/D,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,4BAA4B,EAC5B,sBAAsB,EACvB,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACf,MAAM,mBAAmB,CAAA;AAG1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA"}
|
package/dist/keys/userKey.d.ts
CHANGED
|
@@ -1,27 +1,73 @@
|
|
|
1
1
|
import type { IKeyAgreementKey, IKeyResolver } from '@interop/data-integrity-core';
|
|
2
|
+
import type { RecordSigner } from '../keyring/record.js';
|
|
3
|
+
/**
|
|
4
|
+
* The HKDF salt for the user key's client-side expansions, and the one info
|
|
5
|
+
* label under it. Both permanent: two wallet apps must expand the same user
|
|
6
|
+
* key to byte-identical output, or a record one of them signs is a record the
|
|
7
|
+
* other refuses.
|
|
8
|
+
*/
|
|
9
|
+
export declare const USER_KEY_SALT = "freewallet/keys/user-key/v1";
|
|
2
10
|
/**
|
|
3
11
|
* The user key material: the X25519 key-agreement half as minted by the epoch
|
|
4
12
|
* construction (`id` is the key's own did:key; `secret` its raw 32-byte private
|
|
5
|
-
* key)
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* alone, and the signing half has no consumer yet.
|
|
13
|
+
* key). Random per account; held in memory for the life of a session and
|
|
14
|
+
* persisted only inside a wrapped client-key record. The Ed25519 signing half
|
|
15
|
+
* is not a member: it derives from `secret`, so a user key adopted from a
|
|
16
|
+
* roster rotation is as complete an identity as a freshly minted one.
|
|
10
17
|
*/
|
|
11
18
|
export interface UserKey {
|
|
12
19
|
id: string;
|
|
13
20
|
secret: Uint8Array;
|
|
14
|
-
signingSeed?: Uint8Array;
|
|
15
21
|
}
|
|
16
22
|
/**
|
|
17
23
|
* Mints a fresh user key: the X25519 key-agreement pair via the was-client
|
|
18
|
-
* epoch construction (its did:key is the key id, its raw secret is what wraps)
|
|
19
|
-
*
|
|
20
|
-
*
|
|
24
|
+
* epoch construction (its did:key is the key id, its raw secret is what wraps).
|
|
25
|
+
* The signing half needs no minting -- it derives from the same secret.
|
|
26
|
+
*
|
|
27
|
+
* @returns {Promise<UserKey>}
|
|
28
|
+
*/
|
|
29
|
+
export declare function mintUserKey(): Promise<UserKey>;
|
|
30
|
+
/**
|
|
31
|
+
* Derives the 32-byte Ed25519 seed of the user key's signing half from the
|
|
32
|
+
* key-agreement half's raw secret: HKDF-SHA256 under {@link USER_KEY_SALT},
|
|
33
|
+
* info `signing`. Deterministic and wire-level -- the same user key always
|
|
34
|
+
* yields the same signing key, which is what lets one holder sign a record
|
|
35
|
+
* another holder verifies with nothing server-served in hand.
|
|
36
|
+
*
|
|
37
|
+
* @param options {object}
|
|
38
|
+
* @param options.userKey {UserKey}
|
|
39
|
+
* @returns {Uint8Array}
|
|
40
|
+
*/
|
|
41
|
+
export declare function userKeySigningSeed({ userKey }: {
|
|
42
|
+
userKey: UserKey;
|
|
43
|
+
}): Uint8Array;
|
|
44
|
+
/**
|
|
45
|
+
* The user key's record signer: the keyring record's signing seam over the
|
|
46
|
+
* derived Ed25519 half, for an app-side record sealed to the vault KAK
|
|
47
|
+
* (`signRecordFrame`). Its `keyMultibase` is exactly what a reader's
|
|
48
|
+
* allowlist holds, so a writer that already has the signer reads the multibase
|
|
49
|
+
* off it rather than calling {@link userKeySigningKeyMultibase} as well.
|
|
50
|
+
*
|
|
51
|
+
* @param options {object}
|
|
52
|
+
* @param options.userKey {UserKey}
|
|
53
|
+
* @returns {Promise<RecordSigner>}
|
|
54
|
+
*/
|
|
55
|
+
export declare function userKeyRecordSigner({ userKey }: {
|
|
56
|
+
userKey: UserKey;
|
|
57
|
+
}): Promise<RecordSigner>;
|
|
58
|
+
/**
|
|
59
|
+
* The public multibase of the user key's signing half: the one key a reader
|
|
60
|
+
* accepts on a record sealed under this user key, handed to
|
|
61
|
+
* `verifyRecordProof` as its allowlist. For a reader alone -- a writer takes
|
|
62
|
+
* the same value off {@link userKeyRecordSigner}'s `keyMultibase`.
|
|
21
63
|
*
|
|
22
|
-
* @
|
|
64
|
+
* @param options {object}
|
|
65
|
+
* @param options.userKey {UserKey}
|
|
66
|
+
* @returns {Promise<string>}
|
|
23
67
|
*/
|
|
24
|
-
export declare function
|
|
68
|
+
export declare function userKeySigningKeyMultibase({ userKey }: {
|
|
69
|
+
userKey: UserKey;
|
|
70
|
+
}): Promise<string>;
|
|
25
71
|
/**
|
|
26
72
|
* Reconstructs the user key's key-agreement key and its single-key resolver
|
|
27
73
|
* from the stored material -- the vault-key pair a session supplies to the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userKey.d.ts","sourceRoot":"","sources":["../../src/keys/userKey.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"userKey.d.ts","sourceRoot":"","sources":["../../src/keys/userKey.ts"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EACV,gBAAgB,EAChB,YAAY,EACb,MAAM,8BAA8B,CAAA;AAIrC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAExD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,gCAAgC,CAAA;AAQ1D;;;;;;;GAOG;AACH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,UAAU,CAAA;CACnB;AAED;;;;;;GAMG;AACH,wBAAsB,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC,CAGpD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACR,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,UAAU,CASb;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CAAC,EACxC,OAAO,EACR,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,OAAO,CAAC,YAAY,CAAC,CAExB;AAED;;;;;;;;;GASG;AACH,wBAAsB,0BAA0B,CAAC,EAC/C,OAAO,EACR,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;CACjB,GAAG,OAAO,CAAC,MAAM,CAAC,CAGlB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG;IACnE,eAAe,EAAE,gBAAgB,CAAA;IACjC,WAAW,EAAE,YAAY,CAAA;CAC1B,CAQA"}
|
package/dist/keys/userKey.js
CHANGED
|
@@ -12,27 +12,92 @@
|
|
|
12
12
|
* The key-agreement half is exactly what `@interop/was-client`'s epoch
|
|
13
13
|
* construction mints: a fresh X25519 pair whose did:key is the key's id and
|
|
14
14
|
* whose raw 32-byte secret is what gets wrapped to recipients -- so the roster
|
|
15
|
-
* machinery consumes the user key unchanged. The Ed25519 signing half
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* one
|
|
15
|
+
* machinery consumes the user key unchanged. The Ed25519 signing half DERIVES
|
|
16
|
+
* from that same secret ({@link userKeySigningSeed}), so it needs no storage
|
|
17
|
+
* and no delivery channel of its own: every holder of the user key holds it,
|
|
18
|
+
* an enrolled session, a transient one, and a session-less signup or recovery
|
|
19
|
+
* writer alike, and a roster rotation that hands a client the fresh
|
|
20
|
+
* key-agreement secret hands it the fresh signing half with it.
|
|
21
|
+
*
|
|
22
|
+
* Its consumer is record authenticity. An app-side record sealed to the vault
|
|
23
|
+
* KAK is not authenticated by being decryptable -- a storage host that knows
|
|
24
|
+
* the epoch's public half can seal a body of its own that decrypts perfectly,
|
|
25
|
+
* which is the property the keyring record's `proof` member exists to defeat.
|
|
26
|
+
* So such a record carries the same proof, signed by {@link
|
|
27
|
+
* userKeyRecordSigner} and verified against {@link
|
|
28
|
+
* userKeySigningKeyMultibase} before it is decrypted.
|
|
19
29
|
*/
|
|
30
|
+
import { hkdf } from '@noble/hashes/hkdf.js';
|
|
31
|
+
import { sha256 } from '@noble/hashes/sha2.js';
|
|
20
32
|
import { X25519KeyAgreementKey2020 } from '@interop/x25519-key-agreement-key';
|
|
21
33
|
import { epochKeyIdFor, mintEpoch } from '@interop/was-client/edv';
|
|
22
34
|
import { singleKeyResolver } from '@interop/was-client/identity';
|
|
35
|
+
import { recordSignerFromSeed } from '../keyring/record.js';
|
|
36
|
+
/**
|
|
37
|
+
* The HKDF salt for the user key's client-side expansions, and the one info
|
|
38
|
+
* label under it. Both permanent: two wallet apps must expand the same user
|
|
39
|
+
* key to byte-identical output, or a record one of them signs is a record the
|
|
40
|
+
* other refuses.
|
|
41
|
+
*/
|
|
42
|
+
export const USER_KEY_SALT = 'freewallet/keys/user-key/v1';
|
|
43
|
+
const USER_KEY_SIGNING_INFO = 'signing';
|
|
44
|
+
/**
|
|
45
|
+
* The number of bytes the signing expansion produces (a 32-byte Ed25519 seed).
|
|
46
|
+
*/
|
|
47
|
+
const USER_KEY_SIGNING_SEED_BYTES = 32;
|
|
23
48
|
/**
|
|
24
49
|
* Mints a fresh user key: the X25519 key-agreement pair via the was-client
|
|
25
|
-
* epoch construction (its did:key is the key id, its raw secret is what wraps)
|
|
26
|
-
*
|
|
27
|
-
* complete identity (only a rotation-adopted one lacks the signing half).
|
|
50
|
+
* epoch construction (its did:key is the key id, its raw secret is what wraps).
|
|
51
|
+
* The signing half needs no minting -- it derives from the same secret.
|
|
28
52
|
*
|
|
29
|
-
* @returns {Promise<
|
|
53
|
+
* @returns {Promise<UserKey>}
|
|
30
54
|
*/
|
|
31
55
|
export async function mintUserKey() {
|
|
32
56
|
const { epochId, secret } = await mintEpoch();
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
57
|
+
return { id: epochId, secret };
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Derives the 32-byte Ed25519 seed of the user key's signing half from the
|
|
61
|
+
* key-agreement half's raw secret: HKDF-SHA256 under {@link USER_KEY_SALT},
|
|
62
|
+
* info `signing`. Deterministic and wire-level -- the same user key always
|
|
63
|
+
* yields the same signing key, which is what lets one holder sign a record
|
|
64
|
+
* another holder verifies with nothing server-served in hand.
|
|
65
|
+
*
|
|
66
|
+
* @param options {object}
|
|
67
|
+
* @param options.userKey {UserKey}
|
|
68
|
+
* @returns {Uint8Array}
|
|
69
|
+
*/
|
|
70
|
+
export function userKeySigningSeed({ userKey }) {
|
|
71
|
+
const encoder = new TextEncoder();
|
|
72
|
+
return hkdf(sha256, userKey.secret, encoder.encode(USER_KEY_SALT), encoder.encode(USER_KEY_SIGNING_INFO), USER_KEY_SIGNING_SEED_BYTES);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* The user key's record signer: the keyring record's signing seam over the
|
|
76
|
+
* derived Ed25519 half, for an app-side record sealed to the vault KAK
|
|
77
|
+
* (`signRecordFrame`). Its `keyMultibase` is exactly what a reader's
|
|
78
|
+
* allowlist holds, so a writer that already has the signer reads the multibase
|
|
79
|
+
* off it rather than calling {@link userKeySigningKeyMultibase} as well.
|
|
80
|
+
*
|
|
81
|
+
* @param options {object}
|
|
82
|
+
* @param options.userKey {UserKey}
|
|
83
|
+
* @returns {Promise<RecordSigner>}
|
|
84
|
+
*/
|
|
85
|
+
export async function userKeyRecordSigner({ userKey }) {
|
|
86
|
+
return recordSignerFromSeed({ seed: userKeySigningSeed({ userKey }) });
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The public multibase of the user key's signing half: the one key a reader
|
|
90
|
+
* accepts on a record sealed under this user key, handed to
|
|
91
|
+
* `verifyRecordProof` as its allowlist. For a reader alone -- a writer takes
|
|
92
|
+
* the same value off {@link userKeyRecordSigner}'s `keyMultibase`.
|
|
93
|
+
*
|
|
94
|
+
* @param options {object}
|
|
95
|
+
* @param options.userKey {UserKey}
|
|
96
|
+
* @returns {Promise<string>}
|
|
97
|
+
*/
|
|
98
|
+
export async function userKeySigningKeyMultibase({ userKey }) {
|
|
99
|
+
const { keyMultibase } = await userKeyRecordSigner({ userKey });
|
|
100
|
+
return keyMultibase;
|
|
36
101
|
}
|
|
37
102
|
/**
|
|
38
103
|
* Reconstructs the user key's key-agreement key and its single-key resolver
|
package/dist/keys/userKey.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userKey.js","sourceRoot":"","sources":["../../src/keys/userKey.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH
|
|
1
|
+
{"version":3,"file":"userKey.js","sourceRoot":"","sources":["../../src/keys/userKey.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAA;AAK7E,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAG3D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,6BAA6B,CAAA;AAC1D,MAAM,qBAAqB,GAAG,SAAS,CAAA;AAEvC;;GAEG;AACH,MAAM,2BAA2B,GAAG,EAAE,CAAA;AAetC;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,SAAS,EAAE,CAAA;IAC7C,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAA;AAChC,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,OAAO,EAGR;IACC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAA;IACjC,OAAO,IAAI,CACT,MAAM,EACN,OAAO,CAAC,MAAM,EACd,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,EAC7B,OAAO,CAAC,MAAM,CAAC,qBAAqB,CAAC,EACrC,2BAA2B,CAC5B,CAAA;AACH,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,EACxC,OAAO,EAGR;IACC,OAAO,oBAAoB,CAAC,EAAE,IAAI,EAAE,kBAAkB,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAA;AACxE,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,EAC/C,OAAO,EAGR;IACC,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,mBAAmB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;IAC/D,OAAO,YAAY,CAAA;AACrB,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAAE,OAAO,EAAwB;IAIhE,MAAM,eAAe,GAAG,yBAAyB,CAAC,aAAa,CAAC;QAC9D,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,UAAU,EAAE,OAAO,CAAC,EAAE;QACtB,EAAE,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;KAC9B,CAAqB,CAAA;IACtB,MAAM,WAAW,GAAG,iBAAiB,CAAC,EAAE,eAAe,EAAE,CAAC,CAAA;IAC1D,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,CAAA;AACzC,CAAC"}
|
|
@@ -503,9 +503,9 @@ export interface UserKeyRosterReadResult {
|
|
|
503
503
|
* this client's wrap is unwrapped with its own key-agreement key
|
|
504
504
|
* (`UserKeyRosterUnwrapError` when it holds none).
|
|
505
505
|
*
|
|
506
|
-
* A rotated read returns the fresh user key
|
|
507
|
-
*
|
|
508
|
-
*
|
|
506
|
+
* A rotated read returns the fresh user key, and with it the fresh signing
|
|
507
|
+
* half: the roster wraps the key-agreement secret alone, and the Ed25519 half
|
|
508
|
+
* derives from that secret, so a rotation delivers a complete identity.
|
|
509
509
|
*
|
|
510
510
|
* A caller with no cached user key at all -- a freshly enrolled client making
|
|
511
511
|
* its first post-enrollment read -- omits `userKey` and always takes the unwrap
|
|
@@ -55,11 +55,13 @@ export declare const ACCOUNT_SHAPES: readonly ["client-less", "enrolled"];
|
|
|
55
55
|
export type AccountShape = (typeof ACCOUNT_SHAPES)[number];
|
|
56
56
|
/**
|
|
57
57
|
* What a detector trusts when it decides an invariant is violated. A
|
|
58
|
-
* `verified-log` read is checked under the visit's continuity pins;
|
|
59
|
-
* `
|
|
60
|
-
*
|
|
58
|
+
* `verified-log` read is checked under the visit's continuity pins; a
|
|
59
|
+
* `verified-registry` read is a registry record whose proof verified under the
|
|
60
|
+
* user key the reader holds, before it was decrypted; every `served-*` value
|
|
61
|
+
* and `host-listing` is host state taken as served; the two `local-*` values
|
|
62
|
+
* are this browser's own state and clock.
|
|
61
63
|
*/
|
|
62
|
-
export declare const EVIDENCE: readonly ["verified-log", "served-registry", "served-unlock-record", "host-listing", "served-body", "served-projection", "local-record", "local-clock"];
|
|
64
|
+
export declare const EVIDENCE: readonly ["verified-log", "verified-registry", "served-registry", "served-unlock-record", "host-listing", "served-body", "served-projection", "local-record", "local-clock"];
|
|
63
65
|
/**
|
|
64
66
|
* One value of {@link EVIDENCE}.
|
|
65
67
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vocabulary.d.ts","sourceRoot":"","sources":["../../src/menders/vocabulary.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,oDAAqD,CAAA;AAE7E;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AAEpD;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,gGAKX,CAAA;AAEV;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAA;AAE/C;;;GAGG;AACH,eAAO,MAAM,cA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AAC,MAAM,CAAC,CAAA;AAE5D;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,kCAAmC,CAAA;AAEzD;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -47,12 +47,15 @@ export const CHAIN_TRIGGERS = [
|
|
|
47
47
|
export const ACCOUNT_SHAPES = ['client-less', 'enrolled'];
|
|
48
48
|
/**
|
|
49
49
|
* What a detector trusts when it decides an invariant is violated. A
|
|
50
|
-
* `verified-log` read is checked under the visit's continuity pins;
|
|
51
|
-
* `
|
|
52
|
-
*
|
|
50
|
+
* `verified-log` read is checked under the visit's continuity pins; a
|
|
51
|
+
* `verified-registry` read is a registry record whose proof verified under the
|
|
52
|
+
* user key the reader holds, before it was decrypted; every `served-*` value
|
|
53
|
+
* and `host-listing` is host state taken as served; the two `local-*` values
|
|
54
|
+
* are this browser's own state and clock.
|
|
53
55
|
*/
|
|
54
56
|
export const EVIDENCE = [
|
|
55
57
|
'verified-log',
|
|
58
|
+
'verified-registry',
|
|
56
59
|
'served-registry',
|
|
57
60
|
'served-unlock-record',
|
|
58
61
|
'host-listing',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../../src/menders/vocabulary.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAU,CAAA;AAO7E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,eAAe;IACf,eAAe;CACP,CAAA;AAOV;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,wBAAwB;IACxB,uBAAuB;CACf,CAAA;AAOV;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,aAAa,EAAE,UAAU,CAAU,CAAA;AAOlE
|
|
1
|
+
{"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../../src/menders/vocabulary.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;GAOG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,CAAU,CAAA;AAO7E;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,wBAAwB;IACxB,uBAAuB;IACvB,eAAe;IACf,eAAe;CACP,CAAA;AAOV;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,wBAAwB;IACxB,uBAAuB;CACf,CAAA;AAOV;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,aAAa,EAAE,UAAU,CAAU,CAAA;AAOlE;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,cAAc;IACd,mBAAmB;IACnB,iBAAiB;IACjB,sBAAsB;IACtB,cAAc;IACd,aAAa;IACb,mBAAmB;IACnB,cAAc;IACd,aAAa;CACL,CAAA;AAOV;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO;IACP,MAAM;IACN,SAAS;IACT,SAAS;IACT,QAAQ;CACA,CAAA;AAOV;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,aAAa,CAAU,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"didWebvh.d.ts","sourceRoot":"","sources":["../../src/webvh/didWebvh.ts"],"names":[],"mappings":"AA2EA,OAAO,KAAK,EACV,MAAM,EACN,MAAM,EACN,MAAM,EACN,kBAAkB,EACnB,MAAM,2BAA2B,CAAA;AAelC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,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AAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAE3B;AA4GD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE;IAClD,OAAO,EAAE,YAAY,CAAA;IACrB,UAAU,EAAE,qBAAqB,CAAA;IACjC,iBAAiB,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACjE,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,GAAG,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAE3B;AA4HD;;;;;;;;;;GAUG;AACH,wBAAsB,0BAA0B,CAAC,EAC/C,SAAS,EACV,EAAE;IACD,SAAS,EAAE,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"}
|
package/dist/webvh/didWebvh.js
CHANGED
|
@@ -475,14 +475,9 @@ export async function updateKeyMultibase({ seed }) {
|
|
|
475
475
|
*/
|
|
476
476
|
export async function updateKeySigner({ seed }) {
|
|
477
477
|
const keyPair = await Ed25519VerificationKey.generate({ seed });
|
|
478
|
-
const
|
|
479
|
-
// The key pair refuses to hand out a signer without an id; the did:key form
|
|
480
|
-
// is also the verification-method id the resolver matches against the log's
|
|
481
|
-
// authorized updateKeys.
|
|
482
|
-
keyPair.id = `did:key:${publicKeyMultibase}#${publicKeyMultibase}`;
|
|
483
|
-
const keySigner = keyPair.signer();
|
|
478
|
+
const keySigner = keyPair.didKeySigner();
|
|
484
479
|
return signerFromExternalKey({
|
|
485
|
-
publicKeyMultibase,
|
|
480
|
+
publicKeyMultibase: keyPair.publicKeyMultibase,
|
|
486
481
|
sign: async ({ data }) => {
|
|
487
482
|
const signature = await keySigner.sign({ data });
|
|
488
483
|
// Re-wrap as a plain Uint8Array: a signer may return a Node Buffer (or
|