From 5f1ff04f0756855361eb4df87d0fc3a3f2516484 Mon Sep 17 00:00:00 2001 From: Charlie Lye Date: Sat, 30 Mar 2024 10:38:26 +0000 Subject: [PATCH] chore: explicit type imports --- .../accounts/src/defaults/account_contract.ts | 6 +- .../src/defaults/account_interface.ts | 8 +- .../accounts/src/ecdsa/account_contract.ts | 4 +- yarn-project/accounts/src/ecdsa/artifact.ts | 2 +- yarn-project/accounts/src/ecdsa/index.ts | 4 +- .../accounts/src/schnorr/account_contract.ts | 6 +- yarn-project/accounts/src/schnorr/artifact.ts | 2 +- yarn-project/accounts/src/schnorr/index.ts | 4 +- .../src/single_key/account_contract.ts | 8 +- .../accounts/src/single_key/artifact.ts | 2 +- yarn-project/accounts/src/single_key/index.ts | 4 +- .../accounts/src/testing/configuration.ts | 2 +- .../accounts/src/testing/create_account.ts | 2 +- .../archiver/src/archiver/archiver.test.ts | 14 +- .../archiver/src/archiver/archiver.ts | 34 ++-- .../archiver/src/archiver/archiver_store.ts | 16 +- .../src/archiver/archiver_store_test_suite.ts | 10 +- yarn-project/archiver/src/archiver/config.ts | 2 +- .../archiver/src/archiver/data_retrieval.ts | 2 +- .../archiver/src/archiver/eth_log_handlers.ts | 2 +- yarn-project/archiver/src/archiver/index.ts | 2 +- .../kv_archiver_store/block_body_store.ts | 2 +- .../archiver/kv_archiver_store/block_store.ts | 4 +- .../kv_archiver_store/contract_class_store.ts | 8 +- .../contract_instance_store.ts | 4 +- .../kv_archiver_store/kv_archiver_store.ts | 20 +- .../archiver/kv_archiver_store/log_store.ts | 8 +- .../kv_archiver_store/message_store.ts | 4 +- .../memory_archiver_store.test.ts | 2 +- .../memory_archiver_store.ts | 18 +- .../archiver/src/rpc/archiver_client.ts | 2 +- yarn-project/aztec-faucet/src/bin/index.ts | 2 +- .../aztec-node/src/aztec-node/config.ts | 6 +- .../src/aztec-node/http_rpc_server.ts | 2 +- .../aztec-node/src/aztec-node/server.test.ts | 2 +- .../aztec-node/src/aztec-node/server.ts | 42 +++-- .../src/aztec-node/simulator-factory.ts | 6 +- yarn-project/aztec-node/src/bin/index.ts | 2 +- yarn-project/aztec.js/src/account/contract.ts | 6 +- yarn-project/aztec.js/src/account/index.ts | 4 +- .../aztec.js/src/account/interface.ts | 4 +- yarn-project/aztec.js/src/account/wallet.ts | 4 +- .../account_manager/deploy_account_sent_tx.ts | 6 +- .../aztec.js/src/account_manager/index.ts | 14 +- yarn-project/aztec.js/src/api/abi.ts | 4 +- yarn-project/aztec.js/src/api/account.ts | 8 +- yarn-project/aztec.js/src/api/ethereum.ts | 4 +- .../aztec.js/src/api/interfaces/pxe.ts | 2 +- yarn-project/aztec.js/src/api/wallet.ts | 8 +- .../src/contract/base_contract_interaction.ts | 4 +- .../aztec.js/src/contract/batch_call.ts | 6 +- yarn-project/aztec.js/src/contract/checker.ts | 2 +- .../aztec.js/src/contract/contract.test.ts | 12 +- .../aztec.js/src/contract/contract.ts | 6 +- .../aztec.js/src/contract/contract_base.ts | 6 +- .../contract/contract_function_interaction.ts | 10 +- .../aztec.js/src/contract/deploy_method.ts | 10 +- .../aztec.js/src/contract/deploy_sent_tx.ts | 10 +- .../aztec.js/src/contract/sent_tx.test.ts | 4 +- yarn-project/aztec.js/src/contract/sent_tx.ts | 11 +- .../aztec.js/src/contract/unsafe_contract.ts | 6 +- .../src/deployment/broadcast_function.ts | 4 +- .../src/deployment/contract_deployer.ts | 6 +- .../src/deployment/deploy_instance.ts | 4 +- .../src/deployment/protocol_contracts.ts | 2 +- .../aztec.js/src/deployment/register_class.ts | 4 +- .../src/entrypoint/default_entrypoint.ts | 4 +- .../aztec.js/src/entrypoint/entrypoint.ts | 4 +- .../aztec.js/src/fee/fee_payment_method.ts | 2 +- .../src/fee/native_fee_payment_method.ts | 6 +- .../src/fee/private_fee_payment_method.ts | 6 +- .../src/fee/public_fee_payment_method.ts | 4 +- yarn-project/aztec.js/src/index.ts | 48 ++--- .../aztec.js/src/rpc_clients/pxe_client.ts | 2 +- yarn-project/aztec.js/src/utils/account.ts | 4 +- yarn-project/aztec.js/src/utils/authwit.ts | 2 +- .../aztec.js/src/utils/cheat_codes.ts | 2 +- .../aztec.js/src/utils/l1_contracts.ts | 2 +- yarn-project/aztec.js/src/utils/pub_key.ts | 2 +- yarn-project/aztec.js/src/utils/pxe.ts | 4 +- .../aztec.js/src/wallet/account_wallet.ts | 8 +- .../wallet/account_wallet_with_private_key.ts | 8 +- .../aztec.js/src/wallet/base_wallet.ts | 24 +-- .../aztec.js/src/wallet/create_recipient.ts | 2 +- yarn-project/aztec.js/src/wallet/index.ts | 4 +- .../aztec.js/src/wallet/signerless_wallet.ts | 4 +- yarn-project/aztec/src/cli/cli.ts | 4 +- .../aztec/src/cli/cmds/start_archiver.ts | 4 +- yarn-project/aztec/src/cli/cmds/start_node.ts | 12 +- .../aztec/src/cli/cmds/start_p2p_bootstrap.ts | 6 +- yarn-project/aztec/src/cli/cmds/start_pxe.ts | 6 +- yarn-project/aztec/src/cli/util.ts | 12 +- yarn-project/aztec/src/examples/util.ts | 2 +- yarn-project/aztec/src/sandbox.ts | 22 ++- .../src/aztec_node/rpc/aztec_node_client.ts | 2 +- yarn-project/circuit-types/src/index.ts | 2 +- .../src/interfaces/aztec-node.ts | 16 +- .../src/interfaces/block-prover.ts | 2 +- .../src/interfaces/prover-client.ts | 2 +- .../circuit-types/src/interfaces/pxe.ts | 14 +- .../circuit-types/src/keys/key_pair.ts | 2 +- .../circuit-types/src/keys/key_store.ts | 2 +- .../l2_block_downloader.ts | 2 +- .../logs/l1_note_payload/encrypt_buffer.ts | 2 +- .../logs/l1_note_payload/l1_note_payload.ts | 2 +- .../src/logs/l1_note_payload/tagged_note.ts | 2 +- .../circuit-types/src/logs/l2_logs_source.ts | 6 +- yarn-project/circuit-types/src/mocks.ts | 6 +- .../circuit-types/src/packed_arguments.ts | 2 +- .../src/sibling_path/sibling_path.ts | 4 +- .../circuit-types/src/simulation_error.ts | 2 +- .../circuit-types/src/stats/benchmarks.ts | 2 +- .../circuit-types/src/stats/metrics.ts | 2 +- .../circuit-types/src/tx/processed_tx.ts | 2 +- yarn-project/circuit-types/src/tx/tx.ts | 6 +- yarn-project/circuit-types/src/tx_effect.ts | 2 +- .../circuit-types/src/tx_execution_request.ts | 2 +- .../barretenberg/crypto/ecdsa/signature.ts | 2 +- .../src/barretenberg/crypto/schnorr/index.ts | 4 +- .../barretenberg/crypto/schnorr/signature.ts | 2 +- .../circuits.js/src/contract/artifact_hash.ts | 2 +- .../src/contract/contract_address.test.ts | 2 +- .../src/contract/contract_address.ts | 6 +- .../src/contract/contract_class.ts | 6 +- .../src/contract/contract_class_id.test.ts | 2 +- .../src/contract/contract_class_id.ts | 2 +- .../src/contract/contract_instance.ts | 6 +- .../events/contract_class_registered_event.ts | 2 +- .../contract_instance_deployed_event.ts | 2 +- .../private_function_broadcasted_event.ts | 4 +- ...trained_function_broadcasted_event.test.ts | 2 +- ...nconstrained_function_broadcasted_event.ts | 4 +- .../src/contract/private_function.test.ts | 2 +- .../src/contract/private_function.ts | 2 +- .../private_function_membership_proof.test.ts | 6 +- .../private_function_membership_proof.ts | 8 +- .../src/contract/public_bytecode.test.ts | 2 +- .../src/contract/public_bytecode.ts | 2 +- ...strained_function_membership_proof.test.ts | 6 +- ...unconstrained_function_membership_proof.ts | 8 +- .../circuits.js/src/hints/build_hints.test.ts | 4 +- .../circuits.js/src/hints/build_hints.ts | 4 +- .../circuits.js/src/hints/utils.test.ts | 4 +- yarn-project/circuits.js/src/hints/utils.ts | 2 +- yarn-project/circuits.js/src/keys/index.ts | 2 +- .../src/structs/aggregation_object.ts | 2 +- .../circuits.js/src/structs/call_context.ts | 2 +- .../circuits.js/src/structs/call_request.ts | 2 +- .../src/structs/complete_address.ts | 6 +- .../contract_storage_update_request.ts | 2 +- .../circuits.js/src/structs/function_data.ts | 4 +- .../src/structs/global_variables.ts | 2 +- .../kernel/combined_accumulated_data.ts | 2 +- .../src/structs/kernel/private_call_data.ts | 4 +- .../kernel/private_kernel_inner_data.ts | 4 +- ...vate_kernel_tail_circuit_private_inputs.ts | 6 +- .../kernel/private_kernel_tail_data.ts | 4 +- .../src/structs/kernel/public_call_data.ts | 2 +- .../src/structs/kernel/public_kernel_data.ts | 4 +- ...blic_kernel_tail_circuit_private_inputs.ts | 4 +- .../src/structs/kernel/rollup_kernel_data.ts | 4 +- .../src/structs/max_block_number.ts | 2 +- .../src/structs/membership_witness.ts | 2 +- .../non_existent_read_request_hints.ts | 6 +- ...te_hash_read_request_membership_witness.ts | 2 +- .../nullifier_key_validation_request.ts | 2 +- .../src/structs/parity/base_parity_inputs.ts | 2 +- .../structs/parity/parity_public_inputs.ts | 2 +- .../src/structs/parity/root_parity_input.ts | 2 +- .../src/structs/parity/root_parity_inputs.ts | 2 +- .../src/structs/private_call_stack_item.ts | 2 +- .../structs/private_circuit_public_inputs.ts | 10 +- .../src/structs/public_call_request.ts | 2 +- .../src/structs/public_call_stack_item.ts | 2 +- .../structs/public_circuit_public_inputs.ts | 10 +- .../src/structs/read_request_hints.ts | 4 +- .../rollup/append_only_tree_snapshot.ts | 2 +- .../src/structs/rollup/base_rollup.ts | 6 +- .../structs/rollup/nullifier_leaf/index.ts | 2 +- .../structs/rollup/previous_rollup_data.ts | 2 +- .../structs/rollup/public_data_leaf/index.ts | 2 +- .../src/structs/rollup/root_rollup.ts | 4 +- .../src/structs/rollup/state_diff_hints.ts | 4 +- .../circuits.js/src/structs/shared.ts | 2 +- .../circuits.js/src/structs/tx_context.ts | 2 +- .../circuits.js/src/structs/tx_request.ts | 2 +- .../src/structs/validation_requests.ts | 2 +- .../circuits.js/src/tests/factories.ts | 12 +- .../circuits.js/src/tests/fixtures.ts | 4 +- .../src/types/contract_function_dao.ts | 2 +- yarn-project/cli/src/client.test.ts | 6 +- yarn-project/cli/src/client.ts | 4 +- yarn-project/cli/src/cmds/add_contract.ts | 4 +- yarn-project/cli/src/cmds/add_note.ts | 2 +- yarn-project/cli/src/cmds/block_number.ts | 2 +- yarn-project/cli/src/cmds/call.ts | 2 +- yarn-project/cli/src/cmds/check_deploy.ts | 2 +- yarn-project/cli/src/cmds/compute_selector.ts | 2 +- yarn-project/cli/src/cmds/create_account.ts | 2 +- yarn-project/cli/src/cmds/deploy.ts | 2 +- .../cli/src/cmds/deploy_l1_contracts.ts | 2 +- .../cli/src/cmds/example_contracts.ts | 2 +- .../cli/src/cmds/generate_p2p_private_key.ts | 2 +- .../cli/src/cmds/generate_private_key.ts | 2 +- yarn-project/cli/src/cmds/get_account.ts | 2 +- yarn-project/cli/src/cmds/get_accounts.ts | 2 +- .../cli/src/cmds/get_contract_data.ts | 2 +- yarn-project/cli/src/cmds/get_logs.ts | 4 +- yarn-project/cli/src/cmds/get_node_info.ts | 2 +- yarn-project/cli/src/cmds/get_recipient.ts | 2 +- yarn-project/cli/src/cmds/get_recipients.ts | 2 +- yarn-project/cli/src/cmds/get_tx_receipt.ts | 2 +- yarn-project/cli/src/cmds/inspect_contract.ts | 4 +- .../cli/src/cmds/parse_parameter_struct.ts | 4 +- yarn-project/cli/src/cmds/register_account.ts | 2 +- .../cli/src/cmds/register_recipient.ts | 2 +- yarn-project/cli/src/cmds/send.ts | 2 +- yarn-project/cli/src/encoding.ts | 2 +- yarn-project/cli/src/index.ts | 2 +- yarn-project/cli/src/test/mocks.ts | 2 +- yarn-project/cli/src/test/utils.test.ts | 4 +- yarn-project/cli/src/update/noir.ts | 4 +- yarn-project/cli/src/update/npm.ts | 4 +- yarn-project/cli/src/update/update.ts | 4 +- yarn-project/cli/src/utils.ts | 4 +- .../benchmarks/bench_process_history.test.ts | 6 +- .../benchmarks/bench_publish_rollup.test.ts | 2 +- .../src/benchmarks/bench_tx_size_fees.test.ts | 4 +- .../end-to-end/src/benchmarks/utils.ts | 10 +- .../end-to-end/src/e2e_2_pxes.test.ts | 8 +- .../src/e2e_account_contracts.test.ts | 8 +- .../end-to-end/src/e2e_avm_simulator.test.ts | 2 +- .../src/e2e_blacklist_token_contract.test.ts | 4 +- .../end-to-end/src/e2e_block_building.test.ts | 8 +- .../end-to-end/src/e2e_card_game.test.ts | 6 +- .../end-to-end/src/e2e_cheat_codes.test.ts | 15 +- yarn-project/end-to-end/src/e2e_cli.test.ts | 2 +- .../src/e2e_counter_contract.test.ts | 2 +- .../src/e2e_cross_chain_messaging.test.ts | 4 +- .../src/e2e_crowdfunding_and_claim.test.ts | 4 +- .../src/e2e_dapp_subscription.test.ts | 6 +- .../end-to-end/src/e2e_delegate_calls.test.ts | 2 +- .../src/e2e_deploy_contract.test.ts | 16 +- .../src/e2e_escrow_contract.test.ts | 8 +- yarn-project/end-to-end/src/e2e_fees.test.ts | 14 +- .../src/e2e_inclusion_proofs_contract.test.ts | 2 +- .../src/e2e_lending_contract.test.ts | 2 +- .../src/e2e_max_block_number.test.ts | 2 +- .../e2e_multiple_accounts_1_enc_key.test.ts | 8 +- .../src/e2e_nested_contract.test.ts | 2 +- .../src/e2e_non_contract_account.test.ts | 11 +- .../end-to-end/src/e2e_note_getter.test.ts | 2 +- .../end-to-end/src/e2e_ordering.test.ts | 2 +- .../end-to-end/src/e2e_outbox.test.ts | 4 +- .../end-to-end/src/e2e_p2p_network.test.ts | 6 +- .../e2e_pending_note_hashes_contract.test.ts | 2 +- .../end-to-end/src/e2e_persistence.test.ts | 8 +- .../src/e2e_private_voting_contract.test.ts | 2 +- .../e2e_public_cross_chain_messaging.test.ts | 10 +- .../e2e_public_to_private_messaging.test.ts | 2 +- .../src/e2e_sandbox_example.test.ts | 2 +- .../end-to-end/src/e2e_slow_tree.test.ts | 2 +- .../end-to-end/src/e2e_state_vars.test.ts | 2 +- .../end-to-end/src/e2e_static_calls.test.ts | 2 +- .../end-to-end/src/e2e_token_contract.test.ts | 2 +- yarn-project/end-to-end/src/fixtures/utils.ts | 28 +-- .../src/guides/dapp_testing.test.ts | 2 +- .../writing_an_account_contract.test.ts | 4 +- .../src/integration_l1_publisher.test.ts | 28 +-- yarn-project/end-to-end/src/shared/cli.ts | 9 +- .../src/shared/cross_chain_test_harness.ts | 22 +-- .../src/shared/gas_portal_test_harness.ts | 20 +- yarn-project/end-to-end/src/shared/index.ts | 2 +- .../end-to-end/src/shared/uniswap_l1_l2.ts | 18 +- .../src/simulators/token_simulator.ts | 2 +- .../src/uniswap_trade_on_l1_from_l2.test.ts | 2 +- .../entrypoints/src/account_entrypoint.ts | 8 +- .../entrypoints/src/dapp_entrypoint.ts | 8 +- .../entrypoints/src/entrypoint_payload.ts | 4 +- .../entrypoints/src/multi_call_entrypoint.ts | 6 +- yarn-project/ethereum/src/constants.ts | 2 +- .../ethereum/src/deploy_l1_contracts.ts | 18 +- yarn-project/ethereum/src/ethereum_chain.ts | 2 +- yarn-project/ethereum/src/index.ts | 2 +- yarn-project/ethereum/src/testnet.ts | 4 +- yarn-project/foundation/src/abi/abi.test.ts | 8 +- .../foundation/src/abi/decoder.test.ts | 2 +- yarn-project/foundation/src/abi/decoder.ts | 2 +- .../foundation/src/abi/encoder.test.ts | 2 +- yarn-project/foundation/src/abi/encoder.ts | 2 +- .../foundation/src/abi/function_selector.ts | 2 +- yarn-project/foundation/src/array/array.ts | 2 +- .../foundation/src/collection/array.ts | 2 +- .../src/crypto/pedersen/pedersen.wasm.ts | 2 +- .../foundation/src/crypto/sha256/index.ts | 2 +- .../foundation/src/fields/coordinate.ts | 2 +- .../src/json-rpc/client/json_rpc_client.ts | 6 +- yarn-project/foundation/src/json-rpc/index.ts | 6 +- .../src/json-rpc/server/json_proxy.ts | 2 +- .../src/json-rpc/server/json_rpc_server.ts | 4 +- yarn-project/foundation/src/log/console.ts | 2 +- yarn-project/foundation/src/log/debug.ts | 2 +- yarn-project/foundation/src/log/logger.ts | 2 +- yarn-project/foundation/src/mutex/index.ts | 2 +- .../foundation/src/mutex/mutex.test.ts | 2 +- .../foundation/src/serialize/buffer_reader.ts | 2 +- .../foundation/src/serialize/field_reader.ts | 2 +- .../foundation/src/serialize/free_funcs.ts | 2 +- .../transport/browser/message_port_socket.ts | 2 +- .../browser/shared_worker_connector.ts | 2 +- .../browser/shared_worker_listener.ts | 2 +- .../src/transport/browser/worker_connector.ts | 2 +- .../src/transport/browser/worker_listener.ts | 2 +- .../dispatch/create_dispatch_proxy.ts | 4 +- .../src/transport/interface/connector.ts | 2 +- .../src/transport/interface/listener.ts | 2 +- .../src/transport/node/node_connector.ts | 2 +- .../transport/node/node_connector_socket.ts | 4 +- .../src/transport/node/node_listener.ts | 2 +- .../transport/node/node_listener_socket.ts | 4 +- .../src/transport/transport_client.ts | 6 +- .../src/transport/transport_server.ts | 6 +- yarn-project/foundation/src/wasm/index.ts | 2 +- .../foundation/src/wasm/wasm_module.ts | 2 +- .../src/worker/browser/start_web_module.ts | 2 +- .../src/worker/browser/web_data_store.ts | 4 +- .../src/worker/browser/web_worker.ts | 4 +- yarn-project/foundation/src/worker/index.ts | 2 +- .../src/worker/node/node_data_store.ts | 4 +- .../foundation/src/worker/node/node_worker.ts | 4 +- .../src/worker/node/start_node_module.ts | 2 +- .../foundation/src/worker/wasm_worker.ts | 2 +- .../foundation/src/worker/worker_pool.ts | 2 +- yarn-project/key-store/src/key_pair.ts | 4 +- yarn-project/key-store/src/test_key_store.ts | 6 +- .../kv-store/src/interfaces/counter.ts | 2 +- yarn-project/kv-store/src/interfaces/index.ts | 2 +- yarn-project/kv-store/src/interfaces/map.ts | 2 +- yarn-project/kv-store/src/interfaces/store.ts | 10 +- yarn-project/kv-store/src/lmdb/array.ts | 4 +- yarn-project/kv-store/src/lmdb/counter.ts | 6 +- yarn-project/kv-store/src/lmdb/map.ts | 6 +- yarn-project/kv-store/src/lmdb/singleton.ts | 4 +- yarn-project/kv-store/src/lmdb/store.ts | 12 +- yarn-project/kv-store/src/utils.ts | 4 +- .../merkle-tree/src/hasher_with_stats.ts | 2 +- .../src/interfaces/append_only_tree.ts | 6 +- .../src/interfaces/indexed_tree.ts | 12 +- .../merkle-tree/src/interfaces/merkle_tree.ts | 2 +- .../src/interfaces/update_only_tree.ts | 6 +- yarn-project/merkle-tree/src/load_tree.ts | 6 +- yarn-project/merkle-tree/src/new_tree.ts | 6 +- yarn-project/merkle-tree/src/pedersen.ts | 2 +- yarn-project/merkle-tree/src/sha_256.ts | 2 +- .../snapshots/append_only_snapshot.test.ts | 4 +- .../src/snapshots/append_only_snapshot.ts | 10 +- .../src/snapshots/base_full_snapshot.ts | 6 +- .../src/snapshots/full_snapshot.test.ts | 4 +- .../src/snapshots/full_snapshot.ts | 6 +- .../snapshots/indexed_tree_snapshot.test.ts | 4 +- .../src/snapshots/indexed_tree_snapshot.ts | 8 +- .../src/snapshots/snapshot_builder.ts | 4 +- .../snapshots/snapshot_builder_test_suite.ts | 4 +- .../src/sparse_tree/sparse_tree.test.ts | 6 +- .../src/sparse_tree/sparse_tree.ts | 6 +- .../standard_indexed_tree.ts | 21 ++- .../test/standard_indexed_tree.test.ts | 8 +- .../src/standard_tree/standard_tree.test.ts | 6 +- .../src/standard_tree/standard_tree.ts | 8 +- .../src/test/standard_based_test_suite.ts | 8 +- .../merkle-tree/src/test/test_suite.ts | 8 +- .../src/test/utils/append_leaves.ts | 4 +- yarn-project/merkle-tree/src/tree_base.ts | 10 +- .../add_noir_compiler_commander_actions.ts | 2 +- .../src/contract-interface-gen/noir.ts | 10 +- .../src/contract-interface-gen/typescript.ts | 28 +-- yarn-project/noir-compiler/src/utils.ts | 2 +- .../src/index.test.ts | 2 +- .../noir-protocol-circuits-types/src/index.ts | 33 ++-- .../src/noir_test_gen.test.ts | 2 +- .../src/scripts/generate_ts_from_abi.ts | 4 +- .../src/type_conversion.ts | 174 +++++++++--------- yarn-project/p2p/src/bootstrap/bootstrap.ts | 4 +- yarn-project/p2p/src/client/index.ts | 8 +- yarn-project/p2p/src/client/mocks.ts | 2 +- .../p2p/src/client/p2p_client.test.ts | 8 +- yarn-project/p2p/src/client/p2p_client.ts | 8 +- yarn-project/p2p/src/service/dummy_service.ts | 2 +- .../p2p/src/service/known_txs.test.ts | 2 +- yarn-project/p2p/src/service/known_txs.ts | 2 +- .../p2p/src/service/libp2p_service.ts | 14 +- .../p2p/src/tx_pool/aztec_kv_tx_pool.ts | 8 +- .../p2p/src/tx_pool/memory_tx_pool.ts | 4 +- .../p2p/src/tx_pool/tx_pool_test_suite.ts | 2 +- .../src/class-registerer/artifact.ts | 2 +- .../src/class-registerer/index.ts | 2 +- .../src/gas-token/artifact.ts | 2 +- .../protocol-contracts/src/gas-token/index.ts | 2 +- yarn-project/protocol-contracts/src/index.ts | 2 +- .../src/instance-deployer/artifact.ts | 2 +- .../src/instance-deployer/index.ts | 2 +- .../src/multi-call-entrypoint/artifact.ts | 2 +- .../src/multi-call-entrypoint/index.ts | 2 +- .../src/protocol_contract.ts | 4 +- .../prover-client/src/dummy-prover.ts | 8 +- .../orchestrator/block-building-helpers.ts | 14 +- .../src/orchestrator/orchestrator.test.ts | 12 +- .../src/orchestrator/orchestrator.ts | 20 +- .../src/orchestrator/proving-state.ts | 4 +- .../prover-client/src/prover/empty.ts | 2 +- .../prover-client/src/simulator/rollup.ts | 4 +- .../prover-client/src/tx-prover/tx-prover.ts | 12 +- .../pxe/src/contract_data_oracle/index.ts | 12 +- .../private_functions_tree.ts | 4 +- .../contracts/contract_artifact_db.ts | 2 +- .../contracts/contract_instance_db.ts | 2 +- .../pxe/src/database/deferred_note_dao.ts | 2 +- .../pxe/src/database/kv_pxe_database.ts | 16 +- yarn-project/pxe/src/database/note_dao.ts | 4 +- yarn-project/pxe/src/database/pxe_database.ts | 12 +- .../src/database/pxe_database_test_suite.ts | 4 +- yarn-project/pxe/src/index.ts | 2 +- yarn-project/pxe/src/kernel_oracle/index.ts | 6 +- .../pxe/src/kernel_prover/hints_builder.ts | 6 +- .../src/kernel_prover/kernel_prover.test.ts | 8 +- .../pxe/src/kernel_prover/kernel_prover.ts | 6 +- .../pxe/src/kernel_prover/proof_creator.ts | 2 +- .../src/kernel_prover/proving_data_oracle.ts | 2 +- .../src/note_processor/note_processor.test.ts | 12 +- .../pxe/src/note_processor/note_processor.ts | 10 +- .../src/note_processor/produce_note_dao.ts | 2 +- .../pxe/src/pxe_http/pxe_http_server.ts | 2 +- .../pxe/src/pxe_service/create_pxe_service.ts | 4 +- .../pxe/src/pxe_service/pxe_service.ts | 34 ++-- .../src/pxe_service/test/pxe_service.test.ts | 10 +- .../src/pxe_service/test/pxe_test_suite.ts | 2 +- yarn-project/pxe/src/simulator/index.ts | 4 +- .../pxe/src/simulator_oracle/index.ts | 12 +- .../pxe/src/synchronizer/synchronizer.test.ts | 6 +- .../pxe/src/synchronizer/synchronizer.ts | 17 +- yarn-project/scripts/add_verbatim_types.sh | 24 +++ .../scripts/src/benchmarks/aggregate.ts | 30 +-- .../src/client/sequencer-client.ts | 16 +- yarn-project/sequencer-client/src/config.ts | 10 +- .../src/global_variable_builder/config.ts | 2 +- .../src/global_variable_builder/index.ts | 8 +- .../global_variable_builder/viem-reader.ts | 10 +- .../sequencer-client/src/publisher/config.ts | 2 +- .../sequencer-client/src/publisher/index.ts | 4 +- .../src/publisher/l1-publisher.test.ts | 4 +- .../src/publisher/l1-publisher.ts | 6 +- .../src/publisher/viem-tx-sender.ts | 22 +-- .../src/sequencer/abstract_phase_manager.ts | 12 +- .../src/sequencer/app_logic_phase_manager.ts | 6 +- .../sequencer-client/src/sequencer/config.ts | 2 +- .../src/sequencer/hints_builder.ts | 4 +- .../src/sequencer/phase_manager_factory.ts | 6 +- .../src/sequencer/public_processor.test.ts | 12 +- .../src/sequencer/public_processor.ts | 14 +- .../src/sequencer/sequencer.test.ts | 20 +- .../src/sequencer/sequencer.ts | 14 +- .../src/sequencer/setup_phase_manager.test.ts | 6 +- .../src/sequencer/setup_phase_manager.ts | 6 +- .../src/sequencer/tail_phase_manager.ts | 6 +- .../src/sequencer/teardown_phase_manager.ts | 6 +- .../src/sequencer/tx_validator.test.ts | 6 +- .../src/sequencer/tx_validator.ts | 6 +- .../src/sequencer/tx_validator_factory.ts | 4 +- .../src/simulator/public_executor.ts | 15 +- .../src/simulator/public_kernel.ts | 6 +- .../simulator/world_state_public_db.test.ts | 6 +- yarn-project/simulator/src/acvm/acvm.ts | 14 +- yarn-project/simulator/src/acvm/acvm_types.ts | 2 +- .../simulator/src/acvm/deserialize.ts | 2 +- .../simulator/src/acvm/oracle/debug.ts | 4 +- .../simulator/src/acvm/oracle/oracle.ts | 2 +- .../simulator/src/acvm/oracle/typed_oracle.ts | 6 +- yarn-project/simulator/src/acvm/serialize.ts | 2 +- .../simulator/src/avm/avm_machine_state.ts | 2 +- .../simulator/src/avm/avm_memory_types.ts | 2 +- .../simulator/src/avm/avm_simulator.ts | 2 +- .../simulator/src/avm/fixtures/index.ts | 7 +- .../simulator/src/avm/journal/host_storage.ts | 2 +- .../simulator/src/avm/journal/journal.test.ts | 6 +- .../simulator/src/avm/journal/journal.ts | 2 +- .../src/avm/journal/nullifiers.test.ts | 4 +- .../src/avm/journal/public_storage.test.ts | 4 +- .../simulator/src/avm/journal/trace.test.ts | 2 +- .../simulator/src/avm/journal/trace.ts | 2 +- .../src/avm/opcodes/accrued_substate.test.ts | 2 +- .../simulator/src/avm/opcodes/arithmetic.ts | 2 +- .../src/avm/opcodes/external_calls.test.ts | 2 +- .../simulator/src/avm/opcodes/instruction.ts | 2 +- .../simulator/src/avm/opcodes/memory.ts | 2 +- .../simulator/src/avm/opcodes/storage.test.ts | 2 +- .../bytecode_serialization.test.ts | 2 +- .../src/avm/temporary_executor_migration.ts | 4 +- .../src/client/client_execution_context.ts | 10 +- .../simulator/src/client/db_oracle.ts | 8 +- .../src/client/execution_note_cache.ts | 2 +- .../src/client/execution_result.test.ts | 2 +- .../simulator/src/client/execution_result.ts | 4 +- .../src/client/private_execution.test.ts | 16 +- .../simulator/src/client/private_execution.ts | 4 +- .../simulator/src/client/simulator.test.ts | 12 +- .../simulator/src/client/simulator.ts | 12 +- .../client/unconstrained_execution.test.ts | 4 +- .../src/client/unconstrained_execution.ts | 2 +- .../simulator/src/client/view_data_oracle.ts | 8 +- yarn-project/simulator/src/common/errors.ts | 2 +- .../simulator/src/public/avm_executor.test.ts | 6 +- yarn-project/simulator/src/public/db.ts | 2 +- yarn-project/simulator/src/public/executor.ts | 4 +- .../simulator/src/public/index.test.ts | 8 +- yarn-project/simulator/src/public/index.ts | 4 +- .../src/public/public_execution_context.ts | 6 +- .../simulator/src/public/state_actions.ts | 2 +- .../simulator/src/simulator/acvm_native.ts | 6 +- .../simulator/src/simulator/acvm_wasm.ts | 6 +- .../src/simulator/simulation_provider.ts | 4 +- .../types/src/abi/contract_artifact.ts | 10 +- .../src/contracts/contract_data_source.ts | 4 +- .../types/src/contracts/contract_instance.ts | 2 +- .../types/src/interfaces/node-info.ts | 2 +- yarn-project/types/src/noir/index.ts | 10 +- yarn-project/types/src/test/fixtures.ts | 4 +- .../server_world_state_synchronizer.test.ts | 6 +- .../server_world_state_synchronizer.ts | 20 +- .../synchronizer/world_state_synchronizer.ts | 2 +- .../src/world-state-db/merkle_tree_db.ts | 4 +- .../world-state-db/merkle_tree_operations.ts | 4 +- .../merkle_tree_operations_facade.ts | 16 +- .../merkle_tree_snapshot_operations_facade.ts | 16 +- .../src/world-state-db/merkle_trees.ts | 32 ++-- yarn.lock | 4 - 535 files changed, 1659 insertions(+), 1472 deletions(-) create mode 100755 yarn-project/scripts/add_verbatim_types.sh delete mode 100644 yarn.lock diff --git a/yarn-project/accounts/src/defaults/account_contract.ts b/yarn-project/accounts/src/defaults/account_contract.ts index fe270c5acf79..b0e0d52fc761 100644 --- a/yarn-project/accounts/src/defaults/account_contract.ts +++ b/yarn-project/accounts/src/defaults/account_contract.ts @@ -1,7 +1,7 @@ -import { AccountContract, AccountInterface, AuthWitnessProvider } from '@aztec/aztec.js/account'; +import { type AccountContract, type AccountInterface, type AuthWitnessProvider } from '@aztec/aztec.js/account'; import { CompleteAddress } from '@aztec/circuit-types'; -import { ContractArtifact } from '@aztec/foundation/abi'; -import { NodeInfo } from '@aztec/types/interfaces'; +import { type ContractArtifact } from '@aztec/foundation/abi'; +import { type NodeInfo } from '@aztec/types/interfaces'; import { DefaultAccountInterface } from '../defaults/account_interface.js'; diff --git a/yarn-project/accounts/src/defaults/account_interface.ts b/yarn-project/accounts/src/defaults/account_interface.ts index e4bcf6abc5f1..75590b6d8e8e 100644 --- a/yarn-project/accounts/src/defaults/account_interface.ts +++ b/yarn-project/accounts/src/defaults/account_interface.ts @@ -1,9 +1,9 @@ -import { AccountInterface, AuthWitnessProvider } from '@aztec/aztec.js/account'; -import { EntrypointInterface, FeeOptions } from '@aztec/aztec.js/entrypoint'; -import { AuthWitness, FunctionCall, TxExecutionRequest } from '@aztec/circuit-types'; +import { type AccountInterface, type AuthWitnessProvider } from '@aztec/aztec.js/account'; +import { type EntrypointInterface, type FeeOptions } from '@aztec/aztec.js/entrypoint'; +import { AuthWitness, type FunctionCall, TxExecutionRequest } from '@aztec/circuit-types'; import { AztecAddress, CompleteAddress, Fr } from '@aztec/circuits.js'; import { DefaultAccountEntrypoint } from '@aztec/entrypoints/account'; -import { NodeInfo } from '@aztec/types/interfaces'; +import { type NodeInfo } from '@aztec/types/interfaces'; /** * Default implementation for an account interface. Requires that the account uses the default diff --git a/yarn-project/accounts/src/ecdsa/account_contract.ts b/yarn-project/accounts/src/ecdsa/account_contract.ts index 7919ecf62a3d..55f95a6e33fa 100644 --- a/yarn-project/accounts/src/ecdsa/account_contract.ts +++ b/yarn-project/accounts/src/ecdsa/account_contract.ts @@ -1,7 +1,7 @@ -import { AuthWitnessProvider } from '@aztec/aztec.js/account'; +import { type AuthWitnessProvider } from '@aztec/aztec.js/account'; import { AuthWitness, CompleteAddress } from '@aztec/circuit-types'; import { Ecdsa } from '@aztec/circuits.js/barretenberg'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractArtifact } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; import { DefaultAccountContract } from '../defaults/account_contract.js'; diff --git a/yarn-project/accounts/src/ecdsa/artifact.ts b/yarn-project/accounts/src/ecdsa/artifact.ts index 4dd2fd60dd63..54ec3212dd0e 100644 --- a/yarn-project/accounts/src/ecdsa/artifact.ts +++ b/yarn-project/accounts/src/ecdsa/artifact.ts @@ -1,4 +1,4 @@ -import { NoirCompiledContract, loadContractArtifact } from '@aztec/aztec.js'; +import { type NoirCompiledContract, loadContractArtifact } from '@aztec/aztec.js'; import EcdsaAccountContractJson from '../artifacts/EcdsaAccount.json' assert { type: 'json' }; diff --git a/yarn-project/accounts/src/ecdsa/index.ts b/yarn-project/accounts/src/ecdsa/index.ts index 3bd3c5d215d2..1db4810b828a 100644 --- a/yarn-project/accounts/src/ecdsa/index.ts +++ b/yarn-project/accounts/src/ecdsa/index.ts @@ -4,9 +4,9 @@ * * @packageDocumentation */ -import { AccountManager, Salt } from '@aztec/aztec.js/account'; +import { AccountManager, type Salt } from '@aztec/aztec.js/account'; import { AccountWallet, getWallet } from '@aztec/aztec.js/wallet'; -import { GrumpkinPrivateKey, PXE } from '@aztec/circuit-types'; +import { type GrumpkinPrivateKey, type PXE } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/circuits.js'; import { EcdsaAccountContract } from './account_contract.js'; diff --git a/yarn-project/accounts/src/schnorr/account_contract.ts b/yarn-project/accounts/src/schnorr/account_contract.ts index aa651a073f1b..92af87752c73 100644 --- a/yarn-project/accounts/src/schnorr/account_contract.ts +++ b/yarn-project/accounts/src/schnorr/account_contract.ts @@ -1,7 +1,7 @@ -import { AuthWitnessProvider } from '@aztec/aztec.js/account'; -import { AuthWitness, CompleteAddress, GrumpkinPrivateKey } from '@aztec/circuit-types'; +import { type AuthWitnessProvider } from '@aztec/aztec.js/account'; +import { AuthWitness, CompleteAddress, type GrumpkinPrivateKey } from '@aztec/circuit-types'; import { Schnorr } from '@aztec/circuits.js/barretenberg'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractArtifact } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; import { DefaultAccountContract } from '../defaults/account_contract.js'; diff --git a/yarn-project/accounts/src/schnorr/artifact.ts b/yarn-project/accounts/src/schnorr/artifact.ts index 1d9088bf3ca4..f7cac3337f74 100644 --- a/yarn-project/accounts/src/schnorr/artifact.ts +++ b/yarn-project/accounts/src/schnorr/artifact.ts @@ -1,4 +1,4 @@ -import { NoirCompiledContract, loadContractArtifact } from '@aztec/aztec.js'; +import { type NoirCompiledContract, loadContractArtifact } from '@aztec/aztec.js'; import SchnorrAccountContractJson from '../artifacts/SchnorrAccount.json' assert { type: 'json' }; diff --git a/yarn-project/accounts/src/schnorr/index.ts b/yarn-project/accounts/src/schnorr/index.ts index ce44cdb3eab8..f40c8bde591c 100644 --- a/yarn-project/accounts/src/schnorr/index.ts +++ b/yarn-project/accounts/src/schnorr/index.ts @@ -4,9 +4,9 @@ * * @packageDocumentation */ -import { AccountManager, Salt } from '@aztec/aztec.js/account'; +import { AccountManager, type Salt } from '@aztec/aztec.js/account'; import { AccountWallet, getWallet } from '@aztec/aztec.js/wallet'; -import { GrumpkinPrivateKey, PXE } from '@aztec/circuit-types'; +import { type GrumpkinPrivateKey, type PXE } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/circuits.js'; import { SchnorrAccountContract } from './account_contract.js'; diff --git a/yarn-project/accounts/src/single_key/account_contract.ts b/yarn-project/accounts/src/single_key/account_contract.ts index 1334c6791dc7..1c78f12e27c2 100644 --- a/yarn-project/accounts/src/single_key/account_contract.ts +++ b/yarn-project/accounts/src/single_key/account_contract.ts @@ -1,9 +1,9 @@ import { generatePublicKey } from '@aztec/aztec.js'; -import { AuthWitnessProvider } from '@aztec/aztec.js/account'; -import { AuthWitness, CompleteAddress, GrumpkinPrivateKey } from '@aztec/circuit-types'; -import { PartialAddress } from '@aztec/circuits.js'; +import { type AuthWitnessProvider } from '@aztec/aztec.js/account'; +import { AuthWitness, CompleteAddress, type GrumpkinPrivateKey } from '@aztec/circuit-types'; +import { type PartialAddress } from '@aztec/circuits.js'; import { Schnorr } from '@aztec/circuits.js/barretenberg'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractArtifact } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; import { DefaultAccountContract } from '../defaults/account_contract.js'; diff --git a/yarn-project/accounts/src/single_key/artifact.ts b/yarn-project/accounts/src/single_key/artifact.ts index 954c5f199e76..55a819dc5704 100644 --- a/yarn-project/accounts/src/single_key/artifact.ts +++ b/yarn-project/accounts/src/single_key/artifact.ts @@ -1,4 +1,4 @@ -import { NoirCompiledContract, loadContractArtifact } from '@aztec/aztec.js'; +import { type NoirCompiledContract, loadContractArtifact } from '@aztec/aztec.js'; import SchnorrSingleKeyAccountContractJson from '../artifacts/SchnorrSingleKeyAccount.json' assert { type: 'json' }; diff --git a/yarn-project/accounts/src/single_key/index.ts b/yarn-project/accounts/src/single_key/index.ts index bf20f5da07cf..935fdb611065 100644 --- a/yarn-project/accounts/src/single_key/index.ts +++ b/yarn-project/accounts/src/single_key/index.ts @@ -4,9 +4,9 @@ * * @packageDocumentation */ -import { AccountManager, Salt } from '@aztec/aztec.js/account'; +import { AccountManager, type Salt } from '@aztec/aztec.js/account'; import { AccountWallet, getWallet } from '@aztec/aztec.js/wallet'; -import { GrumpkinPrivateKey, PXE } from '@aztec/circuit-types'; +import { type GrumpkinPrivateKey, type PXE } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/circuits.js'; import { SingleKeyAccountContract } from './account_contract.js'; diff --git a/yarn-project/accounts/src/testing/configuration.ts b/yarn-project/accounts/src/testing/configuration.ts index a6a4b7bfe5c8..b939ee3a1932 100644 --- a/yarn-project/accounts/src/testing/configuration.ts +++ b/yarn-project/accounts/src/testing/configuration.ts @@ -1,6 +1,6 @@ import { generatePublicKey } from '@aztec/aztec.js'; import { AccountWalletWithPrivateKey } from '@aztec/aztec.js/wallet'; -import { PXE } from '@aztec/circuit-types'; +import { type PXE } from '@aztec/circuit-types'; import { Fr, GrumpkinScalar } from '@aztec/foundation/fields'; import { getSchnorrAccount } from '../schnorr/index.js'; diff --git a/yarn-project/accounts/src/testing/create_account.ts b/yarn-project/accounts/src/testing/create_account.ts index 8f5a80401906..f85f3f52da77 100644 --- a/yarn-project/accounts/src/testing/create_account.ts +++ b/yarn-project/accounts/src/testing/create_account.ts @@ -1,5 +1,5 @@ import { AccountWalletWithPrivateKey } from '@aztec/aztec.js/wallet'; -import { PXE } from '@aztec/circuit-types'; +import { type PXE } from '@aztec/circuit-types'; import { GrumpkinScalar } from '@aztec/circuits.js'; import { getSchnorrAccount } from '../schnorr/index.js'; diff --git a/yarn-project/archiver/src/archiver/archiver.test.ts b/yarn-project/archiver/src/archiver/archiver.test.ts index 3a4e4428a4c1..0b8db6b0c129 100644 --- a/yarn-project/archiver/src/archiver/archiver.test.ts +++ b/yarn-project/archiver/src/archiver/archiver.test.ts @@ -4,11 +4,19 @@ import { Fr } from '@aztec/foundation/fields'; import { sleep } from '@aztec/foundation/sleep'; import { AvailabilityOracleAbi, InboxAbi, RollupAbi } from '@aztec/l1-artifacts'; -import { MockProxy, mock } from 'jest-mock-extended'; -import { Chain, HttpTransport, Log, PublicClient, Transaction, encodeFunctionData, toHex } from 'viem'; +import { type MockProxy, mock } from 'jest-mock-extended'; +import { + type Chain, + type HttpTransport, + type Log, + type PublicClient, + type Transaction, + encodeFunctionData, + toHex, +} from 'viem'; import { Archiver } from './archiver.js'; -import { ArchiverDataStore } from './archiver_store.js'; +import { type ArchiverDataStore } from './archiver_store.js'; import { MemoryArchiverStore } from './memory_archiver_store/memory_archiver_store.js'; describe('Archiver', () => { diff --git a/yarn-project/archiver/src/archiver/archiver.ts b/yarn-project/archiver/src/archiver/archiver.ts index b0c994cb2d0d..bea01d6af134 100644 --- a/yarn-project/archiver/src/archiver/archiver.ts +++ b/yarn-project/archiver/src/archiver/archiver.ts @@ -1,12 +1,12 @@ import { - FromLogType, - GetUnencryptedLogsResponse, - L1ToL2MessageSource, + type FromLogType, + type GetUnencryptedLogsResponse, + type L1ToL2MessageSource, L2Block, L2BlockL2Logs, - L2BlockSource, - L2LogsSource, - LogFilter, + type L2BlockSource, + type L2LogsSource, + type LogFilter, LogType, TxEffect, TxHash, @@ -25,25 +25,25 @@ import { createEthereumChain } from '@aztec/ethereum'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; +import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log'; import { RunningPromise } from '@aztec/foundation/running-promise'; import { getCanonicalClassRegistererAddress } from '@aztec/protocol-contracts/class-registerer'; import { - ContractClassPublic, - ContractDataSource, - ContractInstanceWithAddress, - ExecutablePrivateFunctionWithMembershipProof, - PublicFunction, - UnconstrainedFunctionWithMembershipProof, + type ContractClassPublic, + type ContractDataSource, + type ContractInstanceWithAddress, + type ExecutablePrivateFunctionWithMembershipProof, + type PublicFunction, + type UnconstrainedFunctionWithMembershipProof, } from '@aztec/types/contracts'; import groupBy from 'lodash.groupby'; -import { Chain, HttpTransport, PublicClient, createPublicClient, http } from 'viem'; +import { type Chain, type HttpTransport, type PublicClient, createPublicClient, http } from 'viem'; -import { ArchiverDataStore } from './archiver_store.js'; -import { ArchiverConfig } from './config.js'; +import { type ArchiverDataStore } from './archiver_store.js'; +import { type ArchiverConfig } from './config.js'; import { - DataRetrieval, + type DataRetrieval, retrieveBlockBodiesFromAvailabilityOracle, retrieveBlockMetadataFromRollup, retrieveL1ToL2Messages, diff --git a/yarn-project/archiver/src/archiver/archiver_store.ts b/yarn-project/archiver/src/archiver/archiver_store.ts index ad6a792c75f5..796452784982 100644 --- a/yarn-project/archiver/src/archiver/archiver_store.ts +++ b/yarn-project/archiver/src/archiver/archiver_store.ts @@ -1,12 +1,12 @@ import { Body, EncryptedL2BlockL2Logs, - FromLogType, - GetUnencryptedLogsResponse, + type FromLogType, + type GetUnencryptedLogsResponse, InboxLeaf, L2Block, L2BlockL2Logs, - LogFilter, + type LogFilter, LogType, TxEffect, TxHash, @@ -16,13 +16,13 @@ import { import { Fr } from '@aztec/circuits.js'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { - ContractClassPublic, - ContractInstanceWithAddress, - ExecutablePrivateFunctionWithMembershipProof, - UnconstrainedFunctionWithMembershipProof, + type ContractClassPublic, + type ContractInstanceWithAddress, + type ExecutablePrivateFunctionWithMembershipProof, + type UnconstrainedFunctionWithMembershipProof, } from '@aztec/types/contracts'; -import { DataRetrieval } from './data_retrieval.js'; +import { type DataRetrieval } from './data_retrieval.js'; /** * Represents the latest L1 block processed by the archiver for various objects in L2. diff --git a/yarn-project/archiver/src/archiver/archiver_store_test_suite.ts b/yarn-project/archiver/src/archiver/archiver_store_test_suite.ts index 1117ee277b54..9b19267294af 100644 --- a/yarn-project/archiver/src/archiver/archiver_store_test_suite.ts +++ b/yarn-project/archiver/src/archiver/archiver_store_test_suite.ts @@ -8,10 +8,14 @@ import { } from '@aztec/circuits.js/testing'; import { times } from '@aztec/foundation/collection'; import { randomBytes, randomInt } from '@aztec/foundation/crypto'; -import { ContractClassPublic, ContractInstanceWithAddress, SerializableContractInstance } from '@aztec/types/contracts'; +import { + type ContractClassPublic, + type ContractInstanceWithAddress, + SerializableContractInstance, +} from '@aztec/types/contracts'; -import { ArchiverDataStore } from './archiver_store.js'; -import { DataRetrieval } from './data_retrieval.js'; +import { type ArchiverDataStore } from './archiver_store.js'; +import { type DataRetrieval } from './data_retrieval.js'; /** * @param testName - The name of the test suite. diff --git a/yarn-project/archiver/src/archiver/config.ts b/yarn-project/archiver/src/archiver/config.ts index 8a741ff31acd..fe1fb79e8487 100644 --- a/yarn-project/archiver/src/archiver/config.ts +++ b/yarn-project/archiver/src/archiver/config.ts @@ -1,4 +1,4 @@ -import { L1ContractAddresses } from '@aztec/ethereum'; +import { type L1ContractAddresses } from '@aztec/ethereum'; import { EthAddress } from '@aztec/foundation/eth-address'; /** diff --git a/yarn-project/archiver/src/archiver/data_retrieval.ts b/yarn-project/archiver/src/archiver/data_retrieval.ts index 86f1fc6e8bf9..85a4eb36b333 100644 --- a/yarn-project/archiver/src/archiver/data_retrieval.ts +++ b/yarn-project/archiver/src/archiver/data_retrieval.ts @@ -2,7 +2,7 @@ import { Body, InboxLeaf } from '@aztec/circuit-types'; import { AppendOnlyTreeSnapshot, Header } from '@aztec/circuits.js'; import { EthAddress } from '@aztec/foundation/eth-address'; -import { PublicClient } from 'viem'; +import { type PublicClient } from 'viem'; import { getL2BlockProcessedLogs, diff --git a/yarn-project/archiver/src/archiver/eth_log_handlers.ts b/yarn-project/archiver/src/archiver/eth_log_handlers.ts index 4c04f3f44109..6b82431da6c2 100644 --- a/yarn-project/archiver/src/archiver/eth_log_handlers.ts +++ b/yarn-project/archiver/src/archiver/eth_log_handlers.ts @@ -5,7 +5,7 @@ import { Fr } from '@aztec/foundation/fields'; import { numToUInt32BE } from '@aztec/foundation/serialize'; import { AvailabilityOracleAbi, InboxAbi, RollupAbi } from '@aztec/l1-artifacts'; -import { Hex, Log, PublicClient, decodeFunctionData, getAbiItem, getAddress, hexToBytes } from 'viem'; +import { type Hex, type Log, type PublicClient, decodeFunctionData, getAbiItem, getAddress, hexToBytes } from 'viem'; /** * Processes newly received MessageSent (L1 to L2) logs. diff --git a/yarn-project/archiver/src/archiver/index.ts b/yarn-project/archiver/src/archiver/index.ts index a7294537624a..222ef50fb89a 100644 --- a/yarn-project/archiver/src/archiver/index.ts +++ b/yarn-project/archiver/src/archiver/index.ts @@ -1,5 +1,5 @@ export * from './archiver.js'; export * from './config.js'; export { MemoryArchiverStore } from './memory_archiver_store/memory_archiver_store.js'; -export { ArchiverDataStore } from './archiver_store.js'; +export { type ArchiverDataStore } from './archiver_store.js'; export { KVArchiverDataStore } from './kv_archiver_store/kv_archiver_store.js'; diff --git a/yarn-project/archiver/src/archiver/kv_archiver_store/block_body_store.ts b/yarn-project/archiver/src/archiver/kv_archiver_store/block_body_store.ts index 11518efb1138..4dce18fca50d 100644 --- a/yarn-project/archiver/src/archiver/kv_archiver_store/block_body_store.ts +++ b/yarn-project/archiver/src/archiver/kv_archiver_store/block_body_store.ts @@ -1,5 +1,5 @@ import { Body } from '@aztec/circuit-types'; -import { AztecKVStore, AztecMap } from '@aztec/kv-store'; +import { type AztecKVStore, type AztecMap } from '@aztec/kv-store'; export class BlockBodyStore { /** Map block body hash to block body */ diff --git a/yarn-project/archiver/src/archiver/kv_archiver_store/block_store.ts b/yarn-project/archiver/src/archiver/kv_archiver_store/block_store.ts index 233089080d63..8ab51120ded1 100644 --- a/yarn-project/archiver/src/archiver/kv_archiver_store/block_store.ts +++ b/yarn-project/archiver/src/archiver/kv_archiver_store/block_store.ts @@ -1,9 +1,9 @@ import { L2Block, TxEffect, TxHash, TxReceipt, TxStatus } from '@aztec/circuit-types'; import { AppendOnlyTreeSnapshot, AztecAddress, Header, INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js'; import { createDebugLogger } from '@aztec/foundation/log'; -import { AztecKVStore, AztecMap, AztecSingleton, Range } from '@aztec/kv-store'; +import { type AztecKVStore, type AztecMap, type AztecSingleton, type Range } from '@aztec/kv-store'; -import { DataRetrieval } from '../data_retrieval.js'; +import { type DataRetrieval } from '../data_retrieval.js'; import { BlockBodyStore } from './block_body_store.js'; type BlockIndexValue = [blockNumber: number, index: number]; diff --git a/yarn-project/archiver/src/archiver/kv_archiver_store/contract_class_store.ts b/yarn-project/archiver/src/archiver/kv_archiver_store/contract_class_store.ts index 0d17369dcd62..8a4525a1228d 100644 --- a/yarn-project/archiver/src/archiver/kv_archiver_store/contract_class_store.ts +++ b/yarn-project/archiver/src/archiver/kv_archiver_store/contract_class_store.ts @@ -1,10 +1,10 @@ import { Fr, FunctionSelector, Vector } from '@aztec/circuits.js'; import { BufferReader, numToUInt8, serializeToBuffer } from '@aztec/foundation/serialize'; -import { AztecKVStore, AztecMap } from '@aztec/kv-store'; +import { type AztecKVStore, type AztecMap } from '@aztec/kv-store'; import { - ContractClassPublic, - ExecutablePrivateFunctionWithMembershipProof, - UnconstrainedFunctionWithMembershipProof, + type ContractClassPublic, + type ExecutablePrivateFunctionWithMembershipProof, + type UnconstrainedFunctionWithMembershipProof, } from '@aztec/types/contracts'; /** diff --git a/yarn-project/archiver/src/archiver/kv_archiver_store/contract_instance_store.ts b/yarn-project/archiver/src/archiver/kv_archiver_store/contract_instance_store.ts index fb020eb3c353..06c0e93bdd65 100644 --- a/yarn-project/archiver/src/archiver/kv_archiver_store/contract_instance_store.ts +++ b/yarn-project/archiver/src/archiver/kv_archiver_store/contract_instance_store.ts @@ -1,6 +1,6 @@ import { AztecAddress } from '@aztec/circuits.js'; -import { AztecKVStore, AztecMap } from '@aztec/kv-store'; -import { ContractInstanceWithAddress, SerializableContractInstance } from '@aztec/types/contracts'; +import { type AztecKVStore, type AztecMap } from '@aztec/kv-store'; +import { type ContractInstanceWithAddress, SerializableContractInstance } from '@aztec/types/contracts'; /** * LMDB implementation of the ArchiverDataStore interface. diff --git a/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts b/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts index ab8c12d795d7..8dc0ed668f2c 100644 --- a/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts +++ b/yarn-project/archiver/src/archiver/kv_archiver_store/kv_archiver_store.ts @@ -1,12 +1,12 @@ import { Body, EncryptedL2BlockL2Logs, - FromLogType, - GetUnencryptedLogsResponse, + type FromLogType, + type GetUnencryptedLogsResponse, InboxLeaf, L2Block, L2BlockL2Logs, - LogFilter, + type LogFilter, LogType, TxEffect, TxHash, @@ -16,16 +16,16 @@ import { import { Fr } from '@aztec/circuits.js'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { createDebugLogger } from '@aztec/foundation/log'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type AztecKVStore } from '@aztec/kv-store'; import { - ContractClassPublic, - ContractInstanceWithAddress, - ExecutablePrivateFunctionWithMembershipProof, - UnconstrainedFunctionWithMembershipProof, + type ContractClassPublic, + type ContractInstanceWithAddress, + type ExecutablePrivateFunctionWithMembershipProof, + type UnconstrainedFunctionWithMembershipProof, } from '@aztec/types/contracts'; -import { ArchiverDataStore, ArchiverL1SynchPoint } from '../archiver_store.js'; -import { DataRetrieval } from '../data_retrieval.js'; +import { type ArchiverDataStore, type ArchiverL1SynchPoint } from '../archiver_store.js'; +import { type DataRetrieval } from '../data_retrieval.js'; import { BlockBodyStore } from './block_body_store.js'; import { BlockStore } from './block_store.js'; import { ContractClassStore } from './contract_class_store.js'; diff --git a/yarn-project/archiver/src/archiver/kv_archiver_store/log_store.ts b/yarn-project/archiver/src/archiver/kv_archiver_store/log_store.ts index cada02c9979a..81fb96ffe3e6 100644 --- a/yarn-project/archiver/src/archiver/kv_archiver_store/log_store.ts +++ b/yarn-project/archiver/src/archiver/kv_archiver_store/log_store.ts @@ -1,10 +1,10 @@ import { EncryptedL2BlockL2Logs, ExtendedUnencryptedL2Log, - FromLogType, - GetUnencryptedLogsResponse, + type FromLogType, + type GetUnencryptedLogsResponse, L2BlockL2Logs, - LogFilter, + type LogFilter, LogId, LogType, UnencryptedL2BlockL2Logs, @@ -12,7 +12,7 @@ import { } from '@aztec/circuit-types'; import { INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js/constants'; import { createDebugLogger } from '@aztec/foundation/log'; -import { AztecKVStore, AztecMap } from '@aztec/kv-store'; +import { type AztecKVStore, type AztecMap } from '@aztec/kv-store'; import { BlockStore } from './block_store.js'; diff --git a/yarn-project/archiver/src/archiver/kv_archiver_store/message_store.ts b/yarn-project/archiver/src/archiver/kv_archiver_store/message_store.ts index e85a36e2df65..b6e8ce3d5091 100644 --- a/yarn-project/archiver/src/archiver/kv_archiver_store/message_store.ts +++ b/yarn-project/archiver/src/archiver/kv_archiver_store/message_store.ts @@ -6,9 +6,9 @@ import { NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, } from '@aztec/circuits.js'; import { createDebugLogger } from '@aztec/foundation/log'; -import { AztecKVStore, AztecMap, AztecSingleton } from '@aztec/kv-store'; +import { type AztecKVStore, type AztecMap, type AztecSingleton } from '@aztec/kv-store'; -import { DataRetrieval } from '../data_retrieval.js'; +import { type DataRetrieval } from '../data_retrieval.js'; /** * LMDB implementation of the ArchiverDataStore interface. diff --git a/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.test.ts b/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.test.ts index 38707f67190a..7c90a611c2f1 100644 --- a/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.test.ts +++ b/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.test.ts @@ -1,6 +1,6 @@ import { L2Block } from '@aztec/circuit-types'; -import { ArchiverDataStore } from '../archiver_store.js'; +import { type ArchiverDataStore } from '../archiver_store.js'; import { describeArchiverDataStore } from '../archiver_store_test_suite.js'; import { MemoryArchiverStore } from './memory_archiver_store.js'; diff --git a/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.ts b/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.ts index 43d197cc576c..dd19cbcfbeb5 100644 --- a/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.ts +++ b/yarn-project/archiver/src/archiver/memory_archiver_store/memory_archiver_store.ts @@ -2,13 +2,13 @@ import { Body, EncryptedL2BlockL2Logs, ExtendedUnencryptedL2Log, - FromLogType, - GetUnencryptedLogsResponse, + type FromLogType, + type GetUnencryptedLogsResponse, InboxLeaf, L2Block, L2BlockContext, L2BlockL2Logs, - LogFilter, + type LogFilter, LogId, LogType, TxEffect, @@ -20,14 +20,14 @@ import { import { Fr, INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { - ContractClassPublic, - ContractInstanceWithAddress, - ExecutablePrivateFunctionWithMembershipProof, - UnconstrainedFunctionWithMembershipProof, + type ContractClassPublic, + type ContractInstanceWithAddress, + type ExecutablePrivateFunctionWithMembershipProof, + type UnconstrainedFunctionWithMembershipProof, } from '@aztec/types/contracts'; -import { ArchiverDataStore, ArchiverL1SynchPoint } from '../archiver_store.js'; -import { DataRetrieval } from '../data_retrieval.js'; +import { type ArchiverDataStore, type ArchiverL1SynchPoint } from '../archiver_store.js'; +import { type DataRetrieval } from '../data_retrieval.js'; import { L1ToL2MessageStore } from './l1_to_l2_message_store.js'; /** diff --git a/yarn-project/archiver/src/rpc/archiver_client.ts b/yarn-project/archiver/src/rpc/archiver_client.ts index 2e456cc6218b..53fb5775103a 100644 --- a/yarn-project/archiver/src/rpc/archiver_client.ts +++ b/yarn-project/archiver/src/rpc/archiver_client.ts @@ -9,7 +9,7 @@ import { import { EthAddress, Fr } from '@aztec/circuits.js'; import { createJsonRpcClient, makeFetch } from '@aztec/foundation/json-rpc/client'; -import { ArchiveSource } from '../archiver/archiver.js'; +import { type ArchiveSource } from '../archiver/archiver.js'; export const createArchiverClient = (url: string, fetch = makeFetch([1, 2, 3], true)): ArchiveSource => createJsonRpcClient( diff --git a/yarn-project/aztec-faucet/src/bin/index.ts b/yarn-project/aztec-faucet/src/bin/index.ts index dd93e9655f1a..ad96b2839b6d 100644 --- a/yarn-project/aztec-faucet/src/bin/index.ts +++ b/yarn-project/aztec-faucet/src/bin/index.ts @@ -7,7 +7,7 @@ import http from 'http'; import Koa from 'koa'; import cors from 'koa-cors'; import Router from 'koa-router'; -import { Hex, http as ViemHttp, createPublicClient, createWalletClient, parseEther } from 'viem'; +import { type Hex, http as ViemHttp, createPublicClient, createWalletClient, parseEther } from 'viem'; import { privateKeyToAccount } from 'viem/accounts'; const { diff --git a/yarn-project/aztec-node/src/aztec-node/config.ts b/yarn-project/aztec-node/src/aztec-node/config.ts index 07f79f823834..125ec88b2878 100644 --- a/yarn-project/aztec-node/src/aztec-node/config.ts +++ b/yarn-project/aztec-node/src/aztec-node/config.ts @@ -1,6 +1,6 @@ -import { ArchiverConfig, getConfigEnvVars as getArchiverVars } from '@aztec/archiver'; -import { P2PConfig, getP2PConfigEnvVars } from '@aztec/p2p'; -import { SequencerClientConfig, getConfigEnvVars as getSequencerVars } from '@aztec/sequencer-client'; +import { type ArchiverConfig, getConfigEnvVars as getArchiverVars } from '@aztec/archiver'; +import { type P2PConfig, getP2PConfigEnvVars } from '@aztec/p2p'; +import { type SequencerClientConfig, getConfigEnvVars as getSequencerVars } from '@aztec/sequencer-client'; import { getConfigEnvVars as getWorldStateVars } from '@aztec/world-state'; /** diff --git a/yarn-project/aztec-node/src/aztec-node/http_rpc_server.ts b/yarn-project/aztec-node/src/aztec-node/http_rpc_server.ts index 7158662dfc5d..dd2836448269 100644 --- a/yarn-project/aztec-node/src/aztec-node/http_rpc_server.ts +++ b/yarn-project/aztec-node/src/aztec-node/http_rpc_server.ts @@ -1,5 +1,5 @@ import { - AztecNode, + type AztecNode, EncryptedL2BlockL2Logs, ExtendedUnencryptedL2Log, L2Block, diff --git a/yarn-project/aztec-node/src/aztec-node/server.test.ts b/yarn-project/aztec-node/src/aztec-node/server.test.ts index a972190d03b5..309a9ef3bccc 100644 --- a/yarn-project/aztec-node/src/aztec-node/server.test.ts +++ b/yarn-project/aztec-node/src/aztec-node/server.test.ts @@ -1,6 +1,6 @@ import { createEthereumChain } from '@aztec/ethereum'; -import { AztecNodeConfig, AztecNodeService } from '../index.js'; +import { type AztecNodeConfig, AztecNodeService } from '../index.js'; describe('aztec node service', () => { it('fails to create Aztec Node if given incorrect chain id', async () => { diff --git a/yarn-project/aztec-node/src/aztec-node/server.ts b/yarn-project/aztec-node/src/aztec-node/server.ts index f905fbe31869..da2ef1da0a5b 100644 --- a/yarn-project/aztec-node/src/aztec-node/server.ts +++ b/yarn-project/aztec-node/src/aztec-node/server.ts @@ -1,21 +1,21 @@ -import { ArchiveSource, Archiver, KVArchiverDataStore, createArchiverClient } from '@aztec/archiver'; +import { type ArchiveSource, Archiver, KVArchiverDataStore, createArchiverClient } from '@aztec/archiver'; import { - AztecNode, - FromLogType, - GetUnencryptedLogsResponse, - L1ToL2MessageSource, + type AztecNode, + type FromLogType, + type GetUnencryptedLogsResponse, + type L1ToL2MessageSource, L2Block, L2BlockL2Logs, - L2BlockNumber, - L2BlockSource, - L2LogsSource, - LogFilter, + type L2BlockNumber, + type L2BlockSource, + type L2LogsSource, + type LogFilter, LogType, MerkleTreeId, NullifierMembershipWitness, - ProverClient, + type ProverClient, PublicDataWitness, - SequencerConfig, + type SequencerConfig, SiblingPath, Tx, TxEffect, @@ -40,32 +40,36 @@ import { PublicDataTreeLeafPreimage, } from '@aztec/circuits.js'; import { computePublicDataTreeLeafSlot } from '@aztec/circuits.js/hash'; -import { L1ContractAddresses, createEthereumChain } from '@aztec/ethereum'; +import { type L1ContractAddresses, createEthereumChain } from '@aztec/ethereum'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { createDebugLogger } from '@aztec/foundation/log'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type AztecKVStore } from '@aztec/kv-store'; import { AztecLmdbStore } from '@aztec/kv-store/lmdb'; import { initStoreForRollup, openTmpStore } from '@aztec/kv-store/utils'; import { SHA256Trunc, StandardTree } from '@aztec/merkle-tree'; -import { AztecKVTxPool, P2P, createP2PClient } from '@aztec/p2p'; +import { AztecKVTxPool, type P2P, createP2PClient } from '@aztec/p2p'; import { DummyProver, TxProver } from '@aztec/prover-client'; import { - GlobalVariableBuilder, + type GlobalVariableBuilder, PublicProcessorFactory, SequencerClient, getGlobalVariableBuilder, } from '@aztec/sequencer-client'; import { WASMSimulator } from '@aztec/simulator'; -import { ContractClassPublic, ContractDataSource, ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { + type ContractClassPublic, + type ContractDataSource, + type ContractInstanceWithAddress, +} from '@aztec/types/contracts'; import { MerkleTrees, ServerWorldStateSynchronizer, - WorldStateConfig, - WorldStateSynchronizer, + type WorldStateConfig, + type WorldStateSynchronizer, getConfigEnvVars as getWorldStateConfig, } from '@aztec/world-state'; -import { AztecNodeConfig } from './config.js'; +import { type AztecNodeConfig } from './config.js'; import { getSimulationProvider } from './simulator-factory.js'; /** diff --git a/yarn-project/aztec-node/src/aztec-node/simulator-factory.ts b/yarn-project/aztec-node/src/aztec-node/simulator-factory.ts index 8cf8de0b01f7..0ccaf6be6e6c 100644 --- a/yarn-project/aztec-node/src/aztec-node/simulator-factory.ts +++ b/yarn-project/aztec-node/src/aztec-node/simulator-factory.ts @@ -1,9 +1,9 @@ -import { DebugLogger } from '@aztec/foundation/log'; -import { NativeACVMSimulator, SimulationProvider, WASMSimulator } from '@aztec/simulator'; +import { type DebugLogger } from '@aztec/foundation/log'; +import { NativeACVMSimulator, type SimulationProvider, WASMSimulator } from '@aztec/simulator'; import * as fs from 'fs/promises'; -import { AztecNodeConfig } from './config.js'; +import { type AztecNodeConfig } from './config.js'; export async function getSimulationProvider( config: AztecNodeConfig, diff --git a/yarn-project/aztec-node/src/bin/index.ts b/yarn-project/aztec-node/src/bin/index.ts index 7d265c0f2f64..e1688b791985 100644 --- a/yarn-project/aztec-node/src/bin/index.ts +++ b/yarn-project/aztec-node/src/bin/index.ts @@ -3,7 +3,7 @@ import { createDebugLogger } from '@aztec/foundation/log'; import http from 'http'; -import { AztecNodeConfig, AztecNodeService, createAztecNodeRpcServer, getConfigEnvVars } from '../index.js'; +import { type AztecNodeConfig, AztecNodeService, createAztecNodeRpcServer, getConfigEnvVars } from '../index.js'; const { AZTEC_NODE_PORT = 8081, API_PREFIX = '' } = process.env; diff --git a/yarn-project/aztec.js/src/account/contract.ts b/yarn-project/aztec.js/src/account/contract.ts index f85afacf4b7a..bd06b1821b7a 100644 --- a/yarn-project/aztec.js/src/account/contract.ts +++ b/yarn-project/aztec.js/src/account/contract.ts @@ -1,8 +1,8 @@ import { CompleteAddress } from '@aztec/circuit-types'; -import { ContractArtifact } from '@aztec/foundation/abi'; -import { NodeInfo } from '@aztec/types/interfaces'; +import { type ContractArtifact } from '@aztec/foundation/abi'; +import { type NodeInfo } from '@aztec/types/interfaces'; -import { AccountInterface } from './interface.js'; +import { type AccountInterface } from './interface.js'; // docs:start:account-contract-interface /** diff --git a/yarn-project/aztec.js/src/account/index.ts b/yarn-project/aztec.js/src/account/index.ts index 19f673839eec..51020fc56d12 100644 --- a/yarn-project/aztec.js/src/account/index.ts +++ b/yarn-project/aztec.js/src/account/index.ts @@ -8,8 +8,8 @@ */ import { Fr } from '@aztec/circuits.js'; -export { AccountContract } from './contract.js'; -export { AccountInterface, AuthWitnessProvider } from './interface.js'; +export { type AccountContract } from './contract.js'; +export { type AccountInterface, type AuthWitnessProvider } from './interface.js'; export * from './wallet.js'; /** A contract deployment salt. */ diff --git a/yarn-project/aztec.js/src/account/interface.ts b/yarn-project/aztec.js/src/account/interface.ts index 4a3b90e2444f..c9e657ec38a7 100644 --- a/yarn-project/aztec.js/src/account/interface.ts +++ b/yarn-project/aztec.js/src/account/interface.ts @@ -1,9 +1,9 @@ -import { AuthWitness, CompleteAddress, FunctionCall } from '@aztec/circuit-types'; +import { AuthWitness, CompleteAddress, type FunctionCall } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/circuits.js'; import { Fr } from '@aztec/foundation/fields'; import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js'; -import { EntrypointInterface } from '../entrypoint/entrypoint.js'; +import { type EntrypointInterface } from '../entrypoint/entrypoint.js'; // docs:start:account-interface /** Creates authorization witnesses. */ diff --git a/yarn-project/aztec.js/src/account/wallet.ts b/yarn-project/aztec.js/src/account/wallet.ts index a5b7bf963cb2..b618abf94c88 100644 --- a/yarn-project/aztec.js/src/account/wallet.ts +++ b/yarn-project/aztec.js/src/account/wallet.ts @@ -1,6 +1,6 @@ -import { PXE } from '@aztec/circuit-types'; +import { type PXE } from '@aztec/circuit-types'; -import { AccountInterface } from './interface.js'; +import { type AccountInterface } from './interface.js'; /** * The wallet interface. diff --git a/yarn-project/aztec.js/src/account_manager/deploy_account_sent_tx.ts b/yarn-project/aztec.js/src/account_manager/deploy_account_sent_tx.ts index 5fd45b835a8b..4ae9b834f2a3 100644 --- a/yarn-project/aztec.js/src/account_manager/deploy_account_sent_tx.ts +++ b/yarn-project/aztec.js/src/account_manager/deploy_account_sent_tx.ts @@ -1,8 +1,8 @@ import { TxHash, TxReceipt } from '@aztec/circuit-types'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; -import { Wallet } from '../account/index.js'; -import { DefaultWaitOpts, SentTx, WaitOpts } from '../contract/index.js'; +import { type Wallet } from '../account/index.js'; +import { DefaultWaitOpts, SentTx, type WaitOpts } from '../contract/index.js'; import { waitForAccountSynch } from '../utils/account.js'; /** Extends a transaction receipt with a wallet instance for the newly deployed contract. */ diff --git a/yarn-project/aztec.js/src/account_manager/index.ts b/yarn-project/aztec.js/src/account_manager/index.ts index 7814dafa78fa..fc487c3ffeb0 100644 --- a/yarn-project/aztec.js/src/account_manager/index.ts +++ b/yarn-project/aztec.js/src/account_manager/index.ts @@ -1,13 +1,13 @@ -import { CompleteAddress, GrumpkinPrivateKey, PXE } from '@aztec/circuit-types'; -import { PublicKey, getContractInstanceFromDeployParams } from '@aztec/circuits.js'; +import { CompleteAddress, type GrumpkinPrivateKey, type PXE } from '@aztec/circuit-types'; +import { type PublicKey, getContractInstanceFromDeployParams } from '@aztec/circuits.js'; import { Fr } from '@aztec/foundation/fields'; -import { ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type ContractInstanceWithAddress } from '@aztec/types/contracts'; -import { AccountContract } from '../account/contract.js'; -import { Salt } from '../account/index.js'; -import { AccountInterface } from '../account/interface.js'; +import { type AccountContract } from '../account/contract.js'; +import { type Salt } from '../account/index.js'; +import { type AccountInterface } from '../account/interface.js'; import { DeployMethod } from '../contract/deploy_method.js'; -import { DefaultWaitOpts, WaitOpts } from '../contract/sent_tx.js'; +import { DefaultWaitOpts, type WaitOpts } from '../contract/sent_tx.js'; import { ContractDeployer } from '../deployment/contract_deployer.js'; import { waitForAccountSynch } from '../utils/account.js'; import { generatePublicKey } from '../utils/index.js'; diff --git a/yarn-project/aztec.js/src/api/abi.ts b/yarn-project/aztec.js/src/api/abi.ts index 7e94b7eb30fc..ebb268c86a96 100644 --- a/yarn-project/aztec.js/src/api/abi.ts +++ b/yarn-project/aztec.js/src/api/abi.ts @@ -1,3 +1,3 @@ -export { ContractArtifact, FunctionArtifact, FunctionSelector } from '@aztec/foundation/abi'; +export { type ContractArtifact, type FunctionArtifact, FunctionSelector } from '@aztec/foundation/abi'; export { loadContractArtifact } from '@aztec/types/abi'; -export { NoirCompiledContract } from '@aztec/types/noir'; +export { type NoirCompiledContract } from '@aztec/types/noir'; diff --git a/yarn-project/aztec.js/src/api/account.ts b/yarn-project/aztec.js/src/api/account.ts index 601e9045e5c8..e0fd3be04ac2 100644 --- a/yarn-project/aztec.js/src/api/account.ts +++ b/yarn-project/aztec.js/src/api/account.ts @@ -1,4 +1,10 @@ -export { AccountContract, AccountInterface, AuthWitnessProvider, Salt, Wallet } from '../account/index.js'; +export { + type AccountContract, + type AccountInterface, + type AuthWitnessProvider, + type Salt, + type Wallet, +} from '../account/index.js'; export { AccountManager } from '../account_manager/index.js'; diff --git a/yarn-project/aztec.js/src/api/ethereum.ts b/yarn-project/aztec.js/src/api/ethereum.ts index 5be2a7ac37dc..18acdebee766 100644 --- a/yarn-project/aztec.js/src/api/ethereum.ts +++ b/yarn-project/aztec.js/src/api/ethereum.ts @@ -1,6 +1,6 @@ export { deployL1Contract, deployL1Contracts, - DeployL1Contracts, - L1ContractArtifactsForDeployment, + type DeployL1Contracts, + type L1ContractArtifactsForDeployment, } from '@aztec/ethereum'; diff --git a/yarn-project/aztec.js/src/api/interfaces/pxe.ts b/yarn-project/aztec.js/src/api/interfaces/pxe.ts index fb7e594fcd12..9576d4fe23c8 100644 --- a/yarn-project/aztec.js/src/api/interfaces/pxe.ts +++ b/yarn-project/aztec.js/src/api/interfaces/pxe.ts @@ -1 +1 @@ -export { PXE } from '@aztec/circuit-types/interfaces'; +export { type PXE } from '@aztec/circuit-types/interfaces'; diff --git a/yarn-project/aztec.js/src/api/wallet.ts b/yarn-project/aztec.js/src/api/wallet.ts index f9026e6a8ff5..2702aed40af3 100644 --- a/yarn-project/aztec.js/src/api/wallet.ts +++ b/yarn-project/aztec.js/src/api/wallet.ts @@ -1 +1,7 @@ -export { AccountWallet, AccountWalletWithPrivateKey, SignerlessWallet, Wallet, getWallet } from '../wallet/index.js'; +export { + AccountWallet, + AccountWalletWithPrivateKey, + SignerlessWallet, + type Wallet, + getWallet, +} from '../wallet/index.js'; diff --git a/yarn-project/aztec.js/src/contract/base_contract_interaction.ts b/yarn-project/aztec.js/src/contract/base_contract_interaction.ts index f2949e50f71e..d4d19845b8b6 100644 --- a/yarn-project/aztec.js/src/contract/base_contract_interaction.ts +++ b/yarn-project/aztec.js/src/contract/base_contract_interaction.ts @@ -1,6 +1,6 @@ -import { PXE, Tx, TxExecutionRequest } from '@aztec/circuit-types'; +import { type PXE, Tx, TxExecutionRequest } from '@aztec/circuit-types'; -import { FeeOptions } from '../entrypoint/entrypoint.js'; +import { type FeeOptions } from '../entrypoint/entrypoint.js'; import { SentTx } from './sent_tx.js'; /** diff --git a/yarn-project/aztec.js/src/contract/batch_call.ts b/yarn-project/aztec.js/src/contract/batch_call.ts index 4bfd21879527..1c9d123dac40 100644 --- a/yarn-project/aztec.js/src/contract/batch_call.ts +++ b/yarn-project/aztec.js/src/contract/batch_call.ts @@ -1,7 +1,7 @@ -import { FunctionCall, TxExecutionRequest } from '@aztec/circuit-types'; +import { type FunctionCall, TxExecutionRequest } from '@aztec/circuit-types'; -import { Wallet } from '../account/index.js'; -import { BaseContractInteraction, SendMethodOptions } from './base_contract_interaction.js'; +import { type Wallet } from '../account/index.js'; +import { BaseContractInteraction, type SendMethodOptions } from './base_contract_interaction.js'; /** A batch of function calls to be sent as a single transaction through a wallet. */ export class BatchCall extends BaseContractInteraction { diff --git a/yarn-project/aztec.js/src/contract/checker.ts b/yarn-project/aztec.js/src/contract/checker.ts index 758cf9188e2b..438bef2048c3 100644 --- a/yarn-project/aztec.js/src/contract/checker.ts +++ b/yarn-project/aztec.js/src/contract/checker.ts @@ -1,4 +1,4 @@ -import { ABIType, BasicType, ContractArtifact, StructType } from '@aztec/foundation/abi'; +import { type ABIType, type BasicType, type ContractArtifact, type StructType } from '@aztec/foundation/abi'; /** * Represents a type derived from input type T with the 'kind' property removed. diff --git a/yarn-project/aztec.js/src/contract/contract.test.ts b/yarn-project/aztec.js/src/contract/contract.test.ts index 7b2c692385da..d47d82dbce93 100644 --- a/yarn-project/aztec.js/src/contract/contract.test.ts +++ b/yarn-project/aztec.js/src/contract/contract.test.ts @@ -1,13 +1,13 @@ import { Tx, TxExecutionRequest, TxHash, TxReceipt } from '@aztec/circuit-types'; import { AztecAddress, CompleteAddress, EthAddress } from '@aztec/circuits.js'; -import { L1ContractAddresses } from '@aztec/ethereum'; -import { ABIParameterVisibility, ContractArtifact, FunctionType } from '@aztec/foundation/abi'; -import { NodeInfo } from '@aztec/types/interfaces'; +import { type L1ContractAddresses } from '@aztec/ethereum'; +import { ABIParameterVisibility, type ContractArtifact, FunctionType } from '@aztec/foundation/abi'; +import { type NodeInfo } from '@aztec/types/interfaces'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; -import { ContractInstanceWithAddress } from '../index.js'; -import { Wallet } from '../wallet/index.js'; +import { type ContractInstanceWithAddress } from '../index.js'; +import { type Wallet } from '../wallet/index.js'; import { Contract } from './contract.js'; describe('Contract Class', () => { diff --git a/yarn-project/aztec.js/src/contract/contract.ts b/yarn-project/aztec.js/src/contract/contract.ts index 67501983cb01..501ff00f730e 100644 --- a/yarn-project/aztec.js/src/contract/contract.ts +++ b/yarn-project/aztec.js/src/contract/contract.ts @@ -1,9 +1,9 @@ -import { PublicKey } from '@aztec/circuit-types'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type PublicKey } from '@aztec/circuit-types'; +import { type ContractArtifact } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Point } from '@aztec/foundation/fields'; -import { Wallet } from '../account/index.js'; +import { type Wallet } from '../account/index.js'; import { ContractBase } from './contract_base.js'; import { DeployMethod } from './deploy_method.js'; diff --git a/yarn-project/aztec.js/src/contract/contract_base.ts b/yarn-project/aztec.js/src/contract/contract_base.ts index 2767a42e0d1e..a49a7205c13e 100644 --- a/yarn-project/aztec.js/src/contract/contract_base.ts +++ b/yarn-project/aztec.js/src/contract/contract_base.ts @@ -1,8 +1,8 @@ import { computePartialAddress } from '@aztec/circuits.js'; -import { ContractArtifact, FunctionArtifact, FunctionSelector } from '@aztec/foundation/abi'; -import { ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type ContractArtifact, type FunctionArtifact, FunctionSelector } from '@aztec/foundation/abi'; +import { type ContractInstanceWithAddress } from '@aztec/types/contracts'; -import { Wallet } from '../account/index.js'; +import { type Wallet } from '../account/index.js'; import { ContractFunctionInteraction } from './contract_function_interaction.js'; /** diff --git a/yarn-project/aztec.js/src/contract/contract_function_interaction.ts b/yarn-project/aztec.js/src/contract/contract_function_interaction.ts index f03b33407632..4089f7b1d893 100644 --- a/yarn-project/aztec.js/src/contract/contract_function_interaction.ts +++ b/yarn-project/aztec.js/src/contract/contract_function_interaction.ts @@ -1,11 +1,11 @@ -import { FunctionCall, TxExecutionRequest } from '@aztec/circuit-types'; +import { type FunctionCall, TxExecutionRequest } from '@aztec/circuit-types'; import { AztecAddress, FunctionData } from '@aztec/circuits.js'; -import { FunctionAbi, FunctionType, encodeArguments } from '@aztec/foundation/abi'; +import { type FunctionAbi, FunctionType, encodeArguments } from '@aztec/foundation/abi'; -import { Wallet } from '../account/wallet.js'; -import { BaseContractInteraction, SendMethodOptions } from './base_contract_interaction.js'; +import { type Wallet } from '../account/wallet.js'; +import { BaseContractInteraction, type SendMethodOptions } from './base_contract_interaction.js'; -export { SendMethodOptions }; +export { type SendMethodOptions }; /** * Represents the options for a view method in a contract function interaction. diff --git a/yarn-project/aztec.js/src/contract/deploy_method.ts b/yarn-project/aztec.js/src/contract/deploy_method.ts index 0cf02ecab9ca..879e9e5bd1ed 100644 --- a/yarn-project/aztec.js/src/contract/deploy_method.ts +++ b/yarn-project/aztec.js/src/contract/deploy_method.ts @@ -1,20 +1,20 @@ -import { FunctionCall, PublicKey, Tx, TxExecutionRequest } from '@aztec/circuit-types'; +import { type FunctionCall, type PublicKey, Tx, TxExecutionRequest } from '@aztec/circuit-types'; import { AztecAddress, computePartialAddress, getContractClassFromArtifact, getContractInstanceFromDeployParams, } from '@aztec/circuits.js'; -import { ContractArtifact, FunctionArtifact, getInitializer } from '@aztec/foundation/abi'; +import { type ContractArtifact, type FunctionArtifact, getInitializer } from '@aztec/foundation/abi'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; -import { ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type ContractInstanceWithAddress } from '@aztec/types/contracts'; -import { Wallet } from '../account/index.js'; +import { type Wallet } from '../account/index.js'; import { deployInstance } from '../deployment/deploy_instance.js'; import { registerContractClass } from '../deployment/register_class.js'; -import { BaseContractInteraction, SendMethodOptions } from './base_contract_interaction.js'; +import { BaseContractInteraction, type SendMethodOptions } from './base_contract_interaction.js'; import { type Contract } from './contract.js'; import { ContractBase } from './contract_base.js'; import { ContractFunctionInteraction } from './contract_function_interaction.js'; diff --git a/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts b/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts index a9898e712678..2addedb450a9 100644 --- a/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts +++ b/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts @@ -1,12 +1,12 @@ -import { PXE, TxHash, TxReceipt } from '@aztec/circuit-types'; +import { type PXE, TxHash, TxReceipt } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/circuits.js'; -import { FieldsOf } from '@aztec/foundation/types'; -import { ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type FieldsOf } from '@aztec/foundation/types'; +import { type ContractInstanceWithAddress } from '@aztec/types/contracts'; -import { Wallet } from '../account/index.js'; +import { type Wallet } from '../account/index.js'; import { type Contract } from './contract.js'; import { ContractBase } from './contract_base.js'; -import { SentTx, WaitOpts } from './sent_tx.js'; +import { SentTx, type WaitOpts } from './sent_tx.js'; /** Options related to waiting for a deployment tx. */ export type DeployedWaitOpts = WaitOpts & { diff --git a/yarn-project/aztec.js/src/contract/sent_tx.test.ts b/yarn-project/aztec.js/src/contract/sent_tx.test.ts index b9f2b78bea1f..cec09e520a94 100644 --- a/yarn-project/aztec.js/src/contract/sent_tx.test.ts +++ b/yarn-project/aztec.js/src/contract/sent_tx.test.ts @@ -1,6 +1,6 @@ -import { PXE, TxHash, TxReceipt, TxStatus } from '@aztec/circuit-types'; +import { type PXE, TxHash, TxReceipt, TxStatus } from '@aztec/circuit-types'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; import { SentTx } from './sent_tx.js'; diff --git a/yarn-project/aztec.js/src/contract/sent_tx.ts b/yarn-project/aztec.js/src/contract/sent_tx.ts index 03e9da395ded..c52973becdb6 100644 --- a/yarn-project/aztec.js/src/contract/sent_tx.ts +++ b/yarn-project/aztec.js/src/contract/sent_tx.ts @@ -1,6 +1,13 @@ -import { ExtendedNote, GetUnencryptedLogsResponse, PXE, TxHash, TxReceipt, TxStatus } from '@aztec/circuit-types'; +import { + ExtendedNote, + type GetUnencryptedLogsResponse, + type PXE, + TxHash, + TxReceipt, + TxStatus, +} from '@aztec/circuit-types'; import { retryUntil } from '@aztec/foundation/retry'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; /** Options related to waiting for a tx. */ export type WaitOpts = { diff --git a/yarn-project/aztec.js/src/contract/unsafe_contract.ts b/yarn-project/aztec.js/src/contract/unsafe_contract.ts index d010d7121c7c..e47fb3b3266a 100644 --- a/yarn-project/aztec.js/src/contract/unsafe_contract.ts +++ b/yarn-project/aztec.js/src/contract/unsafe_contract.ts @@ -1,7 +1,7 @@ -import { ContractArtifact } from '@aztec/foundation/abi'; -import { ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractInstanceWithAddress } from '@aztec/types/contracts'; -import { Wallet } from '../wallet/index.js'; +import { type Wallet } from '../wallet/index.js'; import { ContractBase } from './contract_base.js'; /** Unsafe constructor for ContractBase that bypasses the check that the instance is registered in the wallet. */ diff --git a/yarn-project/aztec.js/src/deployment/broadcast_function.ts b/yarn-project/aztec.js/src/deployment/broadcast_function.ts index e748629b5ad8..b3300fb7bcda 100644 --- a/yarn-project/aztec.js/src/deployment/broadcast_function.ts +++ b/yarn-project/aztec.js/src/deployment/broadcast_function.ts @@ -6,12 +6,12 @@ import { createUnconstrainedFunctionMembershipProof, getContractClassFromArtifact, } from '@aztec/circuits.js'; -import { ContractArtifact, FunctionSelector, FunctionType, bufferAsFields } from '@aztec/foundation/abi'; +import { type ContractArtifact, FunctionSelector, FunctionType, bufferAsFields } from '@aztec/foundation/abi'; import { padArrayEnd } from '@aztec/foundation/collection'; import { Fr } from '@aztec/foundation/fields'; import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js'; -import { Wallet } from '../wallet/index.js'; +import { type Wallet } from '../wallet/index.js'; import { getRegistererContract } from './protocol_contracts.js'; /** diff --git a/yarn-project/aztec.js/src/deployment/contract_deployer.ts b/yarn-project/aztec.js/src/deployment/contract_deployer.ts index 09420c60401b..e6b03de076db 100644 --- a/yarn-project/aztec.js/src/deployment/contract_deployer.ts +++ b/yarn-project/aztec.js/src/deployment/contract_deployer.ts @@ -1,9 +1,9 @@ -import { PublicKey } from '@aztec/circuit-types'; +import { type PublicKey } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/circuits.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractArtifact } from '@aztec/foundation/abi'; import { Point } from '@aztec/foundation/fields'; -import { Wallet } from '../account/wallet.js'; +import { type Wallet } from '../account/wallet.js'; import { DeployMethod } from '../contract/deploy_method.js'; import { Contract } from '../contract/index.js'; diff --git a/yarn-project/aztec.js/src/deployment/deploy_instance.ts b/yarn-project/aztec.js/src/deployment/deploy_instance.ts index aac32143c170..9bdb3fe39876 100644 --- a/yarn-project/aztec.js/src/deployment/deploy_instance.ts +++ b/yarn-project/aztec.js/src/deployment/deploy_instance.ts @@ -1,7 +1,7 @@ -import { ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type ContractInstanceWithAddress } from '@aztec/types/contracts'; import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js'; -import { Wallet } from '../wallet/index.js'; +import { type Wallet } from '../wallet/index.js'; import { getDeployerContract } from './protocol_contracts.js'; /** diff --git a/yarn-project/aztec.js/src/deployment/protocol_contracts.ts b/yarn-project/aztec.js/src/deployment/protocol_contracts.ts index c7d59c59d634..9fc681f8a556 100644 --- a/yarn-project/aztec.js/src/deployment/protocol_contracts.ts +++ b/yarn-project/aztec.js/src/deployment/protocol_contracts.ts @@ -2,7 +2,7 @@ import { getCanonicalClassRegisterer } from '@aztec/protocol-contracts/class-reg import { getCanonicalInstanceDeployer } from '@aztec/protocol-contracts/instance-deployer'; import { UnsafeContract } from '../contract/unsafe_contract.js'; -import { Wallet } from '../wallet/index.js'; +import { type Wallet } from '../wallet/index.js'; /** Returns a Contract wrapper for the class registerer. */ export function getRegistererContract(wallet: Wallet) { diff --git a/yarn-project/aztec.js/src/deployment/register_class.ts b/yarn-project/aztec.js/src/deployment/register_class.ts index 8d5efd0107ff..384f0edb29da 100644 --- a/yarn-project/aztec.js/src/deployment/register_class.ts +++ b/yarn-project/aztec.js/src/deployment/register_class.ts @@ -1,8 +1,8 @@ import { MAX_PACKED_PUBLIC_BYTECODE_SIZE_IN_FIELDS, getContractClassFromArtifact } from '@aztec/circuits.js'; -import { ContractArtifact, bufferAsFields } from '@aztec/foundation/abi'; +import { type ContractArtifact, bufferAsFields } from '@aztec/foundation/abi'; import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js'; -import { Wallet } from '../wallet/index.js'; +import { type Wallet } from '../wallet/index.js'; import { getRegistererContract } from './protocol_contracts.js'; /** Sets up a call to register a contract class given its artifact. */ diff --git a/yarn-project/aztec.js/src/entrypoint/default_entrypoint.ts b/yarn-project/aztec.js/src/entrypoint/default_entrypoint.ts index 7315d4f6aa02..a88cfef9e7a5 100644 --- a/yarn-project/aztec.js/src/entrypoint/default_entrypoint.ts +++ b/yarn-project/aztec.js/src/entrypoint/default_entrypoint.ts @@ -1,7 +1,7 @@ -import { FunctionCall, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types'; +import { type FunctionCall, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types'; import { TxContext } from '@aztec/circuits.js'; -import { EntrypointInterface } from './entrypoint.js'; +import { type EntrypointInterface } from './entrypoint.js'; /** * Default implementation of the entrypoint interface. It calls a function on a contract directly diff --git a/yarn-project/aztec.js/src/entrypoint/entrypoint.ts b/yarn-project/aztec.js/src/entrypoint/entrypoint.ts index d32e9b768af9..4f6dc96e4f98 100644 --- a/yarn-project/aztec.js/src/entrypoint/entrypoint.ts +++ b/yarn-project/aztec.js/src/entrypoint/entrypoint.ts @@ -1,7 +1,7 @@ -import { FunctionCall, TxExecutionRequest } from '@aztec/circuit-types'; +import { type FunctionCall, TxExecutionRequest } from '@aztec/circuit-types'; import { Fr } from '@aztec/foundation/fields'; -import { FeePaymentMethod } from '../fee/fee_payment_method.js'; +import { type FeePaymentMethod } from '../fee/fee_payment_method.js'; /** * Fee payment options for a transaction. diff --git a/yarn-project/aztec.js/src/fee/fee_payment_method.ts b/yarn-project/aztec.js/src/fee/fee_payment_method.ts index 034ce3ad3126..1733ad523f01 100644 --- a/yarn-project/aztec.js/src/fee/fee_payment_method.ts +++ b/yarn-project/aztec.js/src/fee/fee_payment_method.ts @@ -1,4 +1,4 @@ -import { FunctionCall } from '@aztec/circuit-types'; +import { type FunctionCall } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; diff --git a/yarn-project/aztec.js/src/fee/native_fee_payment_method.ts b/yarn-project/aztec.js/src/fee/native_fee_payment_method.ts index 21aba74b2583..3a2fa011c977 100644 --- a/yarn-project/aztec.js/src/fee/native_fee_payment_method.ts +++ b/yarn-project/aztec.js/src/fee/native_fee_payment_method.ts @@ -1,11 +1,11 @@ -import { FunctionCall } from '@aztec/circuit-types'; +import { type FunctionCall } from '@aztec/circuit-types'; import { AztecAddress, FunctionData } from '@aztec/circuits.js'; import { FunctionSelector } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; import { getCanonicalGasTokenAddress } from '@aztec/protocol-contracts/gas-token'; -import { Wallet } from '../account/wallet.js'; -import { FeePaymentMethod } from './fee_payment_method.js'; +import { type Wallet } from '../account/wallet.js'; +import { type FeePaymentMethod } from './fee_payment_method.js'; /** * Pay fee directly in the native gas token. diff --git a/yarn-project/aztec.js/src/fee/private_fee_payment_method.ts b/yarn-project/aztec.js/src/fee/private_fee_payment_method.ts index bc4c998ce7db..193b0fea68e4 100644 --- a/yarn-project/aztec.js/src/fee/private_fee_payment_method.ts +++ b/yarn-project/aztec.js/src/fee/private_fee_payment_method.ts @@ -1,13 +1,13 @@ -import { FunctionCall } from '@aztec/circuit-types'; +import { type FunctionCall } from '@aztec/circuit-types'; import { FunctionData } from '@aztec/circuits.js'; import { computeMessageSecretHash } from '@aztec/circuits.js/hash'; import { FunctionSelector } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; -import { Wallet } from '../account/wallet.js'; +import { type Wallet } from '../account/wallet.js'; import { computeAuthWitMessageHash } from '../utils/authwit.js'; -import { FeePaymentMethod } from './fee_payment_method.js'; +import { type FeePaymentMethod } from './fee_payment_method.js'; /** * Holds information about how the fee for a transaction is to be paid. diff --git a/yarn-project/aztec.js/src/fee/public_fee_payment_method.ts b/yarn-project/aztec.js/src/fee/public_fee_payment_method.ts index ed44beb91eb9..64f03d4f16c9 100644 --- a/yarn-project/aztec.js/src/fee/public_fee_payment_method.ts +++ b/yarn-project/aztec.js/src/fee/public_fee_payment_method.ts @@ -1,4 +1,4 @@ -import { FunctionCall } from '@aztec/circuit-types'; +import { type FunctionCall } from '@aztec/circuit-types'; import { FunctionData } from '@aztec/circuits.js'; import { FunctionSelector } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; @@ -6,7 +6,7 @@ import { Fr } from '@aztec/foundation/fields'; import { computeAuthWitMessageHash } from '../utils/authwit.js'; import { AccountWallet } from '../wallet/account_wallet.js'; -import { FeePaymentMethod } from './fee_payment_method.js'; +import { type FeePaymentMethod } from './fee_payment_method.js'; /** * Holds information about how the fee for a transaction is to be paid. diff --git a/yarn-project/aztec.js/src/index.ts b/yarn-project/aztec.js/src/index.ts index 646c5488bf9b..5ce10dc594c6 100644 --- a/yarn-project/aztec.js/src/index.ts +++ b/yarn-project/aztec.js/src/index.ts @@ -20,11 +20,11 @@ * TODO: Ultimately reimplement this mega exporter by mega exporting a granular api (then deprecate it). */ export { - WaitOpts, + type WaitOpts, ContractFunctionInteraction, Contract, ContractBase, - ContractMethod, + type ContractMethod, SentTx, BatchCall, DeployMethod, @@ -35,12 +35,12 @@ export { ContractDeployer } from './deployment/index.js'; export { generatePublicKey, - FieldLike, - EthAddressLike, + type FieldLike, + type EthAddressLike, CheatCodes, - AztecAddressLike, - FunctionSelectorLike, - WrappedFieldLike, + type AztecAddressLike, + type FunctionSelectorLike, + type WrappedFieldLike, EthCheatCodes, computeAuthWitMessageHash, computeInnerAuthWitHash, @@ -51,12 +51,12 @@ export { export { createPXEClient } from './rpc_clients/index.js'; -export { AuthWitnessProvider } from './account/index.js'; +export { type AuthWitnessProvider } from './account/index.js'; -export { AccountContract } from './account/index.js'; +export { type AccountContract } from './account/index.js'; export { AccountManager } from './account_manager/index.js'; -export { AccountWalletWithPrivateKey, AccountWallet, Wallet, SignerlessWallet } from './wallet/index.js'; +export { AccountWalletWithPrivateKey, AccountWallet, type Wallet, SignerlessWallet } from './wallet/index.js'; // // TODO https://github.com/AztecProtocol/aztec-packages/issues/2632 --> FunctionSelector might not need to be exposed // // here once the issue is resolved. @@ -79,12 +79,12 @@ export { Grumpkin, Schnorr } from '@aztec/circuits.js/barretenberg'; export { AuthWitness, - AztecNode, + type AztecNode, Body, CompleteAddress, ExtendedNote, - FunctionCall, - GrumpkinPrivateKey, + type FunctionCall, + type GrumpkinPrivateKey, L1ToL2Message, L1Actor, L2Actor, @@ -92,16 +92,16 @@ export { L2BlockL2Logs, EncryptedL2BlockL2Logs, UnencryptedL2BlockL2Logs, - LogFilter, + type LogFilter, LogId, LogType, MerkleTreeId, Note, - PXE, + type PXE, PackedArguments, - PartialAddress, - PublicKey, - SyncStatus, + type PartialAddress, + type PublicKey, + type SyncStatus, Tx, TxExecutionRequest, TxHash, @@ -115,16 +115,16 @@ export { Comparator, SiblingPath, } from '@aztec/circuit-types'; -export { NodeInfo } from '@aztec/types/interfaces'; +export { type NodeInfo } from '@aztec/types/interfaces'; -export { ContractInstanceWithAddress, ContractClassWithId } from '@aztec/types/contracts'; +export { type ContractInstanceWithAddress, type ContractClassWithId } from '@aztec/types/contracts'; // TODO: These kinds of things have no place on our public api. // External devs will almost certainly have their own methods of doing these things. // If we want to use them in our own "aztec.js consuming code", import them from foundation as needed. export { encodeArguments } from '@aztec/foundation/abi'; export { sha256 } from '@aztec/foundation/crypto'; -export { DebugLogger, createDebugLogger, onLog } from '@aztec/foundation/log'; +export { type DebugLogger, createDebugLogger, onLog } from '@aztec/foundation/log'; export { retry, retryUntil } from '@aztec/foundation/retry'; export { sleep } from '@aztec/foundation/sleep'; export { elapsed } from '@aztec/foundation/timer'; @@ -132,11 +132,11 @@ export { fileURLToPath } from '@aztec/foundation/url'; export { to2Fields, toBigInt } from '@aztec/foundation/serialize'; export { toBigIntBE } from '@aztec/foundation/bigint-buffer'; export { makeFetch } from '@aztec/foundation/json-rpc/client'; -export { FieldsOf } from '@aztec/foundation/types'; +export { type FieldsOf } from '@aztec/foundation/types'; export { - DeployL1Contracts, - L1ContractArtifactsForDeployment, + type DeployL1Contracts, + type L1ContractArtifactsForDeployment, deployL1Contract, deployL1Contracts, } from '@aztec/ethereum'; diff --git a/yarn-project/aztec.js/src/rpc_clients/pxe_client.ts b/yarn-project/aztec.js/src/rpc_clients/pxe_client.ts index 59ced8b1cc44..1aacaf16691c 100644 --- a/yarn-project/aztec.js/src/rpc_clients/pxe_client.ts +++ b/yarn-project/aztec.js/src/rpc_clients/pxe_client.ts @@ -7,7 +7,7 @@ import { LogId, Note, NullifierMembershipWitness, - PXE, + type PXE, Tx, TxEffect, TxExecutionRequest, diff --git a/yarn-project/aztec.js/src/utils/account.ts b/yarn-project/aztec.js/src/utils/account.ts index 35c437cc5ace..f61e7b9248a5 100644 --- a/yarn-project/aztec.js/src/utils/account.ts +++ b/yarn-project/aztec.js/src/utils/account.ts @@ -1,7 +1,7 @@ -import { CompleteAddress, PXE } from '@aztec/circuit-types'; +import { CompleteAddress, type PXE } from '@aztec/circuit-types'; import { retryUntil } from '@aztec/foundation/retry'; -import { DefaultWaitOpts, WaitOpts } from '../contract/index.js'; +import { DefaultWaitOpts, type WaitOpts } from '../contract/index.js'; /** * Waits for the account to finish synchronizing with the PXE Service. diff --git a/yarn-project/aztec.js/src/utils/authwit.ts b/yarn-project/aztec.js/src/utils/authwit.ts index 0979524b9dd6..ef485d2c8178 100644 --- a/yarn-project/aztec.js/src/utils/authwit.ts +++ b/yarn-project/aztec.js/src/utils/authwit.ts @@ -1,4 +1,4 @@ -import { FunctionCall, PackedArguments } from '@aztec/circuit-types'; +import { type FunctionCall, PackedArguments } from '@aztec/circuit-types'; import { AztecAddress, Fr, GeneratorIndex } from '@aztec/circuits.js'; import { pedersenHash } from '@aztec/foundation/crypto'; diff --git a/yarn-project/aztec.js/src/utils/cheat_codes.ts b/yarn-project/aztec.js/src/utils/cheat_codes.ts index 49f91a3247a1..5386234c55e7 100644 --- a/yarn-project/aztec.js/src/utils/cheat_codes.ts +++ b/yarn-project/aztec.js/src/utils/cheat_codes.ts @@ -1,4 +1,4 @@ -import { Note, PXE } from '@aztec/circuit-types'; +import { Note, type PXE } from '@aztec/circuit-types'; import { AztecAddress, EthAddress, Fr } from '@aztec/circuits.js'; import { toBigIntBE, toHex } from '@aztec/foundation/bigint-buffer'; import { keccak, pedersenHash } from '@aztec/foundation/crypto'; diff --git a/yarn-project/aztec.js/src/utils/l1_contracts.ts b/yarn-project/aztec.js/src/utils/l1_contracts.ts index d0230c8f3297..88b9a875234b 100644 --- a/yarn-project/aztec.js/src/utils/l1_contracts.ts +++ b/yarn-project/aztec.js/src/utils/l1_contracts.ts @@ -1,4 +1,4 @@ -import { L1ContractAddresses } from '@aztec/ethereum'; +import { type L1ContractAddresses } from '@aztec/ethereum'; import { retryUntil } from '@aztec/foundation/retry'; import { createPXEClient } from '../rpc_clients/index.js'; diff --git a/yarn-project/aztec.js/src/utils/pub_key.ts b/yarn-project/aztec.js/src/utils/pub_key.ts index 5e04f00a1e2f..85009e302d3a 100644 --- a/yarn-project/aztec.js/src/utils/pub_key.ts +++ b/yarn-project/aztec.js/src/utils/pub_key.ts @@ -1,4 +1,4 @@ -import { GrumpkinPrivateKey, PublicKey } from '@aztec/circuits.js'; +import { type GrumpkinPrivateKey, type PublicKey } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; /** diff --git a/yarn-project/aztec.js/src/utils/pxe.ts b/yarn-project/aztec.js/src/utils/pxe.ts index cd2b257d1a47..9b1a9222409c 100644 --- a/yarn-project/aztec.js/src/utils/pxe.ts +++ b/yarn-project/aztec.js/src/utils/pxe.ts @@ -1,5 +1,5 @@ -import { PXE } from '@aztec/circuit-types'; -import { DebugLogger } from '@aztec/foundation/log'; +import { type PXE } from '@aztec/circuit-types'; +import { type DebugLogger } from '@aztec/foundation/log'; import { retryUntil } from '@aztec/foundation/retry'; export const waitForPXE = async (pxe: PXE, logger?: DebugLogger) => { diff --git a/yarn-project/aztec.js/src/wallet/account_wallet.ts b/yarn-project/aztec.js/src/wallet/account_wallet.ts index d2d1be43d4fd..9cc5f349b01a 100644 --- a/yarn-project/aztec.js/src/wallet/account_wallet.ts +++ b/yarn-project/aztec.js/src/wallet/account_wallet.ts @@ -1,10 +1,10 @@ -import { AuthWitness, FunctionCall, PXE, TxExecutionRequest } from '@aztec/circuit-types'; +import { AuthWitness, type FunctionCall, type PXE, TxExecutionRequest } from '@aztec/circuit-types'; import { AztecAddress, Fr } from '@aztec/circuits.js'; -import { ABIParameterVisibility, FunctionAbi, FunctionType } from '@aztec/foundation/abi'; +import { ABIParameterVisibility, type FunctionAbi, FunctionType } from '@aztec/foundation/abi'; -import { AccountInterface } from '../account/interface.js'; +import { type AccountInterface } from '../account/interface.js'; import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js'; -import { FeeOptions } from '../entrypoint/entrypoint.js'; +import { type FeeOptions } from '../entrypoint/entrypoint.js'; import { computeAuthWitMessageHash } from '../utils/authwit.js'; import { BaseWallet } from './base_wallet.js'; diff --git a/yarn-project/aztec.js/src/wallet/account_wallet_with_private_key.ts b/yarn-project/aztec.js/src/wallet/account_wallet_with_private_key.ts index 645db1cf5db3..d21bddf3e850 100644 --- a/yarn-project/aztec.js/src/wallet/account_wallet_with_private_key.ts +++ b/yarn-project/aztec.js/src/wallet/account_wallet_with_private_key.ts @@ -1,8 +1,8 @@ -import { PXE } from '@aztec/circuit-types'; -import { GrumpkinPrivateKey } from '@aztec/circuits.js'; +import { type PXE } from '@aztec/circuit-types'; +import { type GrumpkinPrivateKey } from '@aztec/circuits.js'; -import { Salt } from '../account/index.js'; -import { AccountInterface } from '../account/interface.js'; +import { type Salt } from '../account/index.js'; +import { type AccountInterface } from '../account/interface.js'; import { AccountWallet } from './account_wallet.js'; /** diff --git a/yarn-project/aztec.js/src/wallet/base_wallet.ts b/yarn-project/aztec.js/src/wallet/base_wallet.ts index 3402041b15a1..43631698bf07 100644 --- a/yarn-project/aztec.js/src/wallet/base_wallet.ts +++ b/yarn-project/aztec.js/src/wallet/base_wallet.ts @@ -1,27 +1,27 @@ import { AuthWitness, ExtendedNote, - FunctionCall, - GetUnencryptedLogsResponse, + type FunctionCall, + type GetUnencryptedLogsResponse, L2Block, - LogFilter, - NoteFilter, - PXE, - SyncStatus, + type LogFilter, + type NoteFilter, + type PXE, + type SyncStatus, Tx, TxEffect, TxExecutionRequest, TxHash, TxReceipt, } from '@aztec/circuit-types'; -import { AztecAddress, CompleteAddress, Fr, GrumpkinPrivateKey, PartialAddress } from '@aztec/circuits.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; -import { ContractClassWithId, ContractInstanceWithAddress } from '@aztec/types/contracts'; -import { NodeInfo } from '@aztec/types/interfaces'; +import { AztecAddress, CompleteAddress, Fr, type GrumpkinPrivateKey, type PartialAddress } from '@aztec/circuits.js'; +import { type ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractClassWithId, type ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type NodeInfo } from '@aztec/types/interfaces'; -import { Wallet } from '../account/wallet.js'; +import { type Wallet } from '../account/wallet.js'; import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js'; -import { FeeOptions } from '../entrypoint/entrypoint.js'; +import { type FeeOptions } from '../entrypoint/entrypoint.js'; /** * A base class for Wallet implementations diff --git a/yarn-project/aztec.js/src/wallet/create_recipient.ts b/yarn-project/aztec.js/src/wallet/create_recipient.ts index 94e7917aecea..765f0fcc74ef 100644 --- a/yarn-project/aztec.js/src/wallet/create_recipient.ts +++ b/yarn-project/aztec.js/src/wallet/create_recipient.ts @@ -1,4 +1,4 @@ -import { PXE } from '@aztec/circuit-types'; +import { type PXE } from '@aztec/circuit-types'; import { CompleteAddress } from '@aztec/circuits.js'; /** diff --git a/yarn-project/aztec.js/src/wallet/index.ts b/yarn-project/aztec.js/src/wallet/index.ts index 18fcfe3514cd..d5feb893fcf3 100644 --- a/yarn-project/aztec.js/src/wallet/index.ts +++ b/yarn-project/aztec.js/src/wallet/index.ts @@ -1,7 +1,7 @@ -import { PXE } from '@aztec/circuit-types'; +import { type PXE } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { AccountContract } from '../account/contract.js'; +import { type AccountContract } from '../account/contract.js'; import { AccountWallet } from './account_wallet.js'; export * from '../account/wallet.js'; diff --git a/yarn-project/aztec.js/src/wallet/signerless_wallet.ts b/yarn-project/aztec.js/src/wallet/signerless_wallet.ts index 816b5a9e5ba7..9a7ba0617090 100644 --- a/yarn-project/aztec.js/src/wallet/signerless_wallet.ts +++ b/yarn-project/aztec.js/src/wallet/signerless_wallet.ts @@ -1,8 +1,8 @@ -import { AuthWitness, FunctionCall, PXE, TxExecutionRequest } from '@aztec/circuit-types'; +import { AuthWitness, type FunctionCall, type PXE, TxExecutionRequest } from '@aztec/circuit-types'; import { CompleteAddress, Fr } from '@aztec/circuits.js'; import { DefaultEntrypoint } from '../entrypoint/default_entrypoint.js'; -import { EntrypointInterface } from '../entrypoint/entrypoint.js'; +import { type EntrypointInterface } from '../entrypoint/entrypoint.js'; import { BaseWallet } from './base_wallet.js'; /** diff --git a/yarn-project/aztec/src/cli/cli.ts b/yarn-project/aztec/src/cli/cli.ts index a373f6e97baa..09ba1a37fb22 100644 --- a/yarn-project/aztec/src/cli/cli.ts +++ b/yarn-project/aztec/src/cli/cli.ts @@ -1,6 +1,6 @@ import { fileURLToPath } from '@aztec/aztec.js'; -import { ServerList, createNamespacedJsonRpcServer, createStatusRouter } from '@aztec/foundation/json-rpc/server'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type ServerList, createNamespacedJsonRpcServer, createStatusRouter } from '@aztec/foundation/json-rpc/server'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { Command } from 'commander'; import { readFileSync } from 'fs'; diff --git a/yarn-project/aztec/src/cli/cmds/start_archiver.ts b/yarn-project/aztec/src/cli/cmds/start_archiver.ts index 96cee4c34eec..567f2b160b04 100644 --- a/yarn-project/aztec/src/cli/cmds/start_archiver.ts +++ b/yarn-project/aztec/src/cli/cmds/start_archiver.ts @@ -1,12 +1,12 @@ import { Archiver, - ArchiverConfig, + type ArchiverConfig, KVArchiverDataStore, createArchiverRpcServer, getConfigEnvVars as getArchiverConfigEnvVars, } from '@aztec/archiver'; import { createDebugLogger } from '@aztec/aztec.js'; -import { ServerList } from '@aztec/foundation/json-rpc/server'; +import { type ServerList } from '@aztec/foundation/json-rpc/server'; import { AztecLmdbStore } from '@aztec/kv-store/lmdb'; import { initStoreForRollup } from '@aztec/kv-store/utils'; diff --git a/yarn-project/aztec/src/cli/cmds/start_node.ts b/yarn-project/aztec/src/cli/cmds/start_node.ts index f498b42fdef5..d9a28ced7a29 100644 --- a/yarn-project/aztec/src/cli/cmds/start_node.ts +++ b/yarn-project/aztec/src/cli/cmds/start_node.ts @@ -1,8 +1,12 @@ -import { AztecNodeConfig, createAztecNodeRpcServer, getConfigEnvVars as getNodeConfigEnvVars } from '@aztec/aztec-node'; +import { + type AztecNodeConfig, + createAztecNodeRpcServer, + getConfigEnvVars as getNodeConfigEnvVars, +} from '@aztec/aztec-node'; import { NULL_KEY } from '@aztec/ethereum'; -import { ServerList } from '@aztec/foundation/json-rpc/server'; -import { LogFn } from '@aztec/foundation/log'; -import { PXEServiceConfig, createPXERpcServer, getPXEServiceConfig } from '@aztec/pxe'; +import { type ServerList } from '@aztec/foundation/json-rpc/server'; +import { type LogFn } from '@aztec/foundation/log'; +import { type PXEServiceConfig, createPXERpcServer, getPXEServiceConfig } from '@aztec/pxe'; import { mnemonicToAccount, privateKeyToAccount } from 'viem/accounts'; diff --git a/yarn-project/aztec/src/cli/cmds/start_p2p_bootstrap.ts b/yarn-project/aztec/src/cli/cmds/start_p2p_bootstrap.ts index 2fedcfd56456..e3f70aacebbe 100644 --- a/yarn-project/aztec/src/cli/cmds/start_p2p_bootstrap.ts +++ b/yarn-project/aztec/src/cli/cmds/start_p2p_bootstrap.ts @@ -1,6 +1,6 @@ -import { DebugLogger } from '@aztec/aztec.js'; -import { LogFn } from '@aztec/foundation/log'; -import { BootstrapNode, P2PConfig, getP2PConfigEnvVars } from '@aztec/p2p'; +import { type DebugLogger } from '@aztec/aztec.js'; +import { type LogFn } from '@aztec/foundation/log'; +import { BootstrapNode, type P2PConfig, getP2PConfigEnvVars } from '@aztec/p2p'; import { mergeEnvVarsAndCliOptions, parseModuleOptions } from '../util.js'; diff --git a/yarn-project/aztec/src/cli/cmds/start_pxe.ts b/yarn-project/aztec/src/cli/cmds/start_pxe.ts index b97cc431cc8a..95f4027097b7 100644 --- a/yarn-project/aztec/src/cli/cmds/start_pxe.ts +++ b/yarn-project/aztec/src/cli/cmds/start_pxe.ts @@ -1,7 +1,7 @@ import { createAztecNodeClient } from '@aztec/circuit-types'; -import { ServerList } from '@aztec/foundation/json-rpc/server'; -import { LogFn } from '@aztec/foundation/log'; -import { PXEServiceConfig, createPXERpcServer, createPXEService, getPXEServiceConfig } from '@aztec/pxe'; +import { type ServerList } from '@aztec/foundation/json-rpc/server'; +import { type LogFn } from '@aztec/foundation/log'; +import { type PXEServiceConfig, createPXERpcServer, createPXEService, getPXEServiceConfig } from '@aztec/pxe'; import { mergeEnvVarsAndCliOptions, parseModuleOptions } from '../util.js'; diff --git a/yarn-project/aztec/src/cli/util.ts b/yarn-project/aztec/src/cli/util.ts index 3a7a3f499cd3..3b041cba7334 100644 --- a/yarn-project/aztec/src/cli/util.ts +++ b/yarn-project/aztec/src/cli/util.ts @@ -1,11 +1,11 @@ -import { ArchiverConfig } from '@aztec/archiver'; -import { AztecNodeConfig } from '@aztec/aztec-node'; +import { type ArchiverConfig } from '@aztec/archiver'; +import { type AztecNodeConfig } from '@aztec/aztec-node'; import { AccountManager } from '@aztec/aztec.js'; -import { L1ContractAddresses, l1ContractsNames } from '@aztec/ethereum'; +import { type L1ContractAddresses, l1ContractsNames } from '@aztec/ethereum'; import { EthAddress } from '@aztec/foundation/eth-address'; -import { LogFn, createConsoleLogger } from '@aztec/foundation/log'; -import { P2PConfig } from '@aztec/p2p'; -import { GrumpkinScalar, PXEService, PXEServiceConfig } from '@aztec/pxe'; +import { type LogFn, createConsoleLogger } from '@aztec/foundation/log'; +import { type P2PConfig } from '@aztec/p2p'; +import { GrumpkinScalar, PXEService, type PXEServiceConfig } from '@aztec/pxe'; /** * Checks if the object has l1Contracts property diff --git a/yarn-project/aztec/src/examples/util.ts b/yarn-project/aztec/src/examples/util.ts index a008e15dbd0b..0d38e5beeefa 100644 --- a/yarn-project/aztec/src/examples/util.ts +++ b/yarn-project/aztec/src/examples/util.ts @@ -1,7 +1,7 @@ import { EthAddress } from '@aztec/aztec.js'; import type { Abi, Narrow } from 'abitype'; -import { Account, Chain, Hex, HttpTransport, PublicClient, WalletClient } from 'viem'; +import { type Account, type Chain, type Hex, type HttpTransport, type PublicClient, type WalletClient } from 'viem'; /** * Helper function to deploy ETH contracts. diff --git a/yarn-project/aztec/src/sandbox.ts b/yarn-project/aztec/src/sandbox.ts index b5ae376daa4b..030a8ab052db 100644 --- a/yarn-project/aztec/src/sandbox.ts +++ b/yarn-project/aztec/src/sandbox.ts @@ -1,13 +1,13 @@ #!/usr/bin/env -S node --no-warnings -import { AztecNodeConfig, AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node'; -import { AztecAddress, BatchCall, SignerlessWallet, Wallet } from '@aztec/aztec.js'; +import { type AztecNodeConfig, AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node'; +import { AztecAddress, BatchCall, SignerlessWallet, type Wallet } from '@aztec/aztec.js'; import { deployInstance, registerContractClass } from '@aztec/aztec.js/deployment'; -import { AztecNode } from '@aztec/circuit-types'; +import { type AztecNode } from '@aztec/circuit-types'; import { DefaultMultiCallEntrypoint } from '@aztec/entrypoints/multi-call'; import { - DeployL1Contracts, - L1ContractAddresses, - L1ContractArtifactsForDeployment, + type DeployL1Contracts, + type L1ContractAddresses, + type L1ContractArtifactsForDeployment, NULL_KEY, createEthereumChain, deployL1Contracts, @@ -31,9 +31,15 @@ import { RollupBytecode, } from '@aztec/l1-artifacts'; import { getCanonicalGasToken } from '@aztec/protocol-contracts/gas-token'; -import { PXEServiceConfig, createPXEService, getPXEServiceConfig } from '@aztec/pxe'; +import { type PXEServiceConfig, createPXEService, getPXEServiceConfig } from '@aztec/pxe'; -import { HDAccount, PrivateKeyAccount, createPublicClient, getContract, http as httpViemTransport } from 'viem'; +import { + type HDAccount, + type PrivateKeyAccount, + createPublicClient, + getContract, + http as httpViemTransport, +} from 'viem'; import { mnemonicToAccount } from 'viem/accounts'; import { foundry } from 'viem/chains'; diff --git a/yarn-project/circuit-types/src/aztec_node/rpc/aztec_node_client.ts b/yarn-project/circuit-types/src/aztec_node/rpc/aztec_node_client.ts index 2e093883d1e8..79f9795f9f4b 100644 --- a/yarn-project/circuit-types/src/aztec_node/rpc/aztec_node_client.ts +++ b/yarn-project/circuit-types/src/aztec_node/rpc/aztec_node_client.ts @@ -5,7 +5,7 @@ import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; import { createJsonRpcClient, defaultFetch } from '@aztec/foundation/json-rpc/client'; -import { AztecNode } from '../../interfaces/aztec-node.js'; +import { type AztecNode } from '../../interfaces/aztec-node.js'; import { NullifierMembershipWitness } from '../../interfaces/nullifier_tree.js'; import { L2Block } from '../../l2_block.js'; import { EncryptedL2BlockL2Logs, ExtendedUnencryptedL2Log, LogId, UnencryptedL2BlockL2Logs } from '../../logs/index.js'; diff --git a/yarn-project/circuit-types/src/index.ts b/yarn-project/circuit-types/src/index.ts index 31213c9cb9bb..f798ddff0f1e 100644 --- a/yarn-project/circuit-types/src/index.ts +++ b/yarn-project/circuit-types/src/index.ts @@ -20,4 +20,4 @@ export * from './packed_arguments.js'; export * from './interfaces/index.js'; export * from './auth_witness.js'; export * from './aztec_node/rpc/index.js'; -export { CompleteAddress, PublicKey, PartialAddress, GrumpkinPrivateKey } from '@aztec/circuits.js'; +export { CompleteAddress, type PublicKey, type PartialAddress, type GrumpkinPrivateKey } from '@aztec/circuits.js'; diff --git a/yarn-project/circuit-types/src/interfaces/aztec-node.ts b/yarn-project/circuit-types/src/interfaces/aztec-node.ts index 5c03eddccbc6..7a9e950b601e 100644 --- a/yarn-project/circuit-types/src/interfaces/aztec-node.ts +++ b/yarn-project/circuit-types/src/interfaces/aztec-node.ts @@ -6,19 +6,25 @@ import { NULLIFIER_TREE_HEIGHT, PUBLIC_DATA_TREE_HEIGHT, } from '@aztec/circuits.js'; -import { L1ContractAddresses } from '@aztec/ethereum'; +import { type L1ContractAddresses } from '@aztec/ethereum'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; -import { ContractClassPublic, ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type ContractClassPublic, type ContractInstanceWithAddress } from '@aztec/types/contracts'; import { L2Block } from '../l2_block.js'; -import { FromLogType, GetUnencryptedLogsResponse, L2BlockL2Logs, LogFilter, LogType } from '../logs/index.js'; +import { + type FromLogType, + type GetUnencryptedLogsResponse, + L2BlockL2Logs, + type LogFilter, + LogType, +} from '../logs/index.js'; import { MerkleTreeId } from '../merkle_tree_id.js'; import { SiblingPath } from '../sibling_path/index.js'; import { Tx, TxHash, TxReceipt } from '../tx/index.js'; import { TxEffect } from '../tx_effect.js'; -import { SequencerConfig } from './configs.js'; -import { L2BlockNumber } from './l2_block_number.js'; +import { type SequencerConfig } from './configs.js'; +import { type L2BlockNumber } from './l2_block_number.js'; import { NullifierMembershipWitness } from './nullifier_tree.js'; import { PublicDataWitness } from './public_data_tree.js'; diff --git a/yarn-project/circuit-types/src/interfaces/block-prover.ts b/yarn-project/circuit-types/src/interfaces/block-prover.ts index 9e02a117b22b..51763d604630 100644 --- a/yarn-project/circuit-types/src/interfaces/block-prover.ts +++ b/yarn-project/circuit-types/src/interfaces/block-prover.ts @@ -1,7 +1,7 @@ import { Fr, GlobalVariables, Proof } from '@aztec/circuits.js'; import { L2Block } from '../l2_block.js'; -import { ProcessedTx } from '../tx/processed_tx.js'; +import { type ProcessedTx } from '../tx/processed_tx.js'; export enum PROVING_STATUS { SUCCESS, diff --git a/yarn-project/circuit-types/src/interfaces/prover-client.ts b/yarn-project/circuit-types/src/interfaces/prover-client.ts index ac803d0e94bd..5c2ef55b8d57 100644 --- a/yarn-project/circuit-types/src/interfaces/prover-client.ts +++ b/yarn-project/circuit-types/src/interfaces/prover-client.ts @@ -1,4 +1,4 @@ -import { BlockProver } from './block-prover.js'; +import { type BlockProver } from './block-prover.js'; /** * The interface to the prover client. diff --git a/yarn-project/circuit-types/src/interfaces/pxe.ts b/yarn-project/circuit-types/src/interfaces/pxe.ts index 384ccdb14378..f3c2f6412c75 100644 --- a/yarn-project/circuit-types/src/interfaces/pxe.ts +++ b/yarn-project/circuit-types/src/interfaces/pxe.ts @@ -1,17 +1,17 @@ -import { AztecAddress, CompleteAddress, Fr, GrumpkinPrivateKey, PartialAddress } from '@aztec/circuits.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; -import { ContractClassWithId, ContractInstanceWithAddress } from '@aztec/types/contracts'; -import { NodeInfo } from '@aztec/types/interfaces'; +import { AztecAddress, CompleteAddress, Fr, type GrumpkinPrivateKey, type PartialAddress } from '@aztec/circuits.js'; +import { type ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractClassWithId, type ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type NodeInfo } from '@aztec/types/interfaces'; import { AuthWitness } from '../auth_witness.js'; import { L2Block } from '../l2_block.js'; -import { GetUnencryptedLogsResponse, LogFilter } from '../logs/index.js'; +import { type GetUnencryptedLogsResponse, type LogFilter } from '../logs/index.js'; import { ExtendedNote } from '../notes/index.js'; -import { NoteFilter } from '../notes/note_filter.js'; +import { type NoteFilter } from '../notes/note_filter.js'; import { Tx, TxHash, TxReceipt } from '../tx/index.js'; import { TxEffect } from '../tx_effect.js'; import { TxExecutionRequest } from '../tx_execution_request.js'; -import { SyncStatus } from './sync-status.js'; +import { type SyncStatus } from './sync-status.js'; // docs:start:pxe-interface /** diff --git a/yarn-project/circuit-types/src/keys/key_pair.ts b/yarn-project/circuit-types/src/keys/key_pair.ts index 43809c2ad7a1..2f4c0c1e3d31 100644 --- a/yarn-project/circuit-types/src/keys/key_pair.ts +++ b/yarn-project/circuit-types/src/keys/key_pair.ts @@ -1,4 +1,4 @@ -import { GrumpkinPrivateKey, PublicKey } from '@aztec/circuits.js'; +import { type GrumpkinPrivateKey, type PublicKey } from '@aztec/circuits.js'; /** * Represents a cryptographic public-private key pair. diff --git a/yarn-project/circuit-types/src/keys/key_store.ts b/yarn-project/circuit-types/src/keys/key_store.ts index f70648a0c4ce..afd807b5fb40 100644 --- a/yarn-project/circuit-types/src/keys/key_store.ts +++ b/yarn-project/circuit-types/src/keys/key_store.ts @@ -1,4 +1,4 @@ -import { AztecAddress, GrumpkinPrivateKey, PublicKey } from '@aztec/circuits.js'; +import { AztecAddress, type GrumpkinPrivateKey, type PublicKey } from '@aztec/circuits.js'; /** * Represents a secure storage for managing keys. diff --git a/yarn-project/circuit-types/src/l2_block_downloader/l2_block_downloader.ts b/yarn-project/circuit-types/src/l2_block_downloader/l2_block_downloader.ts index fb322129b5e5..e0c23e0675f9 100644 --- a/yarn-project/circuit-types/src/l2_block_downloader/l2_block_downloader.ts +++ b/yarn-project/circuit-types/src/l2_block_downloader/l2_block_downloader.ts @@ -4,7 +4,7 @@ import { createDebugLogger } from '@aztec/foundation/log'; import { InterruptibleSleep } from '@aztec/foundation/sleep'; import { L2Block } from '../l2_block.js'; -import { L2BlockSource } from '../l2_block_source.js'; +import { type L2BlockSource } from '../l2_block_source.js'; const log = createDebugLogger('aztec:l2_block_downloader'); diff --git a/yarn-project/circuit-types/src/logs/l1_note_payload/encrypt_buffer.ts b/yarn-project/circuit-types/src/logs/l1_note_payload/encrypt_buffer.ts index 8883ff8941e1..4d6994228931 100644 --- a/yarn-project/circuit-types/src/logs/l1_note_payload/encrypt_buffer.ts +++ b/yarn-project/circuit-types/src/logs/l1_note_payload/encrypt_buffer.ts @@ -1,4 +1,4 @@ -import { GrumpkinPrivateKey, PublicKey } from '@aztec/circuits.js'; +import { type GrumpkinPrivateKey, type PublicKey } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { sha256 } from '@aztec/foundation/crypto'; import { Point } from '@aztec/foundation/fields'; diff --git a/yarn-project/circuit-types/src/logs/l1_note_payload/l1_note_payload.ts b/yarn-project/circuit-types/src/logs/l1_note_payload/l1_note_payload.ts index 1dd11c02ceea..f442cbf34368 100644 --- a/yarn-project/circuit-types/src/logs/l1_note_payload/l1_note_payload.ts +++ b/yarn-project/circuit-types/src/logs/l1_note_payload/l1_note_payload.ts @@ -1,4 +1,4 @@ -import { AztecAddress, GrumpkinPrivateKey, PublicKey } from '@aztec/circuits.js'; +import { AztecAddress, type GrumpkinPrivateKey, type PublicKey } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { Fr, GrumpkinScalar } from '@aztec/foundation/fields'; import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; diff --git a/yarn-project/circuit-types/src/logs/l1_note_payload/tagged_note.ts b/yarn-project/circuit-types/src/logs/l1_note_payload/tagged_note.ts index f1ada6ec614b..e517d78149c0 100644 --- a/yarn-project/circuit-types/src/logs/l1_note_payload/tagged_note.ts +++ b/yarn-project/circuit-types/src/logs/l1_note_payload/tagged_note.ts @@ -1,4 +1,4 @@ -import { GrumpkinPrivateKey, PublicKey } from '@aztec/circuits.js'; +import { type GrumpkinPrivateKey, type PublicKey } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; diff --git a/yarn-project/circuit-types/src/logs/l2_logs_source.ts b/yarn-project/circuit-types/src/logs/l2_logs_source.ts index d6d9ac4d1d96..0c7803f5d5b4 100644 --- a/yarn-project/circuit-types/src/logs/l2_logs_source.ts +++ b/yarn-project/circuit-types/src/logs/l2_logs_source.ts @@ -1,7 +1,7 @@ -import { GetUnencryptedLogsResponse } from './get_unencrypted_logs_response.js'; +import { type GetUnencryptedLogsResponse } from './get_unencrypted_logs_response.js'; import { L2BlockL2Logs } from './l2_block_l2_logs.js'; -import { LogFilter } from './log_filter.js'; -import { FromLogType, LogType } from './log_type.js'; +import { type LogFilter } from './log_filter.js'; +import { type FromLogType, LogType } from './log_type.js'; /** * Interface of classes allowing for the retrieval of logs. diff --git a/yarn-project/circuit-types/src/mocks.ts b/yarn-project/circuit-types/src/mocks.ts index 18700c91c163..cb9808eaaadd 100644 --- a/yarn-project/circuit-types/src/mocks.ts +++ b/yarn-project/circuit-types/src/mocks.ts @@ -7,13 +7,13 @@ import { computeContractClassId, getContractClassFromArtifact, } from '@aztec/circuits.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractArtifact } from '@aztec/foundation/abi'; import { makeTuple } from '@aztec/foundation/array'; import { times } from '@aztec/foundation/collection'; import { randomBytes } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; -import { Tuple } from '@aztec/foundation/serialize'; -import { ContractInstanceWithAddress, SerializableContractInstance } from '@aztec/types/contracts'; +import { type Tuple } from '@aztec/foundation/serialize'; +import { type ContractInstanceWithAddress, SerializableContractInstance } from '@aztec/types/contracts'; import { EncryptedL2Log } from './logs/encrypted_l2_log.js'; import { EncryptedFunctionL2Logs, EncryptedTxL2Logs, Note, UnencryptedTxL2Logs } from './logs/index.js'; diff --git a/yarn-project/circuit-types/src/packed_arguments.ts b/yarn-project/circuit-types/src/packed_arguments.ts index d5589a77ad17..29452c88bfc6 100644 --- a/yarn-project/circuit-types/src/packed_arguments.ts +++ b/yarn-project/circuit-types/src/packed_arguments.ts @@ -1,7 +1,7 @@ import { Fr, Vector } from '@aztec/circuits.js'; import { computeVarArgsHash } from '@aztec/circuits.js/hash'; import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; /** * Packs a set of arguments into a hash. diff --git a/yarn-project/circuit-types/src/sibling_path/sibling_path.ts b/yarn-project/circuit-types/src/sibling_path/sibling_path.ts index fcfe0eb4d33c..086c57baf80c 100644 --- a/yarn-project/circuit-types/src/sibling_path/sibling_path.ts +++ b/yarn-project/circuit-types/src/sibling_path/sibling_path.ts @@ -1,12 +1,12 @@ import { makeTuple } from '@aztec/foundation/array'; import { Fr } from '@aztec/foundation/fields'; import { - Tuple, + type Tuple, assertLength, deserializeArrayFromVector, serializeArrayOfBufferableToVector, } from '@aztec/foundation/serialize'; -import { Hasher } from '@aztec/types/interfaces'; +import { type Hasher } from '@aztec/types/interfaces'; /** * Contains functionality to compute and serialize/deserialize a sibling path. diff --git a/yarn-project/circuit-types/src/simulation_error.ts b/yarn-project/circuit-types/src/simulation_error.ts index 47188b7b05ad..c4f33151cfab 100644 --- a/yarn-project/circuit-types/src/simulation_error.ts +++ b/yarn-project/circuit-types/src/simulation_error.ts @@ -1,5 +1,5 @@ import { AztecAddress, FunctionSelector } from '@aztec/circuits.js'; -import { OpcodeLocation } from '@aztec/foundation/abi'; +import { type OpcodeLocation } from '@aztec/foundation/abi'; /** * Address and selector of a function that failed during simulation. diff --git a/yarn-project/circuit-types/src/stats/benchmarks.ts b/yarn-project/circuit-types/src/stats/benchmarks.ts index 284cdadd48fc..37c09f407277 100644 --- a/yarn-project/circuit-types/src/stats/benchmarks.ts +++ b/yarn-project/circuit-types/src/stats/benchmarks.ts @@ -1,4 +1,4 @@ -import { MetricName } from './metrics.js'; +import { type MetricName } from './metrics.js'; /** Aggregated benchmark results. */ export type BenchmarkResults = Partial>; diff --git a/yarn-project/circuit-types/src/stats/metrics.ts b/yarn-project/circuit-types/src/stats/metrics.ts index 084fc0584357..4ee8ea7e04c7 100644 --- a/yarn-project/circuit-types/src/stats/metrics.ts +++ b/yarn-project/circuit-types/src/stats/metrics.ts @@ -1,4 +1,4 @@ -import { StatsEventName } from './stats.js'; +import { type StatsEventName } from './stats.js'; /** How a metric is grouped in benchmarks: by block size, by length of chain processed, or by circuit name. */ export type MetricGroupBy = diff --git a/yarn-project/circuit-types/src/tx/processed_tx.ts b/yarn-project/circuit-types/src/tx/processed_tx.ts index 410052f705a1..e1c7854a1b00 100644 --- a/yarn-project/circuit-types/src/tx/processed_tx.ts +++ b/yarn-project/circuit-types/src/tx/processed_tx.ts @@ -22,7 +22,7 @@ import { ValidationRequests, makeEmptyProof, } from '@aztec/circuits.js'; -import { Tuple } from '@aztec/foundation/serialize'; +import { type Tuple } from '@aztec/foundation/serialize'; /** * Represents a tx that has been processed by the sequencer public processor, diff --git a/yarn-project/circuit-types/src/tx/tx.ts b/yarn-project/circuit-types/src/tx/tx.ts index 4ce149a3720d..181bc5d969ba 100644 --- a/yarn-project/circuit-types/src/tx/tx.ts +++ b/yarn-project/circuit-types/src/tx/tx.ts @@ -9,10 +9,10 @@ import { import { arrayNonEmptyLength } from '@aztec/foundation/collection'; import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; -import { GetUnencryptedLogsResponse } from '../logs/get_unencrypted_logs_response.js'; -import { L2LogsSource } from '../logs/l2_logs_source.js'; +import { type GetUnencryptedLogsResponse } from '../logs/get_unencrypted_logs_response.js'; +import { type L2LogsSource } from '../logs/l2_logs_source.js'; import { EncryptedTxL2Logs, UnencryptedTxL2Logs } from '../logs/tx_l2_logs.js'; -import { TxStats } from '../stats/stats.js'; +import { type TxStats } from '../stats/stats.js'; import { TxHash } from './tx_hash.js'; /** diff --git a/yarn-project/circuit-types/src/tx_effect.ts b/yarn-project/circuit-types/src/tx_effect.ts index 5814843f147c..a078571d6a34 100644 --- a/yarn-project/circuit-types/src/tx_effect.ts +++ b/yarn-project/circuit-types/src/tx_effect.ts @@ -12,7 +12,7 @@ import { padArrayEnd } from '@aztec/foundation/collection'; import { sha256 } from '@aztec/foundation/crypto'; import { BufferReader, - Tuple, + type Tuple, assertLength, serializeArrayOfBufferableToVector, truncateAndPad, diff --git a/yarn-project/circuit-types/src/tx_execution_request.ts b/yarn-project/circuit-types/src/tx_execution_request.ts index 9f68f8fc6ebe..479cbf0d7646 100644 --- a/yarn-project/circuit-types/src/tx_execution_request.ts +++ b/yarn-project/circuit-types/src/tx_execution_request.ts @@ -1,6 +1,6 @@ import { AztecAddress, Fr, FunctionData, TxContext, TxRequest, Vector } from '@aztec/circuits.js'; import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; import { AuthWitness } from './auth_witness.js'; import { PackedArguments } from './packed_arguments.js'; diff --git a/yarn-project/circuits.js/src/barretenberg/crypto/ecdsa/signature.ts b/yarn-project/circuits.js/src/barretenberg/crypto/ecdsa/signature.ts index 255f2292acb9..a0d88a67ab5d 100644 --- a/yarn-project/circuits.js/src/barretenberg/crypto/ecdsa/signature.ts +++ b/yarn-project/circuits.js/src/barretenberg/crypto/ecdsa/signature.ts @@ -3,7 +3,7 @@ import { randomBytes } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; import { mapTuple } from '@aztec/foundation/serialize'; -import { Signature } from '../signature/index.js'; +import { type Signature } from '../signature/index.js'; /** * ECDSA signature used for transactions. diff --git a/yarn-project/circuits.js/src/barretenberg/crypto/schnorr/index.ts b/yarn-project/circuits.js/src/barretenberg/crypto/schnorr/index.ts index e6c7cd56183a..c0a3ccd0c3e5 100644 --- a/yarn-project/circuits.js/src/barretenberg/crypto/schnorr/index.ts +++ b/yarn-project/circuits.js/src/barretenberg/crypto/schnorr/index.ts @@ -2,8 +2,8 @@ import { BarretenbergSync } from '@aztec/bb.js'; import { Point } from '@aztec/foundation/fields'; import { numToUInt32BE } from '@aztec/foundation/serialize'; -import { GrumpkinPrivateKey } from '../../../types/grumpkin_private_key.js'; -import { PublicKey } from '../../../types/public_key.js'; +import { type GrumpkinPrivateKey } from '../../../types/grumpkin_private_key.js'; +import { type PublicKey } from '../../../types/public_key.js'; import { SchnorrSignature } from './signature.js'; export * from './signature.js'; diff --git a/yarn-project/circuits.js/src/barretenberg/crypto/schnorr/signature.ts b/yarn-project/circuits.js/src/barretenberg/crypto/schnorr/signature.ts index 4ed9af1f607b..16b200fcd89a 100644 --- a/yarn-project/circuits.js/src/barretenberg/crypto/schnorr/signature.ts +++ b/yarn-project/circuits.js/src/barretenberg/crypto/schnorr/signature.ts @@ -2,7 +2,7 @@ import { randomBytes } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader, mapTuple } from '@aztec/foundation/serialize'; -import { Signature } from '../signature/index.js'; +import { type Signature } from '../signature/index.js'; /** * Schnorr signature used for transactions. diff --git a/yarn-project/circuits.js/src/contract/artifact_hash.ts b/yarn-project/circuits.js/src/contract/artifact_hash.ts index f07138eb1673..4949ce9e58c2 100644 --- a/yarn-project/circuits.js/src/contract/artifact_hash.ts +++ b/yarn-project/circuits.js/src/contract/artifact_hash.ts @@ -1,4 +1,4 @@ -import { ContractArtifact, FunctionArtifact, FunctionSelector, FunctionType } from '@aztec/foundation/abi'; +import { type ContractArtifact, type FunctionArtifact, FunctionSelector, FunctionType } from '@aztec/foundation/abi'; import { sha256 } from '@aztec/foundation/crypto'; import { Fr, reduceFn } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; diff --git a/yarn-project/circuits.js/src/contract/contract_address.test.ts b/yarn-project/circuits.js/src/contract/contract_address.test.ts index 46d6965291e5..47a98c800715 100644 --- a/yarn-project/circuits.js/src/contract/contract_address.test.ts +++ b/yarn-project/circuits.js/src/contract/contract_address.test.ts @@ -1,4 +1,4 @@ -import { ABIParameterVisibility, FunctionAbi, FunctionType } from '@aztec/foundation/abi'; +import { ABIParameterVisibility, type FunctionAbi, FunctionType } from '@aztec/foundation/abi'; import { Fr, Point } from '@aztec/foundation/fields'; import { setupCustomSnapshotSerializers, updateInlineTestData } from '@aztec/foundation/testing'; diff --git a/yarn-project/circuits.js/src/contract/contract_address.ts b/yarn-project/circuits.js/src/contract/contract_address.ts index 68802e622cf9..96196f019719 100644 --- a/yarn-project/circuits.js/src/contract/contract_address.ts +++ b/yarn-project/circuits.js/src/contract/contract_address.ts @@ -1,12 +1,12 @@ -import { FunctionAbi, FunctionSelector, encodeArguments } from '@aztec/foundation/abi'; +import { type FunctionAbi, FunctionSelector, encodeArguments } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { pedersenHash } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; -import { ContractInstance } from '@aztec/types/contracts'; +import { type ContractInstance } from '@aztec/types/contracts'; import { GeneratorIndex } from '../constants.gen.js'; import { computeVarArgsHash } from '../hash/hash.js'; -import { PublicKey } from '../types/public_key.js'; +import { type PublicKey } from '../types/public_key.js'; // TODO(@spalladino): Review all generator indices in this file diff --git a/yarn-project/circuits.js/src/contract/contract_class.ts b/yarn-project/circuits.js/src/contract/contract_class.ts index 8f270051f871..b4834dc86739 100644 --- a/yarn-project/circuits.js/src/contract/contract_class.ts +++ b/yarn-project/circuits.js/src/contract/contract_class.ts @@ -1,9 +1,9 @@ -import { ContractArtifact, FunctionArtifact, FunctionSelector, FunctionType } from '@aztec/foundation/abi'; +import { type ContractArtifact, type FunctionArtifact, FunctionSelector, FunctionType } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; -import { ContractClass, ContractClassWithId } from '@aztec/types/contracts'; +import { type ContractClass, type ContractClassWithId } from '@aztec/types/contracts'; import { computeArtifactHash } from './artifact_hash.js'; -import { ContractClassIdPreimage, computeContractClassIdWithPreimage } from './contract_class_id.js'; +import { type ContractClassIdPreimage, computeContractClassIdWithPreimage } from './contract_class_id.js'; import { packBytecode } from './public_bytecode.js'; /** Contract artifact including its artifact hash */ diff --git a/yarn-project/circuits.js/src/contract/contract_class_id.test.ts b/yarn-project/circuits.js/src/contract/contract_class_id.test.ts index 2700c2481599..7f40b3029a08 100644 --- a/yarn-project/circuits.js/src/contract/contract_class_id.test.ts +++ b/yarn-project/circuits.js/src/contract/contract_class_id.test.ts @@ -1,5 +1,5 @@ import { Fr } from '@aztec/foundation/fields'; -import { ContractClass } from '@aztec/types/contracts'; +import { type ContractClass } from '@aztec/types/contracts'; import { FunctionSelector, computeContractClassId } from '../index.js'; diff --git a/yarn-project/circuits.js/src/contract/contract_class_id.ts b/yarn-project/circuits.js/src/contract/contract_class_id.ts index b82aac66f216..86020074ed6f 100644 --- a/yarn-project/circuits.js/src/contract/contract_class_id.ts +++ b/yarn-project/circuits.js/src/contract/contract_class_id.ts @@ -1,6 +1,6 @@ import { pedersenHash, sha256 } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; -import { ContractClass } from '@aztec/types/contracts'; +import { type ContractClass } from '@aztec/types/contracts'; import { GeneratorIndex } from '../constants.gen.js'; import { computePrivateFunctionsRoot } from './private_function.js'; diff --git a/yarn-project/circuits.js/src/contract/contract_instance.ts b/yarn-project/circuits.js/src/contract/contract_instance.ts index dd96ec194915..4b3e135b3e71 100644 --- a/yarn-project/circuits.js/src/contract/contract_instance.ts +++ b/yarn-project/circuits.js/src/contract/contract_instance.ts @@ -1,12 +1,12 @@ -import { ContractArtifact, FunctionArtifact, getDefaultInitializer } from '@aztec/foundation/abi'; +import { type ContractArtifact, type FunctionArtifact, getDefaultInitializer } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr, Point } from '@aztec/foundation/fields'; -import { ContractInstance, ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type ContractInstance, type ContractInstanceWithAddress } from '@aztec/types/contracts'; import { getContractClassFromArtifact } from '../contract/contract_class.js'; import { computeContractClassId } from '../contract/contract_class_id.js'; -import { PublicKey } from '../types/public_key.js'; +import { type PublicKey } from '../types/public_key.js'; import { computeContractAddressFromInstance, computeInitializationHash, diff --git a/yarn-project/circuits.js/src/contract/events/contract_class_registered_event.ts b/yarn-project/circuits.js/src/contract/events/contract_class_registered_event.ts index 016dd1cbfb40..45024ce72bae 100644 --- a/yarn-project/circuits.js/src/contract/events/contract_class_registered_event.ts +++ b/yarn-project/circuits.js/src/contract/events/contract_class_registered_event.ts @@ -3,7 +3,7 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { toBigIntBE } from '@aztec/foundation/bigint-buffer'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader } from '@aztec/foundation/serialize'; -import { ContractClassPublic } from '@aztec/types/contracts'; +import { type ContractClassPublic } from '@aztec/types/contracts'; import chunk from 'lodash.chunk'; diff --git a/yarn-project/circuits.js/src/contract/events/contract_instance_deployed_event.ts b/yarn-project/circuits.js/src/contract/events/contract_instance_deployed_event.ts index b307070424e4..19de6205fc68 100644 --- a/yarn-project/circuits.js/src/contract/events/contract_instance_deployed_event.ts +++ b/yarn-project/circuits.js/src/contract/events/contract_instance_deployed_event.ts @@ -3,7 +3,7 @@ import { toBigIntBE } from '@aztec/foundation/bigint-buffer'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader } from '@aztec/foundation/serialize'; -import { ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type ContractInstanceWithAddress } from '@aztec/types/contracts'; import { DEPLOYER_CONTRACT_ADDRESS, DEPLOYER_CONTRACT_INSTANCE_DEPLOYED_MAGIC_VALUE } from '../../constants.gen.js'; diff --git a/yarn-project/circuits.js/src/contract/events/private_function_broadcasted_event.ts b/yarn-project/circuits.js/src/contract/events/private_function_broadcasted_event.ts index a11c23de56d0..5b7ca6d4f9fe 100644 --- a/yarn-project/circuits.js/src/contract/events/private_function_broadcasted_event.ts +++ b/yarn-project/circuits.js/src/contract/events/private_function_broadcasted_event.ts @@ -2,8 +2,8 @@ import { FunctionSelector, bufferFromFields } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { toBigIntBE } from '@aztec/foundation/bigint-buffer'; import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, Tuple } from '@aztec/foundation/serialize'; -import { ExecutablePrivateFunctionWithMembershipProof, PrivateFunction } from '@aztec/types/contracts'; +import { BufferReader, type Tuple } from '@aztec/foundation/serialize'; +import { type ExecutablePrivateFunctionWithMembershipProof, type PrivateFunction } from '@aztec/types/contracts'; import chunk from 'lodash.chunk'; diff --git a/yarn-project/circuits.js/src/contract/events/unconstrained_function_broadcasted_event.test.ts b/yarn-project/circuits.js/src/contract/events/unconstrained_function_broadcasted_event.test.ts index 995f70d873e6..d331a41b1cf5 100644 --- a/yarn-project/circuits.js/src/contract/events/unconstrained_function_broadcasted_event.test.ts +++ b/yarn-project/circuits.js/src/contract/events/unconstrained_function_broadcasted_event.test.ts @@ -1,7 +1,7 @@ import { FunctionSelector } from '@aztec/foundation/abi'; import { randomBytes } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; -import { Tuple } from '@aztec/foundation/serialize'; +import { type Tuple } from '@aztec/foundation/serialize'; import { setupCustomSnapshotSerializers } from '@aztec/foundation/testing'; import { getSampleUnconstrainedFunctionBroadcastedEventPayload } from '../../tests/fixtures.js'; diff --git a/yarn-project/circuits.js/src/contract/events/unconstrained_function_broadcasted_event.ts b/yarn-project/circuits.js/src/contract/events/unconstrained_function_broadcasted_event.ts index 0ac0fe0d58f8..46e7560e8033 100644 --- a/yarn-project/circuits.js/src/contract/events/unconstrained_function_broadcasted_event.ts +++ b/yarn-project/circuits.js/src/contract/events/unconstrained_function_broadcasted_event.ts @@ -3,8 +3,8 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { toBigIntBE } from '@aztec/foundation/bigint-buffer'; import { removeArrayPaddingEnd } from '@aztec/foundation/collection'; import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, Tuple } from '@aztec/foundation/serialize'; -import { UnconstrainedFunction, UnconstrainedFunctionWithMembershipProof } from '@aztec/types/contracts'; +import { BufferReader, type Tuple } from '@aztec/foundation/serialize'; +import { type UnconstrainedFunction, type UnconstrainedFunctionWithMembershipProof } from '@aztec/types/contracts'; import chunk from 'lodash.chunk'; diff --git a/yarn-project/circuits.js/src/contract/private_function.test.ts b/yarn-project/circuits.js/src/contract/private_function.test.ts index e39d828bf3bf..c4bbb377b010 100644 --- a/yarn-project/circuits.js/src/contract/private_function.test.ts +++ b/yarn-project/circuits.js/src/contract/private_function.test.ts @@ -1,6 +1,6 @@ import { Fr } from '@aztec/foundation/fields'; import { setupCustomSnapshotSerializers } from '@aztec/foundation/testing'; -import { PrivateFunction } from '@aztec/types/contracts'; +import { type PrivateFunction } from '@aztec/types/contracts'; import { fr, makeSelector } from '../tests/factories.js'; import { computePrivateFunctionsRoot, computePrivateFunctionsTree } from './private_function.js'; diff --git a/yarn-project/circuits.js/src/contract/private_function.ts b/yarn-project/circuits.js/src/contract/private_function.ts index a6670b03c51f..04b19a1a0503 100644 --- a/yarn-project/circuits.js/src/contract/private_function.ts +++ b/yarn-project/circuits.js/src/contract/private_function.ts @@ -1,6 +1,6 @@ import { pedersenHash } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; -import { PrivateFunction } from '@aztec/types/contracts'; +import { type PrivateFunction } from '@aztec/types/contracts'; import { FUNCTION_TREE_HEIGHT, GeneratorIndex } from '../constants.gen.js'; import { MerkleTree, MerkleTreeCalculator } from '../merkle/index.js'; diff --git a/yarn-project/circuits.js/src/contract/private_function_membership_proof.test.ts b/yarn-project/circuits.js/src/contract/private_function_membership_proof.test.ts index e50b2332d67a..19b85857f266 100644 --- a/yarn-project/circuits.js/src/contract/private_function_membership_proof.test.ts +++ b/yarn-project/circuits.js/src/contract/private_function_membership_proof.test.ts @@ -1,10 +1,10 @@ -import { ContractArtifact, FunctionArtifact, FunctionSelector, FunctionType } from '@aztec/foundation/abi'; +import { type ContractArtifact, type FunctionArtifact, FunctionSelector, FunctionType } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; -import { ContractClass } from '@aztec/types/contracts'; +import { type ContractClass } from '@aztec/types/contracts'; import { getBenchmarkContractArtifact } from '../tests/fixtures.js'; import { computeVerificationKeyHash, getContractClassFromArtifact } from './contract_class.js'; -import { ContractClassIdPreimage } from './contract_class_id.js'; +import { type ContractClassIdPreimage } from './contract_class_id.js'; import { createPrivateFunctionMembershipProof, isValidPrivateFunctionMembershipProof, diff --git a/yarn-project/circuits.js/src/contract/private_function_membership_proof.ts b/yarn-project/circuits.js/src/contract/private_function_membership_proof.ts index bd11a3a98672..62585a7e4076 100644 --- a/yarn-project/circuits.js/src/contract/private_function_membership_proof.ts +++ b/yarn-project/circuits.js/src/contract/private_function_membership_proof.ts @@ -1,10 +1,10 @@ -import { ContractArtifact, FunctionSelector, FunctionType } from '@aztec/foundation/abi'; +import { type ContractArtifact, FunctionSelector, FunctionType } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; import { - ContractClassPublic, - ExecutablePrivateFunctionWithMembershipProof, - PrivateFunctionMembershipProof, + type ContractClassPublic, + type ExecutablePrivateFunctionWithMembershipProof, + type PrivateFunctionMembershipProof, } from '@aztec/types/contracts'; import { computeRootFromSiblingPath } from '../merkle/index.js'; diff --git a/yarn-project/circuits.js/src/contract/public_bytecode.test.ts b/yarn-project/circuits.js/src/contract/public_bytecode.test.ts index 8e4bd7887f4b..86ed8beb1a77 100644 --- a/yarn-project/circuits.js/src/contract/public_bytecode.test.ts +++ b/yarn-project/circuits.js/src/contract/public_bytecode.test.ts @@ -1,4 +1,4 @@ -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractArtifact } from '@aztec/foundation/abi'; import { getBenchmarkContractArtifact } from '../tests/fixtures.js'; import { getContractClassFromArtifact } from './contract_class.js'; diff --git a/yarn-project/circuits.js/src/contract/public_bytecode.ts b/yarn-project/circuits.js/src/contract/public_bytecode.ts index 0292fd55b9d6..66904656074f 100644 --- a/yarn-project/circuits.js/src/contract/public_bytecode.ts +++ b/yarn-project/circuits.js/src/contract/public_bytecode.ts @@ -5,7 +5,7 @@ import { serializeArrayOfBufferableToVector, serializeToBuffer, } from '@aztec/foundation/serialize'; -import { ContractClass } from '@aztec/types/contracts'; +import { type ContractClass } from '@aztec/types/contracts'; import { FUNCTION_SELECTOR_NUM_BYTES } from '../constants.gen.js'; diff --git a/yarn-project/circuits.js/src/contract/unconstrained_function_membership_proof.test.ts b/yarn-project/circuits.js/src/contract/unconstrained_function_membership_proof.test.ts index c7b1a4eddeac..35b983e08e29 100644 --- a/yarn-project/circuits.js/src/contract/unconstrained_function_membership_proof.test.ts +++ b/yarn-project/circuits.js/src/contract/unconstrained_function_membership_proof.test.ts @@ -1,10 +1,10 @@ -import { ContractArtifact, FunctionArtifact, FunctionSelector, FunctionType } from '@aztec/foundation/abi'; +import { type ContractArtifact, type FunctionArtifact, FunctionSelector, FunctionType } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; -import { ContractClass } from '@aztec/types/contracts'; +import { type ContractClass } from '@aztec/types/contracts'; import { getTestContractArtifact } from '../tests/fixtures.js'; import { getContractClassFromArtifact } from './contract_class.js'; -import { ContractClassIdPreimage } from './contract_class_id.js'; +import { type ContractClassIdPreimage } from './contract_class_id.js'; import { createUnconstrainedFunctionMembershipProof, isValidUnconstrainedFunctionMembershipProof, diff --git a/yarn-project/circuits.js/src/contract/unconstrained_function_membership_proof.ts b/yarn-project/circuits.js/src/contract/unconstrained_function_membership_proof.ts index 144e11ed81d5..588100b525c8 100644 --- a/yarn-project/circuits.js/src/contract/unconstrained_function_membership_proof.ts +++ b/yarn-project/circuits.js/src/contract/unconstrained_function_membership_proof.ts @@ -1,10 +1,10 @@ -import { ContractArtifact, FunctionSelector, FunctionType } from '@aztec/foundation/abi'; +import { type ContractArtifact, FunctionSelector, FunctionType } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; import { - ContractClassPublic, - UnconstrainedFunctionMembershipProof, - UnconstrainedFunctionWithMembershipProof, + type ContractClassPublic, + type UnconstrainedFunctionMembershipProof, + type UnconstrainedFunctionWithMembershipProof, } from '@aztec/types/contracts'; import { computeRootFromSiblingPath } from '../merkle/index.js'; diff --git a/yarn-project/circuits.js/src/hints/build_hints.test.ts b/yarn-project/circuits.js/src/hints/build_hints.test.ts index 9db861afe550..7ac9ee39a521 100644 --- a/yarn-project/circuits.js/src/hints/build_hints.test.ts +++ b/yarn-project/circuits.js/src/hints/build_hints.test.ts @@ -2,13 +2,13 @@ import { makeTuple } from '@aztec/foundation/array'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { padArrayEnd } from '@aztec/foundation/collection'; import { Fr } from '@aztec/foundation/fields'; -import { Tuple } from '@aztec/foundation/serialize'; +import { type Tuple } from '@aztec/foundation/serialize'; import { MAX_NEW_NULLIFIERS_PER_TX, MAX_NULLIFIER_READ_REQUESTS_PER_TX } from '../constants.gen.js'; import { siloNullifier } from '../hash/index.js'; import { NullifierNonExistentReadRequestHintsBuilder, - NullifierReadRequestHints, + type NullifierReadRequestHints, NullifierReadRequestHintsBuilder, PendingReadHint, ReadRequestContext, diff --git a/yarn-project/circuits.js/src/hints/build_hints.ts b/yarn-project/circuits.js/src/hints/build_hints.ts index c22df8b15fea..17dd14c1f827 100644 --- a/yarn-project/circuits.js/src/hints/build_hints.ts +++ b/yarn-project/circuits.js/src/hints/build_hints.ts @@ -1,7 +1,7 @@ import { padArrayEnd } from '@aztec/foundation/collection'; import { Fr } from '@aztec/foundation/fields'; -import { Tuple } from '@aztec/foundation/serialize'; -import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; +import { type Tuple } from '@aztec/foundation/serialize'; +import { type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; import { MAX_NEW_NULLIFIERS_PER_TX, diff --git a/yarn-project/circuits.js/src/hints/utils.test.ts b/yarn-project/circuits.js/src/hints/utils.test.ts index e5897e30a87f..1ae2d47ead50 100644 --- a/yarn-project/circuits.js/src/hints/utils.test.ts +++ b/yarn-project/circuits.js/src/hints/utils.test.ts @@ -1,6 +1,6 @@ -import { IsEmpty } from '@aztec/circuits.js'; +import { type IsEmpty } from '@aztec/circuits.js'; import { makeTuple } from '@aztec/foundation/array'; -import { Tuple } from '@aztec/foundation/serialize'; +import { type Tuple } from '@aztec/foundation/serialize'; import { concatAccumulatedData, countAccumulatedItems, mergeAccumulatedData } from './utils.js'; diff --git a/yarn-project/circuits.js/src/hints/utils.ts b/yarn-project/circuits.js/src/hints/utils.ts index d98de228d7d3..c63dad6aa8d2 100644 --- a/yarn-project/circuits.js/src/hints/utils.ts +++ b/yarn-project/circuits.js/src/hints/utils.ts @@ -1,4 +1,4 @@ -import { Tuple } from '@aztec/foundation/serialize'; +import { type Tuple } from '@aztec/foundation/serialize'; export interface IsEmpty { isEmpty: () => boolean; diff --git a/yarn-project/circuits.js/src/keys/index.ts b/yarn-project/circuits.js/src/keys/index.ts index 3f4969cf0cb5..6ee1d56e3a2d 100644 --- a/yarn-project/circuits.js/src/keys/index.ts +++ b/yarn-project/circuits.js/src/keys/index.ts @@ -3,7 +3,7 @@ import { pedersenHash } from '@aztec/foundation/crypto'; import { Fr, GrumpkinScalar } from '@aztec/foundation/fields'; import { Grumpkin } from '../barretenberg/crypto/grumpkin/index.js'; -import { GrumpkinPrivateKey } from '../types/grumpkin_private_key.js'; +import { type GrumpkinPrivateKey } from '../types/grumpkin_private_key.js'; /** * Derives the public key of a secret key. diff --git a/yarn-project/circuits.js/src/structs/aggregation_object.ts b/yarn-project/circuits.js/src/structs/aggregation_object.ts index 3cc56b45391c..3056df1797b1 100644 --- a/yarn-project/circuits.js/src/structs/aggregation_object.ts +++ b/yarn-project/circuits.js/src/structs/aggregation_object.ts @@ -2,7 +2,7 @@ import { times } from '@aztec/foundation/collection'; import { Fq, Fr } from '@aztec/foundation/fields'; import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; -import { UInt32, Vector } from './shared.js'; +import { type UInt32, Vector } from './shared.js'; import { G1AffineElement } from './verification_key.js'; /** diff --git a/yarn-project/circuits.js/src/structs/call_context.ts b/yarn-project/circuits.js/src/structs/call_context.ts index 17438a431a74..68aaaa99c1a6 100644 --- a/yarn-project/circuits.js/src/structs/call_context.ts +++ b/yarn-project/circuits.js/src/structs/call_context.ts @@ -3,7 +3,7 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; import { CALL_CONTEXT_LENGTH } from '../constants.gen.js'; diff --git a/yarn-project/circuits.js/src/structs/call_request.ts b/yarn-project/circuits.js/src/structs/call_request.ts index 353cce504f4e..89fef28fcb7a 100644 --- a/yarn-project/circuits.js/src/structs/call_request.ts +++ b/yarn-project/circuits.js/src/structs/call_request.ts @@ -1,7 +1,7 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; /** * Caller context. diff --git a/yarn-project/circuits.js/src/structs/complete_address.ts b/yarn-project/circuits.js/src/structs/complete_address.ts index da3d0be17b1f..40794fbe5d42 100644 --- a/yarn-project/circuits.js/src/structs/complete_address.ts +++ b/yarn-project/circuits.js/src/structs/complete_address.ts @@ -4,9 +4,9 @@ import { BufferReader } from '@aztec/foundation/serialize'; import { Grumpkin } from '../barretenberg/index.js'; import { computeContractAddressFromPartial, computePartialAddress } from '../contract/contract_address.js'; -import { GrumpkinPrivateKey } from '../types/grumpkin_private_key.js'; -import { PartialAddress } from '../types/partial_address.js'; -import { PublicKey } from '../types/public_key.js'; +import { type GrumpkinPrivateKey } from '../types/grumpkin_private_key.js'; +import { type PartialAddress } from '../types/partial_address.js'; +import { type PublicKey } from '../types/public_key.js'; /** * A complete address is a combination of an Aztec address, a public key and a partial address. diff --git a/yarn-project/circuits.js/src/structs/contract_storage_update_request.ts b/yarn-project/circuits.js/src/structs/contract_storage_update_request.ts index 37f9a678717a..8508fa8c7b8a 100644 --- a/yarn-project/circuits.js/src/structs/contract_storage_update_request.ts +++ b/yarn-project/circuits.js/src/structs/contract_storage_update_request.ts @@ -1,6 +1,6 @@ import { Fr } from '@aztec/foundation/fields'; import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; import { CONTRACT_STORAGE_UPDATE_REQUEST_LENGTH } from '../constants.gen.js'; diff --git a/yarn-project/circuits.js/src/structs/function_data.ts b/yarn-project/circuits.js/src/structs/function_data.ts index 08c803270b5a..bb5001d9e2e3 100644 --- a/yarn-project/circuits.js/src/structs/function_data.ts +++ b/yarn-project/circuits.js/src/structs/function_data.ts @@ -1,10 +1,10 @@ -import { FunctionAbi, FunctionSelector, FunctionType } from '@aztec/foundation/abi'; +import { type FunctionAbi, FunctionSelector, FunctionType } from '@aztec/foundation/abi'; import { pedersenHash } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize'; import { FUNCTION_DATA_LENGTH, GeneratorIndex } from '../constants.gen.js'; -import { ContractFunctionDao } from '../types/contract_function_dao.js'; +import { type ContractFunctionDao } from '../types/contract_function_dao.js'; /** Function description for circuit. */ export class FunctionData { diff --git a/yarn-project/circuits.js/src/structs/global_variables.ts b/yarn-project/circuits.js/src/structs/global_variables.ts index 05c90e8b0e39..d3f762785c4f 100644 --- a/yarn-project/circuits.js/src/structs/global_variables.ts +++ b/yarn-project/circuits.js/src/structs/global_variables.ts @@ -2,7 +2,7 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; import { GLOBAL_VARIABLES_LENGTH } from '../constants.gen.js'; diff --git a/yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.ts b/yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.ts index 326e410a257e..a3a62c2e5d9e 100644 --- a/yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.ts +++ b/yarn-project/circuits.js/src/structs/kernel/combined_accumulated_data.ts @@ -2,7 +2,7 @@ import { makeTuple } from '@aztec/foundation/array'; import { padArrayEnd } from '@aztec/foundation/collection'; import { Fr } from '@aztec/foundation/fields'; import { createDebugOnlyLogger } from '@aztec/foundation/log'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; import { inspect } from 'util'; diff --git a/yarn-project/circuits.js/src/structs/kernel/private_call_data.ts b/yarn-project/circuits.js/src/structs/kernel/private_call_data.ts index eba16946eea8..7026461a9976 100644 --- a/yarn-project/circuits.js/src/structs/kernel/private_call_data.ts +++ b/yarn-project/circuits.js/src/structs/kernel/private_call_data.ts @@ -1,6 +1,6 @@ import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type FieldsOf } from '@aztec/foundation/types'; import { FUNCTION_TREE_HEIGHT, diff --git a/yarn-project/circuits.js/src/structs/kernel/private_kernel_inner_data.ts b/yarn-project/circuits.js/src/structs/kernel/private_kernel_inner_data.ts index ab18c8460a03..580de7e57e3f 100644 --- a/yarn-project/circuits.js/src/structs/kernel/private_kernel_inner_data.ts +++ b/yarn-project/circuits.js/src/structs/kernel/private_kernel_inner_data.ts @@ -1,10 +1,10 @@ import { makeTuple } from '@aztec/foundation/array'; import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; import { VK_TREE_HEIGHT } from '../../constants.gen.js'; import { Proof, makeEmptyProof } from '../proof.js'; -import { UInt32 } from '../shared.js'; +import { type UInt32 } from '../shared.js'; import { VerificationKey } from '../verification_key.js'; import { PrivateKernelInnerCircuitPublicInputs } from './private_kernel_inner_circuit_public_inputs.js'; diff --git a/yarn-project/circuits.js/src/structs/kernel/private_kernel_tail_circuit_private_inputs.ts b/yarn-project/circuits.js/src/structs/kernel/private_kernel_tail_circuit_private_inputs.ts index 2f90462d3bd5..ad629499041c 100644 --- a/yarn-project/circuits.js/src/structs/kernel/private_kernel_tail_circuit_private_inputs.ts +++ b/yarn-project/circuits.js/src/structs/kernel/private_kernel_tail_circuit_private_inputs.ts @@ -1,4 +1,4 @@ -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; import { MAX_NEW_NOTE_HASHES_PER_TX, @@ -6,9 +6,9 @@ import { MAX_NOTE_HASH_READ_REQUESTS_PER_TX, MAX_NULLIFIER_KEY_VALIDATION_REQUESTS_PER_TX, } from '../../constants.gen.js'; -import { GrumpkinPrivateKey } from '../../index.js'; +import { type GrumpkinPrivateKey } from '../../index.js'; import { Fr, GrumpkinScalar } from '../index.js'; -import { NullifierReadRequestHints, nullifierReadRequestHintsFromBuffer } from '../read_request_hints.js'; +import { type NullifierReadRequestHints, nullifierReadRequestHintsFromBuffer } from '../read_request_hints.js'; import { SideEffect, SideEffectLinkedToNoteHash } from '../side_effects.js'; import { PrivateKernelInnerData } from './private_kernel_inner_data.js'; diff --git a/yarn-project/circuits.js/src/structs/kernel/private_kernel_tail_data.ts b/yarn-project/circuits.js/src/structs/kernel/private_kernel_tail_data.ts index 52afd0a3efde..837b2a138e34 100644 --- a/yarn-project/circuits.js/src/structs/kernel/private_kernel_tail_data.ts +++ b/yarn-project/circuits.js/src/structs/kernel/private_kernel_tail_data.ts @@ -1,10 +1,10 @@ import { makeTuple } from '@aztec/foundation/array'; import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; import { VK_TREE_HEIGHT } from '../../constants.gen.js'; import { Proof, makeEmptyProof } from '../proof.js'; -import { UInt32 } from '../shared.js'; +import { type UInt32 } from '../shared.js'; import { VerificationKey } from '../verification_key.js'; import { PrivateKernelTailCircuitPublicInputs } from './private_kernel_tail_circuit_public_inputs.js'; diff --git a/yarn-project/circuits.js/src/structs/kernel/public_call_data.ts b/yarn-project/circuits.js/src/structs/kernel/public_call_data.ts index c73427c651c7..7b5e32de9ef7 100644 --- a/yarn-project/circuits.js/src/structs/kernel/public_call_data.ts +++ b/yarn-project/circuits.js/src/structs/kernel/public_call_data.ts @@ -1,5 +1,5 @@ import { Fr } from '@aztec/foundation/fields'; -import { Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; import { MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL } from '../../constants.gen.js'; import { CallRequest } from '../call_request.js'; diff --git a/yarn-project/circuits.js/src/structs/kernel/public_kernel_data.ts b/yarn-project/circuits.js/src/structs/kernel/public_kernel_data.ts index 2dfcb7fe9929..c558b5aad571 100644 --- a/yarn-project/circuits.js/src/structs/kernel/public_kernel_data.ts +++ b/yarn-project/circuits.js/src/structs/kernel/public_kernel_data.ts @@ -1,10 +1,10 @@ import { makeTuple } from '@aztec/foundation/array'; import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; import { VK_TREE_HEIGHT } from '../../constants.gen.js'; import { Proof, makeEmptyProof } from '../proof.js'; -import { UInt32 } from '../shared.js'; +import { type UInt32 } from '../shared.js'; import { VerificationKey } from '../verification_key.js'; import { PublicKernelCircuitPublicInputs } from './public_kernel_circuit_public_inputs.js'; diff --git a/yarn-project/circuits.js/src/structs/kernel/public_kernel_tail_circuit_private_inputs.ts b/yarn-project/circuits.js/src/structs/kernel/public_kernel_tail_circuit_private_inputs.ts index 77f3bc4cf112..f102e3706904 100644 --- a/yarn-project/circuits.js/src/structs/kernel/public_kernel_tail_circuit_private_inputs.ts +++ b/yarn-project/circuits.js/src/structs/kernel/public_kernel_tail_circuit_private_inputs.ts @@ -1,7 +1,7 @@ import { serializeToBuffer } from '@aztec/foundation/serialize'; -import { NullifierNonExistentReadRequestHints } from '../non_existent_read_request_hints.js'; -import { NullifierReadRequestHints } from '../read_request_hints.js'; +import { type NullifierNonExistentReadRequestHints } from '../non_existent_read_request_hints.js'; +import { type NullifierReadRequestHints } from '../read_request_hints.js'; import { PublicKernelData } from './public_kernel_data.js'; /** diff --git a/yarn-project/circuits.js/src/structs/kernel/rollup_kernel_data.ts b/yarn-project/circuits.js/src/structs/kernel/rollup_kernel_data.ts index 9945403bdccd..384c383fac0a 100644 --- a/yarn-project/circuits.js/src/structs/kernel/rollup_kernel_data.ts +++ b/yarn-project/circuits.js/src/structs/kernel/rollup_kernel_data.ts @@ -1,10 +1,10 @@ import { makeTuple } from '@aztec/foundation/array'; import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; import { VK_TREE_HEIGHT } from '../../constants.gen.js'; import { Proof, makeEmptyProof } from '../proof.js'; -import { UInt32 } from '../shared.js'; +import { type UInt32 } from '../shared.js'; import { VerificationKey } from '../verification_key.js'; import { RollupKernelCircuitPublicInputs } from './rollup_kernel_circuit_public_inputs.js'; diff --git a/yarn-project/circuits.js/src/structs/max_block_number.ts b/yarn-project/circuits.js/src/structs/max_block_number.ts index cc124de2e267..998fdd4a1a41 100644 --- a/yarn-project/circuits.js/src/structs/max_block_number.ts +++ b/yarn-project/circuits.js/src/structs/max_block_number.ts @@ -1,6 +1,6 @@ import { Fr } from '@aztec/foundation/fields'; import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; import { MAX_BLOCK_NUMBER_LENGTH } from '../constants.gen.js'; diff --git a/yarn-project/circuits.js/src/structs/membership_witness.ts b/yarn-project/circuits.js/src/structs/membership_witness.ts index b2d9211c58b4..db0457ef3940 100644 --- a/yarn-project/circuits.js/src/structs/membership_witness.ts +++ b/yarn-project/circuits.js/src/structs/membership_witness.ts @@ -1,7 +1,7 @@ import { assertMemberLength } from '@aztec/foundation/array'; import { toBigIntBE, toBufferBE } from '@aztec/foundation/bigint-buffer'; import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; /** * Contains information which can be used to prove that a leaf is a member of a Merkle tree. diff --git a/yarn-project/circuits.js/src/structs/non_existent_read_request_hints.ts b/yarn-project/circuits.js/src/structs/non_existent_read_request_hints.ts index 9cd254bc0b99..a459be8be340 100644 --- a/yarn-project/circuits.js/src/structs/non_existent_read_request_hints.ts +++ b/yarn-project/circuits.js/src/structs/non_existent_read_request_hints.ts @@ -1,6 +1,6 @@ import { makeTuple } from '@aztec/foundation/array'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; -import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; import { MAX_NEW_NULLIFIERS_PER_TX, @@ -9,7 +9,7 @@ import { } from '../constants.gen.js'; import { MembershipWitness } from './membership_witness.js'; import { NullifierLeafPreimage } from './rollup/nullifier_leaf/index.js'; -import { SideEffectLinkedToNoteHash, SideEffectType } from './side_effects.js'; +import { SideEffectLinkedToNoteHash, type SideEffectType } from './side_effects.js'; export class NonMembershipHint { constructor(public membershipWitness: MembershipWitness, public leafPreimage: LEAF_PREIMAGE) {} diff --git a/yarn-project/circuits.js/src/structs/note_hash_read_request_membership_witness.ts b/yarn-project/circuits.js/src/structs/note_hash_read_request_membership_witness.ts index d9bb37c0c09b..ffdbbcd6d59d 100644 --- a/yarn-project/circuits.js/src/structs/note_hash_read_request_membership_witness.ts +++ b/yarn-project/circuits.js/src/structs/note_hash_read_request_membership_witness.ts @@ -1,7 +1,7 @@ import { makeTuple, range } from '@aztec/foundation/array'; import { toBufferBE } from '@aztec/foundation/bigint-buffer'; import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; import { MAX_NEW_NOTE_HASHES_PER_CALL, NOTE_HASH_TREE_HEIGHT } from '../constants.gen.js'; import { MembershipWitness } from './membership_witness.js'; diff --git a/yarn-project/circuits.js/src/structs/nullifier_key_validation_request.ts b/yarn-project/circuits.js/src/structs/nullifier_key_validation_request.ts index 37f2a6ad9eab..920bcc288789 100644 --- a/yarn-project/circuits.js/src/structs/nullifier_key_validation_request.ts +++ b/yarn-project/circuits.js/src/structs/nullifier_key_validation_request.ts @@ -6,7 +6,7 @@ import { NULLIFIER_KEY_VALIDATION_REQUEST_CONTEXT_LENGTH, NULLIFIER_KEY_VALIDATION_REQUEST_LENGTH, } from '../constants.gen.js'; -import { GrumpkinPrivateKey } from '../types/grumpkin_private_key.js'; +import { type GrumpkinPrivateKey } from '../types/grumpkin_private_key.js'; /** * Request for validating a nullifier key pair used in the app. diff --git a/yarn-project/circuits.js/src/structs/parity/base_parity_inputs.ts b/yarn-project/circuits.js/src/structs/parity/base_parity_inputs.ts index c369424cdc08..d696139ca883 100644 --- a/yarn-project/circuits.js/src/structs/parity/base_parity_inputs.ts +++ b/yarn-project/circuits.js/src/structs/parity/base_parity_inputs.ts @@ -1,5 +1,5 @@ import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; import { NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, NUM_MSGS_PER_BASE_PARITY } from '../../constants.gen.js'; diff --git a/yarn-project/circuits.js/src/structs/parity/parity_public_inputs.ts b/yarn-project/circuits.js/src/structs/parity/parity_public_inputs.ts index 3edf7909091b..d1d82b601e40 100644 --- a/yarn-project/circuits.js/src/structs/parity/parity_public_inputs.ts +++ b/yarn-project/circuits.js/src/structs/parity/parity_public_inputs.ts @@ -1,6 +1,6 @@ import { Fr } from '@aztec/foundation/fields'; import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; import { AggregationObject } from '../aggregation_object.js'; diff --git a/yarn-project/circuits.js/src/structs/parity/root_parity_input.ts b/yarn-project/circuits.js/src/structs/parity/root_parity_input.ts index 1c55e5c83bb4..cab611415d68 100644 --- a/yarn-project/circuits.js/src/structs/parity/root_parity_input.ts +++ b/yarn-project/circuits.js/src/structs/parity/root_parity_input.ts @@ -1,5 +1,5 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; import { Proof } from '../proof.js'; import { ParityPublicInputs } from './parity_public_inputs.js'; diff --git a/yarn-project/circuits.js/src/structs/parity/root_parity_inputs.ts b/yarn-project/circuits.js/src/structs/parity/root_parity_inputs.ts index 4a73162a6af3..0556b9d172d8 100644 --- a/yarn-project/circuits.js/src/structs/parity/root_parity_inputs.ts +++ b/yarn-project/circuits.js/src/structs/parity/root_parity_inputs.ts @@ -1,4 +1,4 @@ -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; import { NUM_BASE_PARITY_PER_ROOT_PARITY } from '../../constants.gen.js'; import { RootParityInput } from './root_parity_input.js'; diff --git a/yarn-project/circuits.js/src/structs/private_call_stack_item.ts b/yarn-project/circuits.js/src/structs/private_call_stack_item.ts index 700cd968d173..3873a5b17a7e 100644 --- a/yarn-project/circuits.js/src/structs/private_call_stack_item.ts +++ b/yarn-project/circuits.js/src/structs/private_call_stack_item.ts @@ -2,7 +2,7 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { pedersenHash } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader, FieldReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; import { GeneratorIndex, PRIVATE_CALL_STACK_ITEM_LENGTH } from '../constants.gen.js'; import { CallContext } from './call_context.js'; diff --git a/yarn-project/circuits.js/src/structs/private_circuit_public_inputs.ts b/yarn-project/circuits.js/src/structs/private_circuit_public_inputs.ts index 67e9347eba00..b591cd524040 100644 --- a/yarn-project/circuits.js/src/structs/private_circuit_public_inputs.ts +++ b/yarn-project/circuits.js/src/structs/private_circuit_public_inputs.ts @@ -2,8 +2,14 @@ import { makeTuple } from '@aztec/foundation/array'; import { isArrayEmpty } from '@aztec/foundation/collection'; import { pedersenHash } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, FieldReader, Tuple, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { + BufferReader, + FieldReader, + type Tuple, + serializeToBuffer, + serializeToFields, +} from '@aztec/foundation/serialize'; +import { type FieldsOf } from '@aztec/foundation/types'; import { GeneratorIndex, diff --git a/yarn-project/circuits.js/src/structs/public_call_request.ts b/yarn-project/circuits.js/src/structs/public_call_request.ts index 30f4faf8f8b6..6b586045abb5 100644 --- a/yarn-project/circuits.js/src/structs/public_call_request.ts +++ b/yarn-project/circuits.js/src/structs/public_call_request.ts @@ -1,7 +1,7 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; import { computeVarArgsHash } from '../hash/hash.js'; import { CallContext } from './call_context.js'; diff --git a/yarn-project/circuits.js/src/structs/public_call_stack_item.ts b/yarn-project/circuits.js/src/structs/public_call_stack_item.ts index 454b695de625..33f6a2ae047e 100644 --- a/yarn-project/circuits.js/src/structs/public_call_stack_item.ts +++ b/yarn-project/circuits.js/src/structs/public_call_stack_item.ts @@ -2,7 +2,7 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { pedersenHash } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; import { GeneratorIndex } from '../constants.gen.js'; import { CallContext } from './call_context.js'; diff --git a/yarn-project/circuits.js/src/structs/public_circuit_public_inputs.ts b/yarn-project/circuits.js/src/structs/public_circuit_public_inputs.ts index 8ba49eb659aa..18f779c6ad33 100644 --- a/yarn-project/circuits.js/src/structs/public_circuit_public_inputs.ts +++ b/yarn-project/circuits.js/src/structs/public_circuit_public_inputs.ts @@ -3,8 +3,14 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { isArrayEmpty } from '@aztec/foundation/collection'; import { pedersenHash } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, FieldReader, Tuple, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { + BufferReader, + FieldReader, + type Tuple, + serializeToBuffer, + serializeToFields, +} from '@aztec/foundation/serialize'; +import { type FieldsOf } from '@aztec/foundation/types'; import { GeneratorIndex, diff --git a/yarn-project/circuits.js/src/structs/read_request_hints.ts b/yarn-project/circuits.js/src/structs/read_request_hints.ts index 880b71a44671..6e6439ec426e 100644 --- a/yarn-project/circuits.js/src/structs/read_request_hints.ts +++ b/yarn-project/circuits.js/src/structs/read_request_hints.ts @@ -1,6 +1,6 @@ import { makeTuple } from '@aztec/foundation/array'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; -import { TreeLeafPreimage } from '@aztec/foundation/trees'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type TreeLeafPreimage } from '@aztec/foundation/trees'; import { MAX_NULLIFIER_READ_REQUESTS_PER_TX, NULLIFIER_TREE_HEIGHT } from '../constants.gen.js'; import { MembershipWitness } from './membership_witness.js'; diff --git a/yarn-project/circuits.js/src/structs/rollup/append_only_tree_snapshot.ts b/yarn-project/circuits.js/src/structs/rollup/append_only_tree_snapshot.ts index 6f39790a1623..6929e58b412a 100644 --- a/yarn-project/circuits.js/src/structs/rollup/append_only_tree_snapshot.ts +++ b/yarn-project/circuits.js/src/structs/rollup/append_only_tree_snapshot.ts @@ -1,7 +1,7 @@ import { Fr } from '@aztec/foundation/fields'; import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize'; -import { STRING_ENCODING, UInt32 } from '../shared.js'; +import { STRING_ENCODING, type UInt32 } from '../shared.js'; /** * Snapshot of an append only tree. diff --git a/yarn-project/circuits.js/src/structs/rollup/base_rollup.ts b/yarn-project/circuits.js/src/structs/rollup/base_rollup.ts index cbbfaf491ac1..d9eb769d914f 100644 --- a/yarn-project/circuits.js/src/structs/rollup/base_rollup.ts +++ b/yarn-project/circuits.js/src/structs/rollup/base_rollup.ts @@ -1,6 +1,6 @@ import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type FieldsOf } from '@aztec/foundation/types'; import { ARCHIVE_HEIGHT, @@ -12,7 +12,7 @@ import { GlobalVariables } from '../global_variables.js'; import { RollupKernelData } from '../kernel/rollup_kernel_data.js'; import { MembershipWitness } from '../membership_witness.js'; import { PartialStateReference } from '../partial_state_reference.js'; -import { UInt32 } from '../shared.js'; +import { type UInt32 } from '../shared.js'; import { AppendOnlyTreeSnapshot } from './append_only_tree_snapshot.js'; import { NullifierLeaf, NullifierLeafPreimage } from './nullifier_leaf/index.js'; import { PublicDataTreeLeaf, PublicDataTreeLeafPreimage } from './public_data_leaf/index.js'; diff --git a/yarn-project/circuits.js/src/structs/rollup/nullifier_leaf/index.ts b/yarn-project/circuits.js/src/structs/rollup/nullifier_leaf/index.ts index 149ab6c0014f..42160877895f 100644 --- a/yarn-project/circuits.js/src/structs/rollup/nullifier_leaf/index.ts +++ b/yarn-project/circuits.js/src/structs/rollup/nullifier_leaf/index.ts @@ -1,7 +1,7 @@ import { toBigIntBE, toBufferBE } from '@aztec/foundation/bigint-buffer'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader } from '@aztec/foundation/serialize'; -import { IndexedTreeLeaf, IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; +import { type IndexedTreeLeaf, type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; /** * Class containing the data of a preimage of a single leaf in the nullifier tree. diff --git a/yarn-project/circuits.js/src/structs/rollup/previous_rollup_data.ts b/yarn-project/circuits.js/src/structs/rollup/previous_rollup_data.ts index e5154b7a9541..ad0d05cdb3b2 100644 --- a/yarn-project/circuits.js/src/structs/rollup/previous_rollup_data.ts +++ b/yarn-project/circuits.js/src/structs/rollup/previous_rollup_data.ts @@ -3,7 +3,7 @@ import { serializeToBuffer } from '@aztec/foundation/serialize'; import { ROLLUP_VK_TREE_HEIGHT } from '../../constants.gen.js'; import { MembershipWitness } from '../membership_witness.js'; import { Proof } from '../proof.js'; -import { UInt32 } from '../shared.js'; +import { type UInt32 } from '../shared.js'; import { VerificationKey } from '../verification_key.js'; import { BaseOrMergeRollupPublicInputs } from './base_or_merge_rollup_public_inputs.js'; diff --git a/yarn-project/circuits.js/src/structs/rollup/public_data_leaf/index.ts b/yarn-project/circuits.js/src/structs/rollup/public_data_leaf/index.ts index 5724f220e02b..96a3eac57b99 100644 --- a/yarn-project/circuits.js/src/structs/rollup/public_data_leaf/index.ts +++ b/yarn-project/circuits.js/src/structs/rollup/public_data_leaf/index.ts @@ -1,7 +1,7 @@ import { toBigIntBE, toBufferBE } from '@aztec/foundation/bigint-buffer'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; -import { IndexedTreeLeaf, IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; +import { type IndexedTreeLeaf, type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; /** * Class containing the data of a preimage of a single leaf in the public data tree. diff --git a/yarn-project/circuits.js/src/structs/rollup/root_rollup.ts b/yarn-project/circuits.js/src/structs/rollup/root_rollup.ts index e3fce3863c10..5bcd43399487 100644 --- a/yarn-project/circuits.js/src/structs/rollup/root_rollup.ts +++ b/yarn-project/circuits.js/src/structs/rollup/root_rollup.ts @@ -1,6 +1,6 @@ import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type FieldsOf } from '@aztec/foundation/types'; import { ARCHIVE_HEIGHT, diff --git a/yarn-project/circuits.js/src/structs/rollup/state_diff_hints.ts b/yarn-project/circuits.js/src/structs/rollup/state_diff_hints.ts index 1a8128194334..89b5014edfb2 100644 --- a/yarn-project/circuits.js/src/structs/rollup/state_diff_hints.ts +++ b/yarn-project/circuits.js/src/structs/rollup/state_diff_hints.ts @@ -1,6 +1,6 @@ import { Fr } from '@aztec/foundation/fields'; -import { Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type FieldsOf } from '@aztec/foundation/types'; import { MAX_NEW_NULLIFIERS_PER_TX, diff --git a/yarn-project/circuits.js/src/structs/shared.ts b/yarn-project/circuits.js/src/structs/shared.ts index 9b51ce8e1dd0..c8cce1576fed 100644 --- a/yarn-project/circuits.js/src/structs/shared.ts +++ b/yarn-project/circuits.js/src/structs/shared.ts @@ -1,4 +1,4 @@ -import { Bufferable, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type Bufferable, serializeToBuffer } from '@aztec/foundation/serialize'; /** * Implementation of a vector. Matches how we are serializing and deserializing vectors in cpp (length in the first position, followed by the items). diff --git a/yarn-project/circuits.js/src/structs/tx_context.ts b/yarn-project/circuits.js/src/structs/tx_context.ts index 0eae14c831dd..73d484e54afb 100644 --- a/yarn-project/circuits.js/src/structs/tx_context.ts +++ b/yarn-project/circuits.js/src/structs/tx_context.ts @@ -1,7 +1,7 @@ import { pedersenHash } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; import { GeneratorIndex, TX_CONTEXT_DATA_LENGTH } from '../constants.gen.js'; diff --git a/yarn-project/circuits.js/src/structs/tx_request.ts b/yarn-project/circuits.js/src/structs/tx_request.ts index 6113bbb279aa..6a3812692a74 100644 --- a/yarn-project/circuits.js/src/structs/tx_request.ts +++ b/yarn-project/circuits.js/src/structs/tx_request.ts @@ -2,7 +2,7 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { pedersenHash } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader, serializeToBuffer, serializeToFields } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; import { GeneratorIndex, TX_REQUEST_LENGTH } from '../constants.gen.js'; import { FunctionData } from './function_data.js'; diff --git a/yarn-project/circuits.js/src/structs/validation_requests.ts b/yarn-project/circuits.js/src/structs/validation_requests.ts index fbcbe3d2b359..faff930709e7 100644 --- a/yarn-project/circuits.js/src/structs/validation_requests.ts +++ b/yarn-project/circuits.js/src/structs/validation_requests.ts @@ -1,5 +1,5 @@ import { makeTuple } from '@aztec/foundation/array'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; import { MAX_NOTE_HASH_READ_REQUESTS_PER_TX, diff --git a/yarn-project/circuits.js/src/tests/factories.ts b/yarn-project/circuits.js/src/tests/factories.ts index aeec6e1ef038..176e9248d324 100644 --- a/yarn-project/circuits.js/src/tests/factories.ts +++ b/yarn-project/circuits.js/src/tests/factories.ts @@ -4,11 +4,11 @@ import { toBufferBE } from '@aztec/foundation/bigint-buffer'; import { EthAddress } from '@aztec/foundation/eth-address'; import { numToUInt32BE } from '@aztec/foundation/serialize'; import { - ContractClassPublic, - ExecutablePrivateFunctionWithMembershipProof, - PrivateFunction, - PublicFunction, - UnconstrainedFunctionWithMembershipProof, + type ContractClassPublic, + type ExecutablePrivateFunctionWithMembershipProof, + type PrivateFunction, + type PublicFunction, + type UnconstrainedFunctionWithMembershipProof, } from '@aztec/types/contracts'; import { SchnorrSignature } from '../barretenberg/index.js'; @@ -35,7 +35,7 @@ import { FunctionData, FunctionSelector, G1AffineElement, - GrumpkinPrivateKey, + type GrumpkinPrivateKey, GrumpkinScalar, L1_TO_L2_MSG_SUBTREE_SIBLING_PATH_LENGTH, L2ToL1Message, diff --git a/yarn-project/circuits.js/src/tests/fixtures.ts b/yarn-project/circuits.js/src/tests/fixtures.ts index d3d68199d89a..1d45e9f834c3 100644 --- a/yarn-project/circuits.js/src/tests/fixtures.ts +++ b/yarn-project/circuits.js/src/tests/fixtures.ts @@ -1,6 +1,6 @@ -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractArtifact } from '@aztec/foundation/abi'; import { loadContractArtifact } from '@aztec/types/abi'; -import { NoirCompiledContract } from '@aztec/types/noir'; +import { type NoirCompiledContract } from '@aztec/types/noir'; import { readFileSync } from 'fs'; import { dirname, resolve } from 'path'; diff --git a/yarn-project/circuits.js/src/types/contract_function_dao.ts b/yarn-project/circuits.js/src/types/contract_function_dao.ts index 7d97ccda986b..a5d8b0c20b9a 100644 --- a/yarn-project/circuits.js/src/types/contract_function_dao.ts +++ b/yarn-project/circuits.js/src/types/contract_function_dao.ts @@ -1,4 +1,4 @@ -import { FunctionArtifact, FunctionSelector } from '@aztec/foundation/abi'; +import { type FunctionArtifact, FunctionSelector } from '@aztec/foundation/abi'; /** * A contract function Data Access Object (DAO). diff --git a/yarn-project/cli/src/client.test.ts b/yarn-project/cli/src/client.test.ts index 8e879f762bae..ad21f399256a 100644 --- a/yarn-project/cli/src/client.test.ts +++ b/yarn-project/cli/src/client.test.ts @@ -1,7 +1,7 @@ -import { NodeInfo } from '@aztec/aztec.js'; -import { PXE } from '@aztec/circuit-types'; +import { type NodeInfo } from '@aztec/aztec.js'; +import { type PXE } from '@aztec/circuit-types'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; import { checkServerVersion } from './client.js'; diff --git a/yarn-project/cli/src/client.ts b/yarn-project/cli/src/client.ts index 18ea8bd2d5e3..8b3d55c37d9d 100644 --- a/yarn-project/cli/src/client.ts +++ b/yarn-project/cli/src/client.ts @@ -1,5 +1,5 @@ -import { PXE, createPXEClient } from '@aztec/aztec.js'; -import { DebugLogger } from '@aztec/foundation/log'; +import { type PXE, createPXEClient } from '@aztec/aztec.js'; +import { type DebugLogger } from '@aztec/foundation/log'; import { fileURLToPath } from '@aztec/foundation/url'; import { readFileSync } from 'fs'; diff --git a/yarn-project/cli/src/cmds/add_contract.ts b/yarn-project/cli/src/cmds/add_contract.ts index b09e87d6eb7f..ef79bca4b454 100644 --- a/yarn-project/cli/src/cmds/add_contract.ts +++ b/yarn-project/cli/src/cmds/add_contract.ts @@ -1,13 +1,13 @@ import { AztecAddress, - ContractInstanceWithAddress, + type ContractInstanceWithAddress, EthAddress, Fr, Point, getContractClassFromArtifact, } from '@aztec/aztec.js'; import { computeContractAddressFromInstance, computePublicKeysHash } from '@aztec/circuits.js/contract'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; import { getContractArtifact } from '../utils.js'; diff --git a/yarn-project/cli/src/cmds/add_note.ts b/yarn-project/cli/src/cmds/add_note.ts index 988c2a45c12b..77bac4e96a5f 100644 --- a/yarn-project/cli/src/cmds/add_note.ts +++ b/yarn-project/cli/src/cmds/add_note.ts @@ -1,6 +1,6 @@ import { AztecAddress, Fr } from '@aztec/aztec.js'; import { ExtendedNote, Note, TxHash } from '@aztec/circuit-types'; -import { DebugLogger } from '@aztec/foundation/log'; +import { type DebugLogger } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; import { parseFields } from '../parse_args.js'; diff --git a/yarn-project/cli/src/cmds/block_number.ts b/yarn-project/cli/src/cmds/block_number.ts index c5aed1264439..5b6ca472d6b2 100644 --- a/yarn-project/cli/src/cmds/block_number.ts +++ b/yarn-project/cli/src/cmds/block_number.ts @@ -1,4 +1,4 @@ -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; diff --git a/yarn-project/cli/src/cmds/call.ts b/yarn-project/cli/src/cmds/call.ts index cab98e2dd424..96feea4f5f78 100644 --- a/yarn-project/cli/src/cmds/call.ts +++ b/yarn-project/cli/src/cmds/call.ts @@ -1,5 +1,5 @@ import { AztecAddress } from '@aztec/aztec.js'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { format } from 'util'; diff --git a/yarn-project/cli/src/cmds/check_deploy.ts b/yarn-project/cli/src/cmds/check_deploy.ts index c9777522e10e..2c352d41414e 100644 --- a/yarn-project/cli/src/cmds/check_deploy.ts +++ b/yarn-project/cli/src/cmds/check_deploy.ts @@ -1,5 +1,5 @@ import { AztecAddress } from '@aztec/aztec.js'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; diff --git a/yarn-project/cli/src/cmds/compute_selector.ts b/yarn-project/cli/src/cmds/compute_selector.ts index 074be33597ab..9d299a64eff4 100644 --- a/yarn-project/cli/src/cmds/compute_selector.ts +++ b/yarn-project/cli/src/cmds/compute_selector.ts @@ -1,5 +1,5 @@ import { FunctionSelector } from '@aztec/foundation/abi'; -import { LogFn } from '@aztec/foundation/log'; +import { type LogFn } from '@aztec/foundation/log'; export function computeSelector(functionSignature: string, log: LogFn) { const selector = FunctionSelector.fromSignature(functionSignature); diff --git a/yarn-project/cli/src/cmds/create_account.ts b/yarn-project/cli/src/cmds/create_account.ts index 2ad6a5d92d65..ba2bea7d430a 100644 --- a/yarn-project/cli/src/cmds/create_account.ts +++ b/yarn-project/cli/src/cmds/create_account.ts @@ -1,7 +1,7 @@ import { getSchnorrAccount } from '@aztec/accounts/schnorr'; import { GrumpkinScalar } from '@aztec/aztec.js'; import { Fq, Fr } from '@aztec/foundation/fields'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; diff --git a/yarn-project/cli/src/cmds/deploy.ts b/yarn-project/cli/src/cmds/deploy.ts index a9fbda805274..01e43a719ccb 100644 --- a/yarn-project/cli/src/cmds/deploy.ts +++ b/yarn-project/cli/src/cmds/deploy.ts @@ -1,7 +1,7 @@ import { getSchnorrAccount } from '@aztec/accounts/schnorr'; import { ContractDeployer, EthAddress, Fq, Fr, Point } from '@aztec/aztec.js'; import { getInitializer } from '@aztec/foundation/abi'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; import { encodeArgs } from '../encoding.js'; diff --git a/yarn-project/cli/src/cmds/deploy_l1_contracts.ts b/yarn-project/cli/src/cmds/deploy_l1_contracts.ts index a7a5af57fe14..a96b3e277a26 100644 --- a/yarn-project/cli/src/cmds/deploy_l1_contracts.ts +++ b/yarn-project/cli/src/cmds/deploy_l1_contracts.ts @@ -1,4 +1,4 @@ -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { deployAztecContracts } from '../utils.js'; diff --git a/yarn-project/cli/src/cmds/example_contracts.ts b/yarn-project/cli/src/cmds/example_contracts.ts index c7ee019ecccf..94c7437262b3 100644 --- a/yarn-project/cli/src/cmds/example_contracts.ts +++ b/yarn-project/cli/src/cmds/example_contracts.ts @@ -1,4 +1,4 @@ -import { LogFn } from '@aztec/foundation/log'; +import { type LogFn } from '@aztec/foundation/log'; import { getExampleContractArtifacts } from '../utils.js'; diff --git a/yarn-project/cli/src/cmds/generate_p2p_private_key.ts b/yarn-project/cli/src/cmds/generate_p2p_private_key.ts index 928e61974ba6..f62617ae6ea7 100644 --- a/yarn-project/cli/src/cmds/generate_p2p_private_key.ts +++ b/yarn-project/cli/src/cmds/generate_p2p_private_key.ts @@ -1,4 +1,4 @@ -import { LogFn } from '@aztec/foundation/log'; +import { type LogFn } from '@aztec/foundation/log'; import { createSecp256k1PeerId } from '@libp2p/peer-id-factory'; diff --git a/yarn-project/cli/src/cmds/generate_private_key.ts b/yarn-project/cli/src/cmds/generate_private_key.ts index b447cdcc7381..f7504de90def 100644 --- a/yarn-project/cli/src/cmds/generate_private_key.ts +++ b/yarn-project/cli/src/cmds/generate_private_key.ts @@ -1,5 +1,5 @@ import { GrumpkinScalar, generatePublicKey } from '@aztec/aztec.js'; -import { LogFn } from '@aztec/foundation/log'; +import { type LogFn } from '@aztec/foundation/log'; import { mnemonicToAccount } from 'viem/accounts'; diff --git a/yarn-project/cli/src/cmds/get_account.ts b/yarn-project/cli/src/cmds/get_account.ts index 8b3e9359d5f0..2671a7ba0622 100644 --- a/yarn-project/cli/src/cmds/get_account.ts +++ b/yarn-project/cli/src/cmds/get_account.ts @@ -1,5 +1,5 @@ import { AztecAddress } from '@aztec/aztec.js'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; diff --git a/yarn-project/cli/src/cmds/get_accounts.ts b/yarn-project/cli/src/cmds/get_accounts.ts index 1e36475f3a88..9d84cc581ed0 100644 --- a/yarn-project/cli/src/cmds/get_accounts.ts +++ b/yarn-project/cli/src/cmds/get_accounts.ts @@ -1,4 +1,4 @@ -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; diff --git a/yarn-project/cli/src/cmds/get_contract_data.ts b/yarn-project/cli/src/cmds/get_contract_data.ts index d11180f7e4b2..077c50e8f7bf 100644 --- a/yarn-project/cli/src/cmds/get_contract_data.ts +++ b/yarn-project/cli/src/cmds/get_contract_data.ts @@ -1,5 +1,5 @@ import { AztecAddress } from '@aztec/aztec.js'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; diff --git a/yarn-project/cli/src/cmds/get_logs.ts b/yarn-project/cli/src/cmds/get_logs.ts index 76c27c767262..333787d6c036 100644 --- a/yarn-project/cli/src/cmds/get_logs.ts +++ b/yarn-project/cli/src/cmds/get_logs.ts @@ -1,6 +1,6 @@ -import { AztecAddress, LogFilter, LogId, TxHash } from '@aztec/aztec.js'; +import { AztecAddress, type LogFilter, LogId, TxHash } from '@aztec/aztec.js'; import { EventSelector } from '@aztec/foundation/abi'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { sleep } from '@aztec/foundation/sleep'; import { createCompatibleClient } from '../client.js'; diff --git a/yarn-project/cli/src/cmds/get_node_info.ts b/yarn-project/cli/src/cmds/get_node_info.ts index b775c08aa0d6..b66df822532e 100644 --- a/yarn-project/cli/src/cmds/get_node_info.ts +++ b/yarn-project/cli/src/cmds/get_node_info.ts @@ -1,4 +1,4 @@ -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; diff --git a/yarn-project/cli/src/cmds/get_recipient.ts b/yarn-project/cli/src/cmds/get_recipient.ts index 270bbad9ac2b..6094e44d8b65 100644 --- a/yarn-project/cli/src/cmds/get_recipient.ts +++ b/yarn-project/cli/src/cmds/get_recipient.ts @@ -1,5 +1,5 @@ import { AztecAddress } from '@aztec/aztec.js'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; diff --git a/yarn-project/cli/src/cmds/get_recipients.ts b/yarn-project/cli/src/cmds/get_recipients.ts index 875b84b60387..bc091bc5dd60 100644 --- a/yarn-project/cli/src/cmds/get_recipients.ts +++ b/yarn-project/cli/src/cmds/get_recipients.ts @@ -1,4 +1,4 @@ -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; diff --git a/yarn-project/cli/src/cmds/get_tx_receipt.ts b/yarn-project/cli/src/cmds/get_tx_receipt.ts index beaa53e2f9b4..54149f777b3d 100644 --- a/yarn-project/cli/src/cmds/get_tx_receipt.ts +++ b/yarn-project/cli/src/cmds/get_tx_receipt.ts @@ -1,6 +1,6 @@ import { TxHash } from '@aztec/aztec.js'; import { JsonStringify } from '@aztec/foundation/json-rpc'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; diff --git a/yarn-project/cli/src/cmds/inspect_contract.ts b/yarn-project/cli/src/cmds/inspect_contract.ts index 4728de02fd08..00823d218956 100644 --- a/yarn-project/cli/src/cmds/inspect_contract.ts +++ b/yarn-project/cli/src/cmds/inspect_contract.ts @@ -1,12 +1,12 @@ import { getContractClassFromArtifact } from '@aztec/circuits.js'; import { - FunctionArtifact, + type FunctionArtifact, FunctionSelector, decodeFunctionSignature, decodeFunctionSignatureWithParameterNames, } from '@aztec/foundation/abi'; import { sha256 } from '@aztec/foundation/crypto'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { getContractArtifact } from '../utils.js'; diff --git a/yarn-project/cli/src/cmds/parse_parameter_struct.ts b/yarn-project/cli/src/cmds/parse_parameter_struct.ts index d8b29211d3a9..15bc057ede9b 100644 --- a/yarn-project/cli/src/cmds/parse_parameter_struct.ts +++ b/yarn-project/cli/src/cmds/parse_parameter_struct.ts @@ -1,6 +1,6 @@ -import { StructType } from '@aztec/foundation/abi'; +import { type StructType } from '@aztec/foundation/abi'; import { JsonStringify } from '@aztec/foundation/json-rpc'; -import { LogFn } from '@aztec/foundation/log'; +import { type LogFn } from '@aztec/foundation/log'; import { parseStructString } from '../encoding.js'; import { getContractArtifact } from '../utils.js'; diff --git a/yarn-project/cli/src/cmds/register_account.ts b/yarn-project/cli/src/cmds/register_account.ts index b6949cee4faa..493bfb6f87dd 100644 --- a/yarn-project/cli/src/cmds/register_account.ts +++ b/yarn-project/cli/src/cmds/register_account.ts @@ -1,5 +1,5 @@ import { Fq, Fr } from '@aztec/foundation/fields'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; diff --git a/yarn-project/cli/src/cmds/register_recipient.ts b/yarn-project/cli/src/cmds/register_recipient.ts index 6458143c5423..a74de2359b94 100644 --- a/yarn-project/cli/src/cmds/register_recipient.ts +++ b/yarn-project/cli/src/cmds/register_recipient.ts @@ -1,6 +1,6 @@ import { AztecAddress, Fr, Point } from '@aztec/aztec.js'; import { CompleteAddress } from '@aztec/circuit-types'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; diff --git a/yarn-project/cli/src/cmds/send.ts b/yarn-project/cli/src/cmds/send.ts index 8513fe1392ec..ed44c8391159 100644 --- a/yarn-project/cli/src/cmds/send.ts +++ b/yarn-project/cli/src/cmds/send.ts @@ -1,6 +1,6 @@ import { getSchnorrAccount } from '@aztec/accounts/schnorr'; import { AztecAddress, Contract, Fq, Fr } from '@aztec/aztec.js'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { createCompatibleClient } from '../client.js'; import { prepTx } from '../utils.js'; diff --git a/yarn-project/cli/src/encoding.ts b/yarn-project/cli/src/encoding.ts index 21ecba9fc8a2..b06c9301b6e2 100644 --- a/yarn-project/cli/src/encoding.ts +++ b/yarn-project/cli/src/encoding.ts @@ -1,4 +1,4 @@ -import { ABIParameter, ABIType, StructType } from '@aztec/foundation/abi'; +import { type ABIParameter, type ABIType, type StructType } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; /** diff --git a/yarn-project/cli/src/index.ts b/yarn-project/cli/src/index.ts index 16e5b15747a1..13c56ba00010 100644 --- a/yarn-project/cli/src/index.ts +++ b/yarn-project/cli/src/index.ts @@ -1,5 +1,5 @@ import { Fr } from '@aztec/circuits.js'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; import { fileURLToPath } from '@aztec/foundation/url'; import { addCodegenCommanderAction } from '@aztec/noir-compiler/cli'; diff --git a/yarn-project/cli/src/test/mocks.ts b/yarn-project/cli/src/test/mocks.ts index afa693b8427c..1ca54bbee68c 100644 --- a/yarn-project/cli/src/test/mocks.ts +++ b/yarn-project/cli/src/test/mocks.ts @@ -1,4 +1,4 @@ -import { ABIParameterVisibility, ContractArtifact, FunctionType } from '@aztec/foundation/abi'; +import { ABIParameterVisibility, type ContractArtifact, FunctionType } from '@aztec/foundation/abi'; export const mockContractArtifact: ContractArtifact = { name: 'MockContract', diff --git a/yarn-project/cli/src/test/utils.test.ts b/yarn-project/cli/src/test/utils.test.ts index e43d32d207a2..56f3e109d914 100644 --- a/yarn-project/cli/src/test/utils.test.ts +++ b/yarn-project/cli/src/test/utils.test.ts @@ -1,8 +1,8 @@ import { AztecAddress, Fr } from '@aztec/aztec.js'; -import { CompleteAddress, PXE } from '@aztec/circuit-types'; +import { CompleteAddress, type PXE } from '@aztec/circuit-types'; import { InvalidArgumentError } from 'commander'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; import { encodeArgs } from '../encoding.js'; import { parseFieldFromHexString } from '../parse_args.js'; diff --git a/yarn-project/cli/src/update/noir.ts b/yarn-project/cli/src/update/noir.ts index 0864293f4daa..b18c38284b6d 100644 --- a/yarn-project/cli/src/update/noir.ts +++ b/yarn-project/cli/src/update/noir.ts @@ -1,4 +1,4 @@ -import { LogFn } from '@aztec/foundation/log'; +import { type LogFn } from '@aztec/foundation/log'; import { parseNoirPackageConfig } from '@aztec/foundation/noir'; import TOML from '@iarna/toml'; @@ -6,7 +6,7 @@ import { readFile } from 'fs/promises'; import { join, relative, resolve } from 'path'; import { atomicUpdateFile, prettyPrintNargoToml } from '../utils.js'; -import { DependencyChanges } from './common.js'; +import { type DependencyChanges } from './common.js'; /** * Updates Aztec.nr dependencies diff --git a/yarn-project/cli/src/update/npm.ts b/yarn-project/cli/src/update/npm.ts index ae085e6dfe70..10599e74499d 100644 --- a/yarn-project/cli/src/update/npm.ts +++ b/yarn-project/cli/src/update/npm.ts @@ -1,4 +1,4 @@ -import { LogFn } from '@aztec/foundation/log'; +import { type LogFn } from '@aztec/foundation/log'; import { spawnSync } from 'child_process'; import { existsSync } from 'fs'; @@ -7,7 +7,7 @@ import { join, relative, resolve } from 'path'; import { SemVer, parse } from 'semver'; import { atomicUpdateFile } from '../utils.js'; -import { DependencyChanges } from './common.js'; +import { type DependencyChanges } from './common.js'; const deprecatedNpmPackages = new Set(['@aztec/cli', '@aztec/aztec-sandbox']); const npmDeprecationMessage = ` diff --git a/yarn-project/cli/src/update/update.ts b/yarn-project/cli/src/update/update.ts index 5c946f9953da..e2bc90f79477 100644 --- a/yarn-project/cli/src/update/update.ts +++ b/yarn-project/cli/src/update/update.ts @@ -1,11 +1,11 @@ /* eslint-disable jsdoc/require-jsdoc */ -import { LogFn } from '@aztec/foundation/log'; +import { type LogFn } from '@aztec/foundation/log'; import { relative, resolve } from 'path'; import { parse } from 'semver'; import { GITHUB_TAG_PREFIX } from '../github.js'; -import { DependencyChanges } from './common.js'; +import { type DependencyChanges } from './common.js'; import { updateAztecNr } from './noir.js'; import { getNewestVersion, updateAztecDeps, updateLockfile } from './npm.js'; diff --git a/yarn-project/cli/src/utils.ts b/yarn-project/cli/src/utils.ts index 756b3193c7bc..1c387db67bc5 100644 --- a/yarn-project/cli/src/utils.ts +++ b/yarn-project/cli/src/utils.ts @@ -2,8 +2,8 @@ import { type ContractArtifact, type FunctionArtifact, loadContractArtifact } fr import { AztecAddress } from '@aztec/aztec.js/aztec_address'; import { type L1ContractArtifactsForDeployment } from '@aztec/aztec.js/ethereum'; import { type PXE } from '@aztec/aztec.js/interfaces/pxe'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; -import { NoirPackageConfig } from '@aztec/foundation/noir'; +import { type DebugLogger, type LogFn } from '@aztec/foundation/log'; +import { type NoirPackageConfig } from '@aztec/foundation/noir'; import { AvailabilityOracleAbi, AvailabilityOracleBytecode, diff --git a/yarn-project/end-to-end/src/benchmarks/bench_process_history.test.ts b/yarn-project/end-to-end/src/benchmarks/bench_process_history.test.ts index 8d0747cf27f5..a5d752a1a5d0 100644 --- a/yarn-project/end-to-end/src/benchmarks/bench_process_history.test.ts +++ b/yarn-project/end-to-end/src/benchmarks/bench_process_history.test.ts @@ -1,14 +1,14 @@ -import { AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node'; +import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node'; import { AztecAddress, Fr, GrumpkinScalar, INITIAL_L2_BLOCK_NUM, elapsed, sleep } from '@aztec/aztec.js'; import { BENCHMARK_HISTORY_BLOCK_SIZE, BENCHMARK_HISTORY_CHAIN_LENGTHS, - NodeSyncedChainHistoryStats, + type NodeSyncedChainHistoryStats, } from '@aztec/circuit-types/stats'; import { BenchmarkingContract } from '@aztec/noir-contracts.js/Benchmarking'; import { SequencerClient } from '@aztec/sequencer-client'; -import { EndToEndContext } from '../fixtures/utils.js'; +import { type EndToEndContext } from '../fixtures/utils.js'; import { benchmarkSetup, getFolderSize, diff --git a/yarn-project/end-to-end/src/benchmarks/bench_publish_rollup.test.ts b/yarn-project/end-to-end/src/benchmarks/bench_publish_rollup.test.ts index fea4012690b2..fe946a3279a7 100644 --- a/yarn-project/end-to-end/src/benchmarks/bench_publish_rollup.test.ts +++ b/yarn-project/end-to-end/src/benchmarks/bench_publish_rollup.test.ts @@ -4,7 +4,7 @@ import { BENCHMARK_BLOCK_SIZES } from '@aztec/circuit-types/stats'; import { BenchmarkingContract } from '@aztec/noir-contracts.js/Benchmarking'; import { SequencerClient } from '@aztec/sequencer-client'; -import { EndToEndContext } from '../fixtures/utils.js'; +import { type EndToEndContext } from '../fixtures/utils.js'; import { benchmarkSetup, sendTxs, waitNewPXESynced, waitRegisteredAccountSynced } from './utils.js'; describe('benchmarks/publish_rollup', () => { diff --git a/yarn-project/end-to-end/src/benchmarks/bench_tx_size_fees.test.ts b/yarn-project/end-to-end/src/benchmarks/bench_tx_size_fees.test.ts index bfc942610727..fea9a9933dab 100644 --- a/yarn-project/end-to-end/src/benchmarks/bench_tx_size_fees.test.ts +++ b/yarn-project/end-to-end/src/benchmarks/bench_tx_size_fees.test.ts @@ -1,7 +1,7 @@ import { AccountWalletWithPrivateKey, AztecAddress, - FeePaymentMethod, + type FeePaymentMethod, NativeFeePaymentMethod, PrivateFeePaymentMethod, PublicFeePaymentMethod, @@ -13,7 +13,7 @@ import { getCanonicalGasTokenAddress } from '@aztec/protocol-contracts/gas-token import { jest } from '@jest/globals'; -import { EndToEndContext, publicDeployAccounts, setup } from '../fixtures/utils.js'; +import { type EndToEndContext, publicDeployAccounts, setup } from '../fixtures/utils.js'; jest.setTimeout(50_000); diff --git a/yarn-project/end-to-end/src/benchmarks/utils.ts b/yarn-project/end-to-end/src/benchmarks/utils.ts index 8fe85f16166a..9670d25d63f9 100644 --- a/yarn-project/end-to-end/src/benchmarks/utils.ts +++ b/yarn-project/end-to-end/src/benchmarks/utils.ts @@ -1,11 +1,11 @@ -import { AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node'; +import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node'; import { - AztecNode, + type AztecNode, BatchCall, GrumpkinScalar, INITIAL_L2_BLOCK_NUM, - PXE, - PartialAddress, + type PXE, + type PartialAddress, SentTx, retryUntil, sleep, @@ -19,7 +19,7 @@ import { mkdirpSync } from 'fs-extra'; import { globSync } from 'glob'; import { join } from 'path'; -import { EndToEndContext, setup } from '../fixtures/utils.js'; +import { type EndToEndContext, setup } from '../fixtures/utils.js'; /** * Setup for benchmarks. Initializes a remote node with a single account and deploys a benchmark contract. diff --git a/yarn-project/end-to-end/src/e2e_2_pxes.test.ts b/yarn-project/end-to-end/src/e2e_2_pxes.test.ts index 80f970483b16..3f086b8337eb 100644 --- a/yarn-project/end-to-end/src/e2e_2_pxes.test.ts +++ b/yarn-project/end-to-end/src/e2e_2_pxes.test.ts @@ -1,15 +1,15 @@ import { getUnsafeSchnorrAccount } from '@aztec/accounts/single_key'; import { AztecAddress, - AztecNode, + type AztecNode, CompleteAddress, - DebugLogger, + type DebugLogger, ExtendedNote, Fr, GrumpkinScalar, Note, - PXE, - Wallet, + type PXE, + type Wallet, computeMessageSecretHash, retryUntil, } from '@aztec/aztec.js'; diff --git a/yarn-project/end-to-end/src/e2e_account_contracts.test.ts b/yarn-project/end-to-end/src/e2e_account_contracts.test.ts index beb19f2ef511..7f9142fc8041 100644 --- a/yarn-project/end-to-end/src/e2e_account_contracts.test.ts +++ b/yarn-project/end-to-end/src/e2e_account_contracts.test.ts @@ -2,15 +2,15 @@ import { EcdsaAccountContract } from '@aztec/accounts/ecdsa'; import { SchnorrAccountContract } from '@aztec/accounts/schnorr'; import { SingleKeyAccountContract } from '@aztec/accounts/single_key'; import { - AccountContract, + type AccountContract, AccountManager, AccountWallet, CompleteAddress, Fr, - GrumpkinPrivateKey, + type GrumpkinPrivateKey, GrumpkinScalar, - PXE, - Wallet, + type PXE, + type Wallet, } from '@aztec/aztec.js'; import { randomBytes } from '@aztec/foundation/crypto'; import { ChildContract } from '@aztec/noir-contracts.js/Child'; diff --git a/yarn-project/end-to-end/src/e2e_avm_simulator.test.ts b/yarn-project/end-to-end/src/e2e_avm_simulator.test.ts index 99032a482280..c4742bce15c0 100644 --- a/yarn-project/end-to-end/src/e2e_avm_simulator.test.ts +++ b/yarn-project/end-to-end/src/e2e_avm_simulator.test.ts @@ -1,4 +1,4 @@ -import { AztecAddress, Wallet } from '@aztec/aztec.js'; +import { AztecAddress, type Wallet } from '@aztec/aztec.js'; import { AvmTestContract } from '@aztec/noir-contracts.js'; import { jest } from '@jest/globals'; diff --git a/yarn-project/end-to-end/src/e2e_blacklist_token_contract.test.ts b/yarn-project/end-to-end/src/e2e_blacklist_token_contract.test.ts index bd5bcb70637a..21b121a22688 100644 --- a/yarn-project/end-to-end/src/e2e_blacklist_token_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_blacklist_token_contract.test.ts @@ -3,13 +3,13 @@ import { AztecAddress, CheatCodes, CompleteAddress, - DebugLogger, + type DebugLogger, ExtendedNote, Fr, FunctionSelector, Note, TxHash, - Wallet, + type Wallet, computeAuthWitMessageHash, computeMessageSecretHash, } from '@aztec/aztec.js'; diff --git a/yarn-project/end-to-end/src/e2e_block_building.test.ts b/yarn-project/end-to-end/src/e2e_block_building.test.ts index 36c991911770..79e526208d4d 100644 --- a/yarn-project/end-to-end/src/e2e_block_building.test.ts +++ b/yarn-project/end-to-end/src/e2e_block_building.test.ts @@ -1,16 +1,16 @@ import { AztecAddress, - AztecNode, + type AztecNode, BatchCall, ContractDeployer, ContractFunctionInteraction, - DebugLogger, + type DebugLogger, Fr, - PXE, + type PXE, SentTx, TxReceipt, TxStatus, - Wallet, + type Wallet, } from '@aztec/aztec.js'; import { times } from '@aztec/foundation/collection'; import { pedersenHash } from '@aztec/foundation/crypto'; diff --git a/yarn-project/end-to-end/src/e2e_card_game.test.ts b/yarn-project/end-to-end/src/e2e_card_game.test.ts index 1520f91c92aa..c80be7825a7f 100644 --- a/yarn-project/end-to-end/src/e2e_card_game.test.ts +++ b/yarn-project/end-to-end/src/e2e_card_game.test.ts @@ -3,10 +3,10 @@ import { INITIAL_TEST_ENCRYPTION_KEYS } from '@aztec/accounts/testing'; import { AccountWallet, AztecAddress, - DebugLogger, + type DebugLogger, GrumpkinScalar, - PXE, - Wallet, + type PXE, + type Wallet, generatePublicKey, } from '@aztec/aztec.js'; import { computeNullifierSecretKey, computeSiloedNullifierSecretKey } from '@aztec/circuits.js'; diff --git a/yarn-project/end-to-end/src/e2e_cheat_codes.test.ts b/yarn-project/end-to-end/src/e2e_cheat_codes.test.ts index 20c7761db90c..064a94eb4d05 100644 --- a/yarn-project/end-to-end/src/e2e_cheat_codes.test.ts +++ b/yarn-project/end-to-end/src/e2e_cheat_codes.test.ts @@ -5,14 +5,23 @@ import { ExtendedNote, Fr, Note, - PXE, - Wallet, + type PXE, + type Wallet, computeMessageSecretHash, } from '@aztec/aztec.js'; import { RollupAbi } from '@aztec/l1-artifacts'; import { TestContract, TokenContract } from '@aztec/noir-contracts.js'; -import { Account, Chain, HttpTransport, PublicClient, WalletClient, getAddress, getContract, parseEther } from 'viem'; +import { + type Account, + type Chain, + type HttpTransport, + type PublicClient, + type WalletClient, + getAddress, + getContract, + parseEther, +} from 'viem'; import { setup } from './fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_cli.test.ts b/yarn-project/end-to-end/src/e2e_cli.test.ts index 7fd0884a0911..1edf7050eba8 100644 --- a/yarn-project/end-to-end/src/e2e_cli.test.ts +++ b/yarn-project/end-to-end/src/e2e_cli.test.ts @@ -1,4 +1,4 @@ -import { PXE, createDebugLogger } from '@aztec/aztec.js'; +import { type PXE, createDebugLogger } from '@aztec/aztec.js'; import { startHttpRpcServer } from '@aztec/foundation/json-rpc/server'; import { createPXERpcServer } from '@aztec/pxe'; diff --git a/yarn-project/end-to-end/src/e2e_counter_contract.test.ts b/yarn-project/end-to-end/src/e2e_counter_contract.test.ts index ea4f806fb7b0..baa605701810 100644 --- a/yarn-project/end-to-end/src/e2e_counter_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_counter_contract.test.ts @@ -1,4 +1,4 @@ -import { AccountWallet, AztecAddress, CompleteAddress, DebugLogger } from '@aztec/aztec.js'; +import { AccountWallet, AztecAddress, CompleteAddress, type DebugLogger } from '@aztec/aztec.js'; import { CounterContract } from '@aztec/noir-contracts.js/Counter'; import { setup } from './fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_cross_chain_messaging.test.ts b/yarn-project/end-to-end/src/e2e_cross_chain_messaging.test.ts index 52bfa8b5b06b..5300bec3898c 100644 --- a/yarn-project/end-to-end/src/e2e_cross_chain_messaging.test.ts +++ b/yarn-project/end-to-end/src/e2e_cross_chain_messaging.test.ts @@ -1,8 +1,8 @@ import { AccountWallet, AztecAddress, - AztecNode, - DebugLogger, + type AztecNode, + type DebugLogger, EthAddress, Fr, L1Actor, diff --git a/yarn-project/end-to-end/src/e2e_crowdfunding_and_claim.test.ts b/yarn-project/end-to-end/src/e2e_crowdfunding_and_claim.test.ts index eaa666f525c9..adc7589bb07f 100644 --- a/yarn-project/end-to-end/src/e2e_crowdfunding_and_claim.test.ts +++ b/yarn-project/end-to-end/src/e2e_crowdfunding_and_claim.test.ts @@ -2,12 +2,12 @@ import { AccountWallet, AztecAddress, CheatCodes, - DebugLogger, + type DebugLogger, ExtendedNote, Fr, GrumpkinScalar, Note, - PXE, + type PXE, TxHash, computeMessageSecretHash, generatePublicKey, diff --git a/yarn-project/end-to-end/src/e2e_dapp_subscription.test.ts b/yarn-project/end-to-end/src/e2e_dapp_subscription.test.ts index 2dfd5ea8a10c..eb7d441afe98 100644 --- a/yarn-project/end-to-end/src/e2e_dapp_subscription.test.ts +++ b/yarn-project/end-to-end/src/e2e_dapp_subscription.test.ts @@ -1,7 +1,7 @@ import { AccountWalletWithPrivateKey, AztecAddress, - FeePaymentMethod, + type FeePaymentMethod, Fr, PrivateFeePaymentMethod, PublicFeePaymentMethod, @@ -21,8 +21,8 @@ import { getCanonicalGasTokenAddress } from '@aztec/protocol-contracts/gas-token import { jest } from '@jest/globals'; import { - BalancesFn, - EndToEndContext, + type BalancesFn, + type EndToEndContext, expectMapping, getBalancesFn, publicDeployAccounts, diff --git a/yarn-project/end-to-end/src/e2e_delegate_calls.test.ts b/yarn-project/end-to-end/src/e2e_delegate_calls.test.ts index c2a36bb435c4..11a81b84f168 100644 --- a/yarn-project/end-to-end/src/e2e_delegate_calls.test.ts +++ b/yarn-project/end-to-end/src/e2e_delegate_calls.test.ts @@ -1,4 +1,4 @@ -import { Wallet } from '@aztec/aztec.js'; +import { type Wallet } from '@aztec/aztec.js'; import { DelegatedOnContract, DelegatorContract } from '@aztec/noir-contracts.js'; import { setup } from './fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_deploy_contract.test.ts b/yarn-project/end-to-end/src/e2e_deploy_contract.test.ts index 7638c537499c..5a127543ddb6 100644 --- a/yarn-project/end-to-end/src/e2e_deploy_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_deploy_contract.test.ts @@ -1,20 +1,20 @@ import { AztecAddress, - AztecNode, + type AztecNode, BatchCall, CompleteAddress, - ContractArtifact, + type ContractArtifact, ContractBase, - ContractClassWithId, + type ContractClassWithId, ContractDeployer, - ContractInstanceWithAddress, - DebugLogger, + type ContractInstanceWithAddress, + type DebugLogger, EthAddress, Fr, - PXE, + type PXE, SignerlessWallet, TxStatus, - Wallet, + type Wallet, getContractClassFromArtifact, getContractInstanceFromDeployParams, } from '@aztec/aztec.js'; @@ -24,7 +24,7 @@ import { deployInstance, registerContractClass, } from '@aztec/aztec.js/deployment'; -import { ContractClassIdPreimage, Point } from '@aztec/circuits.js'; +import { type ContractClassIdPreimage, Point } from '@aztec/circuits.js'; import { siloNullifier } from '@aztec/circuits.js/hash'; import { FunctionSelector, FunctionType } from '@aztec/foundation/abi'; import { writeTestData } from '@aztec/foundation/testing'; diff --git a/yarn-project/end-to-end/src/e2e_escrow_contract.test.ts b/yarn-project/end-to-end/src/e2e_escrow_contract.test.ts index 047e57674e4b..3c310c502e01 100644 --- a/yarn-project/end-to-end/src/e2e_escrow_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_escrow_contract.test.ts @@ -3,14 +3,14 @@ import { AztecAddress, BatchCall, CompleteAddress, - DebugLogger, + type DebugLogger, ExtendedNote, Fr, - GrumpkinPrivateKey, + type GrumpkinPrivateKey, GrumpkinScalar, Note, - PXE, - PublicKey, + type PXE, + type PublicKey, computeMessageSecretHash, generatePublicKey, } from '@aztec/aztec.js'; diff --git a/yarn-project/end-to-end/src/e2e_fees.test.ts b/yarn-project/end-to-end/src/e2e_fees.test.ts index b03a1d67052c..df0a11935ef5 100644 --- a/yarn-project/end-to-end/src/e2e_fees.test.ts +++ b/yarn-project/end-to-end/src/e2e_fees.test.ts @@ -1,22 +1,22 @@ import { AztecAddress, BatchCall, - DebugLogger, + type DebugLogger, ExtendedNote, Fr, - FunctionCall, + type FunctionCall, FunctionSelector, Note, PrivateFeePaymentMethod, PublicFeePaymentMethod, TxHash, TxStatus, - Wallet, + type Wallet, computeAuthWitMessageHash, computeMessageSecretHash, } from '@aztec/aztec.js'; import { FunctionData, getContractClassFromArtifact } from '@aztec/circuits.js'; -import { ContractArtifact, decodeFunctionSignature } from '@aztec/foundation/abi'; +import { type ContractArtifact, decodeFunctionSignature } from '@aztec/foundation/abi'; import { TokenContract as BananaCoin, FPCContract, @@ -27,14 +27,14 @@ import { import { jest } from '@jest/globals'; import { - BalancesFn, - EndToEndContext, + type BalancesFn, + type EndToEndContext, expectMapping, getBalancesFn, publicDeployAccounts, setup, } from './fixtures/utils.js'; -import { GasPortalTestingHarnessFactory, IGasBridgingTestHarness } from './shared/gas_portal_test_harness.js'; +import { GasPortalTestingHarnessFactory, type IGasBridgingTestHarness } from './shared/gas_portal_test_harness.js'; const TOKEN_NAME = 'BananaCoin'; const TOKEN_SYMBOL = 'BC'; diff --git a/yarn-project/end-to-end/src/e2e_inclusion_proofs_contract.test.ts b/yarn-project/end-to-end/src/e2e_inclusion_proofs_contract.test.ts index 850b349fa58a..1be09b454fd0 100644 --- a/yarn-project/end-to-end/src/e2e_inclusion_proofs_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_inclusion_proofs_contract.test.ts @@ -4,7 +4,7 @@ import { CompleteAddress, Fr, INITIAL_L2_BLOCK_NUM, - PXE, + type PXE, getContractInstanceFromDeployParams, } from '@aztec/aztec.js'; import { deployInstance, registerContractClass } from '@aztec/aztec.js/deployment'; diff --git a/yarn-project/end-to-end/src/e2e_lending_contract.test.ts b/yarn-project/end-to-end/src/e2e_lending_contract.test.ts index b349bfb39c34..2ce81cc47994 100644 --- a/yarn-project/end-to-end/src/e2e_lending_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_lending_contract.test.ts @@ -2,7 +2,7 @@ import { AccountWallet, CheatCodes, CompleteAddress, - DebugLogger, + type DebugLogger, ExtendedNote, Fr, Note, diff --git a/yarn-project/end-to-end/src/e2e_max_block_number.test.ts b/yarn-project/end-to-end/src/e2e_max_block_number.test.ts index c54dab89ca0d..0b8307f1fb44 100644 --- a/yarn-project/end-to-end/src/e2e_max_block_number.test.ts +++ b/yarn-project/end-to-end/src/e2e_max_block_number.test.ts @@ -1,4 +1,4 @@ -import { PXE, Wallet } from '@aztec/aztec.js'; +import { type PXE, type Wallet } from '@aztec/aztec.js'; import { TestContract } from '@aztec/noir-contracts.js'; import { setup } from './fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_multiple_accounts_1_enc_key.test.ts b/yarn-project/end-to-end/src/e2e_multiple_accounts_1_enc_key.test.ts index b4d911dfb028..d0cb237871c1 100644 --- a/yarn-project/end-to-end/src/e2e_multiple_accounts_1_enc_key.test.ts +++ b/yarn-project/end-to-end/src/e2e_multiple_accounts_1_enc_key.test.ts @@ -1,15 +1,15 @@ import { getSchnorrAccount } from '@aztec/accounts/schnorr'; import { AztecAddress, - AztecNode, + type AztecNode, CompleteAddress, - DebugLogger, + type DebugLogger, ExtendedNote, Fr, GrumpkinScalar, Note, - PXE, - Wallet, + type PXE, + type Wallet, computeMessageSecretHash, generatePublicKey, } from '@aztec/aztec.js'; diff --git a/yarn-project/end-to-end/src/e2e_nested_contract.test.ts b/yarn-project/end-to-end/src/e2e_nested_contract.test.ts index 8582ae4ecdee..fd9c41876eaf 100644 --- a/yarn-project/end-to-end/src/e2e_nested_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_nested_contract.test.ts @@ -1,4 +1,4 @@ -import { AztecAddress, BatchCall, DebugLogger, Fr, PXE, Wallet, toBigIntBE } from '@aztec/aztec.js'; +import { AztecAddress, BatchCall, type DebugLogger, Fr, type PXE, type Wallet, toBigIntBE } from '@aztec/aztec.js'; import { getTestData, isGenerateTestDataEnabled } from '@aztec/foundation/testing'; import { ChildContract, ImportTestContract, ParentContract, TestContract } from '@aztec/noir-contracts.js'; diff --git a/yarn-project/end-to-end/src/e2e_non_contract_account.test.ts b/yarn-project/end-to-end/src/e2e_non_contract_account.test.ts index ef7e51ca9104..4e9df2086e5b 100644 --- a/yarn-project/end-to-end/src/e2e_non_contract_account.test.ts +++ b/yarn-project/end-to-end/src/e2e_non_contract_account.test.ts @@ -1,4 +1,13 @@ -import { DebugLogger, ExtendedNote, Fr, Note, PXE, SignerlessWallet, Wallet, toBigInt } from '@aztec/aztec.js'; +import { + type DebugLogger, + ExtendedNote, + Fr, + Note, + type PXE, + SignerlessWallet, + type Wallet, + toBigInt, +} from '@aztec/aztec.js'; import { siloNullifier } from '@aztec/circuits.js/hash'; import { TestContract } from '@aztec/noir-contracts.js/Test'; diff --git a/yarn-project/end-to-end/src/e2e_note_getter.test.ts b/yarn-project/end-to-end/src/e2e_note_getter.test.ts index 402b50f5b05c..90753ed7f352 100644 --- a/yarn-project/end-to-end/src/e2e_note_getter.test.ts +++ b/yarn-project/end-to-end/src/e2e_note_getter.test.ts @@ -1,4 +1,4 @@ -import { AztecAddress, Comparator, Fr, Wallet, toBigInt } from '@aztec/aztec.js'; +import { AztecAddress, Comparator, Fr, type Wallet, toBigInt } from '@aztec/aztec.js'; import { DocsExampleContract, TestContract } from '@aztec/noir-contracts.js'; import { setup } from './fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_ordering.test.ts b/yarn-project/end-to-end/src/e2e_ordering.test.ts index 450bc0eb214a..bd7ab34ebb81 100644 --- a/yarn-project/end-to-end/src/e2e_ordering.test.ts +++ b/yarn-project/end-to-end/src/e2e_ordering.test.ts @@ -1,5 +1,5 @@ // Test suite for testing proper ordering of side effects -import { Fr, FunctionSelector, PXE, Wallet, toBigIntBE } from '@aztec/aztec.js'; +import { Fr, FunctionSelector, type PXE, type Wallet, toBigIntBE } from '@aztec/aztec.js'; import { ChildContract } from '@aztec/noir-contracts.js/Child'; import { ParentContract } from '@aztec/noir-contracts.js/Parent'; diff --git a/yarn-project/end-to-end/src/e2e_outbox.test.ts b/yarn-project/end-to-end/src/e2e_outbox.test.ts index e94ecec0cd56..d027a244ddfb 100644 --- a/yarn-project/end-to-end/src/e2e_outbox.test.ts +++ b/yarn-project/end-to-end/src/e2e_outbox.test.ts @@ -1,8 +1,8 @@ import { AccountWalletWithPrivateKey, - AztecNode, + type AztecNode, BatchCall, - DeployL1Contracts, + type DeployL1Contracts, EthAddress, Fr, SiblingPath, diff --git a/yarn-project/end-to-end/src/e2e_p2p_network.test.ts b/yarn-project/end-to-end/src/e2e_p2p_network.test.ts index 618986c2ab1f..1dd19efac976 100644 --- a/yarn-project/end-to-end/src/e2e_p2p_network.test.ts +++ b/yarn-project/end-to-end/src/e2e_p2p_network.test.ts @@ -1,16 +1,16 @@ import { getSchnorrAccount } from '@aztec/accounts/schnorr'; -import { AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node'; +import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node'; import { AztecAddress, CompleteAddress, - DebugLogger, + type DebugLogger, Fr, Grumpkin, GrumpkinScalar, SentTx, TxStatus, } from '@aztec/aztec.js'; -import { BootstrapNode, P2PConfig, createLibP2PPeerId } from '@aztec/p2p'; +import { BootstrapNode, type P2PConfig, createLibP2PPeerId } from '@aztec/p2p'; import { ConstantKeyPair, PXEService, createPXEService, getPXEServiceConfig as getRpcConfig } from '@aztec/pxe'; import { mnemonicToAccount } from 'viem/accounts'; diff --git a/yarn-project/end-to-end/src/e2e_pending_note_hashes_contract.test.ts b/yarn-project/end-to-end/src/e2e_pending_note_hashes_contract.test.ts index 1e30daec2902..96be5107754a 100644 --- a/yarn-project/end-to-end/src/e2e_pending_note_hashes_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_pending_note_hashes_contract.test.ts @@ -1,4 +1,4 @@ -import { AztecAddress, AztecNode, CompleteAddress, DebugLogger, Fr, Wallet } from '@aztec/aztec.js'; +import { AztecAddress, type AztecNode, CompleteAddress, type DebugLogger, Fr, type Wallet } from '@aztec/aztec.js'; import { PendingNoteHashesContract } from '@aztec/noir-contracts.js/PendingNoteHashes'; import { setup } from './fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_persistence.test.ts b/yarn-project/end-to-end/src/e2e_persistence.test.ts index 52eb18a4fe25..fcfcf1096c77 100644 --- a/yarn-project/end-to-end/src/e2e_persistence.test.ts +++ b/yarn-project/end-to-end/src/e2e_persistence.test.ts @@ -1,16 +1,16 @@ import { getUnsafeSchnorrAccount, getUnsafeSchnorrWallet } from '@aztec/accounts/single_key'; import { AccountWallet, - ContractInstanceWithAddress, + type ContractInstanceWithAddress, ExtendedNote, Note, TxHash, computeMessageSecretHash, waitForAccountSynch, } from '@aztec/aztec.js'; -import { Salt } from '@aztec/aztec.js/account'; +import { type Salt } from '@aztec/aztec.js/account'; import { AztecAddress, CompleteAddress, Fq, Fr } from '@aztec/circuits.js'; -import { DeployL1Contracts } from '@aztec/ethereum'; +import { type DeployL1Contracts } from '@aztec/ethereum'; import { TokenContract } from '@aztec/noir-contracts.js/Token'; import { jest } from '@jest/globals'; @@ -18,7 +18,7 @@ import { mkdtemp } from 'fs/promises'; import { tmpdir } from 'os'; import { join } from 'path'; -import { EndToEndContext, setup } from './fixtures/utils.js'; +import { type EndToEndContext, setup } from './fixtures/utils.js'; jest.setTimeout(60_000); diff --git a/yarn-project/end-to-end/src/e2e_private_voting_contract.test.ts b/yarn-project/end-to-end/src/e2e_private_voting_contract.test.ts index 7d700bdffdc0..1d9e897491d2 100644 --- a/yarn-project/end-to-end/src/e2e_private_voting_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_private_voting_contract.test.ts @@ -1,4 +1,4 @@ -import { AccountWallet, AztecAddress, CompleteAddress, DebugLogger, Fr } from '@aztec/aztec.js'; +import { AccountWallet, AztecAddress, CompleteAddress, type DebugLogger, Fr } from '@aztec/aztec.js'; import { EasyPrivateVotingContract } from '@aztec/noir-contracts.js/EasyPrivateVoting'; import { setup } from './fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_public_cross_chain_messaging.test.ts b/yarn-project/end-to-end/src/e2e_public_cross_chain_messaging.test.ts index 740fb2a5c991..9b4d551c4c73 100644 --- a/yarn-project/end-to-end/src/e2e_public_cross_chain_messaging.test.ts +++ b/yarn-project/end-to-end/src/e2e_public_cross_chain_messaging.test.ts @@ -1,16 +1,16 @@ import { AccountWallet, AztecAddress, - AztecNode, + type AztecNode, CompleteAddress, - DebugLogger, - DeployL1Contracts, + type DebugLogger, + type DeployL1Contracts, EthAddress, Fr, L1Actor, L1ToL2Message, L2Actor, - PXE, + type PXE, computeAuthWitMessageHash, computeMessageSecretHash, } from '@aztec/aztec.js'; @@ -20,7 +20,7 @@ import { TestContract } from '@aztec/noir-contracts.js'; import { TokenContract } from '@aztec/noir-contracts.js/Token'; import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge'; -import { Chain, GetContractReturnType, Hex, HttpTransport, PublicClient } from 'viem'; +import { type Chain, type GetContractReturnType, type Hex, type HttpTransport, type PublicClient } from 'viem'; import { decodeEventLog, toFunctionSelector } from 'viem/utils'; import { publicDeployAccounts, setup } from './fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_public_to_private_messaging.test.ts b/yarn-project/end-to-end/src/e2e_public_to_private_messaging.test.ts index 0b67d07c67df..4fb66f371b5d 100644 --- a/yarn-project/end-to-end/src/e2e_public_to_private_messaging.test.ts +++ b/yarn-project/end-to-end/src/e2e_public_to_private_messaging.test.ts @@ -1,4 +1,4 @@ -import { AztecAddress, DebugLogger, EthAddress } from '@aztec/aztec.js'; +import { AztecAddress, type DebugLogger, EthAddress } from '@aztec/aztec.js'; import { setup } from './fixtures/utils.js'; import { CrossChainTestHarness } from './shared/cross_chain_test_harness.js'; diff --git a/yarn-project/end-to-end/src/e2e_sandbox_example.test.ts b/yarn-project/end-to-end/src/e2e_sandbox_example.test.ts index a3c5867d4031..24b602ea7bcc 100644 --- a/yarn-project/end-to-end/src/e2e_sandbox_example.test.ts +++ b/yarn-project/end-to-end/src/e2e_sandbox_example.test.ts @@ -6,7 +6,7 @@ import { Fr, GrumpkinScalar, Note, - PXE, + type PXE, computeMessageSecretHash, createDebugLogger, createPXEClient, diff --git a/yarn-project/end-to-end/src/e2e_slow_tree.test.ts b/yarn-project/end-to-end/src/e2e_slow_tree.test.ts index 4e4d1c80f79c..13ccb0671bbf 100644 --- a/yarn-project/end-to-end/src/e2e_slow_tree.test.ts +++ b/yarn-project/end-to-end/src/e2e_slow_tree.test.ts @@ -1,5 +1,5 @@ /* eslint-disable camelcase */ -import { CheatCodes, DebugLogger, Fr, Wallet } from '@aztec/aztec.js'; +import { CheatCodes, type DebugLogger, Fr, type Wallet } from '@aztec/aztec.js'; import { openTmpStore } from '@aztec/kv-store/utils'; import { Pedersen, SparseTree, newTree } from '@aztec/merkle-tree'; import { SlowTreeContract } from '@aztec/noir-contracts.js/SlowTree'; diff --git a/yarn-project/end-to-end/src/e2e_state_vars.test.ts b/yarn-project/end-to-end/src/e2e_state_vars.test.ts index 8aebff157522..5e3f441ff2b0 100644 --- a/yarn-project/end-to-end/src/e2e_state_vars.test.ts +++ b/yarn-project/end-to-end/src/e2e_state_vars.test.ts @@ -1,4 +1,4 @@ -import { Wallet } from '@aztec/aztec.js'; +import { type Wallet } from '@aztec/aztec.js'; import { DocsExampleContract } from '@aztec/noir-contracts.js'; import { setup } from './fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_static_calls.test.ts b/yarn-project/end-to-end/src/e2e_static_calls.test.ts index b51892a656c6..839e1628acc2 100644 --- a/yarn-project/end-to-end/src/e2e_static_calls.test.ts +++ b/yarn-project/end-to-end/src/e2e_static_calls.test.ts @@ -1,4 +1,4 @@ -import { Wallet } from '@aztec/aztec.js'; +import { type Wallet } from '@aztec/aztec.js'; import { ChildContract, ParentContract } from '@aztec/noir-contracts.js'; import { setup } from './fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/e2e_token_contract.test.ts b/yarn-project/end-to-end/src/e2e_token_contract.test.ts index d1f01897e01a..1b8215a3cf74 100644 --- a/yarn-project/end-to-end/src/e2e_token_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_token_contract.test.ts @@ -1,7 +1,7 @@ import { AccountWallet, CompleteAddress, - DebugLogger, + type DebugLogger, ExtendedNote, Fr, FunctionSelector, diff --git a/yarn-project/end-to-end/src/fixtures/utils.ts b/yarn-project/end-to-end/src/fixtures/utils.ts index 463ddbe28d5f..eff3952f1759 100644 --- a/yarn-project/end-to-end/src/fixtures/utils.ts +++ b/yarn-project/end-to-end/src/fixtures/utils.ts @@ -1,24 +1,24 @@ import { SchnorrAccountContractArtifact } from '@aztec/accounts/schnorr'; import { createAccounts, getDeployedTestAccountsWallets } from '@aztec/accounts/testing'; -import { AztecNodeConfig, AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node'; +import { type AztecNodeConfig, AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node'; import { AccountWalletWithPrivateKey, AztecAddress, - AztecNode, + type AztecNode, BatchCall, CheatCodes, CompleteAddress, - ContractMethod, - DebugLogger, - DeployL1Contracts, + type ContractMethod, + type DebugLogger, + type DeployL1Contracts, EncryptedL2BlockL2Logs, EthCheatCodes, - L1ContractArtifactsForDeployment, + type L1ContractArtifactsForDeployment, LogType, - PXE, + type PXE, SentTx, SignerlessWallet, - Wallet, + type Wallet, createAztecNodeClient, createDebugLogger, createPXEClient, @@ -47,17 +47,17 @@ import { RollupBytecode, } from '@aztec/l1-artifacts'; import { getCanonicalGasToken, getCanonicalGasTokenAddress } from '@aztec/protocol-contracts/gas-token'; -import { PXEService, PXEServiceConfig, createPXEService, getPXEServiceConfig } from '@aztec/pxe'; +import { PXEService, type PXEServiceConfig, createPXEService, getPXEServiceConfig } from '@aztec/pxe'; import { SequencerClient } from '@aztec/sequencer-client'; import * as fs from 'fs/promises'; import * as path from 'path'; import { - Account, - Chain, - HDAccount, - HttpTransport, - PrivateKeyAccount, + type Account, + type Chain, + type HDAccount, + type HttpTransport, + type PrivateKeyAccount, createPublicClient, createWalletClient, getContract, diff --git a/yarn-project/end-to-end/src/guides/dapp_testing.test.ts b/yarn-project/end-to-end/src/guides/dapp_testing.test.ts index 32910fade34f..72d400482808 100644 --- a/yarn-project/end-to-end/src/guides/dapp_testing.test.ts +++ b/yarn-project/end-to-end/src/guides/dapp_testing.test.ts @@ -5,7 +5,7 @@ import { ExtendedNote, Fr, Note, - PXE, + type PXE, TxStatus, computeMessageSecretHash, createPXEClient, diff --git a/yarn-project/end-to-end/src/guides/writing_an_account_contract.test.ts b/yarn-project/end-to-end/src/guides/writing_an_account_contract.test.ts index 604f5edf9204..0e705c1b2216 100644 --- a/yarn-project/end-to-end/src/guides/writing_an_account_contract.test.ts +++ b/yarn-project/end-to-end/src/guides/writing_an_account_contract.test.ts @@ -2,11 +2,11 @@ import { DefaultAccountContract } from '@aztec/accounts/defaults'; import { AccountManager, AuthWitness, - AuthWitnessProvider, + type AuthWitnessProvider, CompleteAddress, ExtendedNote, Fr, - GrumpkinPrivateKey, + type GrumpkinPrivateKey, GrumpkinScalar, Note, Schnorr, diff --git a/yarn-project/end-to-end/src/integration_l1_publisher.test.ts b/yarn-project/end-to-end/src/integration_l1_publisher.test.ts index 050cf0da6bf7..39bfafbea082 100644 --- a/yarn-project/end-to-end/src/integration_l1_publisher.test.ts +++ b/yarn-project/end-to-end/src/integration_l1_publisher.test.ts @@ -1,10 +1,10 @@ -import { ArchiveSource } from '@aztec/archiver'; +import { type ArchiveSource } from '@aztec/archiver'; import { getConfigEnvVars } from '@aztec/aztec-node'; import { AztecAddress, Body, Fr, GlobalVariables, L2Actor, L2Block, createDebugLogger, mockTx } from '@aztec/aztec.js'; // eslint-disable-next-line no-restricted-imports import { - ProcessedTx, - ProvingSuccess, + type ProcessedTx, + type ProvingSuccess, makeEmptyProcessedTx as makeEmptyProcessedTxFromHistoricalTreeRoots, makeProcessedTx, } from '@aztec/circuit-types'; @@ -22,7 +22,7 @@ import { SideEffectLinkedToNoteHash, } from '@aztec/circuits.js'; import { fr, makeNewSideEffect, makeNewSideEffectLinkedToNoteHash, makeProof } from '@aztec/circuits.js/testing'; -import { L1ContractAddresses, createEthereumChain } from '@aztec/ethereum'; +import { type L1ContractAddresses, createEthereumChain } from '@aztec/ethereum'; import { makeTuple, range } from '@aztec/foundation/array'; import { openTmpStore } from '@aztec/kv-store/utils'; import { AvailabilityOracleAbi, InboxAbi, OutboxAbi, RollupAbi } from '@aztec/l1-artifacts'; @@ -30,26 +30,26 @@ import { SHA256Trunc, StandardTree } from '@aztec/merkle-tree'; import { TxProver } from '@aztec/prover-client'; import { L1Publisher, getL1Publisher } from '@aztec/sequencer-client'; import { WASMSimulator } from '@aztec/simulator'; -import { MerkleTrees, ServerWorldStateSynchronizer, WorldStateConfig } from '@aztec/world-state'; +import { MerkleTrees, ServerWorldStateSynchronizer, type WorldStateConfig } from '@aztec/world-state'; import { beforeEach, describe, expect, it } from '@jest/globals'; import * as fs from 'fs'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; import { - Account, - Address, - Chain, - GetContractReturnType, - HttpTransport, - PublicClient, - WalletClient, + type Account, + type Address, + type Chain, + type GetContractReturnType, + type HttpTransport, + type PublicClient, + type WalletClient, decodeEventLog, encodeFunctionData, getAbiItem, getAddress, getContract, } from 'viem'; -import { PrivateKeyAccount, privateKeyToAccount } from 'viem/accounts'; +import { type PrivateKeyAccount, privateKeyToAccount } from 'viem/accounts'; import { setupL1Contracts } from './fixtures/utils.js'; diff --git a/yarn-project/end-to-end/src/shared/cli.ts b/yarn-project/end-to-end/src/shared/cli.ts index 9c47e30398ce..1d9aa8a0ecbe 100644 --- a/yarn-project/end-to-end/src/shared/cli.ts +++ b/yarn-project/end-to-end/src/shared/cli.ts @@ -1,4 +1,11 @@ -import { AztecAddress, CompleteAddress, DebugLogger, Fr, PXE, computeMessageSecretHash } from '@aztec/aztec.js'; +import { + AztecAddress, + CompleteAddress, + type DebugLogger, + Fr, + type PXE, + computeMessageSecretHash, +} from '@aztec/aztec.js'; import { getProgram } from '@aztec/cli'; import stringArgv from 'string-argv'; diff --git a/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts b/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts index 89f8778ae5f6..eecd27b04196 100644 --- a/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts +++ b/yarn-project/end-to-end/src/shared/cross_chain_test_harness.ts @@ -1,18 +1,18 @@ // docs:start:cross_chain_test_harness import { AztecAddress, - AztecNode, - DebugLogger, + type AztecNode, + type DebugLogger, EthAddress, ExtendedNote, - FieldsOf, + type FieldsOf, Fr, Note, - PXE, + type PXE, SiblingPath, TxHash, TxReceipt, - Wallet, + type Wallet, computeMessageSecretHash, deployL1Contract, retryUntil, @@ -30,12 +30,12 @@ import { TokenContract } from '@aztec/noir-contracts.js/Token'; import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge'; import { - Account, - Chain, - GetContractReturnType, - HttpTransport, - PublicClient, - WalletClient, + type Account, + type Chain, + type GetContractReturnType, + type HttpTransport, + type PublicClient, + type WalletClient, getContract, toFunctionSelector, } from 'viem'; diff --git a/yarn-project/end-to-end/src/shared/gas_portal_test_harness.ts b/yarn-project/end-to-end/src/shared/gas_portal_test_harness.ts index ef5140df02fa..f0208cc32b22 100644 --- a/yarn-project/end-to-end/src/shared/gas_portal_test_harness.ts +++ b/yarn-project/end-to-end/src/shared/gas_portal_test_harness.ts @@ -1,9 +1,25 @@ -import { AztecAddress, DebugLogger, EthAddress, Fr, PXE, Wallet, computeMessageSecretHash } from '@aztec/aztec.js'; +import { + AztecAddress, + type DebugLogger, + EthAddress, + Fr, + type PXE, + type Wallet, + computeMessageSecretHash, +} from '@aztec/aztec.js'; import { GasPortalAbi, OutboxAbi, PortalERC20Abi } from '@aztec/l1-artifacts'; import { GasTokenContract } from '@aztec/noir-contracts.js'; import { getCanonicalGasToken, getCanonicalGasTokenAddress } from '@aztec/protocol-contracts/gas-token'; -import { Account, Chain, GetContractReturnType, HttpTransport, PublicClient, WalletClient, getContract } from 'viem'; +import { + type Account, + type Chain, + type GetContractReturnType, + type HttpTransport, + type PublicClient, + type WalletClient, + getContract, +} from 'viem'; export interface IGasBridgingTestHarness { bridgeFromL1ToL2(l1TokenBalance: bigint, bridgeAmount: bigint, owner: AztecAddress): Promise; diff --git a/yarn-project/end-to-end/src/shared/index.ts b/yarn-project/end-to-end/src/shared/index.ts index 4c6d1eef910b..3e71a2701242 100644 --- a/yarn-project/end-to-end/src/shared/index.ts +++ b/yarn-project/end-to-end/src/shared/index.ts @@ -1,3 +1,3 @@ export { cliTestSuite } from './cli.js'; export { browserTestSuite } from './browser.js'; -export { uniswapL1L2TestSuite, UniswapSetupContext } from './uniswap_l1_l2.js'; +export { uniswapL1L2TestSuite, type UniswapSetupContext } from './uniswap_l1_l2.js'; diff --git a/yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts b/yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts index 865b0cb9cd45..9d4de1730a1e 100644 --- a/yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts +++ b/yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts @@ -1,11 +1,11 @@ import { AccountWallet, AztecAddress, - AztecNode, - DebugLogger, + type AztecNode, + type DebugLogger, EthAddress, Fr, - PXE, + type PXE, computeAuthWitMessageHash, } from '@aztec/aztec.js'; import { deployL1Contract } from '@aztec/ethereum'; @@ -15,12 +15,12 @@ import { UniswapContract } from '@aztec/noir-contracts.js/Uniswap'; import { jest } from '@jest/globals'; import { - Account, - Chain, - GetContractReturnType, - HttpTransport, - PublicClient, - WalletClient, + type Account, + type Chain, + type GetContractReturnType, + type HttpTransport, + type PublicClient, + type WalletClient, decodeEventLog, getContract, parseEther, diff --git a/yarn-project/end-to-end/src/simulators/token_simulator.ts b/yarn-project/end-to-end/src/simulators/token_simulator.ts index 686cec91cc56..c42781752d4c 100644 --- a/yarn-project/end-to-end/src/simulators/token_simulator.ts +++ b/yarn-project/end-to-end/src/simulators/token_simulator.ts @@ -1,5 +1,5 @@ /* eslint-disable jsdoc/require-jsdoc */ -import { AztecAddress, DebugLogger } from '@aztec/aztec.js'; +import { AztecAddress, type DebugLogger } from '@aztec/aztec.js'; import { TokenContract } from '@aztec/noir-contracts.js/Token'; export class TokenSimulator { diff --git a/yarn-project/end-to-end/src/uniswap_trade_on_l1_from_l2.test.ts b/yarn-project/end-to-end/src/uniswap_trade_on_l1_from_l2.test.ts index 461e8307020d..f4bf1b92efd7 100644 --- a/yarn-project/end-to-end/src/uniswap_trade_on_l1_from_l2.test.ts +++ b/yarn-project/end-to-end/src/uniswap_trade_on_l1_from_l2.test.ts @@ -1,5 +1,5 @@ import { setup as e2eSetup } from './fixtures/utils.js'; -import { UniswapSetupContext, uniswapL1L2TestSuite } from './shared/uniswap_l1_l2.js'; +import { type UniswapSetupContext, uniswapL1L2TestSuite } from './shared/uniswap_l1_l2.js'; // This tests works on forked mainnet. There is a dump of the data in `dumpedState` such that we // don't need to burn through RPC requests. diff --git a/yarn-project/entrypoints/src/account_entrypoint.ts b/yarn-project/entrypoints/src/account_entrypoint.ts index e855e48324f9..82e43a94ce34 100644 --- a/yarn-project/entrypoints/src/account_entrypoint.ts +++ b/yarn-project/entrypoints/src/account_entrypoint.ts @@ -1,8 +1,8 @@ -import { AuthWitnessProvider } from '@aztec/aztec.js/account'; -import { EntrypointInterface, FeeOptions } from '@aztec/aztec.js/entrypoint'; -import { FunctionCall, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types'; +import { type AuthWitnessProvider } from '@aztec/aztec.js/account'; +import { type EntrypointInterface, type FeeOptions } from '@aztec/aztec.js/entrypoint'; +import { type FunctionCall, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types'; import { AztecAddress, FunctionData, GeneratorIndex, TxContext } from '@aztec/circuits.js'; -import { FunctionAbi, encodeArguments } from '@aztec/foundation/abi'; +import { type FunctionAbi, encodeArguments } from '@aztec/foundation/abi'; import { DEFAULT_CHAIN_ID, DEFAULT_VERSION } from './constants.js'; import { buildAppPayload, buildFeePayload, hashPayload } from './entrypoint_payload.js'; diff --git a/yarn-project/entrypoints/src/dapp_entrypoint.ts b/yarn-project/entrypoints/src/dapp_entrypoint.ts index 5e851d59f441..db51563a8b8c 100644 --- a/yarn-project/entrypoints/src/dapp_entrypoint.ts +++ b/yarn-project/entrypoints/src/dapp_entrypoint.ts @@ -1,9 +1,9 @@ import { computeInnerAuthWitHash, computeOuterAuthWitHash } from '@aztec/aztec.js'; -import { AuthWitnessProvider } from '@aztec/aztec.js/account'; -import { EntrypointInterface } from '@aztec/aztec.js/entrypoint'; -import { FunctionCall, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types'; +import { type AuthWitnessProvider } from '@aztec/aztec.js/account'; +import { type EntrypointInterface } from '@aztec/aztec.js/entrypoint'; +import { type FunctionCall, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types'; import { AztecAddress, Fr, FunctionData, TxContext } from '@aztec/circuits.js'; -import { FunctionAbi, encodeArguments } from '@aztec/foundation/abi'; +import { type FunctionAbi, encodeArguments } from '@aztec/foundation/abi'; import { DEFAULT_CHAIN_ID, DEFAULT_VERSION } from './constants.js'; import { buildDappPayload } from './entrypoint_payload.js'; diff --git a/yarn-project/entrypoints/src/entrypoint_payload.ts b/yarn-project/entrypoints/src/entrypoint_payload.ts index c76d20e70dbb..3e183452c8e5 100644 --- a/yarn-project/entrypoints/src/entrypoint_payload.ts +++ b/yarn-project/entrypoints/src/entrypoint_payload.ts @@ -1,6 +1,6 @@ -import { FeeOptions } from '@aztec/aztec.js/entrypoint'; +import { type FeeOptions } from '@aztec/aztec.js/entrypoint'; import { Fr } from '@aztec/aztec.js/fields'; -import { FunctionCall, PackedArguments, emptyFunctionCall } from '@aztec/circuit-types'; +import { type FunctionCall, PackedArguments, emptyFunctionCall } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/circuits.js'; import { padArrayEnd } from '@aztec/foundation/collection'; import { pedersenHash } from '@aztec/foundation/crypto'; diff --git a/yarn-project/entrypoints/src/multi_call_entrypoint.ts b/yarn-project/entrypoints/src/multi_call_entrypoint.ts index 594313438782..3f5985d5720a 100644 --- a/yarn-project/entrypoints/src/multi_call_entrypoint.ts +++ b/yarn-project/entrypoints/src/multi_call_entrypoint.ts @@ -1,7 +1,7 @@ -import { EntrypointInterface } from '@aztec/aztec.js/entrypoint'; -import { FunctionCall, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types'; +import { type EntrypointInterface } from '@aztec/aztec.js/entrypoint'; +import { type FunctionCall, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types'; import { AztecAddress, FunctionData, TxContext } from '@aztec/circuits.js'; -import { FunctionAbi, encodeArguments } from '@aztec/foundation/abi'; +import { type FunctionAbi, encodeArguments } from '@aztec/foundation/abi'; import { getCanonicalMultiCallEntrypointAddress } from '@aztec/protocol-contracts/multi-call-entrypoint'; import { DEFAULT_CHAIN_ID, DEFAULT_VERSION } from './constants.js'; diff --git a/yarn-project/ethereum/src/constants.ts b/yarn-project/ethereum/src/constants.ts index fa71f161b2ac..92e0b01c9d3c 100644 --- a/yarn-project/ethereum/src/constants.ts +++ b/yarn-project/ethereum/src/constants.ts @@ -1,3 +1,3 @@ -import { Hex } from 'viem'; +import { type Hex } from 'viem'; export const NULL_KEY: Hex = `0x${'0000000000000000000000000000000000000000000000000000000000000000'}`; diff --git a/yarn-project/ethereum/src/deploy_l1_contracts.ts b/yarn-project/ethereum/src/deploy_l1_contracts.ts index 7fb7939056ea..6df49139bd92 100644 --- a/yarn-project/ethereum/src/deploy_l1_contracts.ts +++ b/yarn-project/ethereum/src/deploy_l1_contracts.ts @@ -1,23 +1,23 @@ import { EthAddress } from '@aztec/foundation/eth-address'; -import { DebugLogger } from '@aztec/foundation/log'; +import { type DebugLogger } from '@aztec/foundation/log'; import type { Abi, Narrow } from 'abitype'; import { - Account, - Chain, - Hex, - HttpTransport, - PublicClient, - WalletClient, + type Account, + type Chain, + type Hex, + type HttpTransport, + type PublicClient, + type WalletClient, createPublicClient, createWalletClient, getAddress, getContract, http, } from 'viem'; -import { HDAccount, PrivateKeyAccount } from 'viem/accounts'; +import { type HDAccount, type PrivateKeyAccount } from 'viem/accounts'; -import { L1ContractAddresses } from './l1_contract_addresses.js'; +import { type L1ContractAddresses } from './l1_contract_addresses.js'; /** * Return type of the deployL1Contract function. diff --git a/yarn-project/ethereum/src/ethereum_chain.ts b/yarn-project/ethereum/src/ethereum_chain.ts index 91d66239a005..0f8d401a01d5 100644 --- a/yarn-project/ethereum/src/ethereum_chain.ts +++ b/yarn-project/ethereum/src/ethereum_chain.ts @@ -1,4 +1,4 @@ -import { Chain } from 'viem'; +import { type Chain } from 'viem'; /** * Interface containing the connection and chain properties to interact with a blockchain. diff --git a/yarn-project/ethereum/src/index.ts b/yarn-project/ethereum/src/index.ts index 6765234a136c..8ef2db852366 100644 --- a/yarn-project/ethereum/src/index.ts +++ b/yarn-project/ethereum/src/index.ts @@ -1,6 +1,6 @@ import { foundry } from 'viem/chains'; -import { EthereumChain } from './ethereum_chain.js'; +import { type EthereumChain } from './ethereum_chain.js'; import { createTestnetChain } from './testnet.js'; export * from './testnet.js'; diff --git a/yarn-project/ethereum/src/testnet.ts b/yarn-project/ethereum/src/testnet.ts index 074e73ef096c..c6e28871a3ef 100644 --- a/yarn-project/ethereum/src/testnet.ts +++ b/yarn-project/ethereum/src/testnet.ts @@ -1,6 +1,6 @@ -import { Chain } from 'viem'; +import { type Chain } from 'viem'; -import { EthereumChain } from './ethereum_chain.js'; +import { type EthereumChain } from './ethereum_chain.js'; const { DEPLOY_TAG = 'aztec-dev', CHAIN_ID = 31337 } = process.env; diff --git a/yarn-project/foundation/src/abi/abi.test.ts b/yarn-project/foundation/src/abi/abi.test.ts index afa4d484e6b0..b7b1334e4325 100644 --- a/yarn-project/foundation/src/abi/abi.test.ts +++ b/yarn-project/foundation/src/abi/abi.test.ts @@ -1,4 +1,10 @@ -import { ContractArtifact, FunctionArtifact, FunctionType, getDefaultInitializer, getInitializer } from './abi.js'; +import { + type ContractArtifact, + type FunctionArtifact, + FunctionType, + getDefaultInitializer, + getInitializer, +} from './abi.js'; describe('abi', () => { describe('getDefaultInitializer', () => { diff --git a/yarn-project/foundation/src/abi/decoder.test.ts b/yarn-project/foundation/src/abi/decoder.test.ts index 7cefecf772b9..2e0d1fedd883 100644 --- a/yarn-project/foundation/src/abi/decoder.test.ts +++ b/yarn-project/foundation/src/abi/decoder.test.ts @@ -1,4 +1,4 @@ -import { ABIParameterVisibility, FunctionArtifact } from './abi.js'; +import { ABIParameterVisibility, type FunctionArtifact } from './abi.js'; import { decodeFunctionSignature, decodeFunctionSignatureWithParameterNames } from './decoder.js'; describe('abi/decoder', () => { diff --git a/yarn-project/foundation/src/abi/decoder.ts b/yarn-project/foundation/src/abi/decoder.ts index e1f4558afa20..bf5769e2db2d 100644 --- a/yarn-project/foundation/src/abi/decoder.ts +++ b/yarn-project/foundation/src/abi/decoder.ts @@ -1,6 +1,6 @@ import { AztecAddress } from '../aztec-address/index.js'; import { Fr } from '../fields/index.js'; -import { ABIParameter, type ABIType, ABIVariable, FunctionArtifact } from './abi.js'; +import { type ABIParameter, type ABIType, type ABIVariable, type FunctionArtifact } from './abi.js'; import { isAztecAddressStruct } from './utils.js'; /** diff --git a/yarn-project/foundation/src/abi/encoder.test.ts b/yarn-project/foundation/src/abi/encoder.test.ts index a234bc04758c..f78e1325dfd9 100644 --- a/yarn-project/foundation/src/abi/encoder.test.ts +++ b/yarn-project/foundation/src/abi/encoder.test.ts @@ -1,7 +1,7 @@ import { AztecAddress } from '../aztec-address/index.js'; import { Fr } from '../fields/fields.js'; import { Point } from '../fields/point.js'; -import { ABIParameterVisibility, FunctionAbi, FunctionType } from './abi.js'; +import { ABIParameterVisibility, type FunctionAbi, FunctionType } from './abi.js'; import { encodeArguments } from './encoder.js'; describe('abi/encoder', () => { diff --git a/yarn-project/foundation/src/abi/encoder.ts b/yarn-project/foundation/src/abi/encoder.ts index 59fc8deb7494..7ca7260db684 100644 --- a/yarn-project/foundation/src/abi/encoder.ts +++ b/yarn-project/foundation/src/abi/encoder.ts @@ -1,5 +1,5 @@ import { Fr } from '../fields/index.js'; -import { ABIType, FunctionAbi } from './abi.js'; +import { type ABIType, type FunctionAbi } from './abi.js'; import { isAddressStruct, isFunctionSelectorStruct, isWrappedFieldStruct } from './utils.js'; /** diff --git a/yarn-project/foundation/src/abi/function_selector.ts b/yarn-project/foundation/src/abi/function_selector.ts index 9ffcc9588833..7769072ea2a5 100644 --- a/yarn-project/foundation/src/abi/function_selector.ts +++ b/yarn-project/foundation/src/abi/function_selector.ts @@ -3,7 +3,7 @@ import { keccak, randomBytes } from '../crypto/index.js'; import { Fr } from '../fields/fields.js'; import { BufferReader } from '../serialize/buffer_reader.js'; import { FieldReader } from '../serialize/field_reader.js'; -import { ABIParameter } from './abi.js'; +import { type ABIParameter } from './abi.js'; import { decodeFunctionSignature } from './decoder.js'; import { Selector } from './selector.js'; diff --git a/yarn-project/foundation/src/array/array.ts b/yarn-project/foundation/src/array/array.ts index 97af4818fffe..4821aa45f8d2 100644 --- a/yarn-project/foundation/src/array/array.ts +++ b/yarn-project/foundation/src/array/array.ts @@ -1,4 +1,4 @@ -import { Tuple } from '../serialize/index.js'; +import { type Tuple } from '../serialize/index.js'; export type { FieldsOf } from '../types/index.js'; diff --git a/yarn-project/foundation/src/collection/array.ts b/yarn-project/foundation/src/collection/array.ts index 4ec479470e8c..3a397db8b501 100644 --- a/yarn-project/foundation/src/collection/array.ts +++ b/yarn-project/foundation/src/collection/array.ts @@ -1,4 +1,4 @@ -import { Tuple } from '../serialize/types.js'; +import { type Tuple } from '../serialize/types.js'; /** * Pads an array to the target length by appending an element to its end. Throws if target length exceeds the input array length. Does not modify the input array. diff --git a/yarn-project/foundation/src/crypto/pedersen/pedersen.wasm.ts b/yarn-project/foundation/src/crypto/pedersen/pedersen.wasm.ts index c7a90507001c..29fc82dcac3e 100644 --- a/yarn-project/foundation/src/crypto/pedersen/pedersen.wasm.ts +++ b/yarn-project/foundation/src/crypto/pedersen/pedersen.wasm.ts @@ -1,7 +1,7 @@ import { BarretenbergSync, Fr as FrBarretenberg } from '@aztec/bb.js'; import { Fr } from '../../fields/fields.js'; -import { Bufferable, serializeToBufferArray } from '../../serialize/serialize.js'; +import { type Bufferable, serializeToBufferArray } from '../../serialize/serialize.js'; /** * Create a pedersen commitment (point) from an array of input fields. diff --git a/yarn-project/foundation/src/crypto/sha256/index.ts b/yarn-project/foundation/src/crypto/sha256/index.ts index 6b9676f39133..1ff89efda47b 100644 --- a/yarn-project/foundation/src/crypto/sha256/index.ts +++ b/yarn-project/foundation/src/crypto/sha256/index.ts @@ -2,7 +2,7 @@ import { default as hash } from 'hash.js'; import { Fr } from '../../fields/fields.js'; import { truncateAndPad } from '../../serialize/free_funcs.js'; -import { Bufferable, serializeToBuffer } from '../../serialize/serialize.js'; +import { type Bufferable, serializeToBuffer } from '../../serialize/serialize.js'; export const sha256 = (data: Buffer) => Buffer.from(hash.sha256().update(data).digest()); diff --git a/yarn-project/foundation/src/fields/coordinate.ts b/yarn-project/foundation/src/fields/coordinate.ts index be9d4ec39b9e..a8fad0b12d6d 100644 --- a/yarn-project/foundation/src/fields/coordinate.ts +++ b/yarn-project/foundation/src/fields/coordinate.ts @@ -1,5 +1,5 @@ import { toBigIntBE } from '../bigint-buffer/index.js'; -import { Tuple } from '../serialize/types.js'; +import { type Tuple } from '../serialize/types.js'; import { Fr } from './fields.js'; /** diff --git a/yarn-project/foundation/src/json-rpc/client/json_rpc_client.ts b/yarn-project/foundation/src/json-rpc/client/json_rpc_client.ts index 1e0c69d25794..46ab33f0da5f 100644 --- a/yarn-project/foundation/src/json-rpc/client/json_rpc_client.ts +++ b/yarn-project/foundation/src/json-rpc/client/json_rpc_client.ts @@ -2,12 +2,12 @@ // Dev dependency just for the somewhat complex RemoteObject type // This takes a {foo(): T} and makes {foo(): Promise} // while avoiding Promise of Promise. -import { RemoteObject } from 'comlink'; +import { type RemoteObject } from 'comlink'; import { format } from 'util'; -import { DebugLogger, createDebugLogger } from '../../log/index.js'; +import { type DebugLogger, createDebugLogger } from '../../log/index.js'; import { NoRetryError, makeBackoff, retry } from '../../retry/index.js'; -import { ClassConverter, JsonClassConverterInput, StringClassConverterInput } from '../class_converter.js'; +import { ClassConverter, type JsonClassConverterInput, type StringClassConverterInput } from '../class_converter.js'; import { JsonStringify, convertFromJsonObj, convertToJsonObj } from '../convert.js'; export { JsonStringify } from '../convert.js'; diff --git a/yarn-project/foundation/src/json-rpc/index.ts b/yarn-project/foundation/src/json-rpc/index.ts index b02ee1ef753d..61ae96fb93a4 100644 --- a/yarn-project/foundation/src/json-rpc/index.ts +++ b/yarn-project/foundation/src/json-rpc/index.ts @@ -1,7 +1,7 @@ export { - StringClassConverterInput, - JsonClassConverterInput as ObjClassConverterInput, - JsonEncodedClass, + type StringClassConverterInput, + type JsonClassConverterInput as ObjClassConverterInput, + type JsonEncodedClass, ClassConverter, } from './class_converter.js'; diff --git a/yarn-project/foundation/src/json-rpc/server/json_proxy.ts b/yarn-project/foundation/src/json-rpc/server/json_proxy.ts index b46a1983ada0..47cc279a401a 100644 --- a/yarn-project/foundation/src/json-rpc/server/json_proxy.ts +++ b/yarn-project/foundation/src/json-rpc/server/json_proxy.ts @@ -1,7 +1,7 @@ import { format } from 'util'; import { createDebugLogger } from '../../log/index.js'; -import { ClassConverter, JsonClassConverterInput, StringClassConverterInput } from '../class_converter.js'; +import { ClassConverter, type JsonClassConverterInput, type StringClassConverterInput } from '../class_converter.js'; import { convertFromJsonObj, convertToJsonObj } from '../convert.js'; import { assert, hasOwnProperty } from '../js_utils.js'; diff --git a/yarn-project/foundation/src/json-rpc/server/json_rpc_server.ts b/yarn-project/foundation/src/json-rpc/server/json_rpc_server.ts index bd2d537bc544..9c342805d091 100644 --- a/yarn-project/foundation/src/json-rpc/server/json_rpc_server.ts +++ b/yarn-project/foundation/src/json-rpc/server/json_rpc_server.ts @@ -6,9 +6,9 @@ import compress from 'koa-compress'; import Router from 'koa-router'; import { createDebugLogger } from '../../log/index.js'; -import { JsonClassConverterInput, StringClassConverterInput } from '../class_converter.js'; +import { type JsonClassConverterInput, type StringClassConverterInput } from '../class_converter.js'; import { convertBigintsInObj } from '../convert.js'; -import { ClassMaps, JsonProxy } from './json_proxy.js'; +import { type ClassMaps, JsonProxy } from './json_proxy.js'; /** * JsonRpcServer. diff --git a/yarn-project/foundation/src/log/console.ts b/yarn-project/foundation/src/log/console.ts index 4e13f7422367..dee595f96c75 100644 --- a/yarn-project/foundation/src/log/console.ts +++ b/yarn-project/foundation/src/log/console.ts @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -import { LogFn } from './log_fn.js'; +import { type LogFn } from './log_fn.js'; /** * ConsoleLogger is a utility class that provides customizable console logging functionality. diff --git a/yarn-project/foundation/src/log/debug.ts b/yarn-project/foundation/src/log/debug.ts index 074df6356e95..aeef1993b45c 100644 --- a/yarn-project/foundation/src/log/debug.ts +++ b/yarn-project/foundation/src/log/debug.ts @@ -1,6 +1,6 @@ import debug from 'debug'; -import { LogFn } from './log_fn.js'; +import { type LogFn } from './log_fn.js'; let preLogHook: ((...args: any[]) => void) | undefined; let postLogHook: ((...args: any[]) => void) | undefined; diff --git a/yarn-project/foundation/src/log/logger.ts b/yarn-project/foundation/src/log/logger.ts index 9c9998a98c48..2747618147d8 100644 --- a/yarn-project/foundation/src/log/logger.ts +++ b/yarn-project/foundation/src/log/logger.ts @@ -2,7 +2,7 @@ import debug from 'debug'; import isNode from 'detect-node'; import { isatty } from 'tty'; -import { LogData, LogFn } from './log_fn.js'; +import { type LogData, type LogFn } from './log_fn.js'; // Matches a subset of Winston log levels const LogLevels = ['silent', 'error', 'warn', 'info', 'verbose', 'debug', 'trace'] as const; diff --git a/yarn-project/foundation/src/mutex/index.ts b/yarn-project/foundation/src/mutex/index.ts index a3bb6c1575ac..e7b7fcac9685 100644 --- a/yarn-project/foundation/src/mutex/index.ts +++ b/yarn-project/foundation/src/mutex/index.ts @@ -1,4 +1,4 @@ -import { MutexDatabase } from './mutex_database.js'; +import { type MutexDatabase } from './mutex_database.js'; export * from './mutex_database.js'; diff --git a/yarn-project/foundation/src/mutex/mutex.test.ts b/yarn-project/foundation/src/mutex/mutex.test.ts index 0c2eb485d895..82de7f286967 100644 --- a/yarn-project/foundation/src/mutex/mutex.test.ts +++ b/yarn-project/foundation/src/mutex/mutex.test.ts @@ -1,7 +1,7 @@ import { jest } from '@jest/globals'; import { Mutex } from './index.js'; -import { MutexDatabase } from './mutex_database.js'; +import { type MutexDatabase } from './mutex_database.js'; /** * Sleep function for introducing a delay in the execution of code. diff --git a/yarn-project/foundation/src/serialize/buffer_reader.ts b/yarn-project/foundation/src/serialize/buffer_reader.ts index d3bb2e12beac..be1bf669a823 100644 --- a/yarn-project/foundation/src/serialize/buffer_reader.ts +++ b/yarn-project/foundation/src/serialize/buffer_reader.ts @@ -1,4 +1,4 @@ -import { Tuple } from './types.js'; +import { type Tuple } from './types.js'; /** * The BufferReader class provides a utility for reading various data types from a buffer. diff --git a/yarn-project/foundation/src/serialize/field_reader.ts b/yarn-project/foundation/src/serialize/field_reader.ts index be3a06e72dd8..08d9f405bc3e 100644 --- a/yarn-project/foundation/src/serialize/field_reader.ts +++ b/yarn-project/foundation/src/serialize/field_reader.ts @@ -1,5 +1,5 @@ import { Fq, Fr } from '../fields/fields.js'; -import { Tuple } from './types.js'; +import { type Tuple } from './types.js'; /** * The FieldReader class provides a utility for reading various data types from a field array. diff --git a/yarn-project/foundation/src/serialize/free_funcs.ts b/yarn-project/foundation/src/serialize/free_funcs.ts index 319112ebede8..144827a907fb 100644 --- a/yarn-project/foundation/src/serialize/free_funcs.ts +++ b/yarn-project/foundation/src/serialize/free_funcs.ts @@ -1,5 +1,5 @@ import { Fr } from '../fields/fields.js'; -import { Tuple } from './types.js'; +import { type Tuple } from './types.js'; /** * Convert a boolean value to its corresponding byte representation in a Buffer of size 1. diff --git a/yarn-project/foundation/src/transport/browser/message_port_socket.ts b/yarn-project/foundation/src/transport/browser/message_port_socket.ts index d7b55435a151..2f5cde890136 100644 --- a/yarn-project/foundation/src/transport/browser/message_port_socket.ts +++ b/yarn-project/foundation/src/transport/browser/message_port_socket.ts @@ -1,4 +1,4 @@ -import { Socket } from '../interface/socket.js'; +import { type Socket } from '../interface/socket.js'; /** * An implementation of a TransportSocket using MessagePorts. diff --git a/yarn-project/foundation/src/transport/browser/shared_worker_connector.ts b/yarn-project/foundation/src/transport/browser/shared_worker_connector.ts index 68a344920048..94b62175d063 100644 --- a/yarn-project/foundation/src/transport/browser/shared_worker_connector.ts +++ b/yarn-project/foundation/src/transport/browser/shared_worker_connector.ts @@ -1,4 +1,4 @@ -import { Connector } from '../interface/connector.js'; +import { type Connector } from '../interface/connector.js'; import { MessagePortSocket } from './message_port_socket.js'; /** diff --git a/yarn-project/foundation/src/transport/browser/shared_worker_listener.ts b/yarn-project/foundation/src/transport/browser/shared_worker_listener.ts index 779a21cd2249..5db7b9168bbc 100644 --- a/yarn-project/foundation/src/transport/browser/shared_worker_listener.ts +++ b/yarn-project/foundation/src/transport/browser/shared_worker_listener.ts @@ -1,6 +1,6 @@ import EventEmitter from 'events'; -import { Listener } from '../interface/listener.js'; +import { type Listener } from '../interface/listener.js'; import { MessagePortSocket } from './message_port_socket.js'; /** diff --git a/yarn-project/foundation/src/transport/browser/worker_connector.ts b/yarn-project/foundation/src/transport/browser/worker_connector.ts index c019477d2385..67a93caf7570 100644 --- a/yarn-project/foundation/src/transport/browser/worker_connector.ts +++ b/yarn-project/foundation/src/transport/browser/worker_connector.ts @@ -1,4 +1,4 @@ -import { Connector } from '../interface/connector.js'; +import { type Connector } from '../interface/connector.js'; import { MessagePortSocket } from './message_port_socket.js'; /** diff --git a/yarn-project/foundation/src/transport/browser/worker_listener.ts b/yarn-project/foundation/src/transport/browser/worker_listener.ts index 502f65c7a178..13b94efcda3b 100644 --- a/yarn-project/foundation/src/transport/browser/worker_listener.ts +++ b/yarn-project/foundation/src/transport/browser/worker_listener.ts @@ -1,6 +1,6 @@ import EventEmitter from 'events'; -import { Listener } from '../interface/listener.js'; +import { type Listener } from '../interface/listener.js'; import { MessagePortSocket } from './message_port_socket.js'; /** diff --git a/yarn-project/foundation/src/transport/dispatch/create_dispatch_proxy.ts b/yarn-project/foundation/src/transport/dispatch/create_dispatch_proxy.ts index e4dba2498cbb..45b8142b80d4 100644 --- a/yarn-project/foundation/src/transport/dispatch/create_dispatch_proxy.ts +++ b/yarn-project/foundation/src/transport/dispatch/create_dispatch_proxy.ts @@ -1,8 +1,8 @@ import { EventEmitter } from 'events'; -import { TransferDescriptor, isTransferDescriptor } from '../interface/transferable.js'; +import { type TransferDescriptor, isTransferDescriptor } from '../interface/transferable.js'; import { TransportClient } from '../transport_client.js'; -import { DispatchMsg } from './create_dispatch_fn.js'; +import { type DispatchMsg } from './create_dispatch_fn.js'; /** * FilterOutAttributes type filters out all non-method properties of an object, leaving only the attributes diff --git a/yarn-project/foundation/src/transport/interface/connector.ts b/yarn-project/foundation/src/transport/interface/connector.ts index af01fd19520d..b42e2ec1fcf4 100644 --- a/yarn-project/foundation/src/transport/interface/connector.ts +++ b/yarn-project/foundation/src/transport/interface/connector.ts @@ -1,4 +1,4 @@ -import { Socket } from './socket.js'; +import { type Socket } from './socket.js'; /** * Opens a socket with corresponding TransportListener. diff --git a/yarn-project/foundation/src/transport/interface/listener.ts b/yarn-project/foundation/src/transport/interface/listener.ts index d71b3ffb1a85..0de21741b97a 100644 --- a/yarn-project/foundation/src/transport/interface/listener.ts +++ b/yarn-project/foundation/src/transport/interface/listener.ts @@ -1,6 +1,6 @@ import EventEmitter from 'events'; -import { Socket } from './socket.js'; +import { type Socket } from './socket.js'; /** * Once opened, an implementation of a TransportListener will emit `new_socket` events as new clients connect. diff --git a/yarn-project/foundation/src/transport/node/node_connector.ts b/yarn-project/foundation/src/transport/node/node_connector.ts index 37524380ca4b..ccd21134c2b1 100644 --- a/yarn-project/foundation/src/transport/node/node_connector.ts +++ b/yarn-project/foundation/src/transport/node/node_connector.ts @@ -1,6 +1,6 @@ import { Worker } from 'worker_threads'; -import { Connector } from '../interface/connector.js'; +import { type Connector } from '../interface/connector.js'; import { NodeConnectorSocket } from './node_connector_socket.js'; /** diff --git a/yarn-project/foundation/src/transport/node/node_connector_socket.ts b/yarn-project/foundation/src/transport/node/node_connector_socket.ts index 11cbb7d129ea..e69392d1ea95 100644 --- a/yarn-project/foundation/src/transport/node/node_connector_socket.ts +++ b/yarn-project/foundation/src/transport/node/node_connector_socket.ts @@ -1,6 +1,6 @@ -import { TransferListItem, Worker } from 'worker_threads'; +import { type TransferListItem, Worker } from 'worker_threads'; -import { Socket } from '../interface/socket.js'; +import { type Socket } from '../interface/socket.js'; /** * NodeConnectorSocket is a wrapper class that implements the Socket interface for messaging between diff --git a/yarn-project/foundation/src/transport/node/node_listener.ts b/yarn-project/foundation/src/transport/node/node_listener.ts index 447aec1f08ef..406b2eea87eb 100644 --- a/yarn-project/foundation/src/transport/node/node_listener.ts +++ b/yarn-project/foundation/src/transport/node/node_listener.ts @@ -1,7 +1,7 @@ import EventEmitter from 'events'; import { parentPort } from 'worker_threads'; -import { Listener } from '../interface/listener.js'; +import { type Listener } from '../interface/listener.js'; import { NodeListenerSocket } from './node_listener_socket.js'; /** diff --git a/yarn-project/foundation/src/transport/node/node_listener_socket.ts b/yarn-project/foundation/src/transport/node/node_listener_socket.ts index 25ebc40738e1..bd7ca8ef2ab6 100644 --- a/yarn-project/foundation/src/transport/node/node_listener_socket.ts +++ b/yarn-project/foundation/src/transport/node/node_listener_socket.ts @@ -1,6 +1,6 @@ -import { MessagePort, TransferListItem } from 'worker_threads'; +import { MessagePort, type TransferListItem } from 'worker_threads'; -import { Socket } from '../interface/socket.js'; +import { type Socket } from '../interface/socket.js'; /** * An implementation of a TransportSocket using MessagePorts. diff --git a/yarn-project/foundation/src/transport/transport_client.ts b/yarn-project/foundation/src/transport/transport_client.ts index 3fb2fd836d53..5709e662edc8 100644 --- a/yarn-project/foundation/src/transport/transport_client.ts +++ b/yarn-project/foundation/src/transport/transport_client.ts @@ -2,9 +2,9 @@ import EventEmitter from 'events'; import { format } from 'util'; import { createDebugLogger } from '../log/index.js'; -import { EventMessage, ResponseMessage, isEventMessage } from './dispatch/messages.js'; -import { Connector } from './interface/connector.js'; -import { Socket } from './interface/socket.js'; +import { type EventMessage, type ResponseMessage, isEventMessage } from './dispatch/messages.js'; +import { type Connector } from './interface/connector.js'; +import { type Socket } from './interface/socket.js'; const debug = createDebugLogger('aztec:transport_client'); diff --git a/yarn-project/foundation/src/transport/transport_server.ts b/yarn-project/foundation/src/transport/transport_server.ts index 64732ab857ba..706215779b79 100644 --- a/yarn-project/foundation/src/transport/transport_server.ts +++ b/yarn-project/foundation/src/transport/transport_server.ts @@ -1,6 +1,6 @@ -import { RequestMessage, ResponseMessage } from './dispatch/messages.js'; -import { Listener } from './interface/listener.js'; -import { Socket } from './interface/socket.js'; +import { type RequestMessage, type ResponseMessage } from './dispatch/messages.js'; +import { type Listener } from './interface/listener.js'; +import { type Socket } from './interface/socket.js'; import { isTransferDescriptor } from './interface/transferable.js'; /** diff --git a/yarn-project/foundation/src/wasm/index.ts b/yarn-project/foundation/src/wasm/index.ts index f125ae5806d3..f141a7fcbf35 100644 --- a/yarn-project/foundation/src/wasm/index.ts +++ b/yarn-project/foundation/src/wasm/index.ts @@ -1 +1 @@ -export { WasmModule, IWasmModule } from './wasm_module.js'; +export { WasmModule, type IWasmModule } from './wasm_module.js'; diff --git a/yarn-project/foundation/src/wasm/wasm_module.ts b/yarn-project/foundation/src/wasm/wasm_module.ts index db4e1da83c94..20851a05cc65 100644 --- a/yarn-project/foundation/src/wasm/wasm_module.ts +++ b/yarn-project/foundation/src/wasm/wasm_module.ts @@ -2,7 +2,7 @@ import { Buffer } from 'buffer'; import { randomBytes } from '../crypto/index.js'; import { MemoryFifo } from '../fifo/index.js'; -import { LogFn, createDebugOnlyLogger } from '../log/index.js'; +import { type LogFn, createDebugOnlyLogger } from '../log/index.js'; import { getEmptyWasiSdk } from './empty_wasi_sdk.js'; /** diff --git a/yarn-project/foundation/src/worker/browser/start_web_module.ts b/yarn-project/foundation/src/worker/browser/start_web_module.ts index 37683aea5506..7e2f1892f539 100644 --- a/yarn-project/foundation/src/worker/browser/start_web_module.ts +++ b/yarn-project/foundation/src/worker/browser/start_web_module.ts @@ -1,4 +1,4 @@ -import { DispatchMsg, TransportServer, WorkerListener } from '../../transport/index.js'; +import { type DispatchMsg, TransportServer, WorkerListener } from '../../transport/index.js'; import { WasmModule } from '../../wasm/index.js'; /** diff --git a/yarn-project/foundation/src/worker/browser/web_data_store.ts b/yarn-project/foundation/src/worker/browser/web_data_store.ts index 6e5322a37238..f19e2b9bcda9 100644 --- a/yarn-project/foundation/src/worker/browser/web_data_store.ts +++ b/yarn-project/foundation/src/worker/browser/web_data_store.ts @@ -1,7 +1,7 @@ -import levelup, { LevelUp } from 'levelup'; +import levelup, { type LevelUp } from 'levelup'; import memdown from 'memdown'; -import { DataStore } from '../data_store.js'; +import { type DataStore } from '../data_store.js'; /** * Cache for data used by wasm module. diff --git a/yarn-project/foundation/src/worker/browser/web_worker.ts b/yarn-project/foundation/src/worker/browser/web_worker.ts index a28d3fd7482e..7560c60852ef 100644 --- a/yarn-project/foundation/src/worker/browser/web_worker.ts +++ b/yarn-project/foundation/src/worker/browser/web_worker.ts @@ -1,6 +1,6 @@ -import { DispatchMsg, TransportClient, WorkerConnector, createDispatchProxy } from '../../transport/index.js'; +import { type DispatchMsg, TransportClient, WorkerConnector, createDispatchProxy } from '../../transport/index.js'; import { WasmModule } from '../../wasm/index.js'; -import { WasmWorker } from '../wasm_worker.js'; +import { type WasmWorker } from '../wasm_worker.js'; /** * Instantiate a web worker. diff --git a/yarn-project/foundation/src/worker/index.ts b/yarn-project/foundation/src/worker/index.ts index de4da3527516..d52f9a62cae7 100644 --- a/yarn-project/foundation/src/worker/index.ts +++ b/yarn-project/foundation/src/worker/index.ts @@ -1,2 +1,2 @@ export { WorkerPool } from './worker_pool.js'; -export { WasmWorker } from './wasm_worker.js'; +export { type WasmWorker } from './wasm_worker.js'; diff --git a/yarn-project/foundation/src/worker/node/node_data_store.ts b/yarn-project/foundation/src/worker/node/node_data_store.ts index 24bb39747bf9..fd0986487c40 100644 --- a/yarn-project/foundation/src/worker/node/node_data_store.ts +++ b/yarn-project/foundation/src/worker/node/node_data_store.ts @@ -1,8 +1,8 @@ import leveldown from 'leveldown'; -import levelup, { LevelUp } from 'levelup'; +import levelup, { type LevelUp } from 'levelup'; import memdown from 'memdown'; -import { DataStore } from '../data_store.js'; +import { type DataStore } from '../data_store.js'; /** * Cache for data used by wasm module. diff --git a/yarn-project/foundation/src/worker/node/node_worker.ts b/yarn-project/foundation/src/worker/node/node_worker.ts index d297ed727bc0..bd4c8b096f3e 100644 --- a/yarn-project/foundation/src/worker/node/node_worker.ts +++ b/yarn-project/foundation/src/worker/node/node_worker.ts @@ -1,8 +1,8 @@ import { Worker } from 'worker_threads'; -import { DispatchMsg, NodeConnector, TransportClient, createDispatchProxy } from '../../transport/index.js'; +import { type DispatchMsg, NodeConnector, TransportClient, createDispatchProxy } from '../../transport/index.js'; import { WasmModule } from '../../wasm/wasm_module.js'; -import { WasmWorker } from '../wasm_worker.js'; +import { type WasmWorker } from '../wasm_worker.js'; /** * Creates a node worker. diff --git a/yarn-project/foundation/src/worker/node/start_node_module.ts b/yarn-project/foundation/src/worker/node/start_node_module.ts index 14f01cfb70d4..fcbe401763a9 100644 --- a/yarn-project/foundation/src/worker/node/start_node_module.ts +++ b/yarn-project/foundation/src/worker/node/start_node_module.ts @@ -1,6 +1,6 @@ import { parentPort } from 'worker_threads'; -import { DispatchMsg, NodeListener, TransportServer } from '../../transport/index.js'; +import { type DispatchMsg, NodeListener, TransportServer } from '../../transport/index.js'; import { WasmModule } from '../../wasm/wasm_module.js'; if (!parentPort) { diff --git a/yarn-project/foundation/src/worker/wasm_worker.ts b/yarn-project/foundation/src/worker/wasm_worker.ts index a9dcb4a7ad27..cc778818a3d6 100644 --- a/yarn-project/foundation/src/worker/wasm_worker.ts +++ b/yarn-project/foundation/src/worker/wasm_worker.ts @@ -1,4 +1,4 @@ -import { Proxify } from '../transport/index.js'; +import { type Proxify } from '../transport/index.js'; import { WasmModule } from '../wasm/wasm_module.js'; /** diff --git a/yarn-project/foundation/src/worker/worker_pool.ts b/yarn-project/foundation/src/worker/worker_pool.ts index b121f8f85c84..7e1534895860 100644 --- a/yarn-project/foundation/src/worker/worker_pool.ts +++ b/yarn-project/foundation/src/worker/worker_pool.ts @@ -1,5 +1,5 @@ import { createDebugLogger } from '../log/index.js'; -import { WasmWorker } from './wasm_worker.js'; +import { type WasmWorker } from './wasm_worker.js'; const debug = createDebugLogger('bb:worker_pool'); diff --git a/yarn-project/key-store/src/key_pair.ts b/yarn-project/key-store/src/key_pair.ts index fc40b3974859..dcdf64499101 100644 --- a/yarn-project/key-store/src/key_pair.ts +++ b/yarn-project/key-store/src/key_pair.ts @@ -1,5 +1,5 @@ -import { KeyPair, PublicKey } from '@aztec/circuit-types'; -import { GrumpkinPrivateKey, GrumpkinScalar } from '@aztec/circuits.js'; +import { type KeyPair, type PublicKey } from '@aztec/circuit-types'; +import { type GrumpkinPrivateKey, GrumpkinScalar } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; /** diff --git a/yarn-project/key-store/src/test_key_store.ts b/yarn-project/key-store/src/test_key_store.ts index f0bab98c51d6..0771db0d77a6 100644 --- a/yarn-project/key-store/src/test_key_store.ts +++ b/yarn-project/key-store/src/test_key_store.ts @@ -1,7 +1,7 @@ -import { KeyPair, KeyStore, PublicKey } from '@aztec/circuit-types'; +import { type KeyPair, type KeyStore, type PublicKey } from '@aztec/circuit-types'; import { AztecAddress, - GrumpkinPrivateKey, + type GrumpkinPrivateKey, GrumpkinScalar, Point, computeNullifierSecretKey, @@ -9,7 +9,7 @@ import { derivePublicKey, } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; -import { AztecKVStore, AztecMap } from '@aztec/kv-store'; +import { type AztecKVStore, type AztecMap } from '@aztec/kv-store'; import { ConstantKeyPair } from './key_pair.js'; diff --git a/yarn-project/kv-store/src/interfaces/counter.ts b/yarn-project/kv-store/src/interfaces/counter.ts index 0f68626e6911..67c8151ffbc8 100644 --- a/yarn-project/kv-store/src/interfaces/counter.ts +++ b/yarn-project/kv-store/src/interfaces/counter.ts @@ -1,4 +1,4 @@ -import { Key, Range } from './common.js'; +import { type Key, type Range } from './common.js'; /** * A map that counts how many times it sees a key. Once 0 is reached, that key is removed from the map. diff --git a/yarn-project/kv-store/src/interfaces/index.ts b/yarn-project/kv-store/src/interfaces/index.ts index e478b630e651..19576ebc1ce5 100644 --- a/yarn-project/kv-store/src/interfaces/index.ts +++ b/yarn-project/kv-store/src/interfaces/index.ts @@ -3,4 +3,4 @@ export * from './map.js'; export * from './counter.js'; export * from './singleton.js'; export * from './store.js'; -export { Range } from './common.js'; +export { type Range } from './common.js'; diff --git a/yarn-project/kv-store/src/interfaces/map.ts b/yarn-project/kv-store/src/interfaces/map.ts index 0916146a4ab9..d763254d31a0 100644 --- a/yarn-project/kv-store/src/interfaces/map.ts +++ b/yarn-project/kv-store/src/interfaces/map.ts @@ -1,4 +1,4 @@ -import { Key, Range } from './common.js'; +import { type Key, type Range } from './common.js'; /** * A map backed by a persistent store. diff --git a/yarn-project/kv-store/src/interfaces/store.ts b/yarn-project/kv-store/src/interfaces/store.ts index 9b0f1c9364da..16962cf5695c 100644 --- a/yarn-project/kv-store/src/interfaces/store.ts +++ b/yarn-project/kv-store/src/interfaces/store.ts @@ -1,8 +1,8 @@ -import { AztecArray } from './array.js'; -import { Key } from './common.js'; -import { AztecCounter } from './counter.js'; -import { AztecMap, AztecMultiMap } from './map.js'; -import { AztecSingleton } from './singleton.js'; +import { type AztecArray } from './array.js'; +import { type Key } from './common.js'; +import { type AztecCounter } from './counter.js'; +import { type AztecMap, type AztecMultiMap } from './map.js'; +import { type AztecSingleton } from './singleton.js'; /** A key-value store */ export interface AztecKVStore { diff --git a/yarn-project/kv-store/src/lmdb/array.ts b/yarn-project/kv-store/src/lmdb/array.ts index 1da3676aac03..30be194b313e 100644 --- a/yarn-project/kv-store/src/lmdb/array.ts +++ b/yarn-project/kv-store/src/lmdb/array.ts @@ -1,6 +1,6 @@ -import { Database, Key } from 'lmdb'; +import { Database, type Key } from 'lmdb'; -import { AztecArray } from '../interfaces/array.js'; +import { type AztecArray } from '../interfaces/array.js'; import { LmdbAztecSingleton } from './singleton.js'; /** The shape of a key that stores a value in an array */ diff --git a/yarn-project/kv-store/src/lmdb/counter.ts b/yarn-project/kv-store/src/lmdb/counter.ts index 74886e89dbf3..1ca6b82ae5fb 100644 --- a/yarn-project/kv-store/src/lmdb/counter.ts +++ b/yarn-project/kv-store/src/lmdb/counter.ts @@ -1,7 +1,7 @@ -import { Key as BaseKey, Database } from 'lmdb'; +import { type Key as BaseKey, Database } from 'lmdb'; -import { Key, Range } from '../interfaces/common.js'; -import { AztecCounter } from '../interfaces/counter.js'; +import { type Key, type Range } from '../interfaces/common.js'; +import { type AztecCounter } from '../interfaces/counter.js'; import { LmdbAztecMap } from './map.js'; /** diff --git a/yarn-project/kv-store/src/lmdb/map.ts b/yarn-project/kv-store/src/lmdb/map.ts index 6e5fa67ef1e1..9e205ab74023 100644 --- a/yarn-project/kv-store/src/lmdb/map.ts +++ b/yarn-project/kv-store/src/lmdb/map.ts @@ -1,7 +1,7 @@ -import { Database, RangeOptions } from 'lmdb'; +import { Database, type RangeOptions } from 'lmdb'; -import { Key, Range } from '../interfaces/common.js'; -import { AztecMultiMap } from '../interfaces/map.js'; +import { type Key, type Range } from '../interfaces/common.js'; +import { type AztecMultiMap } from '../interfaces/map.js'; /** The slot where a key-value entry would be stored */ type MapValueSlot = ['map', string, 'slot', K]; diff --git a/yarn-project/kv-store/src/lmdb/singleton.ts b/yarn-project/kv-store/src/lmdb/singleton.ts index 0fa4ffe69e45..7e3729c5d044 100644 --- a/yarn-project/kv-store/src/lmdb/singleton.ts +++ b/yarn-project/kv-store/src/lmdb/singleton.ts @@ -1,6 +1,6 @@ -import { Database, Key } from 'lmdb'; +import { Database, type Key } from 'lmdb'; -import { AztecSingleton } from '../interfaces/singleton.js'; +import { type AztecSingleton } from '../interfaces/singleton.js'; /** The slot where this singleton will store its value */ type ValueSlot = ['singleton', string, 'value']; diff --git a/yarn-project/kv-store/src/lmdb/store.ts b/yarn-project/kv-store/src/lmdb/store.ts index af949224e971..4426e8f9c040 100644 --- a/yarn-project/kv-store/src/lmdb/store.ts +++ b/yarn-project/kv-store/src/lmdb/store.ts @@ -1,12 +1,12 @@ import { createDebugLogger } from '@aztec/foundation/log'; -import { Database, Key, RootDatabase, open } from 'lmdb'; +import { Database, type Key, RootDatabase, open } from 'lmdb'; -import { AztecArray } from '../interfaces/array.js'; -import { AztecCounter } from '../interfaces/counter.js'; -import { AztecMap, AztecMultiMap } from '../interfaces/map.js'; -import { AztecSingleton } from '../interfaces/singleton.js'; -import { AztecKVStore } from '../interfaces/store.js'; +import { type AztecArray } from '../interfaces/array.js'; +import { type AztecCounter } from '../interfaces/counter.js'; +import { type AztecMap, type AztecMultiMap } from '../interfaces/map.js'; +import { type AztecSingleton } from '../interfaces/singleton.js'; +import { type AztecKVStore } from '../interfaces/store.js'; import { LmdbAztecArray } from './array.js'; import { LmdbAztecCounter } from './counter.js'; import { LmdbAztecMap } from './map.js'; diff --git a/yarn-project/kv-store/src/utils.ts b/yarn-project/kv-store/src/utils.ts index e41297b9e825..a85f01e454c9 100644 --- a/yarn-project/kv-store/src/utils.ts +++ b/yarn-project/kv-store/src/utils.ts @@ -1,7 +1,7 @@ import { EthAddress } from '@aztec/foundation/eth-address'; -import { Logger } from '@aztec/foundation/log'; +import { type Logger } from '@aztec/foundation/log'; -import { AztecKVStore } from './interfaces/store.js'; +import { type AztecKVStore } from './interfaces/store.js'; import { AztecLmdbStore } from './lmdb/store.js'; /** diff --git a/yarn-project/merkle-tree/src/hasher_with_stats.ts b/yarn-project/merkle-tree/src/hasher_with_stats.ts index 34d00d6b41ae..7c77e8cf3709 100644 --- a/yarn-project/merkle-tree/src/hasher_with_stats.ts +++ b/yarn-project/merkle-tree/src/hasher_with_stats.ts @@ -1,4 +1,4 @@ -import { Hasher } from '@aztec/types/interfaces'; +import { type Hasher } from '@aztec/types/interfaces'; import { createHistogram, performance } from 'perf_hooks'; diff --git a/yarn-project/merkle-tree/src/interfaces/append_only_tree.ts b/yarn-project/merkle-tree/src/interfaces/append_only_tree.ts index ba6d0ad983ba..bb2cd0db0d72 100644 --- a/yarn-project/merkle-tree/src/interfaces/append_only_tree.ts +++ b/yarn-project/merkle-tree/src/interfaces/append_only_tree.ts @@ -1,7 +1,7 @@ -import { Bufferable } from '@aztec/foundation/serialize'; +import { type Bufferable } from '@aztec/foundation/serialize'; -import { TreeSnapshot, TreeSnapshotBuilder } from '../snapshots/snapshot_builder.js'; -import { MerkleTree } from './merkle_tree.js'; +import { type TreeSnapshot, type TreeSnapshotBuilder } from '../snapshots/snapshot_builder.js'; +import { type MerkleTree } from './merkle_tree.js'; /** * A Merkle tree that supports only appending leaves and not updating existing leaves. diff --git a/yarn-project/merkle-tree/src/interfaces/indexed_tree.ts b/yarn-project/merkle-tree/src/interfaces/indexed_tree.ts index 44bd849479bc..85ac616c19ea 100644 --- a/yarn-project/merkle-tree/src/interfaces/indexed_tree.ts +++ b/yarn-project/merkle-tree/src/interfaces/indexed_tree.ts @@ -1,9 +1,13 @@ import { SiblingPath } from '@aztec/circuit-types'; -import { IndexedTreeLeaf, IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; +import { type IndexedTreeLeaf, type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; -import { IndexedTreeSnapshot, TreeSnapshot, TreeSnapshotBuilder } from '../snapshots/snapshot_builder.js'; -import { AppendOnlyTree } from './append_only_tree.js'; -import { MerkleTree } from './merkle_tree.js'; +import { + type IndexedTreeSnapshot, + type TreeSnapshot, + type TreeSnapshotBuilder, +} from '../snapshots/snapshot_builder.js'; +import { type AppendOnlyTree } from './append_only_tree.js'; +import { type MerkleTree } from './merkle_tree.js'; /** * Factory for creating leaf preimages. diff --git a/yarn-project/merkle-tree/src/interfaces/merkle_tree.ts b/yarn-project/merkle-tree/src/interfaces/merkle_tree.ts index dd5c30a78f08..95862fb79f69 100644 --- a/yarn-project/merkle-tree/src/interfaces/merkle_tree.ts +++ b/yarn-project/merkle-tree/src/interfaces/merkle_tree.ts @@ -1,5 +1,5 @@ import { SiblingPath } from '@aztec/circuit-types'; -import { Bufferable } from '@aztec/foundation/serialize'; +import { type Bufferable } from '@aztec/foundation/serialize'; /** * Defines the interface for a source of sibling paths. diff --git a/yarn-project/merkle-tree/src/interfaces/update_only_tree.ts b/yarn-project/merkle-tree/src/interfaces/update_only_tree.ts index f1e40d37dbd7..06c142edbe26 100644 --- a/yarn-project/merkle-tree/src/interfaces/update_only_tree.ts +++ b/yarn-project/merkle-tree/src/interfaces/update_only_tree.ts @@ -1,7 +1,7 @@ -import { Bufferable } from '@aztec/foundation/serialize'; +import { type Bufferable } from '@aztec/foundation/serialize'; -import { TreeSnapshot, TreeSnapshotBuilder } from '../snapshots/snapshot_builder.js'; -import { MerkleTree } from './merkle_tree.js'; +import { type TreeSnapshot, type TreeSnapshotBuilder } from '../snapshots/snapshot_builder.js'; +import { type MerkleTree } from './merkle_tree.js'; /** * A Merkle tree that supports updates at arbitrary indices but not appending. diff --git a/yarn-project/merkle-tree/src/load_tree.ts b/yarn-project/merkle-tree/src/load_tree.ts index 043d242f43ab..827f9c17f014 100644 --- a/yarn-project/merkle-tree/src/load_tree.ts +++ b/yarn-project/merkle-tree/src/load_tree.ts @@ -1,6 +1,6 @@ -import { Bufferable, FromBuffer } from '@aztec/foundation/serialize'; -import { AztecKVStore } from '@aztec/kv-store'; -import { Hasher } from '@aztec/types/interfaces'; +import { type Bufferable, type FromBuffer } from '@aztec/foundation/serialize'; +import { type AztecKVStore } from '@aztec/kv-store'; +import { type Hasher } from '@aztec/types/interfaces'; import { TreeBase, getTreeMeta } from './tree_base.js'; diff --git a/yarn-project/merkle-tree/src/new_tree.ts b/yarn-project/merkle-tree/src/new_tree.ts index a4d73af3693c..3ffcfdbcb964 100644 --- a/yarn-project/merkle-tree/src/new_tree.ts +++ b/yarn-project/merkle-tree/src/new_tree.ts @@ -1,6 +1,6 @@ -import { Bufferable, FromBuffer } from '@aztec/foundation/serialize'; -import { AztecKVStore } from '@aztec/kv-store'; -import { Hasher } from '@aztec/types/interfaces'; +import { type Bufferable, type FromBuffer } from '@aztec/foundation/serialize'; +import { type AztecKVStore } from '@aztec/kv-store'; +import { type Hasher } from '@aztec/types/interfaces'; import { TreeBase } from './tree_base.js'; diff --git a/yarn-project/merkle-tree/src/pedersen.ts b/yarn-project/merkle-tree/src/pedersen.ts index b4a749e5a8a8..b49c34c527e7 100644 --- a/yarn-project/merkle-tree/src/pedersen.ts +++ b/yarn-project/merkle-tree/src/pedersen.ts @@ -1,5 +1,5 @@ import { pedersenHash } from '@aztec/foundation/crypto'; -import { Hasher } from '@aztec/types/interfaces'; +import { type Hasher } from '@aztec/types/interfaces'; /** * A helper class encapsulating Pedersen hash functionality. diff --git a/yarn-project/merkle-tree/src/sha_256.ts b/yarn-project/merkle-tree/src/sha_256.ts index 2945e0705d09..a1cba65c5ae2 100644 --- a/yarn-project/merkle-tree/src/sha_256.ts +++ b/yarn-project/merkle-tree/src/sha_256.ts @@ -1,6 +1,6 @@ import { sha256 } from '@aztec/foundation/crypto'; import { truncateAndPad } from '@aztec/foundation/serialize'; -import { Hasher } from '@aztec/types/interfaces'; +import { type Hasher } from '@aztec/types/interfaces'; /** * A helper class encapsulating SHA256 hash functionality. diff --git a/yarn-project/merkle-tree/src/snapshots/append_only_snapshot.test.ts b/yarn-project/merkle-tree/src/snapshots/append_only_snapshot.test.ts index 84a205a7741f..111f6de0439b 100644 --- a/yarn-project/merkle-tree/src/snapshots/append_only_snapshot.test.ts +++ b/yarn-project/merkle-tree/src/snapshots/append_only_snapshot.test.ts @@ -1,6 +1,6 @@ import { randomBytes } from '@aztec/foundation/crypto'; -import { FromBuffer } from '@aztec/foundation/serialize'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type FromBuffer } from '@aztec/foundation/serialize'; +import { type AztecKVStore } from '@aztec/kv-store'; import { openTmpStore } from '@aztec/kv-store/utils'; import { Pedersen, StandardTree, newTree } from '../index.js'; diff --git a/yarn-project/merkle-tree/src/snapshots/append_only_snapshot.ts b/yarn-project/merkle-tree/src/snapshots/append_only_snapshot.ts index 2549bf1544bb..40dc7c55abc9 100644 --- a/yarn-project/merkle-tree/src/snapshots/append_only_snapshot.ts +++ b/yarn-project/merkle-tree/src/snapshots/append_only_snapshot.ts @@ -1,11 +1,11 @@ import { SiblingPath } from '@aztec/circuit-types'; -import { Bufferable, FromBuffer, serializeToBuffer } from '@aztec/foundation/serialize'; -import { AztecKVStore, AztecMap } from '@aztec/kv-store'; -import { Hasher } from '@aztec/types/interfaces'; +import { type Bufferable, type FromBuffer, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type AztecKVStore, type AztecMap } from '@aztec/kv-store'; +import { type Hasher } from '@aztec/types/interfaces'; -import { AppendOnlyTree } from '../interfaces/append_only_tree.js'; +import { type AppendOnlyTree } from '../interfaces/append_only_tree.js'; import { TreeBase } from '../tree_base.js'; -import { TreeSnapshot, TreeSnapshotBuilder } from './snapshot_builder.js'; +import { type TreeSnapshot, type TreeSnapshotBuilder } from './snapshot_builder.js'; // stores the last block that modified this node const nodeModifiedAtBlockKey = (level: number, index: bigint) => `node:${level}:${index}:modifiedAtBlock`; diff --git a/yarn-project/merkle-tree/src/snapshots/base_full_snapshot.ts b/yarn-project/merkle-tree/src/snapshots/base_full_snapshot.ts index 89a3d5af722a..6388ef0fa375 100644 --- a/yarn-project/merkle-tree/src/snapshots/base_full_snapshot.ts +++ b/yarn-project/merkle-tree/src/snapshots/base_full_snapshot.ts @@ -1,9 +1,9 @@ import { SiblingPath } from '@aztec/circuit-types'; -import { Bufferable, FromBuffer, serializeToBuffer } from '@aztec/foundation/serialize'; -import { AztecKVStore, AztecMap } from '@aztec/kv-store'; +import { type Bufferable, type FromBuffer, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type AztecKVStore, type AztecMap } from '@aztec/kv-store'; import { TreeBase } from '../tree_base.js'; -import { TreeSnapshot, TreeSnapshotBuilder } from './snapshot_builder.js'; +import { type TreeSnapshot, type TreeSnapshotBuilder } from './snapshot_builder.js'; /** * Metadata for a snapshot, per block diff --git a/yarn-project/merkle-tree/src/snapshots/full_snapshot.test.ts b/yarn-project/merkle-tree/src/snapshots/full_snapshot.test.ts index bc01c0b9ea10..486f633262a7 100644 --- a/yarn-project/merkle-tree/src/snapshots/full_snapshot.test.ts +++ b/yarn-project/merkle-tree/src/snapshots/full_snapshot.test.ts @@ -1,6 +1,6 @@ import { randomBytes } from '@aztec/foundation/crypto'; -import { FromBuffer } from '@aztec/foundation/serialize'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type FromBuffer } from '@aztec/foundation/serialize'; +import { type AztecKVStore } from '@aztec/kv-store'; import { openTmpStore } from '@aztec/kv-store/utils'; import { Pedersen, StandardTree, newTree } from '../index.js'; diff --git a/yarn-project/merkle-tree/src/snapshots/full_snapshot.ts b/yarn-project/merkle-tree/src/snapshots/full_snapshot.ts index 9417dadf67ba..2ea4fd9a1acf 100644 --- a/yarn-project/merkle-tree/src/snapshots/full_snapshot.ts +++ b/yarn-project/merkle-tree/src/snapshots/full_snapshot.ts @@ -1,9 +1,9 @@ -import { Bufferable, FromBuffer } from '@aztec/foundation/serialize'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type Bufferable, type FromBuffer } from '@aztec/foundation/serialize'; +import { type AztecKVStore } from '@aztec/kv-store'; import { TreeBase } from '../tree_base.js'; import { BaseFullTreeSnapshot, BaseFullTreeSnapshotBuilder } from './base_full_snapshot.js'; -import { TreeSnapshot, TreeSnapshotBuilder } from './snapshot_builder.js'; +import { type TreeSnapshot, type TreeSnapshotBuilder } from './snapshot_builder.js'; /** * Builds a full snapshot of a tree. This implementation works for any Merkle tree and stores diff --git a/yarn-project/merkle-tree/src/snapshots/indexed_tree_snapshot.test.ts b/yarn-project/merkle-tree/src/snapshots/indexed_tree_snapshot.test.ts index beedabaec476..aa374542a9f6 100644 --- a/yarn-project/merkle-tree/src/snapshots/indexed_tree_snapshot.test.ts +++ b/yarn-project/merkle-tree/src/snapshots/indexed_tree_snapshot.test.ts @@ -1,7 +1,7 @@ import { Fr, NullifierLeaf, NullifierLeafPreimage } from '@aztec/circuits.js'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type AztecKVStore } from '@aztec/kv-store'; import { openTmpStore } from '@aztec/kv-store/utils'; -import { Hasher } from '@aztec/types/interfaces'; +import { type Hasher } from '@aztec/types/interfaces'; import { Pedersen, newTree } from '../index.js'; import { StandardIndexedTreeWithAppend } from '../standard_indexed_tree/test/standard_indexed_tree_with_append.js'; diff --git a/yarn-project/merkle-tree/src/snapshots/indexed_tree_snapshot.ts b/yarn-project/merkle-tree/src/snapshots/indexed_tree_snapshot.ts index c608daa11185..4781c638e1a8 100644 --- a/yarn-project/merkle-tree/src/snapshots/indexed_tree_snapshot.ts +++ b/yarn-project/merkle-tree/src/snapshots/indexed_tree_snapshot.ts @@ -1,10 +1,10 @@ -import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; -import { AztecKVStore, AztecMap } from '@aztec/kv-store'; +import { type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; +import { type AztecKVStore, type AztecMap } from '@aztec/kv-store'; -import { IndexedTree, PreimageFactory } from '../interfaces/indexed_tree.js'; +import { type IndexedTree, type PreimageFactory } from '../interfaces/indexed_tree.js'; import { TreeBase } from '../tree_base.js'; import { BaseFullTreeSnapshot, BaseFullTreeSnapshotBuilder } from './base_full_snapshot.js'; -import { IndexedTreeSnapshot, TreeSnapshotBuilder } from './snapshot_builder.js'; +import { type IndexedTreeSnapshot, type TreeSnapshotBuilder } from './snapshot_builder.js'; const snapshotLeafValue = (node: Buffer, index: bigint) => 'snapshot:leaf:' + node.toString('hex') + ':' + index; diff --git a/yarn-project/merkle-tree/src/snapshots/snapshot_builder.ts b/yarn-project/merkle-tree/src/snapshots/snapshot_builder.ts index bfdc30658469..affa86051160 100644 --- a/yarn-project/merkle-tree/src/snapshots/snapshot_builder.ts +++ b/yarn-project/merkle-tree/src/snapshots/snapshot_builder.ts @@ -1,6 +1,6 @@ import { SiblingPath } from '@aztec/circuit-types'; -import { Bufferable } from '@aztec/foundation/serialize'; -import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; +import { type Bufferable } from '@aztec/foundation/serialize'; +import { type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; /** * An interface for a tree that can record snapshots of its contents. diff --git a/yarn-project/merkle-tree/src/snapshots/snapshot_builder_test_suite.ts b/yarn-project/merkle-tree/src/snapshots/snapshot_builder_test_suite.ts index 4dcf97bd5b4e..8e3c1858cf80 100644 --- a/yarn-project/merkle-tree/src/snapshots/snapshot_builder_test_suite.ts +++ b/yarn-project/merkle-tree/src/snapshots/snapshot_builder_test_suite.ts @@ -1,10 +1,10 @@ import { randomBigInt } from '@aztec/foundation/crypto'; -import { Bufferable } from '@aztec/foundation/serialize'; +import { type Bufferable } from '@aztec/foundation/serialize'; import { jest } from '@jest/globals'; import { TreeBase } from '../tree_base.js'; -import { TreeSnapshot, TreeSnapshotBuilder } from './snapshot_builder.js'; +import { type TreeSnapshot, type TreeSnapshotBuilder } from './snapshot_builder.js'; jest.setTimeout(50_000); diff --git a/yarn-project/merkle-tree/src/sparse_tree/sparse_tree.test.ts b/yarn-project/merkle-tree/src/sparse_tree/sparse_tree.test.ts index 4d11aa493599..c7a97acffeec 100644 --- a/yarn-project/merkle-tree/src/sparse_tree/sparse_tree.test.ts +++ b/yarn-project/merkle-tree/src/sparse_tree/sparse_tree.test.ts @@ -1,12 +1,12 @@ import { SiblingPath } from '@aztec/circuit-types'; import { randomBigInt, randomBytes } from '@aztec/foundation/crypto'; import { createDebugLogger } from '@aztec/foundation/log'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type AztecKVStore } from '@aztec/kv-store'; import { openTmpStore } from '@aztec/kv-store/utils'; -import { Hasher } from '@aztec/types/interfaces'; +import { type Hasher } from '@aztec/types/interfaces'; import { INITIAL_LEAF, newTree } from '../index.js'; -import { UpdateOnlyTree } from '../interfaces/update_only_tree.js'; +import { type UpdateOnlyTree } from '../interfaces/update_only_tree.js'; import { loadTree } from '../load_tree.js'; import { Pedersen } from '../pedersen.js'; import { standardBasedTreeTestSuite } from '../test/standard_based_test_suite.js'; diff --git a/yarn-project/merkle-tree/src/sparse_tree/sparse_tree.ts b/yarn-project/merkle-tree/src/sparse_tree/sparse_tree.ts index 646f01a24127..3ea1a8d9eb64 100644 --- a/yarn-project/merkle-tree/src/sparse_tree/sparse_tree.ts +++ b/yarn-project/merkle-tree/src/sparse_tree/sparse_tree.ts @@ -1,8 +1,8 @@ -import { Bufferable, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type Bufferable, serializeToBuffer } from '@aztec/foundation/serialize'; -import { UpdateOnlyTree } from '../interfaces/update_only_tree.js'; +import { type UpdateOnlyTree } from '../interfaces/update_only_tree.js'; import { FullTreeSnapshotBuilder } from '../snapshots/full_snapshot.js'; -import { TreeSnapshot } from '../snapshots/snapshot_builder.js'; +import { type TreeSnapshot } from '../snapshots/snapshot_builder.js'; import { INITIAL_LEAF, TreeBase } from '../tree_base.js'; /** diff --git a/yarn-project/merkle-tree/src/standard_indexed_tree/standard_indexed_tree.ts b/yarn-project/merkle-tree/src/standard_indexed_tree/standard_indexed_tree.ts index 42e9a3cbfbef..cfe3bc3ebdd6 100644 --- a/yarn-project/merkle-tree/src/standard_indexed_tree/standard_indexed_tree.ts +++ b/yarn-project/merkle-tree/src/standard_indexed_tree/standard_indexed_tree.ts @@ -1,15 +1,20 @@ import { SiblingPath } from '@aztec/circuit-types'; -import { TreeInsertionStats } from '@aztec/circuit-types/stats'; +import { type TreeInsertionStats } from '@aztec/circuit-types/stats'; import { toBufferBE } from '@aztec/foundation/bigint-buffer'; -import { FromBuffer } from '@aztec/foundation/serialize'; +import { type FromBuffer } from '@aztec/foundation/serialize'; import { Timer } from '@aztec/foundation/timer'; -import { IndexedTreeLeaf, IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; -import { AztecKVStore, AztecMap } from '@aztec/kv-store'; -import { Hasher } from '@aztec/types/interfaces'; - -import { BatchInsertionResult, IndexedTree, LowLeafWitnessData, PreimageFactory } from '../interfaces/indexed_tree.js'; +import { type IndexedTreeLeaf, type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; +import { type AztecKVStore, type AztecMap } from '@aztec/kv-store'; +import { type Hasher } from '@aztec/types/interfaces'; + +import { + type BatchInsertionResult, + type IndexedTree, + type LowLeafWitnessData, + type PreimageFactory, +} from '../interfaces/indexed_tree.js'; import { IndexedTreeSnapshotBuilder } from '../snapshots/indexed_tree_snapshot.js'; -import { IndexedTreeSnapshot } from '../snapshots/snapshot_builder.js'; +import { type IndexedTreeSnapshot } from '../snapshots/snapshot_builder.js'; import { TreeBase } from '../tree_base.js'; export const buildDbKeyForPreimage = (name: string, index: bigint) => { diff --git a/yarn-project/merkle-tree/src/standard_indexed_tree/test/standard_indexed_tree.test.ts b/yarn-project/merkle-tree/src/standard_indexed_tree/test/standard_indexed_tree.test.ts index a605e19025e1..0ed6196c0e9e 100644 --- a/yarn-project/merkle-tree/src/standard_indexed_tree/test/standard_indexed_tree.test.ts +++ b/yarn-project/merkle-tree/src/standard_indexed_tree/test/standard_indexed_tree.test.ts @@ -7,12 +7,12 @@ import { PublicDataTreeLeafPreimage, } from '@aztec/circuits.js'; import { toBufferBE } from '@aztec/foundation/bigint-buffer'; -import { FromBuffer } from '@aztec/foundation/serialize'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type FromBuffer } from '@aztec/foundation/serialize'; +import { type AztecKVStore } from '@aztec/kv-store'; import { openTmpStore } from '@aztec/kv-store/utils'; -import { Hasher } from '@aztec/types/interfaces'; +import { type Hasher } from '@aztec/types/interfaces'; -import { INITIAL_LEAF, MerkleTree, Pedersen, loadTree, newTree } from '../../index.js'; +import { INITIAL_LEAF, type MerkleTree, Pedersen, loadTree, newTree } from '../../index.js'; import { treeTestSuite } from '../../test/test_suite.js'; import { StandardIndexedTreeWithAppend } from './standard_indexed_tree_with_append.js'; diff --git a/yarn-project/merkle-tree/src/standard_tree/standard_tree.test.ts b/yarn-project/merkle-tree/src/standard_tree/standard_tree.test.ts index baf96a21df92..cd946ac771a7 100644 --- a/yarn-project/merkle-tree/src/standard_tree/standard_tree.test.ts +++ b/yarn-project/merkle-tree/src/standard_tree/standard_tree.test.ts @@ -1,8 +1,8 @@ import { randomBytes } from '@aztec/foundation/crypto'; -import { FromBuffer } from '@aztec/foundation/serialize'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type FromBuffer } from '@aztec/foundation/serialize'; +import { type AztecKVStore } from '@aztec/kv-store'; import { openTmpStore } from '@aztec/kv-store/utils'; -import { Hasher } from '@aztec/types/interfaces'; +import { type Hasher } from '@aztec/types/interfaces'; import { loadTree } from '../load_tree.js'; import { newTree } from '../new_tree.js'; diff --git a/yarn-project/merkle-tree/src/standard_tree/standard_tree.ts b/yarn-project/merkle-tree/src/standard_tree/standard_tree.ts index 45c8cc6a6ced..fe27a0fb7a52 100644 --- a/yarn-project/merkle-tree/src/standard_tree/standard_tree.ts +++ b/yarn-project/merkle-tree/src/standard_tree/standard_tree.ts @@ -1,10 +1,10 @@ -import { TreeInsertionStats } from '@aztec/circuit-types/stats'; -import { Bufferable, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type TreeInsertionStats } from '@aztec/circuit-types/stats'; +import { type Bufferable, serializeToBuffer } from '@aztec/foundation/serialize'; import { Timer } from '@aztec/foundation/timer'; -import { AppendOnlyTree } from '../interfaces/append_only_tree.js'; +import { type AppendOnlyTree } from '../interfaces/append_only_tree.js'; import { AppendOnlySnapshotBuilder } from '../snapshots/append_only_snapshot.js'; -import { TreeSnapshot } from '../snapshots/snapshot_builder.js'; +import { type TreeSnapshot } from '../snapshots/snapshot_builder.js'; import { TreeBase } from '../tree_base.js'; /** diff --git a/yarn-project/merkle-tree/src/test/standard_based_test_suite.ts b/yarn-project/merkle-tree/src/test/standard_based_test_suite.ts index b544b661c5ed..a2533ad9e6df 100644 --- a/yarn-project/merkle-tree/src/test/standard_based_test_suite.ts +++ b/yarn-project/merkle-tree/src/test/standard_based_test_suite.ts @@ -1,12 +1,12 @@ import { SiblingPath } from '@aztec/circuit-types'; import { randomBytes } from '@aztec/foundation/crypto'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type AztecKVStore } from '@aztec/kv-store'; import { openTmpStore } from '@aztec/kv-store/utils'; -import { Hasher } from '@aztec/types/interfaces'; +import { type Hasher } from '@aztec/types/interfaces'; import { INITIAL_LEAF, Pedersen } from '../index.js'; -import { AppendOnlyTree } from '../interfaces/append_only_tree.js'; -import { UpdateOnlyTree } from '../interfaces/update_only_tree.js'; +import { type AppendOnlyTree } from '../interfaces/append_only_tree.js'; +import { type UpdateOnlyTree } from '../interfaces/update_only_tree.js'; import { appendLeaves } from './utils/append_leaves.js'; const TEST_TREE_DEPTH = 2; diff --git a/yarn-project/merkle-tree/src/test/test_suite.ts b/yarn-project/merkle-tree/src/test/test_suite.ts index 74b75c5dd439..dba34f92d8fb 100644 --- a/yarn-project/merkle-tree/src/test/test_suite.ts +++ b/yarn-project/merkle-tree/src/test/test_suite.ts @@ -1,11 +1,11 @@ import { SiblingPath } from '@aztec/circuit-types'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type AztecKVStore } from '@aztec/kv-store'; import { openTmpStore } from '@aztec/kv-store/utils'; -import { Hasher } from '@aztec/types/interfaces'; +import { type Hasher } from '@aztec/types/interfaces'; import { Pedersen } from '../index.js'; -import { AppendOnlyTree } from '../interfaces/append_only_tree.js'; -import { UpdateOnlyTree } from '../interfaces/update_only_tree.js'; +import { type AppendOnlyTree } from '../interfaces/append_only_tree.js'; +import { type UpdateOnlyTree } from '../interfaces/update_only_tree.js'; import { appendLeaves } from './utils/append_leaves.js'; const expectSameTrees = async ( diff --git a/yarn-project/merkle-tree/src/test/utils/append_leaves.ts b/yarn-project/merkle-tree/src/test/utils/append_leaves.ts index b1a221988bf5..81c07c741657 100644 --- a/yarn-project/merkle-tree/src/test/utils/append_leaves.ts +++ b/yarn-project/merkle-tree/src/test/utils/append_leaves.ts @@ -1,5 +1,5 @@ -import { AppendOnlyTree } from '../../interfaces/append_only_tree.js'; -import { UpdateOnlyTree } from '../../interfaces/update_only_tree.js'; +import { type AppendOnlyTree } from '../../interfaces/append_only_tree.js'; +import { type UpdateOnlyTree } from '../../interfaces/update_only_tree.js'; export const appendLeaves = async (tree: AppendOnlyTree | UpdateOnlyTree, leaves: Buffer[]) => { if ('appendLeaves' in tree) { diff --git a/yarn-project/merkle-tree/src/tree_base.ts b/yarn-project/merkle-tree/src/tree_base.ts index db2ed88bfb25..cd20e8e0f2d8 100644 --- a/yarn-project/merkle-tree/src/tree_base.ts +++ b/yarn-project/merkle-tree/src/tree_base.ts @@ -1,12 +1,12 @@ import { SiblingPath } from '@aztec/circuit-types'; import { toBigIntLE, toBufferLE } from '@aztec/foundation/bigint-buffer'; -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; -import { Bufferable, FromBuffer, serializeToBuffer } from '@aztec/foundation/serialize'; -import { AztecKVStore, AztecMap, AztecSingleton } from '@aztec/kv-store'; -import { Hasher } from '@aztec/types/interfaces'; +import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log'; +import { type Bufferable, type FromBuffer, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type AztecKVStore, type AztecMap, type AztecSingleton } from '@aztec/kv-store'; +import { type Hasher } from '@aztec/types/interfaces'; import { HasherWithStats } from './hasher_with_stats.js'; -import { MerkleTree } from './interfaces/merkle_tree.js'; +import { type MerkleTree } from './interfaces/merkle_tree.js'; const MAX_DEPTH = 254; diff --git a/yarn-project/noir-compiler/src/cli/add_noir_compiler_commander_actions.ts b/yarn-project/noir-compiler/src/cli/add_noir_compiler_commander_actions.ts index ee3513d6b673..9374128def86 100644 --- a/yarn-project/noir-compiler/src/cli/add_noir_compiler_commander_actions.ts +++ b/yarn-project/noir-compiler/src/cli/add_noir_compiler_commander_actions.ts @@ -1,4 +1,4 @@ -import { LogFn } from '@aztec/foundation/log'; +import { type LogFn } from '@aztec/foundation/log'; import { Command } from 'commander'; import { dirname } from 'path'; diff --git a/yarn-project/noir-compiler/src/contract-interface-gen/noir.ts b/yarn-project/noir-compiler/src/contract-interface-gen/noir.ts index eabae4c11a11..3a2f1d92e2e8 100644 --- a/yarn-project/noir-compiler/src/contract-interface-gen/noir.ts +++ b/yarn-project/noir-compiler/src/contract-interface-gen/noir.ts @@ -1,11 +1,11 @@ import { - ABIParameter, - ABIVariable, - ContractArtifact, - FunctionArtifact, + type ABIParameter, + type ABIVariable, + type ContractArtifact, + type FunctionArtifact, FunctionSelector, FunctionType, - StructType, + type StructType, } from '@aztec/foundation/abi'; import { times } from '@aztec/foundation/collection'; diff --git a/yarn-project/noir-compiler/src/contract-interface-gen/typescript.ts b/yarn-project/noir-compiler/src/contract-interface-gen/typescript.ts index 87e22fcb23e8..7d95512363a8 100644 --- a/yarn-project/noir-compiler/src/contract-interface-gen/typescript.ts +++ b/yarn-project/noir-compiler/src/contract-interface-gen/typescript.ts @@ -1,7 +1,7 @@ import { - ABIParameter, - ContractArtifact, - FunctionArtifact, + type ABIParameter, + type ContractArtifact, + type FunctionArtifact, getDefaultInitializer, isAztecAddressStruct, isEthAddressStruct, @@ -200,26 +200,26 @@ export function generateTypescriptContractInterface(input: ContractArtifact, art /* eslint-disable */ import { AztecAddress, - AztecAddressLike, + type AztecAddressLike, CompleteAddress, Contract, - ContractArtifact, + type ContractArtifact, ContractBase, ContractFunctionInteraction, - ContractInstanceWithAddress, - ContractMethod, + type ContractInstanceWithAddress, + type ContractMethod, DeployMethod, EthAddress, - EthAddressLike, - FieldLike, + type EthAddressLike, + type FieldLike, Fr, - FunctionSelectorLike, + type FunctionSelectorLike, loadContractArtifact, - NoirCompiledContract, + type NoirCompiledContract, Point, - PublicKey, - Wallet, - WrappedFieldLike, + type PublicKey, + type Wallet, + type WrappedFieldLike, } from '@aztec/aztec.js'; ${artifactStatement} diff --git a/yarn-project/noir-compiler/src/utils.ts b/yarn-project/noir-compiler/src/utils.ts index 7a93eda2518e..6a097708b01b 100644 --- a/yarn-project/noir-compiler/src/utils.ts +++ b/yarn-project/noir-compiler/src/utils.ts @@ -1,4 +1,4 @@ -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractArtifact } from '@aztec/foundation/abi'; /** * Checks if the given input looks like a valid ContractArtifact. The check is not exhaustive, diff --git a/yarn-project/noir-protocol-circuits-types/src/index.test.ts b/yarn-project/noir-protocol-circuits-types/src/index.test.ts index 3e381b6ba00f..19e1c28c0600 100644 --- a/yarn-project/noir-protocol-circuits-types/src/index.test.ts +++ b/yarn-project/noir-protocol-circuits-types/src/index.test.ts @@ -1,5 +1,5 @@ import { PrivateKernelInnerCircuitPrivateInputs, PrivateKernelTailCircuitPrivateInputs } from '@aztec/circuits.js'; -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; +import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log'; import { setupCustomSnapshotSerializers } from '@aztec/foundation/testing'; import { fileURLToPath } from '@aztec/foundation/url'; diff --git a/yarn-project/noir-protocol-circuits-types/src/index.ts b/yarn-project/noir-protocol-circuits-types/src/index.ts index cf56cc0b7c1d..0bc26b0d980a 100644 --- a/yarn-project/noir-protocol-circuits-types/src/index.ts +++ b/yarn-project/noir-protocol-circuits-types/src/index.ts @@ -16,11 +16,11 @@ import { RootRollupInputs, RootRollupPublicInputs, } from '@aztec/circuits.js'; -import { NoirCompiledCircuit } from '@aztec/types/noir'; +import { type NoirCompiledCircuit } from '@aztec/types/noir'; import { WasmBlackBoxFunctionSolver, createBlackBoxSolver, executeCircuitWithBlackBoxSolver } from '@noir-lang/acvm_js'; import { Abi, abiDecode, abiEncode } from '@noir-lang/noirc_abi'; -import { WitnessMap } from '@noir-lang/types'; +import { type WitnessMap } from '@noir-lang/types'; import BaseParityJson from './target/parity_base.json' assert { type: 'json' }; import RootParityJson from './target/parity_root.json' assert { type: 'json' }; @@ -55,16 +55,25 @@ import { mapRootRollupInputsToNoir, mapRootRollupPublicInputsFromNoir, } from './type_conversion.js'; -import { ReturnType as BaseParityReturnType } from './types/parity_base_types.js'; -import { ReturnType as RootParityReturnType } from './types/parity_root_types.js'; -import { InputType as InitInputType, ReturnType as InitReturnType } from './types/private_kernel_init_types.js'; -import { InputType as InnerInputType, ReturnType as InnerReturnType } from './types/private_kernel_inner_types.js'; -import { InputType as TailInputType, ReturnType as TailReturnType } from './types/private_kernel_tail_types.js'; -import { ReturnType as PublicPublicPreviousReturnType } from './types/public_kernel_app_logic_types.js'; -import { ReturnType as PublicSetupReturnType } from './types/public_kernel_setup_types.js'; -import { ReturnType as BaseRollupReturnType } from './types/rollup_base_types.js'; -import { ReturnType as MergeRollupReturnType } from './types/rollup_merge_types.js'; -import { ReturnType as RootRollupReturnType } from './types/rollup_root_types.js'; +import { type ReturnType as BaseParityReturnType } from './types/parity_base_types.js'; +import { type ReturnType as RootParityReturnType } from './types/parity_root_types.js'; +import { + type InputType as InitInputType, + type ReturnType as InitReturnType, +} from './types/private_kernel_init_types.js'; +import { + type InputType as InnerInputType, + type ReturnType as InnerReturnType, +} from './types/private_kernel_inner_types.js'; +import { + type InputType as TailInputType, + type ReturnType as TailReturnType, +} from './types/private_kernel_tail_types.js'; +import { type ReturnType as PublicPublicPreviousReturnType } from './types/public_kernel_app_logic_types.js'; +import { type ReturnType as PublicSetupReturnType } from './types/public_kernel_setup_types.js'; +import { type ReturnType as BaseRollupReturnType } from './types/rollup_base_types.js'; +import { type ReturnType as MergeRollupReturnType } from './types/rollup_merge_types.js'; +import { type ReturnType as RootRollupReturnType } from './types/rollup_root_types.js'; // TODO(Tom): This should be exported from noirc_abi /** diff --git a/yarn-project/noir-protocol-circuits-types/src/noir_test_gen.test.ts b/yarn-project/noir-protocol-circuits-types/src/noir_test_gen.test.ts index 8082a6c7801d..6453b0313e0e 100644 --- a/yarn-project/noir-protocol-circuits-types/src/noir_test_gen.test.ts +++ b/yarn-project/noir-protocol-circuits-types/src/noir_test_gen.test.ts @@ -16,7 +16,7 @@ import { Fr } from '@aztec/foundation/fields'; import { setupCustomSnapshotSerializers } from '@aztec/foundation/testing'; import { openTmpStore } from '@aztec/kv-store/utils'; import { Pedersen, StandardTree } from '@aztec/merkle-tree'; -import { ContractClass, ContractInstance } from '@aztec/types/contracts'; +import { type ContractClass, type ContractInstance } from '@aztec/types/contracts'; describe('Data generation for noir tests', () => { setupCustomSnapshotSerializers(expect); diff --git a/yarn-project/noir-protocol-circuits-types/src/scripts/generate_ts_from_abi.ts b/yarn-project/noir-protocol-circuits-types/src/scripts/generate_ts_from_abi.ts index 1854a5fd73bf..4c60072d12dc 100644 --- a/yarn-project/noir-protocol-circuits-types/src/scripts/generate_ts_from_abi.ts +++ b/yarn-project/noir-protocol-circuits-types/src/scripts/generate_ts_from_abi.ts @@ -1,6 +1,6 @@ -import { ABIType } from '@aztec/foundation/abi'; +import { type ABIType } from '@aztec/foundation/abi'; import { createConsoleLogger } from '@aztec/foundation/log'; -import { NoirCompiledCircuit, NoirFunctionAbi } from '@aztec/types/noir'; +import { type NoirCompiledCircuit, type NoirFunctionAbi } from '@aztec/types/noir'; import fs from 'fs/promises'; diff --git a/yarn-project/noir-protocol-circuits-types/src/type_conversion.ts b/yarn-project/noir-protocol-circuits-types/src/type_conversion.ts index f0c35c664377..c776a25d5f79 100644 --- a/yarn-project/noir-protocol-circuits-types/src/type_conversion.ts +++ b/yarn-project/noir-protocol-circuits-types/src/type_conversion.ts @@ -21,7 +21,7 @@ import { FunctionData, FunctionSelector, GlobalVariables, - GrumpkinPrivateKey, + type GrumpkinPrivateKey, GrumpkinScalar, Header, L2ToL1Message, @@ -54,8 +54,8 @@ import { NullifierKeyValidationRequest, NullifierKeyValidationRequestContext, NullifierLeafPreimage, - NullifierNonExistentReadRequestHints, - NullifierReadRequestHints, + type NullifierNonExistentReadRequestHints, + type NullifierReadRequestHints, PUBLIC_DATA_TREE_HEIGHT, ParityPublicInputs, PartialStateReference, @@ -107,106 +107,106 @@ import { ValidationRequests, } from '@aztec/circuits.js'; import { toBufferBE } from '@aztec/foundation/bigint-buffer'; -import { Tuple, mapTuple, toTruncField } from '@aztec/foundation/serialize'; +import { type Tuple, mapTuple, toTruncField } from '@aztec/foundation/serialize'; -import { BaseParityInputs as BaseParityInputsNoir } from './types/parity_base_types.js'; -import { RootParityInputs as RootParityInputsNoir } from './types/parity_root_types.js'; +import { type BaseParityInputs as BaseParityInputsNoir } from './types/parity_base_types.js'; +import { type RootParityInputs as RootParityInputsNoir } from './types/parity_root_types.js'; import { - CallContext as CallContextNoir, - CallRequest as CallRequestNoir, - CallerContext as CallerContextNoir, - CombinedAccumulatedData as CombinedAccumulatedDataNoir, - CombinedConstantData as CombinedConstantDataNoir, - FunctionData as FunctionDataNoir, - FunctionLeafMembershipWitness as FunctionLeafMembershipWitnessNoir, - FunctionSelector as FunctionSelectorNoir, - GrumpkinPrivateKey as GrumpkinPrivateKeyNoir, - L2ToL1Message as L2ToL1MessageNoir, - MaxBlockNumber as MaxBlockNumberNoir, - AztecAddress as NoirAztecAddress, - EthAddress as NoirEthAddress, - Field as NoirField, - GrumpkinPoint as NoirPoint, - NoteHashReadRequestMembershipWitness as NoteHashReadRequestMembershipWitnessNoir, - NullifierKeyValidationRequestContext as NullifierKeyValidationRequestContextNoir, - NullifierKeyValidationRequest as NullifierKeyValidationRequestNoir, - PrivateCallData as PrivateCallDataNoir, - PrivateCallStackItem as PrivateCallStackItemNoir, - PrivateCircuitPublicInputs as PrivateCircuitPublicInputsNoir, - PrivateKernelInitCircuitPrivateInputs as PrivateKernelInitCircuitPrivateInputsNoir, - PublicDataRead as PublicDataReadNoir, - PublicDataUpdateRequest as PublicDataUpdateRequestNoir, - ReadRequestContext as ReadRequestContextNoir, - ReadRequest as ReadRequestNoir, - RollupValidationRequests as RollupValidationRequestsNoir, - SideEffectLinkedToNoteHash as SideEffectLinkedToNoteHashNoir, - SideEffect as SideEffectNoir, - TxContext as TxContextNoir, - TxRequest as TxRequestNoir, - ValidationRequests as ValidationRequestsNoir, + type CallContext as CallContextNoir, + type CallRequest as CallRequestNoir, + type CallerContext as CallerContextNoir, + type CombinedAccumulatedData as CombinedAccumulatedDataNoir, + type CombinedConstantData as CombinedConstantDataNoir, + type FunctionData as FunctionDataNoir, + type FunctionLeafMembershipWitness as FunctionLeafMembershipWitnessNoir, + type FunctionSelector as FunctionSelectorNoir, + type GrumpkinPrivateKey as GrumpkinPrivateKeyNoir, + type L2ToL1Message as L2ToL1MessageNoir, + type MaxBlockNumber as MaxBlockNumberNoir, + type AztecAddress as NoirAztecAddress, + type EthAddress as NoirEthAddress, + type Field as NoirField, + type GrumpkinPoint as NoirPoint, + type NoteHashReadRequestMembershipWitness as NoteHashReadRequestMembershipWitnessNoir, + type NullifierKeyValidationRequestContext as NullifierKeyValidationRequestContextNoir, + type NullifierKeyValidationRequest as NullifierKeyValidationRequestNoir, + type PrivateCallData as PrivateCallDataNoir, + type PrivateCallStackItem as PrivateCallStackItemNoir, + type PrivateCircuitPublicInputs as PrivateCircuitPublicInputsNoir, + type PrivateKernelInitCircuitPrivateInputs as PrivateKernelInitCircuitPrivateInputsNoir, + type PublicDataRead as PublicDataReadNoir, + type PublicDataUpdateRequest as PublicDataUpdateRequestNoir, + type ReadRequestContext as ReadRequestContextNoir, + type ReadRequest as ReadRequestNoir, + type RollupValidationRequests as RollupValidationRequestsNoir, + type SideEffectLinkedToNoteHash as SideEffectLinkedToNoteHashNoir, + type SideEffect as SideEffectNoir, + type TxContext as TxContextNoir, + type TxRequest as TxRequestNoir, + type ValidationRequests as ValidationRequestsNoir, } from './types/private_kernel_init_types.js'; import { - PrivateKernelInnerCircuitPrivateInputs as PrivateKernelInnerCircuitPrivateInputsNoir, - PrivateKernelInnerCircuitPublicInputs as PrivateKernelInnerCircuitPublicInputsNoir, - PrivateKernelInnerData as PrivateKernelInnerDataNoir, + type PrivateKernelInnerCircuitPrivateInputs as PrivateKernelInnerCircuitPrivateInputsNoir, + type PrivateKernelInnerCircuitPublicInputs as PrivateKernelInnerCircuitPublicInputsNoir, + type PrivateKernelInnerData as PrivateKernelInnerDataNoir, } from './types/private_kernel_inner_types.js'; import { - NullifierReadRequestHints as NullifierReadRequestHintsNoir, - NullifierSettledReadHint as NullifierSettledReadHintNoir, - PendingReadHint as PendingReadHintNoir, - PrivateAccumulatedNonRevertibleData as PrivateAccumulatedNonRevertibleDataNoir, - PrivateAccumulatedRevertibleData as PrivateAccumulatedRevertibleDataNoir, - PrivateKernelTailCircuitPrivateInputs as PrivateKernelTailCircuitPrivateInputsNoir, - PrivateKernelTailCircuitPublicInputs as PrivateKernelTailCircuitPublicInputsNoir, - ReadRequestStatus as ReadRequestStatusNoir, + type NullifierReadRequestHints as NullifierReadRequestHintsNoir, + type NullifierSettledReadHint as NullifierSettledReadHintNoir, + type PendingReadHint as PendingReadHintNoir, + type PrivateAccumulatedNonRevertibleData as PrivateAccumulatedNonRevertibleDataNoir, + type PrivateAccumulatedRevertibleData as PrivateAccumulatedRevertibleDataNoir, + type PrivateKernelTailCircuitPrivateInputs as PrivateKernelTailCircuitPrivateInputsNoir, + type PrivateKernelTailCircuitPublicInputs as PrivateKernelTailCircuitPublicInputsNoir, + type ReadRequestStatus as ReadRequestStatusNoir, } from './types/private_kernel_tail_types.js'; import { - PublicAccumulatedNonRevertibleData as PublicAccumulatedNonRevertibleDataNoir, - PublicAccumulatedRevertibleData as PublicAccumulatedRevertibleDataNoir, - PublicKernelData as PublicKernelDataNoir, + type PublicAccumulatedNonRevertibleData as PublicAccumulatedNonRevertibleDataNoir, + type PublicAccumulatedRevertibleData as PublicAccumulatedRevertibleDataNoir, + type PublicKernelData as PublicKernelDataNoir, } from './types/public_kernel_app_logic_types.js'; import { - PublicCallData as PublicCallDataNoir, - PublicCallStackItem as PublicCallStackItemNoir, - PublicCircuitPublicInputs as PublicCircuitPublicInputsNoir, - PublicKernelCircuitPublicInputs as PublicKernelCircuitPublicInputsNoir, - PublicKernelSetupCircuitPrivateInputs as PublicKernelSetupCircuitPrivateInputsNoir, - StorageRead as StorageReadNoir, - StorageUpdateRequest as StorageUpdateRequestNoir, + type PublicCallData as PublicCallDataNoir, + type PublicCallStackItem as PublicCallStackItemNoir, + type PublicCircuitPublicInputs as PublicCircuitPublicInputsNoir, + type PublicKernelCircuitPublicInputs as PublicKernelCircuitPublicInputsNoir, + type PublicKernelSetupCircuitPrivateInputs as PublicKernelSetupCircuitPrivateInputsNoir, + type StorageRead as StorageReadNoir, + type StorageUpdateRequest as StorageUpdateRequestNoir, } from './types/public_kernel_setup_types.js'; import { - NullifierNonExistentReadRequestHints as NullifierNonExistentReadRequestHintsNoir, - NullifierNonMembershipHint as NullifierNonMembershipHintNoir, - PublicKernelTailCircuitPrivateInputs as PublicKernelTailCircuitPrivateInputsNoir, + type NullifierNonExistentReadRequestHints as NullifierNonExistentReadRequestHintsNoir, + type NullifierNonMembershipHint as NullifierNonMembershipHintNoir, + type PublicKernelTailCircuitPrivateInputs as PublicKernelTailCircuitPrivateInputsNoir, } from './types/public_kernel_tail_types.js'; import { - ArchiveRootMembershipWitness as ArchiveRootMembershipWitnessNoir, - BaseRollupInputs as BaseRollupInputsNoir, - NullifierLeafPreimage as NullifierLeafPreimageNoir, - NullifierMembershipWitness as NullifierMembershipWitnessNoir, - PublicDataMembershipWitness as PublicDataMembershipWitnessNoir, - PublicDataTreeLeaf as PublicDataTreeLeafNoir, - PublicDataTreeLeafPreimage as PublicDataTreeLeafPreimageNoir, - RollupKernelCircuitPublicInputs as RollupKernelCircuitPublicInputsNoir, - RollupKernelData as RollupKernelDataNoir, - StateDiffHints as StateDiffHintsNoir, + type ArchiveRootMembershipWitness as ArchiveRootMembershipWitnessNoir, + type BaseRollupInputs as BaseRollupInputsNoir, + type NullifierLeafPreimage as NullifierLeafPreimageNoir, + type NullifierMembershipWitness as NullifierMembershipWitnessNoir, + type PublicDataMembershipWitness as PublicDataMembershipWitnessNoir, + type PublicDataTreeLeaf as PublicDataTreeLeafNoir, + type PublicDataTreeLeafPreimage as PublicDataTreeLeafPreimageNoir, + type RollupKernelCircuitPublicInputs as RollupKernelCircuitPublicInputsNoir, + type RollupKernelData as RollupKernelDataNoir, + type StateDiffHints as StateDiffHintsNoir, } from './types/rollup_base_types.js'; -import { MergeRollupInputs as MergeRollupInputsNoir } from './types/rollup_merge_types.js'; +import { type MergeRollupInputs as MergeRollupInputsNoir } from './types/rollup_merge_types.js'; import { - AppendOnlyTreeSnapshot as AppendOnlyTreeSnapshotNoir, - BaseOrMergeRollupPublicInputs as BaseOrMergeRollupPublicInputsNoir, - ConstantRollupData as ConstantRollupDataNoir, - ContentCommitment as ContentCommitmentNoir, - Field, - GlobalVariables as GlobalVariablesNoir, - Header as HeaderNoir, - ParityPublicInputs as ParityPublicInputsNoir, - PartialStateReference as PartialStateReferenceNoir, - PreviousRollupData as PreviousRollupDataNoir, - RootParityInput as RootParityInputNoir, - RootRollupInputs as RootRollupInputsNoir, - RootRollupPublicInputs as RootRollupPublicInputsNoir, - StateReference as StateReferenceNoir, + type AppendOnlyTreeSnapshot as AppendOnlyTreeSnapshotNoir, + type BaseOrMergeRollupPublicInputs as BaseOrMergeRollupPublicInputsNoir, + type ConstantRollupData as ConstantRollupDataNoir, + type ContentCommitment as ContentCommitmentNoir, + type Field, + type GlobalVariables as GlobalVariablesNoir, + type Header as HeaderNoir, + type ParityPublicInputs as ParityPublicInputsNoir, + type PartialStateReference as PartialStateReferenceNoir, + type PreviousRollupData as PreviousRollupDataNoir, + type RootParityInput as RootParityInputNoir, + type RootRollupInputs as RootRollupInputsNoir, + type RootRollupPublicInputs as RootRollupPublicInputsNoir, + type StateReference as StateReferenceNoir, } from './types/rollup_root_types.js'; /* eslint-disable camelcase */ diff --git a/yarn-project/p2p/src/bootstrap/bootstrap.ts b/yarn-project/p2p/src/bootstrap/bootstrap.ts index 055f8ac6e14f..e70e871fbd6f 100644 --- a/yarn-project/p2p/src/bootstrap/bootstrap.ts +++ b/yarn-project/p2p/src/bootstrap/bootstrap.ts @@ -6,11 +6,11 @@ import type { ServiceMap } from '@libp2p/interface-libp2p'; import { kadDHT } from '@libp2p/kad-dht'; import { mplex } from '@libp2p/mplex'; import { tcp } from '@libp2p/tcp'; -import { Libp2p, Libp2pOptions, ServiceFactoryMap, createLibp2p } from 'libp2p'; +import { type Libp2p, type Libp2pOptions, type ServiceFactoryMap, createLibp2p } from 'libp2p'; import { identifyService } from 'libp2p/identify'; import { format } from 'util'; -import { P2PConfig } from '../config.js'; +import { type P2PConfig } from '../config.js'; import { createLibP2PPeerId } from '../service/index.js'; /** diff --git a/yarn-project/p2p/src/client/index.ts b/yarn-project/p2p/src/client/index.ts index b2411e801187..a31752544ef9 100644 --- a/yarn-project/p2p/src/client/index.ts +++ b/yarn-project/p2p/src/client/index.ts @@ -1,11 +1,11 @@ -import { L2BlockSource } from '@aztec/circuit-types'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type L2BlockSource } from '@aztec/circuit-types'; +import { type AztecKVStore } from '@aztec/kv-store'; import { P2PClient } from '../client/p2p_client.js'; -import { P2PConfig } from '../config.js'; +import { type P2PConfig } from '../config.js'; import { DummyP2PService } from '../service/dummy_service.js'; import { LibP2PService } from '../service/index.js'; -import { TxPool } from '../tx_pool/index.js'; +import { type TxPool } from '../tx_pool/index.js'; export * from './p2p_client.js'; diff --git a/yarn-project/p2p/src/client/mocks.ts b/yarn-project/p2p/src/client/mocks.ts index 1b2134ac45d3..869b8c4b7296 100644 --- a/yarn-project/p2p/src/client/mocks.ts +++ b/yarn-project/p2p/src/client/mocks.ts @@ -1,4 +1,4 @@ -import { L2Block, L2BlockSource, TxEffect, TxHash, TxReceipt, TxStatus } from '@aztec/circuit-types'; +import { L2Block, type L2BlockSource, TxEffect, TxHash, TxReceipt, TxStatus } from '@aztec/circuit-types'; import { EthAddress } from '@aztec/circuits.js'; /** diff --git a/yarn-project/p2p/src/client/p2p_client.test.ts b/yarn-project/p2p/src/client/p2p_client.test.ts index d0c9ba8da8ae..91c0a5561f01 100644 --- a/yarn-project/p2p/src/client/p2p_client.test.ts +++ b/yarn-project/p2p/src/client/p2p_client.test.ts @@ -1,11 +1,11 @@ -import { L2BlockSource, mockTx } from '@aztec/circuit-types'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type L2BlockSource, mockTx } from '@aztec/circuit-types'; +import { type AztecKVStore } from '@aztec/kv-store'; import { openTmpStore } from '@aztec/kv-store/utils'; import { expect, jest } from '@jest/globals'; -import { P2PService } from '../index.js'; -import { TxPool } from '../tx_pool/index.js'; +import { type P2PService } from '../index.js'; +import { type TxPool } from '../tx_pool/index.js'; import { MockBlockSource } from './mocks.js'; import { P2PClient } from './p2p_client.js'; diff --git a/yarn-project/p2p/src/client/p2p_client.ts b/yarn-project/p2p/src/client/p2p_client.ts index c93931afc1e0..1dc8d2a98d13 100644 --- a/yarn-project/p2p/src/client/p2p_client.ts +++ b/yarn-project/p2p/src/client/p2p_client.ts @@ -1,11 +1,11 @@ -import { L2Block, L2BlockContext, L2BlockDownloader, L2BlockSource, Tx, TxHash } from '@aztec/circuit-types'; +import { L2Block, L2BlockContext, L2BlockDownloader, type L2BlockSource, Tx, TxHash } from '@aztec/circuit-types'; import { INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js/constants'; import { createDebugLogger } from '@aztec/foundation/log'; -import { AztecKVStore, AztecSingleton } from '@aztec/kv-store'; +import { type AztecKVStore, type AztecSingleton } from '@aztec/kv-store'; import { getP2PConfigEnvVars } from '../config.js'; -import { P2PService } from '../service/service.js'; -import { TxPool } from '../tx_pool/index.js'; +import { type P2PService } from '../service/service.js'; +import { type TxPool } from '../tx_pool/index.js'; /** * Enum defining the possible states of the p2p client. diff --git a/yarn-project/p2p/src/service/dummy_service.ts b/yarn-project/p2p/src/service/dummy_service.ts index bfc6b1d13647..b44cce9d3c2d 100644 --- a/yarn-project/p2p/src/service/dummy_service.ts +++ b/yarn-project/p2p/src/service/dummy_service.ts @@ -1,6 +1,6 @@ import { Tx, TxHash } from '@aztec/circuit-types'; -import { P2PService } from './service.js'; +import { type P2PService } from './service.js'; /** * A dummy implementation of the P2P Service. diff --git a/yarn-project/p2p/src/service/known_txs.test.ts b/yarn-project/p2p/src/service/known_txs.test.ts index 68ca52b7ec31..a0c2772feec0 100644 --- a/yarn-project/p2p/src/service/known_txs.test.ts +++ b/yarn-project/p2p/src/service/known_txs.test.ts @@ -1,7 +1,7 @@ import { randomTxHash } from '@aztec/circuit-types'; import { expect } from '@jest/globals'; -import { Ed25519PeerId, PeerId } from '@libp2p/interface-peer-id'; +import { type Ed25519PeerId, type PeerId } from '@libp2p/interface-peer-id'; import { mock } from 'jest-mock-extended'; import { KnownTxLookup } from './known_txs.js'; diff --git a/yarn-project/p2p/src/service/known_txs.ts b/yarn-project/p2p/src/service/known_txs.ts index b9a38f2cd0c2..6ee37d7d697f 100644 --- a/yarn-project/p2p/src/service/known_txs.ts +++ b/yarn-project/p2p/src/service/known_txs.ts @@ -1,4 +1,4 @@ -import { PeerId } from '@libp2p/interface-peer-id'; +import { type PeerId } from '@libp2p/interface-peer-id'; /** * Keeps a record of which Peers have 'seen' which transactions. diff --git a/yarn-project/p2p/src/service/libp2p_service.ts b/yarn-project/p2p/src/service/libp2p_service.ts index 4237307d9631..97631877653b 100644 --- a/yarn-project/p2p/src/service/libp2p_service.ts +++ b/yarn-project/p2p/src/service/libp2p_service.ts @@ -6,20 +6,20 @@ import { noise } from '@chainsafe/libp2p-noise'; import { yamux } from '@chainsafe/libp2p-yamux'; import { bootstrap } from '@libp2p/bootstrap'; import type { ServiceMap } from '@libp2p/interface-libp2p'; -import { PeerId } from '@libp2p/interface-peer-id'; -import { IncomingStreamData } from '@libp2p/interface/stream-handler'; -import { DualKadDHT, kadDHT } from '@libp2p/kad-dht'; +import { type PeerId } from '@libp2p/interface-peer-id'; +import { type IncomingStreamData } from '@libp2p/interface/stream-handler'; +import { type DualKadDHT, kadDHT } from '@libp2p/kad-dht'; import { mplex } from '@libp2p/mplex'; import { createFromJSON, createSecp256k1PeerId, exportToProtobuf } from '@libp2p/peer-id-factory'; import { tcp } from '@libp2p/tcp'; import { pipe } from 'it-pipe'; -import { Libp2p, Libp2pOptions, ServiceFactoryMap, createLibp2p } from 'libp2p'; +import { type Libp2p, type Libp2pOptions, type ServiceFactoryMap, createLibp2p } from 'libp2p'; import { identifyService } from 'libp2p/identify'; -import { P2PConfig } from '../config.js'; -import { TxPool } from '../tx_pool/index.js'; +import { type P2PConfig } from '../config.js'; +import { type TxPool } from '../tx_pool/index.js'; import { KnownTxLookup } from './known_txs.js'; -import { P2PService } from './service.js'; +import { type P2PService } from './service.js'; import { Messages, createGetTransactionsRequestMessage, diff --git a/yarn-project/p2p/src/tx_pool/aztec_kv_tx_pool.ts b/yarn-project/p2p/src/tx_pool/aztec_kv_tx_pool.ts index fd1eba930e25..13729720692e 100644 --- a/yarn-project/p2p/src/tx_pool/aztec_kv_tx_pool.ts +++ b/yarn-project/p2p/src/tx_pool/aztec_kv_tx_pool.ts @@ -1,9 +1,9 @@ import { Tx, TxHash } from '@aztec/circuit-types'; -import { TxAddedToPoolStats } from '@aztec/circuit-types/stats'; -import { Logger, createDebugLogger } from '@aztec/foundation/log'; -import { AztecKVStore, AztecMap } from '@aztec/kv-store'; +import { type TxAddedToPoolStats } from '@aztec/circuit-types/stats'; +import { type Logger, createDebugLogger } from '@aztec/foundation/log'; +import { type AztecKVStore, type AztecMap } from '@aztec/kv-store'; -import { TxPool } from './tx_pool.js'; +import { type TxPool } from './tx_pool.js'; /** * In-memory implementation of the Transaction Pool. diff --git a/yarn-project/p2p/src/tx_pool/memory_tx_pool.ts b/yarn-project/p2p/src/tx_pool/memory_tx_pool.ts index 8f4aad46a38d..27aa1683fff4 100644 --- a/yarn-project/p2p/src/tx_pool/memory_tx_pool.ts +++ b/yarn-project/p2p/src/tx_pool/memory_tx_pool.ts @@ -1,8 +1,8 @@ import { Tx, TxHash } from '@aztec/circuit-types'; -import { TxAddedToPoolStats } from '@aztec/circuit-types/stats'; +import { type TxAddedToPoolStats } from '@aztec/circuit-types/stats'; import { createDebugLogger } from '@aztec/foundation/log'; -import { TxPool } from './tx_pool.js'; +import { type TxPool } from './tx_pool.js'; /** * In-memory implementation of the Transaction Pool. diff --git a/yarn-project/p2p/src/tx_pool/tx_pool_test_suite.ts b/yarn-project/p2p/src/tx_pool/tx_pool_test_suite.ts index e2e9f74156ef..ea08bd1b4750 100644 --- a/yarn-project/p2p/src/tx_pool/tx_pool_test_suite.ts +++ b/yarn-project/p2p/src/tx_pool/tx_pool_test_suite.ts @@ -1,6 +1,6 @@ import { mockTx } from '@aztec/circuit-types'; -import { TxPool } from './tx_pool.js'; +import { type TxPool } from './tx_pool.js'; /** * Tests a TxPool implementation. diff --git a/yarn-project/protocol-contracts/src/class-registerer/artifact.ts b/yarn-project/protocol-contracts/src/class-registerer/artifact.ts index 2a3ca423ce6f..433bf7b269cc 100644 --- a/yarn-project/protocol-contracts/src/class-registerer/artifact.ts +++ b/yarn-project/protocol-contracts/src/class-registerer/artifact.ts @@ -1,5 +1,5 @@ import { loadContractArtifact } from '@aztec/types/abi'; -import { NoirCompiledContract } from '@aztec/types/noir'; +import { type NoirCompiledContract } from '@aztec/types/noir'; import ContractClassRegistererJson from '../artifacts/ContractClassRegisterer.json' assert { type: 'json' }; diff --git a/yarn-project/protocol-contracts/src/class-registerer/index.ts b/yarn-project/protocol-contracts/src/class-registerer/index.ts index ea85f6f6acf6..6aa011010bda 100644 --- a/yarn-project/protocol-contracts/src/class-registerer/index.ts +++ b/yarn-project/protocol-contracts/src/class-registerer/index.ts @@ -1,6 +1,6 @@ import { AztecAddress } from '@aztec/circuits.js'; -import { ProtocolContract, getCanonicalProtocolContract } from '../protocol_contract.js'; +import { type ProtocolContract, getCanonicalProtocolContract } from '../protocol_contract.js'; import { ContractClassRegistererArtifact } from './artifact.js'; /** Returns the canonical deployment of the class registerer contract. */ diff --git a/yarn-project/protocol-contracts/src/gas-token/artifact.ts b/yarn-project/protocol-contracts/src/gas-token/artifact.ts index 042b3701e49a..0dbaf8c2d747 100644 --- a/yarn-project/protocol-contracts/src/gas-token/artifact.ts +++ b/yarn-project/protocol-contracts/src/gas-token/artifact.ts @@ -1,5 +1,5 @@ import { loadContractArtifact } from '@aztec/types/abi'; -import { NoirCompiledContract } from '@aztec/types/noir'; +import { type NoirCompiledContract } from '@aztec/types/noir'; import GasTokenJson from '../artifacts/GasToken.json' assert { type: 'json' }; diff --git a/yarn-project/protocol-contracts/src/gas-token/index.ts b/yarn-project/protocol-contracts/src/gas-token/index.ts index 2ecfe6c8ed15..fe1ac1d36d23 100644 --- a/yarn-project/protocol-contracts/src/gas-token/index.ts +++ b/yarn-project/protocol-contracts/src/gas-token/index.ts @@ -1,6 +1,6 @@ import { AztecAddress, EthAddress, Point } from '@aztec/circuits.js'; -import { ProtocolContract, getCanonicalProtocolContract } from '../protocol_contract.js'; +import { type ProtocolContract, getCanonicalProtocolContract } from '../protocol_contract.js'; import { GasTokenArtifact } from './artifact.js'; /** Returns the canonical deployment of the gas token. */ diff --git a/yarn-project/protocol-contracts/src/index.ts b/yarn-project/protocol-contracts/src/index.ts index f8cc9c7109a5..fae052867ec5 100644 --- a/yarn-project/protocol-contracts/src/index.ts +++ b/yarn-project/protocol-contracts/src/index.ts @@ -1 +1 @@ -export { ProtocolContract } from './protocol_contract.js'; +export { type ProtocolContract } from './protocol_contract.js'; diff --git a/yarn-project/protocol-contracts/src/instance-deployer/artifact.ts b/yarn-project/protocol-contracts/src/instance-deployer/artifact.ts index 3ae928ab0454..809e35873ace 100644 --- a/yarn-project/protocol-contracts/src/instance-deployer/artifact.ts +++ b/yarn-project/protocol-contracts/src/instance-deployer/artifact.ts @@ -1,5 +1,5 @@ import { loadContractArtifact } from '@aztec/types/abi'; -import { NoirCompiledContract } from '@aztec/types/noir'; +import { type NoirCompiledContract } from '@aztec/types/noir'; import ContractInstanceDeployerJson from '../artifacts/ContractInstanceDeployer.json' assert { type: 'json' }; diff --git a/yarn-project/protocol-contracts/src/instance-deployer/index.ts b/yarn-project/protocol-contracts/src/instance-deployer/index.ts index 1a0942a9f2c5..7a3101fa7893 100644 --- a/yarn-project/protocol-contracts/src/instance-deployer/index.ts +++ b/yarn-project/protocol-contracts/src/instance-deployer/index.ts @@ -1,6 +1,6 @@ import { AztecAddress, DEPLOYER_CONTRACT_ADDRESS } from '@aztec/circuits.js'; -import { ProtocolContract, getCanonicalProtocolContract } from '../protocol_contract.js'; +import { type ProtocolContract, getCanonicalProtocolContract } from '../protocol_contract.js'; import { ContractInstanceDeployerArtifact } from './artifact.js'; /** Returns the canonical deployment of the instance deployer contract. */ diff --git a/yarn-project/protocol-contracts/src/multi-call-entrypoint/artifact.ts b/yarn-project/protocol-contracts/src/multi-call-entrypoint/artifact.ts index ede18eb397b9..b3cf23f9f41e 100644 --- a/yarn-project/protocol-contracts/src/multi-call-entrypoint/artifact.ts +++ b/yarn-project/protocol-contracts/src/multi-call-entrypoint/artifact.ts @@ -1,5 +1,5 @@ import { loadContractArtifact } from '@aztec/types/abi'; -import { NoirCompiledContract } from '@aztec/types/noir'; +import { type NoirCompiledContract } from '@aztec/types/noir'; import MultiCallEntrypoint from '../artifacts/MultiCallEntrypoint.json' assert { type: 'json' }; diff --git a/yarn-project/protocol-contracts/src/multi-call-entrypoint/index.ts b/yarn-project/protocol-contracts/src/multi-call-entrypoint/index.ts index c9298b886f61..6b0aee60ba8c 100644 --- a/yarn-project/protocol-contracts/src/multi-call-entrypoint/index.ts +++ b/yarn-project/protocol-contracts/src/multi-call-entrypoint/index.ts @@ -1,6 +1,6 @@ import { AztecAddress, EthAddress, Point } from '@aztec/circuits.js'; -import { ProtocolContract, getCanonicalProtocolContract } from '../protocol_contract.js'; +import { type ProtocolContract, getCanonicalProtocolContract } from '../protocol_contract.js'; import { MultiCallEntrypointArtifact } from './artifact.js'; export function getCanonicalMultiCallEntrypointContract(): ProtocolContract { diff --git a/yarn-project/protocol-contracts/src/protocol_contract.ts b/yarn-project/protocol-contracts/src/protocol_contract.ts index 8d7e4ccb371f..c7dd9afa8669 100644 --- a/yarn-project/protocol-contracts/src/protocol_contract.ts +++ b/yarn-project/protocol-contracts/src/protocol_contract.ts @@ -4,9 +4,9 @@ import { getContractClassFromArtifact, getContractInstanceFromDeployParams, } from '@aztec/circuits.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractArtifact } from '@aztec/foundation/abi'; import { Fr, Point } from '@aztec/foundation/fields'; -import { ContractClassWithId, ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type ContractClassWithId, type ContractInstanceWithAddress } from '@aztec/types/contracts'; /** Represents a canonical contract in the protocol. */ export interface ProtocolContract { diff --git a/yarn-project/prover-client/src/dummy-prover.ts b/yarn-project/prover-client/src/dummy-prover.ts index d2c1f4842e40..cc199a001fb7 100644 --- a/yarn-project/prover-client/src/dummy-prover.ts +++ b/yarn-project/prover-client/src/dummy-prover.ts @@ -1,10 +1,10 @@ import { L2Block, PROVING_STATUS, - ProcessedTx, - ProverClient, - ProvingSuccess, - ProvingTicket, + type ProcessedTx, + type ProverClient, + type ProvingSuccess, + type ProvingTicket, } from '@aztec/circuit-types'; import { GlobalVariables, makeEmptyProof } from '@aztec/circuits.js'; import { Fr } from '@aztec/foundation/fields'; diff --git a/yarn-project/prover-client/src/orchestrator/block-building-helpers.ts b/yarn-project/prover-client/src/orchestrator/block-building-helpers.ts index 5156edd63015..24fda2702d40 100644 --- a/yarn-project/prover-client/src/orchestrator/block-building-helpers.ts +++ b/yarn-project/prover-client/src/orchestrator/block-building-helpers.ts @@ -1,4 +1,4 @@ -import { MerkleTreeId, ProcessedTx } from '@aztec/circuit-types'; +import { MerkleTreeId, type ProcessedTx } from '@aztec/circuit-types'; import { ARCHIVE_HEIGHT, AppendOnlyTreeSnapshot, @@ -44,13 +44,13 @@ import { VerificationKey, } from '@aztec/circuits.js'; import { assertPermutation, makeTuple } from '@aztec/foundation/array'; -import { DebugLogger } from '@aztec/foundation/log'; -import { Tuple, assertLength, toFriendlyJSON } from '@aztec/foundation/serialize'; -import { MerkleTreeOperations } from '@aztec/world-state'; +import { type DebugLogger } from '@aztec/foundation/log'; +import { type Tuple, assertLength, toFriendlyJSON } from '@aztec/foundation/serialize'; +import { type MerkleTreeOperations } from '@aztec/world-state'; -import { VerificationKeys, getVerificationKeys } from '../mocks/verification_keys.js'; -import { RollupProver } from '../prover/index.js'; -import { RollupSimulator } from '../simulator/rollup.js'; +import { type VerificationKeys, getVerificationKeys } from '../mocks/verification_keys.js'; +import { type RollupProver } from '../prover/index.js'; +import { type RollupSimulator } from '../simulator/rollup.js'; // Denotes fields that are not used now, but will be in the future const FUTURE_FR = new Fr(0n); diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator.test.ts b/yarn-project/prover-client/src/orchestrator/orchestrator.test.ts index c4af9a479dc6..d0388ba95df4 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator.test.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator.test.ts @@ -1,8 +1,8 @@ import { MerkleTreeId, PROVING_STATUS, - ProcessedTx, - ProvingSuccess, + type ProcessedTx, + type ProvingSuccess, makeEmptyProcessedTx as makeEmptyProcessedTxFromHistoricalTreeRoots, makeProcessedTx, mockTx, @@ -48,14 +48,14 @@ import { padArrayEnd, times } from '@aztec/foundation/collection'; import { sleep } from '@aztec/foundation/sleep'; import { openTmpStore } from '@aztec/kv-store/utils'; import { WASMSimulator } from '@aztec/simulator'; -import { MerkleTreeOperations, MerkleTrees } from '@aztec/world-state'; +import { type MerkleTreeOperations, MerkleTrees } from '@aztec/world-state'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; import { type MemDown, default as memdown } from 'memdown'; import { getVerificationKeys } from '../mocks/verification_keys.js'; -import { RollupProver } from '../prover/index.js'; -import { RollupSimulator } from '../simulator/rollup.js'; +import { type RollupProver } from '../prover/index.js'; +import { type RollupSimulator } from '../simulator/rollup.js'; import { ProvingOrchestrator } from './orchestrator.js'; export const createMemDown = () => (memdown as any)() as MemDown; diff --git a/yarn-project/prover-client/src/orchestrator/orchestrator.ts b/yarn-project/prover-client/src/orchestrator/orchestrator.ts index d813a9dc0d19..7c4418bf5090 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator.ts @@ -1,6 +1,6 @@ -import { Body, L2Block, MerkleTreeId, ProcessedTx, TxEffect, toTxEffect } from '@aztec/circuit-types'; -import { PROVING_STATUS, ProvingResult, ProvingTicket } from '@aztec/circuit-types/interfaces'; -import { CircuitSimulationStats } from '@aztec/circuit-types/stats'; +import { Body, L2Block, MerkleTreeId, type ProcessedTx, TxEffect, toTxEffect } from '@aztec/circuit-types'; +import { PROVING_STATUS, type ProvingResult, type ProvingTicket } from '@aztec/circuit-types/interfaces'; +import { type CircuitSimulationStats } from '@aztec/circuit-types/stats'; import { AppendOnlyTreeSnapshot, BaseOrMergeRollupPublicInputs, @@ -17,17 +17,17 @@ import { import { padArrayEnd } from '@aztec/foundation/collection'; import { MemoryFifo } from '@aztec/foundation/fifo'; import { createDebugLogger } from '@aztec/foundation/log'; -import { Tuple } from '@aztec/foundation/serialize'; +import { type Tuple } from '@aztec/foundation/serialize'; import { sleep } from '@aztec/foundation/sleep'; import { elapsed } from '@aztec/foundation/timer'; -import { SimulationProvider } from '@aztec/simulator'; -import { MerkleTreeOperations } from '@aztec/world-state'; +import { type SimulationProvider } from '@aztec/simulator'; +import { type MerkleTreeOperations } from '@aztec/world-state'; import { inspect } from 'util'; -import { VerificationKeys, getVerificationKeys } from '../mocks/verification_keys.js'; -import { RollupProver } from '../prover/index.js'; -import { RealRollupCircuitSimulator, RollupSimulator } from '../simulator/rollup.js'; +import { type VerificationKeys, getVerificationKeys } from '../mocks/verification_keys.js'; +import { type RollupProver } from '../prover/index.js'; +import { RealRollupCircuitSimulator, type RollupSimulator } from '../simulator/rollup.js'; import { buildBaseRollupInput, createMergeRollupInputs, @@ -39,7 +39,7 @@ import { getTreeSnapshot, validateTx, } from './block-building-helpers.js'; -import { MergeRollupInputData, PROVING_JOB_TYPE, ProvingJob, ProvingState } from './proving-state.js'; +import { type MergeRollupInputData, PROVING_JOB_TYPE, type ProvingJob, ProvingState } from './proving-state.js'; const logger = createDebugLogger('aztec:prover:proving-orchestrator'); diff --git a/yarn-project/prover-client/src/orchestrator/proving-state.ts b/yarn-project/prover-client/src/orchestrator/proving-state.ts index 232f7ad40e58..f4031e0f4514 100644 --- a/yarn-project/prover-client/src/orchestrator/proving-state.ts +++ b/yarn-project/prover-client/src/orchestrator/proving-state.ts @@ -1,4 +1,4 @@ -import { ProcessedTx, ProvingResult } from '@aztec/circuit-types'; +import { type ProcessedTx, type ProvingResult } from '@aztec/circuit-types'; import { BaseOrMergeRollupPublicInputs, Fr, @@ -8,7 +8,7 @@ import { RootParityInput, } from '@aztec/circuits.js'; import { randomBytes } from '@aztec/foundation/crypto'; -import { Tuple } from '@aztec/foundation/serialize'; +import { type Tuple } from '@aztec/foundation/serialize'; /** * Enums and structs to communicate the type of work required in each request. diff --git a/yarn-project/prover-client/src/prover/empty.ts b/yarn-project/prover-client/src/prover/empty.ts index 7ca043c8f8fd..b114068129b3 100644 --- a/yarn-project/prover-client/src/prover/empty.ts +++ b/yarn-project/prover-client/src/prover/empty.ts @@ -14,7 +14,7 @@ import { RootRollupPublicInputs, } from '@aztec/circuits.js'; -import { PublicProver, RollupProver } from './index.js'; +import { type PublicProver, type RollupProver } from './index.js'; const EMPTY_PROOF_SIZE = 42; diff --git a/yarn-project/prover-client/src/simulator/rollup.ts b/yarn-project/prover-client/src/simulator/rollup.ts index 5101c07b2d92..e0e6f5da4cb1 100644 --- a/yarn-project/prover-client/src/simulator/rollup.ts +++ b/yarn-project/prover-client/src/simulator/rollup.ts @@ -1,4 +1,4 @@ -import { CircuitSimulationStats } from '@aztec/circuit-types/stats'; +import { type CircuitSimulationStats } from '@aztec/circuit-types/stats'; import { BaseOrMergeRollupPublicInputs, BaseParityInputs, @@ -28,7 +28,7 @@ import { convertRootRollupInputsToWitnessMap, convertRootRollupOutputsFromWitnessMap, } from '@aztec/noir-protocol-circuits-types'; -import { SimulationProvider, WASMSimulator } from '@aztec/simulator'; +import { type SimulationProvider, WASMSimulator } from '@aztec/simulator'; /** * Circuit simulator for the rollup circuits. diff --git a/yarn-project/prover-client/src/tx-prover/tx-prover.ts b/yarn-project/prover-client/src/tx-prover/tx-prover.ts index 782b65d14c24..c40becdd4642 100644 --- a/yarn-project/prover-client/src/tx-prover/tx-prover.ts +++ b/yarn-project/prover-client/src/tx-prover/tx-prover.ts @@ -1,11 +1,11 @@ -import { ProcessedTx } from '@aztec/circuit-types'; -import { ProverClient, ProvingTicket } from '@aztec/circuit-types/interfaces'; +import { type ProcessedTx } from '@aztec/circuit-types'; +import { type ProverClient, type ProvingTicket } from '@aztec/circuit-types/interfaces'; import { Fr, GlobalVariables } from '@aztec/circuits.js'; -import { SimulationProvider } from '@aztec/simulator'; -import { WorldStateSynchronizer } from '@aztec/world-state'; +import { type SimulationProvider } from '@aztec/simulator'; +import { type WorldStateSynchronizer } from '@aztec/world-state'; -import { ProverConfig } from '../config.js'; -import { VerificationKeys, getVerificationKeys } from '../mocks/verification_keys.js'; +import { type ProverConfig } from '../config.js'; +import { type VerificationKeys, getVerificationKeys } from '../mocks/verification_keys.js'; import { ProvingOrchestrator } from '../orchestrator/orchestrator.js'; import { EmptyRollupProver } from '../prover/empty.js'; diff --git a/yarn-project/pxe/src/contract_data_oracle/index.ts b/yarn-project/pxe/src/contract_data_oracle/index.ts index ad51ed876c9c..62f85f3f7a98 100644 --- a/yarn-project/pxe/src/contract_data_oracle/index.ts +++ b/yarn-project/pxe/src/contract_data_oracle/index.ts @@ -1,17 +1,17 @@ import { AztecAddress, MembershipWitness, VK_TREE_HEIGHT } from '@aztec/circuits.js'; import { - ContractArtifact, - FunctionArtifact, - FunctionDebugMetadata, + type ContractArtifact, + type FunctionArtifact, + type FunctionDebugMetadata, FunctionSelector, getFunctionDebugMetadata, } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; import { ContractClassNotFoundError, ContractNotFoundError } from '@aztec/simulator'; -import { ContractClass, ContractInstance } from '@aztec/types/contracts'; +import { type ContractClass, type ContractInstance } from '@aztec/types/contracts'; -import { ContractArtifactDatabase } from '../database/contracts/contract_artifact_db.js'; -import { ContractInstanceDatabase } from '../database/contracts/contract_instance_db.js'; +import { type ContractArtifactDatabase } from '../database/contracts/contract_artifact_db.js'; +import { type ContractInstanceDatabase } from '../database/contracts/contract_instance_db.js'; import { PrivateFunctionsTree } from './private_functions_tree.js'; /** diff --git a/yarn-project/pxe/src/contract_data_oracle/private_functions_tree.ts b/yarn-project/pxe/src/contract_data_oracle/private_functions_tree.ts index 6ea2e0617237..44fe7e54b134 100644 --- a/yarn-project/pxe/src/contract_data_oracle/private_functions_tree.ts +++ b/yarn-project/pxe/src/contract_data_oracle/private_functions_tree.ts @@ -6,10 +6,10 @@ import { getContractClassFromArtifact, } from '@aztec/circuits.js'; import { MerkleTree } from '@aztec/circuits.js/merkle'; -import { ContractArtifact, FunctionSelector } from '@aztec/foundation/abi'; +import { type ContractArtifact, FunctionSelector } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; import { assertLength } from '@aztec/foundation/serialize'; -import { ContractClassWithId } from '@aztec/types/contracts'; +import { type ContractClassWithId } from '@aztec/types/contracts'; /** * Represents a Merkle tree of functions for a particular Contract Class. diff --git a/yarn-project/pxe/src/database/contracts/contract_artifact_db.ts b/yarn-project/pxe/src/database/contracts/contract_artifact_db.ts index e49d96c061c7..1bf9d4519a23 100644 --- a/yarn-project/pxe/src/database/contracts/contract_artifact_db.ts +++ b/yarn-project/pxe/src/database/contracts/contract_artifact_db.ts @@ -1,4 +1,4 @@ -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractArtifact } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; /** diff --git a/yarn-project/pxe/src/database/contracts/contract_instance_db.ts b/yarn-project/pxe/src/database/contracts/contract_instance_db.ts index 0fbd06963844..4a5ffdda4650 100644 --- a/yarn-project/pxe/src/database/contracts/contract_instance_db.ts +++ b/yarn-project/pxe/src/database/contracts/contract_instance_db.ts @@ -1,5 +1,5 @@ import { AztecAddress } from '@aztec/circuits.js'; -import { ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type ContractInstanceWithAddress } from '@aztec/types/contracts'; /** * PXE database for managing contract instances. diff --git a/yarn-project/pxe/src/database/deferred_note_dao.ts b/yarn-project/pxe/src/database/deferred_note_dao.ts index 06354bb4074c..d45d179e5b28 100644 --- a/yarn-project/pxe/src/database/deferred_note_dao.ts +++ b/yarn-project/pxe/src/database/deferred_note_dao.ts @@ -1,5 +1,5 @@ import { Note, TxHash } from '@aztec/circuit-types'; -import { AztecAddress, Fr, Point, PublicKey, Vector } from '@aztec/circuits.js'; +import { AztecAddress, Fr, Point, type PublicKey, Vector } from '@aztec/circuits.js'; import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; /** diff --git a/yarn-project/pxe/src/database/kv_pxe_database.ts b/yarn-project/pxe/src/database/kv_pxe_database.ts index 8fabdf148729..5768a05af165 100644 --- a/yarn-project/pxe/src/database/kv_pxe_database.ts +++ b/yarn-project/pxe/src/database/kv_pxe_database.ts @@ -1,15 +1,21 @@ -import { MerkleTreeId, NoteFilter, NoteStatus, PublicKey } from '@aztec/circuit-types'; +import { MerkleTreeId, type NoteFilter, NoteStatus, type PublicKey } from '@aztec/circuit-types'; import { AztecAddress, CompleteAddress, Header } from '@aztec/circuits.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractArtifact } from '@aztec/foundation/abi'; import { toBufferBE } from '@aztec/foundation/bigint-buffer'; import { Fr, Point } from '@aztec/foundation/fields'; -import { AztecArray, AztecKVStore, AztecMap, AztecMultiMap, AztecSingleton } from '@aztec/kv-store'; +import { + type AztecArray, + type AztecKVStore, + type AztecMap, + type AztecMultiMap, + type AztecSingleton, +} from '@aztec/kv-store'; import { contractArtifactFromBuffer, contractArtifactToBuffer } from '@aztec/types/abi'; -import { ContractInstanceWithAddress, SerializableContractInstance } from '@aztec/types/contracts'; +import { type ContractInstanceWithAddress, SerializableContractInstance } from '@aztec/types/contracts'; import { DeferredNoteDao } from './deferred_note_dao.js'; import { NoteDao } from './note_dao.js'; -import { PxeDatabase } from './pxe_database.js'; +import { type PxeDatabase } from './pxe_database.js'; /** * A PXE database backed by LMDB. diff --git a/yarn-project/pxe/src/database/note_dao.ts b/yarn-project/pxe/src/database/note_dao.ts index 5ca513111823..5717a668451c 100644 --- a/yarn-project/pxe/src/database/note_dao.ts +++ b/yarn-project/pxe/src/database/note_dao.ts @@ -1,8 +1,8 @@ import { Note, TxHash } from '@aztec/circuit-types'; -import { AztecAddress, Fr, Point, PublicKey } from '@aztec/circuits.js'; +import { AztecAddress, Fr, Point, type PublicKey } from '@aztec/circuits.js'; import { toBigIntBE } from '@aztec/foundation/bigint-buffer'; import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; -import { NoteData } from '@aztec/simulator'; +import { type NoteData } from '@aztec/simulator'; /** * A note with contextual data. diff --git a/yarn-project/pxe/src/database/pxe_database.ts b/yarn-project/pxe/src/database/pxe_database.ts index a755f7103319..bf61d9d18d2b 100644 --- a/yarn-project/pxe/src/database/pxe_database.ts +++ b/yarn-project/pxe/src/database/pxe_database.ts @@ -1,12 +1,12 @@ -import { NoteFilter } from '@aztec/circuit-types'; -import { CompleteAddress, Header, PublicKey } from '@aztec/circuits.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type NoteFilter } from '@aztec/circuit-types'; +import { CompleteAddress, Header, type PublicKey } from '@aztec/circuits.js'; +import { type ContractArtifact } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; -import { ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type ContractInstanceWithAddress } from '@aztec/types/contracts'; -import { ContractArtifactDatabase } from './contracts/contract_artifact_db.js'; -import { ContractInstanceDatabase } from './contracts/contract_instance_db.js'; +import { type ContractArtifactDatabase } from './contracts/contract_artifact_db.js'; +import { type ContractInstanceDatabase } from './contracts/contract_instance_db.js'; import { DeferredNoteDao } from './deferred_note_dao.js'; import { NoteDao } from './note_dao.js'; diff --git a/yarn-project/pxe/src/database/pxe_database_test_suite.ts b/yarn-project/pxe/src/database/pxe_database_test_suite.ts index 7ee0a403ebec..5529b5c58711 100644 --- a/yarn-project/pxe/src/database/pxe_database_test_suite.ts +++ b/yarn-project/pxe/src/database/pxe_database_test_suite.ts @@ -1,4 +1,4 @@ -import { NoteFilter, NoteStatus, randomTxHash } from '@aztec/circuit-types'; +import { type NoteFilter, NoteStatus, randomTxHash } from '@aztec/circuit-types'; import { AztecAddress, CompleteAddress, INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js'; import { makeHeader } from '@aztec/circuits.js/testing'; import { randomInt } from '@aztec/foundation/crypto'; @@ -8,7 +8,7 @@ import { SerializableContractInstance } from '@aztec/types/contracts'; import { NoteDao } from './note_dao.js'; import { randomNoteDao } from './note_dao.test.js'; -import { PxeDatabase } from './pxe_database.js'; +import { type PxeDatabase } from './pxe_database.js'; /** * A common test suite for a PXE database. diff --git a/yarn-project/pxe/src/index.ts b/yarn-project/pxe/src/index.ts index d7cf6d57253a..b635bef39bcb 100644 --- a/yarn-project/pxe/src/index.ts +++ b/yarn-project/pxe/src/index.ts @@ -4,7 +4,7 @@ export * from './config/index.js'; export { Tx, TxHash } from '@aztec/circuit-types'; -export { TxRequest, PartialAddress } from '@aztec/circuits.js'; +export { TxRequest, type PartialAddress } from '@aztec/circuits.js'; export * from '@aztec/foundation/fields'; export * from '@aztec/foundation/eth-address'; export * from '@aztec/foundation/aztec-address'; diff --git a/yarn-project/pxe/src/kernel_oracle/index.ts b/yarn-project/pxe/src/kernel_oracle/index.ts index d37b84338cd3..056041d73f58 100644 --- a/yarn-project/pxe/src/kernel_oracle/index.ts +++ b/yarn-project/pxe/src/kernel_oracle/index.ts @@ -1,4 +1,4 @@ -import { AztecNode, KeyStore } from '@aztec/circuit-types'; +import { type AztecNode, type KeyStore } from '@aztec/circuit-types'; import { AztecAddress, Fr, @@ -9,10 +9,10 @@ import { computeContractClassIdPreimage, computeSaltedInitializationHash, } from '@aztec/circuits.js'; -import { Tuple } from '@aztec/foundation/serialize'; +import { type Tuple } from '@aztec/foundation/serialize'; import { ContractDataOracle } from '../contract_data_oracle/index.js'; -import { ProvingDataOracle } from './../kernel_prover/proving_data_oracle.js'; +import { type ProvingDataOracle } from './../kernel_prover/proving_data_oracle.js'; // TODO: Block number should not be "latest". // It should be fixed at the time the proof is being simulated. I.e., it should be the same as the value defined in the constant data. diff --git a/yarn-project/pxe/src/kernel_prover/hints_builder.ts b/yarn-project/pxe/src/kernel_prover/hints_builder.ts index eb7ee4519632..8704475372af 100644 --- a/yarn-project/pxe/src/kernel_prover/hints_builder.ts +++ b/yarn-project/pxe/src/kernel_prover/hints_builder.ts @@ -12,13 +12,13 @@ import { ReadRequestContext, SideEffect, SideEffectLinkedToNoteHash, - SideEffectType, + type SideEffectType, buildNullifierReadRequestHints, } from '@aztec/circuits.js'; import { makeTuple } from '@aztec/foundation/array'; -import { Tuple } from '@aztec/foundation/serialize'; +import { type Tuple } from '@aztec/foundation/serialize'; -import { ProvingDataOracle } from './proving_data_oracle.js'; +import { type ProvingDataOracle } from './proving_data_oracle.js'; export class HintsBuilder { constructor(private oracle: ProvingDataOracle) {} diff --git a/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts b/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts index 27ca152a1812..a30a7a524140 100644 --- a/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts +++ b/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts @@ -22,13 +22,13 @@ import { makeTxRequest } from '@aztec/circuits.js/testing'; import { makeTuple } from '@aztec/foundation/array'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; -import { ExecutionResult, NoteAndSlot } from '@aztec/simulator'; +import { type ExecutionResult, type NoteAndSlot } from '@aztec/simulator'; import { mock } from 'jest-mock-extended'; -import { KernelProver, OutputNoteData } from './kernel_prover.js'; -import { ProofCreator } from './proof_creator.js'; -import { ProvingDataOracle } from './proving_data_oracle.js'; +import { KernelProver, type OutputNoteData } from './kernel_prover.js'; +import { type ProofCreator } from './proof_creator.js'; +import { type ProvingDataOracle } from './proving_data_oracle.js'; describe('Kernel Prover', () => { let txRequest: TxRequest; diff --git a/yarn-project/pxe/src/kernel_prover/kernel_prover.ts b/yarn-project/pxe/src/kernel_prover/kernel_prover.ts index f2d8e65ad937..784411245e39 100644 --- a/yarn-project/pxe/src/kernel_prover/kernel_prover.ts +++ b/yarn-project/pxe/src/kernel_prover/kernel_prover.ts @@ -26,11 +26,11 @@ import { padArrayEnd } from '@aztec/foundation/collection'; import { createDebugLogger } from '@aztec/foundation/log'; import { assertLength, mapTuple } from '@aztec/foundation/serialize'; import { pushTestData } from '@aztec/foundation/testing'; -import { ExecutionResult, NoteAndSlot } from '@aztec/simulator'; +import { type ExecutionResult, type NoteAndSlot } from '@aztec/simulator'; import { HintsBuilder } from './hints_builder.js'; -import { KernelProofCreator, ProofCreator, ProofOutput, ProofOutputFinal } from './proof_creator.js'; -import { ProvingDataOracle } from './proving_data_oracle.js'; +import { KernelProofCreator, type ProofCreator, type ProofOutput, type ProofOutputFinal } from './proof_creator.js'; +import { type ProvingDataOracle } from './proving_data_oracle.js'; /** * Represents an output note data object. diff --git a/yarn-project/pxe/src/kernel_prover/proof_creator.ts b/yarn-project/pxe/src/kernel_prover/proof_creator.ts index 6dfabdc06421..6e4b0359fac4 100644 --- a/yarn-project/pxe/src/kernel_prover/proof_creator.ts +++ b/yarn-project/pxe/src/kernel_prover/proof_creator.ts @@ -1,4 +1,4 @@ -import { CircuitSimulationStats } from '@aztec/circuit-types/stats'; +import { type CircuitSimulationStats } from '@aztec/circuit-types/stats'; import { PrivateCircuitPublicInputs, PrivateKernelInitCircuitPrivateInputs, diff --git a/yarn-project/pxe/src/kernel_prover/proving_data_oracle.ts b/yarn-project/pxe/src/kernel_prover/proving_data_oracle.ts index 2126f70e38d3..a094315f2080 100644 --- a/yarn-project/pxe/src/kernel_prover/proving_data_oracle.ts +++ b/yarn-project/pxe/src/kernel_prover/proving_data_oracle.ts @@ -3,7 +3,7 @@ import { FUNCTION_TREE_HEIGHT, Fr, FunctionSelector, - GrumpkinPrivateKey, + type GrumpkinPrivateKey, MembershipWitness, NOTE_HASH_TREE_HEIGHT, Point, diff --git a/yarn-project/pxe/src/note_processor/note_processor.test.ts b/yarn-project/pxe/src/note_processor/note_processor.test.ts index 3f026ce3a9d0..cbed0d9259cd 100644 --- a/yarn-project/pxe/src/note_processor/note_processor.test.ts +++ b/yarn-project/pxe/src/note_processor/note_processor.test.ts @@ -1,11 +1,11 @@ import { - AztecNode, + type AztecNode, EncryptedFunctionL2Logs, EncryptedL2BlockL2Logs, EncryptedL2Log, EncryptedTxL2Logs, - KeyPair, - KeyStore, + type KeyPair, + type KeyStore, L1NotePayload, L2Block, L2BlockContext, @@ -15,15 +15,15 @@ import { Fr, INITIAL_L2_BLOCK_NUM, MAX_NEW_NOTE_HASHES_PER_TX } from '@aztec/cir import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { pedersenHash } from '@aztec/foundation/crypto'; import { Point } from '@aztec/foundation/fields'; -import { Tuple } from '@aztec/foundation/serialize'; +import { type Tuple } from '@aztec/foundation/serialize'; import { ConstantKeyPair } from '@aztec/key-store'; import { openTmpStore } from '@aztec/kv-store/utils'; import { AcirSimulator } from '@aztec/simulator'; import { jest } from '@jest/globals'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; -import { PxeDatabase } from '../database/index.js'; +import { type PxeDatabase } from '../database/index.js'; import { KVPxeDatabase } from '../database/kv_pxe_database.js'; import { NoteDao } from '../database/note_dao.js'; import { NoteProcessor } from './note_processor.js'; diff --git a/yarn-project/pxe/src/note_processor/note_processor.ts b/yarn-project/pxe/src/note_processor/note_processor.ts index 7edfe6e5b09c..2be3060b983e 100644 --- a/yarn-project/pxe/src/note_processor/note_processor.ts +++ b/yarn-project/pxe/src/note_processor/note_processor.ts @@ -1,13 +1,13 @@ import { - AztecNode, + type AztecNode, EncryptedL2BlockL2Logs, - KeyStore, + type KeyStore, L1NotePayload, L2BlockContext, TaggedNote, } from '@aztec/circuit-types'; -import { NoteProcessorStats } from '@aztec/circuit-types/stats'; -import { INITIAL_L2_BLOCK_NUM, MAX_NEW_NOTE_HASHES_PER_TX, PublicKey } from '@aztec/circuits.js'; +import { type NoteProcessorStats } from '@aztec/circuit-types/stats'; +import { INITIAL_L2_BLOCK_NUM, MAX_NEW_NOTE_HASHES_PER_TX, type PublicKey } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; @@ -15,7 +15,7 @@ import { Timer } from '@aztec/foundation/timer'; import { ContractNotFoundError } from '@aztec/simulator'; import { DeferredNoteDao } from '../database/deferred_note_dao.js'; -import { PxeDatabase } from '../database/index.js'; +import { type PxeDatabase } from '../database/index.js'; import { NoteDao } from '../database/note_dao.js'; import { getAcirSimulator } from '../simulator/index.js'; import { produceNoteDao } from './produce_note_dao.js'; diff --git a/yarn-project/pxe/src/note_processor/produce_note_dao.ts b/yarn-project/pxe/src/note_processor/produce_note_dao.ts index 396012a4ee93..60fd741d14a4 100644 --- a/yarn-project/pxe/src/note_processor/produce_note_dao.ts +++ b/yarn-project/pxe/src/note_processor/produce_note_dao.ts @@ -1,5 +1,5 @@ import { L1NotePayload, TxHash } from '@aztec/circuit-types'; -import { Fr, PublicKey } from '@aztec/circuits.js'; +import { Fr, type PublicKey } from '@aztec/circuits.js'; import { computeCommitmentNonce, siloNullifier } from '@aztec/circuits.js/hash'; import { AcirSimulator } from '@aztec/simulator'; diff --git a/yarn-project/pxe/src/pxe_http/pxe_http_server.ts b/yarn-project/pxe/src/pxe_http/pxe_http_server.ts index ef91f7836be8..955d4ae80d71 100644 --- a/yarn-project/pxe/src/pxe_http/pxe_http_server.ts +++ b/yarn-project/pxe/src/pxe_http/pxe_http_server.ts @@ -8,7 +8,7 @@ import { LogId, Note, NullifierMembershipWitness, - PXE, + type PXE, Tx, TxEffect, TxExecutionRequest, diff --git a/yarn-project/pxe/src/pxe_service/create_pxe_service.ts b/yarn-project/pxe/src/pxe_service/create_pxe_service.ts index 12813a382b17..7daead96c667 100644 --- a/yarn-project/pxe/src/pxe_service/create_pxe_service.ts +++ b/yarn-project/pxe/src/pxe_service/create_pxe_service.ts @@ -1,4 +1,4 @@ -import { AztecNode } from '@aztec/circuit-types'; +import { type AztecNode } from '@aztec/circuit-types'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { randomBytes } from '@aztec/foundation/crypto'; import { TestKeyStore } from '@aztec/key-store'; @@ -11,7 +11,7 @@ import { getCanonicalMultiCallEntrypointContract } from '@aztec/protocol-contrac import { join } from 'path'; -import { PXEServiceConfig } from '../config/index.js'; +import { type PXEServiceConfig } from '../config/index.js'; import { KVPxeDatabase } from '../database/kv_pxe_database.js'; import { PXEService } from './pxe_service.js'; diff --git a/yarn-project/pxe/src/pxe_service/pxe_service.ts b/yarn-project/pxe/src/pxe_service/pxe_service.ts index 21e03cccf7d8..76b54747be4a 100644 --- a/yarn-project/pxe/src/pxe_service/pxe_service.ts +++ b/yarn-project/pxe/src/pxe_service/pxe_service.ts @@ -1,16 +1,16 @@ import { AuthWitness, - AztecNode, + type AztecNode, EncryptedTxL2Logs, ExtendedNote, - FunctionCall, - GetUnencryptedLogsResponse, - KeyStore, + type FunctionCall, + type GetUnencryptedLogsResponse, + type KeyStore, L2Block, - LogFilter, + type LogFilter, MerkleTreeId, - NoteFilter, - PXE, + type NoteFilter, + type PXE, SimulationError, Tx, TxEffect, @@ -20,42 +20,42 @@ import { UnencryptedTxL2Logs, isNoirCallStackUnresolved, } from '@aztec/circuit-types'; -import { TxPXEProcessingStats } from '@aztec/circuit-types/stats'; +import { type TxPXEProcessingStats } from '@aztec/circuit-types/stats'; import { AztecAddress, CallRequest, CompleteAddress, FunctionData, - GrumpkinPrivateKey, + type GrumpkinPrivateKey, MAX_NON_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX, MAX_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX, - PartialAddress, + type PartialAddress, PrivateKernelTailCircuitPublicInputs, PublicCallRequest, computeContractClassId, getContractClassFromArtifact, } from '@aztec/circuits.js'; import { computeCommitmentNonce, siloNullifier } from '@aztec/circuits.js/hash'; -import { ContractArtifact, DecodedReturn, FunctionSelector, encodeArguments } from '@aztec/foundation/abi'; +import { type ContractArtifact, type DecodedReturn, FunctionSelector, encodeArguments } from '@aztec/foundation/abi'; import { arrayNonEmptyLength, padArrayEnd } from '@aztec/foundation/collection'; import { Fr } from '@aztec/foundation/fields'; import { SerialQueue } from '@aztec/foundation/fifo'; -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; +import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log'; import { Timer } from '@aztec/foundation/timer'; import { AcirSimulator, - ExecutionResult, + type ExecutionResult, collectEncryptedLogs, collectEnqueuedPublicFunctionCalls, collectUnencryptedLogs, resolveOpcodeLocations, } from '@aztec/simulator'; -import { ContractClassWithId, ContractInstanceWithAddress } from '@aztec/types/contracts'; -import { NodeInfo } from '@aztec/types/interfaces'; +import { type ContractClassWithId, type ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type NodeInfo } from '@aztec/types/interfaces'; -import { PXEServiceConfig, getPackageInfo } from '../config/index.js'; +import { type PXEServiceConfig, getPackageInfo } from '../config/index.js'; import { ContractDataOracle } from '../contract_data_oracle/index.js'; -import { PxeDatabase } from '../database/index.js'; +import { type PxeDatabase } from '../database/index.js'; import { NoteDao } from '../database/note_dao.js'; import { KernelOracle } from '../kernel_oracle/index.js'; import { KernelProver } from '../kernel_prover/kernel_prover.js'; diff --git a/yarn-project/pxe/src/pxe_service/test/pxe_service.test.ts b/yarn-project/pxe/src/pxe_service/test/pxe_service.test.ts index fcb41bd90148..bbef70b77bab 100644 --- a/yarn-project/pxe/src/pxe_service/test/pxe_service.test.ts +++ b/yarn-project/pxe/src/pxe_service/test/pxe_service.test.ts @@ -1,16 +1,16 @@ -import { AztecNode, PXE, TxEffect, mockTx } from '@aztec/circuit-types'; +import { type AztecNode, type PXE, TxEffect, mockTx } from '@aztec/circuit-types'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js/constants'; -import { L1ContractAddresses } from '@aztec/ethereum'; +import { type L1ContractAddresses } from '@aztec/ethereum'; import { EthAddress } from '@aztec/foundation/eth-address'; import { TestKeyStore } from '@aztec/key-store'; import { openTmpStore } from '@aztec/kv-store/utils'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; import { KVPxeDatabase } from '../../database/kv_pxe_database.js'; -import { PxeDatabase } from '../../database/pxe_database.js'; -import { PXEServiceConfig } from '../../index.js'; +import { type PxeDatabase } from '../../database/pxe_database.js'; +import { type PXEServiceConfig } from '../../index.js'; import { PXEService } from '../pxe_service.js'; import { pxeTestSuite } from './pxe_test_suite.js'; diff --git a/yarn-project/pxe/src/pxe_service/test/pxe_test_suite.ts b/yarn-project/pxe/src/pxe_service/test/pxe_test_suite.ts index 7c24b72307b4..7eb329c42e31 100644 --- a/yarn-project/pxe/src/pxe_service/test/pxe_test_suite.ts +++ b/yarn-project/pxe/src/pxe_service/test/pxe_test_suite.ts @@ -1,5 +1,5 @@ import { - PXE, + type PXE, TxExecutionRequest, randomContractArtifact, randomContractInstanceWithAddress, diff --git a/yarn-project/pxe/src/simulator/index.ts b/yarn-project/pxe/src/simulator/index.ts index 40d30a9198db..e1a4c8985784 100644 --- a/yarn-project/pxe/src/simulator/index.ts +++ b/yarn-project/pxe/src/simulator/index.ts @@ -1,8 +1,8 @@ -import { AztecNode, KeyStore } from '@aztec/circuit-types'; +import { type AztecNode, type KeyStore } from '@aztec/circuit-types'; import { AcirSimulator } from '@aztec/simulator'; import { ContractDataOracle } from '../contract_data_oracle/index.js'; -import { PxeDatabase } from '../database/pxe_database.js'; +import { type PxeDatabase } from '../database/pxe_database.js'; import { SimulatorOracle } from '../simulator_oracle/index.js'; /** diff --git a/yarn-project/pxe/src/simulator_oracle/index.ts b/yarn-project/pxe/src/simulator_oracle/index.ts index 1be28074b651..84912302fbd3 100644 --- a/yarn-project/pxe/src/simulator_oracle/index.ts +++ b/yarn-project/pxe/src/simulator_oracle/index.ts @@ -1,6 +1,6 @@ import { - AztecNode, - KeyStore, + type AztecNode, + type KeyStore, L2Block, MerkleTreeId, NoteStatus, @@ -18,13 +18,13 @@ import { L1_TO_L2_MSG_TREE_HEIGHT, } from '@aztec/circuits.js'; import { computeL1ToL2MessageNullifier } from '@aztec/circuits.js/hash'; -import { FunctionArtifactWithDebugMetadata, getFunctionArtifactWithDebugMetadata } from '@aztec/foundation/abi'; +import { type FunctionArtifactWithDebugMetadata, getFunctionArtifactWithDebugMetadata } from '@aztec/foundation/abi'; import { createDebugLogger } from '@aztec/foundation/log'; -import { DBOracle, KeyPair, MessageLoadOracleInputs } from '@aztec/simulator'; -import { ContractInstance } from '@aztec/types/contracts'; +import { type DBOracle, type KeyPair, MessageLoadOracleInputs } from '@aztec/simulator'; +import { type ContractInstance } from '@aztec/types/contracts'; import { ContractDataOracle } from '../contract_data_oracle/index.js'; -import { PxeDatabase } from '../database/index.js'; +import { type PxeDatabase } from '../database/index.js'; /** * A data oracle that provides information needed for simulating a transaction. diff --git a/yarn-project/pxe/src/synchronizer/synchronizer.test.ts b/yarn-project/pxe/src/synchronizer/synchronizer.test.ts index 5de7f55dfb81..4bef32a338d5 100644 --- a/yarn-project/pxe/src/synchronizer/synchronizer.test.ts +++ b/yarn-project/pxe/src/synchronizer/synchronizer.test.ts @@ -1,4 +1,4 @@ -import { AztecNode, L2Block } from '@aztec/circuit-types'; +import { type AztecNode, L2Block } from '@aztec/circuit-types'; import { CompleteAddress, Fr, GrumpkinScalar, Header, INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { makeHeader } from '@aztec/circuits.js/testing'; @@ -7,9 +7,9 @@ import { SerialQueue } from '@aztec/foundation/fifo'; import { TestKeyStore } from '@aztec/key-store'; import { openTmpStore } from '@aztec/kv-store/utils'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; -import { PxeDatabase } from '../database/index.js'; +import { type PxeDatabase } from '../database/index.js'; import { KVPxeDatabase } from '../database/kv_pxe_database.js'; import { Synchronizer } from './synchronizer.js'; diff --git a/yarn-project/pxe/src/synchronizer/synchronizer.ts b/yarn-project/pxe/src/synchronizer/synchronizer.ts index 7ae66192402b..d058c088c2c7 100644 --- a/yarn-project/pxe/src/synchronizer/synchronizer.ts +++ b/yarn-project/pxe/src/synchronizer/synchronizer.ts @@ -1,12 +1,19 @@ -import { AztecNode, KeyStore, L2BlockContext, L2BlockL2Logs, MerkleTreeId, TxHash } from '@aztec/circuit-types'; -import { NoteProcessorCaughtUpStats } from '@aztec/circuit-types/stats'; -import { AztecAddress, Fr, INITIAL_L2_BLOCK_NUM, PublicKey } from '@aztec/circuits.js'; +import { + type AztecNode, + type KeyStore, + L2BlockContext, + L2BlockL2Logs, + MerkleTreeId, + TxHash, +} from '@aztec/circuit-types'; +import { type NoteProcessorCaughtUpStats } from '@aztec/circuit-types/stats'; +import { AztecAddress, Fr, INITIAL_L2_BLOCK_NUM, type PublicKey } from '@aztec/circuits.js'; import { SerialQueue } from '@aztec/foundation/fifo'; -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; +import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log'; import { RunningPromise } from '@aztec/foundation/running-promise'; import { DeferredNoteDao } from '../database/deferred_note_dao.js'; -import { PxeDatabase } from '../database/index.js'; +import { type PxeDatabase } from '../database/index.js'; import { NoteDao } from '../database/note_dao.js'; import { NoteProcessor } from '../note_processor/index.js'; diff --git a/yarn-project/scripts/add_verbatim_types.sh b/yarn-project/scripts/add_verbatim_types.sh new file mode 100755 index 000000000000..30efaeabccec --- /dev/null +++ b/yarn-project/scripts/add_verbatim_types.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +while true; do + declare -A processed + processed=() + lines=$(yarn tsc -b 2>&1 | grep -E "error TS(1484|1205)" | awk -F'[:,()]' '{print $1 " " $2 " " $3}'); + + [ -z "$lines" ] && exit + + while IFS=' ' read -r file line N; do + key="$file:$line" + if [[ -n "${processed[$key]}" ]]; then + continue + fi + processed[$key]=1 + # echo $file $line $N + echo -n "$file: " + sed -n "${line}p" "$file" + sed -i "${line}s/^\(.\{$((N-1))\}\)/\1type /" "$file" + echo -n "$file: " + sed -n "${line}p" "$file" + echo + done <<< "$lines" +done diff --git a/yarn-project/scripts/src/benchmarks/aggregate.ts b/yarn-project/scripts/src/benchmarks/aggregate.ts index 528dda9b2ca3..ce1d89054638 100644 --- a/yarn-project/scripts/src/benchmarks/aggregate.ts +++ b/yarn-project/scripts/src/benchmarks/aggregate.ts @@ -12,21 +12,21 @@ import { BENCHMARK_BLOCK_SIZES, BENCHMARK_HISTORY_BLOCK_SIZE, BENCHMARK_HISTORY_CHAIN_LENGTHS, - BenchmarkMetricResults, - BenchmarkResults, - BenchmarkResultsWithTimestamp, - CircuitSimulationStats, - L1PublishStats, - L2BlockBuiltStats, - L2BlockHandledStats, - MetricName, - NodeSyncedChainHistoryStats, - NoteProcessorCaughtUpStats, - Stats, - TreeInsertionStats, - TxAddedToPoolStats, - TxPXEProcessingStats, - TxSequencerProcessingStats, + type BenchmarkMetricResults, + type BenchmarkResults, + type BenchmarkResultsWithTimestamp, + type CircuitSimulationStats, + type L1PublishStats, + type L2BlockBuiltStats, + type L2BlockHandledStats, + type MetricName, + type NodeSyncedChainHistoryStats, + type NoteProcessorCaughtUpStats, + type Stats, + type TreeInsertionStats, + type TxAddedToPoolStats, + type TxPXEProcessingStats, + type TxSequencerProcessingStats, } from '@aztec/circuit-types/stats'; import { createConsoleLogger } from '@aztec/foundation/log'; diff --git a/yarn-project/sequencer-client/src/client/sequencer-client.ts b/yarn-project/sequencer-client/src/client/sequencer-client.ts index 79a96f8fe14f..3cbf36567845 100644 --- a/yarn-project/sequencer-client/src/client/sequencer-client.ts +++ b/yarn-project/sequencer-client/src/client/sequencer-client.ts @@ -1,14 +1,14 @@ -import { L1ToL2MessageSource, L2BlockSource } from '@aztec/circuit-types'; -import { BlockProver } from '@aztec/circuit-types/interfaces'; -import { P2P } from '@aztec/p2p'; -import { SimulationProvider } from '@aztec/simulator'; -import { ContractDataSource } from '@aztec/types/contracts'; -import { WorldStateSynchronizer } from '@aztec/world-state'; +import { type L1ToL2MessageSource, type L2BlockSource } from '@aztec/circuit-types'; +import { type BlockProver } from '@aztec/circuit-types/interfaces'; +import { type P2P } from '@aztec/p2p'; +import { type SimulationProvider } from '@aztec/simulator'; +import { type ContractDataSource } from '@aztec/types/contracts'; +import { type WorldStateSynchronizer } from '@aztec/world-state'; -import { SequencerClientConfig } from '../config.js'; +import { type SequencerClientConfig } from '../config.js'; import { getGlobalVariableBuilder } from '../global_variable_builder/index.js'; import { getL1Publisher } from '../publisher/index.js'; -import { Sequencer, SequencerConfig } from '../sequencer/index.js'; +import { Sequencer, type SequencerConfig } from '../sequencer/index.js'; import { PublicProcessorFactory } from '../sequencer/public_processor.js'; import { TxValidatorFactory } from '../sequencer/tx_validator_factory.js'; diff --git a/yarn-project/sequencer-client/src/config.ts b/yarn-project/sequencer-client/src/config.ts index f54dabbe3a9e..b86863b9393d 100644 --- a/yarn-project/sequencer-client/src/config.ts +++ b/yarn-project/sequencer-client/src/config.ts @@ -1,12 +1,12 @@ import { AztecAddress, Fr } from '@aztec/circuits.js'; -import { L1ContractAddresses, NULL_KEY } from '@aztec/ethereum'; +import { type L1ContractAddresses, NULL_KEY } from '@aztec/ethereum'; import { EthAddress } from '@aztec/foundation/eth-address'; -import { Hex } from 'viem'; +import { type Hex } from 'viem'; -import { GlobalReaderConfig } from './global_variable_builder/index.js'; -import { PublisherConfig, TxSenderConfig } from './publisher/config.js'; -import { SequencerConfig } from './sequencer/config.js'; +import { type GlobalReaderConfig } from './global_variable_builder/index.js'; +import { type PublisherConfig, type TxSenderConfig } from './publisher/config.js'; +import { type SequencerConfig } from './sequencer/config.js'; /** Chain configuration. */ type ChainConfig = { diff --git a/yarn-project/sequencer-client/src/global_variable_builder/config.ts b/yarn-project/sequencer-client/src/global_variable_builder/config.ts index 2884374561a9..156b0c38c939 100644 --- a/yarn-project/sequencer-client/src/global_variable_builder/config.ts +++ b/yarn-project/sequencer-client/src/global_variable_builder/config.ts @@ -1,4 +1,4 @@ -import { L1ContractAddresses } from '@aztec/ethereum'; +import { type L1ContractAddresses } from '@aztec/ethereum'; /** * Configuration of the L1GlobalReader. diff --git a/yarn-project/sequencer-client/src/global_variable_builder/index.ts b/yarn-project/sequencer-client/src/global_variable_builder/index.ts index 91ab6caecb8f..8fee1ff98b44 100644 --- a/yarn-project/sequencer-client/src/global_variable_builder/index.ts +++ b/yarn-project/sequencer-client/src/global_variable_builder/index.ts @@ -1,10 +1,10 @@ -import { GlobalReaderConfig } from './config.js'; -import { GlobalVariableBuilder, SimpleTestGlobalVariableBuilder } from './global_builder.js'; +import { type GlobalReaderConfig } from './config.js'; +import { type GlobalVariableBuilder, SimpleTestGlobalVariableBuilder } from './global_builder.js'; import { ViemReader } from './viem-reader.js'; export { SimpleTestGlobalVariableBuilder as SimpleGlobalVariableBuilder } from './global_builder.js'; -export { GlobalReaderConfig } from './config.js'; -export { GlobalVariableBuilder } from './global_builder.js'; +export { type GlobalReaderConfig } from './config.js'; +export { type GlobalVariableBuilder } from './global_builder.js'; /** * Returns a new instance of the global variable builder. diff --git a/yarn-project/sequencer-client/src/global_variable_builder/viem-reader.ts b/yarn-project/sequencer-client/src/global_variable_builder/viem-reader.ts index 363e63ed8d11..1a354c4c2a36 100644 --- a/yarn-project/sequencer-client/src/global_variable_builder/viem-reader.ts +++ b/yarn-project/sequencer-client/src/global_variable_builder/viem-reader.ts @@ -2,9 +2,9 @@ import { createEthereumChain } from '@aztec/ethereum'; import { RollupAbi } from '@aztec/l1-artifacts'; import { - GetContractReturnType, - HttpTransport, - PublicClient, + type GetContractReturnType, + type HttpTransport, + type PublicClient, createPublicClient, getAddress, getContract, @@ -12,8 +12,8 @@ import { } from 'viem'; import * as chains from 'viem/chains'; -import { GlobalReaderConfig } from './config.js'; -import { L1GlobalReader } from './global_builder.js'; +import { type GlobalReaderConfig } from './config.js'; +import { type L1GlobalReader } from './global_builder.js'; /** * Reads values from L1 state using viem. diff --git a/yarn-project/sequencer-client/src/publisher/config.ts b/yarn-project/sequencer-client/src/publisher/config.ts index 96ad07bd6f15..e78fa7c2d19d 100644 --- a/yarn-project/sequencer-client/src/publisher/config.ts +++ b/yarn-project/sequencer-client/src/publisher/config.ts @@ -1,4 +1,4 @@ -import { L1ContractAddresses } from '@aztec/ethereum'; +import { type L1ContractAddresses } from '@aztec/ethereum'; /** * The configuration of the rollup transaction publisher. diff --git a/yarn-project/sequencer-client/src/publisher/index.ts b/yarn-project/sequencer-client/src/publisher/index.ts index 9fd03d258802..77ed3da15917 100644 --- a/yarn-project/sequencer-client/src/publisher/index.ts +++ b/yarn-project/sequencer-client/src/publisher/index.ts @@ -1,9 +1,9 @@ -import { PublisherConfig, TxSenderConfig } from './config.js'; +import { type PublisherConfig, type TxSenderConfig } from './config.js'; import { L1Publisher } from './l1-publisher.js'; import { ViemTxSender } from './viem-tx-sender.js'; export { L1Publisher } from './l1-publisher.js'; -export { PublisherConfig } from './config.js'; +export { type PublisherConfig } from './config.js'; /** * Returns a new instance of the L1Publisher. diff --git a/yarn-project/sequencer-client/src/publisher/l1-publisher.test.ts b/yarn-project/sequencer-client/src/publisher/l1-publisher.test.ts index d66e92757df0..9cedeee91223 100644 --- a/yarn-project/sequencer-client/src/publisher/l1-publisher.test.ts +++ b/yarn-project/sequencer-client/src/publisher/l1-publisher.test.ts @@ -1,9 +1,9 @@ import { L2Block } from '@aztec/circuit-types'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; import { sleep } from '../utils.js'; -import { L1Publisher, L1PublisherTxSender, MinimalTransactionReceipt } from './l1-publisher.js'; +import { L1Publisher, type L1PublisherTxSender, type MinimalTransactionReceipt } from './l1-publisher.js'; describe('L1Publisher', () => { let txSender: MockProxy; diff --git a/yarn-project/sequencer-client/src/publisher/l1-publisher.ts b/yarn-project/sequencer-client/src/publisher/l1-publisher.ts index 4fb6a11fcb2e..90e49fdfac06 100644 --- a/yarn-project/sequencer-client/src/publisher/l1-publisher.ts +++ b/yarn-project/sequencer-client/src/publisher/l1-publisher.ts @@ -1,12 +1,12 @@ import { L2Block } from '@aztec/circuit-types'; -import { L1PublishStats } from '@aztec/circuit-types/stats'; +import { type L1PublishStats } from '@aztec/circuit-types/stats'; import { createDebugLogger } from '@aztec/foundation/log'; import { InterruptibleSleep } from '@aztec/foundation/sleep'; import pick from 'lodash.pick'; -import { L2BlockReceiver } from '../receiver.js'; -import { PublisherConfig } from './config.js'; +import { type L2BlockReceiver } from '../receiver.js'; +import { type PublisherConfig } from './config.js'; /** * Stats for a sent transaction. diff --git a/yarn-project/sequencer-client/src/publisher/viem-tx-sender.ts b/yarn-project/sequencer-client/src/publisher/viem-tx-sender.ts index f703a22af69d..30a1b78d7cc3 100644 --- a/yarn-project/sequencer-client/src/publisher/viem-tx-sender.ts +++ b/yarn-project/sequencer-client/src/publisher/viem-tx-sender.ts @@ -4,11 +4,11 @@ import { createDebugLogger } from '@aztec/foundation/log'; import { AvailabilityOracleAbi, RollupAbi } from '@aztec/l1-artifacts'; import { - GetContractReturnType, - Hex, - HttpTransport, - PublicClient, - WalletClient, + type GetContractReturnType, + type Hex, + type HttpTransport, + type PublicClient, + type WalletClient, createPublicClient, createWalletClient, getAddress, @@ -16,15 +16,15 @@ import { hexToBytes, http, } from 'viem'; -import { PrivateKeyAccount, privateKeyToAccount } from 'viem/accounts'; +import { type PrivateKeyAccount, privateKeyToAccount } from 'viem/accounts'; import * as chains from 'viem/chains'; -import { TxSenderConfig } from './config.js'; +import { type TxSenderConfig } from './config.js'; import { - L1PublisherTxSender, - MinimalTransactionReceipt, - L1ProcessArgs as ProcessTxArgs, - TransactionStats, + type L1PublisherTxSender, + type MinimalTransactionReceipt, + type L1ProcessArgs as ProcessTxArgs, + type TransactionStats, } from './l1-publisher.js'; /** diff --git a/yarn-project/sequencer-client/src/sequencer/abstract_phase_manager.ts b/yarn-project/sequencer-client/src/sequencer/abstract_phase_manager.ts index 6508ec266184..4a0807175d8a 100644 --- a/yarn-project/sequencer-client/src/sequencer/abstract_phase_manager.ts +++ b/yarn-project/sequencer-client/src/sequencer/abstract_phase_manager.ts @@ -43,19 +43,19 @@ import { } from '@aztec/circuits.js'; import { computeVarArgsHash } from '@aztec/circuits.js/hash'; import { arrayNonEmptyLength, padArrayEnd } from '@aztec/foundation/collection'; -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; -import { Tuple } from '@aztec/foundation/serialize'; +import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log'; +import { type Tuple } from '@aztec/foundation/serialize'; import { - PublicExecution, - PublicExecutionResult, + type PublicExecution, + type PublicExecutionResult, PublicExecutor, collectPublicDataReads, collectPublicDataUpdateRequests, isPublicExecutionResult, } from '@aztec/simulator'; -import { MerkleTreeOperations } from '@aztec/world-state'; +import { type MerkleTreeOperations } from '@aztec/world-state'; -import { PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; import { HintsBuilder } from './hints_builder.js'; import { lastSideEffectCounter } from './utils.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/app_logic_phase_manager.ts b/yarn-project/sequencer-client/src/sequencer/app_logic_phase_manager.ts index 9ba3cf971963..a5e134e87298 100644 --- a/yarn-project/sequencer-client/src/sequencer/app_logic_phase_manager.ts +++ b/yarn-project/sequencer-client/src/sequencer/app_logic_phase_manager.ts @@ -1,9 +1,9 @@ import { Tx } from '@aztec/circuit-types'; import { GlobalVariables, Header, Proof, PublicKernelCircuitPublicInputs } from '@aztec/circuits.js'; -import { PublicExecutor, PublicStateDB } from '@aztec/simulator'; -import { MerkleTreeOperations } from '@aztec/world-state'; +import { PublicExecutor, type PublicStateDB } from '@aztec/simulator'; +import { type MerkleTreeOperations } from '@aztec/world-state'; -import { PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; import { ContractsDataSourcePublicDB } from '../simulator/public_executor.js'; import { AbstractPhaseManager, PublicKernelPhase } from './abstract_phase_manager.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/config.ts b/yarn-project/sequencer-client/src/sequencer/config.ts index 222789119350..b44d2bd14f5b 100644 --- a/yarn-project/sequencer-client/src/sequencer/config.ts +++ b/yarn-project/sequencer-client/src/sequencer/config.ts @@ -1 +1 @@ -export { SequencerConfig } from '@aztec/circuit-types'; +export { type SequencerConfig } from '@aztec/circuit-types'; diff --git a/yarn-project/sequencer-client/src/sequencer/hints_builder.ts b/yarn-project/sequencer-client/src/sequencer/hints_builder.ts index 0a92e862e958..894c788a3599 100644 --- a/yarn-project/sequencer-client/src/sequencer/hints_builder.ts +++ b/yarn-project/sequencer-client/src/sequencer/hints_builder.ts @@ -14,8 +14,8 @@ import { buildNullifierReadRequestHints, concatAccumulatedData, } from '@aztec/circuits.js'; -import { Tuple } from '@aztec/foundation/serialize'; -import { MerkleTreeOperations } from '@aztec/world-state'; +import { type Tuple } from '@aztec/foundation/serialize'; +import { type MerkleTreeOperations } from '@aztec/world-state'; export class HintsBuilder { constructor(private db: MerkleTreeOperations) {} diff --git a/yarn-project/sequencer-client/src/sequencer/phase_manager_factory.ts b/yarn-project/sequencer-client/src/sequencer/phase_manager_factory.ts index 9c34ee17e1dd..c3f6922f89b8 100644 --- a/yarn-project/sequencer-client/src/sequencer/phase_manager_factory.ts +++ b/yarn-project/sequencer-client/src/sequencer/phase_manager_factory.ts @@ -1,9 +1,9 @@ import { Tx } from '@aztec/circuit-types'; import { GlobalVariables, Header, PublicKernelCircuitPublicInputs } from '@aztec/circuits.js'; -import { PublicExecutor, PublicStateDB } from '@aztec/simulator'; -import { MerkleTreeOperations } from '@aztec/world-state'; +import { PublicExecutor, type PublicStateDB } from '@aztec/simulator'; +import { type MerkleTreeOperations } from '@aztec/world-state'; -import { PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; import { ContractsDataSourcePublicDB } from '../simulator/public_executor.js'; import { AbstractPhaseManager, PublicKernelPhase } from './abstract_phase_manager.js'; import { AppLogicPhaseManager } from './app_logic_phase_manager.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/public_processor.test.ts b/yarn-project/sequencer-client/src/sequencer/public_processor.test.ts index 7044472cb53b..486c14167aca 100644 --- a/yarn-project/sequencer-client/src/sequencer/public_processor.test.ts +++ b/yarn-project/sequencer-client/src/sequencer/public_processor.test.ts @@ -1,7 +1,7 @@ import { EncryptedTxL2Logs, - FunctionCall, - ProcessedTx, + type FunctionCall, + type ProcessedTx, PublicDataWrite, SiblingPath, SimulationError, @@ -45,13 +45,13 @@ import { } from '@aztec/circuits.js/testing'; import { makeTuple } from '@aztec/foundation/array'; import { arrayNonEmptyLength, padArrayEnd, times } from '@aztec/foundation/collection'; -import { PublicExecution, PublicExecutionResult, PublicExecutor, WASMSimulator } from '@aztec/simulator'; -import { MerkleTreeOperations, TreeInfo } from '@aztec/world-state'; +import { type PublicExecution, type PublicExecutionResult, PublicExecutor, WASMSimulator } from '@aztec/simulator'; +import { type MerkleTreeOperations, type TreeInfo } from '@aztec/world-state'; import { jest } from '@jest/globals'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; -import { PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; import { ContractsDataSourcePublicDB, WorldStatePublicDB } from '../simulator/public_executor.js'; import { RealPublicKernelCircuitSimulator } from '../simulator/public_kernel.js'; import { PublicProcessor } from './public_processor.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/public_processor.ts b/yarn-project/sequencer-client/src/sequencer/public_processor.ts index bb0b3dfe93aa..e27b3940cc6e 100644 --- a/yarn-project/sequencer-client/src/sequencer/public_processor.ts +++ b/yarn-project/sequencer-client/src/sequencer/public_processor.ts @@ -1,6 +1,6 @@ import { - FailedTx, - ProcessedTx, + type FailedTx, + type ProcessedTx, SimulationError, Tx, getPreviousOutputAndProof, @@ -9,15 +9,15 @@ import { toTxEffect, validateProcessedTx, } from '@aztec/circuit-types'; -import { TxSequencerProcessingStats } from '@aztec/circuit-types/stats'; +import { type TxSequencerProcessingStats } from '@aztec/circuit-types/stats'; import { GlobalVariables, Header } from '@aztec/circuits.js'; import { createDebugLogger } from '@aztec/foundation/log'; import { Timer } from '@aztec/foundation/timer'; -import { PublicExecutor, PublicStateDB, SimulationProvider } from '@aztec/simulator'; -import { ContractDataSource } from '@aztec/types/contracts'; -import { MerkleTreeOperations } from '@aztec/world-state'; +import { PublicExecutor, type PublicStateDB, type SimulationProvider } from '@aztec/simulator'; +import { type ContractDataSource } from '@aztec/types/contracts'; +import { type MerkleTreeOperations } from '@aztec/world-state'; -import { PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; import { ContractsDataSourcePublicDB, WorldStateDB, WorldStatePublicDB } from '../simulator/public_executor.js'; import { RealPublicKernelCircuitSimulator } from '../simulator/public_kernel.js'; import { AbstractPhaseManager } from './abstract_phase_manager.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/sequencer.test.ts b/yarn-project/sequencer-client/src/sequencer/sequencer.test.ts index ed46187cd94c..395953dffbdf 100644 --- a/yarn-project/sequencer-client/src/sequencer/sequencer.test.ts +++ b/yarn-project/sequencer-client/src/sequencer/sequencer.test.ts @@ -1,12 +1,12 @@ import { - L1ToL2MessageSource, + type L1ToL2MessageSource, L2Block, - L2BlockSource, + type L2BlockSource, MerkleTreeId, PROVING_STATUS, - ProverClient, - ProvingSuccess, - ProvingTicket, + type ProverClient, + type ProvingSuccess, + type ProvingTicket, makeEmptyProcessedTx, makeProcessedTx, mockTx, @@ -20,13 +20,13 @@ import { NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, makeEmptyProof, } from '@aztec/circuits.js'; -import { P2P, P2PClientState } from '@aztec/p2p'; -import { ContractDataSource } from '@aztec/types/contracts'; -import { MerkleTreeOperations, WorldStateRunningState, WorldStateSynchronizer } from '@aztec/world-state'; +import { type P2P, P2PClientState } from '@aztec/p2p'; +import { type ContractDataSource } from '@aztec/types/contracts'; +import { type MerkleTreeOperations, WorldStateRunningState, type WorldStateSynchronizer } from '@aztec/world-state'; -import { MockProxy, mock, mockFn } from 'jest-mock-extended'; +import { type MockProxy, mock, mockFn } from 'jest-mock-extended'; -import { GlobalVariableBuilder } from '../global_variable_builder/global_builder.js'; +import { type GlobalVariableBuilder } from '../global_variable_builder/global_builder.js'; import { L1Publisher } from '../index.js'; import { PublicProcessor, PublicProcessorFactory } from './public_processor.js'; import { Sequencer } from './sequencer.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/sequencer.ts b/yarn-project/sequencer-client/src/sequencer/sequencer.ts index 4823f48d3fa6..b1f8711d50c5 100644 --- a/yarn-project/sequencer-client/src/sequencer/sequencer.ts +++ b/yarn-project/sequencer-client/src/sequencer/sequencer.ts @@ -1,17 +1,17 @@ -import { L1ToL2MessageSource, L2Block, L2BlockSource, ProcessedTx, Tx } from '@aztec/circuit-types'; -import { BlockProver, PROVING_STATUS } from '@aztec/circuit-types/interfaces'; -import { L2BlockBuiltStats } from '@aztec/circuit-types/stats'; +import { type L1ToL2MessageSource, L2Block, type L2BlockSource, type ProcessedTx, Tx } from '@aztec/circuit-types'; +import { type BlockProver, PROVING_STATUS } from '@aztec/circuit-types/interfaces'; +import { type L2BlockBuiltStats } from '@aztec/circuit-types/stats'; import { AztecAddress, EthAddress, GlobalVariables } from '@aztec/circuits.js'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; import { RunningPromise } from '@aztec/foundation/running-promise'; import { Timer, elapsed } from '@aztec/foundation/timer'; -import { P2P } from '@aztec/p2p'; -import { WorldStateStatus, WorldStateSynchronizer } from '@aztec/world-state'; +import { type P2P } from '@aztec/p2p'; +import { type WorldStateStatus, type WorldStateSynchronizer } from '@aztec/world-state'; -import { GlobalVariableBuilder } from '../global_variable_builder/global_builder.js'; +import { type GlobalVariableBuilder } from '../global_variable_builder/global_builder.js'; import { L1Publisher } from '../publisher/l1-publisher.js'; -import { SequencerConfig } from './config.js'; +import { type SequencerConfig } from './config.js'; import { PublicProcessorFactory } from './public_processor.js'; import { TxValidator } from './tx_validator.js'; import { TxValidatorFactory } from './tx_validator_factory.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/setup_phase_manager.test.ts b/yarn-project/sequencer-client/src/sequencer/setup_phase_manager.test.ts index 9b198177c624..2435893b0cc6 100644 --- a/yarn-project/sequencer-client/src/sequencer/setup_phase_manager.test.ts +++ b/yarn-project/sequencer-client/src/sequencer/setup_phase_manager.test.ts @@ -8,12 +8,12 @@ import { } from '@aztec/circuits.js'; import { makeTuple } from '@aztec/foundation/array'; import { PublicExecutor } from '@aztec/simulator'; -import { MerkleTreeOperations, TreeInfo } from '@aztec/world-state'; +import { type MerkleTreeOperations, type TreeInfo } from '@aztec/world-state'; import { it } from '@jest/globals'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; -import { PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; import { ContractsDataSourcePublicDB, WorldStatePublicDB } from '../simulator/public_executor.js'; import { SetupPhaseManager } from './setup_phase_manager.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/setup_phase_manager.ts b/yarn-project/sequencer-client/src/sequencer/setup_phase_manager.ts index 76da4e232a66..35001300e9e4 100644 --- a/yarn-project/sequencer-client/src/sequencer/setup_phase_manager.ts +++ b/yarn-project/sequencer-client/src/sequencer/setup_phase_manager.ts @@ -1,9 +1,9 @@ import { Tx } from '@aztec/circuit-types'; import { GlobalVariables, Header, Proof, PublicKernelCircuitPublicInputs } from '@aztec/circuits.js'; -import { PublicExecutor, PublicStateDB } from '@aztec/simulator'; -import { MerkleTreeOperations } from '@aztec/world-state'; +import { PublicExecutor, type PublicStateDB } from '@aztec/simulator'; +import { type MerkleTreeOperations } from '@aztec/world-state'; -import { PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; import { ContractsDataSourcePublicDB } from '../simulator/public_executor.js'; import { AbstractPhaseManager, PublicKernelPhase } from './abstract_phase_manager.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/tail_phase_manager.ts b/yarn-project/sequencer-client/src/sequencer/tail_phase_manager.ts index 0fe236452d97..54eb9eb55a91 100644 --- a/yarn-project/sequencer-client/src/sequencer/tail_phase_manager.ts +++ b/yarn-project/sequencer-client/src/sequencer/tail_phase_manager.ts @@ -1,9 +1,9 @@ import { Tx } from '@aztec/circuit-types'; import { GlobalVariables, Header, Proof, PublicKernelCircuitPublicInputs } from '@aztec/circuits.js'; -import { PublicExecutor, PublicStateDB } from '@aztec/simulator'; -import { MerkleTreeOperations } from '@aztec/world-state'; +import { PublicExecutor, type PublicStateDB } from '@aztec/simulator'; +import { type MerkleTreeOperations } from '@aztec/world-state'; -import { PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; import { ContractsDataSourcePublicDB } from '../simulator/public_executor.js'; import { AbstractPhaseManager, PublicKernelPhase } from './abstract_phase_manager.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/teardown_phase_manager.ts b/yarn-project/sequencer-client/src/sequencer/teardown_phase_manager.ts index ddaaa7c8943e..82c5aa3477bc 100644 --- a/yarn-project/sequencer-client/src/sequencer/teardown_phase_manager.ts +++ b/yarn-project/sequencer-client/src/sequencer/teardown_phase_manager.ts @@ -1,9 +1,9 @@ import { Tx } from '@aztec/circuit-types'; import { GlobalVariables, Header, Proof, PublicKernelCircuitPublicInputs } from '@aztec/circuits.js'; -import { PublicExecutor, PublicStateDB } from '@aztec/simulator'; -import { MerkleTreeOperations } from '@aztec/world-state'; +import { PublicExecutor, type PublicStateDB } from '@aztec/simulator'; +import { type MerkleTreeOperations } from '@aztec/world-state'; -import { PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; import { ContractsDataSourcePublicDB } from '../simulator/public_executor.js'; import { AbstractPhaseManager, PublicKernelPhase } from './abstract_phase_manager.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/tx_validator.test.ts b/yarn-project/sequencer-client/src/sequencer/tx_validator.test.ts index a9f13a430790..5f5d3ed44df9 100644 --- a/yarn-project/sequencer-client/src/sequencer/tx_validator.test.ts +++ b/yarn-project/sequencer-client/src/sequencer/tx_validator.test.ts @@ -16,11 +16,11 @@ import { makeAztecAddress, makeGlobalVariables } from '@aztec/circuits.js/testin import { makeTuple } from '@aztec/foundation/array'; import { pedersenHash } from '@aztec/foundation/crypto'; import { getCanonicalGasTokenAddress } from '@aztec/protocol-contracts/gas-token'; -import { ContractDataSource } from '@aztec/types/contracts'; +import { type ContractDataSource } from '@aztec/types/contracts'; -import { MockProxy, mock, mockFn } from 'jest-mock-extended'; +import { type MockProxy, mock, mockFn } from 'jest-mock-extended'; -import { NullifierSource, PublicStateSource, TxValidator } from './tx_validator.js'; +import { type NullifierSource, type PublicStateSource, TxValidator } from './tx_validator.js'; describe('TxValidator', () => { let validator: TxValidator; diff --git a/yarn-project/sequencer-client/src/sequencer/tx_validator.ts b/yarn-project/sequencer-client/src/sequencer/tx_validator.ts index ac5869655868..328633b7ef82 100644 --- a/yarn-project/sequencer-client/src/sequencer/tx_validator.ts +++ b/yarn-project/sequencer-client/src/sequencer/tx_validator.ts @@ -1,9 +1,9 @@ -import { ProcessedTx, Tx } from '@aztec/circuit-types'; +import { type ProcessedTx, Tx } from '@aztec/circuit-types'; import { AztecAddress, EthAddress, Fr, GlobalVariables, PublicCallRequest } from '@aztec/circuits.js'; import { pedersenHash } from '@aztec/foundation/crypto'; -import { Logger, createDebugLogger } from '@aztec/foundation/log'; +import { type Logger, createDebugLogger } from '@aztec/foundation/log'; import { getCanonicalGasTokenAddress } from '@aztec/protocol-contracts/gas-token'; -import { ContractDataSource } from '@aztec/types/contracts'; +import { type ContractDataSource } from '@aztec/types/contracts'; import { AbstractPhaseManager, PublicKernelPhase } from './abstract_phase_manager.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/tx_validator_factory.ts b/yarn-project/sequencer-client/src/sequencer/tx_validator_factory.ts index 75a7a7b2ce37..d68974bf3e88 100644 --- a/yarn-project/sequencer-client/src/sequencer/tx_validator_factory.ts +++ b/yarn-project/sequencer-client/src/sequencer/tx_validator_factory.ts @@ -1,6 +1,6 @@ import { AztecAddress, EthAddress, Fr, GlobalVariables } from '@aztec/circuits.js'; -import { ContractDataSource } from '@aztec/types/contracts'; -import { MerkleTreeOperations } from '@aztec/world-state'; +import { type ContractDataSource } from '@aztec/types/contracts'; +import { type MerkleTreeOperations } from '@aztec/world-state'; import { WorldStateDB, WorldStatePublicDB } from '../simulator/public_executor.js'; import { TxValidator } from './tx_validator.js'; diff --git a/yarn-project/sequencer-client/src/simulator/public_executor.ts b/yarn-project/sequencer-client/src/simulator/public_executor.ts index 6ff7728fb1d8..f35e5e96440f 100644 --- a/yarn-project/sequencer-client/src/simulator/public_executor.ts +++ b/yarn-project/sequencer-client/src/simulator/public_executor.ts @@ -14,9 +14,18 @@ import { import { computeL1ToL2MessageNullifier, computePublicDataTreeLeafSlot } from '@aztec/circuits.js/hash'; import { createDebugLogger } from '@aztec/foundation/log'; import { getCanonicalClassRegistererAddress } from '@aztec/protocol-contracts/class-registerer'; -import { CommitmentsDB, MessageLoadOracleInputs, PublicContractsDB, PublicStateDB } from '@aztec/simulator'; -import { ContractClassPublic, ContractDataSource, ContractInstanceWithAddress } from '@aztec/types/contracts'; -import { MerkleTreeOperations } from '@aztec/world-state'; +import { + type CommitmentsDB, + MessageLoadOracleInputs, + type PublicContractsDB, + type PublicStateDB, +} from '@aztec/simulator'; +import { + type ContractClassPublic, + type ContractDataSource, + type ContractInstanceWithAddress, +} from '@aztec/types/contracts'; +import { type MerkleTreeOperations } from '@aztec/world-state'; /** * Implements the PublicContractsDB using a ContractDataSource. diff --git a/yarn-project/sequencer-client/src/simulator/public_kernel.ts b/yarn-project/sequencer-client/src/simulator/public_kernel.ts index c60e74b63aea..93c19b6a32b7 100644 --- a/yarn-project/sequencer-client/src/simulator/public_kernel.ts +++ b/yarn-project/sequencer-client/src/simulator/public_kernel.ts @@ -1,4 +1,4 @@ -import { CircuitSimulationStats } from '@aztec/circuit-types/stats'; +import { type CircuitSimulationStats } from '@aztec/circuit-types/stats'; import { PublicKernelCircuitPrivateInputs, PublicKernelCircuitPublicInputs, @@ -20,9 +20,9 @@ import { convertPublicTeardownRollupInputsToWitnessMap, convertPublicTeardownRollupOutputFromWitnessMap, } from '@aztec/noir-protocol-circuits-types'; -import { SimulationProvider, WASMSimulator } from '@aztec/simulator'; +import { type SimulationProvider, WASMSimulator } from '@aztec/simulator'; -import { PublicKernelCircuitSimulator } from './index.js'; +import { type PublicKernelCircuitSimulator } from './index.js'; /** * Implements the PublicKernelCircuitSimulator. diff --git a/yarn-project/sequencer-client/src/simulator/world_state_public_db.test.ts b/yarn-project/sequencer-client/src/simulator/world_state_public_db.test.ts index d33e8a06d564..42a4d2576ae2 100644 --- a/yarn-project/sequencer-client/src/simulator/world_state_public_db.test.ts +++ b/yarn-project/sequencer-client/src/simulator/world_state_public_db.test.ts @@ -1,10 +1,10 @@ import { MerkleTreeId } from '@aztec/circuit-types'; import { AztecAddress, Fr, PublicDataTreeLeafPreimage } from '@aztec/circuits.js'; import { computePublicDataTreeLeafSlot } from '@aztec/circuits.js/hash'; -import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; -import { MerkleTreeOperations } from '@aztec/world-state'; +import { type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; +import { type MerkleTreeOperations } from '@aztec/world-state'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; import { WorldStatePublicDB } from './public_executor.js'; diff --git a/yarn-project/simulator/src/acvm/acvm.ts b/yarn-project/simulator/src/acvm/acvm.ts index ffa53b6ad051..7fa47353808a 100644 --- a/yarn-project/simulator/src/acvm/acvm.ts +++ b/yarn-project/simulator/src/acvm/acvm.ts @@ -1,18 +1,18 @@ -import { NoirCallStack, SourceCodeLocation } from '@aztec/circuit-types'; -import { FunctionDebugMetadata, OpcodeLocation } from '@aztec/foundation/abi'; +import { type NoirCallStack, type SourceCodeLocation } from '@aztec/circuit-types'; +import { type FunctionDebugMetadata, type OpcodeLocation } from '@aztec/foundation/abi'; import { createDebugLogger } from '@aztec/foundation/log'; import { - ExecutionError, - ForeignCallInput, - ForeignCallOutput, + type ExecutionError, + type ForeignCallInput, + type ForeignCallOutput, WasmBlackBoxFunctionSolver, executeCircuitWithBlackBoxSolver, } from '@noir-lang/acvm_js'; import { traverseCauseChain } from '../common/errors.js'; -import { ACVMWitness } from './acvm_types.js'; -import { ORACLE_NAMES } from './oracle/index.js'; +import { type ACVMWitness } from './acvm_types.js'; +import { type ORACLE_NAMES } from './oracle/index.js'; /** * The callback interface for the ACIR. diff --git a/yarn-project/simulator/src/acvm/acvm_types.ts b/yarn-project/simulator/src/acvm/acvm_types.ts index d155d6680489..3053d948a0b3 100644 --- a/yarn-project/simulator/src/acvm/acvm_types.ts +++ b/yarn-project/simulator/src/acvm/acvm_types.ts @@ -1,4 +1,4 @@ -import { WitnessMap } from '@noir-lang/acvm_js'; +import { type WitnessMap } from '@noir-lang/acvm_js'; /** * ACVMField diff --git a/yarn-project/simulator/src/acvm/deserialize.ts b/yarn-project/simulator/src/acvm/deserialize.ts index 6a04ec9e5b0d..74701582330e 100644 --- a/yarn-project/simulator/src/acvm/deserialize.ts +++ b/yarn-project/simulator/src/acvm/deserialize.ts @@ -2,7 +2,7 @@ import { Fr } from '@aztec/foundation/fields'; import { getReturnWitness } from '@noir-lang/acvm_js'; -import { ACVMField, ACVMWitness } from './acvm_types.js'; +import { type ACVMField, type ACVMWitness } from './acvm_types.js'; /** * Converts an ACVM field to a Fr. diff --git a/yarn-project/simulator/src/acvm/oracle/debug.ts b/yarn-project/simulator/src/acvm/oracle/debug.ts index e3080d16ac1f..655584512e98 100644 --- a/yarn-project/simulator/src/acvm/oracle/debug.ts +++ b/yarn-project/simulator/src/acvm/oracle/debug.ts @@ -1,6 +1,6 @@ -import { ForeignCallInput } from '@noir-lang/acvm_js'; +import { type ForeignCallInput } from '@noir-lang/acvm_js'; -import { ACVMField } from '../acvm_types.js'; +import { type ACVMField } from '../acvm_types.js'; /** * Convert an array of ACVMFields to a string. diff --git a/yarn-project/simulator/src/acvm/oracle/oracle.ts b/yarn-project/simulator/src/acvm/oracle/oracle.ts index 812c41bc0689..e14425760661 100644 --- a/yarn-project/simulator/src/acvm/oracle/oracle.ts +++ b/yarn-project/simulator/src/acvm/oracle/oracle.ts @@ -6,7 +6,7 @@ import { padArrayEnd } from '@aztec/foundation/collection'; import { Fr, Point } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; -import { ACVMField } from '../acvm_types.js'; +import { type ACVMField } from '../acvm_types.js'; import { frToBoolean, frToNumber, fromACVMField } from '../deserialize.js'; import { toACVMField, toAcvmEnqueuePublicFunctionResult } from '../serialize.js'; import { acvmFieldMessageToString, oracleDebugCallToFormattedStr } from './debug.js'; diff --git a/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts b/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts index b315f61d371b..a9b65b41259f 100644 --- a/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts +++ b/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts @@ -5,12 +5,12 @@ import { NoteStatus, NullifierMembershipWitness, PublicDataWitness, - PublicKey, + type PublicKey, SiblingPath, UnencryptedL2Log, } from '@aztec/circuit-types'; import { - GrumpkinPrivateKey, + type GrumpkinPrivateKey, Header, L1_TO_L2_MSG_TREE_HEIGHT, PrivateCallStackItem, @@ -20,7 +20,7 @@ import { FunctionSelector } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; -import { ContractInstance } from '@aztec/types/contracts'; +import { type ContractInstance } from '@aztec/types/contracts'; /** * A pair of public key and secret key. diff --git a/yarn-project/simulator/src/acvm/serialize.ts b/yarn-project/simulator/src/acvm/serialize.ts index c35f16545b1b..5abaeee8feea 100644 --- a/yarn-project/simulator/src/acvm/serialize.ts +++ b/yarn-project/simulator/src/acvm/serialize.ts @@ -3,7 +3,7 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; -import { ACVMField } from './acvm_types.js'; +import { type ACVMField } from './acvm_types.js'; /** * Adapts the buffer to the field size. diff --git a/yarn-project/simulator/src/avm/avm_machine_state.ts b/yarn-project/simulator/src/avm/avm_machine_state.ts index 5b4888185a65..aedd4aa9dcb9 100644 --- a/yarn-project/simulator/src/avm/avm_machine_state.ts +++ b/yarn-project/simulator/src/avm/avm_machine_state.ts @@ -1,6 +1,6 @@ import { Fr } from '@aztec/circuits.js'; -import { GasCost, GasDimensions } from './avm_gas_cost.js'; +import { type GasCost, GasDimensions } from './avm_gas_cost.js'; import { TaggedMemory } from './avm_memory_types.js'; import { AvmContractCallResults } from './avm_message_call_result.js'; import { OutOfGasError } from './errors.js'; diff --git a/yarn-project/simulator/src/avm/avm_memory_types.ts b/yarn-project/simulator/src/avm/avm_memory_types.ts index 7f4b07462a09..a9b2f1f9a5ba 100644 --- a/yarn-project/simulator/src/avm/avm_memory_types.ts +++ b/yarn-project/simulator/src/avm/avm_memory_types.ts @@ -1,6 +1,6 @@ import { toBufferBE } from '@aztec/foundation/bigint-buffer'; import { Fr } from '@aztec/foundation/fields'; -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; +import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log'; import { strict as assert } from 'assert'; diff --git a/yarn-project/simulator/src/avm/avm_simulator.ts b/yarn-project/simulator/src/avm/avm_simulator.ts index 5404cded4501..2448b5e1bafe 100644 --- a/yarn-project/simulator/src/avm/avm_simulator.ts +++ b/yarn-project/simulator/src/avm/avm_simulator.ts @@ -1,4 +1,4 @@ -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; +import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log'; import { strict as assert } from 'assert'; diff --git a/yarn-project/simulator/src/avm/fixtures/index.ts b/yarn-project/simulator/src/avm/fixtures/index.ts index 88fc65a2de2e..cb7fb7e776bd 100644 --- a/yarn-project/simulator/src/avm/fixtures/index.ts +++ b/yarn-project/simulator/src/avm/fixtures/index.ts @@ -8,7 +8,12 @@ import { Fr } from '@aztec/foundation/fields'; import { mock } from 'jest-mock-extended'; import merge from 'lodash.merge'; -import { CommitmentsDB, MessageLoadOracleInputs, PublicContractsDB, PublicStateDB } from '../../index.js'; +import { + type CommitmentsDB, + MessageLoadOracleInputs, + type PublicContractsDB, + type PublicStateDB, +} from '../../index.js'; import { AvmContext } from '../avm_context.js'; import { AvmContextInputs, AvmExecutionEnvironment } from '../avm_execution_environment.js'; import { AvmMachineState } from '../avm_machine_state.js'; diff --git a/yarn-project/simulator/src/avm/journal/host_storage.ts b/yarn-project/simulator/src/avm/journal/host_storage.ts index 6d249d49e0db..03f7cfea29b5 100644 --- a/yarn-project/simulator/src/avm/journal/host_storage.ts +++ b/yarn-project/simulator/src/avm/journal/host_storage.ts @@ -1,4 +1,4 @@ -import { CommitmentsDB, PublicContractsDB, PublicStateDB } from '../../public/db.js'; +import { type CommitmentsDB, type PublicContractsDB, type PublicStateDB } from '../../public/db.js'; /** * Host storage diff --git a/yarn-project/simulator/src/avm/journal/journal.test.ts b/yarn-project/simulator/src/avm/journal/journal.test.ts index 83be8cbf5609..302a403d4e5e 100644 --- a/yarn-project/simulator/src/avm/journal/journal.test.ts +++ b/yarn-project/simulator/src/avm/journal/journal.test.ts @@ -3,12 +3,12 @@ import { AztecAddress, EthAddress } from '@aztec/circuits.js'; import { EventSelector } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; -import { CommitmentsDB, PublicContractsDB, PublicStateDB } from '../../index.js'; +import { type CommitmentsDB, type PublicContractsDB, type PublicStateDB } from '../../index.js'; import { initL1ToL2MessageOracleInput } from '../fixtures/index.js'; import { HostStorage } from './host_storage.js'; -import { AvmPersistableStateManager, JournalData } from './journal.js'; +import { AvmPersistableStateManager, type JournalData } from './journal.js'; describe('journal', () => { let publicDb: MockProxy; diff --git a/yarn-project/simulator/src/avm/journal/journal.ts b/yarn-project/simulator/src/avm/journal/journal.ts index b2709d01d3c0..0a1f25770806 100644 --- a/yarn-project/simulator/src/avm/journal/journal.ts +++ b/yarn-project/simulator/src/avm/journal/journal.ts @@ -7,7 +7,7 @@ import { HostStorage } from './host_storage.js'; import { Nullifiers } from './nullifiers.js'; import { PublicStorage } from './public_storage.js'; import { WorldStateAccessTrace } from './trace.js'; -import { TracedL1toL2MessageCheck, TracedNoteHashCheck, TracedNullifierCheck } from './trace_types.js'; +import { type TracedL1toL2MessageCheck, type TracedNoteHashCheck, type TracedNullifierCheck } from './trace_types.js'; /** * Data held within the journal diff --git a/yarn-project/simulator/src/avm/journal/nullifiers.test.ts b/yarn-project/simulator/src/avm/journal/nullifiers.test.ts index 5a459823acc7..16f4d359a53e 100644 --- a/yarn-project/simulator/src/avm/journal/nullifiers.test.ts +++ b/yarn-project/simulator/src/avm/journal/nullifiers.test.ts @@ -1,8 +1,8 @@ import { Fr } from '@aztec/foundation/fields'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; -import { CommitmentsDB } from '../../index.js'; +import { type CommitmentsDB } from '../../index.js'; import { Nullifiers } from './nullifiers.js'; describe('avm nullifier caching', () => { diff --git a/yarn-project/simulator/src/avm/journal/public_storage.test.ts b/yarn-project/simulator/src/avm/journal/public_storage.test.ts index d8b79fc79c0a..33c747977d72 100644 --- a/yarn-project/simulator/src/avm/journal/public_storage.test.ts +++ b/yarn-project/simulator/src/avm/journal/public_storage.test.ts @@ -1,8 +1,8 @@ import { Fr } from '@aztec/foundation/fields'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; -import { PublicStateDB } from '../../index.js'; +import { type PublicStateDB } from '../../index.js'; import { PublicStorage } from './public_storage.js'; describe('avm public storage', () => { diff --git a/yarn-project/simulator/src/avm/journal/trace.test.ts b/yarn-project/simulator/src/avm/journal/trace.test.ts index a7b309fbb30a..93231b4b7270 100644 --- a/yarn-project/simulator/src/avm/journal/trace.test.ts +++ b/yarn-project/simulator/src/avm/journal/trace.test.ts @@ -1,7 +1,7 @@ import { Fr } from '@aztec/foundation/fields'; import { WorldStateAccessTrace } from './trace.js'; -import { TracedL1toL2MessageCheck, TracedNullifierCheck } from './trace_types.js'; +import { type TracedL1toL2MessageCheck, type TracedNullifierCheck } from './trace_types.js'; describe('world state access trace', () => { let trace: WorldStateAccessTrace; diff --git a/yarn-project/simulator/src/avm/journal/trace.ts b/yarn-project/simulator/src/avm/journal/trace.ts index 620e2e0462ca..48e4df34dc75 100644 --- a/yarn-project/simulator/src/avm/journal/trace.ts +++ b/yarn-project/simulator/src/avm/journal/trace.ts @@ -1,6 +1,6 @@ import { Fr } from '@aztec/foundation/fields'; -import { TracedL1toL2MessageCheck, TracedNoteHashCheck, TracedNullifierCheck } from './trace_types.js'; +import { type TracedL1toL2MessageCheck, type TracedNoteHashCheck, type TracedNullifierCheck } from './trace_types.js'; export class WorldStateAccessTrace { public accessCounter: number; diff --git a/yarn-project/simulator/src/avm/opcodes/accrued_substate.test.ts b/yarn-project/simulator/src/avm/opcodes/accrued_substate.test.ts index 3976c805a04b..e56d9cdc0b11 100644 --- a/yarn-project/simulator/src/avm/opcodes/accrued_substate.test.ts +++ b/yarn-project/simulator/src/avm/opcodes/accrued_substate.test.ts @@ -4,7 +4,7 @@ import { EventSelector } from '@aztec/foundation/abi'; import { mock } from 'jest-mock-extended'; -import { CommitmentsDB } from '../../index.js'; +import { type CommitmentsDB } from '../../index.js'; import { AvmContext } from '../avm_context.js'; import { Field, Uint8 } from '../avm_memory_types.js'; import { InstructionExecutionError } from '../errors.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/arithmetic.ts b/yarn-project/simulator/src/avm/opcodes/arithmetic.ts index 44790a692d87..ad4693ef4240 100644 --- a/yarn-project/simulator/src/avm/opcodes/arithmetic.ts +++ b/yarn-project/simulator/src/avm/opcodes/arithmetic.ts @@ -1,5 +1,5 @@ import type { AvmContext } from '../avm_context.js'; -import { GasCost, GasCostConstants, getGasCostMultiplierFromTypeTag, makeGasCost } from '../avm_gas_cost.js'; +import { type GasCost, GasCostConstants, getGasCostMultiplierFromTypeTag, makeGasCost } from '../avm_gas_cost.js'; import { Field, MemoryValue, TypeTag } from '../avm_memory_types.js'; import { Opcode, OperandType } from '../serialization/instruction_serialization.js'; import { Addressing, AddressingMode } from './addressing_mode.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/external_calls.test.ts b/yarn-project/simulator/src/avm/opcodes/external_calls.test.ts index d6112104d450..164b2663e33f 100644 --- a/yarn-project/simulator/src/avm/opcodes/external_calls.test.ts +++ b/yarn-project/simulator/src/avm/opcodes/external_calls.test.ts @@ -3,7 +3,7 @@ import { Fr } from '@aztec/foundation/fields'; import { jest } from '@jest/globals'; import { mock } from 'jest-mock-extended'; -import { CommitmentsDB, PublicContractsDB, PublicStateDB } from '../../index.js'; +import { type CommitmentsDB, type PublicContractsDB, type PublicStateDB } from '../../index.js'; import { AvmContext } from '../avm_context.js'; import { Field, Uint8 } from '../avm_memory_types.js'; import { adjustCalldataIndex, initContext } from '../fixtures/index.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/instruction.ts b/yarn-project/simulator/src/avm/opcodes/instruction.ts index 2660052c2650..08b5ecf3f618 100644 --- a/yarn-project/simulator/src/avm/opcodes/instruction.ts +++ b/yarn-project/simulator/src/avm/opcodes/instruction.ts @@ -1,7 +1,7 @@ import { strict as assert } from 'assert'; import type { AvmContext } from '../avm_context.js'; -import { DynamicGasCost, GasCost, GasCosts } from '../avm_gas_cost.js'; +import { DynamicGasCost, type GasCost, GasCosts } from '../avm_gas_cost.js'; import { BufferCursor } from '../serialization/buffer_cursor.js'; import { Opcode, OperandType, deserialize, serialize } from '../serialization/instruction_serialization.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/memory.ts b/yarn-project/simulator/src/avm/opcodes/memory.ts index 87a5ccdd4655..74137183d8bd 100644 --- a/yarn-project/simulator/src/avm/opcodes/memory.ts +++ b/yarn-project/simulator/src/avm/opcodes/memory.ts @@ -1,5 +1,5 @@ import type { AvmContext } from '../avm_context.js'; -import { GasCost, GasCostConstants, getGasCostMultiplierFromTypeTag, makeGasCost } from '../avm_gas_cost.js'; +import { type GasCost, GasCostConstants, getGasCostMultiplierFromTypeTag, makeGasCost } from '../avm_gas_cost.js'; import { Field, TaggedMemory, TypeTag } from '../avm_memory_types.js'; import { InstructionExecutionError } from '../errors.js'; import { BufferCursor } from '../serialization/buffer_cursor.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/storage.test.ts b/yarn-project/simulator/src/avm/opcodes/storage.test.ts index ab98f3e7140a..943854ff887a 100644 --- a/yarn-project/simulator/src/avm/opcodes/storage.test.ts +++ b/yarn-project/simulator/src/avm/opcodes/storage.test.ts @@ -1,7 +1,7 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; import { AvmContext } from '../avm_context.js'; import { Field } from '../avm_memory_types.js'; diff --git a/yarn-project/simulator/src/avm/serialization/bytecode_serialization.test.ts b/yarn-project/simulator/src/avm/serialization/bytecode_serialization.test.ts index a9d8f08bec2b..f2521451cfa0 100644 --- a/yarn-project/simulator/src/avm/serialization/bytecode_serialization.test.ts +++ b/yarn-project/simulator/src/avm/serialization/bytecode_serialization.test.ts @@ -2,7 +2,7 @@ import { strict as assert } from 'assert'; import { Add, Address, Call, StaticCall, Sub } from '../opcodes/index.js'; import { BufferCursor } from './buffer_cursor.js'; -import { InstructionSet, decodeFromBytecode, encodeToBytecode } from './bytecode_serialization.js'; +import { type InstructionSet, decodeFromBytecode, encodeToBytecode } from './bytecode_serialization.js'; import { Opcode } from './instruction_serialization.js'; class InstA { diff --git a/yarn-project/simulator/src/avm/temporary_executor_migration.ts b/yarn-project/simulator/src/avm/temporary_executor_migration.ts index 4c2e0bb203d2..64adbe7eac23 100644 --- a/yarn-project/simulator/src/avm/temporary_executor_migration.ts +++ b/yarn-project/simulator/src/avm/temporary_executor_migration.ts @@ -12,10 +12,10 @@ import { import { Fr } from '@aztec/foundation/fields'; import { createSimulationError } from '../common/errors.js'; -import { PublicExecution, PublicExecutionResult } from '../public/execution.js'; +import { type PublicExecution, type PublicExecutionResult } from '../public/execution.js'; import { AvmExecutionEnvironment } from './avm_execution_environment.js'; import { AvmContractCallResults } from './avm_message_call_result.js'; -import { JournalData } from './journal/journal.js'; +import { type JournalData } from './journal/journal.js'; /** Temporary Method * diff --git a/yarn-project/simulator/src/client/client_execution_context.ts b/yarn-project/simulator/src/client/client_execution_context.ts index 8586f777ae13..4df44d267592 100644 --- a/yarn-project/simulator/src/client/client_execution_context.ts +++ b/yarn-project/simulator/src/client/client_execution_context.ts @@ -1,6 +1,6 @@ import { AuthWitness, - AztecNode, + type AztecNode, EncryptedFunctionL2Logs, EncryptedL2Log, L1NotePayload, @@ -22,16 +22,16 @@ import { } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { computePublicDataTreeLeafSlot, computeUniqueCommitment, siloNoteHash } from '@aztec/circuits.js/hash'; -import { FunctionAbi, FunctionArtifact, countArgumentsSize } from '@aztec/foundation/abi'; +import { type FunctionAbi, type FunctionArtifact, countArgumentsSize } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr, Point } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; -import { NoteData, toACVMWitness } from '../acvm/index.js'; +import { type NoteData, toACVMWitness } from '../acvm/index.js'; import { PackedArgsCache } from '../common/packed_args_cache.js'; -import { DBOracle } from './db_oracle.js'; +import { type DBOracle } from './db_oracle.js'; import { ExecutionNoteCache } from './execution_note_cache.js'; -import { ExecutionResult, NoteAndSlot } from './execution_result.js'; +import { type ExecutionResult, type NoteAndSlot } from './execution_result.js'; import { pickNotes } from './pick_notes.js'; import { executePrivateFunction } from './private_execution.js'; import { ViewDataOracle } from './view_data_oracle.js'; diff --git a/yarn-project/simulator/src/client/db_oracle.ts b/yarn-project/simulator/src/client/db_oracle.ts index 9f6462e331a0..034c6f81985f 100644 --- a/yarn-project/simulator/src/client/db_oracle.ts +++ b/yarn-project/simulator/src/client/db_oracle.ts @@ -1,13 +1,13 @@ import { L2Block, MerkleTreeId, NoteStatus, NullifierMembershipWitness, PublicDataWitness } from '@aztec/circuit-types'; import { CompleteAddress, Header } from '@aztec/circuits.js'; -import { FunctionArtifactWithDebugMetadata, FunctionSelector } from '@aztec/foundation/abi'; +import { type FunctionArtifactWithDebugMetadata, FunctionSelector } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; -import { ContractInstance } from '@aztec/types/contracts'; +import { type ContractInstance } from '@aztec/types/contracts'; -import { KeyPair, NoteData } from '../acvm/index.js'; -import { CommitmentsDB } from '../public/db.js'; +import { type KeyPair, type NoteData } from '../acvm/index.js'; +import { type CommitmentsDB } from '../public/db.js'; /** * Error thrown when a contract is not found in the database. diff --git a/yarn-project/simulator/src/client/execution_note_cache.ts b/yarn-project/simulator/src/client/execution_note_cache.ts index ad4be3e8c34b..cb8a5afbf6e6 100644 --- a/yarn-project/simulator/src/client/execution_note_cache.ts +++ b/yarn-project/simulator/src/client/execution_note_cache.ts @@ -2,7 +2,7 @@ import { siloNullifier } from '@aztec/circuits.js/hash'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; -import { NoteData } from '../acvm/index.js'; +import { type NoteData } from '../acvm/index.js'; /** * Data that's accessible by all the function calls in an execution. diff --git a/yarn-project/simulator/src/client/execution_result.test.ts b/yarn-project/simulator/src/client/execution_result.test.ts index f09c5bf07443..0938c50af58f 100644 --- a/yarn-project/simulator/src/client/execution_result.test.ts +++ b/yarn-project/simulator/src/client/execution_result.test.ts @@ -7,7 +7,7 @@ import { import { AztecAddress, PrivateCallStackItem } from '@aztec/circuits.js'; import { EventSelector } from '@aztec/foundation/abi'; -import { ExecutionResult, collectEncryptedLogs, collectUnencryptedLogs } from './execution_result.js'; +import { type ExecutionResult, collectEncryptedLogs, collectUnencryptedLogs } from './execution_result.js'; function emptyExecutionResult(): ExecutionResult { return { diff --git a/yarn-project/simulator/src/client/execution_result.ts b/yarn-project/simulator/src/client/execution_result.ts index 4fccc6e8e015..1cc13dcdd146 100644 --- a/yarn-project/simulator/src/client/execution_result.ts +++ b/yarn-project/simulator/src/client/execution_result.ts @@ -1,9 +1,9 @@ import { EncryptedFunctionL2Logs, Note, UnencryptedFunctionL2Logs } from '@aztec/circuit-types'; import { NoteHashReadRequestMembershipWitness, PrivateCallStackItem, PublicCallRequest } from '@aztec/circuits.js'; -import { DecodedReturn } from '@aztec/foundation/abi'; +import { type DecodedReturn } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; -import { ACVMField } from '../acvm/index.js'; +import { type ACVMField } from '../acvm/index.js'; /** * The contents of a new note. diff --git a/yarn-project/simulator/src/client/private_execution.test.ts b/yarn-project/simulator/src/client/private_execution.test.ts index 1c959d2ae9b6..5c9cd7c48fcf 100644 --- a/yarn-project/simulator/src/client/private_execution.test.ts +++ b/yarn-project/simulator/src/client/private_execution.test.ts @@ -1,4 +1,4 @@ -import { AztecNode, L1ToL2Message, Note, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types'; +import { type AztecNode, L1ToL2Message, Note, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types'; import { AppendOnlyTreeSnapshot, CallContext, @@ -21,7 +21,7 @@ import { import { computeCommitmentNonce, computeMessageSecretHash, computeVarArgsHash } from '@aztec/circuits.js/hash'; import { makeHeader } from '@aztec/circuits.js/testing'; import { - FunctionArtifact, + type FunctionArtifact, FunctionSelector, encodeArguments, getFunctionArtifact, @@ -33,10 +33,10 @@ import { times } from '@aztec/foundation/collection'; import { pedersenHash, randomInt } from '@aztec/foundation/crypto'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr, GrumpkinScalar } from '@aztec/foundation/fields'; -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log'; +import { type FieldsOf } from '@aztec/foundation/types'; import { openTmpStore } from '@aztec/kv-store/utils'; -import { AppendOnlyTree, Pedersen, StandardTree, newTree } from '@aztec/merkle-tree'; +import { type AppendOnlyTree, Pedersen, StandardTree, newTree } from '@aztec/merkle-tree'; import { ChildContractArtifact, ImportTestContractArtifact, @@ -47,13 +47,13 @@ import { } from '@aztec/noir-contracts.js'; import { jest } from '@jest/globals'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; import { toFunctionSelector } from 'viem'; -import { KeyPair, MessageLoadOracleInputs } from '../acvm/index.js'; +import { type KeyPair, MessageLoadOracleInputs } from '../acvm/index.js'; import { buildL1ToL2Message } from '../test/utils.js'; import { computeSlotForMapping } from '../utils.js'; -import { DBOracle } from './db_oracle.js'; +import { type DBOracle } from './db_oracle.js'; import { collectUnencryptedLogs } from './execution_result.js'; import { AcirSimulator } from './simulator.js'; diff --git a/yarn-project/simulator/src/client/private_execution.ts b/yarn-project/simulator/src/client/private_execution.ts index 75bc079900b5..a237310cd34d 100644 --- a/yarn-project/simulator/src/client/private_execution.ts +++ b/yarn-project/simulator/src/client/private_execution.ts @@ -1,5 +1,5 @@ import { FunctionData, PrivateCallStackItem, PrivateCircuitPublicInputs } from '@aztec/circuits.js'; -import { FunctionArtifactWithDebugMetadata, decodeReturnValues } from '@aztec/foundation/abi'; +import { type FunctionArtifactWithDebugMetadata, decodeReturnValues } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; @@ -8,7 +8,7 @@ import { extractReturnWitness } from '../acvm/deserialize.js'; import { Oracle, acvm, extractCallStack } from '../acvm/index.js'; import { ExecutionError } from '../common/errors.js'; import { ClientExecutionContext } from './client_execution_context.js'; -import { ExecutionResult } from './execution_result.js'; +import { type ExecutionResult } from './execution_result.js'; import { AcirSimulator } from './simulator.js'; /** diff --git a/yarn-project/simulator/src/client/simulator.test.ts b/yarn-project/simulator/src/client/simulator.test.ts index 636f3349fb50..4bb3dc3d3f36 100644 --- a/yarn-project/simulator/src/client/simulator.test.ts +++ b/yarn-project/simulator/src/client/simulator.test.ts @@ -1,15 +1,19 @@ -import { AztecNode, Note } from '@aztec/circuit-types'; +import { type AztecNode, Note } from '@aztec/circuit-types'; import { CompleteAddress } from '@aztec/circuits.js'; import { computeUniqueCommitment, siloNoteHash } from '@aztec/circuits.js/hash'; -import { ABIParameterVisibility, FunctionArtifactWithDebugMetadata, getFunctionArtifact } from '@aztec/foundation/abi'; +import { + ABIParameterVisibility, + type FunctionArtifactWithDebugMetadata, + getFunctionArtifact, +} from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { pedersenHash } from '@aztec/foundation/crypto'; import { Fr, GrumpkinScalar, Point } from '@aztec/foundation/fields'; import { TokenContractArtifact } from '@aztec/noir-contracts.js/Token'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; -import { DBOracle } from './db_oracle.js'; +import { type DBOracle } from './db_oracle.js'; import { AcirSimulator } from './simulator.js'; describe('Simulator', () => { diff --git a/yarn-project/simulator/src/client/simulator.ts b/yarn-project/simulator/src/client/simulator.ts index 4c1e829c8e63..c634e684414d 100644 --- a/yarn-project/simulator/src/client/simulator.ts +++ b/yarn-project/simulator/src/client/simulator.ts @@ -1,9 +1,9 @@ -import { AztecNode, FunctionCall, Note, TxExecutionRequest } from '@aztec/circuit-types'; +import { type AztecNode, type FunctionCall, Note, TxExecutionRequest } from '@aztec/circuit-types'; import { CallContext, FunctionData } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { - ArrayType, - FunctionArtifactWithDebugMetadata, + type ArrayType, + type FunctionArtifactWithDebugMetadata, FunctionSelector, FunctionType, encodeArguments, @@ -11,16 +11,16 @@ import { import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; +import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log'; import { WasmBlackBoxFunctionSolver, createBlackBoxSolver } from '@noir-lang/acvm_js'; import { createSimulationError } from '../common/errors.js'; import { PackedArgsCache } from '../common/packed_args_cache.js'; import { ClientExecutionContext } from './client_execution_context.js'; -import { DBOracle } from './db_oracle.js'; +import { type DBOracle } from './db_oracle.js'; import { ExecutionNoteCache } from './execution_note_cache.js'; -import { ExecutionResult } from './execution_result.js'; +import { type ExecutionResult } from './execution_result.js'; import { executePrivateFunction } from './private_execution.js'; import { executeUnconstrainedFunction } from './unconstrained_execution.js'; import { ViewDataOracle } from './view_data_oracle.js'; diff --git a/yarn-project/simulator/src/client/unconstrained_execution.test.ts b/yarn-project/simulator/src/client/unconstrained_execution.test.ts index b4997ddba214..dea57f9e00b0 100644 --- a/yarn-project/simulator/src/client/unconstrained_execution.test.ts +++ b/yarn-project/simulator/src/client/unconstrained_execution.test.ts @@ -1,4 +1,4 @@ -import { AztecNode, FunctionCall, Note } from '@aztec/circuit-types'; +import { type AztecNode, type FunctionCall, Note } from '@aztec/circuit-types'; import { CompleteAddress, FunctionData, Header } from '@aztec/circuits.js'; import { FunctionSelector, encodeArguments } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; @@ -7,7 +7,7 @@ import { StatefulTestContractArtifact } from '@aztec/noir-contracts.js/StatefulT import { mock } from 'jest-mock-extended'; -import { DBOracle } from './db_oracle.js'; +import { type DBOracle } from './db_oracle.js'; import { AcirSimulator } from './simulator.js'; describe('Unconstrained Execution test suite', () => { diff --git a/yarn-project/simulator/src/client/unconstrained_execution.ts b/yarn-project/simulator/src/client/unconstrained_execution.ts index 19b78bec0f5a..19d8dcf702b8 100644 --- a/yarn-project/simulator/src/client/unconstrained_execution.ts +++ b/yarn-project/simulator/src/client/unconstrained_execution.ts @@ -1,5 +1,5 @@ import { FunctionData } from '@aztec/circuits.js'; -import { DecodedReturn, FunctionArtifactWithDebugMetadata, decodeReturnValues } from '@aztec/foundation/abi'; +import { type DecodedReturn, type FunctionArtifactWithDebugMetadata, decodeReturnValues } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; diff --git a/yarn-project/simulator/src/client/view_data_oracle.ts b/yarn-project/simulator/src/client/view_data_oracle.ts index 5e6f33e3b6af..f200de49f4dd 100644 --- a/yarn-project/simulator/src/client/view_data_oracle.ts +++ b/yarn-project/simulator/src/client/view_data_oracle.ts @@ -1,6 +1,6 @@ import { AuthWitness, - AztecNode, + type AztecNode, CompleteAddress, MerkleTreeId, NoteStatus, @@ -12,10 +12,10 @@ import { siloNullifier } from '@aztec/circuits.js/hash'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; -import { ContractInstance } from '@aztec/types/contracts'; +import { type ContractInstance } from '@aztec/types/contracts'; -import { NoteData, TypedOracle } from '../acvm/index.js'; -import { DBOracle } from './db_oracle.js'; +import { type NoteData, TypedOracle } from '../acvm/index.js'; +import { type DBOracle } from './db_oracle.js'; import { pickNotes } from './pick_notes.js'; /** diff --git a/yarn-project/simulator/src/common/errors.ts b/yarn-project/simulator/src/common/errors.ts index 722819537a2d..1d0bdf184028 100644 --- a/yarn-project/simulator/src/common/errors.ts +++ b/yarn-project/simulator/src/common/errors.ts @@ -1,4 +1,4 @@ -import { FailingFunction, NoirCallStack, SimulationError } from '@aztec/circuit-types'; +import { type FailingFunction, type NoirCallStack, SimulationError } from '@aztec/circuit-types'; /** * An error that occurred during the execution of a function. diff --git a/yarn-project/simulator/src/public/avm_executor.test.ts b/yarn-project/simulator/src/public/avm_executor.test.ts index 23f31610c1af..19dda6d02a3f 100644 --- a/yarn-project/simulator/src/public/avm_executor.test.ts +++ b/yarn-project/simulator/src/public/avm_executor.test.ts @@ -4,10 +4,10 @@ import { randomInt } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; import { AvmTestContractArtifact } from '@aztec/noir-contracts.js'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; -import { CommitmentsDB, PublicContractsDB, PublicStateDB } from './db.js'; -import { PublicExecution } from './execution.js'; +import { type CommitmentsDB, type PublicContractsDB, type PublicStateDB } from './db.js'; +import { type PublicExecution } from './execution.js'; import { PublicExecutor } from './executor.js'; describe('AVM WitGen and Proof Generation', () => { diff --git a/yarn-project/simulator/src/public/db.ts b/yarn-project/simulator/src/public/db.ts index 3e05d7212f89..b7a41eb5733d 100644 --- a/yarn-project/simulator/src/public/db.ts +++ b/yarn-project/simulator/src/public/db.ts @@ -2,7 +2,7 @@ import { NullifierMembershipWitness } from '@aztec/circuit-types'; import { EthAddress, FunctionSelector, L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/circuits.js'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; -import { ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type ContractInstanceWithAddress } from '@aztec/types/contracts'; import { MessageLoadOracleInputs } from '../acvm/index.js'; diff --git a/yarn-project/simulator/src/public/executor.ts b/yarn-project/simulator/src/public/executor.ts index 13ffcecc79b5..ebbbc0700c1b 100644 --- a/yarn-project/simulator/src/public/executor.ts +++ b/yarn-project/simulator/src/public/executor.ts @@ -20,8 +20,8 @@ import { AcirSimulator } from '../client/simulator.js'; import { ExecutionError, createSimulationError } from '../common/errors.js'; import { SideEffectCounter } from '../common/index.js'; import { PackedArgsCache } from '../common/packed_args_cache.js'; -import { CommitmentsDB, PublicContractsDB, PublicStateDB } from './db.js'; -import { PublicExecution, PublicExecutionResult, checkValidStaticCall } from './execution.js'; +import { type CommitmentsDB, type PublicContractsDB, type PublicStateDB } from './db.js'; +import { type PublicExecution, type PublicExecutionResult, checkValidStaticCall } from './execution.js'; import { PublicExecutionContext } from './public_execution_context.js'; /** diff --git a/yarn-project/simulator/src/public/index.test.ts b/yarn-project/simulator/src/public/index.test.ts index 03f6a631f9b3..67c8d5d73131 100644 --- a/yarn-project/simulator/src/public/index.test.ts +++ b/yarn-project/simulator/src/public/index.test.ts @@ -13,7 +13,7 @@ import { } from '@aztec/circuits.js'; import { siloNullifier } from '@aztec/circuits.js/hash'; import { makeHeader } from '@aztec/circuits.js/testing'; -import { FunctionArtifact, FunctionSelector, encodeArguments } from '@aztec/foundation/abi'; +import { type FunctionArtifact, FunctionSelector, encodeArguments } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { pedersenHash, randomInt } from '@aztec/foundation/crypto'; import { EthAddress } from '@aztec/foundation/eth-address'; @@ -25,15 +25,15 @@ import { ParentContractArtifact } from '@aztec/noir-contracts.js/Parent'; import { TestContractArtifact } from '@aztec/noir-contracts.js/Test'; import { TokenContractArtifact } from '@aztec/noir-contracts.js/Token'; -import { MockProxy, mock } from 'jest-mock-extended'; +import { type MockProxy, mock } from 'jest-mock-extended'; import { type MemDown, default as memdown } from 'memdown'; import { toFunctionSelector } from 'viem'; import { MessageLoadOracleInputs } from '../index.js'; import { buildL1ToL2Message } from '../test/utils.js'; import { computeSlotForMapping } from '../utils.js'; -import { CommitmentsDB, PublicContractsDB, PublicStateDB } from './db.js'; -import { PublicExecution } from './execution.js'; +import { type CommitmentsDB, type PublicContractsDB, type PublicStateDB } from './db.js'; +import { type PublicExecution } from './execution.js'; import { PublicExecutor } from './executor.js'; export const createMemDown = () => (memdown as any)() as MemDown; diff --git a/yarn-project/simulator/src/public/index.ts b/yarn-project/simulator/src/public/index.ts index c5297f5ad004..7791d89ec4ea 100644 --- a/yarn-project/simulator/src/public/index.ts +++ b/yarn-project/simulator/src/public/index.ts @@ -1,7 +1,7 @@ export * from './db.js'; export { - PublicExecution, - PublicExecutionResult, + type PublicExecution, + type PublicExecutionResult, isPublicExecutionResult, collectPublicDataReads, collectPublicDataUpdateRequests, diff --git a/yarn-project/simulator/src/public/public_execution_context.ts b/yarn-project/simulator/src/public/public_execution_context.ts index ab54bf1c7921..ee420af2052c 100644 --- a/yarn-project/simulator/src/public/public_execution_context.ts +++ b/yarn-project/simulator/src/public/public_execution_context.ts @@ -4,12 +4,12 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; -import { ContractInstance } from '@aztec/types/contracts'; +import { type ContractInstance } from '@aztec/types/contracts'; import { TypedOracle, toACVMWitness } from '../acvm/index.js'; import { PackedArgsCache, SideEffectCounter } from '../common/index.js'; -import { CommitmentsDB, PublicContractsDB, PublicStateDB } from './db.js'; -import { PublicExecution, PublicExecutionResult, checkValidStaticCall } from './execution.js'; +import { type CommitmentsDB, type PublicContractsDB, type PublicStateDB } from './db.js'; +import { type PublicExecution, type PublicExecutionResult, checkValidStaticCall } from './execution.js'; import { executePublicFunction } from './executor.js'; import { ContractStorageActionsCollector } from './state_actions.js'; diff --git a/yarn-project/simulator/src/public/state_actions.ts b/yarn-project/simulator/src/public/state_actions.ts index dd995566e308..197705f3f9d0 100644 --- a/yarn-project/simulator/src/public/state_actions.ts +++ b/yarn-project/simulator/src/public/state_actions.ts @@ -2,7 +2,7 @@ import { ContractStorageRead, ContractStorageUpdateRequest } from '@aztec/circui import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; -import { PublicStateDB } from './db.js'; +import { type PublicStateDB } from './db.js'; /** * Implements read/write operations on a contract public storage, collecting diff --git a/yarn-project/simulator/src/simulator/acvm_native.ts b/yarn-project/simulator/src/simulator/acvm_native.ts index ec777bdea392..df1df4a1be63 100644 --- a/yarn-project/simulator/src/simulator/acvm_native.ts +++ b/yarn-project/simulator/src/simulator/acvm_native.ts @@ -1,11 +1,11 @@ import { randomBytes } from '@aztec/foundation/crypto'; -import { NoirCompiledCircuit } from '@aztec/types/noir'; +import { type NoirCompiledCircuit } from '@aztec/types/noir'; -import { WitnessMap } from '@noir-lang/types'; +import { type WitnessMap } from '@noir-lang/types'; import * as proc from 'child_process'; import fs from 'fs/promises'; -import { SimulationProvider } from './simulation_provider.js'; +import { type SimulationProvider } from './simulation_provider.js'; /** * Parses a TOML format witness map string into a Map structure diff --git a/yarn-project/simulator/src/simulator/acvm_wasm.ts b/yarn-project/simulator/src/simulator/acvm_wasm.ts index cdf49df7f5af..22f93aae7453 100644 --- a/yarn-project/simulator/src/simulator/acvm_wasm.ts +++ b/yarn-project/simulator/src/simulator/acvm_wasm.ts @@ -1,9 +1,9 @@ -import { NoirCompiledCircuit } from '@aztec/types/noir'; +import { type NoirCompiledCircuit } from '@aztec/types/noir'; import { WasmBlackBoxFunctionSolver, createBlackBoxSolver, executeCircuitWithBlackBoxSolver } from '@noir-lang/acvm_js'; -import { WitnessMap } from '@noir-lang/types'; +import { type WitnessMap } from '@noir-lang/types'; -import { SimulationProvider } from './simulation_provider.js'; +import { type SimulationProvider } from './simulation_provider.js'; let solver: Promise; diff --git a/yarn-project/simulator/src/simulator/simulation_provider.ts b/yarn-project/simulator/src/simulator/simulation_provider.ts index a9fd92663517..e0a087fcc371 100644 --- a/yarn-project/simulator/src/simulator/simulation_provider.ts +++ b/yarn-project/simulator/src/simulator/simulation_provider.ts @@ -1,6 +1,6 @@ -import { NoirCompiledCircuit } from '@aztec/types/noir'; +import { type NoirCompiledCircuit } from '@aztec/types/noir'; -import { WitnessMap } from '@noir-lang/types'; +import { type WitnessMap } from '@noir-lang/types'; /** * Low level simulation interface diff --git a/yarn-project/types/src/abi/contract_artifact.ts b/yarn-project/types/src/abi/contract_artifact.ts index 1185cc5f04f2..2247f2c8d790 100644 --- a/yarn-project/types/src/abi/contract_artifact.ts +++ b/yarn-project/types/src/abi/contract_artifact.ts @@ -1,9 +1,9 @@ import { - ABIParameter, + type ABIParameter, ABIParameterVisibility, - ABIType, - ContractArtifact, - FunctionArtifact, + type ABIType, + type ContractArtifact, + type FunctionArtifact, FunctionType, } from '@aztec/foundation/abi'; @@ -13,7 +13,7 @@ import { AZTEC_PRIVATE_ATTRIBUTE, AZTEC_PUBLIC_ATTRIBUTE, AZTEC_PUBLIC_VM_ATTRIBUTE, - NoirCompiledContract, + type NoirCompiledContract, } from '../noir/index.js'; import { mockVerificationKey } from './mocked_keys.js'; diff --git a/yarn-project/types/src/contracts/contract_data_source.ts b/yarn-project/types/src/contracts/contract_data_source.ts index c9d438cd24e2..8f1a3175bc8d 100644 --- a/yarn-project/types/src/contracts/contract_data_source.ts +++ b/yarn-project/types/src/contracts/contract_data_source.ts @@ -2,8 +2,8 @@ import { FunctionSelector } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; -import { ContractClassPublic, PublicFunction } from './contract_class.js'; -import { ContractInstanceWithAddress } from './contract_instance.js'; +import { type ContractClassPublic, type PublicFunction } from './contract_class.js'; +import { type ContractInstanceWithAddress } from './contract_instance.js'; export interface ContractDataSource { /** diff --git a/yarn-project/types/src/contracts/contract_instance.ts b/yarn-project/types/src/contracts/contract_instance.ts index 354857b6b618..8f14656bc900 100644 --- a/yarn-project/types/src/contracts/contract_instance.ts +++ b/yarn-project/types/src/contracts/contract_instance.ts @@ -2,7 +2,7 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; import { BufferReader, numToUInt8, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type FieldsOf } from '@aztec/foundation/types'; const VERSION = 1 as const; diff --git a/yarn-project/types/src/interfaces/node-info.ts b/yarn-project/types/src/interfaces/node-info.ts index 48d77996d896..b4c96b6cedb3 100644 --- a/yarn-project/types/src/interfaces/node-info.ts +++ b/yarn-project/types/src/interfaces/node-info.ts @@ -1,4 +1,4 @@ -import { L1ContractAddresses } from '@aztec/ethereum'; +import { type L1ContractAddresses } from '@aztec/ethereum'; /** * Provides basic information about the running node. diff --git a/yarn-project/types/src/noir/index.ts b/yarn-project/types/src/noir/index.ts index 097129d74fb5..08456be017e5 100644 --- a/yarn-project/types/src/noir/index.ts +++ b/yarn-project/types/src/noir/index.ts @@ -1,10 +1,10 @@ import { - ABIParameter, + type ABIParameter, ABIParameterVisibility, - ABIType, - DebugFileMap, - DebugInfo, - EventAbi, + type ABIType, + type DebugFileMap, + type DebugInfo, + type EventAbi, } from '@aztec/foundation/abi'; export const AZTEC_PRIVATE_ATTRIBUTE = 'aztec(private)'; diff --git a/yarn-project/types/src/test/fixtures.ts b/yarn-project/types/src/test/fixtures.ts index 4395b58033d8..9796b24cb12f 100644 --- a/yarn-project/types/src/test/fixtures.ts +++ b/yarn-project/types/src/test/fixtures.ts @@ -1,11 +1,11 @@ -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type ContractArtifact } from '@aztec/foundation/abi'; import { readFileSync } from 'fs'; import { dirname, resolve } from 'path'; import { fileURLToPath } from 'url'; import { loadContractArtifact } from '../abi/contract_artifact.js'; -import { NoirCompiledContract } from '../noir/index.js'; +import { type NoirCompiledContract } from '../noir/index.js'; // Copied from the build output for the contract `Benchmarking` in noir-contracts export function getSampleContractArtifact(): ContractArtifact { diff --git a/yarn-project/world-state/src/synchronizer/server_world_state_synchronizer.test.ts b/yarn-project/world-state/src/synchronizer/server_world_state_synchronizer.test.ts index 4da1279012bb..7fde0ae367a7 100644 --- a/yarn-project/world-state/src/synchronizer/server_world_state_synchronizer.test.ts +++ b/yarn-project/world-state/src/synchronizer/server_world_state_synchronizer.test.ts @@ -1,17 +1,17 @@ -import { L1ToL2MessageSource, L2Block, L2BlockSource, MerkleTreeId, SiblingPath } from '@aztec/circuit-types'; +import { type L1ToL2MessageSource, L2Block, type L2BlockSource, MerkleTreeId, SiblingPath } from '@aztec/circuit-types'; import { Fr } from '@aztec/circuits.js'; import { L1_TO_L2_MSG_SUBTREE_HEIGHT } from '@aztec/circuits.js/constants'; import { randomInt } from '@aztec/foundation/crypto'; import { createDebugLogger } from '@aztec/foundation/log'; import { sleep } from '@aztec/foundation/sleep'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type AztecKVStore } from '@aztec/kv-store'; import { openTmpStore } from '@aztec/kv-store/utils'; import { INITIAL_LEAF, Pedersen, SHA256Trunc, StandardTree } from '@aztec/merkle-tree'; import { jest } from '@jest/globals'; import { mock } from 'jest-mock-extended'; -import { MerkleTreeDb, MerkleTrees, WorldStateConfig } from '../index.js'; +import { type MerkleTreeDb, MerkleTrees, type WorldStateConfig } from '../index.js'; import { ServerWorldStateSynchronizer } from './server_world_state_synchronizer.js'; import { WorldStateRunningState } from './world_state_synchronizer.js'; diff --git a/yarn-project/world-state/src/synchronizer/server_world_state_synchronizer.ts b/yarn-project/world-state/src/synchronizer/server_world_state_synchronizer.ts index 001fd91abc2f..e8f3edb616a8 100644 --- a/yarn-project/world-state/src/synchronizer/server_world_state_synchronizer.ts +++ b/yarn-project/world-state/src/synchronizer/server_world_state_synchronizer.ts @@ -1,19 +1,27 @@ -import { L1ToL2MessageSource, L2Block, L2BlockDownloader, L2BlockSource } from '@aztec/circuit-types'; -import { L2BlockHandledStats } from '@aztec/circuit-types/stats'; +import { type L1ToL2MessageSource, L2Block, L2BlockDownloader, type L2BlockSource } from '@aztec/circuit-types'; +import { type L2BlockHandledStats } from '@aztec/circuit-types/stats'; import { L1_TO_L2_MSG_SUBTREE_HEIGHT } from '@aztec/circuits.js/constants'; import { Fr } from '@aztec/foundation/fields'; import { SerialQueue } from '@aztec/foundation/fifo'; import { createDebugLogger } from '@aztec/foundation/log'; import { elapsed } from '@aztec/foundation/timer'; -import { AztecKVStore, AztecSingleton } from '@aztec/kv-store'; +import { type AztecKVStore, type AztecSingleton } from '@aztec/kv-store'; import { openTmpStore } from '@aztec/kv-store/utils'; import { SHA256Trunc, StandardTree } from '@aztec/merkle-tree'; -import { HandleL2BlockAndMessagesResult, MerkleTreeOperations, MerkleTrees } from '../world-state-db/index.js'; +import { + type HandleL2BlockAndMessagesResult, + type MerkleTreeOperations, + MerkleTrees, +} from '../world-state-db/index.js'; import { MerkleTreeOperationsFacade } from '../world-state-db/merkle_tree_operations_facade.js'; import { MerkleTreeSnapshotOperationsFacade } from '../world-state-db/merkle_tree_snapshot_operations_facade.js'; -import { WorldStateConfig } from './config.js'; -import { WorldStateRunningState, WorldStateStatus, WorldStateSynchronizer } from './world_state_synchronizer.js'; +import { type WorldStateConfig } from './config.js'; +import { + WorldStateRunningState, + type WorldStateStatus, + type WorldStateSynchronizer, +} from './world_state_synchronizer.js'; /** * Synchronizes the world state with the L2 blocks from a L2BlockSource. diff --git a/yarn-project/world-state/src/synchronizer/world_state_synchronizer.ts b/yarn-project/world-state/src/synchronizer/world_state_synchronizer.ts index 51b8e1d4880d..24dfa22226c4 100644 --- a/yarn-project/world-state/src/synchronizer/world_state_synchronizer.ts +++ b/yarn-project/world-state/src/synchronizer/world_state_synchronizer.ts @@ -1,4 +1,4 @@ -import { MerkleTreeOperations } from '../world-state-db/index.js'; +import { type MerkleTreeOperations } from '../world-state-db/index.js'; /** * Defines the possible states of the world state synchronizer. diff --git a/yarn-project/world-state/src/world-state-db/merkle_tree_db.ts b/yarn-project/world-state/src/world-state-db/merkle_tree_db.ts index 7df7a084f323..552e769e4cc4 100644 --- a/yarn-project/world-state/src/world-state-db/merkle_tree_db.ts +++ b/yarn-project/world-state/src/world-state-db/merkle_tree_db.ts @@ -1,8 +1,8 @@ import { MerkleTreeId } from '@aztec/circuit-types'; import { Fr, MAX_NEW_NULLIFIERS_PER_TX, MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX } from '@aztec/circuits.js'; -import { IndexedTreeSnapshot, TreeSnapshot } from '@aztec/merkle-tree'; +import { type IndexedTreeSnapshot, type TreeSnapshot } from '@aztec/merkle-tree'; -import { MerkleTreeOperations } from './merkle_tree_operations.js'; +import { type MerkleTreeOperations } from './merkle_tree_operations.js'; /** * diff --git a/yarn-project/world-state/src/world-state-db/merkle_tree_operations.ts b/yarn-project/world-state/src/world-state-db/merkle_tree_operations.ts index 3cacb652fe00..69eb6410d8f2 100644 --- a/yarn-project/world-state/src/world-state-db/merkle_tree_operations.ts +++ b/yarn-project/world-state/src/world-state-db/merkle_tree_operations.ts @@ -1,8 +1,8 @@ import { L2Block, MerkleTreeId, SiblingPath } from '@aztec/circuit-types'; import { Fr, Header, NullifierLeafPreimage, StateReference } from '@aztec/circuits.js'; import { createDebugLogger } from '@aztec/foundation/log'; -import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; -import { AppendOnlyTree, BatchInsertionResult, IndexedTree } from '@aztec/merkle-tree'; +import { type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; +import { type AppendOnlyTree, type BatchInsertionResult, type IndexedTree } from '@aztec/merkle-tree'; /** * Type alias for the nullifier tree ID. diff --git a/yarn-project/world-state/src/world-state-db/merkle_tree_operations_facade.ts b/yarn-project/world-state/src/world-state-db/merkle_tree_operations_facade.ts index aad3c019a6be..632fa6b19a54 100644 --- a/yarn-project/world-state/src/world-state-db/merkle_tree_operations_facade.ts +++ b/yarn-project/world-state/src/world-state-db/merkle_tree_operations_facade.ts @@ -1,15 +1,15 @@ import { L2Block, MerkleTreeId, SiblingPath } from '@aztec/circuit-types'; import { Fr, Header, NullifierLeafPreimage, StateReference } from '@aztec/circuits.js'; -import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; -import { BatchInsertionResult } from '@aztec/merkle-tree'; +import { type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; +import { type BatchInsertionResult } from '@aztec/merkle-tree'; -import { MerkleTreeDb } from './merkle_tree_db.js'; +import { type MerkleTreeDb } from './merkle_tree_db.js'; import { - HandleL2BlockAndMessagesResult, - IndexedTreeId, - MerkleTreeLeafType, - MerkleTreeOperations, - TreeInfo, + type HandleL2BlockAndMessagesResult, + type IndexedTreeId, + type MerkleTreeLeafType, + type MerkleTreeOperations, + type TreeInfo, } from './merkle_tree_operations.js'; /** diff --git a/yarn-project/world-state/src/world-state-db/merkle_tree_snapshot_operations_facade.ts b/yarn-project/world-state/src/world-state-db/merkle_tree_snapshot_operations_facade.ts index 188213d66c74..ebf0a9b3f7ea 100644 --- a/yarn-project/world-state/src/world-state-db/merkle_tree_snapshot_operations_facade.ts +++ b/yarn-project/world-state/src/world-state-db/merkle_tree_snapshot_operations_facade.ts @@ -1,15 +1,15 @@ import { MerkleTreeId, SiblingPath } from '@aztec/circuit-types'; import { AppendOnlyTreeSnapshot, Fr, Header, PartialStateReference, StateReference } from '@aztec/circuits.js'; -import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; -import { BatchInsertionResult, IndexedTreeSnapshot } from '@aztec/merkle-tree'; +import { type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; +import { type BatchInsertionResult, type IndexedTreeSnapshot } from '@aztec/merkle-tree'; -import { MerkleTreeDb, TreeSnapshots } from './merkle_tree_db.js'; +import { type MerkleTreeDb, type TreeSnapshots } from './merkle_tree_db.js'; import { - HandleL2BlockAndMessagesResult, - IndexedTreeId, - MerkleTreeLeafType, - MerkleTreeOperations, - TreeInfo, + type HandleL2BlockAndMessagesResult, + type IndexedTreeId, + type MerkleTreeLeafType, + type MerkleTreeOperations, + type TreeInfo, } from './merkle_tree_operations.js'; /** diff --git a/yarn-project/world-state/src/world-state-db/merkle_trees.ts b/yarn-project/world-state/src/world-state-db/merkle_trees.ts index 352d94e8fb72..d1265270dda2 100644 --- a/yarn-project/world-state/src/world-state-db/merkle_trees.ts +++ b/yarn-project/world-state/src/world-state-db/merkle_trees.ts @@ -23,36 +23,36 @@ import { } from '@aztec/circuits.js'; import { padArrayEnd } from '@aztec/foundation/collection'; import { SerialQueue } from '@aztec/foundation/fifo'; -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; -import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; -import { AztecKVStore } from '@aztec/kv-store'; +import { type DebugLogger, createDebugLogger } from '@aztec/foundation/log'; +import { type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; +import { type AztecKVStore } from '@aztec/kv-store'; import { - AppendOnlyTree, - BatchInsertionResult, - IndexedTree, + type AppendOnlyTree, + type BatchInsertionResult, + type IndexedTree, Pedersen, StandardIndexedTree, StandardTree, - UpdateOnlyTree, + type UpdateOnlyTree, getTreeMeta, loadTree, newTree, } from '@aztec/merkle-tree'; -import { Hasher } from '@aztec/types/interfaces'; +import { type Hasher } from '@aztec/types/interfaces'; import { INITIAL_NULLIFIER_TREE_SIZE, INITIAL_PUBLIC_DATA_TREE_SIZE, - MerkleTreeDb, - TreeSnapshots, + type MerkleTreeDb, + type TreeSnapshots, } from './merkle_tree_db.js'; import { - HandleL2BlockAndMessagesResult, - IndexedTreeId, - MerkleTreeLeafType, - MerkleTreeMap, - MerkleTreeOperations, - TreeInfo, + type HandleL2BlockAndMessagesResult, + type IndexedTreeId, + type MerkleTreeLeafType, + type MerkleTreeMap, + type MerkleTreeOperations, + type TreeInfo, } from './merkle_tree_operations.js'; import { MerkleTreeOperationsFacade } from './merkle_tree_operations_facade.js'; diff --git a/yarn.lock b/yarn.lock deleted file mode 100644 index fb57ccd13afb..000000000000 --- a/yarn.lock +++ /dev/null @@ -1,4 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - -