@aztec/simulator 0.32.0 → 0.32.1

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 (165) hide show
  1. package/dest/acvm/acvm.d.ts +5 -5
  2. package/dest/acvm/acvm.d.ts.map +1 -1
  3. package/dest/acvm/acvm_types.d.ts +1 -1
  4. package/dest/acvm/acvm_types.d.ts.map +1 -1
  5. package/dest/acvm/deserialize.d.ts +1 -1
  6. package/dest/acvm/deserialize.d.ts.map +1 -1
  7. package/dest/acvm/oracle/debug.d.ts +2 -2
  8. package/dest/acvm/oracle/debug.d.ts.map +1 -1
  9. package/dest/acvm/oracle/index.d.ts +1 -1
  10. package/dest/acvm/oracle/index.d.ts.map +1 -1
  11. package/dest/acvm/oracle/oracle.d.ts +2 -2
  12. package/dest/acvm/oracle/oracle.d.ts.map +1 -1
  13. package/dest/acvm/oracle/typed_oracle.d.ts +6 -6
  14. package/dest/acvm/oracle/typed_oracle.d.ts.map +1 -1
  15. package/dest/acvm/serialize.d.ts +4 -4
  16. package/dest/acvm/serialize.d.ts.map +1 -1
  17. package/dest/acvm/serialize.js +1 -1
  18. package/dest/avm/avm_context.d.ts +4 -4
  19. package/dest/avm/avm_context.d.ts.map +1 -1
  20. package/dest/avm/avm_context.js +1 -1
  21. package/dest/avm/avm_execution_environment.d.ts +4 -4
  22. package/dest/avm/avm_execution_environment.d.ts.map +1 -1
  23. package/dest/avm/avm_execution_environment.js +1 -1
  24. package/dest/avm/avm_machine_state.d.ts +2 -2
  25. package/dest/avm/avm_machine_state.d.ts.map +1 -1
  26. package/dest/avm/avm_machine_state.js +1 -1
  27. package/dest/avm/avm_memory_types.d.ts +1 -1
  28. package/dest/avm/avm_memory_types.d.ts.map +1 -1
  29. package/dest/avm/avm_memory_types.js +1 -1
  30. package/dest/avm/avm_message_call_result.d.ts +1 -1
  31. package/dest/avm/avm_message_call_result.d.ts.map +1 -1
  32. package/dest/avm/avm_simulator.js +1 -1
  33. package/dest/avm/errors.d.ts +1 -1
  34. package/dest/avm/errors.d.ts.map +1 -1
  35. package/dest/avm/fixtures/index.d.ts +1 -1
  36. package/dest/avm/fixtures/index.d.ts.map +1 -1
  37. package/dest/avm/fixtures/index.js +2 -2
  38. package/dest/avm/journal/host_storage.d.ts +1 -1
  39. package/dest/avm/journal/host_storage.d.ts.map +1 -1
  40. package/dest/avm/journal/journal.d.ts +2 -2
  41. package/dest/avm/journal/journal.d.ts.map +1 -1
  42. package/dest/avm/journal/trace.d.ts +1 -1
  43. package/dest/avm/journal/trace.d.ts.map +1 -1
  44. package/dest/avm/journal/trace_types.d.ts +1 -1
  45. package/dest/avm/journal/trace_types.d.ts.map +1 -1
  46. package/dest/avm/opcodes/addressing_mode.d.ts +1 -1
  47. package/dest/avm/opcodes/addressing_mode.d.ts.map +1 -1
  48. package/dest/avm/opcodes/arithmetic.d.ts +2 -2
  49. package/dest/avm/opcodes/arithmetic.d.ts.map +1 -1
  50. package/dest/avm/opcodes/arithmetic.js +1 -1
  51. package/dest/avm/opcodes/environment_getters.d.ts +1 -1
  52. package/dest/avm/opcodes/environment_getters.d.ts.map +1 -1
  53. package/dest/avm/opcodes/hashing.d.ts +1 -1
  54. package/dest/avm/opcodes/hashing.d.ts.map +1 -1
  55. package/dest/avm/opcodes/instruction.d.ts +3 -3
  56. package/dest/avm/opcodes/instruction.d.ts.map +1 -1
  57. package/dest/avm/opcodes/instruction.js +1 -1
  58. package/dest/avm/opcodes/memory.d.ts +1 -1
  59. package/dest/avm/opcodes/memory.d.ts.map +1 -1
  60. package/dest/avm/opcodes/memory.js +1 -1
  61. package/dest/avm/temporary_executor_migration.d.ts +4 -4
  62. package/dest/avm/temporary_executor_migration.d.ts.map +1 -1
  63. package/dest/client/client_execution_context.d.ts +11 -11
  64. package/dest/client/client_execution_context.d.ts.map +1 -1
  65. package/dest/client/client_execution_context.js +1 -1
  66. package/dest/client/db_oracle.d.ts +9 -9
  67. package/dest/client/db_oracle.d.ts.map +1 -1
  68. package/dest/client/db_oracle.js +1 -1
  69. package/dest/client/execution_note_cache.d.ts +2 -2
  70. package/dest/client/execution_note_cache.d.ts.map +1 -1
  71. package/dest/client/execution_result.d.ts +5 -5
  72. package/dest/client/execution_result.d.ts.map +1 -1
  73. package/dest/client/execution_result.js +1 -1
  74. package/dest/client/pick_notes.d.ts +1 -1
  75. package/dest/client/pick_notes.d.ts.map +1 -1
  76. package/dest/client/pick_notes.js +1 -1
  77. package/dest/client/private_execution.d.ts +5 -5
  78. package/dest/client/private_execution.d.ts.map +1 -1
  79. package/dest/client/private_execution.js +1 -1
  80. package/dest/client/simulator.d.ts +6 -6
  81. package/dest/client/simulator.d.ts.map +1 -1
  82. package/dest/client/simulator.js +1 -1
  83. package/dest/client/unconstrained_execution.d.ts +5 -5
  84. package/dest/client/unconstrained_execution.d.ts.map +1 -1
  85. package/dest/client/unconstrained_execution.js +1 -1
  86. package/dest/client/view_data_oracle.d.ts +6 -6
  87. package/dest/client/view_data_oracle.d.ts.map +1 -1
  88. package/dest/client/view_data_oracle.js +1 -1
  89. package/dest/common/errors.d.ts +1 -1
  90. package/dest/common/errors.d.ts.map +1 -1
  91. package/dest/common/errors.js +1 -1
  92. package/dest/public/db.d.ts +6 -6
  93. package/dest/public/db.d.ts.map +1 -1
  94. package/dest/public/execution.d.ts +2 -2
  95. package/dest/public/execution.d.ts.map +1 -1
  96. package/dest/public/executor.d.ts +3 -3
  97. package/dest/public/executor.d.ts.map +1 -1
  98. package/dest/public/executor.js +1 -1
  99. package/dest/public/public_execution_context.d.ts +7 -7
  100. package/dest/public/public_execution_context.d.ts.map +1 -1
  101. package/dest/public/public_execution_context.js +3 -3
  102. package/dest/public/state_actions.d.ts +2 -2
  103. package/dest/public/state_actions.d.ts.map +1 -1
  104. package/dest/simulator/acvm_native.d.ts +3 -3
  105. package/dest/simulator/acvm_native.d.ts.map +1 -1
  106. package/dest/simulator/acvm_wasm.d.ts +3 -3
  107. package/dest/simulator/acvm_wasm.d.ts.map +1 -1
  108. package/dest/simulator/acvm_wasm.js +2 -2
  109. package/dest/simulator/simulation_provider.d.ts +2 -2
  110. package/dest/simulator/simulation_provider.d.ts.map +1 -1
  111. package/dest/test/utils.d.ts +1 -1
  112. package/dest/test/utils.d.ts.map +1 -1
  113. package/dest/test/utils.js +1 -1
  114. package/dest/utils.d.ts +1 -1
  115. package/dest/utils.d.ts.map +1 -1
  116. package/package.json +5 -5
  117. package/src/acvm/acvm.ts +8 -8
  118. package/src/acvm/acvm_types.ts +1 -1
  119. package/src/acvm/deserialize.ts +1 -1
  120. package/src/acvm/oracle/debug.ts +2 -2
  121. package/src/acvm/oracle/index.ts +1 -1
  122. package/src/acvm/oracle/oracle.ts +2 -2
  123. package/src/acvm/oracle/typed_oracle.ts +18 -18
  124. package/src/acvm/serialize.ts +4 -4
  125. package/src/avm/avm_context.ts +4 -4
  126. package/src/avm/avm_execution_environment.ts +4 -4
  127. package/src/avm/avm_machine_state.ts +2 -2
  128. package/src/avm/avm_memory_types.ts +1 -1
  129. package/src/avm/avm_message_call_result.ts +1 -1
  130. package/src/avm/avm_simulator.ts +1 -1
  131. package/src/avm/errors.ts +1 -1
  132. package/src/avm/fixtures/index.ts +6 -1
  133. package/src/avm/journal/host_storage.ts +1 -1
  134. package/src/avm/journal/journal.ts +2 -2
  135. package/src/avm/journal/trace.ts +1 -1
  136. package/src/avm/journal/trace_types.ts +1 -1
  137. package/src/avm/opcodes/addressing_mode.ts +1 -1
  138. package/src/avm/opcodes/arithmetic.ts +2 -2
  139. package/src/avm/opcodes/bitwise.ts +1 -1
  140. package/src/avm/opcodes/control_flow.ts +1 -1
  141. package/src/avm/opcodes/environment_getters.ts +1 -1
  142. package/src/avm/opcodes/hashing.ts +1 -1
  143. package/src/avm/opcodes/instruction.ts +3 -3
  144. package/src/avm/opcodes/memory.ts +1 -1
  145. package/src/avm/temporary_executor_migration.ts +6 -6
  146. package/src/client/client_execution_context.ts +15 -15
  147. package/src/client/db_oracle.ts +16 -10
  148. package/src/client/execution_note_cache.ts +2 -2
  149. package/src/client/execution_result.ts +9 -5
  150. package/src/client/pick_notes.ts +1 -1
  151. package/src/client/private_execution.ts +5 -5
  152. package/src/client/simulator.ts +8 -8
  153. package/src/client/unconstrained_execution.ts +5 -5
  154. package/src/client/view_data_oracle.ts +11 -11
  155. package/src/common/errors.ts +1 -1
  156. package/src/public/db.ts +6 -6
  157. package/src/public/execution.ts +10 -10
  158. package/src/public/executor.ts +3 -3
  159. package/src/public/public_execution_context.ts +17 -7
  160. package/src/public/state_actions.ts +2 -2
  161. package/src/simulator/acvm_native.ts +3 -3
  162. package/src/simulator/acvm_wasm.ts +8 -4
  163. package/src/simulator/simulation_provider.ts +2 -2
  164. package/src/test/utils.ts +1 -1
  165. package/src/utils.ts +1 -1
@@ -1,4 +1,4 @@
1
- import { WitnessMap } from '@noir-lang/acvm_js';
1
+ import { type WitnessMap } from '@noir-lang/acvm_js';
2
2
 
3
3
  /**
4
4
  * ACVMField
@@ -2,7 +2,7 @@ import { Fr } from '@aztec/foundation/fields';
2
2
 
3
3
  import { getReturnWitness } from '@noir-lang/acvm_js';
4
4
 
5
- import { ACVMField, ACVMWitness } from './acvm_types.js';
5
+ import { type ACVMField, type ACVMWitness } from './acvm_types.js';
6
6
 
7
7
  /**
8
8
  * Converts an ACVM field to a Fr.
@@ -1,6 +1,6 @@
1
- import { ForeignCallInput } from '@noir-lang/acvm_js';
1
+ import { type ForeignCallInput } from '@noir-lang/acvm_js';
2
2
 
3
- import { ACVMField } from '../acvm_types.js';
3
+ import { type ACVMField } from '../acvm_types.js';
4
4
 
5
5
  /**
6
6
  * Convert an array of ACVMFields to a string.
@@ -1,4 +1,4 @@
1
- import { Oracle } from './oracle.js';
1
+ import { type Oracle } from './oracle.js';
2
2
 
3
3
  export * from './debug.js';
4
4
  export * from './oracle.js';
@@ -6,11 +6,11 @@ import { padArrayEnd } from '@aztec/foundation/collection';
6
6
  import { Fr, Point } from '@aztec/foundation/fields';
7
7
  import { createDebugLogger } from '@aztec/foundation/log';
8
8
 
9
- import { ACVMField } from '../acvm_types.js';
9
+ import { type ACVMField } from '../acvm_types.js';
10
10
  import { frToBoolean, frToNumber, fromACVMField } from '../deserialize.js';
11
11
  import { toACVMField, toAcvmEnqueuePublicFunctionResult } from '../serialize.js';
12
12
  import { acvmFieldMessageToString, oracleDebugCallToFormattedStr } from './debug.js';
13
- import { TypedOracle } from './typed_oracle.js';
13
+ import { type TypedOracle } from './typed_oracle.js';
14
14
 
15
15
  /**
16
16
  * A data source that has all the apis required by Aztec.nr.
@@ -1,26 +1,26 @@
1
1
  import {
2
- CompleteAddress,
3
- MerkleTreeId,
4
- Note,
5
- NoteStatus,
6
- NullifierMembershipWitness,
7
- PublicDataWitness,
8
- PublicKey,
9
- SiblingPath,
10
- UnencryptedL2Log,
2
+ type CompleteAddress,
3
+ type MerkleTreeId,
4
+ type Note,
5
+ type NoteStatus,
6
+ type NullifierMembershipWitness,
7
+ type PublicDataWitness,
8
+ type PublicKey,
9
+ type SiblingPath,
10
+ type UnencryptedL2Log,
11
11
  } from '@aztec/circuit-types';
12
12
  import {
13
- GrumpkinPrivateKey,
14
- Header,
15
- L1_TO_L2_MSG_TREE_HEIGHT,
16
- PrivateCallStackItem,
17
- PublicCallRequest,
13
+ type GrumpkinPrivateKey,
14
+ type Header,
15
+ type L1_TO_L2_MSG_TREE_HEIGHT,
16
+ type PrivateCallStackItem,
17
+ type PublicCallRequest,
18
18
  } from '@aztec/circuits.js';
19
- import { FunctionSelector } from '@aztec/foundation/abi';
20
- import { AztecAddress } from '@aztec/foundation/aztec-address';
21
- import { EthAddress } from '@aztec/foundation/eth-address';
19
+ import { type FunctionSelector } from '@aztec/foundation/abi';
20
+ import { type AztecAddress } from '@aztec/foundation/aztec-address';
21
+ import { type EthAddress } from '@aztec/foundation/eth-address';
22
22
  import { Fr } from '@aztec/foundation/fields';
23
- import { ContractInstance } from '@aztec/types/contracts';
23
+ import { type ContractInstance } from '@aztec/types/contracts';
24
24
 
25
25
  /**
26
26
  * A pair of public key and secret key.
@@ -1,9 +1,9 @@
1
- import { ENQUEUE_PUBLIC_FUNCTION_CALL_RETURN_LENGTH, PublicCallRequest } from '@aztec/circuits.js';
2
- import { AztecAddress } from '@aztec/foundation/aztec-address';
3
- import { EthAddress } from '@aztec/foundation/eth-address';
1
+ import { ENQUEUE_PUBLIC_FUNCTION_CALL_RETURN_LENGTH, type PublicCallRequest } from '@aztec/circuits.js';
2
+ import { type AztecAddress } from '@aztec/foundation/aztec-address';
3
+ import { type EthAddress } from '@aztec/foundation/eth-address';
4
4
  import { Fr } from '@aztec/foundation/fields';
5
5
 
6
- import { ACVMField } from './acvm_types.js';
6
+ import { type ACVMField } from './acvm_types.js';
7
7
 
8
8
  /**
9
9
  * Adapts the buffer to the field size.
@@ -1,9 +1,9 @@
1
- import { AztecAddress, FunctionSelector } from '@aztec/circuits.js';
2
- import { Fr } from '@aztec/foundation/fields';
1
+ import { type AztecAddress, FunctionSelector } from '@aztec/circuits.js';
2
+ import { type Fr } from '@aztec/foundation/fields';
3
3
 
4
- import { AvmExecutionEnvironment } from './avm_execution_environment.js';
4
+ import { type AvmExecutionEnvironment } from './avm_execution_environment.js';
5
5
  import { AvmMachineState } from './avm_machine_state.js';
6
- import { AvmPersistableStateManager } from './journal/journal.js';
6
+ import { type AvmPersistableStateManager } from './journal/journal.js';
7
7
 
8
8
  /**
9
9
  * An execution context includes the information necessary to initiate AVM
@@ -1,8 +1,8 @@
1
- import { FunctionSelector, GlobalVariables } from '@aztec/circuits.js';
1
+ import { FunctionSelector, type GlobalVariables } from '@aztec/circuits.js';
2
2
  import { computeVarArgsHash } from '@aztec/circuits.js/hash';
3
- import { AztecAddress } from '@aztec/foundation/aztec-address';
4
- import { EthAddress } from '@aztec/foundation/eth-address';
5
- import { Fr } from '@aztec/foundation/fields';
3
+ import { type AztecAddress } from '@aztec/foundation/aztec-address';
4
+ import { type EthAddress } from '@aztec/foundation/eth-address';
5
+ import { type Fr } from '@aztec/foundation/fields';
6
6
 
7
7
  export class AvmContextInputs {
8
8
  static readonly SIZE = 2;
@@ -1,6 +1,6 @@
1
- import { Fr } from '@aztec/circuits.js';
1
+ import { type Fr } from '@aztec/circuits.js';
2
2
 
3
- import { GasCost, GasDimensions } from './avm_gas_cost.js';
3
+ import { type GasCost, GasDimensions } from './avm_gas_cost.js';
4
4
  import { TaggedMemory } from './avm_memory_types.js';
5
5
  import { AvmContractCallResults } from './avm_message_call_result.js';
6
6
  import { OutOfGasError } from './errors.js';
@@ -1,6 +1,6 @@
1
1
  import { toBufferBE } from '@aztec/foundation/bigint-buffer';
2
2
  import { Fr } from '@aztec/foundation/fields';
3
- import { DebugLogger, createDebugLogger } from '@aztec/foundation/log';
3
+ import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log';
4
4
 
5
5
  import { strict as assert } from 'assert';
6
6
 
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { type Fr } from '@aztec/foundation/fields';
2
2
 
3
3
  /**
4
4
  * Results of an contract call's execution in the AVM.
@@ -1,4 +1,4 @@
1
- import { DebugLogger, createDebugLogger } from '@aztec/foundation/log';
1
+ import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log';
2
2
 
3
3
  import { strict as assert } from 'assert';
4
4
 
package/src/avm/errors.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { AztecAddress } from '@aztec/circuits.js';
1
+ import { type AztecAddress } from '@aztec/circuits.js';
2
2
 
3
3
  /**
4
4
  * Avm-specific errors should derive from this
@@ -8,7 +8,12 @@ import { Fr } from '@aztec/foundation/fields';
8
8
  import { mock } from 'jest-mock-extended';
9
9
  import merge from 'lodash.merge';
10
10
 
11
- import { CommitmentsDB, MessageLoadOracleInputs, PublicContractsDB, PublicStateDB } from '../../index.js';
11
+ import {
12
+ type CommitmentsDB,
13
+ MessageLoadOracleInputs,
14
+ type PublicContractsDB,
15
+ type PublicStateDB,
16
+ } from '../../index.js';
12
17
  import { AvmContext } from '../avm_context.js';
13
18
  import { AvmContextInputs, AvmExecutionEnvironment } from '../avm_execution_environment.js';
14
19
  import { AvmMachineState } from '../avm_machine_state.js';
@@ -1,4 +1,4 @@
1
- import { CommitmentsDB, PublicContractsDB, PublicStateDB } from '../../public/db.js';
1
+ import { type CommitmentsDB, type PublicContractsDB, type PublicStateDB } from '../../public/db.js';
2
2
 
3
3
  /**
4
4
  * Host storage
@@ -3,11 +3,11 @@ import { AztecAddress, EthAddress, L2ToL1Message } from '@aztec/circuits.js';
3
3
  import { EventSelector } from '@aztec/foundation/abi';
4
4
  import { Fr } from '@aztec/foundation/fields';
5
5
 
6
- import { HostStorage } from './host_storage.js';
6
+ import { type HostStorage } from './host_storage.js';
7
7
  import { Nullifiers } from './nullifiers.js';
8
8
  import { PublicStorage } from './public_storage.js';
9
9
  import { WorldStateAccessTrace } from './trace.js';
10
- import { TracedL1toL2MessageCheck, TracedNoteHashCheck, TracedNullifierCheck } from './trace_types.js';
10
+ import { type TracedL1toL2MessageCheck, type TracedNoteHashCheck, type TracedNullifierCheck } from './trace_types.js';
11
11
 
12
12
  /**
13
13
  * Data held within the journal
@@ -1,6 +1,6 @@
1
1
  import { Fr } from '@aztec/foundation/fields';
2
2
 
3
- import { TracedL1toL2MessageCheck, TracedNoteHashCheck, TracedNullifierCheck } from './trace_types.js';
3
+ import { type TracedL1toL2MessageCheck, type TracedNoteHashCheck, type TracedNullifierCheck } from './trace_types.js';
4
4
 
5
5
  export class WorldStateAccessTrace {
6
6
  public accessCounter: number;
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/foundation/fields';
1
+ import { type Fr } from '@aztec/foundation/fields';
2
2
 
3
3
  //export type TracedContractCall = {
4
4
  // callPointer: Fr;
@@ -1,6 +1,6 @@
1
1
  import { strict as assert } from 'assert';
2
2
 
3
- import { TaggedMemory } from '../avm_memory_types.js';
3
+ import { type TaggedMemory } from '../avm_memory_types.js';
4
4
 
5
5
  export enum AddressingMode {
6
6
  DIRECT,
@@ -1,6 +1,6 @@
1
1
  import type { AvmContext } from '../avm_context.js';
2
- import { GasCost, GasCostConstants, getGasCostMultiplierFromTypeTag, makeGasCost } from '../avm_gas_cost.js';
3
- import { Field, MemoryValue, TypeTag } from '../avm_memory_types.js';
2
+ import { type GasCost, GasCostConstants, getGasCostMultiplierFromTypeTag, makeGasCost } from '../avm_gas_cost.js';
3
+ import { type Field, type MemoryValue, TypeTag } from '../avm_memory_types.js';
4
4
  import { Opcode, OperandType } from '../serialization/instruction_serialization.js';
5
5
  import { Addressing, AddressingMode } from './addressing_mode.js';
6
6
  import { Instruction } from './instruction.js';
@@ -1,5 +1,5 @@
1
1
  import type { AvmContext } from '../avm_context.js';
2
- import { IntegralValue } from '../avm_memory_types.js';
2
+ import { type IntegralValue } from '../avm_memory_types.js';
3
3
  import { Opcode } from '../serialization/instruction_serialization.js';
4
4
  import { ThreeOperandInstruction, TwoOperandInstruction } from './instruction_impl.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import type { AvmContext } from '../avm_context.js';
2
- import { IntegralValue } from '../avm_memory_types.js';
2
+ import { type IntegralValue } from '../avm_memory_types.js';
3
3
  import { InstructionExecutionError } from '../errors.js';
4
4
  import { Opcode, OperandType } from '../serialization/instruction_serialization.js';
5
5
  import { Instruction } from './instruction.js';
@@ -1,4 +1,4 @@
1
- import { Fr } from '@aztec/circuits.js';
1
+ import { type Fr } from '@aztec/circuits.js';
2
2
 
3
3
  import type { AvmContext } from '../avm_context.js';
4
4
  import type { AvmExecutionEnvironment } from '../avm_execution_environment.js';
@@ -1,7 +1,7 @@
1
1
  import { toBigIntBE } from '@aztec/foundation/bigint-buffer';
2
2
  import { keccak, pedersenHash, poseidonHash, sha256 } from '@aztec/foundation/crypto';
3
3
 
4
- import { AvmContext } from '../avm_context.js';
4
+ import { type AvmContext } from '../avm_context.js';
5
5
  import { Field } from '../avm_memory_types.js';
6
6
  import { Opcode, OperandType } from '../serialization/instruction_serialization.js';
7
7
  import { Addressing } from './addressing_mode.js';
@@ -1,9 +1,9 @@
1
1
  import { strict as assert } from 'assert';
2
2
 
3
3
  import type { AvmContext } from '../avm_context.js';
4
- import { DynamicGasCost, GasCost, GasCosts } from '../avm_gas_cost.js';
5
- import { BufferCursor } from '../serialization/buffer_cursor.js';
6
- import { Opcode, OperandType, deserialize, serialize } from '../serialization/instruction_serialization.js';
4
+ import { DynamicGasCost, type GasCost, GasCosts } from '../avm_gas_cost.js';
5
+ import { type BufferCursor } from '../serialization/buffer_cursor.js';
6
+ import { Opcode, type OperandType, deserialize, serialize } from '../serialization/instruction_serialization.js';
7
7
 
8
8
  type InstructionConstructor = {
9
9
  new (...args: any[]): Instruction;
@@ -1,5 +1,5 @@
1
1
  import type { AvmContext } from '../avm_context.js';
2
- import { GasCost, GasCostConstants, getGasCostMultiplierFromTypeTag, makeGasCost } from '../avm_gas_cost.js';
2
+ import { type GasCost, GasCostConstants, getGasCostMultiplierFromTypeTag, makeGasCost } from '../avm_gas_cost.js';
3
3
  import { Field, TaggedMemory, TypeTag } from '../avm_memory_types.js';
4
4
  import { InstructionExecutionError } from '../errors.js';
5
5
  import { BufferCursor } from '../serialization/buffer_cursor.js';
@@ -3,19 +3,19 @@ import { UnencryptedFunctionL2Logs } from '@aztec/circuit-types';
3
3
  import {
4
4
  ContractStorageRead,
5
5
  ContractStorageUpdateRequest,
6
- GlobalVariables,
6
+ type GlobalVariables,
7
7
  L2ToL1Message,
8
- ReadRequest,
8
+ type ReadRequest,
9
9
  SideEffect,
10
- SideEffectLinkedToNoteHash,
10
+ type SideEffectLinkedToNoteHash,
11
11
  } from '@aztec/circuits.js';
12
12
  import { Fr } from '@aztec/foundation/fields';
13
13
 
14
14
  import { createSimulationError } from '../common/errors.js';
15
- import { PublicExecution, PublicExecutionResult } from '../public/execution.js';
15
+ import { type PublicExecution, type PublicExecutionResult } from '../public/execution.js';
16
16
  import { AvmExecutionEnvironment } from './avm_execution_environment.js';
17
- import { AvmContractCallResults } from './avm_message_call_result.js';
18
- import { JournalData } from './journal/journal.js';
17
+ import { type AvmContractCallResults } from './avm_message_call_result.js';
18
+ import { type JournalData } from './journal/journal.js';
19
19
 
20
20
  /** Temporary Method
21
21
  *
@@ -1,37 +1,37 @@
1
1
  import {
2
- AuthWitness,
3
- AztecNode,
2
+ type AuthWitness,
3
+ type AztecNode,
4
4
  EncryptedFunctionL2Logs,
5
5
  EncryptedL2Log,
6
6
  L1NotePayload,
7
7
  Note,
8
- NoteStatus,
8
+ type NoteStatus,
9
9
  TaggedNote,
10
10
  UnencryptedFunctionL2Logs,
11
- UnencryptedL2Log,
11
+ type UnencryptedL2Log,
12
12
  } from '@aztec/circuit-types';
13
13
  import {
14
14
  CallContext,
15
15
  FunctionData,
16
16
  FunctionSelector,
17
- Header,
17
+ type Header,
18
18
  NoteHashReadRequestMembershipWitness,
19
19
  PublicCallRequest,
20
- SideEffect,
20
+ type SideEffect,
21
21
  TxContext,
22
22
  } from '@aztec/circuits.js';
23
- import { Grumpkin } from '@aztec/circuits.js/barretenberg';
23
+ import { type Grumpkin } from '@aztec/circuits.js/barretenberg';
24
24
  import { computePublicDataTreeLeafSlot, computeUniqueCommitment, siloNoteHash } from '@aztec/circuits.js/hash';
25
- import { FunctionAbi, FunctionArtifact, countArgumentsSize } from '@aztec/foundation/abi';
26
- import { AztecAddress } from '@aztec/foundation/aztec-address';
27
- import { Fr, Point } from '@aztec/foundation/fields';
25
+ import { type FunctionAbi, type FunctionArtifact, countArgumentsSize } from '@aztec/foundation/abi';
26
+ import { type AztecAddress } from '@aztec/foundation/aztec-address';
27
+ import { Fr, type Point } from '@aztec/foundation/fields';
28
28
  import { createDebugLogger } from '@aztec/foundation/log';
29
29
 
30
- import { NoteData, toACVMWitness } from '../acvm/index.js';
31
- import { PackedArgsCache } from '../common/packed_args_cache.js';
32
- import { DBOracle } from './db_oracle.js';
33
- import { ExecutionNoteCache } from './execution_note_cache.js';
34
- import { ExecutionResult, NoteAndSlot } from './execution_result.js';
30
+ import { type NoteData, toACVMWitness } from '../acvm/index.js';
31
+ import { type PackedArgsCache } from '../common/packed_args_cache.js';
32
+ import { type DBOracle } from './db_oracle.js';
33
+ import { type ExecutionNoteCache } from './execution_note_cache.js';
34
+ import { type ExecutionResult, type NoteAndSlot } from './execution_result.js';
35
35
  import { pickNotes } from './pick_notes.js';
36
36
  import { executePrivateFunction } from './private_execution.js';
37
37
  import { ViewDataOracle } from './view_data_oracle.js';
@@ -1,13 +1,19 @@
1
- import { L2Block, MerkleTreeId, NoteStatus, NullifierMembershipWitness, PublicDataWitness } from '@aztec/circuit-types';
2
- import { CompleteAddress, Header } from '@aztec/circuits.js';
3
- import { FunctionArtifactWithDebugMetadata, FunctionSelector } from '@aztec/foundation/abi';
4
- import { AztecAddress } from '@aztec/foundation/aztec-address';
5
- import { EthAddress } from '@aztec/foundation/eth-address';
6
- import { Fr } from '@aztec/foundation/fields';
7
- import { ContractInstance } from '@aztec/types/contracts';
8
-
9
- import { KeyPair, NoteData } from '../acvm/index.js';
10
- import { CommitmentsDB } from '../public/db.js';
1
+ import {
2
+ type L2Block,
3
+ type MerkleTreeId,
4
+ type NoteStatus,
5
+ type NullifierMembershipWitness,
6
+ type PublicDataWitness,
7
+ } from '@aztec/circuit-types';
8
+ import { type CompleteAddress, type Header } from '@aztec/circuits.js';
9
+ import { type FunctionArtifactWithDebugMetadata, type FunctionSelector } from '@aztec/foundation/abi';
10
+ import { type AztecAddress } from '@aztec/foundation/aztec-address';
11
+ import { type EthAddress } from '@aztec/foundation/eth-address';
12
+ import { type Fr } from '@aztec/foundation/fields';
13
+ import { type ContractInstance } from '@aztec/types/contracts';
14
+
15
+ import { type KeyPair, type NoteData } from '../acvm/index.js';
16
+ import { type CommitmentsDB } from '../public/db.js';
11
17
 
12
18
  /**
13
19
  * Error thrown when a contract is not found in the database.
@@ -1,8 +1,8 @@
1
1
  import { siloNullifier } from '@aztec/circuits.js/hash';
2
- import { AztecAddress } from '@aztec/foundation/aztec-address';
2
+ import { type AztecAddress } from '@aztec/foundation/aztec-address';
3
3
  import { Fr } from '@aztec/foundation/fields';
4
4
 
5
- import { NoteData } from '../acvm/index.js';
5
+ import { type NoteData } from '../acvm/index.js';
6
6
 
7
7
  /**
8
8
  * Data that's accessible by all the function calls in an execution.
@@ -1,9 +1,13 @@
1
- import { EncryptedFunctionL2Logs, Note, UnencryptedFunctionL2Logs } from '@aztec/circuit-types';
2
- import { NoteHashReadRequestMembershipWitness, PrivateCallStackItem, PublicCallRequest } from '@aztec/circuits.js';
3
- import { DecodedReturn } from '@aztec/foundation/abi';
4
- import { Fr } from '@aztec/foundation/fields';
1
+ import { type EncryptedFunctionL2Logs, type Note, type UnencryptedFunctionL2Logs } from '@aztec/circuit-types';
2
+ import {
3
+ type NoteHashReadRequestMembershipWitness,
4
+ type PrivateCallStackItem,
5
+ type PublicCallRequest,
6
+ } from '@aztec/circuits.js';
7
+ import { type DecodedReturn } from '@aztec/foundation/abi';
8
+ import { type Fr } from '@aztec/foundation/fields';
5
9
 
6
- import { ACVMField } from '../acvm/index.js';
10
+ import { type ACVMField } from '../acvm/index.js';
7
11
 
8
12
  /**
9
13
  * The contents of a new note.
@@ -1,4 +1,4 @@
1
- import { Comparator, Note } from '@aztec/circuit-types';
1
+ import { Comparator, type Note } from '@aztec/circuit-types';
2
2
  import { Fr } from '@aztec/foundation/fields';
3
3
 
4
4
  export interface PropertySelector {
@@ -1,14 +1,14 @@
1
- import { FunctionData, PrivateCallStackItem, PrivateCircuitPublicInputs } from '@aztec/circuits.js';
2
- import { FunctionArtifactWithDebugMetadata, decodeReturnValues } from '@aztec/foundation/abi';
3
- import { AztecAddress } from '@aztec/foundation/aztec-address';
1
+ import { type FunctionData, PrivateCallStackItem, PrivateCircuitPublicInputs } from '@aztec/circuits.js';
2
+ import { type FunctionArtifactWithDebugMetadata, decodeReturnValues } from '@aztec/foundation/abi';
3
+ import { type AztecAddress } from '@aztec/foundation/aztec-address';
4
4
  import { Fr } from '@aztec/foundation/fields';
5
5
  import { createDebugLogger } from '@aztec/foundation/log';
6
6
 
7
7
  import { extractReturnWitness } from '../acvm/deserialize.js';
8
8
  import { Oracle, acvm, extractCallStack } from '../acvm/index.js';
9
9
  import { ExecutionError } from '../common/errors.js';
10
- import { ClientExecutionContext } from './client_execution_context.js';
11
- import { ExecutionResult } from './execution_result.js';
10
+ import { type ClientExecutionContext } from './client_execution_context.js';
11
+ import { type ExecutionResult } from './execution_result.js';
12
12
  import { AcirSimulator } from './simulator.js';
13
13
 
14
14
  /**
@@ -1,26 +1,26 @@
1
- import { AztecNode, FunctionCall, Note, TxExecutionRequest } from '@aztec/circuit-types';
1
+ import { type AztecNode, type FunctionCall, type Note, type TxExecutionRequest } from '@aztec/circuit-types';
2
2
  import { CallContext, FunctionData } from '@aztec/circuits.js';
3
3
  import { Grumpkin } from '@aztec/circuits.js/barretenberg';
4
4
  import {
5
- ArrayType,
6
- FunctionArtifactWithDebugMetadata,
5
+ type ArrayType,
6
+ type FunctionArtifactWithDebugMetadata,
7
7
  FunctionSelector,
8
8
  FunctionType,
9
9
  encodeArguments,
10
10
  } from '@aztec/foundation/abi';
11
11
  import { AztecAddress } from '@aztec/foundation/aztec-address';
12
- import { EthAddress } from '@aztec/foundation/eth-address';
12
+ import { type EthAddress } from '@aztec/foundation/eth-address';
13
13
  import { Fr } from '@aztec/foundation/fields';
14
- import { DebugLogger, createDebugLogger } from '@aztec/foundation/log';
14
+ import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log';
15
15
 
16
- import { WasmBlackBoxFunctionSolver, createBlackBoxSolver } from '@noir-lang/acvm_js';
16
+ import { type WasmBlackBoxFunctionSolver, createBlackBoxSolver } from '@noir-lang/acvm_js';
17
17
 
18
18
  import { createSimulationError } from '../common/errors.js';
19
19
  import { PackedArgsCache } from '../common/packed_args_cache.js';
20
20
  import { ClientExecutionContext } from './client_execution_context.js';
21
- import { DBOracle } from './db_oracle.js';
21
+ import { type DBOracle } from './db_oracle.js';
22
22
  import { ExecutionNoteCache } from './execution_note_cache.js';
23
- import { ExecutionResult } from './execution_result.js';
23
+ import { type ExecutionResult } from './execution_result.js';
24
24
  import { executePrivateFunction } from './private_execution.js';
25
25
  import { executeUnconstrainedFunction } from './unconstrained_execution.js';
26
26
  import { ViewDataOracle } from './view_data_oracle.js';
@@ -1,14 +1,14 @@
1
- import { FunctionData } from '@aztec/circuits.js';
2
- import { DecodedReturn, FunctionArtifactWithDebugMetadata, decodeReturnValues } from '@aztec/foundation/abi';
3
- import { AztecAddress } from '@aztec/foundation/aztec-address';
4
- import { Fr } from '@aztec/foundation/fields';
1
+ import { type FunctionData } from '@aztec/circuits.js';
2
+ import { type DecodedReturn, type FunctionArtifactWithDebugMetadata, decodeReturnValues } from '@aztec/foundation/abi';
3
+ import { type AztecAddress } from '@aztec/foundation/aztec-address';
4
+ import { type Fr } from '@aztec/foundation/fields';
5
5
  import { createDebugLogger } from '@aztec/foundation/log';
6
6
 
7
7
  import { extractReturnWitness } from '../acvm/deserialize.js';
8
8
  import { Oracle, acvm, extractCallStack, toACVMWitness } from '../acvm/index.js';
9
9
  import { ExecutionError } from '../common/errors.js';
10
10
  import { AcirSimulator } from './simulator.js';
11
- import { ViewDataOracle } from './view_data_oracle.js';
11
+ import { type ViewDataOracle } from './view_data_oracle.js';
12
12
 
13
13
  // docs:start:execute_unconstrained_function
14
14
  /**
@@ -1,21 +1,21 @@
1
1
  import {
2
- AuthWitness,
3
- AztecNode,
4
- CompleteAddress,
2
+ type AuthWitness,
3
+ type AztecNode,
4
+ type CompleteAddress,
5
5
  MerkleTreeId,
6
- NoteStatus,
7
- NullifierMembershipWitness,
8
- PublicDataWitness,
6
+ type NoteStatus,
7
+ type NullifierMembershipWitness,
8
+ type PublicDataWitness,
9
9
  } from '@aztec/circuit-types';
10
- import { Header } from '@aztec/circuits.js';
10
+ import { type Header } from '@aztec/circuits.js';
11
11
  import { siloNullifier } from '@aztec/circuits.js/hash';
12
- import { AztecAddress } from '@aztec/foundation/aztec-address';
12
+ import { type AztecAddress } from '@aztec/foundation/aztec-address';
13
13
  import { Fr } from '@aztec/foundation/fields';
14
14
  import { createDebugLogger } from '@aztec/foundation/log';
15
- import { ContractInstance } from '@aztec/types/contracts';
15
+ import { type ContractInstance } from '@aztec/types/contracts';
16
16
 
17
- import { NoteData, TypedOracle } from '../acvm/index.js';
18
- import { DBOracle } from './db_oracle.js';
17
+ import { type NoteData, TypedOracle } from '../acvm/index.js';
18
+ import { type DBOracle } from './db_oracle.js';
19
19
  import { pickNotes } from './pick_notes.js';
20
20
 
21
21
  /**
@@ -1,4 +1,4 @@
1
- import { FailingFunction, NoirCallStack, SimulationError } from '@aztec/circuit-types';
1
+ import { type FailingFunction, type NoirCallStack, SimulationError } from '@aztec/circuit-types';
2
2
 
3
3
  /**
4
4
  * An error that occurred during the execution of a function.
package/src/public/db.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { NullifierMembershipWitness } from '@aztec/circuit-types';
2
- import { EthAddress, FunctionSelector, L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/circuits.js';
3
- import { AztecAddress } from '@aztec/foundation/aztec-address';
4
- import { Fr } from '@aztec/foundation/fields';
5
- import { ContractInstanceWithAddress } from '@aztec/types/contracts';
1
+ import { type NullifierMembershipWitness } from '@aztec/circuit-types';
2
+ import { type EthAddress, type FunctionSelector, type L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/circuits.js';
3
+ import { type AztecAddress } from '@aztec/foundation/aztec-address';
4
+ import { type Fr } from '@aztec/foundation/fields';
5
+ import { type ContractInstanceWithAddress } from '@aztec/types/contracts';
6
6
 
7
- import { MessageLoadOracleInputs } from '../acvm/index.js';
7
+ import { type MessageLoadOracleInputs } from '../acvm/index.js';
8
8
 
9
9
  /**
10
10
  * Database interface for providing access to public state.