@noy-db/hub 0.1.0-pre.3

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 (195) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +197 -0
  3. package/dist/aggregate/index.cjs +476 -0
  4. package/dist/aggregate/index.cjs.map +1 -0
  5. package/dist/aggregate/index.d.cts +38 -0
  6. package/dist/aggregate/index.d.ts +38 -0
  7. package/dist/aggregate/index.js +53 -0
  8. package/dist/aggregate/index.js.map +1 -0
  9. package/dist/blobs/index.cjs +1480 -0
  10. package/dist/blobs/index.cjs.map +1 -0
  11. package/dist/blobs/index.d.cts +45 -0
  12. package/dist/blobs/index.d.ts +45 -0
  13. package/dist/blobs/index.js +48 -0
  14. package/dist/blobs/index.js.map +1 -0
  15. package/dist/bundle/index.cjs +436 -0
  16. package/dist/bundle/index.cjs.map +1 -0
  17. package/dist/bundle/index.d.cts +7 -0
  18. package/dist/bundle/index.d.ts +7 -0
  19. package/dist/bundle/index.js +40 -0
  20. package/dist/bundle/index.js.map +1 -0
  21. package/dist/chunk-2QR2PQTT.js +217 -0
  22. package/dist/chunk-2QR2PQTT.js.map +1 -0
  23. package/dist/chunk-4OWFYIDQ.js +79 -0
  24. package/dist/chunk-4OWFYIDQ.js.map +1 -0
  25. package/dist/chunk-5AATM2M2.js +90 -0
  26. package/dist/chunk-5AATM2M2.js.map +1 -0
  27. package/dist/chunk-ACLDOTNQ.js +543 -0
  28. package/dist/chunk-ACLDOTNQ.js.map +1 -0
  29. package/dist/chunk-BTDCBVJW.js +160 -0
  30. package/dist/chunk-BTDCBVJW.js.map +1 -0
  31. package/dist/chunk-CIMZBAZB.js +72 -0
  32. package/dist/chunk-CIMZBAZB.js.map +1 -0
  33. package/dist/chunk-E445ICYI.js +365 -0
  34. package/dist/chunk-E445ICYI.js.map +1 -0
  35. package/dist/chunk-EXQRC2L4.js +722 -0
  36. package/dist/chunk-EXQRC2L4.js.map +1 -0
  37. package/dist/chunk-FZU343FL.js +32 -0
  38. package/dist/chunk-FZU343FL.js.map +1 -0
  39. package/dist/chunk-GJILMRPO.js +354 -0
  40. package/dist/chunk-GJILMRPO.js.map +1 -0
  41. package/dist/chunk-GOUT6DND.js +1285 -0
  42. package/dist/chunk-GOUT6DND.js.map +1 -0
  43. package/dist/chunk-J66GRPNH.js +111 -0
  44. package/dist/chunk-J66GRPNH.js.map +1 -0
  45. package/dist/chunk-M2F2JAWB.js +464 -0
  46. package/dist/chunk-M2F2JAWB.js.map +1 -0
  47. package/dist/chunk-M5INGEFC.js +84 -0
  48. package/dist/chunk-M5INGEFC.js.map +1 -0
  49. package/dist/chunk-M62XNWRA.js +72 -0
  50. package/dist/chunk-M62XNWRA.js.map +1 -0
  51. package/dist/chunk-MR4424N3.js +275 -0
  52. package/dist/chunk-MR4424N3.js.map +1 -0
  53. package/dist/chunk-NPC4LFV5.js +132 -0
  54. package/dist/chunk-NPC4LFV5.js.map +1 -0
  55. package/dist/chunk-NXFEYLVG.js +311 -0
  56. package/dist/chunk-NXFEYLVG.js.map +1 -0
  57. package/dist/chunk-R36SIKES.js +79 -0
  58. package/dist/chunk-R36SIKES.js.map +1 -0
  59. package/dist/chunk-TDR6T5CJ.js +381 -0
  60. package/dist/chunk-TDR6T5CJ.js.map +1 -0
  61. package/dist/chunk-UF3BUNQZ.js +1 -0
  62. package/dist/chunk-UF3BUNQZ.js.map +1 -0
  63. package/dist/chunk-UQFSPSWG.js +1109 -0
  64. package/dist/chunk-UQFSPSWG.js.map +1 -0
  65. package/dist/chunk-USKYUS74.js +793 -0
  66. package/dist/chunk-USKYUS74.js.map +1 -0
  67. package/dist/chunk-XCL3WP6J.js +121 -0
  68. package/dist/chunk-XCL3WP6J.js.map +1 -0
  69. package/dist/chunk-XHFOENR2.js +680 -0
  70. package/dist/chunk-XHFOENR2.js.map +1 -0
  71. package/dist/chunk-ZFKD4QMV.js +430 -0
  72. package/dist/chunk-ZFKD4QMV.js.map +1 -0
  73. package/dist/chunk-ZLMV3TUA.js +490 -0
  74. package/dist/chunk-ZLMV3TUA.js.map +1 -0
  75. package/dist/chunk-ZRG4V3F5.js +17 -0
  76. package/dist/chunk-ZRG4V3F5.js.map +1 -0
  77. package/dist/consent/index.cjs +204 -0
  78. package/dist/consent/index.cjs.map +1 -0
  79. package/dist/consent/index.d.cts +24 -0
  80. package/dist/consent/index.d.ts +24 -0
  81. package/dist/consent/index.js +23 -0
  82. package/dist/consent/index.js.map +1 -0
  83. package/dist/crdt/index.cjs +152 -0
  84. package/dist/crdt/index.cjs.map +1 -0
  85. package/dist/crdt/index.d.cts +30 -0
  86. package/dist/crdt/index.d.ts +30 -0
  87. package/dist/crdt/index.js +24 -0
  88. package/dist/crdt/index.js.map +1 -0
  89. package/dist/crypto-IVKU7YTT.js +44 -0
  90. package/dist/crypto-IVKU7YTT.js.map +1 -0
  91. package/dist/delegation-XDJCBTI2.js +16 -0
  92. package/dist/delegation-XDJCBTI2.js.map +1 -0
  93. package/dist/dev-unlock-CeXic1xC.d.cts +263 -0
  94. package/dist/dev-unlock-KrKkcqD3.d.ts +263 -0
  95. package/dist/hash-9KO1BGxh.d.cts +63 -0
  96. package/dist/hash-ChfJjRjQ.d.ts +63 -0
  97. package/dist/history/index.cjs +1215 -0
  98. package/dist/history/index.cjs.map +1 -0
  99. package/dist/history/index.d.cts +62 -0
  100. package/dist/history/index.d.ts +62 -0
  101. package/dist/history/index.js +79 -0
  102. package/dist/history/index.js.map +1 -0
  103. package/dist/i18n/index.cjs +746 -0
  104. package/dist/i18n/index.cjs.map +1 -0
  105. package/dist/i18n/index.d.cts +38 -0
  106. package/dist/i18n/index.d.ts +38 -0
  107. package/dist/i18n/index.js +55 -0
  108. package/dist/i18n/index.js.map +1 -0
  109. package/dist/index-BRHBCmLt.d.ts +1940 -0
  110. package/dist/index-C8kQtmOk.d.ts +380 -0
  111. package/dist/index-DN-J-5wT.d.cts +1940 -0
  112. package/dist/index-DhjMjz7L.d.cts +380 -0
  113. package/dist/index.cjs +14756 -0
  114. package/dist/index.cjs.map +1 -0
  115. package/dist/index.d.cts +269 -0
  116. package/dist/index.d.ts +269 -0
  117. package/dist/index.js +6085 -0
  118. package/dist/index.js.map +1 -0
  119. package/dist/indexing/index.cjs +736 -0
  120. package/dist/indexing/index.cjs.map +1 -0
  121. package/dist/indexing/index.d.cts +36 -0
  122. package/dist/indexing/index.d.ts +36 -0
  123. package/dist/indexing/index.js +77 -0
  124. package/dist/indexing/index.js.map +1 -0
  125. package/dist/lazy-builder-BwEoBQZ9.d.ts +304 -0
  126. package/dist/lazy-builder-CZVLKh0Z.d.cts +304 -0
  127. package/dist/ledger-2NX4L7PN.js +33 -0
  128. package/dist/ledger-2NX4L7PN.js.map +1 -0
  129. package/dist/mime-magic-CBBSOkjm.d.cts +50 -0
  130. package/dist/mime-magic-CBBSOkjm.d.ts +50 -0
  131. package/dist/periods/index.cjs +1035 -0
  132. package/dist/periods/index.cjs.map +1 -0
  133. package/dist/periods/index.d.cts +21 -0
  134. package/dist/periods/index.d.ts +21 -0
  135. package/dist/periods/index.js +25 -0
  136. package/dist/periods/index.js.map +1 -0
  137. package/dist/predicate-SBHmi6D0.d.cts +161 -0
  138. package/dist/predicate-SBHmi6D0.d.ts +161 -0
  139. package/dist/query/index.cjs +1957 -0
  140. package/dist/query/index.cjs.map +1 -0
  141. package/dist/query/index.d.cts +3 -0
  142. package/dist/query/index.d.ts +3 -0
  143. package/dist/query/index.js +62 -0
  144. package/dist/query/index.js.map +1 -0
  145. package/dist/session/index.cjs +487 -0
  146. package/dist/session/index.cjs.map +1 -0
  147. package/dist/session/index.d.cts +45 -0
  148. package/dist/session/index.d.ts +45 -0
  149. package/dist/session/index.js +44 -0
  150. package/dist/session/index.js.map +1 -0
  151. package/dist/shadow/index.cjs +133 -0
  152. package/dist/shadow/index.cjs.map +1 -0
  153. package/dist/shadow/index.d.cts +16 -0
  154. package/dist/shadow/index.d.ts +16 -0
  155. package/dist/shadow/index.js +20 -0
  156. package/dist/shadow/index.js.map +1 -0
  157. package/dist/store/index.cjs +1069 -0
  158. package/dist/store/index.cjs.map +1 -0
  159. package/dist/store/index.d.cts +491 -0
  160. package/dist/store/index.d.ts +491 -0
  161. package/dist/store/index.js +34 -0
  162. package/dist/store/index.js.map +1 -0
  163. package/dist/strategy-BSxFXGzb.d.cts +110 -0
  164. package/dist/strategy-BSxFXGzb.d.ts +110 -0
  165. package/dist/strategy-D-SrOLCl.d.cts +548 -0
  166. package/dist/strategy-D-SrOLCl.d.ts +548 -0
  167. package/dist/sync/index.cjs +1062 -0
  168. package/dist/sync/index.cjs.map +1 -0
  169. package/dist/sync/index.d.cts +42 -0
  170. package/dist/sync/index.d.ts +42 -0
  171. package/dist/sync/index.js +28 -0
  172. package/dist/sync/index.js.map +1 -0
  173. package/dist/team/index.cjs +1233 -0
  174. package/dist/team/index.cjs.map +1 -0
  175. package/dist/team/index.d.cts +117 -0
  176. package/dist/team/index.d.ts +117 -0
  177. package/dist/team/index.js +39 -0
  178. package/dist/team/index.js.map +1 -0
  179. package/dist/tx/index.cjs +212 -0
  180. package/dist/tx/index.cjs.map +1 -0
  181. package/dist/tx/index.d.cts +20 -0
  182. package/dist/tx/index.d.ts +20 -0
  183. package/dist/tx/index.js +20 -0
  184. package/dist/tx/index.js.map +1 -0
  185. package/dist/types-BZpCZB8N.d.ts +7526 -0
  186. package/dist/types-Bfs0qr5F.d.cts +7526 -0
  187. package/dist/ulid-COREQ2RQ.js +9 -0
  188. package/dist/ulid-COREQ2RQ.js.map +1 -0
  189. package/dist/util/index.cjs +230 -0
  190. package/dist/util/index.cjs.map +1 -0
  191. package/dist/util/index.d.cts +77 -0
  192. package/dist/util/index.d.ts +77 -0
  193. package/dist/util/index.js +190 -0
  194. package/dist/util/index.js.map +1 -0
  195. package/package.json +244 -0
@@ -0,0 +1,62 @@
1
+ import { as as HistoryStrategy, at as NoydbStore, au as HistoryOptions, av as EncryptedEnvelope, aw as PruneOptions } from '../types-Bfs0qr5F.cjs';
2
+ export { ax as AppendInput, ay as ChangeType, az as CollectionInstant, aA as DiffEntry, aB as JsonPatch, aC as JsonPatchOp, aD as LedgerEntry, aE as LedgerStore, aF as VaultEngine, aG as VaultInstant, aH as VerifyResult, aI as applyPatch, aJ as canonicalJson, aK as computePatch, aL as diff, aM as formatDiff, aN as hashEntry, aO as paddedIndex, aP as parseIndex, aQ as sha256Hex } from '../types-Bfs0qr5F.cjs';
3
+ export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-9KO1BGxh.cjs';
4
+ import '../lazy-builder-CZVLKh0Z.cjs';
5
+ import '../predicate-SBHmi6D0.cjs';
6
+ import '../strategy-D-SrOLCl.cjs';
7
+ import '../strategy-BSxFXGzb.cjs';
8
+ import '../index-DN-J-5wT.cjs';
9
+
10
+ /**
11
+ * Active history strategy — `withHistory()` returns the real
12
+ * implementation that wires per-record snapshots, the hash-chained
13
+ * audit ledger, JSON-patch deltas, and time-machine reads into the
14
+ * core write/read paths.
15
+ *
16
+ * Consumers opt in by:
17
+ *
18
+ * ```ts
19
+ * import { createNoydb } from '@noy-db/hub'
20
+ * import { withHistory } from '@noy-db/hub/history'
21
+ *
22
+ * const db = await createNoydb({
23
+ * store: ...,
24
+ * user: ...,
25
+ * historyStrategy: withHistory(),
26
+ * })
27
+ * ```
28
+ *
29
+ * The factory is a thin wrapper that delegates to the existing
30
+ * `history.ts`, `diff.ts`, `ledger/store.ts`, `ledger/patch.ts`, and
31
+ * `time-machine.ts` modules. Splitting the import chain through this
32
+ * file is what lets `tsup` tree-shake the heavy modules out of the
33
+ * default `@noy-db/hub` bundle when no `withHistory()` import is
34
+ * present in the consumer.
35
+ *
36
+ * @public
37
+ */
38
+
39
+ /**
40
+ * Build the active history strategy. Today the factory takes no
41
+ * options; per-collection retention tuning still flows through
42
+ * `HistoryConfig` on `Vault.collection()` / `vault.openVault()`.
43
+ *
44
+ * Future option slots (kept off the LTS surface for now):
45
+ * - global maxVersions cap
46
+ * - global beforeDate prune cadence
47
+ * - ledger encryption toggle (today inferred from vault.encrypted)
48
+ */
49
+ declare function withHistory(): HistoryStrategy;
50
+
51
+ /** Save a history entry (a complete encrypted envelope snapshot). */
52
+ declare function saveHistory(adapter: NoydbStore, vault: string, collection: string, recordId: string, envelope: EncryptedEnvelope): Promise<void>;
53
+ /** Get history entries for a record, sorted newest-first. */
54
+ declare function getHistory(adapter: NoydbStore, vault: string, collection: string, recordId: string, options?: HistoryOptions): Promise<EncryptedEnvelope[]>;
55
+ /** Get a specific version's envelope from history. */
56
+ declare function getVersionEnvelope(adapter: NoydbStore, vault: string, collection: string, recordId: string, version: number): Promise<EncryptedEnvelope | null>;
57
+ /** Prune history entries. Returns the number of entries deleted. */
58
+ declare function pruneHistory(adapter: NoydbStore, vault: string, collection: string, recordId: string | undefined, options: PruneOptions): Promise<number>;
59
+ /** Clear all history for a vault, optionally scoped to a collection or record. */
60
+ declare function clearHistory(adapter: NoydbStore, vault: string, collection?: string, recordId?: string): Promise<number>;
61
+
62
+ export { HistoryStrategy, clearHistory, getHistory, getVersionEnvelope, pruneHistory, saveHistory, withHistory };
@@ -0,0 +1,62 @@
1
+ import { as as HistoryStrategy, at as NoydbStore, au as HistoryOptions, av as EncryptedEnvelope, aw as PruneOptions } from '../types-BZpCZB8N.js';
2
+ export { ax as AppendInput, ay as ChangeType, az as CollectionInstant, aA as DiffEntry, aB as JsonPatch, aC as JsonPatchOp, aD as LedgerEntry, aE as LedgerStore, aF as VaultEngine, aG as VaultInstant, aH as VerifyResult, aI as applyPatch, aJ as canonicalJson, aK as computePatch, aL as diff, aM as formatDiff, aN as hashEntry, aO as paddedIndex, aP as parseIndex, aQ as sha256Hex } from '../types-BZpCZB8N.js';
3
+ export { L as LEDGER_COLLECTION, a as LEDGER_DELTAS_COLLECTION, e as envelopePayloadHash } from '../hash-ChfJjRjQ.js';
4
+ import '../lazy-builder-BwEoBQZ9.js';
5
+ import '../predicate-SBHmi6D0.js';
6
+ import '../strategy-D-SrOLCl.js';
7
+ import '../strategy-BSxFXGzb.js';
8
+ import '../index-BRHBCmLt.js';
9
+
10
+ /**
11
+ * Active history strategy — `withHistory()` returns the real
12
+ * implementation that wires per-record snapshots, the hash-chained
13
+ * audit ledger, JSON-patch deltas, and time-machine reads into the
14
+ * core write/read paths.
15
+ *
16
+ * Consumers opt in by:
17
+ *
18
+ * ```ts
19
+ * import { createNoydb } from '@noy-db/hub'
20
+ * import { withHistory } from '@noy-db/hub/history'
21
+ *
22
+ * const db = await createNoydb({
23
+ * store: ...,
24
+ * user: ...,
25
+ * historyStrategy: withHistory(),
26
+ * })
27
+ * ```
28
+ *
29
+ * The factory is a thin wrapper that delegates to the existing
30
+ * `history.ts`, `diff.ts`, `ledger/store.ts`, `ledger/patch.ts`, and
31
+ * `time-machine.ts` modules. Splitting the import chain through this
32
+ * file is what lets `tsup` tree-shake the heavy modules out of the
33
+ * default `@noy-db/hub` bundle when no `withHistory()` import is
34
+ * present in the consumer.
35
+ *
36
+ * @public
37
+ */
38
+
39
+ /**
40
+ * Build the active history strategy. Today the factory takes no
41
+ * options; per-collection retention tuning still flows through
42
+ * `HistoryConfig` on `Vault.collection()` / `vault.openVault()`.
43
+ *
44
+ * Future option slots (kept off the LTS surface for now):
45
+ * - global maxVersions cap
46
+ * - global beforeDate prune cadence
47
+ * - ledger encryption toggle (today inferred from vault.encrypted)
48
+ */
49
+ declare function withHistory(): HistoryStrategy;
50
+
51
+ /** Save a history entry (a complete encrypted envelope snapshot). */
52
+ declare function saveHistory(adapter: NoydbStore, vault: string, collection: string, recordId: string, envelope: EncryptedEnvelope): Promise<void>;
53
+ /** Get history entries for a record, sorted newest-first. */
54
+ declare function getHistory(adapter: NoydbStore, vault: string, collection: string, recordId: string, options?: HistoryOptions): Promise<EncryptedEnvelope[]>;
55
+ /** Get a specific version's envelope from history. */
56
+ declare function getVersionEnvelope(adapter: NoydbStore, vault: string, collection: string, recordId: string, version: number): Promise<EncryptedEnvelope | null>;
57
+ /** Prune history entries. Returns the number of entries deleted. */
58
+ declare function pruneHistory(adapter: NoydbStore, vault: string, collection: string, recordId: string | undefined, options: PruneOptions): Promise<number>;
59
+ /** Clear all history for a vault, optionally scoped to a collection or record. */
60
+ declare function clearHistory(adapter: NoydbStore, vault: string, collection?: string, recordId?: string): Promise<number>;
61
+
62
+ export { HistoryStrategy, clearHistory, getHistory, getVersionEnvelope, pruneHistory, saveHistory, withHistory };
@@ -0,0 +1,79 @@
1
+ import {
2
+ CollectionInstant,
3
+ VaultInstant,
4
+ clearHistory,
5
+ diff,
6
+ formatDiff,
7
+ getHistory,
8
+ getVersionEnvelope,
9
+ pruneHistory,
10
+ saveHistory
11
+ } from "../chunk-NXFEYLVG.js";
12
+ import {
13
+ LEDGER_COLLECTION,
14
+ LEDGER_DELTAS_COLLECTION,
15
+ LedgerStore,
16
+ applyPatch,
17
+ computePatch
18
+ } from "../chunk-XHFOENR2.js";
19
+ import {
20
+ canonicalJson,
21
+ envelopePayloadHash,
22
+ hashEntry,
23
+ paddedIndex,
24
+ parseIndex,
25
+ sha256Hex
26
+ } from "../chunk-CIMZBAZB.js";
27
+ import "../chunk-ZRG4V3F5.js";
28
+ import "../chunk-MR4424N3.js";
29
+ import "../chunk-ACLDOTNQ.js";
30
+
31
+ // src/history/active.ts
32
+ function withHistory() {
33
+ return {
34
+ saveHistory,
35
+ getHistoryEntries: getHistory,
36
+ getVersionEnvelope,
37
+ pruneHistory,
38
+ clearHistory,
39
+ envelopePayloadHash,
40
+ computePatch,
41
+ diff,
42
+ buildLedger(opts) {
43
+ return new LedgerStore({
44
+ adapter: opts.adapter,
45
+ vault: opts.vault,
46
+ encrypted: opts.encrypted,
47
+ getDEK: opts.getDEK,
48
+ actor: opts.actor
49
+ });
50
+ },
51
+ buildVaultInstant(engine, timestamp) {
52
+ return new VaultInstant(engine, timestamp);
53
+ }
54
+ };
55
+ }
56
+ export {
57
+ CollectionInstant,
58
+ LEDGER_COLLECTION,
59
+ LEDGER_DELTAS_COLLECTION,
60
+ LedgerStore,
61
+ VaultInstant,
62
+ applyPatch,
63
+ canonicalJson,
64
+ clearHistory,
65
+ computePatch,
66
+ diff,
67
+ envelopePayloadHash,
68
+ formatDiff,
69
+ getHistory,
70
+ getVersionEnvelope,
71
+ hashEntry,
72
+ paddedIndex,
73
+ parseIndex,
74
+ pruneHistory,
75
+ saveHistory,
76
+ sha256Hex,
77
+ withHistory
78
+ };
79
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/history/active.ts"],"sourcesContent":["/**\n * Active history strategy — `withHistory()` returns the real\n * implementation that wires per-record snapshots, the hash-chained\n * audit ledger, JSON-patch deltas, and time-machine reads into the\n * core write/read paths.\n *\n * Consumers opt in by:\n *\n * ```ts\n * import { createNoydb } from '@noy-db/hub'\n * import { withHistory } from '@noy-db/hub/history'\n *\n * const db = await createNoydb({\n * store: ...,\n * user: ...,\n * historyStrategy: withHistory(),\n * })\n * ```\n *\n * The factory is a thin wrapper that delegates to the existing\n * `history.ts`, `diff.ts`, `ledger/store.ts`, `ledger/patch.ts`, and\n * `time-machine.ts` modules. Splitting the import chain through this\n * file is what lets `tsup` tree-shake the heavy modules out of the\n * default `@noy-db/hub` bundle when no `withHistory()` import is\n * present in the consumer.\n *\n * @public\n */\n\nimport type { HistoryStrategy, BuildLedgerOptions } from './strategy.js'\nimport {\n saveHistory,\n getHistory,\n getVersionEnvelope,\n pruneHistory,\n clearHistory,\n} from './history.js'\nimport { diff as computeDiff } from './diff.js'\nimport { LedgerStore, envelopePayloadHash } from './ledger/store.js'\nimport { computePatch } from './ledger/patch.js'\nimport { VaultInstant } from './time-machine.js'\n\n/**\n * Build the active history strategy. Today the factory takes no\n * options; per-collection retention tuning still flows through\n * `HistoryConfig` on `Vault.collection()` / `vault.openVault()`.\n *\n * Future option slots (kept off the LTS surface for now):\n * - global maxVersions cap\n * - global beforeDate prune cadence\n * - ledger encryption toggle (today inferred from vault.encrypted)\n */\nexport function withHistory(): HistoryStrategy {\n return {\n saveHistory,\n getHistoryEntries: getHistory,\n getVersionEnvelope,\n pruneHistory,\n clearHistory,\n envelopePayloadHash,\n computePatch,\n diff: computeDiff,\n buildLedger(opts: BuildLedgerOptions): LedgerStore {\n return new LedgerStore({\n adapter: opts.adapter,\n vault: opts.vault,\n encrypted: opts.encrypted,\n getDEK: opts.getDEK,\n actor: opts.actor,\n })\n },\n buildVaultInstant(engine, timestamp): VaultInstant {\n return new VaultInstant(engine, timestamp)\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDO,SAAS,cAA+B;AAC7C,SAAO;AAAA,IACL;AAAA,IACA,mBAAmB;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY,MAAuC;AACjD,aAAO,IAAI,YAAY;AAAA,QACrB,SAAS,KAAK;AAAA,QACd,OAAO,KAAK;AAAA,QACZ,WAAW,KAAK;AAAA,QAChB,QAAQ,KAAK;AAAA,QACb,OAAO,KAAK;AAAA,MACd,CAAC;AAAA,IACH;AAAA,IACA,kBAAkB,QAAQ,WAAyB;AACjD,aAAO,IAAI,aAAa,QAAQ,SAAS;AAAA,IAC3C;AAAA,EACF;AACF;","names":[]}