@aztec/archiver 0.62.0 → 0.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dest/archiver/archiver.d.ts +11 -2
  2. package/dest/archiver/archiver.d.ts.map +1 -1
  3. package/dest/archiver/archiver.js +43 -19
  4. package/dest/archiver/archiver_store.d.ts +8 -2
  5. package/dest/archiver/archiver_store.d.ts.map +1 -1
  6. package/dest/archiver/archiver_store_test_suite.d.ts.map +1 -1
  7. package/dest/archiver/archiver_store_test_suite.js +64 -25
  8. package/dest/archiver/config.d.ts +2 -6
  9. package/dest/archiver/config.d.ts.map +1 -1
  10. package/dest/archiver/config.js +3 -6
  11. package/dest/archiver/epoch_helpers.d.ts +10 -10
  12. package/dest/archiver/epoch_helpers.d.ts.map +1 -1
  13. package/dest/archiver/epoch_helpers.js +9 -10
  14. package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts +8 -2
  15. package/dest/archiver/kv_archiver_store/kv_archiver_store.d.ts.map +1 -1
  16. package/dest/archiver/kv_archiver_store/kv_archiver_store.js +14 -1
  17. package/dest/archiver/kv_archiver_store/log_store.d.ts +8 -2
  18. package/dest/archiver/kv_archiver_store/log_store.d.ts.map +1 -1
  19. package/dest/archiver/kv_archiver_store/log_store.js +144 -57
  20. package/dest/archiver/memory_archiver_store/memory_archiver_store.d.ts +13 -4
  21. package/dest/archiver/memory_archiver_store/memory_archiver_store.d.ts.map +1 -1
  22. package/dest/archiver/memory_archiver_store/memory_archiver_store.js +136 -31
  23. package/dest/factory.d.ts +5 -2
  24. package/dest/factory.d.ts.map +1 -1
  25. package/dest/factory.js +2 -2
  26. package/dest/rpc/index.d.ts +3 -2
  27. package/dest/rpc/index.d.ts.map +1 -1
  28. package/dest/rpc/index.js +10 -3
  29. package/dest/test/mock_l2_block_source.d.ts.map +1 -1
  30. package/dest/test/mock_l2_block_source.js +4 -2
  31. package/package.json +10 -10
  32. package/src/archiver/archiver.ts +54 -24
  33. package/src/archiver/archiver_store.ts +9 -2
  34. package/src/archiver/archiver_store_test_suite.ts +85 -26
  35. package/src/archiver/config.ts +11 -12
  36. package/src/archiver/epoch_helpers.ts +16 -12
  37. package/src/archiver/kv_archiver_store/kv_archiver_store.ts +15 -2
  38. package/src/archiver/kv_archiver_store/log_store.ts +176 -58
  39. package/src/archiver/memory_archiver_store/memory_archiver_store.ts +152 -27
  40. package/src/factory.ts +6 -3
  41. package/src/rpc/index.ts +11 -2
  42. package/src/test/mock_l2_block_source.ts +3 -1
  43. package/dest/rpc/archiver_client.d.ts +0 -3
  44. package/dest/rpc/archiver_client.d.ts.map +0 -1
  45. package/dest/rpc/archiver_client.js +0 -12
  46. package/dest/rpc/archiver_server.d.ts +0 -9
  47. package/dest/rpc/archiver_server.d.ts.map +0 -1
  48. package/dest/rpc/archiver_server.js +0 -20
  49. package/src/rpc/archiver_client.ts +0 -29
  50. package/src/rpc/archiver_server.ts +0 -35
@@ -1,20 +0,0 @@
1
- import { EncryptedNoteL2BlockL2Logs, ExtendedUnencryptedL2Log, L2Block, NullifierMembershipWitness, TxEffect, TxReceipt, UnencryptedL2BlockL2Logs, } from '@aztec/circuit-types';
2
- import { EthAddress, Fr } from '@aztec/circuits.js';
3
- import { JsonRpcServer } from '@aztec/foundation/json-rpc/server';
4
- /**
5
- * Wrap an Archiver instance with a JSON RPC HTTP server.
6
- * @param archiverService - The Archiver instance
7
- * @returns An JSON-RPC HTTP server
8
- */
9
- export function createArchiverRpcServer(archiverService) {
10
- return new JsonRpcServer(archiverService, {
11
- EthAddress,
12
- ExtendedUnencryptedL2Log,
13
- Fr,
14
- L2Block,
15
- EncryptedNoteL2BlockL2Logs,
16
- UnencryptedL2BlockL2Logs,
17
- TxEffect,
18
- }, { TxReceipt, NullifierMembershipWitness }, ['start', 'stop']);
19
- }
20
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXJjaGl2ZXJfc2VydmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3JwYy9hcmNoaXZlcl9zZXJ2ZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLDBCQUEwQixFQUMxQix3QkFBd0IsRUFDeEIsT0FBTyxFQUNQLDBCQUEwQixFQUMxQixRQUFRLEVBQ1IsU0FBUyxFQUNULHdCQUF3QixHQUN6QixNQUFNLHNCQUFzQixDQUFDO0FBQzlCLE9BQU8sRUFBRSxVQUFVLEVBQUUsRUFBRSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDcEQsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLG1DQUFtQyxDQUFDO0FBSWxFOzs7O0dBSUc7QUFDSCxNQUFNLFVBQVUsdUJBQXVCLENBQUMsZUFBeUI7SUFDL0QsT0FBTyxJQUFJLGFBQWEsQ0FDdEIsZUFBZSxFQUNmO1FBQ0UsVUFBVTtRQUNWLHdCQUF3QjtRQUN4QixFQUFFO1FBQ0YsT0FBTztRQUNQLDBCQUEwQjtRQUMxQix3QkFBd0I7UUFDeEIsUUFBUTtLQUNULEVBQ0QsRUFBRSxTQUFTLEVBQUUsMEJBQTBCLEVBQUUsRUFDekMsQ0FBQyxPQUFPLEVBQUUsTUFBTSxDQUFDLENBQ2xCLENBQUM7QUFDSixDQUFDIn0=
@@ -1,29 +0,0 @@
1
- import {
2
- EncryptedNoteL2BlockL2Logs,
3
- ExtendedUnencryptedL2Log,
4
- L2Block,
5
- NullifierMembershipWitness,
6
- TxReceipt,
7
- UnencryptedL2BlockL2Logs,
8
- } from '@aztec/circuit-types';
9
- import { EthAddress, Fr } from '@aztec/circuits.js';
10
- import { createJsonRpcClient, makeFetch } from '@aztec/foundation/json-rpc/client';
11
-
12
- import { type ArchiveSource } from '../archiver/archiver.js';
13
-
14
- export const createArchiverClient = (url: string, fetch = makeFetch([1, 2, 3], true)): ArchiveSource =>
15
- createJsonRpcClient<ArchiveSource>(
16
- url,
17
- {
18
- EthAddress,
19
- ExtendedUnencryptedL2Log,
20
- Fr,
21
- L2Block,
22
- EncryptedNoteL2BlockL2Logs,
23
- UnencryptedL2BlockL2Logs,
24
- },
25
- { TxReceipt, NullifierMembershipWitness },
26
- false,
27
- 'archiver',
28
- fetch,
29
- ) as ArchiveSource;
@@ -1,35 +0,0 @@
1
- import {
2
- EncryptedNoteL2BlockL2Logs,
3
- ExtendedUnencryptedL2Log,
4
- L2Block,
5
- NullifierMembershipWitness,
6
- TxEffect,
7
- TxReceipt,
8
- UnencryptedL2BlockL2Logs,
9
- } from '@aztec/circuit-types';
10
- import { EthAddress, Fr } from '@aztec/circuits.js';
11
- import { JsonRpcServer } from '@aztec/foundation/json-rpc/server';
12
-
13
- import { type Archiver } from '../archiver/archiver.js';
14
-
15
- /**
16
- * Wrap an Archiver instance with a JSON RPC HTTP server.
17
- * @param archiverService - The Archiver instance
18
- * @returns An JSON-RPC HTTP server
19
- */
20
- export function createArchiverRpcServer(archiverService: Archiver): JsonRpcServer {
21
- return new JsonRpcServer(
22
- archiverService,
23
- {
24
- EthAddress,
25
- ExtendedUnencryptedL2Log,
26
- Fr,
27
- L2Block,
28
- EncryptedNoteL2BlockL2Logs,
29
- UnencryptedL2BlockL2Logs,
30
- TxEffect,
31
- },
32
- { TxReceipt, NullifierMembershipWitness },
33
- ['start', 'stop'],
34
- );
35
- }