@aztec/simulator 0.77.0-testnet-ignition.26 → 0.77.0-testnet-ignition.27

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 (198) hide show
  1. package/dest/private/index.js +2 -2
  2. package/dest/private/private_execution.js +18 -16
  3. package/dest/private/{client_execution_context.js → private_execution_oracle.js} +24 -19
  4. package/dest/private/simulator.js +12 -14
  5. package/dest/private/{view_data_oracle.js → unconstrained_execution_oracle.js} +32 -34
  6. package/dest/public/public_tx_simulator/public_tx_simulator.js +21 -12
  7. package/package.json +14 -14
  8. package/src/private/{db_oracle.ts → execution_data_provider.ts} +28 -2
  9. package/src/private/index.ts +6 -2
  10. package/src/private/private_execution.ts +21 -20
  11. package/src/private/{client_execution_context.ts → private_execution_oracle.ts} +41 -26
  12. package/src/private/simulator.ts +20 -24
  13. package/src/private/unconstrained_execution.ts +2 -2
  14. package/src/private/{view_data_oracle.ts → unconstrained_execution_oracle.ts} +42 -35
  15. package/src/public/public_tx_simulator/public_tx_simulator.ts +29 -16
  16. package/dest/client.d.ts +0 -5
  17. package/dest/client.d.ts.map +0 -1
  18. package/dest/common/db_interfaces.d.ts +0 -80
  19. package/dest/common/db_interfaces.d.ts.map +0 -1
  20. package/dest/common/debug_fn_name.d.ts +0 -5
  21. package/dest/common/debug_fn_name.d.ts.map +0 -1
  22. package/dest/common/errors.d.ts +0 -54
  23. package/dest/common/errors.d.ts.map +0 -1
  24. package/dest/common/index.d.ts +0 -4
  25. package/dest/common/index.d.ts.map +0 -1
  26. package/dest/common/message_load_oracle_inputs.d.ts +0 -15
  27. package/dest/common/message_load_oracle_inputs.d.ts.map +0 -1
  28. package/dest/common/stats/index.d.ts +0 -2
  29. package/dest/common/stats/index.d.ts.map +0 -1
  30. package/dest/common/stats/stats.d.ts +0 -4
  31. package/dest/common/stats/stats.d.ts.map +0 -1
  32. package/dest/private/acvm/acvm.d.ts +0 -35
  33. package/dest/private/acvm/acvm.d.ts.map +0 -1
  34. package/dest/private/acvm/acvm_types.d.ts +0 -10
  35. package/dest/private/acvm/acvm_types.d.ts.map +0 -1
  36. package/dest/private/acvm/deserialize.d.ts +0 -36
  37. package/dest/private/acvm/deserialize.d.ts.map +0 -1
  38. package/dest/private/acvm/index.d.ts +0 -6
  39. package/dest/private/acvm/index.d.ts.map +0 -1
  40. package/dest/private/acvm/oracle/index.d.ts +0 -14
  41. package/dest/private/acvm/oracle/index.d.ts.map +0 -1
  42. package/dest/private/acvm/oracle/oracle.d.ts +0 -49
  43. package/dest/private/acvm/oracle/oracle.d.ts.map +0 -1
  44. package/dest/private/acvm/oracle/typed_oracle.d.ts +0 -83
  45. package/dest/private/acvm/oracle/typed_oracle.d.ts.map +0 -1
  46. package/dest/private/acvm/serialize.d.ts +0 -24
  47. package/dest/private/acvm/serialize.d.ts.map +0 -1
  48. package/dest/private/client_execution_context.d.ts +0 -217
  49. package/dest/private/client_execution_context.d.ts.map +0 -1
  50. package/dest/private/db_oracle.d.ts +0 -238
  51. package/dest/private/db_oracle.d.ts.map +0 -1
  52. package/dest/private/execution_note_cache.d.ts +0 -93
  53. package/dest/private/execution_note_cache.d.ts.map +0 -1
  54. package/dest/private/hashed_values_cache.d.ts +0 -28
  55. package/dest/private/hashed_values_cache.d.ts.map +0 -1
  56. package/dest/private/index.d.ts +0 -13
  57. package/dest/private/index.d.ts.map +0 -1
  58. package/dest/private/pick_notes.d.ts +0 -85
  59. package/dest/private/pick_notes.d.ts.map +0 -1
  60. package/dest/private/private_execution.d.ts +0 -24
  61. package/dest/private/private_execution.d.ts.map +0 -1
  62. package/dest/private/providers/acvm_native.d.ts +0 -40
  63. package/dest/private/providers/acvm_native.d.ts.map +0 -1
  64. package/dest/private/providers/acvm_wasm.d.ts +0 -15
  65. package/dest/private/providers/acvm_wasm.d.ts.map +0 -1
  66. package/dest/private/providers/acvm_wasm_with_blobs.d.ts +0 -19
  67. package/dest/private/providers/acvm_wasm_with_blobs.d.ts.map +0 -1
  68. package/dest/private/providers/factory.d.ts +0 -12
  69. package/dest/private/providers/factory.d.ts.map +0 -1
  70. package/dest/private/providers/simulation_provider.d.ts +0 -19
  71. package/dest/private/providers/simulation_provider.d.ts.map +0 -1
  72. package/dest/private/simulator.d.ts +0 -36
  73. package/dest/private/simulator.d.ts.map +0 -1
  74. package/dest/private/unconstrained_execution.d.ts +0 -10
  75. package/dest/private/unconstrained_execution.d.ts.map +0 -1
  76. package/dest/private/view_data_oracle.d.ts +0 -164
  77. package/dest/private/view_data_oracle.d.ts.map +0 -1
  78. package/dest/public/avm/avm_context.d.ts +0 -41
  79. package/dest/public/avm/avm_context.d.ts.map +0 -1
  80. package/dest/public/avm/avm_contract_call_result.d.ts +0 -30
  81. package/dest/public/avm/avm_contract_call_result.d.ts.map +0 -1
  82. package/dest/public/avm/avm_execution_environment.d.ts +0 -21
  83. package/dest/public/avm/avm_execution_environment.d.ts.map +0 -1
  84. package/dest/public/avm/avm_gas.d.ts +0 -60
  85. package/dest/public/avm/avm_gas.d.ts.map +0 -1
  86. package/dest/public/avm/avm_machine_state.d.ts +0 -93
  87. package/dest/public/avm/avm_machine_state.d.ts.map +0 -1
  88. package/dest/public/avm/avm_memory_types.d.ts +0 -264
  89. package/dest/public/avm/avm_memory_types.d.ts.map +0 -1
  90. package/dest/public/avm/avm_simulator.d.ts +0 -40
  91. package/dest/public/avm/avm_simulator.d.ts.map +0 -1
  92. package/dest/public/avm/bytecode_utils.d.ts +0 -5
  93. package/dest/public/avm/bytecode_utils.d.ts.map +0 -1
  94. package/dest/public/avm/errors.d.ts +0 -122
  95. package/dest/public/avm/errors.d.ts.map +0 -1
  96. package/dest/public/avm/fixtures/avm_simulation_tester.d.ts +0 -21
  97. package/dest/public/avm/fixtures/avm_simulation_tester.d.ts.map +0 -1
  98. package/dest/public/avm/fixtures/base_avm_simulation_tester.d.ts +0 -36
  99. package/dest/public/avm/fixtures/base_avm_simulation_tester.d.ts.map +0 -1
  100. package/dest/public/avm/fixtures/index.d.ts +0 -84
  101. package/dest/public/avm/fixtures/index.d.ts.map +0 -1
  102. package/dest/public/avm/fixtures/simple_contract_data_source.d.ts +0 -35
  103. package/dest/public/avm/fixtures/simple_contract_data_source.d.ts.map +0 -1
  104. package/dest/public/avm/index.d.ts +0 -4
  105. package/dest/public/avm/index.d.ts.map +0 -1
  106. package/dest/public/avm/journal/index.d.ts +0 -2
  107. package/dest/public/avm/journal/index.d.ts.map +0 -1
  108. package/dest/public/avm/journal/journal.d.ts +0 -209
  109. package/dest/public/avm/journal/journal.d.ts.map +0 -1
  110. package/dest/public/avm/journal/nullifiers.d.ts +0 -64
  111. package/dest/public/avm/journal/nullifiers.d.ts.map +0 -1
  112. package/dest/public/avm/journal/public_storage.d.ts +0 -66
  113. package/dest/public/avm/journal/public_storage.d.ts.map +0 -1
  114. package/dest/public/avm/opcodes/accrued_substate.d.ts +0 -75
  115. package/dest/public/avm/opcodes/accrued_substate.d.ts.map +0 -1
  116. package/dest/public/avm/opcodes/addressing_mode.d.ts +0 -27
  117. package/dest/public/avm/opcodes/addressing_mode.d.ts.map +0 -1
  118. package/dest/public/avm/opcodes/arithmetic.d.ts +0 -37
  119. package/dest/public/avm/opcodes/arithmetic.d.ts.map +0 -1
  120. package/dest/public/avm/opcodes/bitwise.d.ts +0 -50
  121. package/dest/public/avm/opcodes/bitwise.d.ts.map +0 -1
  122. package/dest/public/avm/opcodes/comparators.d.ts +0 -25
  123. package/dest/public/avm/opcodes/comparators.d.ts.map +0 -1
  124. package/dest/public/avm/opcodes/contract.d.ts +0 -21
  125. package/dest/public/avm/opcodes/contract.d.ts.map +0 -1
  126. package/dest/public/avm/opcodes/control_flow.d.ts +0 -41
  127. package/dest/public/avm/opcodes/control_flow.d.ts.map +0 -1
  128. package/dest/public/avm/opcodes/conversion.d.ts +0 -17
  129. package/dest/public/avm/opcodes/conversion.d.ts.map +0 -1
  130. package/dest/public/avm/opcodes/ec_add.d.ts +0 -19
  131. package/dest/public/avm/opcodes/ec_add.d.ts.map +0 -1
  132. package/dest/public/avm/opcodes/environment_getters.d.ts +0 -28
  133. package/dest/public/avm/opcodes/environment_getters.d.ts.map +0 -1
  134. package/dest/public/avm/opcodes/external_calls.d.ts +0 -50
  135. package/dest/public/avm/opcodes/external_calls.d.ts.map +0 -1
  136. package/dest/public/avm/opcodes/hashing.d.ts +0 -36
  137. package/dest/public/avm/opcodes/hashing.d.ts.map +0 -1
  138. package/dest/public/avm/opcodes/index.d.ts +0 -16
  139. package/dest/public/avm/opcodes/index.d.ts.map +0 -1
  140. package/dest/public/avm/opcodes/instruction.d.ts +0 -70
  141. package/dest/public/avm/opcodes/instruction.d.ts.map +0 -1
  142. package/dest/public/avm/opcodes/instruction_impl.d.ts +0 -19
  143. package/dest/public/avm/opcodes/instruction_impl.d.ts.map +0 -1
  144. package/dest/public/avm/opcodes/memory.d.ts +0 -74
  145. package/dest/public/avm/opcodes/memory.d.ts.map +0 -1
  146. package/dest/public/avm/opcodes/misc.d.ts +0 -17
  147. package/dest/public/avm/opcodes/misc.d.ts.map +0 -1
  148. package/dest/public/avm/opcodes/storage.d.ts +0 -24
  149. package/dest/public/avm/opcodes/storage.d.ts.map +0 -1
  150. package/dest/public/avm/serialization/buffer_cursor.d.ts +0 -28
  151. package/dest/public/avm/serialization/buffer_cursor.d.ts.map +0 -1
  152. package/dest/public/avm/serialization/bytecode_serialization.d.ts +0 -21
  153. package/dest/public/avm/serialization/bytecode_serialization.d.ts.map +0 -1
  154. package/dest/public/avm/serialization/instruction_serialization.d.ts +0 -104
  155. package/dest/public/avm/serialization/instruction_serialization.d.ts.map +0 -1
  156. package/dest/public/avm/test_utils.d.ts +0 -18
  157. package/dest/public/avm/test_utils.d.ts.map +0 -1
  158. package/dest/public/bytecode_errors.d.ts +0 -4
  159. package/dest/public/bytecode_errors.d.ts.map +0 -1
  160. package/dest/public/execution.d.ts +0 -108
  161. package/dest/public/execution.d.ts.map +0 -1
  162. package/dest/public/executor_metrics.d.ts +0 -13
  163. package/dest/public/executor_metrics.d.ts.map +0 -1
  164. package/dest/public/fixtures/index.d.ts +0 -3
  165. package/dest/public/fixtures/index.d.ts.map +0 -1
  166. package/dest/public/fixtures/public_tx_simulation_tester.d.ts +0 -32
  167. package/dest/public/fixtures/public_tx_simulation_tester.d.ts.map +0 -1
  168. package/dest/public/fixtures/utils.d.ts +0 -13
  169. package/dest/public/fixtures/utils.d.ts.map +0 -1
  170. package/dest/public/index.d.ts +0 -10
  171. package/dest/public/index.d.ts.map +0 -1
  172. package/dest/public/public_db_sources.d.ts +0 -129
  173. package/dest/public/public_db_sources.d.ts.map +0 -1
  174. package/dest/public/public_processor/public_processor.d.ts +0 -74
  175. package/dest/public/public_processor/public_processor.d.ts.map +0 -1
  176. package/dest/public/public_processor/public_processor_metrics.d.ts +0 -27
  177. package/dest/public/public_processor/public_processor_metrics.d.ts.map +0 -1
  178. package/dest/public/public_tx_simulator/public_tx_context.d.ts +0 -137
  179. package/dest/public/public_tx_simulator/public_tx_context.d.ts.map +0 -1
  180. package/dest/public/public_tx_simulator/public_tx_simulator.d.ts +0 -102
  181. package/dest/public/public_tx_simulator/public_tx_simulator.d.ts.map +0 -1
  182. package/dest/public/side_effect_errors.d.ts +0 -4
  183. package/dest/public/side_effect_errors.d.ts.map +0 -1
  184. package/dest/public/side_effect_trace.d.ts +0 -132
  185. package/dest/public/side_effect_trace.d.ts.map +0 -1
  186. package/dest/public/side_effect_trace_interface.d.ts +0 -34
  187. package/dest/public/side_effect_trace_interface.d.ts.map +0 -1
  188. package/dest/public/tx_contract_cache.d.ts +0 -41
  189. package/dest/public/tx_contract_cache.d.ts.map +0 -1
  190. package/dest/public/unique_class_ids.d.ts +0 -37
  191. package/dest/public/unique_class_ids.d.ts.map +0 -1
  192. package/dest/public/utils.d.ts +0 -5
  193. package/dest/public/utils.d.ts.map +0 -1
  194. package/dest/server.d.ts +0 -6
  195. package/dest/server.d.ts.map +0 -1
  196. package/dest/test/utils.d.ts +0 -13
  197. package/dest/test/utils.d.ts.map +0 -1
  198. /package/dest/private/{db_oracle.js → execution_data_provider.js} +0 -0
@@ -1,238 +0,0 @@
1
- import type { Fr } from '@aztec/foundation/fields';
2
- import type { FunctionArtifact, FunctionSelector } from '@aztec/stdlib/abi';
3
- import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
- import type { L2Block } from '@aztec/stdlib/block';
5
- import type { CompleteAddress, ContractInstance } from '@aztec/stdlib/contract';
6
- import type { KeyValidationRequest } from '@aztec/stdlib/kernel';
7
- import { IndexedTaggingSecret, LogWithTxData, TxScopedL2Log } from '@aztec/stdlib/logs';
8
- import type { NoteStatus } from '@aztec/stdlib/note';
9
- import { type MerkleTreeId, type NullifierMembershipWitness, PublicDataWitness } from '@aztec/stdlib/trees';
10
- import type { BlockHeader } from '@aztec/stdlib/tx';
11
- import type { CommitmentsDB } from '../common/db_interfaces.js';
12
- import type { NoteData } from './acvm/index.js';
13
- /**
14
- * Error thrown when a contract is not found in the database.
15
- */
16
- export declare class ContractNotFoundError extends Error {
17
- constructor(contractAddress: string);
18
- }
19
- /**
20
- * Error thrown when a contract class is not found in the database.
21
- */
22
- export declare class ContractClassNotFoundError extends Error {
23
- constructor(contractClassId: string);
24
- }
25
- /**
26
- * The database oracle interface.
27
- */
28
- export interface DBOracle extends CommitmentsDB {
29
- /**
30
- * Returns a contract instance associated with an address, if available.
31
- * @param address - Address.
32
- * @returns A contract instance.
33
- */
34
- getContractInstance(address: AztecAddress): Promise<ContractInstance>;
35
- /**
36
- * Retrieve the complete address associated to a given address.
37
- * @param account - The account address.
38
- * @returns A complete address associated with the input address.
39
- * @throws An error if the account is not registered in the database.
40
- */
41
- getCompleteAddress(account: AztecAddress): Promise<CompleteAddress>;
42
- /**
43
- * Retrieve the auth witness for a given message hash.
44
- * @param messageHash - The message hash.
45
- * @returns A Promise that resolves to an array of field elements representing the auth witness.
46
- */
47
- getAuthWitness(messageHash: Fr): Promise<Fr[]>;
48
- /**
49
- * Retrieve keys associated with a specific master public key and app address.
50
- * @param pkMHash - The master public key hash.
51
- * @returns A Promise that resolves to nullifier keys.
52
- * @throws If the keys are not registered in the key store.
53
- */
54
- getKeyValidationRequest(pkMHash: Fr, contractAddress: AztecAddress): Promise<KeyValidationRequest>;
55
- /**
56
- * Retrieves a set of notes stored in the database for a given contract address and storage slot.
57
- * The query result is paginated using 'limit' and 'offset' values.
58
- * Returns an object containing an array of note data.
59
- *
60
- * @param contractAddress - The contract address of the notes.
61
- * @param storageSlot - The storage slot of the notes.
62
- * @param status - The status of notes to fetch.
63
- * @param scopes - The accounts whose notes we can access in this call. Currently optional and will default to all.
64
- * @returns A Promise that resolves to an array of note data.
65
- */
66
- getNotes(contractAddress: AztecAddress, storageSlot: Fr, status: NoteStatus, scopes?: AztecAddress[]): Promise<NoteData[]>;
67
- /**
68
- * Retrieve the artifact information of a specific function within a contract.
69
- * The function is identified by its selector, which is a unique identifier generated from the function signature.
70
- *
71
- * @param contractAddress - The contract address.
72
- * @param selector - The corresponding function selector.
73
- * @returns A Promise that resolves to a FunctionArtifact object.
74
- */
75
- getFunctionArtifact(contractAddress: AztecAddress, selector: FunctionSelector): Promise<FunctionArtifact>;
76
- /**
77
- * Generates a stable function name for debug purposes.
78
- * @param contractAddress - The contract address.
79
- * @param selector - The corresponding function selector.
80
- */
81
- getDebugFunctionName(contractAddress: AztecAddress, selector: FunctionSelector): Promise<string>;
82
- /**
83
- * Retrieves the artifact of a specified function within a given contract.
84
- * The function is identified by its name, which is unique within a contract.
85
- *
86
- * @param contractAddress - The AztecAddress representing the contract containing the function.
87
- * @param functionName - The name of the function.
88
- * @returns The corresponding function's artifact as an object.
89
- */
90
- getFunctionArtifactByName(contractAddress: AztecAddress, functionName: string): Promise<FunctionArtifact | undefined>;
91
- /**
92
- * Gets the index of a nullifier in the nullifier tree.
93
- * @param nullifier - The nullifier.
94
- * @returns - The index of the nullifier. Undefined if it does not exist in the tree.
95
- */
96
- getNullifierIndex(nullifier: Fr): Promise<bigint | undefined>;
97
- /**
98
- * Retrieve the databases view of the Block Header object.
99
- * This structure is fed into the circuits simulator and is used to prove against certain historical roots.
100
- *
101
- * @returns A Promise that resolves to a Header object.
102
- */
103
- getBlockHeader(): Promise<BlockHeader>;
104
- /**
105
- * Fetches the index and sibling path of a leaf at a given block from a given tree.
106
- * @param blockNumber - The block number at which to get the membership witness.
107
- * @param treeId - Id of the tree to get the sibling path from.
108
- * @param leafValue - The leaf value
109
- * @returns The index and sibling path concatenated [index, sibling_path]
110
- */
111
- getMembershipWitness(blockNumber: number, treeId: MerkleTreeId, leafValue: Fr): Promise<Fr[]>;
112
- /**
113
- * Returns a nullifier membership witness for a given nullifier at a given block.
114
- * @param blockNumber - The block number at which to get the index.
115
- * @param nullifier - Nullifier we try to find witness for.
116
- * @returns The nullifier membership witness (if found).
117
- */
118
- getNullifierMembershipWitness(blockNumber: number, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
119
- /**
120
- * Returns a low nullifier membership witness for a given nullifier at a given block.
121
- * @param blockNumber - The block number at which to get the index.
122
- * @param nullifier - Nullifier we try to find the low nullifier witness for.
123
- * @returns The low nullifier membership witness (if found).
124
- * @remarks Low nullifier witness can be used to perform a nullifier non-inclusion proof by leveraging the "linked
125
- * list structure" of leaves and proving that a lower nullifier is pointing to a bigger next value than the nullifier
126
- * we are trying to prove non-inclusion for.
127
- */
128
- getLowNullifierMembershipWitness(blockNumber: number, nullifier: Fr): Promise<NullifierMembershipWitness | undefined>;
129
- /**
130
- * Returns a witness for a given slot of the public data tree at a given block.
131
- * @param blockNumber - The block number at which to get the witness.
132
- * @param leafSlot - The slot of the public data in the public data tree.
133
- */
134
- getPublicDataTreeWitness(blockNumber: number, leafSlot: Fr): Promise<PublicDataWitness | undefined>;
135
- /**
136
- * Fetch a block corresponding to the given block number.
137
- * @param blockNumber - The block number of a block to fetch.
138
- * @returns - The block corresponding to the given block number. Undefined if it does not exist.
139
- */
140
- getBlock(blockNumber: number): Promise<L2Block | undefined>;
141
- /**
142
- * Fetches the current block number.
143
- * @returns The block number.
144
- */
145
- getBlockNumber(): Promise<number>;
146
- /**
147
- * Returns the tagging secret for a given sender and recipient pair. For this to work, the ivsk_m of the sender must be known.
148
- * Includes the next index to be used used for tagging with this secret.
149
- * @param contractAddress - The contract address to silo the secret for
150
- * @param sender - The address sending the note
151
- * @param recipient - The address receiving the note
152
- * @returns A tagging secret that can be used to tag notes.
153
- */
154
- getIndexedTaggingSecretAsSender(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress): Promise<IndexedTaggingSecret>;
155
- /**
156
- * Increments the tagging secret for a given sender and recipient pair. For this to work, the ivsk_m of the sender must be known.
157
- * @param contractAddress - The contract address to silo the secret for
158
- * @param sender - The address sending the note
159
- * @param recipient - The address receiving the note
160
- */
161
- incrementAppTaggingSecretIndexAsSender(contractAddress: AztecAddress, sender: AztecAddress, recipient: AztecAddress): Promise<void>;
162
- /**
163
- * Synchronizes the logs tagged with the recipient's address and all the senders in the address book.
164
- * Returns the unsynched logs and updates the indexes of the secrets used to tag them until there are no more logs to sync.
165
- * @param contractAddress - The address of the contract that the logs are tagged for
166
- * @param recipient - The address of the recipient
167
- * @returns A list of encrypted logs tagged with the recipient's address
168
- */
169
- syncTaggedLogs(contractAddress: AztecAddress, maxBlockNumber: number, scopes?: AztecAddress[]): Promise<Map<string, TxScopedL2Log[]>>;
170
- /**
171
- * Processes the tagged logs returned by syncTaggedLogs by decrypting them and storing them in the database.
172
- * @param logs - The logs to process.
173
- * @param recipient - The recipient of the logs.
174
- */
175
- processTaggedLogs(logs: TxScopedL2Log[], recipient: AztecAddress): Promise<void>;
176
- /**
177
- * Delivers the preimage and metadata of a committed note so that it can be later requested via the `getNotes`
178
- * oracle.
179
- *
180
- * @param contractAddress - The address of the contract that created the note (i.e. the siloing contract)
181
- * @param storageSlot - The storage slot of the note - used for indexing in `getNotes`
182
- * @param nonce - The nonce of the note used by the kernel to compute the unique note hash
183
- * @param content - The note's content: this is the primary item to return in `getNotes`
184
- * @param noteHash - The non-unique non-siloed note hash
185
- * @param nullifier - The inner (non-siloed) note nullifier
186
- * @param txHash - The transaction in which the note was added to the note hash tree
187
- * @param recipient - The account that discovered the note
188
- */
189
- deliverNote(contractAddress: AztecAddress, storageSlot: Fr, nonce: Fr, content: Fr[], noteHash: Fr, nullifier: Fr, txHash: Fr, recipient: AztecAddress): Promise<void>;
190
- /**
191
- * Searches for a log with the corresponding `tag` and returns it along with contextual transaction information.
192
- * Returns null if no such log exists, and throws if more than one exists.
193
- *
194
- * @param tag - The log tag to search for.
195
- */
196
- getLogByTag(tag: Fr): Promise<LogWithTxData | null>;
197
- /**
198
- * Removes all of a contract's notes that have been nullified from the note database.
199
- */
200
- removeNullifiedNotes(contractAddress: AztecAddress): Promise<void>;
201
- /**
202
- * Stores arbitrary information in a per-contract non-volatile database, which can later be retrieved with `loadCapsule`.
203
- * * If data was already stored at this slot, it is overwritten.
204
- * @param contractAddress - The contract address to scope the data under.
205
- * @param slot - The slot in the database in which to store the value. Slots need not be contiguous.
206
- * @param capsule - An array of field elements representing the capsule.
207
- * @remarks A capsule is a "blob" of data that is passed to the contract through an oracle. It works similarly
208
- * to public contract storage in that it's indexed by the contract address and storage slot but instead of the global
209
- * network state it's backed by local PXE db.
210
- */
211
- storeCapsule(contractAddress: AztecAddress, slot: Fr, capsule: Fr[]): Promise<void>;
212
- /**
213
- * Returns data previously stored via `storeCapsule` in the per-contract non-volatile database.
214
- * @param contractAddress - The contract address under which the data is scoped.
215
- * @param slot - The slot in the database to read.
216
- * @returns The stored data or `null` if no data is stored under the slot.
217
- */
218
- loadCapsule(contractAddress: AztecAddress, slot: Fr): Promise<Fr[] | null>;
219
- /**
220
- * Deletes data in the per-contract non-volatile database. Does nothing if no data was present.
221
- * @param contractAddress - The contract address under which the data is scoped.
222
- * @param slot - The slot in the database to delete.
223
- */
224
- deleteCapsule(contractAddress: AztecAddress, slot: Fr): Promise<void>;
225
- /**
226
- * Copies a number of contiguous entries in the per-contract non-volatile database. This allows for efficient data
227
- * structures by avoiding repeated calls to `loadCapsule` and `storeCapsule`.
228
- * Supports overlapping source and destination regions (which will result in the overlapped source values being
229
- * overwritten). All copied slots must exist in the database (i.e. have been stored and not deleted)
230
- *
231
- * @param contractAddress - The contract address under which the data is scoped.
232
- * @param srcSlot - The first slot to copy from.
233
- * @param dstSlot - The first slot to copy to.
234
- * @param numEntries - The number of entries to copy.
235
- */
236
- copyCapsule(contractAddress: AztecAddress, srcSlot: Fr, dstSlot: Fr, numEntries: number): Promise<void>;
237
- }
238
- //# sourceMappingURL=db_oracle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"db_oracle.d.ts","sourceRoot":"","sources":["../../src/private/db_oracle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,0BAA0B,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC5G,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;GAEG;AACH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from '@aztec/stdlib/aztec-address';
3
- import type { NoteData } from './acvm/index.js';
4
- interface PendingNote {
5
- note: NoteData;
6
- counter: number;
7
- noteHashForConsumption: Fr;
8
- }
9
- /**
10
- * Data that's accessible by all the function calls in an execution.
11
- */
12
- export declare class ExecutionNoteCache {
13
- #private;
14
- private readonly txRequestHash;
15
- /**
16
- * New notes created in this transaction.
17
- * They are pushed to this array in the same order as they are emitted.
18
- */
19
- private notes;
20
- /**
21
- * This mapping maps from a contract address to the notes in the contract.
22
- */
23
- private noteMap;
24
- /**
25
- * This maps from a contract address to the nullifiers emitted from the contract.
26
- * The note which is nullified might be new or not (i.e., was generated in a previous transaction).
27
- * Note that their value (bigint representation) is used because Frs cannot be looked up in Sets.
28
- */
29
- private nullifierMap;
30
- /**
31
- * All nullifiers emitted in this transaction.
32
- */
33
- private allNullifiers;
34
- private minRevertibleSideEffectCounter;
35
- private inRevertiblePhase;
36
- /**
37
- * We don't need to use the tx request hash for nonces if another non revertible nullifier is emitted.
38
- * In that case we disable injecting the tx request hash as a nullifier.
39
- */
40
- private usedTxRequestHashForNonces;
41
- constructor(txRequestHash: Fr);
42
- /**
43
- * Enters the revertible phase of the transaction.
44
- * @param minRevertibleSideEffectCounter - The counter at which the transaction enters the revertible phase.
45
- */
46
- setMinRevertibleSideEffectCounter(minRevertibleSideEffectCounter: number): Promise<void>;
47
- finish(): {
48
- usedTxRequestHashForNonces: boolean;
49
- };
50
- /**
51
- * Add a new note to cache.
52
- * @param note - New note created during execution.
53
- */
54
- addNewNote(note: NoteData, counter: number): void;
55
- /**
56
- * Add a nullifier to cache. It could be for a db note or a new note created during execution.
57
- * @param contractAddress - Contract address of the note.
58
- * @param innerNullifier - Inner nullifier of the note.
59
- * @param noteHash - A hash of the note. If this value equals 0, it means the note being nullified is from a previous
60
- * transaction (and thus not a new note).
61
- */
62
- nullifyNote(contractAddress: AztecAddress, innerNullifier: Fr, noteHash: Fr): Promise<number | undefined>;
63
- /**
64
- * Adds a nullifier to the cache. Note cache needs to track all nullifiers to decide which nullifier to use for note siloing.
65
- * @param contractAddress - Contract address that emitted the nullifier.
66
- * @param innerNullifier
67
- */
68
- nullifierCreated(contractAddress: AztecAddress, innerNullifier: Fr): Promise<void>;
69
- /**
70
- * Return notes created up to current point in execution.
71
- * If a nullifier for a note in this list is emitted, the note will be deleted.
72
- * @param contractAddress - Contract address of the notes.
73
- * @param storageSlot - Storage slot of the notes.
74
- **/
75
- getNotes(contractAddress: AztecAddress, storageSlot: Fr): NoteData[];
76
- /**
77
- * Check if a note exists in the newNotes array.
78
- * @param contractAddress - Contract address of the note.
79
- * @param storageSlot - Storage slot of the note.
80
- * @param noteHash - A hash of the note.
81
- **/
82
- checkNoteExists(contractAddress: AztecAddress, noteHash: Fr): boolean;
83
- /**
84
- * Return all nullifiers emitted from a contract.
85
- * @param contractAddress - Address of the contract.
86
- */
87
- getNullifiers(contractAddress: AztecAddress): Set<bigint>;
88
- getAllNotes(): PendingNote[];
89
- getAllNullifiers(): Fr[];
90
- recordNullifier(contractAddress: AztecAddress, siloedNullifier: Fr): void;
91
- }
92
- export {};
93
- //# sourceMappingURL=execution_note_cache.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execution_note_cache.d.ts","sourceRoot":"","sources":["../../src/private/execution_note_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,UAAU,WAAW;IACnB,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB,EAAE,EAAE,CAAC;CAC5B;AAED;;GAEG;AACH,qBAAa,kBAAkB;;IAiCjB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAhC1C;;;OAGG;IACH,OAAO,CAAC,KAAK,CAAqB;IAClC;;OAEG;IACH,OAAO,CAAC,OAAO,CAAyC;IAExD;;;;OAIG;IACH,OAAO,CAAC,YAAY,CAAuC;IAE3D;;OAEG;IACH,OAAO,CAAC,aAAa,CAA0B;IAE/C,OAAO,CAAC,8BAA8B,CAAK;IAE3C,OAAO,CAAC,iBAAiB,CAAS;IAElC;;;OAGG;IACH,OAAO,CAAC,0BAA0B,CAAQ;gBAEb,aAAa,EAAE,EAAE;IAE9C;;;OAGG;IACU,iCAAiC,CAAC,8BAA8B,EAAE,MAAM;IAwC9E,MAAM;;;IAWb;;;OAGG;IACI,UAAU,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM;IAWjD;;;;;;OAMG;IACU,WAAW,CAAC,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE;IA2BxF;;;;OAIG;IACU,gBAAgB,CAAC,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,EAAE;IAK/E;;;;;QAKI;IACG,QAAQ,CAAC,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE;IAK9D;;;;;QAKI;IACG,eAAe,CAAC,eAAe,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE;IAKlE;;;OAGG;IACI,aAAa,CAAC,eAAe,EAAE,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC;IAYhE,WAAW,IAAI,WAAW,EAAE;IAI5B,gBAAgB,IAAI,EAAE,EAAE;IAIxB,eAAe,CAAC,eAAe,EAAE,YAAY,EAAE,eAAe,EAAE,EAAE;CAMnE"}
@@ -1,28 +0,0 @@
1
- import { Fr } from '@aztec/foundation/fields';
2
- import { HashedValues } from '@aztec/stdlib/tx';
3
- /**
4
- * A cache for hashed values (arguments, returns) during transaction execution.
5
- */
6
- export declare class HashedValuesCache {
7
- private cache;
8
- constructor(initialArguments?: HashedValues[]);
9
- /**
10
- * Creates a new hashed values cache.
11
- * @param initialArguments - The initial arguments to add to the cache.
12
- * @returns The new hashed values cache.
13
- */
14
- static create(initialArguments?: HashedValues[]): HashedValuesCache;
15
- /**
16
- * Gets preimage of a hash.
17
- * @param hash - The hash to get the preimage of.
18
- * @returns The preimage.
19
- */
20
- getPreimage(hash: Fr): Fr[];
21
- /**
22
- * Stores values in cache and returns its hash.
23
- * @param values - The values to store.
24
- * @returns The hash of the values.
25
- */
26
- store(values: Fr[]): Promise<Fr>;
27
- }
28
- //# sourceMappingURL=hashed_values_cache.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hashed_values_cache.d.ts","sourceRoot":"","sources":["../../src/private/hashed_values_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,KAAK,CAAoB;gBAErB,gBAAgB,GAAE,YAAY,EAAO;IAOjD;;;;OAIG;WACW,MAAM,CAAC,gBAAgB,GAAE,YAAY,EAAO;IAI1D;;;;OAIG;IACI,WAAW,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,EAAE;IAWlC;;;;OAIG;IACU,KAAK,CAAC,MAAM,EAAE,EAAE,EAAE;CAQhC"}
@@ -1,13 +0,0 @@
1
- export { AcirSimulator } from './simulator.js';
2
- export { ViewDataOracle } from './view_data_oracle.js';
3
- export { type DBOracle, ContractClassNotFoundError, ContractNotFoundError } from './db_oracle.js';
4
- export * from './pick_notes.js';
5
- export { ExecutionNoteCache } from './execution_note_cache.js';
6
- export { extractPrivateCircuitPublicInputs, readCurrentClassId } from './private_execution.js';
7
- export { witnessMapToFields } from './acvm/deserialize.js';
8
- export { toACVMWitness } from './acvm/serialize.js';
9
- export { extractCallStack } from './acvm/acvm.js';
10
- export { type NoteData, TypedOracle } from './acvm/oracle/typed_oracle.js';
11
- export { Oracle } from './acvm/oracle/oracle.js';
12
- export { HashedValuesCache } from './hashed_values_cache.js';
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/private/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,KAAK,QAAQ,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAClG,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,iCAAiC,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,KAAK,QAAQ,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1,85 +0,0 @@
1
- import { Fr } from '@aztec/foundation/fields';
2
- import { Comparator, type Note } from '@aztec/stdlib/note';
3
- export interface PropertySelector {
4
- index: number;
5
- offset: number;
6
- length: number;
7
- }
8
- /**
9
- * Configuration for selecting values.
10
- */
11
- export interface Select {
12
- /**
13
- * Selector of the field to select and match.
14
- */
15
- selector: PropertySelector;
16
- /**
17
- * Required value of the field.
18
- */
19
- value: Fr;
20
- /**
21
- * The comparator to use
22
- */
23
- comparator: Comparator;
24
- }
25
- /**
26
- * The order to sort an array.
27
- */
28
- export declare enum SortOrder {
29
- NADA = 0,
30
- DESC = 1,
31
- ASC = 2
32
- }
33
- /**
34
- * Configuration for sorting values.
35
- */
36
- export interface Sort {
37
- /**
38
- * Selector of the field to sort.
39
- */
40
- selector: PropertySelector;
41
- /**
42
- * Order to sort the field.
43
- */
44
- order: SortOrder;
45
- }
46
- /**
47
- * Options for picking items from an array of BasicNoteData.
48
- */
49
- interface GetOptions {
50
- /**
51
- * Configurations for selecting items.
52
- * Default: empty array.
53
- */
54
- selects?: Select[];
55
- /**
56
- * Configurations for sorting items.
57
- * Default: empty array.
58
- */
59
- sorts?: Sort[];
60
- /**
61
- * The number of items to retrieve per query.
62
- * Default: 0. No limit.
63
- */
64
- limit?: number;
65
- /**
66
- * The starting index for pagination.
67
- * Default: 0.
68
- */
69
- offset?: number;
70
- }
71
- /**
72
- * Data needed from to perform sort.
73
- */
74
- interface ContainsNote {
75
- /**
76
- * The note.
77
- */
78
- note: Note;
79
- }
80
- /**
81
- * Pick from a note array a number of notes that meet the criteria.
82
- */
83
- export declare function pickNotes<T extends ContainsNote>(noteDatas: T[], { selects, sorts, limit, offset }: GetOptions): T[];
84
- export {};
85
- //# sourceMappingURL=pick_notes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pick_notes.d.ts","sourceRoot":"","sources":["../../src/private/pick_notes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE3D,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAC3B;;OAEG;IACH,KAAK,EAAE,EAAE,CAAC;IACV;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;CACxB;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,IAAI,IAAI;IACR,IAAI,IAAI;IACR,GAAG,IAAI;CACR;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAC3B;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;CAClB;AAED;;GAEG;AACH,UAAU,UAAU;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,UAAU,YAAY;IACpB;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;CACZ;AA8CD;;GAEG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,YAAY,EAC9C,SAAS,EAAE,CAAC,EAAE,EACd,EAAE,OAAY,EAAE,KAAU,EAAE,KAAS,EAAE,MAAU,EAAE,EAAE,UAAU,GAC9D,CAAC,EAAE,CAIL"}
@@ -1,24 +0,0 @@
1
- import { Fr } from '@aztec/foundation/fields';
2
- import { type FunctionArtifact, type FunctionSelector } from '@aztec/stdlib/abi';
3
- import type { AztecAddress } from '@aztec/stdlib/aztec-address';
4
- import type { ContractInstance } from '@aztec/stdlib/contract';
5
- import type { AztecNode } from '@aztec/stdlib/interfaces/client';
6
- import { PrivateCircuitPublicInputs } from '@aztec/stdlib/kernel';
7
- import { PrivateCallExecutionResult } from '@aztec/stdlib/tx';
8
- import { type ACVMWitness } from './acvm/index.js';
9
- import type { ClientExecutionContext } from './client_execution_context.js';
10
- import type { SimulationProvider } from './providers/simulation_provider.js';
11
- /**
12
- * Execute a private function and return the execution result.
13
- */
14
- export declare function executePrivateFunction(simulator: SimulationProvider, context: ClientExecutionContext, artifact: FunctionArtifact, contractAddress: AztecAddress, functionSelector: FunctionSelector, log?: import("@aztec/foundation/log").Logger): Promise<PrivateCallExecutionResult>;
15
- /**
16
- * Get the private circuit public inputs from the partial witness.
17
- * @param artifact - The function artifact
18
- * @param partialWitness - The partial witness, result of simulating the function.
19
- * @returns - The public inputs.
20
- */
21
- export declare function extractPrivateCircuitPublicInputs(artifact: FunctionArtifact, partialWitness: ACVMWitness): PrivateCircuitPublicInputs;
22
- export declare function readCurrentClassId(contractAddress: AztecAddress, instance: ContractInstance, node: AztecNode, blockNumber: number): Promise<Fr>;
23
- export declare function verifyCurrentClassId(contractAddress: AztecAddress, instance: ContractInstance, node: AztecNode, blockNumber: number): Promise<void>;
24
- //# sourceMappingURL=private_execution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"private_execution.d.ts","sourceRoot":"","sources":["../../src/private/private_execution.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAI9C,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,gBAAgB,EAAsB,MAAM,mBAAmB,CAAC;AACrG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAGlE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAI9D,OAAO,EAAE,KAAK,WAAW,EAA4B,MAAM,iBAAiB,CAAC;AAC7E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAE7E;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,SAAS,EAAE,kBAAkB,EAC7B,OAAO,EAAE,sBAAsB,EAC/B,QAAQ,EAAE,gBAAgB,EAC1B,eAAe,EAAE,YAAY,EAC7B,gBAAgB,EAAE,gBAAgB,EAClC,GAAG,yCAA8C,GAChD,OAAO,CAAC,0BAA0B,CAAC,CA+DrC;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAC/C,QAAQ,EAAE,gBAAgB,EAC1B,cAAc,EAAE,WAAW,GAC1B,0BAA0B,CAa5B;AAED,wBAAsB,kBAAkB,CACtC,eAAe,EAAE,YAAY,EAC7B,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,EAAE,SAAS,EACf,WAAW,EAAE,MAAM,eAWpB;AAED,wBAAsB,oBAAoB,CACxC,eAAe,EAAE,YAAY,EAC7B,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,EAAE,SAAS,EACf,WAAW,EAAE,MAAM,iBAQpB"}
@@ -1,40 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import type { NoirCompiledCircuit } from '@aztec/stdlib/noir';
4
- import type { WitnessMap } from '@noir-lang/types';
5
- import type { ACIRCallback, ACIRExecutionResult } from '../acvm/acvm.js';
6
- import type { ACVMWitness } from '../acvm/acvm_types.js';
7
- import type { SimulationProvider } from './simulation_provider.js';
8
- export declare enum ACVM_RESULT {
9
- SUCCESS = 0,
10
- FAILURE = 1
11
- }
12
- export type ACVMSuccess = {
13
- status: ACVM_RESULT.SUCCESS;
14
- duration: number;
15
- witness: Map<number, string>;
16
- };
17
- export type ACVMFailure = {
18
- status: ACVM_RESULT.FAILURE;
19
- reason: string;
20
- };
21
- export type ACVMResult = ACVMSuccess | ACVMFailure;
22
- /**
23
- *
24
- * @param inputWitness - The circuit's input witness
25
- * @param bytecode - The circuit bytecode
26
- * @param workingDirectory - A directory to use for temporary files by the ACVM
27
- * @param pathToAcvm - The path to the ACVM binary
28
- * @param outputFilename - If specified, the output will be stored as a file, encoded using Bincode
29
- * @returns The completed partial witness outputted from the circuit
30
- */
31
- export declare function executeNativeCircuit(inputWitness: WitnessMap, bytecode: Buffer, workingDirectory: string, pathToAcvm: string, outputFilename?: string): Promise<ACVMResult>;
32
- export declare class NativeACVMSimulator implements SimulationProvider {
33
- private workingDirectory;
34
- private pathToAcvm;
35
- private witnessFilename?;
36
- constructor(workingDirectory: string, pathToAcvm: string, witnessFilename?: string | undefined);
37
- executeProtocolCircuit(input: WitnessMap, compiledCircuit: NoirCompiledCircuit): Promise<WitnessMap>;
38
- executeUserCircuit(_acir: Buffer, _initialWitness: ACVMWitness, _callback: ACIRCallback): Promise<ACIRExecutionResult>;
39
- }
40
- //# sourceMappingURL=acvm_native.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acvm_native.d.ts","sourceRoot":"","sources":["../../../src/private/providers/acvm_native.ts"],"names":[],"mappings":";;AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAInD,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAInE,oBAAY,WAAW;IACrB,OAAO,IAAA;IACP,OAAO,IAAA;CACR;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,WAAW,CAAC;AAmBnD;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,YAAY,EAAE,UAAU,EACxB,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,MAAM,EAClB,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,UAAU,CAAC,CAqErB;AAED,qBAAa,mBAAoB,YAAW,kBAAkB;IAChD,OAAO,CAAC,gBAAgB;IAAU,OAAO,CAAC,UAAU;IAAU,OAAO,CAAC,eAAe,CAAC;gBAA9E,gBAAgB,EAAE,MAAM,EAAU,UAAU,EAAE,MAAM,EAAU,eAAe,CAAC,oBAAQ;IACpG,sBAAsB,CAAC,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;IAyB1G,kBAAkB,CAChB,KAAK,EAAE,MAAM,EACb,eAAe,EAAE,WAAW,EAC5B,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,mBAAmB,CAAC;CAGhC"}
@@ -1,15 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import type { NoirCompiledCircuit } from '@aztec/stdlib/noir';
4
- import type { WitnessMap } from '@noir-lang/types';
5
- import { type ACIRCallback } from '../acvm/acvm.js';
6
- import type { ACVMWitness } from '../acvm/acvm_types.js';
7
- import { type SimulationProvider } from './simulation_provider.js';
8
- export declare class WASMSimulator implements SimulationProvider {
9
- protected log: import("@aztec/foundation/log").Logger;
10
- constructor(log?: import("@aztec/foundation/log").Logger);
11
- init(): Promise<void>;
12
- executeProtocolCircuit(input: WitnessMap, compiledCircuit: NoirCompiledCircuit): Promise<WitnessMap>;
13
- executeUserCircuit(acir: Buffer, initialWitness: ACVMWitness, callback: ACIRCallback): Promise<import("../acvm/acvm.js").ACIRExecutionResult>;
14
- }
15
- //# sourceMappingURL=acvm_wasm.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acvm_wasm.d.ts","sourceRoot":"","sources":["../../../src/private/providers/acvm_wasm.ts"],"names":[],"mappings":";;AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAI9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,YAAY,EAAQ,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,0BAA0B,CAAC;AAEtF,qBAAa,aAAc,YAAW,kBAAkB;IAC1C,SAAS,CAAC,GAAG;gBAAH,GAAG,yCAAiC;IAEpD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAUrB,sBAAsB,CAAC,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;IAiCpG,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,WAAW,EAAE,QAAQ,EAAE,YAAY;CAI3F"}
@@ -1,19 +0,0 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- import type { NoirCompiledCircuit } from '@aztec/stdlib/noir';
4
- import type { WitnessMap } from '@noir-lang/types';
5
- import type { ACIRCallback, ACIRExecutionResult } from '../acvm/acvm.js';
6
- import type { ACVMWitness } from '../acvm/acvm_types.js';
7
- import { type SimulationProvider } from './simulation_provider.js';
8
- /**
9
- * A simulation provider that uses the WASM simulator with the ability to handle blobs via the foreign call handler.
10
- * This class is temporary while brillig cannot handle the blob math, and it is kept separate
11
- * because the zkg commitment library used in the blob code is not browser compatible.
12
- *
13
- * It is only used in the context of server-side code executing simulated protocol circuits.
14
- */
15
- export declare class WASMSimulatorWithBlobs implements SimulationProvider {
16
- executeProtocolCircuit(input: WitnessMap, compiledCircuit: NoirCompiledCircuit): Promise<WitnessMap>;
17
- executeUserCircuit(_acir: Buffer, _initialWitness: ACVMWitness, _callback: ACIRCallback): Promise<ACIRExecutionResult>;
18
- }
19
- //# sourceMappingURL=acvm_wasm_with_blobs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"acvm_wasm_with_blobs.d.ts","sourceRoot":"","sources":["../../../src/private/providers/acvm_wasm_with_blobs.ts"],"names":[],"mappings":";;AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAG9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,0BAA0B,CAAC;AAEtF;;;;;;GAMG;AACH,qBAAa,sBAAuB,YAAW,kBAAkB;IACzD,sBAAsB,CAAC,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC;IAwB1G,kBAAkB,CAChB,KAAK,EAAE,MAAM,EACb,eAAe,EAAE,WAAW,EAC5B,SAAS,EAAE,YAAY,GACtB,OAAO,CAAC,mBAAmB,CAAC;CAGhC"}
@@ -1,12 +0,0 @@
1
- import { type Logger } from '@aztec/foundation/log';
2
- import type { SimulationProvider } from './simulation_provider.js';
3
- export type SimulationProviderConfig = {
4
- acvmBinaryPath?: string;
5
- acvmWorkingDirectory?: string;
6
- };
7
- export declare function getSimulationProviderConfigFromEnv(): {
8
- acvmWorkingDirectory: string | undefined;
9
- acvmBinaryPath: string | undefined;
10
- };
11
- export declare function createSimulationProvider(config: SimulationProviderConfig, logger?: Logger): Promise<SimulationProvider>;
12
- //# sourceMappingURL=factory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/private/providers/factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,uBAAuB,CAAC;AAMlE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,MAAM,MAAM,wBAAwB,GAAG;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,wBAAgB,kCAAkC;;;EAMjD;AAED,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,wBAAwB,EAChC,MAAM,GAAE,MAAkC,GACzC,OAAO,CAAC,kBAAkB,CAAC,CAa7B"}