@fireproof/core 0.3.2 → 0.3.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 (51) hide show
  1. package/README.md +1 -1
  2. package/dist/src/blockstore.d.ts +115 -0
  3. package/dist/src/blockstore.d.ts.map +1 -0
  4. package/dist/src/clock.d.ts +98 -0
  5. package/dist/src/clock.d.ts.map +1 -0
  6. package/dist/src/crypto.d.ts +18 -0
  7. package/dist/src/crypto.d.ts.map +1 -0
  8. package/dist/src/db-index.d.ts +116 -0
  9. package/dist/src/db-index.d.ts.map +1 -0
  10. package/dist/src/fireproof.d.ts +167 -0
  11. package/dist/src/fireproof.d.ts.map +1 -0
  12. package/dist/src/hydrator.d.ts +6 -0
  13. package/dist/src/hydrator.d.ts.map +1 -0
  14. package/dist/src/index.d.ts +6 -0
  15. package/dist/src/index.d.ts.map +1 -0
  16. package/dist/src/listener.d.ts +36 -0
  17. package/dist/src/listener.d.ts.map +1 -0
  18. package/dist/src/prolly.d.ts +83 -0
  19. package/dist/src/prolly.d.ts.map +1 -0
  20. package/dist/src/sha1.d.ts +9 -0
  21. package/dist/src/sha1.d.ts.map +1 -0
  22. package/dist/src/valet.d.ts +34 -0
  23. package/dist/src/valet.d.ts.map +1 -0
  24. package/dist/tsconfig.tsbuildinfo +1 -0
  25. package/package.json +33 -3
  26. package/src/blockstore.js +3 -2
  27. package/src/clock.js +4 -3
  28. package/src/crypto.js +1 -0
  29. package/src/db-index.js +10 -5
  30. package/src/fireproof.js +15 -10
  31. package/src/hydrator.js +3 -3
  32. package/src/index.js +6 -0
  33. package/src/listener.js +2 -1
  34. package/src/prolly.js +11 -24
  35. package/src/sha1.js +2 -1
  36. package/src/valet.js +7 -5
  37. package/hooks/use-fireproof.js +0 -135
  38. package/index.js +0 -6
  39. package/scripts/keygen.js +0 -3
  40. package/test/block.js +0 -65
  41. package/test/clock.test.js +0 -694
  42. package/test/db-index.test.js +0 -261
  43. package/test/fireproof.test.js +0 -493
  44. package/test/fulltext.test.js +0 -66
  45. package/test/helpers.js +0 -45
  46. package/test/hydrator.test.js +0 -81
  47. package/test/listener.test.js +0 -102
  48. package/test/prolly.test.js +0 -190
  49. package/test/proofs.test.js +0 -53
  50. package/test/reproduce-fixture-bug.test.js +0 -65
  51. package/test/valet.test.js +0 -59
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Put a value (a CID) for the given key. If the key exists it's value is overwritten.
3
+ *
4
+ * @param {import('./blockstore.js').BlockFetcher} blocks Bucket block storage.
5
+ * @param {import('./clock').EventLink<EventData>[]} head Merkle clock head.
6
+ * @param {string} key The key of the value to put.
7
+ * @param {CID} value The value to put.
8
+ * @param {object} [options]
9
+ * @returns {Promise<Result>}
10
+ */
11
+ export function put(inBlocks: any, head: import('./clock').EventLink<EventData>[], event: any, options?: object): Promise<Result>;
12
+ /**
13
+ * Determine the effective prolly root given the current merkle clock head.
14
+ *
15
+ * @param {import('./blockstore.js').BlockFetcher} blocks Bucket block storage.
16
+ * @param {import('./clock').EventLink<EventData>[]} head Merkle clock head.
17
+ */
18
+ export function root(inBlocks: any, head: import('./clock').EventLink<EventData>[]): Promise<{
19
+ cids: any;
20
+ node: any;
21
+ }>;
22
+ /**
23
+ * Get the list of events not known by the `since` event
24
+ * @param {import('./blockstore.js').BlockFetcher} blocks Bucket block storage.
25
+ * @param {import('./clock').EventLink<EventData>[]} head Merkle clock head.
26
+ * @param {import('./clock').EventLink<EventData>} since Event to compare against.
27
+ * @returns {Promise<{clockCIDs: CIDCounter, result: EventData[]}>}
28
+ */
29
+ export function eventsSince(blocks: any, head: import('./clock').EventLink<EventData>[], since: import('./clock').EventLink<EventData>): Promise<{
30
+ clockCIDs: CIDCounter;
31
+ result: EventData[];
32
+ }>;
33
+ /**
34
+ *
35
+ * @param {import('./blockstore.js').BlockFetcher} blocks Bucket block storage.
36
+ * @param {import('./clock').EventLink<EventData>[]} head Merkle clock head.
37
+ *
38
+ * @returns {Promise<{clockCIDs: CIDCounter, result: EventData[]}>}
39
+ *
40
+ */
41
+ export function getAll(blocks: any, head: import('./clock').EventLink<EventData>[]): Promise<{
42
+ clockCIDs: CIDCounter;
43
+ result: EventData[];
44
+ }>;
45
+ /**
46
+ * @param {import('./blockstore.js').BlockFetcher} blocks Bucket block storage.
47
+ * @param {import('./clock').EventLink<EventData>[]} head Merkle clock head.
48
+ * @param {string} key The key of the value to retrieve.
49
+ */
50
+ export function get(blocks: any, head: import('./clock').EventLink<EventData>[], key: string): Promise<{
51
+ cids: any;
52
+ result: any;
53
+ clockCIDs?: undefined;
54
+ } | {
55
+ result: any;
56
+ cids: any;
57
+ clockCIDs: any;
58
+ }>;
59
+ export function vis(blocks: any, head: any): AsyncGenerator<any, {
60
+ cids: any;
61
+ result: any;
62
+ vis?: undefined;
63
+ } | {
64
+ vis: string;
65
+ cids: any;
66
+ result?: undefined;
67
+ }, unknown>;
68
+ export function visMerkleTree(blocks: any, head: any): Promise<{
69
+ cids: any;
70
+ result: any;
71
+ vis?: undefined;
72
+ } | {
73
+ vis: string;
74
+ cids: any;
75
+ result?: undefined;
76
+ }>;
77
+ export function visMerkleClock(blocks: any, head: any): Promise<{
78
+ vis: string;
79
+ }>;
80
+ export function makeGetBlock(blocks: any): {
81
+ getBlock: (address: any) => Promise<import("multiformats").BlockView<unknown, 113, 18, import("multiformats").Version>>;
82
+ };
83
+ //# sourceMappingURL=prolly.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prolly.d.ts","sourceRoot":"","sources":["../../src/prolly.js"],"names":[],"mappings":"AAwLA;;;;;;;;;GASG;AACH,yCANW,OAAO,SAAS,EAAE,SAAS,WAAW,EAAE,wBAGxC,MAAM,GACJ,eAAe,CA0C3B;AAED;;;;;GAKG;AACH,0CAFW,OAAO,SAAS,EAAE,SAAS,WAAW,EAAE;;;GAelD;AAED;;;;;;GAMG;AACH,+CAJW,OAAO,SAAS,EAAE,SAAS,WAAW,EAAE,SACxC,OAAO,SAAS,EAAE,SAAS,WAAW,GACpC,QAAQ;IAAC,SAAS,aAAa;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,CAAC,CASjE;AAED;;;;;;;GAOG;AACH,0CALW,OAAO,SAAS,EAAE,SAAS,WAAW,EAAE;;YAEE,WAAW;GAe/D;AAED;;;;GAIG;AACH,uCAHW,OAAO,SAAS,EAAE,SAAS,WAAW,EAAE,OACxC,MAAM;;;;;;;;GAahB;AAED;;;;;;;;YAWC;AAED;;;;;;;;GAUC;AAED;;GAOC;AA/TM;;EAWN"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * SHA1 on binary array
3
+ *
4
+ * @param {Uint8Array} b Data to hash
5
+ *
6
+ * @return {Uint8Array} sha1 hash
7
+ */
8
+ export function rawSha1(b: Uint8Array): Uint8Array;
9
+ //# sourceMappingURL=sha1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sha1.d.ts","sourceRoot":"","sources":["../../src/sha1.js"],"names":[],"mappings":"AAyBA;;;;;;EAME;AACF,2BAJY,UAAU,GAEV,UAAU,CAoDrB"}
@@ -0,0 +1,34 @@
1
+ export class Valet {
2
+ constructor(name: string, keyMaterial: any);
3
+ idb: any;
4
+ name: any;
5
+ uploadQueue: any;
6
+ alreadyEnqueued: Set<any>;
7
+ keyMaterial: any;
8
+ keyId: string;
9
+ /**
10
+ * Function installed by the database to upload car files
11
+ * @type {null|function(string, Uint8Array):Promise<void>}
12
+ */
13
+ uploadFunction: null | ((arg0: string, arg1: Uint8Array) => Promise<void>);
14
+ getKeyMaterial(): any;
15
+ setKeyMaterial(km: any): void;
16
+ /**
17
+ * Group the blocks into a car and write it to the valet.
18
+ * @param {InnerBlockstore} innerBlockstore
19
+ * @param {Set<string>} cids
20
+ * @returns {Promise<void>}
21
+ * @memberof Valet
22
+ */
23
+ writeTransaction(innerBlockstore: InnerBlockstore, cids: Set<string>): Promise<void>;
24
+ withDB: (dbWorkFun: any) => Promise<any>;
25
+ /**
26
+ *
27
+ * @param {string} carCid
28
+ * @param {*} value
29
+ */
30
+ parkCar(carCid: string, value: any, cids: any): Promise<void>;
31
+ remoteBlockFunction: any;
32
+ getBlock(dataCID: any): Promise<any>;
33
+ }
34
+ //# sourceMappingURL=valet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valet.d.ts","sourceRoot":"","sources":["../../src/valet.js"],"names":[],"mappings":"AAqBA;IAcE,4CAmCC;IAhDD,SAAU;IACV,UAAW;IACX,iBAAkB;IAClB,0BAA2B;IAC3B,iBAAkB;IAClB,cAAc;IAEd;;;OAGG;IACH,gBAFU,IAAI,WAAU,MAAM,QAAE,UAAU,KAAE,QAAQ,IAAI,CAAC,CAAA,CAEpC;IAuCrB,sBAEC;IAED,8BAWC;IAED;;;;;;OAMG;IACH,yDAJW,IAAI,MAAM,CAAC,GACT,QAAQ,IAAI,CAAC,CAczB;IAED,yCAiBC;IAED;;;;OAIG;IACH,gBAHW,MAAM,wCAwBhB;IAED,yBAA0B;IAE1B,qCAuCC;CACF"}
@@ -0,0 +1 @@
1
+ {"program":{"fileNames":["../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.scripthost.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../node_modules/.pnpm/typescript@5.0.4/node_modules/typescript/lib/lib.es2020.full.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/hashes/interface.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/bases/interface.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/cid.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/block/interface.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/link/interface.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/link.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/codecs/interface.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/interface.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/hashes/digest.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/hashes/hasher.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/varint.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/bytes.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/index.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/dom-events.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/globals.global.d.ts","../../../node_modules/.pnpm/@types+node@18.14.6/node_modules/@types/node/index.d.ts","../../../node_modules/.pnpm/@ipld+car@5.1.0/node_modules/@ipld/car/dist/src/api.d.ts","../../../node_modules/.pnpm/@ipld+car@5.1.0/node_modules/@ipld/car/dist/src/coding.d.ts","../../../node_modules/.pnpm/@ipld+car@5.1.0/node_modules/@ipld/car/dist/src/reader-browser.d.ts","../../../node_modules/.pnpm/@ipld+car@5.1.0/node_modules/@ipld/car/dist/src/reader.d.ts","../../../node_modules/.pnpm/@ipld+car@5.1.0/node_modules/@ipld/car/dist/src/buffer-reader-browser.d.ts","../../../node_modules/.pnpm/@ipld+car@5.1.0/node_modules/@ipld/car/dist/src/buffer-reader.d.ts","../../../node_modules/.pnpm/@ipld+car@5.1.0/node_modules/@ipld/car/dist/src/indexer.d.ts","../../../node_modules/.pnpm/@ipld+car@5.1.0/node_modules/@ipld/car/dist/src/iterator.d.ts","../../../node_modules/.pnpm/@ipld+car@5.1.0/node_modules/@ipld/car/dist/src/writer-browser.d.ts","../../../node_modules/.pnpm/@ipld+car@5.1.0/node_modules/@ipld/car/dist/src/writer.d.ts","../../../node_modules/.pnpm/@ipld+car@5.1.0/node_modules/@ipld/car/dist/src/indexed-reader.d.ts","../../../node_modules/.pnpm/@ipld+car@5.1.0/node_modules/@ipld/car/dist/src/buffer-writer.d.ts","../../../node_modules/.pnpm/@ipld+car@5.1.0/node_modules/@ipld/car/dist/src/index.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/hashes/sha2.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/codecs/raw.d.ts","../../../node_modules/.pnpm/multiformats@11.0.1/node_modules/multiformats/dist/types/src/block.d.ts","../../../node_modules/.pnpm/@ipld+dag-cbor@9.0.0/node_modules/@ipld/dag-cbor/dist/src/index.d.ts","../../../node_modules/.pnpm/idb@7.1.1/node_modules/idb/build/wrap-idb-value.d.ts","../../../node_modules/.pnpm/idb@7.1.1/node_modules/idb/build/entry.d.ts","../../../node_modules/.pnpm/idb@7.1.1/node_modules/idb/build/database-extras.d.ts","../../../node_modules/.pnpm/idb@7.1.1/node_modules/idb/build/index.d.ts","../src/crypto.js","../../../../../../node_modules/buffer/index.d.ts","../src/sha1.js","../src/valet.js","../src/link.d.ts","../src/blockstore.js","../src/clock.js","../src/prolly.js","../src/fireproof.js","../src/db-index.js","../src/hydrator.js","../src/listener.js","../src/index.js"],"fileInfos":[{"version":"6a6b471e7e43e15ef6f8fe617a22ce4ecb0e34efa6c3dfcfe7cebd392bcca9d2","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","dc48272d7c333ccf58034c0026162576b7d50ea0e69c3b9292f803fc20720fd5","27147504487dc1159369da4f4da8a26406364624fa9bc3db632f7d94a5bae2c3","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4",{"version":"fcd3ecc9f764f06f4d5c467677f4f117f6abf49dee6716283aa204ff1162498b","affectsGlobalScope":true},{"version":"9a60b92bca4c1257db03b349d58e63e4868cfc0d1c8d0ba60c2dbc63f4e6c9f6","affectsGlobalScope":true},{"version":"c5c5565225fce2ede835725a92a28ece149f83542aa4866cfb10290bff7b8996","affectsGlobalScope":true},{"version":"7d2dbc2a0250400af0809b0ad5f84686e84c73526de931f84560e483eb16b03c","affectsGlobalScope":true},{"version":"f296963760430fb65b4e5d91f0ed770a91c6e77455bacf8fa23a1501654ede0e","affectsGlobalScope":true},{"version":"5114a95689b63f96b957e00216bc04baf9e1a1782aa4d8ee7e5e9acbf768e301","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"ab22100fdd0d24cfc2cc59d0a00fc8cf449830d9c4030dc54390a46bd562e929","affectsGlobalScope":true},{"version":"f7bd636ae3a4623c503359ada74510c4005df5b36de7f23e1db8a5c543fd176b","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"0c20f4d2358eb679e4ae8a4432bdd96c857a2960fd6800b21ec4008ec59d60ea","affectsGlobalScope":true},{"version":"36ae84ccc0633f7c0787bc6108386c8b773e95d3b052d9464a99cd9b8795fbec","affectsGlobalScope":true},{"version":"82d0d8e269b9eeac02c3bd1c9e884e85d483fcb2cd168bccd6bc54df663da031","affectsGlobalScope":true},{"version":"b8deab98702588840be73d67f02412a2d45a417a3c097b2e96f7f3a42ac483d1","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"376d554d042fb409cb55b5cbaf0b2b4b7e669619493c5d18d5fa8bd67273f82a","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"c4138a3dd7cd6cf1f363ca0f905554e8d81b45844feea17786cdf1626cb8ea06","affectsGlobalScope":true},{"version":"6ff3e2452b055d8f0ec026511c6582b55d935675af67cdb67dd1dc671e8065df","affectsGlobalScope":true},{"version":"03de17b810f426a2f47396b0b99b53a82c1b60e9cba7a7edda47f9bb077882f4","affectsGlobalScope":true},{"version":"8184c6ddf48f0c98429326b428478ecc6143c27f79b79e85740f17e6feb090f1","affectsGlobalScope":true},{"version":"261c4d2cf86ac5a89ad3fb3fafed74cbb6f2f7c1d139b0540933df567d64a6ca","affectsGlobalScope":true},{"version":"6af1425e9973f4924fca986636ac19a0cf9909a7e0d9d3009c349e6244e957b6","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"15a630d6817718a2ddd7088c4f83e4673fde19fa992d2eae2cf51132a302a5d3","affectsGlobalScope":true},{"version":"b7e9f95a7387e3f66be0ed6db43600c49cec33a3900437ce2fd350d9b7cb16f2","affectsGlobalScope":true},{"version":"01e0ee7e1f661acedb08b51f8a9b7d7f959e9cdb6441360f06522cc3aea1bf2e","affectsGlobalScope":true},{"version":"ac17a97f816d53d9dd79b0d235e1c0ed54a8cc6a0677e9a3d61efb480b2a3e4e","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"9cc66b0513ad41cb5f5372cca86ef83a0d37d1c1017580b7dace3ea5661836df","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"307c8b7ebbd7f23a92b73a4c6c0a697beca05b06b036c23a34553e5fe65e4fdc","affectsGlobalScope":true},{"version":"189c0703923150aa30673fa3de411346d727cc44a11c75d05d7cf9ef095daa22","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"322cc0ca9c311414642c0d7ef3b57beedbac198ca074e3e109a4be4c366dcb81","f196d5ed4194259ffb797a34001a5edb7a165cd110dc3e4d8f03f11e3531fe9b","683889752b7c95fffd073b82ea76d36b3fe548ef3bb9887eb903676eabd676ff","8bfc11f55ca063b10f0335922693ca70885d8f59b20607dd501250d1b1e960db","a439ff9443c77478bb024ea2d96fbc088bccc915adf6bb8aeb9ab21fd737a071","b40afc6ff175241970202125bc1b5996cf5783b2f755977691f8c6522ace9f14","a63709dba2dcd636c10b5306211d4800943047389bb9b39b1a1d34f118e9cfb0","5b3714bd84ba057f1be3beb9cf273d3c718376ac9b202e16b0fffe125325a095","557b8c7481296f4b7ed362320f3bbb40bb87404edf880c81224f365a8d1e17f3","467a7c09abfde00a7fc41d06c1c599f01e944c9f4948d38a0bde82b766a7e364","b85ee49f2af3b6c9d413d371c1aceb3bfd231fc79f7fafa153f0db4026281689","77c738b0671d324f6cb2c7c1d7dfc0282a5836c67af55c9ba6df315c62207f57","f2dc47a6b115cd100153d2aaa3dbec094e7a55c5e471c9df8cf7fd651925d63f","66bc5c8651aa39bc9f493feef381bd7bf8bb2ab5156278bf7b38961ba6b0bc78","7e771891adaa85b690266bc37bd6eb43bc57eecc4b54693ead36467e7369952a","a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"ca72190df0eb9b09d4b600821c8c7b6c9747b75a1c700c4d57dc0bb72abc074c","affectsGlobalScope":true},"11e2d554398d2bd460e7d06b2fa5827a297c8acfbe00b4f894a224ac0862857f",{"version":"fc811ced095f38ad4438bb94a8d665c63bf4943e58a71ada16627add5ad93226","affectsGlobalScope":true},"374ca798f244e464346f14301dc2a8b4b111af1a83b49fffef5906c338a1f922","5a94487653355b56018122d92392beb2e5f4a6c63ba5cef83bbe1c99775ef713",{"version":"d5135ad93b33adcce80b18f8065087934cdc1730d63db58562edcf017e1aad9b","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","5eb881ed2a0d5b17ea36df5cd4c4be500e460c412f270c3170e906bec65580ac","bb9c4ffa5e6290c6980b63c815cdd1625876dadb2efaf77edbe82984be93e55e","489532ff54b714f0e0939947a1c560e516d3ae93d51d639ab02e907a0e950114","f30bb836526d930a74593f7b0f5c1c46d10856415a8f69e5e2fc3db80371e362","14b5aa23c5d0ae1907bc696ac7b6915d88f7d85799cc0dc2dcf98fbce2c5a67c","5c439dafdc09abe4d6c260a96b822fa0ba5be7203c71a63ab1f1423cd9e838ea",{"version":"6b526a5ec4a401ca7c26cfe6a48e641d8f30af76673bad3b06a1b4504594a960","affectsGlobalScope":true},{"version":"816ad2e607a96de5bcac7d437f843f5afd8957f1fa5eefa6bba8e4ed7ca8fd84","affectsGlobalScope":true},"cec36af22f514322f870e81d30675c78df82ae8bf4863f5fd4e4424c040c678d","d903fafe96674bc0b2ac38a5be4a8fc07b14c2548d1cdb165a80ea24c44c0c54","5eec82ac21f84d83586c59a16b9b8502d34505d1393393556682fe7e7fde9ef2","04eb6578a588d6a46f50299b55f30e3a04ef27d0c5a46c57d8fcc211cd530faa","8d3c583a07e0c37e876908c2d5da575019f689df8d9fa4c081d99119d53dba22","2c828a5405191d006115ab34e191b8474bc6c86ffdc401d1a9864b1b6e088a58",{"version":"e630e5528e899219ae319e83bef54bf3bcb91b01d76861ecf881e8e614b167f0","affectsGlobalScope":true},"bcebb922784739bdb34c18ee51095d25a92b560c78ccd2eaacd6bd00f7443d83","7ee6ed878c4528215c82b664fe0cfe80e8b4da6c0d4cc80869367868774db8b1","b0973c3cbcdc59b37bf477731d468696ecaf442593ec51bab497a613a580fe30",{"version":"4989e92ba5b69b182d2caaea6295af52b7dc73a4f7a2e336a676722884e7139d","affectsGlobalScope":true},{"version":"b3624aed92dab6da8484280d3cb3e2f4130ec3f4ef3f8201c95144ae9e898bb6","affectsGlobalScope":true},"5153a2fd150e46ce57bb3f8db1318d33f6ad3261ed70ceeff92281c0608c74a3","210d54cd652ec0fec8c8916e4af59bb341065576ecda039842f9ffb2e908507c","36b03690b628eab08703d63f04eaa89c5df202e5f1edf3989f13ad389cd2c091","0effadd232a20498b11308058e334d3339cc5bf8c4c858393e38d9d4c0013dcf","25846d43937c672bab7e8195f3d881f93495df712ee901860effc109918938cc","fd93cee2621ff42dabe57b7be402783fd1aa69ece755bcba1e0290547ae60513","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","69ee23dd0d215b09907ad30d23f88b7790c93329d1faf31d7835552a10cf7cbf","44b8b584a338b190a59f4f6929d072431950c7bd92ec2694821c11bce180c8a5","23b89798789dffbd437c0c423f5d02d11f9736aea73d6abf16db4f812ff36eda","09326ae5f7e3d49be5cd9ea00eb814770e71870a438faa2efd8bdd9b4db21320",{"version":"3c4ba1dd9b12ffa284b565063108f2f031d150ea15b8fafbdc17f5d2a07251f3","affectsGlobalScope":true},"e10177274a35a9d07c825615340b2fcde2f610f53f3fb40269fd196b4288dda6","c4577fb855ca259bdbf3ea663ca73988ce5f84251a92b4aef80a1f4122b6f98e","3c13ef48634e7b5012fcf7e8fce7496352c2d779a7201389ca96a2a81ee4314d","5d0a25ec910fa36595f85a67ac992d7a53dd4064a1ba6aea1c9f14ab73a023f2",{"version":"f0900cd5d00fe1263ff41201fb8073dbeb984397e4af3b8002a5c207a30bdc33","affectsGlobalScope":true},{"version":"ff07a9a03c65732ccc59b3c65bc584173da093bd563a6565411c01f5703bd3cb","affectsGlobalScope":true},"06d7c42d256f0ce6afe1b2b6cfbc97ab391f29dadb00dd0ae8e8f23f5bc916c3","ec4bd1b200670fb567920db572d6701ed42a9641d09c4ff6869768c8f81b404c","e59a892d87e72733e2a9ca21611b9beb52977be2696c7ba4b216cbbb9a48f5aa",{"version":"da26af7362f53d122283bc69fed862b9a9fe27e01bc6a69d1d682e0e5a4df3e6","affectsGlobalScope":true},"8a300fa9b698845a1f9c41ecbe2c5966634582a8e2020d51abcace9b55aa959e",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"ed2a670a77a1b80653c5bde2d813b0ab2e92872cc9b2b611ce11050b95139be6","d77dc39c11db46f88c0155e000119eaf0a3d311ac42bc48d537db6673acec3b0","c1bde18cec37d98f4062d30e2c35284d4b33eb45257cd50a3d0adf2087f6bd17","f61eac456032b3b158c779d7223a7930e1eef227bfbe0190ca23ac0012229f22","648cbad33bc5cdec794ab86f1a2ba95b720a4a87909636e6115e593ba765fed4","977510adbc1666fe8065ea258a8198142d544b68e3bd7fd97327ccc8b04ca3f1","58fa3873779bc16cf36c1a7f9a2456480b5c02aab341b428963b122eccf83ceb","a9550c77318e945f14dab889043f5ca3278e211e8bfae22e0d14414ee0790741","794ece8225fbcc027838c76b7f26bcdcb3d94bf86c4fc76996b3529cadac70b0","6cd7a832c76e814ecfeab42ee4114a57b60d98f9adc2da578aa711790d87144a","c315ba3bf28ae0a3b653cf4e04b92d439812b2e0086f7a255af7d94084471d5e","63ff18a4da77d7432fb1a31c6f2170c0b78208888dd8bd6c8034dc7f24d342a8","11b57b8eae4fd5409da63a1d466487a093bb31c2609d505c26ccdd6b160baf0a","4ad0a19ba3a99b04c27e03f49d279d59d44f4076e5a174052fe9e4c5048ffd6e","5b563db2a9fdba4950d49351dae9909146ca93bec867e748754d255769e169e0","88de5467cd5e4c2c1384629806d56ac1215657bddf39ef9f60a0e05beee2b131","015781ed23abacf6f3dc0deda1ef14119a3bfbb94ba429eab20aedaca10b3c0f","096e5d8e4e2faca903221837f5c249153aa5d98405d4150bd41e54f7efbc8929","0a891b4678e2705451b79b6587efa5911288492815e1a2b46da880c06979f4ed","3d111fc2375815714ce2a96e1a9403077e40ba5f7f0aa9520482641833a2917c","8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881","976b7d4fa6b154ae080c22f5249da4fa5c5bfb7584abf0c06279e2814bf4660a",{"version":"6af85f3048fce6ef2f45a19e4a3bbfe40148a7bcc5a96389cd1cbfe2785617e8","signature":"f36b5b73df41414686c4d09105ba94569a088a90c09e305de15205dfc72fb15a"},"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6",{"version":"15d14a6257913b571979853247bf138e77f243090ec9af1ce7631cbddc53b747","signature":"99b51e611f87f58d340ae143d9078f58e2397caa3856bb777aa49cc874aeff51"},{"version":"fe79157b20a6d603e3810ff7e40b15c3aed95529e6e821c06ebd1738dc20952a","signature":"24ad06e44e3be50d3456daee00ed728912116452f1de00116a955d59f5819df9"},"2def8cb1fad884822bc923bde6850b44c2bb5e9ec9d0ad2e9bea1b7a0832ad1c",{"version":"b0f3f670e6b55da49fa14b7d3dd15b0ddf826c7ba85c1d521530e943d7abc483","signature":"9bbe1e0a1acd8f3858341ede1f19af30efe82b6020d613870bd72c3941a6cf72"},{"version":"9591b867a15ceb61b03e819180513e9c00de3a81d60b855d7861176558fa99f9","signature":"44a94b65d0f5b82a29e6d2a44bd78f401a0e60821a66dd5a391fb07ceaef9853"},{"version":"068685b0fbe004bfda3f9a82e91d12918ff860dd152ed315c09b09d04adc75e7","signature":"fbcceb9f48f0accf71107cfce7229b86a4b9e39f42e9d39e67606a9c59193827"},{"version":"da37010beba7726c6b55662933be8d0b9fe6286a652a97886661e2baad95068e","signature":"93b711acbfab986ac3399fada1ee37f16ebaff432b4ef01abf7f8eaaf52bb8d8"},{"version":"95cf24b6f00882be20f0af50583e69680f79862b4e0f2af658ff380194e713bc","signature":"335a647bf548381893c133ac140e4f84ec48391badc966f34ca5921c2b655ce3"},{"version":"90e0cde9d974ee991ff855297d94b5614d03601fbe78844aebecaca402af8cdf","signature":"0491cb2c1c0451cc11a612d50972f1dfd5262cb7770be089066dac01c4346b19"},{"version":"2b59185accf7f896ac1f21ec68c031c796d486c0a1bce2aed311384a6d37f4bc","signature":"02921aee3a199b70aabe902f17a30440787d9117b0281a33ef17f3373d378eb8"},{"version":"f6df613d97fd572ffddbf3118763f080d6e83b6d5f3e4b51072f789141849f42","signature":"5b11ec7580e72b0dfae7e6a74292b6bbbef78d0eb192cfd5282ae8d04f771dc1"}],"root":[137,[139,149]],"options":{"composite":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":6,"outDir":"./","skipLibCheck":true,"strict":false,"target":7},"fileIdsList":[[51,108],[61,108,116,117],[108,116,120],[51,108,116,117],[51,108,116],[108,119,121,122,123,125,126,127],[51,79,108,115,116,118],[79,108,115,116,118],[51,79,108,115,116,124],[51,55,108],[62,108],[65,108],[66,71,99,108],[67,78,79,86,96,107,108],[67,68,78,86,108],[69,108],[70,71,79,87,108],[71,96,104,108],[72,74,78,86,108],[73,108],[74,75,108],[78,108],[76,78,108],[78,79,80,96,107,108],[78,79,80,93,96,99,108],[108,112],[108],[74,81,86,96,107,108],[78,79,81,82,86,96,104,107,108],[81,83,96,104,107,108],[62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114],[78,84,108],[85,107,108],[74,78,86,96,108],[87,108],[88,108],[65,89,108],[90,106,108,112],[91,108],[92,108],[78,93,94,108],[93,95,108,110],[66,78,96,97,98,99,108],[66,96,98,108],[96,97,108],[99,108],[100,108],[78,102,103,108],[102,103,108],[71,86,96,104,108],[105,108],[86,106,108],[66,81,92,107,108],[71,108],[96,108,109],[108,110],[108,111],[66,71,78,80,89,96,107,108,110,112],[96,108,113],[108,133],[108,134,135],[108,134],[56,61,108],[51,53,108],[53,108],[52,108],[55,108],[49,108],[49,57,108],[58,108],[51,56,57,58,59,60,108],[49,50,52,53,55,108],[49,50,52,108],[54,61,108,140,141],[61,108,129,131,132,142,143],[61,108,129,131,132],[108,129,132,142,144,145],[71,108,142,144],[61,108,145,146],[108,145,146,147,148],[61,108],[108,129,131,132,142,143],[51,66,108,127,128,129,130,131,132,136,137,139],[61,141],[61],[61,143]],"referencedMap":[[116,1],[120,2],[121,3],[127,4],[117,5],[128,6],[126,7],[122,2],[123,2],[118,2],[119,8],[124,4],[125,9],[132,10],[62,11],[63,11],[65,12],[66,13],[67,14],[68,15],[69,16],[70,17],[71,18],[72,19],[73,20],[74,21],[75,21],[77,22],[76,23],[78,22],[79,24],[80,25],[64,26],[114,27],[81,28],[82,29],[83,30],[115,31],[84,32],[85,33],[86,34],[87,35],[88,36],[89,37],[90,38],[91,39],[92,40],[93,41],[94,41],[95,42],[96,43],[98,44],[97,45],[99,46],[100,47],[101,27],[102,48],[103,49],[104,50],[105,51],[106,52],[107,53],[108,54],[109,55],[110,56],[111,57],[112,58],[113,59],[135,27],[134,60],[136,61],[133,62],[50,27],[131,63],[52,64],[60,27],[51,65],[55,66],[130,67],[57,68],[58,69],[49,27],[129,70],[61,71],[56,72],[54,64],[53,73],[59,27],[46,27],[47,27],[8,27],[9,27],[13,27],[12,27],[2,27],[14,27],[15,27],[16,27],[17,27],[18,27],[19,27],[20,27],[21,27],[3,27],[4,27],[25,27],[22,27],[23,27],[24,27],[26,27],[27,27],[28,27],[5,27],[29,27],[30,27],[31,27],[32,27],[6,27],[36,27],[33,27],[34,27],[35,27],[37,27],[7,27],[38,27],[48,27],[43,27],[44,27],[39,27],[40,27],[41,27],[42,27],[1,27],[45,27],[11,27],[10,27],[142,74],[143,75],[137,76],[146,77],[145,78],[147,79],[149,80],[141,81],[148,27],[144,82],[139,27],[140,83],[138,27]],"exportedModulesMap":[[116,1],[120,2],[121,3],[127,4],[117,5],[128,6],[126,7],[122,2],[123,2],[118,2],[119,8],[124,4],[125,9],[132,10],[62,11],[63,11],[65,12],[66,13],[67,14],[68,15],[69,16],[70,17],[71,18],[72,19],[73,20],[74,21],[75,21],[77,22],[76,23],[78,22],[79,24],[80,25],[64,26],[114,27],[81,28],[82,29],[83,30],[115,31],[84,32],[85,33],[86,34],[87,35],[88,36],[89,37],[90,38],[91,39],[92,40],[93,41],[94,41],[95,42],[96,43],[98,44],[97,45],[99,46],[100,47],[101,27],[102,48],[103,49],[104,50],[105,51],[106,52],[107,53],[108,54],[109,55],[110,56],[111,57],[112,58],[113,59],[135,27],[134,60],[136,61],[133,62],[50,27],[131,63],[52,64],[60,27],[51,65],[55,66],[130,67],[57,68],[58,69],[49,27],[129,70],[61,71],[56,72],[54,64],[53,73],[59,27],[46,27],[47,27],[8,27],[9,27],[13,27],[12,27],[2,27],[14,27],[15,27],[16,27],[17,27],[18,27],[19,27],[20,27],[21,27],[3,27],[4,27],[25,27],[22,27],[23,27],[24,27],[26,27],[27,27],[28,27],[5,27],[29,27],[30,27],[31,27],[32,27],[6,27],[36,27],[33,27],[34,27],[35,27],[37,27],[7,27],[38,27],[48,27],[43,27],[44,27],[39,27],[40,27],[41,27],[42,27],[1,27],[45,27],[11,27],[10,27],[142,84],[143,85],[141,81],[144,86],[138,27]],"semanticDiagnosticsPerFile":[116,120,121,127,117,128,126,122,123,118,119,124,125,132,62,63,65,66,67,68,69,70,71,72,73,74,75,77,76,78,79,80,64,114,81,82,83,115,84,85,86,87,88,89,90,91,92,93,94,95,96,98,97,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,135,134,136,133,50,131,52,60,51,55,130,57,58,49,129,61,56,54,53,59,46,47,8,9,13,12,2,14,15,16,17,18,19,20,21,3,4,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,48,43,44,39,40,41,42,1,45,11,10,142,143,137,146,145,147,149,141,148,144,139,140,138],"latestChangedDtsFile":"./src/index.d.ts"},"version":"5.0.4"}
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "@fireproof/core",
3
- "version": "0.3.2",
3
+ "version": "0.3.3",
4
4
  "description": "Realtime database for IPFS",
5
- "main": "index.js",
5
+ "main": "src/index.js",
6
6
  "type": "module",
7
+ "types": "./dist/src/index.d.ts",
7
8
  "scripts": {
8
9
  "keygen": "node scripts/keygen.js",
9
10
  "test": "standard && npm run test:unencrypted && npm run test:mocha",
@@ -14,7 +15,8 @@
14
15
  "prepublishOnly": "cp ../../README.md .",
15
16
  "postpublish": "rm README.md",
16
17
  "lint": "standard",
17
- "lint:fix": "standard --fix"
18
+ "lint:fix": "standard --fix",
19
+ "build": "tsc --build"
18
20
  },
19
21
  "keywords": [
20
22
  "database",
@@ -51,6 +53,7 @@
51
53
  "flexsearch": "^0.7.31",
52
54
  "mocha": "^10.2.0",
53
55
  "nanoid": "^4.0.0",
56
+ "typescript": "^5.0.2",
54
57
  "standard": "^17.0.0"
55
58
  },
56
59
  "mocha": {
@@ -73,6 +76,33 @@
73
76
  "url": "https://github.com/fireproof-storage/fireproof/issues"
74
77
  },
75
78
  "homepage": "https://fireproof.storage",
79
+ "exports": {
80
+ ".": {
81
+ "types": "./dist/src/index.d.ts",
82
+ "import": "./src/index.js"
83
+ },
84
+ "./fireproof": {
85
+ "types": "./dist/src/fireproof.d.ts",
86
+ "import": "./src/fireproof.js"
87
+ },
88
+ "./hydrator": {
89
+ "types": "./dist/src/hydrator.d.ts",
90
+ "import": "./src/hydrator.js"
91
+ },
92
+ "./listener": {
93
+ "types": "./dist/src/listener.d.ts",
94
+ "import": "./src/listener.js"
95
+ },
96
+ "./db-index": {
97
+ "types": "./dist/src/db-index.d.ts",
98
+ "import": "./src/db-index.js"
99
+ }
100
+ },
101
+ "files": [
102
+ "src",
103
+ "dist",
104
+ "index.js"
105
+ ],
76
106
  "workspaces": [
77
107
  "examples/todomvc"
78
108
  ]
package/src/blockstore.js CHANGED
@@ -1,6 +1,7 @@
1
+ // @ts-nocheck
1
2
  import { parse } from 'multiformats/link'
2
3
  import { CID } from 'multiformats'
3
- import Valet from './valet.js'
4
+ import { Valet } from './valet.js'
4
5
 
5
6
  // const sleep = ms => new Promise(r => setTimeout(r, ms))
6
7
 
@@ -27,7 +28,7 @@ const husher = (id, workFn) => {
27
28
  * A blockstore that caches writes to a transaction and only persists them when committed.
28
29
  * @implements {Blockstore}
29
30
  */
30
- export default class TransactionBlockstore {
31
+ export class TransactionBlockstore {
31
32
  /** @type {Map<string, Uint8Array>} */
32
33
  committedBlocks = new Map()
33
34
 
package/src/clock.js CHANGED
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import { Block, encode, decode } from 'multiformats/block'
2
3
  import { sha256 } from 'multiformats/hashes/sha2'
3
4
  import * as cbor from '@ipld/dag-cbor'
@@ -22,7 +23,7 @@ import { CIDCounter } from 'prolly-trees/utils'
22
23
  * Advance the clock by adding an event.
23
24
  *
24
25
  * @template T
25
- * @param {import('../test/block').BlockFetcher} blocks Block storage.
26
+ * @param {import('./blockstore').BlockFetcher} blocks Block storage.
26
27
  * @param {EventLink<T>[]} head The head of the clock.
27
28
  * @param {EventLink<T>} event The event to add.
28
29
  * @returns {Promise<EventLink<T>[]>} The new head of the clock.
@@ -89,7 +90,7 @@ export class EventBlock extends Block {
89
90
 
90
91
  /** @template T */
91
92
  export class EventFetcher {
92
- /** @param {import('../test/block').BlockFetcher} blocks */
93
+ /** @param {import('./blockstore').BlockFetcher} blocks */
93
94
  constructor (blocks) {
94
95
  /** @private */
95
96
  this._blocks = blocks
@@ -168,7 +169,7 @@ async function contains (events, a, b) {
168
169
 
169
170
  /**
170
171
  * @template T
171
- * @param {import('../test/block').BlockFetcher} blocks Block storage.
172
+ * @param {import('./blockstore').BlockFetcher} blocks Block storage.
172
173
  * @param {EventLink<T>[]} head
173
174
  * @param {object} [options]
174
175
  * @param {(b: EventBlockView<T>) => string} [options.renderNodeLabel]
package/src/crypto.js CHANGED
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import * as codec from 'encrypted-block'
2
3
  import {
3
4
  create,
package/src/db-index.js CHANGED
@@ -1,15 +1,20 @@
1
+ // @ts-nocheck
2
+ // @ts-ignore
1
3
  import { create, load } from 'prolly-trees/db-index'
2
4
  // import { create, load } from '../../../../prolly-trees/src/db-index.js'
3
5
 
4
6
  import { sha256 as hasher } from 'multiformats/hashes/sha2'
7
+ // @ts-ignore
5
8
  import { nocache as cache } from 'prolly-trees/cache'
9
+ // @ts-ignore
6
10
  import { bf, simpleCompare } from 'prolly-trees/utils'
7
11
  import { makeGetBlock } from './prolly.js'
8
12
  import { cidsToProof } from './fireproof.js'
9
13
 
10
14
  import * as codec from '@ipld/dag-cbor'
11
15
  // import { create as createBlock } from 'multiformats/block'
12
- import TransactionBlockstore, { doTransaction } from './blockstore.js'
16
+ import { TransactionBlockstore, doTransaction } from './blockstore.js'
17
+ // @ts-ignore
13
18
  import charwise from 'charwise'
14
19
 
15
20
  const ALWAYS_REBUILD = false // todo: make false
@@ -87,7 +92,7 @@ const indexEntriesForChanges = (changes, mapFn) => {
87
92
  * @param {Function} mapFn - The map function to apply to each entry in the database.
88
93
  *
89
94
  */
90
- export default class DbIndex {
95
+ export class DbIndex {
91
96
  constructor (database, mapFn, clock, opts = {}) {
92
97
  // console.log('DbIndex constructor', database.constructor.name, typeof mapFn, clock)
93
98
  /**
@@ -172,7 +177,7 @@ export default class DbIndex {
172
177
  /**
173
178
  * Query object can have {range}
174
179
  * @param {DbQuery} query - the query range to use
175
- * @returns {Promise<{rows: Array<{id: string, key: string, value: any}>}>}
180
+ * @returns {Promise<{proof: {}, rows: Array<{id: string, key: string, value: any}>}>}
176
181
  * @memberof DbIndex
177
182
  * @instance
178
183
  */
@@ -259,8 +264,8 @@ export default class DbIndex {
259
264
 
260
265
  /**
261
266
  * Update the DbIndex with the given entries
262
- * @param {Blockstore} blocks
263
- * @param {Block} inRoot
267
+ * @param {import('./blockstore.js').Blockstore} blocks
268
+ * @param {{root, cid}} inIndex
264
269
  * @param {DbIndexEntry[]} indexEntries
265
270
  * @private
266
271
  */
package/src/fireproof.js CHANGED
@@ -1,23 +1,27 @@
1
+ // @ts-nocheck
1
2
  import { randomBytes } from 'crypto'
2
3
  import { visMerkleClock, visMerkleTree, vis, put, get, getAll, eventsSince } from './prolly.js'
3
- import TransactionBlockstore, { doTransaction } from './blockstore.js'
4
+ import { TransactionBlockstore, doTransaction } from './blockstore.js'
4
5
  import charwise from 'charwise'
6
+ // import { CID } from 'multiformats/dist/types/src/cid.js'
5
7
 
6
8
  // const sleep = ms => new Promise(resolve => setTimeout(resolve, ms))
7
9
 
10
+ // class Proof {}
11
+
8
12
  /**
9
13
  * @class Fireproof
10
14
  * @classdesc Fireproof stores data in IndexedDB and provides a Merkle clock.
11
15
  * This is the main class for saving and loading JSON and other documents with the database. You can find additional examples and
12
16
  * usage guides in the repository README.
13
17
  *
14
- * @param {Blockstore} blocks - The block storage instance to use documents and indexes
18
+ * @param {import('./blockstore.js').TransactionBlockstore} blocks - The block storage instance to use documents and indexes
15
19
  * @param {CID[]} clock - The Merkle clock head to use for the Fireproof instance.
16
20
  * @param {object} [config] - Optional configuration options for the Fireproof instance.
17
21
  * @param {object} [authCtx] - Optional authorization context object to use for any authentication checks.
18
22
  *
19
23
  */
20
- export default class Fireproof {
24
+ export class Fireproof {
21
25
  listeners = new Set()
22
26
 
23
27
  /**
@@ -161,7 +165,7 @@ export default class Fireproof {
161
165
  *
162
166
  * @param {string} key - the ID of the document to retrieve
163
167
  * @param {Object} [opts] - options
164
- * @returns {Object<{_id: string, ...doc: Object}>} - the document with the specified ID
168
+ * @returns {Promise<{_id: string}>} - the document with the specified ID
165
169
  * @memberof Fireproof
166
170
  * @instance
167
171
  */
@@ -190,8 +194,9 @@ export default class Fireproof {
190
194
  *
191
195
  * @param {Object} doc - the document to be added
192
196
  * @param {string} doc._id - the document ID. If not provided, a random ID will be generated.
193
- * @param {Object} doc.* - the document data to be added
194
- * @returns {Object<{ id: string, clock: CID[] }>} - The result of adding the document to the database
197
+ * @param {CID[]} doc._clock - the document ID. If not provided, a random ID will be generated.
198
+ * @param {Proof} doc._proof - CIDs referenced by the update
199
+ * @returns {Promise<{ id: string, clock: CID[] }>} - The result of adding the document to the database
195
200
  * @memberof Fireproof
196
201
  * @instance
197
202
  */
@@ -203,8 +208,8 @@ export default class Fireproof {
203
208
 
204
209
  /**
205
210
  * Deletes a document from the database
206
- * @param {string} id - the document ID
207
- * @returns {Object<{ id: string, clock: CID[] }>} - The result of deleting the document from the database
211
+ * @param {string | any} docOrId - the document ID
212
+ * @returns {Promise<{ id: string, clock: CID[] }>} - The result of deleting the document from the database
208
213
  * @memberof Fireproof
209
214
  * @instance
210
215
  */
@@ -226,8 +231,8 @@ export default class Fireproof {
226
231
  /**
227
232
  * Updates the underlying storage with the specified event.
228
233
  * @private
229
- * @param {Object<{key : string, value: any}>} event - the event to add
230
- * @returns {Object<{ id: string, clock: CID[] }>} - The result of adding the event to storage
234
+ * @param {{del?: true, key : string, value?: any}} decodedEvent - the event to add
235
+ * @returns {Promise<{ proof:{}, id: string, clock: CID[] }>} - The result of adding the event to storage
231
236
  */
232
237
  async putToProllyTree (decodedEvent, clock = null) {
233
238
  const event = encodeEvent(decodedEvent)
package/src/hydrator.js CHANGED
@@ -1,10 +1,10 @@
1
- import DbIndex from './db-index.js'
2
- import Fireproof from './fireproof.js'
1
+ import { DbIndex } from './db-index.js'
2
+ import { Fireproof } from './fireproof.js'
3
3
  import { CID } from 'multiformats'
4
4
 
5
5
  const parseCID = cid => typeof cid === 'string' ? CID.parse(cid) : cid
6
6
 
7
- export default class Hydrator {
7
+ export class Hydrator {
8
8
  static fromJSON (json, database) {
9
9
  database.hydrate({ clock: json.clock.map(c => parseCID(c)), name: json.name, key: json.key })
10
10
  if (json.indexes) {
package/src/index.js ADDED
@@ -0,0 +1,6 @@
1
+ import { Fireproof } from './fireproof'
2
+ import { DbIndex as Index } from './db-index'
3
+ import { Listener } from './listener'
4
+ import { Hydrator } from './hydrator'
5
+
6
+ export { Fireproof, Index, Listener, Hydrator }
package/src/listener.js CHANGED
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  /**
2
3
  * A Fireproof database Listener allows you to react to events in the database.
3
4
  *
@@ -9,7 +10,7 @@
9
10
  */
10
11
  // import { ChangeEvent } from './db-index'
11
12
 
12
- export default class Listener {
13
+ export class Listener {
13
14
  subcribers = new Map()
14
15
  doStopListening = null
15
16
 
package/src/prolly.js CHANGED
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  import {
2
3
  advance,
3
4
  EventFetcher,
@@ -37,23 +38,9 @@ export const makeGetBlock = (blocks) => {
37
38
  }
38
39
 
39
40
  /**
40
- * Creates and saves a new event.
41
- * @param {import('./blockstore.js').Blockstore} inBlocks - A persistent blockstore.
42
- * @param {MemoryBlockstore} mblocks - A temporary blockstore.
43
- * @param {Function} getBlock - A function that gets a block.
44
- * @param {Function} bigPut - A function that puts a block.
45
- * @param {import('prolly-trees/map').Root} root - The root node.
46
- * @param {Object<{ key: string, value: any, del: boolean }>} event - The update event.
47
- * @param {CID[]} head - The head of the event chain.
48
- * @param {Array<import('multiformats/block').Block>} additions - A array of additions.
49
- * @param {Array<mport('multiformats/block').Block>>} removals - An array of removals.
50
- * @returns {Promise<{
51
- * root: import('prolly-trees/map').Root,
52
- * additions: Map<string, import('multiformats/block').Block>,
53
- * removals: Array<string>,
54
- * head: CID[],
55
- * event: CID[]
56
- * }>}
41
+ *
42
+ * @param {*} param0
43
+ * @returns
57
44
  */
58
45
  async function createAndSaveNewEvent ({
59
46
  inBlocks,
@@ -198,7 +185,7 @@ const doProllyBulk = async (inBlocks, head, event) => {
198
185
  /**
199
186
  * Put a value (a CID) for the given key. If the key exists it's value is overwritten.
200
187
  *
201
- * @param {import('../test/block.js').BlockFetcher} blocks Bucket block storage.
188
+ * @param {import('./blockstore.js').BlockFetcher} blocks Bucket block storage.
202
189
  * @param {import('./clock').EventLink<EventData>[]} head Merkle clock head.
203
190
  * @param {string} key The key of the value to put.
204
191
  * @param {CID} value The value to put.
@@ -250,7 +237,7 @@ export async function put (inBlocks, head, event, options) {
250
237
  /**
251
238
  * Determine the effective prolly root given the current merkle clock head.
252
239
  *
253
- * @param {import('../test/block.js').BlockFetcher} blocks Bucket block storage.
240
+ * @param {import('./blockstore.js').BlockFetcher} blocks Bucket block storage.
254
241
  * @param {import('./clock').EventLink<EventData>[]} head Merkle clock head.
255
242
  */
256
243
  export async function root (inBlocks, head) {
@@ -270,10 +257,10 @@ export async function root (inBlocks, head) {
270
257
 
271
258
  /**
272
259
  * Get the list of events not known by the `since` event
273
- * @param {import('../test/block.js').BlockFetcher} blocks Bucket block storage.
260
+ * @param {import('./blockstore.js').BlockFetcher} blocks Bucket block storage.
274
261
  * @param {import('./clock').EventLink<EventData>[]} head Merkle clock head.
275
262
  * @param {import('./clock').EventLink<EventData>} since Event to compare against.
276
- * @returns {Promise<import('./clock').EventLink<EventData>[]>}
263
+ * @returns {Promise<{clockCIDs: CIDCounter, result: EventData[]}>}
277
264
  */
278
265
  export async function eventsSince (blocks, head, since) {
279
266
  if (!head.length) {
@@ -286,10 +273,10 @@ export async function eventsSince (blocks, head, since) {
286
273
 
287
274
  /**
288
275
  *
289
- * @param {import('../test/block.js').BlockFetcher} blocks Bucket block storage.
276
+ * @param {import('./blockstore.js').BlockFetcher} blocks Bucket block storage.
290
277
  * @param {import('./clock').EventLink<EventData>[]} head Merkle clock head.
291
278
  *
292
- * @returns {Promise<import('./prolly').Entry[]>}
279
+ * @returns {Promise<{clockCIDs: CIDCounter, result: EventData[]}>}
293
280
  *
294
281
  */
295
282
  export async function getAll (blocks, head) {
@@ -307,7 +294,7 @@ export async function getAll (blocks, head) {
307
294
  }
308
295
 
309
296
  /**
310
- * @param {import('../test/block.js').BlockFetcher} blocks Bucket block storage.
297
+ * @param {import('./blockstore.js').BlockFetcher} blocks Bucket block storage.
311
298
  * @param {import('./clock').EventLink<EventData>[]} head Merkle clock head.
312
299
  * @param {string} key The key of the value to retrieve.
313
300
  */
package/src/sha1.js CHANGED
@@ -1,3 +1,4 @@
1
+ // @ts-nocheck
1
2
  // from https://github.com/duzun/sync-sha1/blob/master/rawSha1.js
2
3
  // MIT License Copyright (c) 2020 Dumitru Uzun
3
4
  // Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -29,7 +30,7 @@
29
30
  *
30
31
  * @return {Uint8Array} sha1 hash
31
32
  */
32
- export default function rawSha1 (b) {
33
+ export function rawSha1 (b) {
33
34
  let i = b.byteLength
34
35
  let bs = 0
35
36
  let A; let B; let C; let D; let G