@interop/wallet-core 0.7.0 → 0.8.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.
Files changed (53) hide show
  1. package/README.md +31 -3
  2. package/dist/descriptors/acquire.d.ts +110 -0
  3. package/dist/descriptors/acquire.d.ts.map +1 -0
  4. package/dist/{markers → descriptors}/acquire.js +28 -25
  5. package/dist/descriptors/acquire.js.map +1 -0
  6. package/dist/{markers → descriptors}/cipher.d.ts +19 -19
  7. package/dist/descriptors/cipher.d.ts.map +1 -0
  8. package/dist/{markers → descriptors}/cipher.js +11 -11
  9. package/dist/descriptors/cipher.js.map +1 -0
  10. package/dist/descriptors/index.d.ts +32 -0
  11. package/dist/descriptors/index.d.ts.map +1 -0
  12. package/dist/descriptors/index.js +31 -0
  13. package/dist/descriptors/index.js.map +1 -0
  14. package/dist/{markers → descriptors}/refresh.d.ts +8 -8
  15. package/dist/descriptors/refresh.d.ts.map +1 -0
  16. package/dist/{markers → descriptors}/refresh.js +8 -8
  17. package/dist/descriptors/refresh.js.map +1 -0
  18. package/dist/enrollment/enrollment.d.ts +4 -4
  19. package/dist/enrollment/enrollment.d.ts.map +1 -1
  20. package/dist/enrollment/enrollment.js +4 -4
  21. package/dist/enrollment/enrollment.js.map +1 -1
  22. package/dist/index.d.ts +7 -5
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +7 -5
  25. package/dist/index.js.map +1 -1
  26. package/dist/keys/index.d.ts +7 -6
  27. package/dist/keys/index.d.ts.map +1 -1
  28. package/dist/keys/index.js +7 -6
  29. package/dist/keys/index.js.map +1 -1
  30. package/dist/keys/pukRoster.d.ts +24 -20
  31. package/dist/keys/pukRoster.d.ts.map +1 -1
  32. package/dist/keys/pukRoster.js +27 -24
  33. package/dist/keys/pukRoster.js.map +1 -1
  34. package/dist/keys/rosterStore.d.ts +6 -6
  35. package/dist/keys/rosterStore.d.ts.map +1 -1
  36. package/dist/keys/rosterStore.js +7 -7
  37. package/dist/keys/rosterStore.js.map +1 -1
  38. package/dist/space/collections.d.ts +1 -1
  39. package/dist/space/collections.js +1 -1
  40. package/dist/sync/collections.d.ts +2 -1
  41. package/dist/sync/collections.d.ts.map +1 -1
  42. package/package.json +7 -7
  43. package/dist/markers/acquire.d.ts +0 -107
  44. package/dist/markers/acquire.d.ts.map +0 -1
  45. package/dist/markers/acquire.js.map +0 -1
  46. package/dist/markers/cipher.d.ts.map +0 -1
  47. package/dist/markers/cipher.js.map +0 -1
  48. package/dist/markers/index.d.ts +0 -30
  49. package/dist/markers/index.d.ts.map +0 -1
  50. package/dist/markers/index.js +0 -29
  51. package/dist/markers/index.js.map +0 -1
  52. package/dist/markers/refresh.d.ts.map +0 -1
  53. package/dist/markers/refresh.js.map +0 -1
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.7.0",
4
+ "version": "0.8.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "pnpm run clear && tsc",
@@ -72,11 +72,11 @@
72
72
  "import": "./dist/webvh/index.js",
73
73
  "default": "./dist/webvh/index.js"
74
74
  },
75
- "./markers": {
76
- "types": "./dist/markers/index.d.ts",
77
- "react-native": "./dist/markers/index.js",
78
- "import": "./dist/markers/index.js",
79
- "default": "./dist/markers/index.js"
75
+ "./descriptors": {
76
+ "types": "./dist/descriptors/index.d.ts",
77
+ "react-native": "./dist/descriptors/index.js",
78
+ "import": "./dist/descriptors/index.js",
79
+ "default": "./dist/descriptors/index.js"
80
80
  },
81
81
  "./recovery": {
82
82
  "types": "./dist/recovery/index.d.ts",
@@ -116,7 +116,7 @@
116
116
  "@interop/ezcap": "^7.4.1",
117
117
  "@interop/security-document-loader": "^9.5.0",
118
118
  "@interop/vc": "^11.0.6",
119
- "@interop/was-client": "^0.22.0",
119
+ "@interop/was-client": "^0.23.0",
120
120
  "@interop/webkms-client": "^14.7.1",
121
121
  "@interop/x25519-key-agreement-key": "^5.2.1",
122
122
  "@noble/hashes": "^2.2.0",
@@ -1,107 +0,0 @@
1
- /*!
2
- * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
- */
4
- /**
5
- * Collection-encryption marker acquisition: reading a collection's
6
- * `CollectionEncryption` marker (its key-epoch roster) from the Collection
7
- * Description, caching each success, and falling back to the cached copy when
8
- * the description cannot be fetched -- offline, a previously-shared collection
9
- * must keep encrypting under its current epoch. A successful fetch that
10
- * returns no marker (an unshared collection) yields `undefined`: the
11
- * single-key path.
12
- *
13
- * The two seams are deliberately narrow, so a wallet app's own classes satisfy
14
- * them structurally -- no adapter needed. A {@link MarkerSource} is one signed
15
- * describe; a {@link MarkerCache} is a durable get/put the host has already
16
- * scoped to one account's Space (a web wallet: a localStorage pair keyed by
17
- * Space id; a mobile wallet: a per-(profile, collection) table column), so no
18
- * scope key appears in the interface.
19
- */
20
- import type { CollectionEncryption, WasClient } from '@interop/was-client';
21
- /**
22
- * Where markers come from: one signed read of the collection's Description.
23
- * Resolves `undefined` for a collection that is plaintext or has no marker;
24
- * network errors throw through (callers treat the fetch as best-effort and
25
- * fall back to a cached copy).
26
- */
27
- export interface MarkerSource {
28
- collectionEncryption(options: {
29
- collectionId: string;
30
- }): Promise<CollectionEncryption | undefined>;
31
- }
32
- /**
33
- * Where fetched markers survive offline: a durable get/put pre-scoped by the
34
- * host to one account's Space. `readMarker` resolves `undefined` when nothing
35
- * is cached (never throws for absence).
36
- */
37
- export interface MarkerCache {
38
- readMarker(options: {
39
- collectionId: string;
40
- }): Promise<CollectionEncryption | undefined>;
41
- writeMarker(options: {
42
- collectionId: string;
43
- marker: CollectionEncryption;
44
- }): Promise<void>;
45
- }
46
- /**
47
- * The {@link MarkerSource} over a was-client handle: reads the collection's
48
- * Description in the given Space and returns its `encryption` marker.
49
- *
50
- * @param options {object}
51
- * @param options.was {WasClient} a client whose signer can read the Space
52
- * @param options.spaceId {string}
53
- * @returns {MarkerSource}
54
- */
55
- export declare function wasMarkerSource({ was, spaceId }: {
56
- was: WasClient;
57
- spaceId: string;
58
- }): MarkerSource;
59
- /**
60
- * Acquires one collection's marker: fetches it from the source, caching a
61
- * success; falls back to the cached copy when the fetch fails; and with no
62
- * source at all (a purely local code path) reads the cache alone. A
63
- * successful fetch that returns no marker resolves `undefined` -- an unshared
64
- * collection stays on the single-key path -- and deliberately leaves any
65
- * cached copy in place, mirroring the fetch-failure fallback.
66
- *
67
- * @param options {object}
68
- * @param [options.source] {MarkerSource} omit for cache-only acquisition
69
- * @param options.cache {MarkerCache}
70
- * @param options.collectionId {string}
71
- * @param [options.onFetchError] {function} observes a swallowed fetch
72
- * failure (the cached-fallback branch); errors from the cache itself throw
73
- * through
74
- * @returns {Promise<CollectionEncryption | undefined>}
75
- */
76
- export declare function acquireMarker({ source, cache, collectionId, onFetchError }: {
77
- source?: MarkerSource;
78
- cache: MarkerCache;
79
- collectionId: string;
80
- onFetchError?: (err: unknown, info: {
81
- collectionId: string;
82
- }) => void;
83
- }): Promise<CollectionEncryption | undefined>;
84
- /**
85
- * Acquires markers for a set of collections concurrently (each fetch is an
86
- * independent signed round trip, so a session start is not gated on a serial
87
- * chain of describes). Collections that resolve no marker are simply absent
88
- * from the result.
89
- *
90
- * @param options {object}
91
- * @param [options.source] {MarkerSource} omit for cache-only acquisition
92
- * @param options.cache {MarkerCache}
93
- * @param options.collectionIds {string[]}
94
- * @param [options.onFetchError] {function} observes each swallowed fetch
95
- * failure
96
- * @returns {Promise<Record<string, CollectionEncryption>>} keyed by
97
- * collection id
98
- */
99
- export declare function acquireMarkers({ source, cache, collectionIds, onFetchError }: {
100
- source?: MarkerSource;
101
- cache: MarkerCache;
102
- collectionIds: string[];
103
- onFetchError?: (err: unknown, info: {
104
- collectionId: string;
105
- }) => void;
106
- }): Promise<Record<string, CollectionEncryption>>;
107
- //# sourceMappingURL=acquire.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3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O;QACL,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;QAE1C,aAAa,EAAE,OAAO,CAAC,EAAE;YACvB,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;gBACzB,MAAM,IAAI,KAAK,CACb,eAAe,YAAY,kCAAkC,CAC9D,CAAA;YACH,CAAC;YACD,OAAO,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QACrC,CAAC;QAED,KAAK,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE;YACxB,IAAI,CAAC;gBACH,OAAO,MAAM,KAAK,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAA;YAC1C,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,IAAI,CAAC,CAAC,GAAG,YAAY,iBAAiB,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;oBACnD,MAAM,GAAG,CAAA;gBACX,CAAC;gBACD,SAAS,KAAK,KAAK,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;oBAClC,KAAK,GAAG,MAAM,CAAA;gBAChB,CAAC,CAAC,CAAA;gBACF,MAAM,SAAS,CAAA;gBACf,iEAAiE;gBACjE,8DAA8D;gBAC9D,+DAA+D;gBAC/D,iEAAiE;gBACjE,2BAA2B;gBAC3B,OAAO,KAAK,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAA;YACpC,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
@@ -1,30 +0,0 @@
1
- /*!
2
- * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
- */
4
- /**
5
- * The `@interop/wallet-core/markers` subpath: collection-encryption marker
6
- * acquisition and the unknown-epoch refresh policy -- the one implementation
7
- * of "which key epoch does this collection encrypt under, and when do we ask
8
- * again" that every wallet replica must share (a drift here does not fail
9
- * loudly; it fails as a resource one replica cannot decrypt).
10
- *
11
- * - `MarkerSource` / `MarkerCache` -- the narrow seams a host implements:
12
- * one signed Collection Description read, and a durable get/put pre-scoped
13
- * to one account's Space.
14
- * - `wasMarkerSource` -- the `MarkerSource` over a was-client handle.
15
- * - `acquireMarker` / `acquireMarkers` -- fetch + cache with the cached
16
- * fallback (offline, a previously-shared collection keeps encrypting under
17
- * its current epoch; no marker at all is the single-key path).
18
- * - `MarkerRefreshPolicy` -- the once-per-collection-per-session unknown-epoch
19
- * refresh guard, plus the refresh-and-re-read-once wrapper for hosts whose
20
- * reads scan rows and count unknown-epoch skips.
21
- * - `createRefreshingEdvDocCipher` -- `createEdvDocCipher` bound to both: a
22
- * cipher that acquires its own marker and, on an unknown-epoch decrypt,
23
- * re-reads the description, swaps itself, and retries exactly once per
24
- * instance.
25
- */
26
- export { acquireMarker, acquireMarkers, wasMarkerSource } from './acquire.js';
27
- export type { MarkerCache, MarkerSource } from './acquire.js';
28
- export { MarkerRefreshPolicy } from './refresh.js';
29
- export { createRefreshingEdvDocCipher } from './cipher.js';
30
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/markers/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC7E,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAElD,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA"}
@@ -1,29 +0,0 @@
1
- /*!
2
- * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
- */
4
- /**
5
- * The `@interop/wallet-core/markers` subpath: collection-encryption marker
6
- * acquisition and the unknown-epoch refresh policy -- the one implementation
7
- * of "which key epoch does this collection encrypt under, and when do we ask
8
- * again" that every wallet replica must share (a drift here does not fail
9
- * loudly; it fails as a resource one replica cannot decrypt).
10
- *
11
- * - `MarkerSource` / `MarkerCache` -- the narrow seams a host implements:
12
- * one signed Collection Description read, and a durable get/put pre-scoped
13
- * to one account's Space.
14
- * - `wasMarkerSource` -- the `MarkerSource` over a was-client handle.
15
- * - `acquireMarker` / `acquireMarkers` -- fetch + cache with the cached
16
- * fallback (offline, a previously-shared collection keeps encrypting under
17
- * its current epoch; no marker at all is the single-key path).
18
- * - `MarkerRefreshPolicy` -- the once-per-collection-per-session unknown-epoch
19
- * refresh guard, plus the refresh-and-re-read-once wrapper for hosts whose
20
- * reads scan rows and count unknown-epoch skips.
21
- * - `createRefreshingEdvDocCipher` -- `createEdvDocCipher` bound to both: a
22
- * cipher that acquires its own marker and, on an unknown-epoch decrypt,
23
- * re-reads the description, swaps itself, and retries exactly once per
24
- * instance.
25
- */
26
- export { acquireMarker, acquireMarkers, wasMarkerSource } from './acquire.js';
27
- export { MarkerRefreshPolicy } from './refresh.js';
28
- export { createRefreshingEdvDocCipher } from './cipher.js';
29
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/markers/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAG7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAElD,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"refresh.d.ts","sourceRoot":"","sources":["../../src/markers/refresh.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;GAQG;AAEH;;;;;;GAMG;AACH,qBAAa,mBAAmB;;gBAKlB,EACV,OAAO,EACR,EAAE;QACD,OAAO,EAAE,CAAC,OAAO,EAAE;YAAE,YAAY,EAAE,MAAM,CAAA;SAAE,K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