@interop/was-client 0.70.0 → 0.72.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -956,9 +956,18 @@ const cipher = await createEdvDocCipher({
956
956
  const data = await cipher.decrypt({ id, envelope })
957
957
  ```
958
958
 
959
+ A consumer that also wants no resource-log dependency --
960
+ `@interop/wallet-backup` opening an archive with no log to verify, say --
961
+ imports `@interop/was-client/edv/cipher` instead: the same codec, doc ciphers,
962
+ key epochs, recipient operations, blinding keys, and `resourceDescriptorStore`,
963
+ without `./edv/core`'s log-governed descriptor stores. Importing it evaluates no
964
+ `@interop/vh-resource-log` or `@interop/did-method-webvh` module, on top of no
965
+ transport module.
966
+
959
967
  Online consumers keep importing `@interop/was-client/edv` and nothing changes
960
- for them: it re-exports everything `./edv/core` does and adds the transport
961
- (`WasTransport`, `createEdvEncryption`, descriptor acquisition and refresh).
968
+ for them: it re-exports everything `./edv/core` does (which in turn re-exports
969
+ everything `./edv/cipher` does) and adds the transport (`WasTransport`,
970
+ `createEdvEncryption`, descriptor acquisition and refresh).
962
971
 
963
972
  #### Searching an encrypted collection
964
973
 
@@ -0,0 +1,81 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The `@interop/was-client/edv/cipher` subpath entry: the log-free part of the
6
+ * offline half of encrypted (EDV-over-WAS) storage support. Everything here
7
+ * works on bytes and keys a caller already holds -- the codec, the doc
8
+ * ciphers, the key epochs, the recipient operations, `resourceDescriptorStore`
9
+ * and the blinding keys -- with no server and no resource log in the graph. A
10
+ * consumer that opens archived bytes, derives keys, or decrypts rows it
11
+ * already has imports this entry and evaluates no transport module and no
12
+ * `@interop/vh-resource-log` / `@interop/did-method-webvh` module. The one
13
+ * gated exception is `createEdvDocCipher({ spaceId })`, which loads the
14
+ * transport factory through `import()` for the chunked paths. A call that
15
+ * names no Space loads nothing.
16
+ *
17
+ * `@interop/was-client/edv/core` re-exports all of it and adds the
18
+ * log-governed descriptor stores, which read through a resource log verified
19
+ * by `@interop/vh-resource-log`. `@interop/was-client/edv` re-exports core in
20
+ * turn and adds the online set on top.
21
+ *
22
+ * Every encrypted collection carries a key-epoch roster from birth:
23
+ * `ensureFirstEpoch` installs epoch[0] at provision time (create-if-absent;
24
+ * the crypto-free `ensureSpaceAndCollection` only ensures the container), and
25
+ * `initRecipients` / `addRecipient` / `removeRecipient` manage the readers and
26
+ * rotate the epoch key, so the same key material transparently encrypts each
27
+ * write under the current epoch and decrypts any epoch a reader still holds.
28
+ * They mutate the descriptor through the descriptor-store seam: any
29
+ * `EncryptionDescriptorStore` -- e.g. `resourceDescriptorStore` for a
30
+ * descriptor hosted as a plain JSON Resource, or `./edv/core`'s
31
+ * `logGovernedDescriptorStore` for one governed by a resource log.
32
+ *
33
+ * A collection provisioned with `ensureFirstEpoch({ blindedIndex: true })` also
34
+ * carries a blinded-index HMAC key, distributed to recipients exactly like an
35
+ * epoch key (see `hmacKey.ts`). It is installed at provisioning or never, and
36
+ * never rotates.
37
+ *
38
+ * `hasKeyEpochs` and `epochRostersEqual` are the crypto-free predicates over a
39
+ * descriptor: whether it carries a usable roster, and whether two descriptors
40
+ * carry the same epoch configuration (`scheme`, `version`, `currentEpoch`, and
41
+ * the ordered epoch ids; recipients and the `hmac` member deliberately
42
+ * excluded). `currentEpochOf` resolves the epoch a descriptor seals new writes
43
+ * under, failing closed on a stale or tampered roster.
44
+ *
45
+ * `x25519RecipientFromDidKey` is the one rule for turning a grantee named only
46
+ * by its Ed25519 `did:key` controller into a `RecipientPublicKey`, so a
47
+ * recipient key is always derived from an identifier both sides already hold
48
+ * rather than transmitted. `didKeyResolver` is the reverse direction, the
49
+ * resolver the codec hands the cipher.
50
+ *
51
+ * A decrypt that finds no key raises one of two classes, and a caller scanning
52
+ * rows must tell them apart: `UnknownEpochError` when the envelope's epoch is
53
+ * not on the descriptor the reader holds (a re-read may fix it) and
54
+ * `KeyUnwrapError` when the epoch IS listed but this reader has no key for it
55
+ * (never a recipient, or removed and the epoch rotated since -- re-reading
56
+ * cannot help). Both ship from this entry beside the cipher that raises them,
57
+ * so a consumer classifying what a cipher threw need not reach for the package
58
+ * root. Both assign their `name` explicitly, and a consumer whose cipher
59
+ * arrives through an injected seam matches on that name rather than
60
+ * `instanceof`, since the seam may resolve to a second copy of this package:
61
+ * `isKeyUnwrapError` here, and `isUnknownEpochError` on `./sync`, are those
62
+ * matchers.
63
+ */
64
+ export { EdvCodec } from './EdvCodec.js';
65
+ export type { CodecTransportFactory, EdvKeys } from './EdvCodec.js';
66
+ export { EDV_SCHEME_VERSION, JOSE_CONTENT_TYPE } from './constants.js';
67
+ export { ensureFirstEpoch, initRecipients, addRecipient, removeRecipient, replaceRecipient } from './recipients.js';
68
+ export type { RecipientPublicKey } from './recipients.js';
69
+ export { isEd25519DidKey, x25519RecipientFromDidKey } from './didKeyRecipient.js';
70
+ export { resourceDescriptorStore } from './descriptorStore.js';
71
+ export type { EncryptionDescriptorStore } from './descriptorStore.js';
72
+ export { didKeyResolver, mintEpoch, epochKeyIdFor, unwrapEpochSecret, wrapEpochSecret } from './epochCrypto.js';
73
+ export { hasKeyEpochs, epochRostersEqual, currentEpochOf } from './epochRoster.js';
74
+ export { resolveEpochKeys } from './epochKeys.js';
75
+ export type { ResolvedEpochKeys } from './epochKeys.js';
76
+ export { HMAC_KEY_TYPE, mintHmacKey, hmacKeyFromSecret, resolveHmacKey } from './hmacKey.js';
77
+ export type { BlindingKey } from './hmacKey.js';
78
+ export { createEdvDocCipher, createEdvEncryptOnlyDocCipher, ownerRecipient, EncryptOnlyCipherError, KeyUnwrapError, UnknownEpochError, isEncryptedEnvelope } from './docCipher.js';
79
+ export type { DocCipher, EdvDocCipher } from './docCipher.js';
80
+ export { isKeyUnwrapError } from '../sync/predicates.js';
81
+ //# sourceMappingURL=cipher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cipher.d.ts","sourceRoot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B,CAAA;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA"}
@@ -0,0 +1,75 @@
1
+ /*!
2
+ * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
+ */
4
+ /**
5
+ * The `@interop/was-client/edv/cipher` subpath entry: the log-free part of the
6
+ * offline half of encrypted (EDV-over-WAS) storage support. Everything here
7
+ * works on bytes and keys a caller already holds -- the codec, the doc
8
+ * ciphers, the key epochs, the recipient operations, `resourceDescriptorStore`
9
+ * and the blinding keys -- with no server and no resource log in the graph. A
10
+ * consumer that opens archived bytes, derives keys, or decrypts rows it
11
+ * already has imports this entry and evaluates no transport module and no
12
+ * `@interop/vh-resource-log` / `@interop/did-method-webvh` module. The one
13
+ * gated exception is `createEdvDocCipher({ spaceId })`, which loads the
14
+ * transport factory through `import()` for the chunked paths. A call that
15
+ * names no Space loads nothing.
16
+ *
17
+ * `@interop/was-client/edv/core` re-exports all of it and adds the
18
+ * log-governed descriptor stores, which read through a resource log verified
19
+ * by `@interop/vh-resource-log`. `@interop/was-client/edv` re-exports core in
20
+ * turn and adds the online set on top.
21
+ *
22
+ * Every encrypted collection carries a key-epoch roster from birth:
23
+ * `ensureFirstEpoch` installs epoch[0] at provision time (create-if-absent;
24
+ * the crypto-free `ensureSpaceAndCollection` only ensures the container), and
25
+ * `initRecipients` / `addRecipient` / `removeRecipient` manage the readers and
26
+ * rotate the epoch key, so the same key material transparently encrypts each
27
+ * write under the current epoch and decrypts any epoch a reader still holds.
28
+ * They mutate the descriptor through the descriptor-store seam: any
29
+ * `EncryptionDescriptorStore` -- e.g. `resourceDescriptorStore` for a
30
+ * descriptor hosted as a plain JSON Resource, or `./edv/core`'s
31
+ * `logGovernedDescriptorStore` for one governed by a resource log.
32
+ *
33
+ * A collection provisioned with `ensureFirstEpoch({ blindedIndex: true })` also
34
+ * carries a blinded-index HMAC key, distributed to recipients exactly like an
35
+ * epoch key (see `hmacKey.ts`). It is installed at provisioning or never, and
36
+ * never rotates.
37
+ *
38
+ * `hasKeyEpochs` and `epochRostersEqual` are the crypto-free predicates over a
39
+ * descriptor: whether it carries a usable roster, and whether two descriptors
40
+ * carry the same epoch configuration (`scheme`, `version`, `currentEpoch`, and
41
+ * the ordered epoch ids; recipients and the `hmac` member deliberately
42
+ * excluded). `currentEpochOf` resolves the epoch a descriptor seals new writes
43
+ * under, failing closed on a stale or tampered roster.
44
+ *
45
+ * `x25519RecipientFromDidKey` is the one rule for turning a grantee named only
46
+ * by its Ed25519 `did:key` controller into a `RecipientPublicKey`, so a
47
+ * recipient key is always derived from an identifier both sides already hold
48
+ * rather than transmitted. `didKeyResolver` is the reverse direction, the
49
+ * resolver the codec hands the cipher.
50
+ *
51
+ * A decrypt that finds no key raises one of two classes, and a caller scanning
52
+ * rows must tell them apart: `UnknownEpochError` when the envelope's epoch is
53
+ * not on the descriptor the reader holds (a re-read may fix it) and
54
+ * `KeyUnwrapError` when the epoch IS listed but this reader has no key for it
55
+ * (never a recipient, or removed and the epoch rotated since -- re-reading
56
+ * cannot help). Both ship from this entry beside the cipher that raises them,
57
+ * so a consumer classifying what a cipher threw need not reach for the package
58
+ * root. Both assign their `name` explicitly, and a consumer whose cipher
59
+ * arrives through an injected seam matches on that name rather than
60
+ * `instanceof`, since the seam may resolve to a second copy of this package:
61
+ * `isKeyUnwrapError` here, and `isUnknownEpochError` on `./sync`, are those
62
+ * matchers.
63
+ */
64
+ export { EdvCodec } from './EdvCodec.js';
65
+ export { EDV_SCHEME_VERSION, JOSE_CONTENT_TYPE } from './constants.js';
66
+ export { ensureFirstEpoch, initRecipients, addRecipient, removeRecipient, replaceRecipient } from './recipients.js';
67
+ export { isEd25519DidKey, x25519RecipientFromDidKey } from './didKeyRecipient.js';
68
+ export { resourceDescriptorStore } from './descriptorStore.js';
69
+ export { didKeyResolver, mintEpoch, epochKeyIdFor, unwrapEpochSecret, wrapEpochSecret } from './epochCrypto.js';
70
+ export { hasKeyEpochs, epochRostersEqual, currentEpochOf } from './epochRoster.js';
71
+ export { resolveEpochKeys } from './epochKeys.js';
72
+ export { HMAC_KEY_TYPE, mintHmacKey, hmacKeyFromSecret, resolveHmacKey } from './hmacKey.js';
73
+ export { createEdvDocCipher, createEdvEncryptOnlyDocCipher, ownerRecipient, EncryptOnlyCipherError, KeyUnwrapError, UnknownEpochError, isEncryptedEnvelope } from './docCipher.js';
74
+ export { isKeyUnwrapError } from '../sync/predicates.js';
75
+ //# sourceMappingURL=cipher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cipher.js","sourceRoot":"","sources":["../../src/edv/cipher.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACtE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EACjB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,eAAe,EACf,yBAAyB,EAC1B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,OAAO,EACL,cAAc,EACd,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACf,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEjD,OAAO,EACL,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,cAAc,EACf,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA"}
@@ -2,80 +2,24 @@
2
2
  * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
3
  */
4
4
  /**
5
- * The `@interop/was-client/edv/core` subpath entry: the offline half of
6
- * encrypted (EDV-over-WAS) storage support. Everything here works on bytes and
7
- * keys a caller already holds -- the codec, the doc ciphers, the key epochs,
8
- * the recipient operations, `resourceDescriptorStore`, the log-governed
9
- * descriptor stores and the blinding keys -- with no server in the graph. A
10
- * consumer that opens archived bytes, derives keys, or decrypts rows it already
11
- * has imports this entry and never evaluates a transport module. The one gated
12
- * exception is `createEdvDocCipher({ spaceId })`, which loads the transport
13
- * factory through `import()` for the chunked paths. A call that names no Space
14
- * loads nothing.
5
+ * The `@interop/was-client/edv/core` subpath entry:
6
+ * `@interop/was-client/edv/cipher` plus the log-governed descriptor stores
7
+ * (`logGovernedDescriptorStore`, `logGovernedCollectionDescriptorStore`, and
8
+ * their read/state helpers), which read through a resource log verified by
9
+ * `@interop/vh-resource-log`. Still transport-free -- no HTTP module and no
10
+ * server in the graph -- but that verification does pull
11
+ * `@interop/vh-resource-log` (and thereby `@interop/did-method-webvh`) in. A
12
+ * consumer that wants neither the transport graph nor the resource-log graph,
13
+ * such as `@interop/wallet-backup` opening an archive, imports `./edv/cipher`
14
+ * instead.
15
15
  *
16
16
  * `@interop/was-client/edv` re-exports all of it and adds the online set on
17
17
  * top (`WasTransport`, `createEdvEncryption`, `wasTransportFactory`,
18
18
  * `collectionDescriptorStore`, descriptor acquisition and the refresh policy),
19
19
  * so an online consumer keeps importing that one entry and nothing moves.
20
- *
21
- * Every encrypted collection carries a key-epoch roster from birth:
22
- * `ensureFirstEpoch` installs epoch[0] at provision time (create-if-absent;
23
- * the crypto-free `ensureSpaceAndCollection` only ensures the container), and
24
- * `initRecipients` / `addRecipient` / `removeRecipient` manage the readers and
25
- * rotate the epoch key, so the same key material transparently encrypts each
26
- * write under the current epoch and decrypts any epoch a reader still holds.
27
- * They mutate the descriptor through the descriptor-store seam: any
28
- * `EncryptionDescriptorStore` -- e.g. `resourceDescriptorStore` for a
29
- * descriptor hosted as a plain JSON Resource, or
30
- * `logGovernedDescriptorStore` for one governed by a resource log.
31
- *
32
- * A collection provisioned with `ensureFirstEpoch({ blindedIndex: true })` also
33
- * carries a blinded-index HMAC key, distributed to recipients exactly like an
34
- * epoch key (see `hmacKey.ts`). It is installed at provisioning or never, and
35
- * never rotates.
36
- *
37
- * `hasKeyEpochs` and `epochRostersEqual` are the crypto-free predicates over a
38
- * descriptor: whether it carries a usable roster, and whether two descriptors
39
- * carry the same epoch configuration (`scheme`, `version`, `currentEpoch`, and
40
- * the ordered epoch ids; recipients and the `hmac` member deliberately
41
- * excluded).
42
- *
43
- * `x25519RecipientFromDidKey` is the one rule for turning a grantee named only
44
- * by its Ed25519 `did:key` controller into a `RecipientPublicKey`, so a
45
- * recipient key is always derived from an identifier both sides already hold
46
- * rather than transmitted. `didKeyResolver` is the reverse direction, the
47
- * resolver the codec hands the cipher.
48
- *
49
- * A decrypt that finds no key raises one of two classes, and a caller scanning
50
- * rows must tell them apart: `UnknownEpochError` when the envelope's epoch is
51
- * not on the descriptor the reader holds (a re-read may fix it) and
52
- * `KeyUnwrapError` when the epoch IS listed but this reader has no key for it
53
- * (never a recipient, or removed and the epoch rotated since -- re-reading
54
- * cannot help). Both ship from this entry beside the cipher that raises them,
55
- * so a consumer classifying what a cipher threw need not reach for the package
56
- * root. Both assign their `name` explicitly, and a consumer whose cipher
57
- * arrives through an injected seam matches on that name rather than
58
- * `instanceof`, since the seam may resolve to a second copy of this package:
59
- * `isKeyUnwrapError` here, and `isUnknownEpochError` on `./sync`, are those
60
- * matchers.
61
20
  */
62
- export { EdvCodec } from './EdvCodec.js';
63
- export type { CodecTransportFactory, EdvKeys } from './EdvCodec.js';
64
- export { EDV_SCHEME_VERSION, JOSE_CONTENT_TYPE } from './constants.js';
65
- export { ensureFirstEpoch, initRecipients, addRecipient, removeRecipient, replaceRecipient } from './recipients.js';
66
- export type { RecipientPublicKey } from './recipients.js';
67
- export { isEd25519DidKey, x25519RecipientFromDidKey } from './didKeyRecipient.js';
68
- export { resourceDescriptorStore } from './descriptorStore.js';
69
- export type { EncryptionDescriptorStore } from './descriptorStore.js';
21
+ export { EdvCodec, EDV_SCHEME_VERSION, JOSE_CONTENT_TYPE, ensureFirstEpoch, initRecipients, addRecipient, removeRecipient, replaceRecipient, isEd25519DidKey, x25519RecipientFromDidKey, resourceDescriptorStore, didKeyResolver, mintEpoch, epochKeyIdFor, unwrapEpochSecret, wrapEpochSecret, hasKeyEpochs, epochRostersEqual, currentEpochOf, resolveEpochKeys, HMAC_KEY_TYPE, mintHmacKey, hmacKeyFromSecret, resolveHmacKey, createEdvDocCipher, createEdvEncryptOnlyDocCipher, ownerRecipient, EncryptOnlyCipherError, KeyUnwrapError, UnknownEpochError, isEncryptedEnvelope, isKeyUnwrapError } from './cipher.js';
22
+ export type { CodecTransportFactory, EdvKeys, RecipientPublicKey, EncryptionDescriptorStore, ResolvedEpochKeys, BlindingKey, DocCipher, EdvDocCipher } from './cipher.js';
70
23
  export { EPOCH_CONFIGURATION_STATE_TYPE, logGovernedCollectionDescriptorStore, logGovernedDescriptorStore, readGovernedEpochConfiguration, toEpochConfigurationState } from './logGovernedDescriptorStore.js';
71
24
  export type { LogGovernedDescriptorStore } from './logGovernedDescriptorStore.js';
72
- export { didKeyResolver, mintEpoch, epochKeyIdFor, unwrapEpochSecret, wrapEpochSecret } from './epochCrypto.js';
73
- export { hasKeyEpochs, epochRostersEqual } from './epochRoster.js';
74
- export { resolveEpochKeys } from './epochKeys.js';
75
- export type { ResolvedEpochKeys } from './epochKeys.js';
76
- export { HMAC_KEY_TYPE, mintHmacKey, hmacKeyFromSecret, resolveHmacKey } from './hmacKey.js';
77
- export type { BlindingKey } from './hmacKey.js';
78
- export { createEdvDocCipher, createEdvEncryptOnlyDocCipher, ownerRecipient, EncryptOnlyCipherError, KeyUnwrapError, UnknownEpochError, isEncryptedEnvelope } from './docCipher.js';
79
- export type { DocCipher, EdvDocCipher } from './docCipher.js';
80
- export { isKeyUnwrapError } from '../sync/predicates.js';
81
25
  //# sourceMappingURL=core.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/edv/core.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,YAAY,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AACnE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACtE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EACjB,MAAM,iBAAiB,CAAA;AACxB,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EACL,eAAe,EACf,yBAAyB,EAC1B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AACrE,OAAO,EACL,8BAA8B,EAC9B,oCAAoC,EACpC,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EAC1B,MAAM,iCAAiC,CAAA;AACxC,YAAY,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA;AACjF,OAAO,EACL,cAAc,EACd,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACvD,OAAO,EACL,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,cAAc,EACf,MAAM,cAAc,CAAA;AACrB,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,gBAAgB,CAAA;AACvB,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA"}
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/edv/core.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,uBAAuB,EACvB,cAAc,EACd,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,aAAa,CAAA;AACpB,YAAY,EACV,qBAAqB,EACrB,OAAO,EACP,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,YAAY,EACb,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,8BAA8B,EAC9B,oCAAoC,EACpC,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EAC1B,MAAM,iCAAiC,CAAA;AACxC,YAAY,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAA"}
package/dist/edv/core.js CHANGED
@@ -2,73 +2,22 @@
2
2
  * Copyright (c) 2026 Interop Alliance. All rights reserved.
3
3
  */
4
4
  /**
5
- * The `@interop/was-client/edv/core` subpath entry: the offline half of
6
- * encrypted (EDV-over-WAS) storage support. Everything here works on bytes and
7
- * keys a caller already holds -- the codec, the doc ciphers, the key epochs,
8
- * the recipient operations, `resourceDescriptorStore`, the log-governed
9
- * descriptor stores and the blinding keys -- with no server in the graph. A
10
- * consumer that opens archived bytes, derives keys, or decrypts rows it already
11
- * has imports this entry and never evaluates a transport module. The one gated
12
- * exception is `createEdvDocCipher({ spaceId })`, which loads the transport
13
- * factory through `import()` for the chunked paths. A call that names no Space
14
- * loads nothing.
5
+ * The `@interop/was-client/edv/core` subpath entry:
6
+ * `@interop/was-client/edv/cipher` plus the log-governed descriptor stores
7
+ * (`logGovernedDescriptorStore`, `logGovernedCollectionDescriptorStore`, and
8
+ * their read/state helpers), which read through a resource log verified by
9
+ * `@interop/vh-resource-log`. Still transport-free -- no HTTP module and no
10
+ * server in the graph -- but that verification does pull
11
+ * `@interop/vh-resource-log` (and thereby `@interop/did-method-webvh`) in. A
12
+ * consumer that wants neither the transport graph nor the resource-log graph,
13
+ * such as `@interop/wallet-backup` opening an archive, imports `./edv/cipher`
14
+ * instead.
15
15
  *
16
16
  * `@interop/was-client/edv` re-exports all of it and adds the online set on
17
17
  * top (`WasTransport`, `createEdvEncryption`, `wasTransportFactory`,
18
18
  * `collectionDescriptorStore`, descriptor acquisition and the refresh policy),
19
19
  * so an online consumer keeps importing that one entry and nothing moves.
20
- *
21
- * Every encrypted collection carries a key-epoch roster from birth:
22
- * `ensureFirstEpoch` installs epoch[0] at provision time (create-if-absent;
23
- * the crypto-free `ensureSpaceAndCollection` only ensures the container), and
24
- * `initRecipients` / `addRecipient` / `removeRecipient` manage the readers and
25
- * rotate the epoch key, so the same key material transparently encrypts each
26
- * write under the current epoch and decrypts any epoch a reader still holds.
27
- * They mutate the descriptor through the descriptor-store seam: any
28
- * `EncryptionDescriptorStore` -- e.g. `resourceDescriptorStore` for a
29
- * descriptor hosted as a plain JSON Resource, or
30
- * `logGovernedDescriptorStore` for one governed by a resource log.
31
- *
32
- * A collection provisioned with `ensureFirstEpoch({ blindedIndex: true })` also
33
- * carries a blinded-index HMAC key, distributed to recipients exactly like an
34
- * epoch key (see `hmacKey.ts`). It is installed at provisioning or never, and
35
- * never rotates.
36
- *
37
- * `hasKeyEpochs` and `epochRostersEqual` are the crypto-free predicates over a
38
- * descriptor: whether it carries a usable roster, and whether two descriptors
39
- * carry the same epoch configuration (`scheme`, `version`, `currentEpoch`, and
40
- * the ordered epoch ids; recipients and the `hmac` member deliberately
41
- * excluded).
42
- *
43
- * `x25519RecipientFromDidKey` is the one rule for turning a grantee named only
44
- * by its Ed25519 `did:key` controller into a `RecipientPublicKey`, so a
45
- * recipient key is always derived from an identifier both sides already hold
46
- * rather than transmitted. `didKeyResolver` is the reverse direction, the
47
- * resolver the codec hands the cipher.
48
- *
49
- * A decrypt that finds no key raises one of two classes, and a caller scanning
50
- * rows must tell them apart: `UnknownEpochError` when the envelope's epoch is
51
- * not on the descriptor the reader holds (a re-read may fix it) and
52
- * `KeyUnwrapError` when the epoch IS listed but this reader has no key for it
53
- * (never a recipient, or removed and the epoch rotated since -- re-reading
54
- * cannot help). Both ship from this entry beside the cipher that raises them,
55
- * so a consumer classifying what a cipher threw need not reach for the package
56
- * root. Both assign their `name` explicitly, and a consumer whose cipher
57
- * arrives through an injected seam matches on that name rather than
58
- * `instanceof`, since the seam may resolve to a second copy of this package:
59
- * `isKeyUnwrapError` here, and `isUnknownEpochError` on `./sync`, are those
60
- * matchers.
61
20
  */
62
- export { EdvCodec } from './EdvCodec.js';
63
- export { EDV_SCHEME_VERSION, JOSE_CONTENT_TYPE } from './constants.js';
64
- export { ensureFirstEpoch, initRecipients, addRecipient, removeRecipient, replaceRecipient } from './recipients.js';
65
- export { isEd25519DidKey, x25519RecipientFromDidKey } from './didKeyRecipient.js';
66
- export { resourceDescriptorStore } from './descriptorStore.js';
21
+ export { EdvCodec, EDV_SCHEME_VERSION, JOSE_CONTENT_TYPE, ensureFirstEpoch, initRecipients, addRecipient, removeRecipient, replaceRecipient, isEd25519DidKey, x25519RecipientFromDidKey, resourceDescriptorStore, didKeyResolver, mintEpoch, epochKeyIdFor, unwrapEpochSecret, wrapEpochSecret, hasKeyEpochs, epochRostersEqual, currentEpochOf, resolveEpochKeys, HMAC_KEY_TYPE, mintHmacKey, hmacKeyFromSecret, resolveHmacKey, createEdvDocCipher, createEdvEncryptOnlyDocCipher, ownerRecipient, EncryptOnlyCipherError, KeyUnwrapError, UnknownEpochError, isEncryptedEnvelope, isKeyUnwrapError } from './cipher.js';
67
22
  export { EPOCH_CONFIGURATION_STATE_TYPE, logGovernedCollectionDescriptorStore, logGovernedDescriptorStore, readGovernedEpochConfiguration, toEpochConfigurationState } from './logGovernedDescriptorStore.js';
68
- export { didKeyResolver, mintEpoch, epochKeyIdFor, unwrapEpochSecret, wrapEpochSecret } from './epochCrypto.js';
69
- export { hasKeyEpochs, epochRostersEqual } from './epochRoster.js';
70
- export { resolveEpochKeys } from './epochKeys.js';
71
- export { HMAC_KEY_TYPE, mintHmacKey, hmacKeyFromSecret, resolveHmacKey } from './hmacKey.js';
72
- export { createEdvDocCipher, createEdvEncryptOnlyDocCipher, ownerRecipient, EncryptOnlyCipherError, KeyUnwrapError, UnknownEpochError, isEncryptedEnvelope } from './docCipher.js';
73
- export { isKeyUnwrapError } from '../sync/predicates.js';
74
23
  //# sourceMappingURL=core.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["../../src/edv/core.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACtE,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EACjB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,eAAe,EACf,yBAAyB,EAC1B,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,OAAO,EACL,8BAA8B,EAC9B,oCAAoC,EACpC,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EAC1B,MAAM,iCAAiC,CAAA;AAExC,OAAO,EACL,cAAc,EACd,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,eAAe,EAChB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEjD,OAAO,EACL,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,cAAc,EACf,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA"}
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../../src/edv/core.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,uBAAuB,EACvB,cAAc,EACd,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,aAAa,CAAA;AAWpB,OAAO,EACL,8BAA8B,EAC9B,oCAAoC,EACpC,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EAC1B,MAAM,iCAAiC,CAAA"}
@@ -61,7 +61,8 @@ export declare function epochRostersEqual(current?: CollectionEncryption, next?:
61
61
  * @param options.epochs {CollectionEncryptionEpoch[]} the non-empty roster
62
62
  * @param [options.currentEpoch] {string} the descriptor's declared write epoch
63
63
  * @param options.label {string} names the collection in the error message
64
- * @returns {CollectionEncryptionEpoch}
64
+ * @returns {CollectionEncryptionEpoch} the roster entry `currentEpoch` names
65
+ * @throws {EncryptionError} when `currentEpoch` is absent or unlisted
65
66
  */
66
67
  export declare function currentEpochOf({ epochs, currentEpoch, label }: {
67
68
  epochs: CollectionEncryptionEpoch[];
@@ -1 +1 @@
1
- {"version":3,"file":"epochRoster.d.ts","sourceRoot":"","sources":["../../src/edv/epochRoster.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACV,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,aAAa,CAAA;AAEpB;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,UAAU,CAAC,EAAE,oBAAoB,GAChC,UAAU,IAAI,oBAAoB,GAAG;IACtC,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,yBAAyB,EAAE,CAAA;CACpC,CAOA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,CAAC,EAAE,oBAAoB,EAC9B,IAAI,CAAC,EAAE,oBAAoB,GAC1B,OAAO,CAkBT;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,YAAY,EACZ,KAAK,EACN,EAAE;IACD,MAAM,EAAE,yBAAyB,EAAE,CAAA;IACnC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;CACd,GAAG,yBAAyB,CAkB5B"}
1
+ {"version":3,"file":"epochRoster.d.ts","sourceRoot":"","sources":["../../src/edv/epochRoster.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EACV,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,aAAa,CAAA;AAEpB;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,UAAU,CAAC,EAAE,oBAAoB,GAChC,UAAU,IAAI,oBAAoB,GAAG;IACtC,YAAY,EAAE,MAAM,CAAA;IACpB,MAAM,EAAE,yBAAyB,EAAE,CAAA;CACpC,CAOA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,CAAC,EAAE,oBAAoB,EAC9B,IAAI,CAAC,EAAE,oBAAoB,GAC1B,OAAO,CAkBT;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,YAAY,EACZ,KAAK,EACN,EAAE;IACD,MAAM,EAAE,yBAAyB,EAAE,CAAA;IACnC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,KAAK,EAAE,MAAM,CAAA;CACd,GAAG,yBAAyB,CAkB5B"}
@@ -4,7 +4,8 @@
4
4
  /**
5
5
  * Crypto-free predicates over a Collection's `encryption` descriptor: whether it
6
6
  * carries a usable key-epoch roster, and whether two descriptors carry the same
7
- * epoch configuration. Neither touches key material, so a caller deciding what
7
+ * epoch configuration; and which roster entry a descriptor seals new writes
8
+ * under. None touches key material, so a caller deciding what
8
9
  * to do with a descriptor -- open it, refuse it fail-closed, rebuild a cipher
9
10
  * for it -- does not have to pull in the epoch crypto to ask.
10
11
  *
@@ -94,7 +95,8 @@ export function epochRostersEqual(current, next) {
94
95
  * @param options.epochs {CollectionEncryptionEpoch[]} the non-empty roster
95
96
  * @param [options.currentEpoch] {string} the descriptor's declared write epoch
96
97
  * @param options.label {string} names the collection in the error message
97
- * @returns {CollectionEncryptionEpoch}
98
+ * @returns {CollectionEncryptionEpoch} the roster entry `currentEpoch` names
99
+ * @throws {EncryptionError} when `currentEpoch` is absent or unlisted
98
100
  */
99
101
  export function currentEpochOf({ epochs, currentEpoch, label }) {
100
102
  if (currentEpoch === undefined) {
@@ -1 +1 @@
1
- {"version":3,"file":"epochRoster.js","sourceRoot":"","sources":["../../src/edv/epochRoster.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAMnD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAC1B,UAAiC;IAKjC,OAAO,CACL,UAAU,KAAK,SAAS;QACxB,OAAO,UAAU,CAAC,YAAY,KAAK,QAAQ;QAC3C,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,CAAC;QAChC,UAAU,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAC7B,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,iBAAiB,CAC/B,OAA8B,EAC9B,IAA2B;IAE3B,IAAI,OAAO,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QAChD,OAAO,OAAO,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,CAAA;IACpD,CAAC;IACD,IACE,OAAO,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM;QAC9B,CAAC,OAAO,CAAC,OAAO,IAAI,kBAAkB,CAAC;YACrC,CAAC,IAAI,CAAC,OAAO,IAAI,kBAAkB,C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AAK,CAAC,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,KAAK,OAAO,CAAC,KAAK,CAAC,CAAC,CACvD,CAAA;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,cAAc,CAAC,EAC7B,MAAM,EACN,YAAY,EACZ,KAAK,EAKN;IACC,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,MAAM,IAAI,eAAe,CACvB,cAAc,KAAK,kDAAkD;YACnE,mEAAmE;YACnE,mEAAmE,CACtE,CAAA;IACH,CAAC;IACD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,YAAY,CAAC,CAAA;IAC7D,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,eAAe,CACvB,cAAc,KAAK,2BAA2B,YAAY,YAAY;YACpE,gEAAgE;YAChE,iEAAiE;YACjE,UAAU,CACb,CAAA;IACH,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
@@ -56,7 +56,7 @@
56
56
  * re-reads the description, swaps itself, and retries exactly once per
57
57
  * instance.
58
58
  */
59
- export { EdvCodec, EDV_SCHEME_VERSION, JOSE_CONTENT_TYPE, ensureFirstEpoch, initRecipients, addRecipient, removeRecipient, replaceRecipient, isEd25519DidKey, x25519RecipientFromDidKey, resourceDescriptorStore, EPOCH_CONFIGURATION_STATE_TYPE, logGovernedCollectionDescriptorStore, logGovernedDescriptorStore, readGovernedEpochConfiguration, toEpochConfigurationState, didKeyResolver, mintEpoch, epochKeyIdFor, unwrapEpochSecret, wrapEpochSecret, hasKeyEpochs, epochRostersEqual, resolveEpochKeys, HMAC_KEY_TYPE, mintHmacKey, hmacKeyFromSecret, resolveHmacKey, createEdvDocCipher, createEdvEncryptOnlyDocCipher, ownerRecipient, EncryptOnlyCipherError, KeyUnwrapError, UnknownEpochError, isEncryptedEnvelope, isKeyUnwrapError } from './core.js';
59
+ export { EdvCodec, EDV_SCHEME_VERSION, JOSE_CONTENT_TYPE, ensureFirstEpoch, initRecipients, addRecipient, removeRecipient, replaceRecipient, isEd25519DidKey, x25519RecipientFromDidKey, resourceDescriptorStore, EPOCH_CONFIGURATION_STATE_TYPE, logGovernedCollectionDescriptorStore, logGovernedDescriptorStore, readGovernedEpochConfiguration, toEpochConfigurationState, didKeyResolver, mintEpoch, epochKeyIdFor, unwrapEpochSecret, wrapEpochSecret, hasKeyEpochs, epochRostersEqual, currentEpochOf, resolveEpochKeys, HMAC_KEY_TYPE, mintHmacKey, hmacKeyFromSecret, resolveHmacKey, createEdvDocCipher, createEdvEncryptOnlyDocCipher, ownerRecipient, EncryptOnlyCipherError, KeyUnwrapError, UnknownEpochError, isEncryptedEnvelope, isKeyUnwrapError } from './core.js';
60
60
  export type { CodecTransportFactory, EdvKeys, RecipientPublicKey, EncryptionDescriptorStore, LogGovernedDescriptorStore, ResolvedEpochKeys, BlindingKey, DocCipher, EdvDocCipher } from './core.js';
61
61
  export { createEdvEncryption } from './encryption.js';
62
62
  export { wasTransportFactory } from './transportFactory.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/edv/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAKH,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,uBAAuB,EACvB,8BAA8B,EAC9B,oCAAoC,EACpC,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EACzB,cAAc,EACd,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,WAAW,CAAA;AAClB,YAAY,EACV,qBAAqB,EACrB,OAAO,EACP,kBAAkB,EAClB,yBAAyB,EACzB,0BAA0B,EAC1B,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,YAAY,EACb,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/edv/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAKH,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,uBAAuB,EACvB,8BAA8B,EAC9B,oCAAoC,EACpC,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EACzB,cAAc,EACd,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,WAAW,CAAA;AAClB,YAAY,EACV,qBAAqB,EACrB,OAAO,EACP,kBAAkB,EAClB,yBAAyB,EACzB,0BAA0B,EAC1B,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,YAAY,EACb,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAA"}
package/dist/edv/index.js CHANGED
@@ -60,7 +60,7 @@
60
60
  // This entry is the one every online consumer imports, so its surface is
61
61
  // stated here: an export added to `core.ts` widens `./edv/core` only, and
62
62
  // widening `./edv` takes an edit to this list.
63
- export { EdvCodec, EDV_SCHEME_VERSION, JOSE_CONTENT_TYPE, ensureFirstEpoch, initRecipients, addRecipient, removeRecipient, replaceRecipient, isEd25519DidKey, x25519RecipientFromDidKey, resourceDescriptorStore, EPOCH_CONFIGURATION_STATE_TYPE, logGovernedCollectionDescriptorStore, logGovernedDescriptorStore, readGovernedEpochConfiguration, toEpochConfigurationState, didKeyResolver, mintEpoch, epochKeyIdFor, unwrapEpochSecret, wrapEpochSecret, hasKeyEpochs, epochRostersEqual, resolveEpochKeys, HMAC_KEY_TYPE, mintHmacKey, hmacKeyFromSecret, resolveHmacKey, createEdvDocCipher, createEdvEncryptOnlyDocCipher, ownerRecipient, EncryptOnlyCipherError, KeyUnwrapError, UnknownEpochError, isEncryptedEnvelope, isKeyUnwrapError } from './core.js';
63
+ export { EdvCodec, EDV_SCHEME_VERSION, JOSE_CONTENT_TYPE, ensureFirstEpoch, initRecipients, addRecipient, removeRecipient, replaceRecipient, isEd25519DidKey, x25519RecipientFromDidKey, resourceDescriptorStore, EPOCH_CONFIGURATION_STATE_TYPE, logGovernedCollectionDescriptorStore, logGovernedDescriptorStore, readGovernedEpochConfiguration, toEpochConfigurationState, didKeyResolver, mintEpoch, epochKeyIdFor, unwrapEpochSecret, wrapEpochSecret, hasKeyEpochs, epochRostersEqual, currentEpochOf, resolveEpochKeys, HMAC_KEY_TYPE, mintHmacKey, hmacKeyFromSecret, resolveHmacKey, createEdvDocCipher, createEdvEncryptOnlyDocCipher, ownerRecipient, EncryptOnlyCipherError, KeyUnwrapError, UnknownEpochError, isEncryptedEnvelope, isKeyUnwrapError } from './core.js';
64
64
  export { createEdvEncryption } from './encryption.js';
65
65
  export { wasTransportFactory } from './transportFactory.js';
66
66
  export { WasTransport } from './WasTransport.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/edv/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,4EAA4E;AAC5E,yEAAyE;AACzE,0EAA0E;AAC1E,+CAA+C;AAC/C,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,uBAAuB,EACvB,8BAA8B,EAC9B,oCAAoC,EACpC,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EACzB,cAAc,EACd,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,WAAW,CAAA;AAYlB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AAKrB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/edv/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,4EAA4E;AAC5E,yEAAyE;AACzE,0EAA0E;AAC1E,+CAA+C;AAC/C,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,yBAAyB,EACzB,uBAAuB,EACvB,8BAA8B,EAC9B,oCAAoC,EACpC,0BAA0B,EAC1B,8BAA8B,EAC9B,yBAAyB,EACzB,cAAc,EACd,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,6BAA6B,EAC7B,cAAc,EACd,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,WAAW,CAAA;AAYlB,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,cAAc,CAAA;AAKrB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@interop/was-client",
3
3
  "description": "A developer-friendly client for Wallet Attached Storage (WAS) servers.",
4
- "version": "0.70.0",
4
+ "version": "0.72.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "pnpm run clear && tsc",
@@ -43,6 +43,12 @@
43
43
  "import": "./dist/edv/core.js",
44
44
  "default": "./dist/edv/core.js"
45
45
  },
46
+ "./edv/cipher": {
47
+ "types": "./dist/edv/cipher.d.ts",
48
+ "react-native": "./dist/edv/cipher.js",
49
+ "import": "./dist/edv/cipher.js",
50
+ "default": "./dist/edv/cipher.js"
51
+ },
46
52
  "./paths": {
47
53
  "types": "./dist/paths.d.ts",
48
54
  "react-native": "./dist/paths.js",
@@ -73,26 +79,26 @@
73
79
  "types": "dist/index.d.ts",
74
80
  "sideEffects": false,
75
81
  "dependencies": {
76
- "@interop/capability-agent": "^0.2.0",
77
- "@interop/data-integrity-core": "^8.7.1",
78
- "@interop/ed25519-signature": "^7.2.2",
79
- "@interop/edv-client": "^17.9.0",
80
- "@interop/ezcap": "^7.4.9",
82
+ "@interop/capability-agent": "^0.2.1",
83
+ "@interop/data-integrity-core": "^8.8.0",
84
+ "@interop/ed25519-signature": "^7.2.3",
85
+ "@interop/edv-client": "^17.9.1",
86
+ "@interop/ezcap": "^7.4.10",
81
87
  "@interop/http-client": "^1.0.5",
82
- "@interop/minimal-cipher": "^7.10.2",
83
- "@interop/storage-core": "^0.18.0",
84
- "@interop/vh-resource-log": "^0.5.2",
85
- "@interop/x25519-key-agreement-key": "^5.4.0",
88
+ "@interop/minimal-cipher": "^7.10.3",
89
+ "@interop/storage-core": "^0.19.1",
90
+ "@interop/vh-resource-log": "^0.5.3",
91
+ "@interop/x25519-key-agreement-key": "^5.4.1",
86
92
  "@noble/hashes": "^2.3.0",
87
93
  "@scure/base": "^2.3.0",
88
94
  "json-canonicalize": "3.0.0"
89
95
  },
90
96
  "devDependencies": {
91
97
  "@eslint/js": "^10.0.1",
92
- "@interop/data-integrity-proof": "3.4.5",
93
- "@interop/ed25519-verification-key": "^8.2.0",
94
- "@interop/jsonld-signatures": "11.8.5",
95
- "@interop/zcap": "11.3.1",
98
+ "@interop/data-integrity-proof": "3.4.6",
99
+ "@interop/ed25519-verification-key": "^8.2.1",
100
+ "@interop/jsonld-signatures": "11.8.6",
101
+ "@interop/zcap": "11.3.2",
96
102
  "@playwright/test": "^1.62.1",
97
103
  "@types/node": "^26.1.2",
98
104
  "@vitest/coverage-v8": "^4.1.10",