@fireproof/core 0.3.11 → 0.3.13

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 (52) hide show
  1. package/README.md +1 -1
  2. package/dist/bundle.js +2168 -0
  3. package/dist/src/blockstore.d.ts +115 -0
  4. package/dist/src/blockstore.d.ts.map +1 -0
  5. package/dist/src/clock.d.ts +98 -0
  6. package/dist/src/clock.d.ts.map +1 -0
  7. package/dist/src/crypto.d.ts +18 -0
  8. package/dist/src/crypto.d.ts.map +1 -0
  9. package/dist/src/db-index.d.ts +116 -0
  10. package/dist/src/db-index.d.ts.map +1 -0
  11. package/dist/src/fireproof.d.ts +167 -0
  12. package/dist/src/fireproof.d.ts.map +1 -0
  13. package/dist/src/hydrator.d.ts +6 -0
  14. package/dist/src/hydrator.d.ts.map +1 -0
  15. package/dist/src/index.d.ts +6 -0
  16. package/dist/src/index.d.ts.map +1 -0
  17. package/dist/src/listener.d.ts +36 -0
  18. package/dist/src/listener.d.ts.map +1 -0
  19. package/dist/src/prolly.d.ts +83 -0
  20. package/dist/src/prolly.d.ts.map +1 -0
  21. package/dist/src/sha1.d.ts +9 -0
  22. package/dist/src/sha1.d.ts.map +1 -0
  23. package/dist/src/valet.d.ts +34 -0
  24. package/dist/src/valet.d.ts.map +1 -0
  25. package/dist/tsconfig.tsbuildinfo +1 -0
  26. package/package.json +39 -5
  27. package/src/blockstore.js +24 -23
  28. package/src/clock.js +4 -3
  29. package/src/crypto.js +1 -0
  30. package/src/db-index.js +23 -18
  31. package/src/fireproof.js +31 -26
  32. package/src/hydrator.js +3 -3
  33. package/src/index.js +6 -0
  34. package/src/listener.js +9 -8
  35. package/src/prolly.js +12 -25
  36. package/src/sha1.js +2 -1
  37. package/src/valet.js +22 -20
  38. package/hooks/use-fireproof.js +0 -135
  39. package/index.js +0 -6
  40. package/scripts/keygen.js +0 -3
  41. package/test/block.js +0 -65
  42. package/test/clock.test.js +0 -694
  43. package/test/db-index.test.js +0 -261
  44. package/test/fireproof.test.js +0 -493
  45. package/test/fulltext.test.js +0 -66
  46. package/test/helpers.js +0 -45
  47. package/test/hydrator.test.js +0 -81
  48. package/test/listener.test.js +0 -102
  49. package/test/prolly.test.js +0 -190
  50. package/test/proofs.test.js +0 -53
  51. package/test/reproduce-fixture-bug.test.js +0 -65
  52. 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","../../../node_modules/.pnpm/@types+eslint@8.37.0/node_modules/@types/eslint/helpers.d.ts","../../../node_modules/.pnpm/@types+estree@1.0.0/node_modules/@types/estree/index.d.ts","../../../node_modules/.pnpm/@types+json-schema@7.0.11/node_modules/@types/json-schema/index.d.ts","../../../node_modules/.pnpm/@types+eslint@8.37.0/node_modules/@types/eslint/index.d.ts","../../../node_modules/.pnpm/@types+eslint-scope@3.7.4/node_modules/@types/eslint-scope/index.d.ts"],"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":"17015418d670884cf7531c4d2ff2aba19aae3ed0b056d77cb12e39e8b9e0e830","signature":"fbcceb9f48f0accf71107cfce7229b86a4b9e39f42e9d39e67606a9c59193827"},{"version":"da37010beba7726c6b55662933be8d0b9fe6286a652a97886661e2baad95068e","signature":"93b711acbfab986ac3399fada1ee37f16ebaff432b4ef01abf7f8eaaf52bb8d8"},{"version":"95cf24b6f00882be20f0af50583e69680f79862b4e0f2af658ff380194e713bc","signature":"335a647bf548381893c133ac140e4f84ec48391badc966f34ca5921c2b655ce3"},{"version":"90e0cde9d974ee991ff855297d94b5614d03601fbe78844aebecaca402af8cdf","signature":"0491cb2c1c0451cc11a612d50972f1dfd5262cb7770be089066dac01c4346b19"},{"version":"2b59185accf7f896ac1f21ec68c031c796d486c0a1bce2aed311384a6d37f4bc","signature":"02921aee3a199b70aabe902f17a30440787d9117b0281a33ef17f3373d378eb8"},{"version":"ea324df4ec72e86a4725ce163c67ae983589ccadf2f9b69194981db94a464e92","signature":"5bdb50755e0dd912d81875d946a39431252ca1e629ddcc4c6e6ba0d909876013"},{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"946bd1737d9412395a8f24414c70f18660b84a75a12b0b448e6eb1a2161d06dd","f3e604694b624fa3f83f6684185452992088f5efb2cf136b62474aa106d6f1b6","dea2650c477f53d503a27f78ed17b13d7184c2f922eb4d3367ccf52634765467","e050a0afcdbb269720a900c85076d18e0c1ab73e580202a2bf6964978181222a"],"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],[108,151,153],[108],[108,150,151,152],[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],[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],[154,11],[150,12],[153,13],[151,12],[152,12],[62,14],[63,14],[65,15],[66,16],[67,17],[68,18],[69,19],[70,20],[71,21],[72,22],[73,23],[74,24],[75,24],[77,25],[76,26],[78,25],[79,27],[80,28],[64,29],[114,12],[81,30],[82,31],[83,32],[115,33],[84,34],[85,35],[86,36],[87,37],[88,38],[89,39],[90,40],[91,41],[92,42],[93,43],[94,43],[95,44],[96,45],[98,46],[97,47],[99,48],[100,49],[101,12],[102,50],[103,51],[104,52],[105,53],[106,54],[107,55],[108,56],[109,57],[110,58],[111,59],[112,60],[113,61],[135,12],[134,62],[136,63],[133,64],[50,12],[131,65],[52,66],[60,12],[51,67],[55,68],[130,69],[57,70],[58,71],[49,12],[129,72],[61,73],[56,74],[54,66],[53,75],[59,12],[46,12],[47,12],[8,12],[9,12],[13,12],[12,12],[2,12],[14,12],[15,12],[16,12],[17,12],[18,12],[19,12],[20,12],[21,12],[3,12],[4,12],[25,12],[22,12],[23,12],[24,12],[26,12],[27,12],[28,12],[5,12],[29,12],[30,12],[31,12],[32,12],[6,12],[36,12],[33,12],[34,12],[35,12],[37,12],[7,12],[38,12],[48,12],[43,12],[44,12],[39,12],[40,12],[41,12],[42,12],[1,12],[45,12],[11,12],[10,12],[142,76],[143,77],[137,78],[146,79],[145,80],[147,81],[149,82],[141,83],[148,12],[144,84],[139,12],[140,85],[138,12]],"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],[154,11],[150,12],[153,13],[151,12],[152,12],[62,14],[63,14],[65,15],[66,16],[67,17],[68,18],[69,19],[70,20],[71,21],[72,22],[73,23],[74,24],[75,24],[77,25],[76,26],[78,25],[79,27],[80,28],[64,29],[114,12],[81,30],[82,31],[83,32],[115,33],[84,34],[85,35],[86,36],[87,37],[88,38],[89,39],[90,40],[91,41],[92,42],[93,43],[94,43],[95,44],[96,45],[98,46],[97,47],[99,48],[100,49],[101,12],[102,50],[103,51],[104,52],[105,53],[106,54],[107,55],[108,56],[109,57],[110,58],[111,59],[112,60],[113,61],[135,12],[134,62],[136,63],[133,64],[50,12],[131,65],[52,66],[60,12],[51,67],[55,68],[130,69],[57,70],[58,71],[49,12],[129,72],[61,73],[56,74],[54,66],[53,75],[59,12],[46,12],[47,12],[8,12],[9,12],[13,12],[12,12],[2,12],[14,12],[15,12],[16,12],[17,12],[18,12],[19,12],[20,12],[21,12],[3,12],[4,12],[25,12],[22,12],[23,12],[24,12],[26,12],[27,12],[28,12],[5,12],[29,12],[30,12],[31,12],[32,12],[6,12],[36,12],[33,12],[34,12],[35,12],[37,12],[7,12],[38,12],[48,12],[43,12],[44,12],[39,12],[40,12],[41,12],[42,12],[1,12],[45,12],[11,12],[10,12],[142,86],[143,87],[141,83],[144,88],[138,12]],"semanticDiagnosticsPerFile":[116,120,121,127,117,128,126,122,123,118,119,124,125,132,154,150,153,151,152,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.11",
3
+ "version": "0.3.13",
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",
@@ -32,7 +34,6 @@
32
34
  ],
33
35
  "license": "Apache-2.0 OR MIT",
34
36
  "dependencies": {
35
- "prolly-trees": "1.0.4",
36
37
  "@ipld/car": "^5.1.0",
37
38
  "@ipld/dag-cbor": "^9.0.0",
38
39
  "archy": "^1.0.0",
@@ -43,6 +44,8 @@
43
44
  "encrypted-block": "^0.0.3",
44
45
  "idb": "^7.1.1",
45
46
  "multiformats": "^11.0.1",
47
+ "node-polyfill-webpack-plugin": "^2.0.1",
48
+ "prolly-trees": "1.0.4",
46
49
  "sade": "^1.8.1"
47
50
  },
48
51
  "devDependencies": {
@@ -51,7 +54,10 @@
51
54
  "flexsearch": "^0.7.31",
52
55
  "mocha": "^10.2.0",
53
56
  "nanoid": "^4.0.0",
54
- "standard": "^17.0.0"
57
+ "standard": "^17.0.0",
58
+ "typescript": "^5.0.2",
59
+ "webpack": "^5.78.0",
60
+ "webpack-cli": "^5.0.1"
55
61
  },
56
62
  "mocha": {
57
63
  "require": [
@@ -73,6 +79,34 @@
73
79
  "url": "https://github.com/fireproof-storage/fireproof/issues"
74
80
  },
75
81
  "homepage": "https://fireproof.storage",
82
+ "exports": {
83
+ ".": {
84
+ "types": "./dist/src/index.d.ts",
85
+ "import": "./src/index.js"
86
+ },
87
+ "./fireproof": {
88
+ "types": "./dist/src/fireproof.d.ts",
89
+ "import": "./src/fireproof.js"
90
+ },
91
+ "./hydrator": {
92
+ "types": "./dist/src/hydrator.d.ts",
93
+ "import": "./src/hydrator.js"
94
+ },
95
+ "./listener": {
96
+ "types": "./dist/src/listener.d.ts",
97
+ "import": "./src/listener.js"
98
+ },
99
+ "./db-index": {
100
+ "types": "./dist/src/db-index.d.ts",
101
+ "import": "./src/db-index.js"
102
+ },
103
+ "./package.json": "./package.json"
104
+ },
105
+ "files": [
106
+ "src",
107
+ "dist",
108
+ "README.md"
109
+ ],
76
110
  "workspaces": [
77
111
  "examples/todomvc"
78
112
  ]
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,14 +28,14 @@ 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
- #committedBlocks = new Map()
33
+ committedBlocks = new Map()
33
34
 
34
35
  valet = null
35
36
 
36
- #instanceId = 'blkz.' + Math.random().toString(36).substring(2, 4)
37
- #inflightTransactions = new Set()
37
+ instanceId = 'blkz.' + Math.random().toString(36).substring(2, 4)
38
+ inflightTransactions = new Set()
38
39
 
39
40
  constructor (name, encryptionKey) {
40
41
  this.valet = new Valet(name, encryptionKey)
@@ -49,7 +50,7 @@ export default class TransactionBlockstore {
49
50
  async get (cid) {
50
51
  const key = cid.toString()
51
52
  // it is safe to read from the in-flight transactions becauase they are immutable
52
- const bytes = await Promise.any([this.#transactionsGet(key), this.committedGet(key)]).catch(e => {
53
+ const bytes = await Promise.any([this.transactionsGet(key), this.committedGet(key)]).catch(e => {
53
54
  // console.log('networkGet', cid.toString(), e)
54
55
  return this.networkGet(key)
55
56
  })
@@ -59,8 +60,8 @@ export default class TransactionBlockstore {
59
60
 
60
61
  // this iterates over the in-flight transactions
61
62
  // and returns the first matching block it finds
62
- async #transactionsGet (key) {
63
- for (const transaction of this.#inflightTransactions) {
63
+ async transactionsGet (key) {
64
+ for (const transaction of this.inflightTransactions) {
64
65
  const got = await transaction.get(key)
65
66
  if (got && got.bytes) return got.bytes
66
67
  }
@@ -68,16 +69,16 @@ export default class TransactionBlockstore {
68
69
  }
69
70
 
70
71
  async committedGet (key) {
71
- const old = this.#committedBlocks.get(key)
72
+ const old = this.committedBlocks.get(key)
72
73
  if (old) return old
73
74
  const got = await this.valet.getBlock(key)
74
75
  // console.log('committedGet: ' + key)
75
- this.#committedBlocks.set(key, got)
76
+ this.committedBlocks.set(key, got)
76
77
  return got
77
78
  }
78
79
 
79
80
  async clearCommittedCache () {
80
- this.#committedBlocks.clear()
81
+ this.committedBlocks.clear()
81
82
  }
82
83
 
83
84
  async networkGet (key) {
@@ -118,10 +119,10 @@ export default class TransactionBlockstore {
118
119
  */
119
120
  // * entries () {
120
121
  // // needs transaction blocks?
121
- // // for (const [str, bytes] of this.#blocks) {
122
+ // // for (const [str, bytes] of this.blocks) {
122
123
  // // yield { cid: parse(str), bytes }
123
124
  // // }
124
- // for (const [str, bytes] of this.#committedBlocks) {
125
+ // for (const [str, bytes] of this.committedBlocks) {
125
126
  // yield { cid: parse(str), bytes }
126
127
  // }
127
128
  // }
@@ -134,7 +135,7 @@ export default class TransactionBlockstore {
134
135
  */
135
136
  begin (label = '') {
136
137
  const innerTransactionBlockstore = new InnerBlockstore(label, this)
137
- this.#inflightTransactions.add(innerTransactionBlockstore)
138
+ this.inflightTransactions.add(innerTransactionBlockstore)
138
139
  return innerTransactionBlockstore
139
140
  }
140
141
 
@@ -144,7 +145,7 @@ export default class TransactionBlockstore {
144
145
  * @memberof TransactionBlockstore
145
146
  */
146
147
  async commit (innerBlockstore) {
147
- await this.#doCommit(innerBlockstore)
148
+ await this.doCommit(innerBlockstore)
148
149
  }
149
150
 
150
151
  // first get the transaction blockstore from the map of transaction blockstores
@@ -152,14 +153,14 @@ export default class TransactionBlockstore {
152
153
  // then write the transaction blockstore to a car
153
154
  // then write the car to the valet
154
155
  // then remove the transaction blockstore from the map of transaction blockstores
155
- #doCommit = async innerBlockstore => {
156
+ doCommit = async innerBlockstore => {
156
157
  const cids = new Set()
157
158
  for (const { cid, bytes } of innerBlockstore.entries()) {
158
159
  const stringCid = cid.toString() // unnecessary string conversion, can we fix upstream?
159
- if (this.#committedBlocks.has(stringCid)) {
160
+ if (this.committedBlocks.has(stringCid)) {
160
161
  // console.log('Duplicate block: ' + stringCid) // todo some of this can be avoided, cost is extra size on car files
161
162
  } else {
162
- this.#committedBlocks.set(stringCid, bytes)
163
+ this.committedBlocks.set(stringCid, bytes)
163
164
  cids.add(stringCid)
164
165
  }
165
166
  }
@@ -175,7 +176,7 @@ export default class TransactionBlockstore {
175
176
  * @memberof TransactionBlockstore
176
177
  */
177
178
  retire (innerBlockstore) {
178
- this.#inflightTransactions.delete(innerBlockstore)
179
+ this.inflightTransactions.delete(innerBlockstore)
179
180
  }
180
181
  }
181
182
 
@@ -206,7 +207,7 @@ export const doTransaction = async (label, blockstore, doFun) => {
206
207
  /** @implements {BlockFetcher} */
207
208
  export class InnerBlockstore {
208
209
  /** @type {Map<string, Uint8Array>} */
209
- #blocks = new Map()
210
+ blocks = new Map()
210
211
  lastCid = null
211
212
  label = ''
212
213
  parentBlockstore = null
@@ -222,7 +223,7 @@ export class InnerBlockstore {
222
223
  */
223
224
  async get (cid) {
224
225
  const key = cid.toString()
225
- let bytes = this.#blocks.get(key)
226
+ let bytes = this.blocks.get(key)
226
227
  if (bytes) {
227
228
  return { cid, bytes }
228
229
  }
@@ -238,12 +239,12 @@ export class InnerBlockstore {
238
239
  */
239
240
  put (cid, bytes) {
240
241
  // console.log('put', cid)
241
- this.#blocks.set(cid.toString(), bytes)
242
+ this.blocks.set(cid.toString(), bytes)
242
243
  this.lastCid = cid
243
244
  }
244
245
 
245
246
  * entries () {
246
- for (const [str, bytes] of this.#blocks) {
247
+ for (const [str, bytes] of this.blocks) {
247
248
  yield { cid: parse(str), bytes }
248
249
  }
249
250
  }
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,16 +177,16 @@ 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
  */
179
184
  async query (query, update = true) {
180
185
  // const callId = Math.random().toString(36).substring(2, 7)
181
186
  // todo pass a root to query a snapshot
182
- // console.time(callId + '.#updateIndex')
183
- update && await this.#updateIndex(this.database.indexBlocks)
184
- // console.timeEnd(callId + '.#updateIndex')
187
+ // console.time(callId + '.updateIndex')
188
+ update && await this.updateIndex(this.database.indexBlocks)
189
+ // console.timeEnd(callId + '.updateIndex')
185
190
  // console.time(callId + '.doIndexQuery')
186
191
  // console.log('query', query)
187
192
  const response = await doIndexQuery(this.database.indexBlocks, this.indexByKey, query)
@@ -200,18 +205,18 @@ export default class DbIndex {
200
205
  * @returns {Promise<void>}
201
206
  */
202
207
 
203
- async #updateIndex (blocks) {
208
+ async updateIndex (blocks) {
204
209
  // todo this could enqueue the request and give fresh ones to all second comers -- right now it gives out stale promises while working
205
210
  // what would it do in a world where all indexes provide a database snapshot to query?
206
211
  if (this.updateIndexPromise) return this.updateIndexPromise
207
- this.updateIndexPromise = this.#innerUpdateIndex(blocks)
212
+ this.updateIndexPromise = this.innerUpdateIndex(blocks)
208
213
  this.updateIndexPromise.finally(() => { this.updateIndexPromise = null })
209
214
  return this.updateIndexPromise
210
215
  }
211
216
 
212
- async #innerUpdateIndex (inBlocks) {
217
+ async innerUpdateIndex (inBlocks) {
213
218
  // const callTag = Math.random().toString(36).substring(4)
214
- // console.log(`#updateIndex ${callTag} >`, this.instanceId, this.dbHead?.toString(), this.indexByKey.cid?.toString(), this.indexById.cid?.toString())
219
+ // console.log(`updateIndex ${callTag} >`, this.instanceId, this.dbHead?.toString(), this.indexByKey.cid?.toString(), this.indexById.cid?.toString())
215
220
  // todo remove this hack
216
221
  if (ALWAYS_REBUILD) {
217
222
  this.indexById = { root: null, cid: null }
@@ -224,15 +229,15 @@ export default class DbIndex {
224
229
  // console.timeEnd(callTag + '.changesSince')
225
230
  // console.log('result.rows.length', result.rows.length)
226
231
 
227
- // console.time(callTag + '.doTransaction#updateIndex')
228
- // console.log('#updateIndex changes length', result.rows.length)
232
+ // console.time(callTag + '.doTransactionupdateIndex')
233
+ // console.log('updateIndex changes length', result.rows.length)
229
234
 
230
235
  if (result.rows.length === 0) {
231
- // console.log('#updateIndex < no changes', result.clock)
236
+ // console.log('updateIndex < no changes', result.clock)
232
237
  this.dbHead = result.clock
233
238
  return
234
239
  }
235
- await doTransaction('#updateIndex', inBlocks, async (blocks) => {
240
+ await doTransaction('updateIndex', inBlocks, async (blocks) => {
236
241
  let oldIndexEntries = []
237
242
  let removeByIdIndexEntries = []
238
243
  await loadIndex(blocks, this.indexById, idIndexOpts)
@@ -252,15 +257,15 @@ export default class DbIndex {
252
257
  this.dbHead = result.clock
253
258
  })
254
259
  this.database.notifyExternal('dbIndex')
255
- // console.timeEnd(callTag + '.doTransaction#updateIndex')
256
- // console.log(`#updateIndex ${callTag} <`, this.instanceId, this.dbHead?.toString(), this.indexByKey.cid?.toString(), this.indexById.cid?.toString())
260
+ // console.timeEnd(callTag + '.doTransactionupdateIndex')
261
+ // console.log(`updateIndex ${callTag} <`, this.instanceId, this.dbHead?.toString(), this.indexByKey.cid?.toString(), this.indexById.cid?.toString())
257
262
  }
258
263
  }
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
  */