@aztec/pxe 0.74.0 → 0.75.0-commit.c03ba01a2a4122e43e90d5133ba017e54b90e9d2

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 (101) hide show
  1. package/dest/bin/index.js +3 -5
  2. package/dest/config/index.js +18 -21
  3. package/dest/config/package_info.js +4 -2
  4. package/dest/contract_data_oracle/index.js +69 -79
  5. package/dest/contract_data_oracle/private_functions_tree.js +44 -50
  6. package/dest/database/contracts/contract_artifact_db.js +3 -2
  7. package/dest/database/contracts/contract_instance_db.js +3 -2
  8. package/dest/database/index.js +0 -1
  9. package/dest/database/kv_pxe_database.js +243 -259
  10. package/dest/database/note_dao.js +28 -43
  11. package/dest/database/outgoing_note_dao.js +20 -34
  12. package/dest/database/pxe_database.js +4 -2
  13. package/dest/database/pxe_database_test_suite.js +296 -151
  14. package/dest/index.js +0 -1
  15. package/dest/kernel_oracle/index.js +9 -6
  16. package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.js +68 -66
  17. package/dest/kernel_prover/hints/index.js +0 -1
  18. package/dest/kernel_prover/index.js +0 -1
  19. package/dest/kernel_prover/kernel_prover.js +60 -65
  20. package/dest/kernel_prover/proving_data_oracle.js +4 -2
  21. package/dest/note_decryption_utils/add_public_values_to_payload.js +8 -9
  22. package/dest/pxe_http/index.js +0 -1
  23. package/dest/pxe_http/pxe_http_server.js +8 -6
  24. package/dest/pxe_service/error_enriching.js +10 -13
  25. package/dest/pxe_service/index.js +0 -1
  26. package/dest/pxe_service/pxe_service.js +282 -290
  27. package/dest/pxe_service/test/pxe_test_suite.js +40 -27
  28. package/dest/simulator/index.js +1 -3
  29. package/dest/simulator_oracle/index.js +266 -231
  30. package/dest/simulator_oracle/tagging_utils.js +4 -6
  31. package/dest/synchronizer/index.js +0 -1
  32. package/dest/synchronizer/synchronizer.js +42 -42
  33. package/dest/utils/create_pxe_service.js +9 -9
  34. package/package.json +15 -15
  35. package/src/pxe_service/pxe_service.ts +6 -11
  36. package/dest/bin/index.d.ts +0 -3
  37. package/dest/bin/index.d.ts.map +0 -1
  38. package/dest/config/index.d.ts +0 -46
  39. package/dest/config/index.d.ts.map +0 -1
  40. package/dest/config/package_info.d.ts +0 -5
  41. package/dest/config/package_info.d.ts.map +0 -1
  42. package/dest/contract_data_oracle/index.d.ts +0 -104
  43. package/dest/contract_data_oracle/index.d.ts.map +0 -1
  44. package/dest/contract_data_oracle/private_functions_tree.d.ts +0 -65
  45. package/dest/contract_data_oracle/private_functions_tree.d.ts.map +0 -1
  46. package/dest/database/contracts/contract_artifact_db.d.ts +0 -20
  47. package/dest/database/contracts/contract_artifact_db.d.ts.map +0 -1
  48. package/dest/database/contracts/contract_instance_db.d.ts +0 -19
  49. package/dest/database/contracts/contract_instance_db.d.ts.map +0 -1
  50. package/dest/database/index.d.ts +0 -3
  51. package/dest/database/index.d.ts.map +0 -1
  52. package/dest/database/kv_pxe_database.d.ts +0 -55
  53. package/dest/database/kv_pxe_database.d.ts.map +0 -1
  54. package/dest/database/note_dao.d.ts +0 -103
  55. package/dest/database/note_dao.d.ts.map +0 -1
  56. package/dest/database/outgoing_note_dao.d.ts +0 -73
  57. package/dest/database/outgoing_note_dao.d.ts.map +0 -1
  58. package/dest/database/pxe_database.d.ts +0 -216
  59. package/dest/database/pxe_database.d.ts.map +0 -1
  60. package/dest/database/pxe_database_test_suite.d.ts +0 -7
  61. package/dest/database/pxe_database_test_suite.d.ts.map +0 -1
  62. package/dest/index.d.ts +0 -15
  63. package/dest/index.d.ts.map +0 -1
  64. package/dest/kernel_oracle/index.d.ts +0 -34
  65. package/dest/kernel_oracle/index.d.ts.map +0 -1
  66. package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.d.ts +0 -28
  67. package/dest/kernel_prover/hints/build_private_kernel_reset_private_inputs.d.ts.map +0 -1
  68. package/dest/kernel_prover/hints/index.d.ts +0 -2
  69. package/dest/kernel_prover/hints/index.d.ts.map +0 -1
  70. package/dest/kernel_prover/index.d.ts +0 -3
  71. package/dest/kernel_prover/index.d.ts.map +0 -1
  72. package/dest/kernel_prover/kernel_prover.d.ts +0 -38
  73. package/dest/kernel_prover/kernel_prover.d.ts.map +0 -1
  74. package/dest/kernel_prover/proving_data_oracle.d.ts +0 -65
  75. package/dest/kernel_prover/proving_data_oracle.d.ts.map +0 -1
  76. package/dest/note_decryption_utils/add_public_values_to_payload.d.ts +0 -10
  77. package/dest/note_decryption_utils/add_public_values_to_payload.d.ts.map +0 -1
  78. package/dest/pxe_http/index.d.ts +0 -2
  79. package/dest/pxe_http/index.d.ts.map +0 -1
  80. package/dest/pxe_http/pxe_http_server.d.ts +0 -16
  81. package/dest/pxe_http/pxe_http_server.d.ts.map +0 -1
  82. package/dest/pxe_service/error_enriching.d.ts +0 -11
  83. package/dest/pxe_service/error_enriching.d.ts.map +0 -1
  84. package/dest/pxe_service/index.d.ts +0 -4
  85. package/dest/pxe_service/index.d.ts.map +0 -1
  86. package/dest/pxe_service/pxe_service.d.ts +0 -98
  87. package/dest/pxe_service/pxe_service.d.ts.map +0 -1
  88. package/dest/pxe_service/test/pxe_test_suite.d.ts +0 -3
  89. package/dest/pxe_service/test/pxe_test_suite.d.ts.map +0 -1
  90. package/dest/simulator/index.d.ts +0 -10
  91. package/dest/simulator/index.d.ts.map +0 -1
  92. package/dest/simulator_oracle/index.d.ts +0 -129
  93. package/dest/simulator_oracle/index.d.ts.map +0 -1
  94. package/dest/simulator_oracle/tagging_utils.d.ts +0 -16
  95. package/dest/simulator_oracle/tagging_utils.d.ts.map +0 -1
  96. package/dest/synchronizer/index.d.ts +0 -2
  97. package/dest/synchronizer/index.d.ts.map +0 -1
  98. package/dest/synchronizer/synchronizer.d.ts +0 -30
  99. package/dest/synchronizer/synchronizer.d.ts.map +0 -1
  100. package/dest/utils/create_pxe_service.d.ts +0 -16
  101. package/dest/utils/create_pxe_service.d.ts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"kernel_prover.d.ts","sourceRoot":"","sources":["../../src/kernel_prover/kernel_prover.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,2BAA2B,EAMjC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAWL,KAAK,oCAAoC,EAGzC,KAAK,SAAS,EAGf,MAAM,oBAAoB,CAAC;AAmB5B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AA8ClE,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF;;;;;GAKG;AACH,qBAAa,YAAY;IAIrB,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,YAAY;IACpB,OAAO,CAAC,UAAU;IALpB,OAAO,CAAC,GAAG,CAAqC;gBAGtC,MAAM,EAAE,iBAAiB,EACzB,YAAY,EAAE,mBAAmB,EACjC,UAAU,UAAQ;IAG5B;;;;;;;;;;;;OAYG;IACG,KAAK,CACT,SAAS,EAAE,SAAS,EACpB,eAAe,EAAE,sBAAsB,EACvC,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,GAAE,aAAkE,GAChG,OAAO,CAAC,2BAA2B,CAAC,oCAAoC,CAAC,CAAC;YA+M/D,qBAAqB;IAqCnC,OAAO,CAAC,aAAa;CAYtB"}
@@ -1,65 +0,0 @@
1
- import { type NullifierMembershipWitness } from '@aztec/circuit-types';
2
- import { type FUNCTION_TREE_HEIGHT, type Fr, type FunctionSelector, type GrumpkinScalar, type MembershipWitness, type NOTE_HASH_TREE_HEIGHT, type Point, type PublicKeys, type VK_TREE_HEIGHT, type VerificationKeyAsFields } from '@aztec/circuits.js';
3
- import { type AztecAddress } from '@aztec/foundation/aztec-address';
4
- /**
5
- * Provides functionality to fetch membership witnesses for verification keys,
6
- * contract addresses, and function selectors in their respective merkle trees.
7
- */
8
- export interface ProvingDataOracle {
9
- /** Retrieves the preimage of a contract address from the registered contract instances db. */
10
- getContractAddressPreimage(address: AztecAddress): Promise<{
11
- saltedInitializationHash: Fr;
12
- publicKeys: PublicKeys;
13
- contractClassId: Fr;
14
- }>;
15
- /** Retrieves the preimage of a contract class id from the contract classes db. */
16
- getContractClassIdPreimage(contractClassId: Fr): Promise<{
17
- artifactHash: Fr;
18
- publicBytecodeCommitment: Fr;
19
- privateFunctionsRoot: Fr;
20
- }>;
21
- /**
22
- * Retrieve the function membership witness for the given contract address and function selector.
23
- * The function membership witness represents a proof that the function belongs to the specified contract.
24
- * Throws an error if the contract address or function selector is unknown.
25
- *
26
- * @param contractAddress - The contract address.
27
- * @param selector - The function selector.
28
- * @returns A promise that resolves with the MembershipWitness instance for the specified contract's function.
29
- */
30
- getFunctionMembershipWitness(contractAddress: AztecAddress, selector: FunctionSelector): Promise<MembershipWitness<typeof FUNCTION_TREE_HEIGHT>>;
31
- /**
32
- * Retrieve the membership witness corresponding to a verification key.
33
- * This function currently returns a random membership witness of the specified height,
34
- * which is a placeholder implementation until a concrete membership witness calculation
35
- * is implemented.
36
- *
37
- * @param vk - The VerificationKey for which the membership witness is needed.
38
- * @returns A Promise that resolves to the MembershipWitness instance.
39
- */
40
- getVkMembershipWitness(vk: VerificationKeyAsFields): Promise<MembershipWitness<typeof VK_TREE_HEIGHT>>;
41
- /**
42
- * Get the note membership witness for a note in the note hash tree at the given leaf index.
43
- *
44
- * @param leafIndex - The leaf index of the note in the note hash tree.
45
- * @returns the MembershipWitness for the note.
46
- */
47
- getNoteHashMembershipWitness(leafIndex: bigint): Promise<MembershipWitness<typeof NOTE_HASH_TREE_HEIGHT>>;
48
- getNullifierMembershipWitness(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
49
- /**
50
- * Get the root of the note hash tree.
51
- *
52
- * @returns the root of the note hash tree.
53
- */
54
- getNoteHashTreeRoot(): Promise<Fr>;
55
- /**
56
- * Retrieves the sk_m corresponding to the pk_m.
57
- * @throws If the provided public key is not associated with any of the registered accounts.
58
- * @param pkM - The master public key to get secret key for.
59
- * @returns A Promise that resolves to sk_m.
60
- * @dev Used when feeding the sk_m to the kernel circuit for keys verification.
61
- */
62
- getMasterSecretKey(masterPublicKey: Point): Promise<GrumpkinScalar>;
63
- getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string | undefined>;
64
- }
65
- //# sourceMappingURL=proving_data_oracle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proving_data_oracle.d.ts","sourceRoot":"","sources":["../../src/kernel_prover/proving_data_oracle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,EAAE,EACP,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,KAAK,EACV,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,uBAAuB,EAC7B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,8FAA8F;IAC9F,0BAA0B,CACxB,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC;QAAE,wBAAwB,EAAE,EAAE,CAAC;QAAC,UAAU,EAAE,UAAU,CAAC;QAAC,eAAe,EAAE,EAAE,CAAA;KAAE,CAAC,CAAC;IAE1F,kFAAkF;IAClF,0BAA0B,CACxB,eAAe,EAAE,EAAE,GAClB,OAAO,CAAC;QAAE,YAAY,EAAE,EAAE,CAAC;QAAC,wBAAwB,EAAE,EAAE,CAAC;QAAC,oBAAoB,EAAE,EAAE,CAAA;KAAE,CAAC,CAAC;IAEzF;;;;;;;;OAQG;IACH,4BAA4B,CAC1B,eAAe,EAAE,YAAY,EAC7B,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC,iBAAiB,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC;IAE3D;;;;;;;;OAQG;IACH,sBAAsB,CAAC,EAAE,EAAE,uBAAuB,GAAG,OAAO,CAAC,iBAAiB,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC;IAEvG;;;;;OAKG;IACH,4BAA4B,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAAC;IAE1G,6BAA6B,CAAC,SAAS,EAAE,EAAE,GAAG,OAAO,CAAC,0BAA0B,GAAG,SAAS,CAAC,CAAC;IAE9F;;;;OAIG;IACH,mBAAmB,IAAI,OAAO,CAAC,EAAE,CAAC,CAAC;IAEnC;;;;;;OAMG;IACH,kBAAkB,CAAC,eAAe,EAAE,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAEpE,oBAAoB,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CAC9G"}
@@ -1,10 +0,0 @@
1
- import { type L1NotePayload, Note } from '@aztec/circuit-types';
2
- import { type PxeDatabase } from '../database/pxe_database.js';
3
- /**
4
- * Merges privately and publicly delivered note values.
5
- * @param db - PXE database used to fetch contract instance and artifact.
6
- * @param payload - Payload corresponding to the note.
7
- * @returns Note payload with public fields added.
8
- */
9
- export declare function getOrderedNoteItems(db: PxeDatabase, { contractAddress, noteTypeId, privateNoteValues, publicNoteValues }: L1NotePayload): Promise<Note>;
10
- //# sourceMappingURL=add_public_values_to_payload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"add_public_values_to_payload.d.ts","sourceRoot":"","sources":["../../src/note_decryption_utils/add_public_values_to_payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAGhE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAE/D;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,EAAE,EAAE,WAAW,EACf,EAAE,eAAe,EAAE,UAAU,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,EAAE,aAAa,GAClF,OAAO,CAAC,IAAI,CAAC,CAgDf"}
@@ -1,2 +0,0 @@
1
- export * from './pxe_http_server.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pxe_http/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
@@ -1,16 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- import { type PXE } from '@aztec/circuit-types';
3
- import http from 'http';
4
- /**
5
- * Wraps an instance of Private eXecution Environment (PXE) implementation to a JSON RPC HTTP interface.
6
- * @returns A new instance of the HTTP server.
7
- */
8
- export declare function createPXERpcServer(pxeService: PXE): import("@aztec/foundation/json-rpc/server").SafeJsonRpcServer;
9
- /**
10
- * Creates an http server that forwards calls to the PXE and starts it on the given port.
11
- * @param pxeService - PXE that answers queries to the created HTTP server.
12
- * @param port - Port to listen in.
13
- * @returns A running http server.
14
- */
15
- export declare function startPXEHttpServer(pxeService: PXE, port: string | number): http.Server;
16
- //# sourceMappingURL=pxe_http_server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pxe_http_server.d.ts","sourceRoot":"","sources":["../../src/pxe_http/pxe_http_server.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,GAAG,EAAa,MAAM,sBAAsB,CAAC;AAG3D,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,GAAG,iEAEjD;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,MAAM,CAStF"}
@@ -1,11 +0,0 @@
1
- import { type SimulationError } from '@aztec/circuit-types';
2
- import { type Logger } from '@aztec/foundation/log';
3
- import { type ContractDataOracle, type PxeDatabase } from '../index.js';
4
- /**
5
- * Adds contract and function names to a simulation error, if they
6
- * can be found in the PXE database
7
- * @param err - The error to enrich.
8
- */
9
- export declare function enrichSimulationError(err: SimulationError, db: PxeDatabase, logger: Logger): Promise<void>;
10
- export declare function enrichPublicSimulationError(err: SimulationError, contractDataOracle: ContractDataOracle, db: PxeDatabase, logger: Logger): Promise<void>;
11
- //# sourceMappingURL=error_enriching.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error_enriching.d.ts","sourceRoot":"","sources":["../../src/pxe_service/error_enriching.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAA6B,MAAM,sBAAsB,CAAC;AAKvF,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAExE;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,eAAe,EAAE,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,iBAwChG;AAED,wBAAsB,2BAA2B,CAC/C,GAAG,EAAE,eAAe,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,EAAE,EAAE,WAAW,EACf,MAAM,EAAE,MAAM,iBAyCf"}
@@ -1,4 +0,0 @@
1
- export * from './pxe_service.js';
2
- export { enrichPublicSimulationError } from './error_enriching.js';
3
- export { pxeTestSuite } from './test/pxe_test_suite.js';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pxe_service/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,98 +0,0 @@
1
- import { type AuthWitness, type AztecNode, type EventMetadataDefinition, type ExtendedNote, type GetContractClassLogsResponse, type GetPublicLogsResponse, type InBlock, type L2Block, type LogFilter, type NotesFilter, type PXE, type PXEInfo, type PrivateExecutionResult, type PrivateKernelProver, type SiblingPath, type Tx, type TxEffect, type TxExecutionRequest, type TxHash, TxProvingResult, type TxReceipt, TxSimulationResult, UniqueNote } from '@aztec/circuit-types';
2
- import type { CompleteAddress, ContractClassWithId, ContractInstanceWithAddress, GasFees, L1_TO_L2_MSG_TREE_HEIGHT, NodeInfo, PartialAddress } from '@aztec/circuits.js';
3
- import { type AbiDecoded, type ContractArtifact } from '@aztec/foundation/abi';
4
- import { type AztecAddress } from '@aztec/foundation/aztec-address';
5
- import { Fr, type Point } from '@aztec/foundation/fields';
6
- import { type Logger } from '@aztec/foundation/log';
7
- import { type KeyStore } from '@aztec/key-store';
8
- import { type L2TipsStore } from '@aztec/kv-store/stores';
9
- import { type SimulationProvider } from '@aztec/simulator/client';
10
- import { type PXEServiceConfig } from '../config/index.js';
11
- import { type PxeDatabase } from '../database/index.js';
12
- /**
13
- * A Private eXecution Environment (PXE) implementation.
14
- */
15
- export declare class PXEService implements PXE {
16
- #private;
17
- private keyStore;
18
- private node;
19
- private db;
20
- private proofCreator;
21
- private simulationProvider;
22
- private synchronizer;
23
- private contractDataOracle;
24
- private simulator;
25
- private log;
26
- private packageVersion;
27
- private proverEnabled;
28
- constructor(keyStore: KeyStore, node: AztecNode, db: PxeDatabase, tipsStore: L2TipsStore, proofCreator: PrivateKernelProver, simulationProvider: SimulationProvider, config: PXEServiceConfig, loggerOrSuffix?: string | Logger);
29
- /**
30
- * Starts the PXE Service by beginning the synchronization process between the Aztec node and the database.
31
- *
32
- * @returns A promise that resolves when the server has started successfully.
33
- */
34
- init(): Promise<void>;
35
- isL1ToL2MessageSynced(l1ToL2Message: Fr): Promise<boolean>;
36
- /** Returns an estimate of the db size in bytes. */
37
- estimateDbSize(): Promise<number>;
38
- addAuthWitness(witness: AuthWitness): Promise<void>;
39
- getAuthWitness(messageHash: Fr): Promise<Fr[] | undefined>;
40
- addCapsule(capsule: Fr[]): Promise<void>;
41
- getContractInstance(address: AztecAddress): Promise<ContractInstanceWithAddress | undefined>;
42
- getContractClassMetadata(id: Fr, includeArtifact?: boolean): Promise<{
43
- contractClass: ContractClassWithId | undefined;
44
- isContractClassPubliclyRegistered: boolean;
45
- artifact: ContractArtifact | undefined;
46
- }>;
47
- getContractMetadata(address: AztecAddress): Promise<{
48
- contractInstance: ContractInstanceWithAddress | undefined;
49
- isContractInitialized: boolean;
50
- isContractPubliclyDeployed: boolean;
51
- }>;
52
- registerAccount(secretKey: Fr, partialAddress: PartialAddress): Promise<CompleteAddress>;
53
- registerSender(address: AztecAddress): Promise<AztecAddress>;
54
- getSenders(): Promise<AztecAddress[]>;
55
- removeSender(address: AztecAddress): Promise<void>;
56
- getRegisteredAccounts(): Promise<CompleteAddress[]>;
57
- registerContractClass(artifact: ContractArtifact): Promise<void>;
58
- registerContract(contract: {
59
- instance: ContractInstanceWithAddress;
60
- artifact?: ContractArtifact;
61
- }): Promise<void>;
62
- getContracts(): Promise<AztecAddress[]>;
63
- getPublicStorageAt(contract: AztecAddress, slot: Fr): Promise<Fr>;
64
- getNotes(filter: NotesFilter): Promise<UniqueNote[]>;
65
- getL1ToL2MembershipWitness(contractAddress: AztecAddress, messageHash: Fr, secret: Fr): Promise<[bigint, SiblingPath<typeof L1_TO_L2_MSG_TREE_HEIGHT>]>;
66
- getL2ToL1MembershipWitness(blockNumber: number, l2Tol1Message: Fr): Promise<[bigint, SiblingPath<number>]>;
67
- addNote(note: ExtendedNote, scope?: AztecAddress): Promise<void>;
68
- addNullifiedNote(note: ExtendedNote): Promise<void>;
69
- getBlock(blockNumber: number): Promise<L2Block | undefined>;
70
- getCurrentBaseFees(): Promise<GasFees>;
71
- proveTx(txRequest: TxExecutionRequest, privateExecutionResult: PrivateExecutionResult): Promise<TxProvingResult>;
72
- simulateTx(txRequest: TxExecutionRequest, simulatePublic: boolean, msgSender?: AztecAddress | undefined, skipTxValidation?: boolean, enforceFeePayment?: boolean, profile?: boolean, scopes?: AztecAddress[]): Promise<TxSimulationResult>;
73
- sendTx(tx: Tx): Promise<TxHash>;
74
- simulateUnconstrained(functionName: string, args: any[], to: AztecAddress, _from?: AztecAddress, scopes?: AztecAddress[]): Promise<AbiDecoded>;
75
- getTxReceipt(txHash: TxHash): Promise<TxReceipt>;
76
- getTxEffect(txHash: TxHash): Promise<InBlock<TxEffect> | undefined>;
77
- getBlockNumber(): Promise<number>;
78
- getProvenBlockNumber(): Promise<number>;
79
- /**
80
- * Gets public logs based on the provided filter.
81
- * @param filter - The filter to apply to the logs.
82
- * @returns The requested logs.
83
- */
84
- getPublicLogs(filter: LogFilter): Promise<GetPublicLogsResponse>;
85
- /**
86
- * Gets contract class logs based on the provided filter.
87
- * @param filter - The filter to apply to the logs.
88
- * @returns The requested logs.
89
- */
90
- getContractClassLogs(filter: LogFilter): Promise<GetContractClassLogsResponse>;
91
- getNodeInfo(): Promise<NodeInfo>;
92
- getPXEInfo(): Promise<PXEInfo>;
93
- getPrivateEvents<T>(eventMetadataDef: EventMetadataDefinition, from: number, limit: number, vpks: Point[]): Promise<T[]>;
94
- getPublicEvents<T>(eventMetadataDef: EventMetadataDefinition, from: number, limit: number): Promise<T[]>;
95
- resetNoteSyncData(): Promise<void>;
96
- private contextualizeError;
97
- }
98
- //# sourceMappingURL=pxe_service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pxe_service.d.ts","sourceRoot":"","sources":["../../src/pxe_service/pxe_service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,SAAS,EAEd,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EAEjB,KAAK,4BAA4B,EACjC,KAAK,qBAAqB,EAC1B,KAAK,OA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AgB,EAAE,uBAAuB,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IA8BxG,iBAAiB;IAIvB,OAAO,CAAC,kBAAkB;CAa3B"}
@@ -1,3 +0,0 @@
1
- import { type PXE } from '@aztec/circuit-types';
2
- export declare const pxeTestSuite: (testName: string, pxeSetup: () => Promise<PXE>) => void;
3
- //# sourceMappingURL=pxe_test_suite.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pxe_test_suite.d.ts","sourceRoot":"","sources":["../../../src/pxe_service/test/pxe_test_suite.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EAIT,MAAM,sBAAsB,CAAC;AAK9B,eAAO,MAAM,YAAY,aAAc,MAAM,YAAY,MAAM,QAAQ,GAAG,CAAC,SAwG1E,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type AztecNode } from '@aztec/circuit-types';
2
- import { type KeyStore } from '@aztec/key-store';
3
- import { AcirSimulator, type SimulationProvider } from '@aztec/simulator/client';
4
- import { ContractDataOracle } from '../contract_data_oracle/index.js';
5
- import { type PxeDatabase } from '../database/pxe_database.js';
6
- /**
7
- * Helper method to create an instance of the acir simulator.
8
- */
9
- export declare function getAcirSimulator(db: PxeDatabase, aztecNode: AztecNode, keyStore: KeyStore, simulationProvider: SimulationProvider, contractDataOracle?: ContractDataOracle): AcirSimulator;
10
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/simulator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAEjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAG/D;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,WAAW,EACf,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,kBAAkB,EAAE,kBAAkB,EACtC,kBAAkB,CAAC,EAAE,kBAAkB,iBAUxC"}
@@ -1,129 +0,0 @@
1
- import { type AztecNode, type L2Block, MerkleTreeId, Note, type NoteStatus, type NullifierMembershipWitness, type PublicDataWitness, TxHash, type TxScopedL2Log } from '@aztec/circuit-types';
2
- import { type AztecAddress, type BlockHeader, type CompleteAddress, type ContractInstance, Fr, FunctionSelector, IndexedTaggingSecret, type KeyValidationRequest, type L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/circuits.js';
3
- import { type FunctionArtifact } from '@aztec/foundation/abi';
4
- import { type KeyStore } from '@aztec/key-store';
5
- import { type AcirSimulator, type DBOracle, MessageLoadOracleInputs, type SimulationProvider } from '@aztec/simulator/client';
6
- import { ContractDataOracle } from '../contract_data_oracle/index.js';
7
- import { type PxeDatabase } from '../database/index.js';
8
- import { NoteDao } from '../database/note_dao.js';
9
- /**
10
- * A data oracle that provides information needed for simulating a transaction.
11
- */
12
- export declare class SimulatorOracle implements DBOracle {
13
- #private;
14
- private contractDataOracle;
15
- private db;
16
- private keyStore;
17
- private aztecNode;
18
- private simulationProvider;
19
- private log;
20
- constructor(contractDataOracle: ContractDataOracle, db: PxeDatabase, keyStore: KeyStore, aztecNode: AztecNode, simulationProvider: SimulationProvider, log?: import("@aztec/foundation/log").Logger);
21
- getKeyValidationRequest(pkMHash: Fr, contractAddress: AztecAddress): Promise<KeyValidationRequest>;
22
- getCompleteAddress(account: AztecAddress): Promise<CompleteAddress>;
23
- getContractInstance(address: AztecAddress): Promise<ContractInstance>;
24
- getAuthWitness(messageHash: Fr): Promise<Fr[]>;
25
- popCapsule(): Promise<Fr[]>;
26
- getNotes(contractAddress: AztecAddress, storageSlot: Fr, status: NoteStatus, scopes?: AztecAddress[]): Promise<{
27
- contractAddress: AztecAddress;
28
- storageSlot: Fr;
29
- nonce: Fr;
30
- note: Note;
31
- noteHash: Fr;
32
- siloedNullifier: Fr;
33
- index: bigint;
34
- }[]>;
35
- getFunctionArtifact(contractAddress: AztecAddress, selector: FunctionSelector): Promise<FunctionArtifact>;
36
- getFunctionArtifactByName(contractAddress: AztecAddress, functionName: string): Promise<FunctionArtifact | undefined>;
37
- /**
38
- * Fetches a message from the db, given its key.
39
- * @param contractAddress - Address of a contract by which the message was emitted.
40
- * @param messageHash - Hash of the message.
41
- * @param secret - Secret used to compute a nullifier.
42
- * @dev Contract address and secret are only used to compute the nullifier to get non-nullified messages
43
- * @returns The l1 to l2 membership witness (index of message in the tree and sibling path).
44
- */
45
- getL1ToL2MembershipWitness(contractAddress: AztecAddress, messageHash: Fr, secret: Fr): Promise<MessageLoadOracleInputs<typeof L1_TO_L2_MSG_TREE_HEIGHT>>;
46
- getL1ToL2LeafValue(_leafIndex: bigint): Promise<Fr | undefined>;
47
- /**
48
- * Gets the index of a commitment in the note hash tree.
49
- * @param commitment - The commitment.
50
- * @returns - The index of the commitment. Undefined if it does not exist in the tree.
51
- */
52
- getCommitmentIndex(commitment: Fr): Promise<bigint | undefined>;
53
- getCommitmentValue(_leafIndex: bigint): Promise<Fr | undefined>;
54
- getNullifierIndex(nullifier: Fr): Promise<bigint | undefined>;
55
- getMembershipWitness(blockNumber: number, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[]>;
56
- getNullifierMembershipWitnessAtLatestBlock(nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
57
- getNullifierMembershipWitness(blockNumber: number, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
58
- getLowNullifierMembershipWitness(blockNumber: number, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
59
- getBlock(blockNumber: number): Promise<L2Block | undefined>;
60
- getPublicDataTreeWitness(blockNumber: number, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
61
- /**
62
- * Retrieve the databases view of the Block Header object.
63
- * This structure is fed into the circuits simulator and is used to prove against certain historical roots.
64
- *
65
- * @returns A Promise that resolves to a BlockHeader object.
66
- */
67
- getBlockHeader(): Promise<BlockHeader>;
68
- /**
69
- * Fetches the current block number.
70
- * @returns The block number.
71
- */
72
- getBlockNumber(): Promise<number>;
73
- getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string>;
74
- /**
75
- * Returns the full contents of your address book.
76
- * This is used when calculating tags for incoming notes by deriving the shared secret, the contract-siloed tagging secret, and
77
- * finally the index specified tag. We will then query the node with this tag for each address in the address book.
78
- * @returns The full list of the users contact addresses.
79
- */
80
- getSenders(): Promise<AztecAddress[]>;
81
- /**
82
- * Returns the tagging secret for a given sender and recipient pair. For this to work, the ivsk_m of the sender must be known.
83
- * Includes the next index to be used used for tagging with this secret.
84
- * @param contractAddress - The contract address to silo the secret for
85
- * @param sender - The address sending the note
86
- * @param recipient - The address receiving the note
87
- * @returns An indexed tagging secret that can be used to tag notes.
88
- */
89
- getIndexedTaggingSecretAsSender(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress): Promise<IndexedTaggingSecret>;
90
- /**
91
- * Increments the tagging secret for a given sender and recipient pair. For this to work, the ivsk_m of the sender must be known.
92
- * @param contractAddress - The contract address to silo the secret for
93
- * @param sender - The address sending the note
94
- * @param recipient - The address receiving the note
95
- */
96
- incrementAppTaggingSecretIndexAsSender(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress): Promise<void>;
97
- /**
98
- * Updates the local index of the shared tagging secret of a sender / recipient pair
99
- * if a log with a larger index is found from the node.
100
- * @param contractAddress - The address of the contract that the logs are tagged for
101
- * @param sender - The address of the sender, we must know the sender's ivsk_m.
102
- * @param recipient - The address of the recipient.
103
- */
104
- syncTaggedLogsAsSender(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress): Promise<void>;
105
- /**
106
- * Synchronizes the logs tagged with scoped addresses and all the senders in the address book.
107
- * Returns the unsynched logs and updates the indexes of the secrets used to tag them until there are no more logs
108
- * to sync.
109
- * @param contractAddress - The address of the contract that the logs are tagged for
110
- * @param recipient - The address of the recipient
111
- * @returns A list of encrypted logs tagged with the recipient's address
112
- */
113
- syncTaggedLogs(contractAddress: AztecAddress, maxBlockNumber: number, scopes?: AztecAddress[]): Promise<Map<string, TxScopedL2Log[]>>;
114
- /**
115
- * Processes the tagged logs returned by syncTaggedLogs by decrypting them and storing them in the database.
116
- * @param logs - The logs to process.
117
- * @param recipient - The recipient of the logs.
118
- */
119
- processTaggedLogs(logs: TxScopedL2Log[], recipient: AztecAddress, simulator?: AcirSimulator): Promise<void>;
120
- deliverNote(contractAddress: AztecAddress, storageSlot: Fr, nonce: Fr, content: Fr[], noteHash: Fr, nullifier: Fr, txHash: Fr, recipient: AztecAddress): Promise<void>;
121
- removeNullifiedNotes(contractAddress: AztecAddress): Promise<void>;
122
- produceNoteDao(contractAddress: AztecAddress, storageSlot: Fr, nonce: Fr, content: Fr[], noteHash: Fr, nullifier: Fr, txHash: Fr, recipient: AztecAddress): Promise<NoteDao>;
123
- callProcessLog(contractAddress: AztecAddress, logPlaintext: Fr[], txHash: TxHash, noteHashes: Fr[], firstNullifier: Fr, recipient: AztecAddress, simulator?: AcirSimulator): Promise<void>;
124
- dbStore(contractAddress: AztecAddress, slot: Fr, values: Fr[]): Promise<void>;
125
- dbLoad(contractAddress: AztecAddress, slot: Fr): Promise<Fr[] | null>;
126
- dbDelete(contractAddress: AztecAddress, slot: Fr): Promise<void>;
127
- dbCopy(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number): Promise<void>;
128
- }
129
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/simulator_oracle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EAId,KAAK,OAAO,E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AAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGnG"}
@@ -1,16 +0,0 @@
1
- import { type Fr, IndexedTaggingSecret } from '@aztec/circuits.js';
2
- export declare const WINDOW_HALF_SIZE = 10;
3
- export declare function getIndexedTaggingSecretsForTheWindow(secretsAndWindows: {
4
- appTaggingSecret: Fr;
5
- leftMostIndex: number;
6
- rightMostIndex: number;
7
- }[]): IndexedTaggingSecret[];
8
- /**
9
- * Creates a map from app tagging secret to initial index.
10
- * @param indexedTaggingSecrets - The indexed tagging secrets to get the initial indexes from.
11
- * @returns The map from app tagging secret to initial index.
12
- */
13
- export declare function getInitialIndexesMap(indexedTaggingSecrets: IndexedTaggingSecret[]): {
14
- [k: string]: number;
15
- };
16
- //# sourceMappingURL=tagging_utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tagging_utils.d.ts","sourceRoot":"","sources":["../../src/simulator_oracle/tagging_utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAGnE,eAAO,MAAM,gBAAgB,KAAK,CAAC;AAEnC,wBAAgB,oCAAoC,CAClD,iBAAiB,EAAE;IAAE,gBAAgB,EAAE,EAAE,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,EAAE,GAC3F,oBAAoB,EAAE,CAQxB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,qBAAqB,EAAE,oBAAoB,EAAE,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAQ3G"}
@@ -1,2 +0,0 @@
1
- export * from './synchronizer.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/synchronizer/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -1,30 +0,0 @@
1
- import { type AztecNode, L2BlockStream, type L2BlockStreamEvent, type L2BlockStreamEventHandler } from '@aztec/circuit-types';
2
- import { type Logger } from '@aztec/foundation/log';
3
- import { type L2TipsStore } from '@aztec/kv-store/stores';
4
- import { type PXEConfig } from '../config/index.js';
5
- import { type PxeDatabase } from '../database/index.js';
6
- /**
7
- * The Synchronizer class manages the synchronization with the aztec node, allowing PXE to retrieve the
8
- * latest block header and handle reorgs.
9
- * It provides methods to trigger a sync and get the block number we are syncec to
10
- * details, and fetch transactions by hash.
11
- */
12
- export declare class Synchronizer implements L2BlockStreamEventHandler {
13
- private node;
14
- private db;
15
- private l2TipsStore;
16
- private initialSyncBlockNumber;
17
- private log;
18
- protected readonly blockStream: L2BlockStream;
19
- constructor(node: AztecNode, db: PxeDatabase, l2TipsStore: L2TipsStore, config?: Partial<Pick<PXEConfig, 'l2StartingBlock'>>, loggerOrSuffix?: string | Logger);
20
- protected createBlockStream(config: Partial<Pick<PXEConfig, 'l2StartingBlock'>>): L2BlockStream;
21
- /** Handle events emitted by the block stream. */
22
- handleBlockStreamEvent(event: L2BlockStreamEvent): Promise<void>;
23
- /**
24
- * Syncs PXE and the node by dowloading the metadata of the latest blocks, allowing simulations to use
25
- * recent data (e.g. notes), and handling any reorgs that might have occurred.
26
- */
27
- sync(): Promise<void>;
28
- getSynchedBlockNumber(): Promise<number>;
29
- }
30
- //# sourceMappingURL=synchronizer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"synchronizer.d.ts","sourceRoot":"","sources":["../../src/synchronizer/synchronizer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,aAAa,EACb,KAAK,kBAAkB,EACvB,KAAK,yBAAyB,EAC/B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAExD;;;;;GAKG;AACH,qBAAa,YAAa,YAAW,yBAAyB;IAM1D,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,EAAE;IACV,OAAO,CAAC,WAAW;IAPrB,OAAO,CAAC,sBAAsB,CAA4B;IAC1D,OAAO,CAAC,GAAG,CAAS;IACpB,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC;gBAGpC,IAAI,EAAE,SAAS,EACf,EAAE,EAAE,WAAW,EACf,WAAW,EAAE,WAAW,EAChC,MAAM,GAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAM,EACxD,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM;IASlC,SAAS,CAAC,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;IAM/E,iDAAiD;IACpC,sBAAsB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IA6B7E;;;OAGG;IACU,IAAI;IAeJ,qBAAqB;CAGnC"}
@@ -1,16 +0,0 @@
1
- import { type AztecNode, type PrivateKernelProver } from '@aztec/circuit-types';
2
- import { type PXEServiceConfig } from '../config/index.js';
3
- import { PXEService } from '../pxe_service/pxe_service.js';
4
- /**
5
- * Create and start an PXEService instance with the given AztecNode.
6
- * If no keyStore or database is provided, it will use KeyStore and MemoryDB as default values.
7
- * Returns a Promise that resolves to the started PXEService instance.
8
- *
9
- * @param aztecNode - The AztecNode instance to be used by the server.
10
- * @param config - The PXE Service Config to use
11
- * @param options - (Optional) Optional information for creating an PXEService.
12
- * @param proofCreator - An optional proof creator to use in place of any other configuration
13
- * @returns A Promise that resolves to the started PXEService instance.
14
- */
15
- export declare function createPXEService(aztecNode: AztecNode, config: PXEServiceConfig, useLogSuffix?: string | boolean | undefined, proofCreator?: PrivateKernelProver): Promise<PXEService>;
16
- //# sourceMappingURL=create_pxe_service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create_pxe_service.d.ts","sourceRoot":"","sources":["../../src/utils/create_pxe_service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAQhF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D;;;;;;;;;;GAUG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,gBAAgB,EACxB,YAAY,GAAE,MAAM,GAAG,OAAO,GAAG,SAAqB,EACtD,YAAY,CAAC,EAAE,mBAAmB,uBAwBnC"}