@interop/wallet-core 0.46.0 → 0.47.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.
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2026 Interop Alliance. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* The descriptor store over a Space's user key wrap-set roster -- since the
|
|
6
|
+
* roster became log-governed, over its resource log (`key-map/user-key.jsonl`).
|
|
7
|
+
* Standalone rather than a method on a wallet's remote-store class, because the
|
|
8
|
+
* login-time direct read checks the roster BEFORE any storage client (or
|
|
9
|
+
* cipher) is built: it takes the bare signing client instead of a store
|
|
10
|
+
* instance.
|
|
11
|
+
*
|
|
12
|
+
* The `plaintext` collection override is load-bearing twice over. Without it
|
|
13
|
+
* the client decides plaintext vs encrypted by describing the collection
|
|
14
|
+
* first, and a 404 from an absent Space or collection then surfaces as an
|
|
15
|
+
* encryption error rather than as an absent roster; and on an encrypted
|
|
16
|
+
* collection the EDV codec would compute the write preconditions itself, so
|
|
17
|
+
* the log's compare-and-swap append guard would not be honored.
|
|
18
|
+
*/
|
|
19
|
+
import { type IZcap } from '@interop/was-client';
|
|
1
20
|
import type { ZcapClient } from '@interop/ezcap';
|
|
2
21
|
import { type ResourceLogController, type ResourceLogPinStore, type ResourceLogSigner } from '../resourceLog/index.js';
|
|
3
22
|
import { type SealableEncryptionDescriptorStore } from './rosterLogStore.js';
|
|
@@ -31,14 +50,19 @@ export declare function userKeyRosterPinId({ spaceId }: {
|
|
|
31
50
|
* pin for the roster log
|
|
32
51
|
* @param options.signer {ResourceLogSigner} this client's enrolled signing
|
|
33
52
|
* key ({@link userKeyRosterLogSigner})
|
|
53
|
+
* @param [options.capability] {IZcap} an invocation capability attached to
|
|
54
|
+
* every roster request (a delegated Space-subtree zcap -- the transient
|
|
55
|
+
* posture's generation delegation); absent, requests invoke the root
|
|
56
|
+
* capability as before
|
|
34
57
|
* @returns {SealableEncryptionDescriptorStore}
|
|
35
58
|
*/
|
|
36
|
-
export declare function userKeyRosterDescriptorStore({ storageServerUrl, zcapClient, spaceId, resolveController, pinStore, signer }: {
|
|
59
|
+
export declare function userKeyRosterDescriptorStore({ storageServerUrl, zcapClient, spaceId, resolveController, pinStore, signer, capability }: {
|
|
37
60
|
storageServerUrl: string;
|
|
38
61
|
zcapClient: ZcapClient;
|
|
39
62
|
spaceId: string;
|
|
40
63
|
resolveController: () => Promise<ResourceLogController>;
|
|
41
64
|
pinStore: ResourceLogPinStore;
|
|
42
65
|
signer: ResourceLogSigner;
|
|
66
|
+
capability?: IZcap;
|
|
43
67
|
}): SealableEncryptionDescriptorStore;
|
|
44
68
|
//# sourceMappingURL=rosterStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterStore.d.ts","sourceRoot":"","sources":["../../src/keys/rosterStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rosterStore.d.ts","sourceRoot":"","sources":["../../src/keys/rosterStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAa,KAAK,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,OAAO,EAEL,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAA;AAKhC,OAAO,EAEL,KAAK,iCAAiC,EACvC,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAM3E;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,gBAAgB,EAChB,UAAU,EACV,OAAO,EACP,iBAAiB,EACjB,QAAQ,EACR,MAAM,EACN,UAAU,EACX,EAAE;IACD,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,iBAAiB,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,CAAA;IACvD,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,MAAM,EAAE,iBAAiB,CAAA;IACzB,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,GAAG,iCAAiC,CAcpC"}
|
package/dist/keys/rosterStore.js
CHANGED
|
@@ -55,12 +55,16 @@ export function userKeyRosterPinId({ spaceId }) {
|
|
|
55
55
|
* pin for the roster log
|
|
56
56
|
* @param options.signer {ResourceLogSigner} this client's enrolled signing
|
|
57
57
|
* key ({@link userKeyRosterLogSigner})
|
|
58
|
+
* @param [options.capability] {IZcap} an invocation capability attached to
|
|
59
|
+
* every roster request (a delegated Space-subtree zcap -- the transient
|
|
60
|
+
* posture's generation delegation); absent, requests invoke the root
|
|
61
|
+
* capability as before
|
|
58
62
|
* @returns {SealableEncryptionDescriptorStore}
|
|
59
63
|
*/
|
|
60
|
-
export function userKeyRosterDescriptorStore({ storageServerUrl, zcapClient, spaceId, resolveController, pinStore, signer }) {
|
|
64
|
+
export function userKeyRosterDescriptorStore({ storageServerUrl, zcapClient, spaceId, resolveController, pinStore, signer, capability }) {
|
|
61
65
|
const was = new WasClient({ serverUrl: storageServerUrl, zcapClient });
|
|
62
66
|
const collection = was
|
|
63
|
-
.space(spaceId)
|
|
67
|
+
.space(spaceId, { capability })
|
|
64
68
|
.collection(KEY_MAP_COLLECTION.id, { encryption: 'plaintext' });
|
|
65
69
|
return logGovernedDescriptorStore({
|
|
66
70
|
log: resourceLogStore({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rosterStore.js","sourceRoot":"","sources":["../../src/keys/rosterStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;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ACR,KAAK,EAAE,kBAAkB,CAAC,EAAE,OAAO,EAAE,CAAC;QACtC,MAAM;KACP,CAAC,CAAA;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interop/wallet-core",
|
|
3
3
|
"description": "Shared wallet-domain logic (WAS sync engine core and wallet Space layout contracts) for Interop wallet apps.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.47.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "pnpm run clear && tsc",
|