diff --git a/yarn-project/accounts/src/defaults/account_contract.ts b/yarn-project/accounts/src/defaults/account_contract.ts index fe270c5acf7..f2842c9ac0f 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 { CompleteAddress } from '@aztec/circuit-types'; -import { ContractArtifact } from '@aztec/foundation/abi'; -import { NodeInfo } from '@aztec/types/interfaces'; +import { type AccountContract, type AccountInterface, type AuthWitnessProvider } from '@aztec/aztec.js/account'; +import { type CompleteAddress } from '@aztec/circuit-types'; +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 e4bcf6abc5f..44e68db64e2 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 { AztecAddress, CompleteAddress, Fr } from '@aztec/circuits.js'; +import { type AccountInterface, type AuthWitnessProvider } from '@aztec/aztec.js/account'; +import { type EntrypointInterface, type FeeOptions } from '@aztec/aztec.js/entrypoint'; +import { type AuthWitness, type FunctionCall, type TxExecutionRequest } from '@aztec/circuit-types'; +import { type AztecAddress, type 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 7919ecf62a3..5c641f2acf4 100644 --- a/yarn-project/accounts/src/ecdsa/account_contract.ts +++ b/yarn-project/accounts/src/ecdsa/account_contract.ts @@ -1,8 +1,8 @@ -import { AuthWitnessProvider } from '@aztec/aztec.js/account'; -import { AuthWitness, CompleteAddress } from '@aztec/circuit-types'; +import { type AuthWitnessProvider } from '@aztec/aztec.js/account'; +import { AuthWitness, type CompleteAddress } from '@aztec/circuit-types'; import { Ecdsa } from '@aztec/circuits.js/barretenberg'; -import { ContractArtifact } from '@aztec/foundation/abi'; -import { Fr } from '@aztec/foundation/fields'; +import { type ContractArtifact } from '@aztec/foundation/abi'; +import { type Fr } from '@aztec/foundation/fields'; import { DefaultAccountContract } from '../defaults/account_contract.js'; import { EcdsaAccountContractArtifact } from './artifact.js'; diff --git a/yarn-project/accounts/src/ecdsa/artifact.ts b/yarn-project/accounts/src/ecdsa/artifact.ts index 4dd2fd60dd6..54ec3212dd0 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 3bd3c5d215d..4efcf941dcc 100644 --- a/yarn-project/accounts/src/ecdsa/index.ts +++ b/yarn-project/accounts/src/ecdsa/index.ts @@ -4,10 +4,10 @@ * * @packageDocumentation */ -import { AccountManager, Salt } from '@aztec/aztec.js/account'; -import { AccountWallet, getWallet } from '@aztec/aztec.js/wallet'; -import { GrumpkinPrivateKey, PXE } from '@aztec/circuit-types'; -import { AztecAddress } from '@aztec/circuits.js'; +import { AccountManager, type Salt } from '@aztec/aztec.js/account'; +import { type AccountWallet, getWallet } from '@aztec/aztec.js/wallet'; +import { type GrumpkinPrivateKey, type PXE } from '@aztec/circuit-types'; +import { type 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 aa651a073f1..cac79664b28 100644 --- a/yarn-project/accounts/src/schnorr/account_contract.ts +++ b/yarn-project/accounts/src/schnorr/account_contract.ts @@ -1,8 +1,8 @@ -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, type CompleteAddress, type GrumpkinPrivateKey } from '@aztec/circuit-types'; import { Schnorr } from '@aztec/circuits.js/barretenberg'; -import { ContractArtifact } from '@aztec/foundation/abi'; -import { Fr } from '@aztec/foundation/fields'; +import { type ContractArtifact } from '@aztec/foundation/abi'; +import { type Fr } from '@aztec/foundation/fields'; import { DefaultAccountContract } from '../defaults/account_contract.js'; import { SchnorrAccountContractArtifact } from './artifact.js'; diff --git a/yarn-project/accounts/src/schnorr/artifact.ts b/yarn-project/accounts/src/schnorr/artifact.ts index 1d9088bf3ca..f7cac3337f7 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 ce44cdb3eab..7e752fce6ac 100644 --- a/yarn-project/accounts/src/schnorr/index.ts +++ b/yarn-project/accounts/src/schnorr/index.ts @@ -4,10 +4,10 @@ * * @packageDocumentation */ -import { AccountManager, Salt } from '@aztec/aztec.js/account'; -import { AccountWallet, getWallet } from '@aztec/aztec.js/wallet'; -import { GrumpkinPrivateKey, PXE } from '@aztec/circuit-types'; -import { AztecAddress } from '@aztec/circuits.js'; +import { AccountManager, type Salt } from '@aztec/aztec.js/account'; +import { type AccountWallet, getWallet } from '@aztec/aztec.js/wallet'; +import { type GrumpkinPrivateKey, type PXE } from '@aztec/circuit-types'; +import { type 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 1334c6791dc..393bbab82d8 100644 --- a/yarn-project/accounts/src/single_key/account_contract.ts +++ b/yarn-project/accounts/src/single_key/account_contract.ts @@ -1,10 +1,10 @@ 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, type 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 { Fr } from '@aztec/foundation/fields'; +import { type ContractArtifact } from '@aztec/foundation/abi'; +import { type Fr } from '@aztec/foundation/fields'; import { DefaultAccountContract } from '../defaults/account_contract.js'; import { SchnorrSingleKeyAccountContractArtifact } from './artifact.js'; diff --git a/yarn-project/accounts/src/single_key/artifact.ts b/yarn-project/accounts/src/single_key/artifact.ts index 954c5f199e7..55a819dc570 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 bf20f5da07c..1293f97fd6d 100644 --- a/yarn-project/accounts/src/single_key/index.ts +++ b/yarn-project/accounts/src/single_key/index.ts @@ -4,10 +4,10 @@ * * @packageDocumentation */ -import { AccountManager, Salt } from '@aztec/aztec.js/account'; -import { AccountWallet, getWallet } from '@aztec/aztec.js/wallet'; -import { GrumpkinPrivateKey, PXE } from '@aztec/circuit-types'; -import { AztecAddress } from '@aztec/circuits.js'; +import { AccountManager, type Salt } from '@aztec/aztec.js/account'; +import { type AccountWallet, getWallet } from '@aztec/aztec.js/wallet'; +import { type GrumpkinPrivateKey, type PXE } from '@aztec/circuit-types'; +import { type 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 a6a4b7bfe5c..f19e9383a6c 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 AccountWalletWithPrivateKey } from '@aztec/aztec.js/wallet'; +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 8f5a8040190..17c6f8dc6bd 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 AccountWalletWithPrivateKey } from '@aztec/aztec.js/wallet'; +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 3a4e4428a4c..6657106ef64 100644 --- a/yarn-project/archiver/src/archiver/archiver.test.ts +++ b/yarn-project/archiver/src/archiver/archiver.test.ts @@ -1,14 +1,22 @@ -import { Body, EncryptedL2BlockL2Logs, L2Block, LogType, UnencryptedL2BlockL2Logs } from '@aztec/circuit-types'; +import { type Body, EncryptedL2BlockL2Logs, L2Block, LogType, UnencryptedL2BlockL2Logs } from '@aztec/circuit-types'; import { EthAddress } from '@aztec/foundation/eth-address'; 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 { AvailabilityOracleAbi, type InboxAbi, RollupAbi } from '@aztec/l1-artifacts'; + +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 b0c994cb2d0..989a765d912 100644 --- a/yarn-project/archiver/src/archiver/archiver.ts +++ b/yarn-project/archiver/src/archiver/archiver.ts @@ -1,19 +1,19 @@ import { - FromLogType, - GetUnencryptedLogsResponse, - L1ToL2MessageSource, + type FromLogType, + type GetUnencryptedLogsResponse, + type L1ToL2MessageSource, L2Block, - L2BlockL2Logs, - L2BlockSource, - L2LogsSource, - LogFilter, - LogType, - TxEffect, - TxHash, - TxReceipt, - UnencryptedL2Log, + type L2BlockL2Logs, + type L2BlockSource, + type L2LogsSource, + type LogFilter, + type LogType, + type TxEffect, + type TxHash, + type TxReceipt, + type UnencryptedL2Log, } from '@aztec/circuit-types'; -import { ContractClassRegisteredEvent, FunctionSelector } from '@aztec/circuits.js'; +import { ContractClassRegisteredEvent, type FunctionSelector } from '@aztec/circuits.js'; import { ContractInstanceDeployedEvent, PrivateFunctionBroadcastedEvent, @@ -22,28 +22,28 @@ import { isValidUnconstrainedFunctionMembershipProof, } from '@aztec/circuits.js/contract'; import { createEthereumChain } from '@aztec/ethereum'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { EthAddress } from '@aztec/foundation/eth-address'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; +import { type 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 ad6a792c75f..0188575228f 100644 --- a/yarn-project/archiver/src/archiver/archiver_store.ts +++ b/yarn-project/archiver/src/archiver/archiver_store.ts @@ -1,28 +1,28 @@ import { - Body, - EncryptedL2BlockL2Logs, - FromLogType, - GetUnencryptedLogsResponse, - InboxLeaf, - L2Block, - L2BlockL2Logs, - LogFilter, - LogType, - TxEffect, - TxHash, - TxReceipt, - UnencryptedL2BlockL2Logs, + type Body, + type EncryptedL2BlockL2Logs, + type FromLogType, + type GetUnencryptedLogsResponse, + type InboxLeaf, + type L2Block, + type L2BlockL2Logs, + type LogFilter, + type LogType, + type TxEffect, + type TxHash, + type TxReceipt, + type UnencryptedL2BlockL2Logs, } from '@aztec/circuit-types'; -import { Fr } from '@aztec/circuits.js'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type Fr } from '@aztec/circuits.js'; +import { type 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 1117ee277b5..9b19267294a 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 8a741ff31ac..fe1fb79e848 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 86f1fc6e8bf..46dd01160f2 100644 --- a/yarn-project/archiver/src/archiver/data_retrieval.ts +++ b/yarn-project/archiver/src/archiver/data_retrieval.ts @@ -1,8 +1,8 @@ -import { Body, InboxLeaf } from '@aztec/circuit-types'; -import { AppendOnlyTreeSnapshot, Header } from '@aztec/circuits.js'; -import { EthAddress } from '@aztec/foundation/eth-address'; +import { type Body, type InboxLeaf } from '@aztec/circuit-types'; +import { type AppendOnlyTreeSnapshot, type Header } from '@aztec/circuits.js'; +import { type 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 4c04f3f4410..88c91b7dcf0 100644 --- a/yarn-project/archiver/src/archiver/eth_log_handlers.ts +++ b/yarn-project/archiver/src/archiver/eth_log_handlers.ts @@ -1,11 +1,11 @@ import { Body, InboxLeaf } from '@aztec/circuit-types'; import { AppendOnlyTreeSnapshot, Header } from '@aztec/circuits.js'; -import { EthAddress } from '@aztec/foundation/eth-address'; +import { type EthAddress } from '@aztec/foundation/eth-address'; 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/kv_archiver_store/block_body_store.ts b/yarn-project/archiver/src/archiver/kv_archiver_store/block_body_store.ts index 11518efb113..4dce18fca50 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 233089080d6..ef8e91839a9 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,10 +1,10 @@ -import { L2Block, TxEffect, TxHash, TxReceipt, TxStatus } from '@aztec/circuit-types'; -import { AppendOnlyTreeSnapshot, AztecAddress, Header, INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js'; +import { L2Block, type TxEffect, type TxHash, TxReceipt, TxStatus } from '@aztec/circuit-types'; +import { AppendOnlyTreeSnapshot, type 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 { BlockBodyStore } from './block_body_store.js'; +import { type DataRetrieval } from '../data_retrieval.js'; +import { type 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 0d17369dcd6..8a4525a1228 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 fb020eb3c35..915363d0ae1 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 AztecAddress } from '@aztec/circuits.js'; +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 ab8c12d795d..c01b8d2202b 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,31 +1,31 @@ import { - Body, - EncryptedL2BlockL2Logs, - FromLogType, - GetUnencryptedLogsResponse, - InboxLeaf, - L2Block, - L2BlockL2Logs, - LogFilter, - LogType, - TxEffect, - TxHash, - TxReceipt, - UnencryptedL2BlockL2Logs, + type Body, + type EncryptedL2BlockL2Logs, + type FromLogType, + type GetUnencryptedLogsResponse, + type InboxLeaf, + type L2Block, + type L2BlockL2Logs, + type LogFilter, + type LogType, + type TxEffect, + type TxHash, + type TxReceipt, + type UnencryptedL2BlockL2Logs, } from '@aztec/circuit-types'; -import { Fr } from '@aztec/circuits.js'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type Fr } from '@aztec/circuits.js'; +import { type 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 cada02c9979..26590fb626c 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,20 +1,20 @@ import { EncryptedL2BlockL2Logs, ExtendedUnencryptedL2Log, - FromLogType, - GetUnencryptedLogsResponse, - L2BlockL2Logs, - LogFilter, + type FromLogType, + type GetUnencryptedLogsResponse, + type L2BlockL2Logs, + type LogFilter, LogId, LogType, UnencryptedL2BlockL2Logs, - UnencryptedL2Log, + type UnencryptedL2Log, } 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'; +import { type BlockStore } from './block_store.js'; /** * A store for logs 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 e85a36e2df6..8b6023ad65c 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 @@ -1,4 +1,4 @@ -import { InboxLeaf } from '@aztec/circuit-types'; +import { type InboxLeaf } from '@aztec/circuit-types'; import { Fr, INITIAL_L2_BLOCK_NUM, @@ -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/l1_to_l2_message_store.ts b/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.ts index e311e1b8ed3..a922e62067e 100644 --- a/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.ts +++ b/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.ts @@ -1,10 +1,10 @@ -import { InboxLeaf } from '@aztec/circuit-types'; +import { type InboxLeaf } from '@aztec/circuit-types'; import { INITIAL_L2_BLOCK_NUM, L1_TO_L2_MSG_SUBTREE_HEIGHT, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, } from '@aztec/circuits.js/constants'; -import { Fr } from '@aztec/foundation/fields'; +import { type Fr } from '@aztec/foundation/fields'; /** * A simple in-memory implementation of an L1 to L2 message store. 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 38707f67190..7c90a611c2f 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 43d197cc576..90ffda20554 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 @@ -1,33 +1,33 @@ import { - Body, - EncryptedL2BlockL2Logs, + type Body, + type EncryptedL2BlockL2Logs, ExtendedUnencryptedL2Log, - FromLogType, - GetUnencryptedLogsResponse, - InboxLeaf, - L2Block, + type FromLogType, + type GetUnencryptedLogsResponse, + type InboxLeaf, + type L2Block, L2BlockContext, - L2BlockL2Logs, - LogFilter, + type L2BlockL2Logs, + type LogFilter, LogId, LogType, - TxEffect, - TxHash, + type TxEffect, + type TxHash, TxReceipt, TxStatus, - UnencryptedL2BlockL2Logs, + type UnencryptedL2BlockL2Logs, } from '@aztec/circuit-types'; import { Fr, INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type 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 2e456cc6218..53fb5775103 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/archiver/src/rpc/archiver_server.ts b/yarn-project/archiver/src/rpc/archiver_server.ts index 8e96db9bcbb..02a5472e46c 100644 --- a/yarn-project/archiver/src/rpc/archiver_server.ts +++ b/yarn-project/archiver/src/rpc/archiver_server.ts @@ -10,7 +10,7 @@ import { import { EthAddress, Fr } from '@aztec/circuits.js'; import { JsonRpcServer } from '@aztec/foundation/json-rpc/server'; -import { Archiver } from '../archiver/archiver.js'; +import { type Archiver } from '../archiver/archiver.js'; /** * Wrap an Archiver instance with a JSON RPC HTTP server. diff --git a/yarn-project/aztec-faucet/src/bin/index.ts b/yarn-project/aztec-faucet/src/bin/index.ts index dd93e9655f1..ad96b2839b6 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 07f79f82383..125ec88b287 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 7158662dfc5..dd283644826 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 a972190d03b..309a9ef3bcc 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 f905fbe3186..e14012e3b29 100644 --- a/yarn-project/aztec-node/src/aztec-node/server.ts +++ b/yarn-project/aztec-node/src/aztec-node/server.ts @@ -1,71 +1,75 @@ -import { ArchiveSource, Archiver, KVArchiverDataStore, createArchiverClient } from '@aztec/archiver'; +import { type ArchiveSource, Archiver, KVArchiverDataStore, createArchiverClient } from '@aztec/archiver'; import { - AztecNode, - FromLogType, - GetUnencryptedLogsResponse, - L1ToL2MessageSource, - L2Block, - L2BlockL2Logs, - L2BlockNumber, - L2BlockSource, - L2LogsSource, - LogFilter, + type AztecNode, + type FromLogType, + type GetUnencryptedLogsResponse, + type L1ToL2MessageSource, + type L2Block, + type L2BlockL2Logs, + type L2BlockNumber, + type L2BlockSource, + type L2LogsSource, + type LogFilter, LogType, MerkleTreeId, NullifierMembershipWitness, - ProverClient, + type ProverClient, PublicDataWitness, - SequencerConfig, - SiblingPath, - Tx, - TxEffect, - TxHash, + type SequencerConfig, + type SiblingPath, + type Tx, + type TxEffect, + type TxHash, TxReceipt, TxStatus, partitionReverts, } from '@aztec/circuit-types'; import { - ARCHIVE_HEIGHT, + type ARCHIVE_HEIGHT, EthAddress, Fr, - Header, + type Header, INITIAL_L2_BLOCK_NUM, - L1_TO_L2_MSG_TREE_HEIGHT, + type L1_TO_L2_MSG_TREE_HEIGHT, L2_TO_L1_MESSAGE_LENGTH, - NOTE_HASH_TREE_HEIGHT, - NULLIFIER_TREE_HEIGHT, + type NOTE_HASH_TREE_HEIGHT, + type NULLIFIER_TREE_HEIGHT, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, - NullifierLeafPreimage, - PUBLIC_DATA_TREE_HEIGHT, - PublicDataTreeLeafPreimage, + type NullifierLeafPreimage, + type PUBLIC_DATA_TREE_HEIGHT, + type 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 8cf8de0b01f..0ccaf6be6e6 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 7d265c0f2f6..e1688b79198 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 f85afacf4b7..0711292bbac 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 CompleteAddress } from '@aztec/circuit-types'; +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 19f673839ee..1e17feb770a 100644 --- a/yarn-project/aztec.js/src/account/index.ts +++ b/yarn-project/aztec.js/src/account/index.ts @@ -6,7 +6,7 @@ * * @packageDocumentation */ -import { Fr } from '@aztec/circuits.js'; +import { type Fr } from '@aztec/circuits.js'; export { AccountContract } from './contract.js'; export { AccountInterface, AuthWitnessProvider } from './interface.js'; diff --git a/yarn-project/aztec.js/src/account/interface.ts b/yarn-project/aztec.js/src/account/interface.ts index 4a3b90e2444..5a5ab2cf28e 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 { AztecAddress } from '@aztec/circuits.js'; -import { Fr } from '@aztec/foundation/fields'; +import { type AuthWitness, type CompleteAddress, type FunctionCall } from '@aztec/circuit-types'; +import { type AztecAddress } from '@aztec/circuits.js'; +import { type Fr } from '@aztec/foundation/fields'; -import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js'; -import { EntrypointInterface } from '../entrypoint/entrypoint.js'; +import { type ContractFunctionInteraction } from '../contract/contract_function_interaction.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 a5b7bf963cb..b618abf94c8 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 5fd45b835a8..cfaa577ea8e 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 TxHash, type TxReceipt } from '@aztec/circuit-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 7814dafa78f..d18bc8b38d2 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 { DeployMethod } from '../contract/deploy_method.js'; -import { DefaultWaitOpts, WaitOpts } from '../contract/sent_tx.js'; +import { type AccountContract } from '../account/contract.js'; +import { type Salt } from '../account/index.js'; +import { type AccountInterface } from '../account/interface.js'; +import { type DeployMethod } from '../contract/deploy_method.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/contract/base_contract_interaction.ts b/yarn-project/aztec.js/src/contract/base_contract_interaction.ts index f2949e50f71..1cc594b055a 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, type Tx, type 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 4bfd2187952..b6a9c29f5c5 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, type 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 758cf9188e2..438bef2048c 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 7b2c692385d..449d76b99a0 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 { type Tx, type TxExecutionRequest, type TxHash, type 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 67501983cb0..36b4c831a4b 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 { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type PublicKey } from '@aztec/circuit-types'; +import { type ContractArtifact } from '@aztec/foundation/abi'; +import { type 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 2767a42e0d1..a49a7205c13 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 f03b3340763..2fb1f6ba3a5 100644 --- a/yarn-project/aztec.js/src/contract/contract_function_interaction.ts +++ b/yarn-project/aztec.js/src/contract/contract_function_interaction.ts @@ -1,8 +1,8 @@ -import { FunctionCall, TxExecutionRequest } from '@aztec/circuit-types'; -import { AztecAddress, FunctionData } from '@aztec/circuits.js'; -import { FunctionAbi, FunctionType, encodeArguments } from '@aztec/foundation/abi'; +import { type FunctionCall, type TxExecutionRequest } from '@aztec/circuit-types'; +import { type AztecAddress, FunctionData } from '@aztec/circuits.js'; +import { type FunctionAbi, FunctionType, encodeArguments } from '@aztec/foundation/abi'; -import { Wallet } from '../account/wallet.js'; +import { type Wallet } from '../account/wallet.js'; import { BaseContractInteraction, SendMethodOptions } from './base_contract_interaction.js'; export { SendMethodOptions }; diff --git a/yarn-project/aztec.js/src/contract/deploy_method.ts b/yarn-project/aztec.js/src/contract/deploy_method.ts index 0cf02ecab9c..44ac1f203b7 100644 --- a/yarn-project/aztec.js/src/contract/deploy_method.ts +++ b/yarn-project/aztec.js/src/contract/deploy_method.ts @@ -1,22 +1,22 @@ -import { FunctionCall, PublicKey, Tx, TxExecutionRequest } from '@aztec/circuit-types'; +import { type FunctionCall, type PublicKey, type Tx, type TxExecutionRequest } from '@aztec/circuit-types'; import { AztecAddress, computePartialAddress, getContractClassFromArtifact, getContractInstanceFromDeployParams, } from '@aztec/circuits.js'; -import { ContractArtifact, FunctionArtifact, getInitializer } from '@aztec/foundation/abi'; -import { EthAddress } from '@aztec/foundation/eth-address'; -import { Fr } from '@aztec/foundation/fields'; +import { type ContractArtifact, type FunctionArtifact, getInitializer } from '@aztec/foundation/abi'; +import { type EthAddress } from '@aztec/foundation/eth-address'; +import { type 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 { type ContractBase } from './contract_base.js'; import { ContractFunctionInteraction } from './contract_function_interaction.js'; import { DeploySentTx } from './deploy_sent_tx.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 a9898e71267..224a2adff5e 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 { AztecAddress } from '@aztec/circuits.js'; -import { FieldsOf } from '@aztec/foundation/types'; -import { ContractInstanceWithAddress } from '@aztec/types/contracts'; +import { type PXE, type TxHash, type TxReceipt } from '@aztec/circuit-types'; +import { type AztecAddress } from '@aztec/circuits.js'; +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 { type ContractBase } from './contract_base.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 b9f2b78bea1..649cd6f9e8d 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, type 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 03e9da395de..78178febf9d 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 { + type ExtendedNote, + type GetUnencryptedLogsResponse, + type PXE, + type TxHash, + type 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 d010d7121c7..e47fb3b3266 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 e748629b5ad..6bb647af033 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, type 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 ContractFunctionInteraction } from '../contract/contract_function_interaction.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 09420c60401..bd0f04ea74f 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 { AztecAddress } from '@aztec/circuits.js'; -import { ContractArtifact } from '@aztec/foundation/abi'; +import { type PublicKey } from '@aztec/circuit-types'; +import { type AztecAddress } from '@aztec/circuits.js'; +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 aac32143c17..c6ff64a9992 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 ContractFunctionInteraction } from '../contract/contract_function_interaction.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 c7d59c59d63..9fc681f8a55 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 8d5efd0107f..8ba9c99f55a 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 ContractFunctionInteraction } from '../contract/contract_function_interaction.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 7315d4f6aa0..a88cfef9e7a 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 d32e9b768af..ece23e67924 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 { Fr } from '@aztec/foundation/fields'; +import { type FunctionCall, type TxExecutionRequest } from '@aztec/circuit-types'; +import { type 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 034ce3ad312..cc67345b2c0 100644 --- a/yarn-project/aztec.js/src/fee/fee_payment_method.ts +++ b/yarn-project/aztec.js/src/fee/fee_payment_method.ts @@ -1,6 +1,6 @@ -import { FunctionCall } from '@aztec/circuit-types'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { Fr } from '@aztec/foundation/fields'; +import { type FunctionCall } from '@aztec/circuit-types'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; +import { type Fr } from '@aztec/foundation/fields'; /** * Holds information about how the fee for a transaction is to be paid. 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 21aba74b258..f1b77c2037c 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 { AztecAddress, FunctionData } from '@aztec/circuits.js'; +import { type FunctionCall } from '@aztec/circuit-types'; +import { type AztecAddress, FunctionData } from '@aztec/circuits.js'; import { FunctionSelector } from '@aztec/foundation/abi'; -import { Fr } from '@aztec/foundation/fields'; +import { type 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 bc4c998ce7d..ce4e3ae1242 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 { type 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 ed44beb91eb..9dbd4b416d6 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,12 +1,12 @@ -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'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; 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 AccountWallet } from '../wallet/account_wallet.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/rpc_clients/pxe_client.ts b/yarn-project/aztec.js/src/rpc_clients/pxe_client.ts index 59ced8b1cc4..1aacaf16691 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/abi_types.ts b/yarn-project/aztec.js/src/utils/abi_types.ts index 7be0b3896ba..71b88b89848 100644 --- a/yarn-project/aztec.js/src/utils/abi_types.ts +++ b/yarn-project/aztec.js/src/utils/abi_types.ts @@ -1,4 +1,4 @@ -import { AztecAddress, EthAddress, Fr, FunctionSelector } from '@aztec/circuits.js'; +import { type AztecAddress, type EthAddress, type Fr, type FunctionSelector } from '@aztec/circuits.js'; /** Any type that can be converted into a field for a contract call. */ export type FieldLike = Fr | Buffer | bigint | number | { /** Converts to field */ toField: () => Fr }; diff --git a/yarn-project/aztec.js/src/utils/account.ts b/yarn-project/aztec.js/src/utils/account.ts index 35c437cc5ac..c128d8e227e 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 { type 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 0979524b9dd..562c73ca593 100644 --- a/yarn-project/aztec.js/src/utils/authwit.ts +++ b/yarn-project/aztec.js/src/utils/authwit.ts @@ -1,5 +1,5 @@ -import { FunctionCall, PackedArguments } from '@aztec/circuit-types'; -import { AztecAddress, Fr, GeneratorIndex } from '@aztec/circuits.js'; +import { type FunctionCall, PackedArguments } from '@aztec/circuit-types'; +import { type AztecAddress, type Fr, GeneratorIndex } from '@aztec/circuits.js'; import { pedersenHash } from '@aztec/foundation/crypto'; // docs:start:authwit_computeAuthWitMessageHash diff --git a/yarn-project/aztec.js/src/utils/cheat_codes.ts b/yarn-project/aztec.js/src/utils/cheat_codes.ts index 49f91a3247a..b3a64e92ec8 100644 --- a/yarn-project/aztec.js/src/utils/cheat_codes.ts +++ b/yarn-project/aztec.js/src/utils/cheat_codes.ts @@ -1,5 +1,5 @@ -import { Note, PXE } from '@aztec/circuit-types'; -import { AztecAddress, EthAddress, Fr } from '@aztec/circuits.js'; +import { type Note, type PXE } from '@aztec/circuit-types'; +import { type AztecAddress, type EthAddress, Fr } from '@aztec/circuits.js'; import { toBigIntBE, toHex } from '@aztec/foundation/bigint-buffer'; import { keccak, pedersenHash } from '@aztec/foundation/crypto'; import { createDebugLogger } from '@aztec/foundation/log'; diff --git a/yarn-project/aztec.js/src/utils/l1_contracts.ts b/yarn-project/aztec.js/src/utils/l1_contracts.ts index d0230c8f329..88b9a875234 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 5e04f00a1e2..85009e302d3 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 cd2b257d1a4..9b1a9222409 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 d2d1be43d4f..9d216d3ba27 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 { AztecAddress, Fr } from '@aztec/circuits.js'; -import { ABIParameterVisibility, FunctionAbi, FunctionType } from '@aztec/foundation/abi'; +import { type AuthWitness, type FunctionCall, type PXE, type TxExecutionRequest } from '@aztec/circuit-types'; +import { type AztecAddress, Fr } from '@aztec/circuits.js'; +import { type 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 645db1cf5db..d21bddf3e85 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 3402041b15a..76f9987c3a4 100644 --- a/yarn-project/aztec.js/src/wallet/base_wallet.ts +++ b/yarn-project/aztec.js/src/wallet/base_wallet.ts @@ -1,27 +1,33 @@ import { - AuthWitness, - ExtendedNote, - FunctionCall, - GetUnencryptedLogsResponse, - L2Block, - LogFilter, - NoteFilter, - PXE, - SyncStatus, - Tx, - TxEffect, - TxExecutionRequest, - TxHash, - TxReceipt, + type AuthWitness, + type ExtendedNote, + type FunctionCall, + type GetUnencryptedLogsResponse, + type L2Block, + type LogFilter, + type NoteFilter, + type PXE, + type SyncStatus, + type Tx, + type TxEffect, + type TxExecutionRequest, + type TxHash, + type 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 { + type AztecAddress, + type CompleteAddress, + type 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 { ContractFunctionInteraction } from '../contract/contract_function_interaction.js'; -import { FeeOptions } from '../entrypoint/entrypoint.js'; +import { type Wallet } from '../account/wallet.js'; +import { type ContractFunctionInteraction } from '../contract/contract_function_interaction.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 94e7917aece..765f0fcc74e 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 18fcfe3514c..08e8cb27c41 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 { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type PXE } from '@aztec/circuit-types'; +import { type 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 816b5a9e5ba..63ef84ae128 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 { CompleteAddress, Fr } from '@aztec/circuits.js'; +import { type AuthWitness, type FunctionCall, type PXE, type TxExecutionRequest } from '@aztec/circuit-types'; +import { type CompleteAddress, type 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 a373f6e97ba..09ba1a37fb2 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 96cee4c34ee..567f2b160b0 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 f498b42fdef..d9a28ced7a2 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 2fedcfd5645..e3f70aacebb 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 b97cc431cc8..95f4027097b 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 3a7a3f499cd..21e79359da2 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 { AccountManager } from '@aztec/aztec.js'; -import { L1ContractAddresses, l1ContractsNames } from '@aztec/ethereum'; +import { type ArchiverConfig } from '@aztec/archiver'; +import { type AztecNodeConfig } from '@aztec/aztec-node'; +import { type AccountManager } from '@aztec/aztec.js'; +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 { type GrumpkinScalar, type PXEService, type PXEServiceConfig } from '@aztec/pxe'; /** * Checks if the object has l1Contracts property diff --git a/yarn-project/aztec/src/examples/token.ts b/yarn-project/aztec/src/examples/token.ts index 582b4616c55..975692b412d 100644 --- a/yarn-project/aztec/src/examples/token.ts +++ b/yarn-project/aztec/src/examples/token.ts @@ -1,5 +1,12 @@ import { getSingleKeyAccount } from '@aztec/accounts/single_key'; -import { AccountWallet, Fr, GrumpkinScalar, Note, computeMessageSecretHash, createPXEClient } from '@aztec/aztec.js'; +import { + type AccountWallet, + Fr, + GrumpkinScalar, + Note, + computeMessageSecretHash, + createPXEClient, +} from '@aztec/aztec.js'; import { ExtendedNote } from '@aztec/circuit-types'; import { createDebugLogger } from '@aztec/foundation/log'; import { TokenContract } from '@aztec/noir-contracts.js/Token'; diff --git a/yarn-project/aztec/src/examples/util.ts b/yarn-project/aztec/src/examples/util.ts index a008e15dbd0..0d38e5beeef 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 b5ae376daa4..54952cd331a 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 { type 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 2e093883d1e..79f9795f9f4 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/function_call.ts b/yarn-project/circuit-types/src/function_call.ts index c3d8e831ad4..3f3c45ad268 100644 --- a/yarn-project/circuit-types/src/function_call.ts +++ b/yarn-project/circuit-types/src/function_call.ts @@ -1,4 +1,4 @@ -import { AztecAddress, Fr, FunctionData } from '@aztec/circuits.js'; +import { AztecAddress, type Fr, FunctionData } from '@aztec/circuits.js'; /** A request to call a function on a contract from a given address. */ export type FunctionCall = { diff --git a/yarn-project/circuit-types/src/interfaces/aztec-node.ts b/yarn-project/circuit-types/src/interfaces/aztec-node.ts index 5c03eddccbc..d19c1e59958 100644 --- a/yarn-project/circuit-types/src/interfaces/aztec-node.ts +++ b/yarn-project/circuit-types/src/interfaces/aztec-node.ts @@ -1,26 +1,32 @@ import { - ARCHIVE_HEIGHT, - Header, - L1_TO_L2_MSG_TREE_HEIGHT, - NOTE_HASH_TREE_HEIGHT, - NULLIFIER_TREE_HEIGHT, - PUBLIC_DATA_TREE_HEIGHT, + type ARCHIVE_HEIGHT, + type Header, + type L1_TO_L2_MSG_TREE_HEIGHT, + type NOTE_HASH_TREE_HEIGHT, + type NULLIFIER_TREE_HEIGHT, + type PUBLIC_DATA_TREE_HEIGHT, } from '@aztec/circuits.js'; -import { 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 L1ContractAddresses } from '@aztec/ethereum'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; +import { type Fr } from '@aztec/foundation/fields'; +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 { 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 { NullifierMembershipWitness } from './nullifier_tree.js'; -import { PublicDataWitness } from './public_data_tree.js'; +import { type L2Block } from '../l2_block.js'; +import { + type FromLogType, + type GetUnencryptedLogsResponse, + type L2BlockL2Logs, + type LogFilter, + type LogType, +} from '../logs/index.js'; +import { type MerkleTreeId } from '../merkle_tree_id.js'; +import { type SiblingPath } from '../sibling_path/index.js'; +import { type Tx, type TxHash, type TxReceipt } from '../tx/index.js'; +import { type TxEffect } from '../tx_effect.js'; +import { type SequencerConfig } from './configs.js'; +import { type L2BlockNumber } from './l2_block_number.js'; +import { type NullifierMembershipWitness } from './nullifier_tree.js'; +import { type PublicDataWitness } from './public_data_tree.js'; /** * The aztec node. diff --git a/yarn-project/circuit-types/src/interfaces/block-prover.ts b/yarn-project/circuit-types/src/interfaces/block-prover.ts index 9e02a117b22..31560b36a5b 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 { type Fr, type GlobalVariables, type Proof } from '@aztec/circuits.js'; -import { L2Block } from '../l2_block.js'; -import { ProcessedTx } from '../tx/processed_tx.js'; +import { type L2Block } from '../l2_block.js'; +import { type ProcessedTx } from '../tx/processed_tx.js'; export enum PROVING_STATUS { SUCCESS, diff --git a/yarn-project/circuit-types/src/interfaces/configs.ts b/yarn-project/circuit-types/src/interfaces/configs.ts index 80198bfca29..ee90be579d2 100644 --- a/yarn-project/circuit-types/src/interfaces/configs.ts +++ b/yarn-project/circuit-types/src/interfaces/configs.ts @@ -1,4 +1,4 @@ -import { AztecAddress, EthAddress, Fr } from '@aztec/circuits.js'; +import { type AztecAddress, type EthAddress, type Fr } from '@aztec/circuits.js'; /** * The sequencer configuration. diff --git a/yarn-project/circuit-types/src/interfaces/nullifier_tree.ts b/yarn-project/circuit-types/src/interfaces/nullifier_tree.ts index a3a1bd1a8d1..5e1dfe80a83 100644 --- a/yarn-project/circuit-types/src/interfaces/nullifier_tree.ts +++ b/yarn-project/circuit-types/src/interfaces/nullifier_tree.ts @@ -1,4 +1,4 @@ -import { Fr, NULLIFIER_TREE_HEIGHT, NullifierLeafPreimage } from '@aztec/circuits.js'; +import { Fr, type NULLIFIER_TREE_HEIGHT, NullifierLeafPreimage } from '@aztec/circuits.js'; import { SiblingPath } from '../sibling_path/index.js'; diff --git a/yarn-project/circuit-types/src/interfaces/prover-client.ts b/yarn-project/circuit-types/src/interfaces/prover-client.ts index ac803d0e94b..5c2ef55b8d5 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/public_data_tree.ts b/yarn-project/circuit-types/src/interfaces/public_data_tree.ts index 26f65bfba55..1ae620154ee 100644 --- a/yarn-project/circuit-types/src/interfaces/public_data_tree.ts +++ b/yarn-project/circuit-types/src/interfaces/public_data_tree.ts @@ -1,6 +1,6 @@ -import { Fr, PUBLIC_DATA_TREE_HEIGHT, PublicDataTreeLeafPreimage } from '@aztec/circuits.js'; +import { Fr, type PUBLIC_DATA_TREE_HEIGHT, type PublicDataTreeLeafPreimage } from '@aztec/circuits.js'; -import { SiblingPath } from '../sibling_path/index.js'; +import { type SiblingPath } from '../sibling_path/index.js'; /** * Public data witness. diff --git a/yarn-project/circuit-types/src/interfaces/pxe.ts b/yarn-project/circuit-types/src/interfaces/pxe.ts index 384ccdb1437..7c993677ba8 100644 --- a/yarn-project/circuit-types/src/interfaces/pxe.ts +++ b/yarn-project/circuit-types/src/interfaces/pxe.ts @@ -1,17 +1,23 @@ -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 { AuthWitness } from '../auth_witness.js'; -import { L2Block } from '../l2_block.js'; -import { GetUnencryptedLogsResponse, LogFilter } from '../logs/index.js'; -import { ExtendedNote } from '../notes/index.js'; -import { 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 AztecAddress, + type CompleteAddress, + type 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 { type AuthWitness } from '../auth_witness.js'; +import { type L2Block } from '../l2_block.js'; +import { type GetUnencryptedLogsResponse, type LogFilter } from '../logs/index.js'; +import { type ExtendedNote } from '../notes/index.js'; +import { type NoteFilter } from '../notes/note_filter.js'; +import { type Tx, type TxHash, type TxReceipt } from '../tx/index.js'; +import { type TxEffect } from '../tx_effect.js'; +import { type TxExecutionRequest } from '../tx_execution_request.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 43809c2ad7a..2f4c0c1e3d3 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 f70648a0c4c..4869503def4 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 { type 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.ts b/yarn-project/circuit-types/src/l2_block.ts index c62b4e8c9db..dd1a5bda4e8 100644 --- a/yarn-project/circuit-types/src/l2_block.ts +++ b/yarn-project/circuit-types/src/l2_block.ts @@ -1,4 +1,4 @@ -import { Body, TxEffect, TxHash } from '@aztec/circuit-types'; +import { Body, type TxEffect, TxHash } from '@aztec/circuit-types'; import { AppendOnlyTreeSnapshot, Header, STRING_ENCODING } from '@aztec/circuits.js'; import { sha256, sha256ToField } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; diff --git a/yarn-project/circuit-types/src/l2_block_context.ts b/yarn-project/circuit-types/src/l2_block_context.ts index a8a7b77915f..54374e78744 100644 --- a/yarn-project/circuit-types/src/l2_block_context.ts +++ b/yarn-project/circuit-types/src/l2_block_context.ts @@ -1,5 +1,5 @@ -import { L2Block } from './l2_block.js'; -import { TxHash } from './tx/tx_hash.js'; +import { type L2Block } from './l2_block.js'; +import { type TxHash } from './tx/tx_hash.js'; /** * A wrapper around L2 block used to cache results of expensive operations. 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 fb322129b5e..081d65633c8 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 @@ -3,8 +3,8 @@ import { MemoryFifo, Semaphore, SerialQueue } from '@aztec/foundation/fifo'; 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 L2Block } from '../l2_block.js'; +import { type L2BlockSource } from '../l2_block_source.js'; const log = createDebugLogger('aztec:l2_block_downloader'); diff --git a/yarn-project/circuit-types/src/l2_block_source.ts b/yarn-project/circuit-types/src/l2_block_source.ts index f60e545d3e4..78b6078f0fa 100644 --- a/yarn-project/circuit-types/src/l2_block_source.ts +++ b/yarn-project/circuit-types/src/l2_block_source.ts @@ -1,9 +1,9 @@ -import { EthAddress } from '@aztec/circuits.js'; +import { type EthAddress } from '@aztec/circuits.js'; -import { L2Block } from './l2_block.js'; -import { TxHash } from './tx/tx_hash.js'; -import { TxReceipt } from './tx/tx_receipt.js'; -import { TxEffect } from './tx_effect.js'; +import { type L2Block } from './l2_block.js'; +import { type TxHash } from './tx/tx_hash.js'; +import { type TxReceipt } from './tx/tx_receipt.js'; +import { type TxEffect } from './tx_effect.js'; /** * Interface of classes allowing for the retrieval of L2 blocks. diff --git a/yarn-project/circuit-types/src/logs/get_unencrypted_logs_response.ts b/yarn-project/circuit-types/src/logs/get_unencrypted_logs_response.ts index d50c7280a9b..b8c18fa278d 100644 --- a/yarn-project/circuit-types/src/logs/get_unencrypted_logs_response.ts +++ b/yarn-project/circuit-types/src/logs/get_unencrypted_logs_response.ts @@ -1,4 +1,4 @@ -import { ExtendedUnencryptedL2Log } from './extended_unencrypted_l2_log.js'; +import { type ExtendedUnencryptedL2Log } from './extended_unencrypted_l2_log.js'; /** * It provides documentation for the GetUnencryptedLogsResponse type. diff --git a/yarn-project/circuit-types/src/logs/l1_note_payload/browserify-cipher.d.ts b/yarn-project/circuit-types/src/logs/l1_note_payload/browserify-cipher.d.ts index 40a65868749..5d393110202 100644 --- a/yarn-project/circuit-types/src/logs/l1_note_payload/browserify-cipher.d.ts +++ b/yarn-project/circuit-types/src/logs/l1_note_payload/browserify-cipher.d.ts @@ -1,5 +1,5 @@ declare module 'browserify-cipher' { - import { Cipher } from 'crypto'; + import { type Cipher } from 'crypto'; /** * Type representing supported cipher algorithms for encryption and decryption. 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 8883ff8941e..314ef0d6c28 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,5 +1,5 @@ -import { GrumpkinPrivateKey, PublicKey } from '@aztec/circuits.js'; -import { Grumpkin } from '@aztec/circuits.js/barretenberg'; +import { type GrumpkinPrivateKey, type PublicKey } from '@aztec/circuits.js'; +import { type Grumpkin } from '@aztec/circuits.js/barretenberg'; import { sha256 } from '@aztec/foundation/crypto'; import { Point } from '@aztec/foundation/fields'; import { numToUInt8 } from '@aztec/foundation/serialize'; 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 1dd11c02cee..8b34dd37b8f 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,5 +1,5 @@ -import { AztecAddress, GrumpkinPrivateKey, PublicKey } from '@aztec/circuits.js'; -import { Grumpkin } from '@aztec/circuits.js/barretenberg'; +import { AztecAddress, type GrumpkinPrivateKey, type PublicKey } from '@aztec/circuits.js'; +import { type 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 f1ada6ec614..ddc362e4628 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,5 +1,5 @@ -import { GrumpkinPrivateKey, PublicKey } from '@aztec/circuits.js'; -import { Grumpkin } from '@aztec/circuits.js/barretenberg'; +import { type GrumpkinPrivateKey, type PublicKey } from '@aztec/circuits.js'; +import { type 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_block_l2_logs.ts b/yarn-project/circuit-types/src/logs/l2_block_l2_logs.ts index 9aa780fda8b..28a71d5a5fc 100644 --- a/yarn-project/circuit-types/src/logs/l2_block_l2_logs.ts +++ b/yarn-project/circuit-types/src/logs/l2_block_l2_logs.ts @@ -2,9 +2,9 @@ import { BufferReader, prefixBufferWithLength } from '@aztec/foundation/serializ import isEqual from 'lodash.isequal'; -import { EncryptedL2Log } from './encrypted_l2_log.js'; -import { EncryptedTxL2Logs, TxL2Logs, UnencryptedTxL2Logs } from './tx_l2_logs.js'; -import { UnencryptedL2Log } from './unencrypted_l2_log.js'; +import { type EncryptedL2Log } from './encrypted_l2_log.js'; +import { EncryptedTxL2Logs, type TxL2Logs, UnencryptedTxL2Logs } from './tx_l2_logs.js'; +import { type UnencryptedL2Log } from './unencrypted_l2_log.js'; /** * Data container of logs emitted in all txs in a given L2 block. 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 d6d9ac4d1d9..1d5745484d6 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 { L2BlockL2Logs } from './l2_block_l2_logs.js'; -import { LogFilter } from './log_filter.js'; -import { FromLogType, LogType } from './log_type.js'; +import { type GetUnencryptedLogsResponse } from './get_unencrypted_logs_response.js'; +import { type L2BlockL2Logs } from './l2_block_l2_logs.js'; +import { type LogFilter } from './log_filter.js'; +import { type FromLogType, type LogType } from './log_type.js'; /** * Interface of classes allowing for the retrieval of logs. diff --git a/yarn-project/circuit-types/src/logs/log_filter.ts b/yarn-project/circuit-types/src/logs/log_filter.ts index 0b472bb9939..deb81e98efa 100644 --- a/yarn-project/circuit-types/src/logs/log_filter.ts +++ b/yarn-project/circuit-types/src/logs/log_filter.ts @@ -1,8 +1,8 @@ -import { AztecAddress } from '@aztec/circuits.js'; -import { EventSelector } from '@aztec/foundation/abi'; +import { type AztecAddress } from '@aztec/circuits.js'; +import { type EventSelector } from '@aztec/foundation/abi'; -import { TxHash } from '../tx/tx_hash.js'; -import { LogId } from './log_id.js'; +import { type TxHash } from '../tx/tx_hash.js'; +import { type LogId } from './log_id.js'; /** * Log filter used to fetch L2 logs. diff --git a/yarn-project/circuit-types/src/logs/log_type.ts b/yarn-project/circuit-types/src/logs/log_type.ts index 00d2a49240c..1f9c247cc4a 100644 --- a/yarn-project/circuit-types/src/logs/log_type.ts +++ b/yarn-project/circuit-types/src/logs/log_type.ts @@ -1,5 +1,5 @@ -import { EncryptedL2Log } from './encrypted_l2_log.js'; -import { UnencryptedL2Log } from './unencrypted_l2_log.js'; +import { type EncryptedL2Log } from './encrypted_l2_log.js'; +import { type UnencryptedL2Log } from './unencrypted_l2_log.js'; /** * Defines possible log types. diff --git a/yarn-project/circuit-types/src/logs/tx_l2_logs.ts b/yarn-project/circuit-types/src/logs/tx_l2_logs.ts index 774e479cf65..bd6fe976ed0 100644 --- a/yarn-project/circuit-types/src/logs/tx_l2_logs.ts +++ b/yarn-project/circuit-types/src/logs/tx_l2_logs.ts @@ -3,9 +3,9 @@ import { BufferReader, prefixBufferWithLength, truncateAndPad } from '@aztec/fou import isEqual from 'lodash.isequal'; -import { EncryptedL2Log } from './encrypted_l2_log.js'; -import { EncryptedFunctionL2Logs, FunctionL2Logs, UnencryptedFunctionL2Logs } from './function_l2_logs.js'; -import { UnencryptedL2Log } from './unencrypted_l2_log.js'; +import { type EncryptedL2Log } from './encrypted_l2_log.js'; +import { EncryptedFunctionL2Logs, type FunctionL2Logs, UnencryptedFunctionL2Logs } from './function_l2_logs.js'; +import { type UnencryptedL2Log } from './unencrypted_l2_log.js'; /** * Data container of logs emitted in 1 tx. diff --git a/yarn-project/circuit-types/src/messaging/l1_to_l2_message_source.ts b/yarn-project/circuit-types/src/messaging/l1_to_l2_message_source.ts index 090726a671d..1bd0efab89d 100644 --- a/yarn-project/circuit-types/src/messaging/l1_to_l2_message_source.ts +++ b/yarn-project/circuit-types/src/messaging/l1_to_l2_message_source.ts @@ -1,4 +1,4 @@ -import { Fr } from '@aztec/foundation/fields'; +import { type Fr } from '@aztec/foundation/fields'; /** * Interface of classes allowing for the retrieval of L1 to L2 messages. diff --git a/yarn-project/circuit-types/src/mocks.ts b/yarn-project/circuit-types/src/mocks.ts index 18700c91c16..cb9808eaaad 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/notes/note_filter.ts b/yarn-project/circuit-types/src/notes/note_filter.ts index 90570f1f122..7eb6c62c865 100644 --- a/yarn-project/circuit-types/src/notes/note_filter.ts +++ b/yarn-project/circuit-types/src/notes/note_filter.ts @@ -1,6 +1,6 @@ -import { AztecAddress, Fr } from '@aztec/circuits.js'; +import { type AztecAddress, type Fr } from '@aztec/circuits.js'; -import { TxHash } from '../tx/tx_hash.js'; +import { type TxHash } from '../tx/tx_hash.js'; /** * The status of notes to retrieve. diff --git a/yarn-project/circuit-types/src/packed_arguments.ts b/yarn-project/circuit-types/src/packed_arguments.ts index d5589a77ad1..29452c88bfc 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 fcfe0eb4d33..086c57baf80 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 47188b7b05a..69e1b98166f 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 AztecAddress, type FunctionSelector } from '@aztec/circuits.js'; +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 284cdadd48f..37c09f40727 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 084fc058435..4ee8ea7e04c 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 410052f705a..4fe07309060 100644 --- a/yarn-project/circuit-types/src/tx/processed_tx.ts +++ b/yarn-project/circuit-types/src/tx/processed_tx.ts @@ -1,28 +1,28 @@ import { EncryptedTxL2Logs, PublicDataWrite, - SimulationError, - Tx, + type SimulationError, + type Tx, TxEffect, TxHash, UnencryptedTxL2Logs, } from '@aztec/circuit-types'; import { Fr, - Header, - MAX_NEW_NOTE_HASHES_PER_TX, - MAX_NEW_NULLIFIERS_PER_TX, - MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, - Proof, + type Header, + type MAX_NEW_NOTE_HASHES_PER_TX, + type MAX_NEW_NULLIFIERS_PER_TX, + type MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, + type Proof, PublicAccumulatedNonRevertibleData, PublicAccumulatedRevertibleData, PublicKernelCircuitPublicInputs, - SideEffect, - SideEffectLinkedToNoteHash, + type SideEffect, + type SideEffectLinkedToNoteHash, 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 4ce149a3720..181bc5d969b 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/tx_receipt.ts b/yarn-project/circuit-types/src/tx/tx_receipt.ts index 997e1b5ef7e..1cf7ef0797c 100644 --- a/yarn-project/circuit-types/src/tx/tx_receipt.ts +++ b/yarn-project/circuit-types/src/tx/tx_receipt.ts @@ -1,7 +1,7 @@ -import { Fr } from '@aztec/foundation/fields'; +import { type Fr } from '@aztec/foundation/fields'; -import { ExtendedNote } from '../notes/extended_note.js'; -import { PublicDataWrite } from '../public_data_write.js'; +import { type ExtendedNote } from '../notes/extended_note.js'; +import { type PublicDataWrite } from '../public_data_write.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 5814843f147..a078571d6a3 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 9f68f8fc6eb..479cbf0d764 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 255f2292acb..a0d88a67ab5 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/grumpkin/index.test.ts b/yarn-project/circuits.js/src/barretenberg/crypto/grumpkin/index.test.ts index 154ab39075f..da7ec63df6d 100644 --- a/yarn-project/circuits.js/src/barretenberg/crypto/grumpkin/index.test.ts +++ b/yarn-project/circuits.js/src/barretenberg/crypto/grumpkin/index.test.ts @@ -1,6 +1,6 @@ import { createDebugLogger } from '@aztec/foundation/log'; -import { GrumpkinScalar, Point } from '../../../index.js'; +import { GrumpkinScalar, type Point } from '../../../index.js'; import { Grumpkin } from './index.js'; const debug = createDebugLogger('bb:grumpkin_test'); diff --git a/yarn-project/circuits.js/src/barretenberg/crypto/grumpkin/index.ts b/yarn-project/circuits.js/src/barretenberg/crypto/grumpkin/index.ts index 3abf74fd20a..b9ea7e72325 100644 --- a/yarn-project/circuits.js/src/barretenberg/crypto/grumpkin/index.ts +++ b/yarn-project/circuits.js/src/barretenberg/crypto/grumpkin/index.ts @@ -1,5 +1,5 @@ import { BarretenbergSync } from '@aztec/bb.js'; -import { Fr, GrumpkinScalar, Point } from '@aztec/foundation/fields'; +import { Fr, type GrumpkinScalar, Point } from '@aztec/foundation/fields'; /** * Grumpkin elliptic curve operations. 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 e6c7cd56183..c0a3ccd0c3e 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 4ed9af1f607..16b200fcd89 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/barretenberg/crypto/signature/index.ts b/yarn-project/circuits.js/src/barretenberg/crypto/signature/index.ts index 1d76139464e..d451121d9c0 100644 --- a/yarn-project/circuits.js/src/barretenberg/crypto/signature/index.ts +++ b/yarn-project/circuits.js/src/barretenberg/crypto/signature/index.ts @@ -1,4 +1,4 @@ -import { Fr } from '@aztec/foundation/fields'; +import { type Fr } from '@aztec/foundation/fields'; /** * Interface to represent a signature. diff --git a/yarn-project/circuits.js/src/contract/artifact_hash.ts b/yarn-project/circuits.js/src/contract/artifact_hash.ts index f07138eb167..e590084a51e 100644 --- a/yarn-project/circuits.js/src/contract/artifact_hash.ts +++ b/yarn-project/circuits.js/src/contract/artifact_hash.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 { sha256 } from '@aztec/foundation/crypto'; import { Fr, reduceFn } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; import { numToUInt8 } from '@aztec/foundation/serialize'; -import { MerkleTree } from '../merkle/merkle_tree.js'; +import { type MerkleTree } from '../merkle/merkle_tree.js'; import { MerkleTreeCalculator } from '../merkle/merkle_tree_calculator.js'; const VERSION = 1; 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 46d6965291e..47a98c80071 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 68802e622cf..96196f01971 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 8f270051f87..b4834dc8673 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 2700c248159..7f40b3029a0 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 b82aac66f21..86020074ed6 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 dd96ec19491..4b3e135b3e7 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 016dd1cbfb4..418cc304696 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 @@ -1,9 +1,9 @@ import { bufferFromFields } from '@aztec/foundation/abi'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type 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 b307070424e..19de6205fc6 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 a11c23de56d..ae579a2fac2 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 @@ -1,9 +1,9 @@ import { FunctionSelector, bufferFromFields } from '@aztec/foundation/abi'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type 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 995f70d873e..d331a41b1cf 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 0ac0fe0d58f..32556036e77 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 @@ -1,10 +1,10 @@ import { FunctionSelector, bufferFromFields } from '@aztec/foundation/abi'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type 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 e39d828bf3b..c4bbb377b01 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 a6670b03c51..ea244b9d94a 100644 --- a/yarn-project/circuits.js/src/contract/private_function.ts +++ b/yarn-project/circuits.js/src/contract/private_function.ts @@ -1,9 +1,9 @@ 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'; +import { type MerkleTree, MerkleTreeCalculator } from '../merkle/index.js'; // Memoize the merkle tree calculators to avoid re-computing the zero-hash for each level in each call let privateFunctionTreeCalculator: MerkleTreeCalculator | undefined; 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 e50b2332d67..19b85857f26 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 bd11a3a9867..81e4f08f95d 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, type 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 8e4bd7887f4..86ed8beb1a7 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 0292fd55b9d..66904656074 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 c7b1a4eddea..35b983e08e2 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 144e11ed81d..06cc292b68d 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, type 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/hash/hash.ts b/yarn-project/circuits.js/src/hash/hash.ts index 60440f4205e..b5f4f1c0a63 100644 --- a/yarn-project/circuits.js/src/hash/hash.ts +++ b/yarn-project/circuits.js/src/hash/hash.ts @@ -1,4 +1,4 @@ -import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; import { padArrayEnd } from '@aztec/foundation/collection'; import { pedersenHash, pedersenHashBuffer } from '@aztec/foundation/crypto'; import { Fr } from '@aztec/foundation/fields'; 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 9db861afe55..7ac9ee39a52 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 c22df8b15fe..444a993220f 100644 --- a/yarn-project/circuits.js/src/hints/build_hints.ts +++ b/yarn-project/circuits.js/src/hints/build_hints.ts @@ -1,18 +1,18 @@ 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 Fr } from '@aztec/foundation/fields'; +import { type Tuple } from '@aztec/foundation/serialize'; +import { type IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; import { MAX_NEW_NULLIFIERS_PER_TX, - MAX_NULLIFIER_NON_EXISTENT_READ_REQUESTS_PER_TX, - MAX_NULLIFIER_READ_REQUESTS_PER_TX, - NULLIFIER_TREE_HEIGHT, + type MAX_NULLIFIER_NON_EXISTENT_READ_REQUESTS_PER_TX, + type MAX_NULLIFIER_READ_REQUESTS_PER_TX, + type NULLIFIER_TREE_HEIGHT, } from '../constants.gen.js'; import { siloNullifier } from '../hash/index.js'; -import { MembershipWitness } from '../structs/membership_witness.js'; +import { type MembershipWitness } from '../structs/membership_witness.js'; import { NullifierNonExistentReadRequestHintsBuilder } from '../structs/non_existent_read_request_hints.js'; -import { ReadRequestContext } from '../structs/read_request.js'; +import { type ReadRequestContext } from '../structs/read_request.js'; import { NullifierReadRequestHintsBuilder } from '../structs/read_request_hints.js'; import { SideEffectLinkedToNoteHash } from '../structs/side_effects.js'; import { countAccumulatedItems } from './utils.js'; diff --git a/yarn-project/circuits.js/src/hints/utils.test.ts b/yarn-project/circuits.js/src/hints/utils.test.ts index e5897e30a87..1ae2d47ead5 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 d98de228d7d..c63dad6aa8d 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 3f4969cf0cb..def8b480167 100644 --- a/yarn-project/circuits.js/src/keys/index.ts +++ b/yarn-project/circuits.js/src/keys/index.ts @@ -1,9 +1,9 @@ -import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; 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/merkle/sibling_path.test.ts b/yarn-project/circuits.js/src/merkle/sibling_path.test.ts index 6b59138a476..7b2852570d0 100644 --- a/yarn-project/circuits.js/src/merkle/sibling_path.test.ts +++ b/yarn-project/circuits.js/src/merkle/sibling_path.test.ts @@ -1,6 +1,6 @@ import { Fr } from '@aztec/foundation/fields'; -import { MerkleTree } from './merkle_tree.js'; +import { type MerkleTree } from './merkle_tree.js'; import { MerkleTreeCalculator } from './merkle_tree_calculator.js'; import { computeRootFromSiblingPath } from './sibling_path.js'; diff --git a/yarn-project/circuits.js/src/structs/aggregation_object.ts b/yarn-project/circuits.js/src/structs/aggregation_object.ts index 3cc56b45391..3056df1797b 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 17438a431a7..68aaaa99c1a 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 353cce504f4..89fef28fcb7 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 da3d0be17b1..40794fbe5d4 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 37f9a678717..8508fa8c7b8 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 08c803270b5..bb5001d9e2e 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 05c90e8b0e3..d3f762785c4 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/header.ts b/yarn-project/circuits.js/src/structs/header.ts index 782486a1fb6..0a5413fa5a7 100644 --- a/yarn-project/circuits.js/src/structs/header.ts +++ b/yarn-project/circuits.js/src/structs/header.ts @@ -1,5 +1,5 @@ import { pedersenHash } from '@aztec/foundation/crypto'; -import { Fr } from '@aztec/foundation/fields'; +import { type Fr } from '@aztec/foundation/fields'; import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize'; import { GeneratorIndex, HEADER_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 326e410a257..0de9b528bbd 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,12 +2,12 @@ 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'; import { - MAX_NEW_L2_TO_L1_MSGS_PER_CALL, + type MAX_NEW_L2_TO_L1_MSGS_PER_CALL, MAX_NEW_L2_TO_L1_MSGS_PER_TX, MAX_NEW_NOTE_HASHES_PER_TX, MAX_NEW_NULLIFIERS_PER_TX, 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 eba16946eea..7026461a997 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 ab18c8460a0..580de7e57e3 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 2f90462d3bd..ad629499041 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 52afd0a3efd..837b2a138e3 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 c73427c651c..5d53b9a49a7 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,10 +1,10 @@ -import { Fr } from '@aztec/foundation/fields'; -import { Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type Fr } from '@aztec/foundation/fields'; +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'; -import { Proof } from '../proof.js'; -import { PublicCallStackItem } from '../public_call_stack_item.js'; +import { type MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL } from '../../constants.gen.js'; +import { type CallRequest } from '../call_request.js'; +import { type Proof } from '../proof.js'; +import { type PublicCallStackItem } from '../public_call_stack_item.js'; /** * Public calldata assembled from the kernel execution result and proof. diff --git a/yarn-project/circuits.js/src/structs/kernel/public_kernel_circuit_private_inputs.ts b/yarn-project/circuits.js/src/structs/kernel/public_kernel_circuit_private_inputs.ts index b8b244d2435..86530dc0f4d 100644 --- a/yarn-project/circuits.js/src/structs/kernel/public_kernel_circuit_private_inputs.ts +++ b/yarn-project/circuits.js/src/structs/kernel/public_kernel_circuit_private_inputs.ts @@ -1,7 +1,7 @@ import { serializeToBuffer } from '@aztec/foundation/serialize'; -import { PublicCallData } from './public_call_data.js'; -import { PublicKernelData } from './public_kernel_data.js'; +import { type PublicCallData } from './public_call_data.js'; +import { type PublicKernelData } from './public_kernel_data.js'; /** * Inputs to the public kernel circuit. 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 2dfcb7fe992..c558b5aad57 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 77f3bc4cf11..073c0598861 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,8 +1,8 @@ import { serializeToBuffer } from '@aztec/foundation/serialize'; -import { NullifierNonExistentReadRequestHints } from '../non_existent_read_request_hints.js'; -import { NullifierReadRequestHints } from '../read_request_hints.js'; -import { PublicKernelData } from './public_kernel_data.js'; +import { type NullifierNonExistentReadRequestHints } from '../non_existent_read_request_hints.js'; +import { type NullifierReadRequestHints } from '../read_request_hints.js'; +import { type PublicKernelData } from './public_kernel_data.js'; /** * Inputs to the public kernel circuit. 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 9945403bdcc..384c383fac0 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 cc124de2e26..998fdd4a1a4 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 b2d9211c58b..db0457ef394 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 9cd254bc0b9..a459be8be34 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 d9bb37c0c09..989b177ae2a 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,10 +1,10 @@ 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'; +import { type MembershipWitness } from './membership_witness.js'; /** * A ReadRequestMembershipWitness is similar to a MembershipWitness but includes 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 37f2a6ad9ea..93844400528 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 @@ -1,12 +1,12 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { Fr, GrumpkinScalar, Point } from '@aztec/foundation/fields'; +import { type Fr, GrumpkinScalar, Point } from '@aztec/foundation/fields'; import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize'; 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 c369424cdc0..bb2e704dc04 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,7 +1,7 @@ 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'; +import { type NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, NUM_MSGS_PER_BASE_PARITY } from '../../constants.gen.js'; export class BaseParityInputs { constructor( 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 3edf7909091..d1d82b601e4 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 1c55e5c83bb..cab611415d6 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 4a73162a6af..0556b9d172d 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/partial_state_reference.ts b/yarn-project/circuits.js/src/structs/partial_state_reference.ts index 0ca6b790f38..4ccac8d2318 100644 --- a/yarn-project/circuits.js/src/structs/partial_state_reference.ts +++ b/yarn-project/circuits.js/src/structs/partial_state_reference.ts @@ -1,4 +1,4 @@ -import { Fr } from '@aztec/foundation/fields'; +import { type Fr } from '@aztec/foundation/fields'; import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize'; import { PARTIAL_STATE_REFERENCE_LENGTH } from '../constants.gen.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 700cd968d17..23f9060c372 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,10 +2,10 @@ 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'; +import { type CallContext } from './call_context.js'; import { CallRequest, CallerContext } from './call_request.js'; import { FunctionData } from './function_data.js'; import { PrivateCircuitPublicInputs } from './private_circuit_public_inputs.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 67e9347eba0..b591cd52404 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 30f4faf8f8b..6b586045abb 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 454b695de62..0d53df6b95c 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,10 +2,10 @@ 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'; +import { type CallContext } from './call_context.js'; import { CallRequest, CallerContext } from './call_request.js'; import { FunctionData } from './function_data.js'; import { PublicCircuitPublicInputs } from './public_circuit_public_inputs.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 8ba49eb659a..18f779c6ad3 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 880b71a4467..6e6439ec426 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 6f39790a162..6929e58b412 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_or_merge_rollup_public_inputs.ts b/yarn-project/circuits.js/src/structs/rollup/base_or_merge_rollup_public_inputs.ts index 87658904f2e..598e246a104 100644 --- a/yarn-project/circuits.js/src/structs/rollup/base_or_merge_rollup_public_inputs.ts +++ b/yarn-project/circuits.js/src/structs/rollup/base_or_merge_rollup_public_inputs.ts @@ -3,7 +3,7 @@ import { BufferReader, serializeToBuffer } from '@aztec/foundation/serialize'; import { AggregationObject } from '../aggregation_object.js'; import { PartialStateReference } from '../partial_state_reference.js'; -import { RollupTypes } from '../shared.js'; +import { type RollupTypes } from '../shared.js'; import { ConstantRollupData } from './base_rollup.js'; /** 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 cbbfaf491ac..a1eac84c3e5 100644 --- a/yarn-project/circuits.js/src/structs/rollup/base_rollup.ts +++ b/yarn-project/circuits.js/src/structs/rollup/base_rollup.ts @@ -1,22 +1,22 @@ 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, - MAX_PUBLIC_DATA_READS_PER_TX, - MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, - PUBLIC_DATA_TREE_HEIGHT, + type ARCHIVE_HEIGHT, + type MAX_PUBLIC_DATA_READS_PER_TX, + type MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, + type PUBLIC_DATA_TREE_HEIGHT, } from '../../constants.gen.js'; 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 RollupKernelData } from '../kernel/rollup_kernel_data.js'; +import { type MembershipWitness } from '../membership_witness.js'; +import { type PartialStateReference } from '../partial_state_reference.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'; -import { StateDiffHints } from './state_diff_hints.js'; +import { type StateDiffHints } from './state_diff_hints.js'; export { NullifierLeaf, NullifierLeafPreimage, PublicDataTreeLeaf, PublicDataTreeLeafPreimage }; diff --git a/yarn-project/circuits.js/src/structs/rollup/merge_rollup.ts b/yarn-project/circuits.js/src/structs/rollup/merge_rollup.ts index 5c5f5f380d1..96d8bbd0bf8 100644 --- a/yarn-project/circuits.js/src/structs/rollup/merge_rollup.ts +++ b/yarn-project/circuits.js/src/structs/rollup/merge_rollup.ts @@ -1,6 +1,6 @@ import { serializeToBuffer } from '@aztec/foundation/serialize'; -import { PreviousRollupData } from './previous_rollup_data.js'; +import { type PreviousRollupData } from './previous_rollup_data.js'; /** * Represents inputs of the merge rollup circuit. 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 149ab6c0014..42160877895 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 e5154b7a954..c457f6cd159 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 @@ -1,11 +1,11 @@ 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 { VerificationKey } from '../verification_key.js'; -import { BaseOrMergeRollupPublicInputs } from './base_or_merge_rollup_public_inputs.js'; +import { type ROLLUP_VK_TREE_HEIGHT } from '../../constants.gen.js'; +import { type MembershipWitness } from '../membership_witness.js'; +import { type Proof } from '../proof.js'; +import { type UInt32 } from '../shared.js'; +import { type VerificationKey } from '../verification_key.js'; +import { type BaseOrMergeRollupPublicInputs } from './base_or_merge_rollup_public_inputs.js'; /** * Represents the data of a previous merge or base rollup circuit. 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 5724f220e02..96a3eac57b9 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 e3fce3863c1..58ee9985c14 100644 --- a/yarn-project/circuits.js/src/structs/rollup/root_rollup.ts +++ b/yarn-project/circuits.js/src/structs/rollup/root_rollup.ts @@ -1,17 +1,17 @@ -import { Fr } from '@aztec/foundation/fields'; -import { BufferReader, Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type Fr } from '@aztec/foundation/fields'; +import { BufferReader, type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type FieldsOf } from '@aztec/foundation/types'; import { - ARCHIVE_HEIGHT, - L1_TO_L2_MSG_SUBTREE_SIBLING_PATH_LENGTH, - NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, + type ARCHIVE_HEIGHT, + type L1_TO_L2_MSG_SUBTREE_SIBLING_PATH_LENGTH, + type NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, } from '../../constants.gen.js'; import { AggregationObject } from '../aggregation_object.js'; import { Header } from '../header.js'; -import { RootParityInput } from '../parity/root_parity_input.js'; +import { type RootParityInput } from '../parity/root_parity_input.js'; import { AppendOnlyTreeSnapshot } from './append_only_tree_snapshot.js'; -import { PreviousRollupData } from './previous_rollup_data.js'; +import { type PreviousRollupData } from './previous_rollup_data.js'; /** * Represents inputs of the root rollup circuit. 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 1a812819433..eb921135822 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,16 +1,16 @@ -import { Fr } from '@aztec/foundation/fields'; -import { Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; -import { FieldsOf } from '@aztec/foundation/types'; +import { type Fr } from '@aztec/foundation/fields'; +import { type Tuple, serializeToBuffer } from '@aztec/foundation/serialize'; +import { type FieldsOf } from '@aztec/foundation/types'; import { - MAX_NEW_NULLIFIERS_PER_TX, - NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH, - NULLIFIER_SUBTREE_SIBLING_PATH_LENGTH, - NULLIFIER_TREE_HEIGHT, - PUBLIC_DATA_SUBTREE_SIBLING_PATH_LENGTH, + type MAX_NEW_NULLIFIERS_PER_TX, + type NOTE_HASH_SUBTREE_SIBLING_PATH_LENGTH, + type NULLIFIER_SUBTREE_SIBLING_PATH_LENGTH, + type NULLIFIER_TREE_HEIGHT, + type PUBLIC_DATA_SUBTREE_SIBLING_PATH_LENGTH, } from '../../constants.gen.js'; -import { MembershipWitness } from '../membership_witness.js'; -import { NullifierLeafPreimage } from './nullifier_leaf/index.js'; +import { type MembershipWitness } from '../membership_witness.js'; +import { type NullifierLeafPreimage } from './nullifier_leaf/index.js'; /** * Hints used while proving state diff validity. diff --git a/yarn-project/circuits.js/src/structs/shared.ts b/yarn-project/circuits.js/src/structs/shared.ts index 9b51ce8e1dd..c8cce1576fe 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/state_reference.ts b/yarn-project/circuits.js/src/structs/state_reference.ts index 8d05ec2b974..f3a78608ad9 100644 --- a/yarn-project/circuits.js/src/structs/state_reference.ts +++ b/yarn-project/circuits.js/src/structs/state_reference.ts @@ -1,4 +1,4 @@ -import { Fr } from '@aztec/foundation/fields'; +import { type Fr } from '@aztec/foundation/fields'; import { BufferReader, FieldReader, serializeToBuffer } from '@aztec/foundation/serialize'; import { STATE_REFERENCE_LENGTH } from '../constants.gen.js'; diff --git a/yarn-project/circuits.js/src/structs/tx_context.ts b/yarn-project/circuits.js/src/structs/tx_context.ts index 0eae14c831d..73d484e54af 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 6113bbb279a..6a3812692a7 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 fbcbe3d2b35..faff930709e 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 aeec6e1ef03..176e9248d32 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 d3d68199d89..1d45e9f834c 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 7d97ccda986..db0688ab873 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, type FunctionSelector } from '@aztec/foundation/abi'; /** * A contract function Data Access Object (DAO). diff --git a/yarn-project/circuits.js/src/types/deployment_info.ts b/yarn-project/circuits.js/src/types/deployment_info.ts index 637bab821b9..484fb84b248 100644 --- a/yarn-project/circuits.js/src/types/deployment_info.ts +++ b/yarn-project/circuits.js/src/types/deployment_info.ts @@ -1,6 +1,6 @@ -import { Fr } from '@aztec/foundation/fields'; +import { type Fr } from '@aztec/foundation/fields'; -import { CompleteAddress } from '../structs/complete_address.js'; +import { type CompleteAddress } from '../structs/complete_address.js'; /** * Represents the data generated as part of contract deployment. diff --git a/yarn-project/circuits.js/src/types/grumpkin_private_key.ts b/yarn-project/circuits.js/src/types/grumpkin_private_key.ts index 16ed3679587..cb96ce1cd8c 100644 --- a/yarn-project/circuits.js/src/types/grumpkin_private_key.ts +++ b/yarn-project/circuits.js/src/types/grumpkin_private_key.ts @@ -1,4 +1,4 @@ -import { GrumpkinScalar } from '@aztec/foundation/fields'; +import { type GrumpkinScalar } from '@aztec/foundation/fields'; /** A type alias for private key which belongs to the scalar field of Grumpkin curve. */ export type GrumpkinPrivateKey = GrumpkinScalar; diff --git a/yarn-project/circuits.js/src/types/partial_address.ts b/yarn-project/circuits.js/src/types/partial_address.ts index 21877f72e88..29b2a8793de 100644 --- a/yarn-project/circuits.js/src/types/partial_address.ts +++ b/yarn-project/circuits.js/src/types/partial_address.ts @@ -1,4 +1,4 @@ -import { Fr } from '@aztec/foundation/fields'; +import { type Fr } from '@aztec/foundation/fields'; /** * A type which along with public key forms a preimage of a contract address. See the link below for more details diff --git a/yarn-project/circuits.js/src/types/public_key.ts b/yarn-project/circuits.js/src/types/public_key.ts index 1a985a9a6a2..0109de4c8ea 100644 --- a/yarn-project/circuits.js/src/types/public_key.ts +++ b/yarn-project/circuits.js/src/types/public_key.ts @@ -1,4 +1,4 @@ -import { Point } from '@aztec/foundation/fields'; +import { type Point } from '@aztec/foundation/fields'; /** Represents a user public key. */ export type PublicKey = Point; diff --git a/yarn-project/cli/src/client.test.ts b/yarn-project/cli/src/client.test.ts index 8e879f762ba..ad21f399256 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 18ea8bd2d5e..8b3d55c37d9 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 b09e87d6eb7..c77283083c8 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, + type Fr, + type 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 988c2a45c12..f6359bd5c1c 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 AztecAddress, type Fr } from '@aztec/aztec.js'; +import { ExtendedNote, Note, type TxHash } from '@aztec/circuit-types'; +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 c5aed126443..5b6ca472d6b 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 cab98e2dd42..2864e8985ac 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 AztecAddress } from '@aztec/aztec.js'; +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 c9777522e10..4a00c72a518 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 AztecAddress } from '@aztec/aztec.js'; +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 074be33597a..9d299a64eff 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 2ad6a5d92d6..09cdadc361a 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 Fq, Fr } from '@aztec/foundation/fields'; +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 a9fbda80527..94cc35e5f27 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 { ContractDeployer, type EthAddress, type Fq, Fr, type 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 a7a5af57fe1..a96b3e277a2 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 c7ee019eccc..94c7437262b 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 928e61974ba..f62617ae6ea 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 b447cdcc738..f7504de90de 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 8b3e9359d5f..c672c85fb85 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 AztecAddress } from '@aztec/aztec.js'; +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 1e36475f3a8..9d84cc581ed 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 d11180f7e4b..592358a9fd3 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 AztecAddress } from '@aztec/aztec.js'; +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 76c27c76726..29afb7bbc6f 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 { EventSelector } from '@aztec/foundation/abi'; -import { DebugLogger, LogFn } from '@aztec/foundation/log'; +import { type AztecAddress, type LogFilter, type LogId, type TxHash } from '@aztec/aztec.js'; +import { type EventSelector } from '@aztec/foundation/abi'; +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 b775c08aa0d..b66df822532 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 270bbad9ac2..4ae6baac896 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 AztecAddress } from '@aztec/aztec.js'; +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 875b84b6038..bc091bc5dd6 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 beaa53e2f9b..6119f035aac 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 { type 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 4728de02fd0..00823d21895 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 d8b29211d3a..15bc057ede9 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 b6949cee4fa..cf5dc168cb9 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 Fq, type Fr } from '@aztec/foundation/fields'; +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 6458143c542..7e9cf877f04 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 { type AztecAddress, type Fr, type 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 8513fe1392e..c5195057e74 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 AztecAddress, Contract, type Fq, Fr } from '@aztec/aztec.js'; +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 21ecba9fc8a..b06c9301b6e 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 16e5b15747a..13c56ba0001 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 afa693b8427..1ca54bbee68 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 e43d32d207a..56f3e109d91 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 0864293f4da..b18c38284b6 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 ae085e6dfe7..c18716ca474 100644 --- a/yarn-project/cli/src/update/npm.ts +++ b/yarn-project/cli/src/update/npm.ts @@ -1,13 +1,13 @@ -import { LogFn } from '@aztec/foundation/log'; +import { type LogFn } from '@aztec/foundation/log'; import { spawnSync } from 'child_process'; import { existsSync } from 'fs'; import { readFile } from 'fs/promises'; import { join, relative, resolve } from 'path'; -import { SemVer, parse } from 'semver'; +import { type 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 5c946f9953d..e2bc90f7947 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 756b3193c7b..1c387db67bc 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 8d0747cf27f..bc8fb1cfbb2 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 { type BenchmarkingContract } from '@aztec/noir-contracts.js/Benchmarking'; +import { type 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 fea4012690b..fbbdcf49f58 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 @@ -1,10 +1,10 @@ import { AztecNodeService } from '@aztec/aztec-node'; import { AztecAddress, Fr, GrumpkinScalar } from '@aztec/aztec.js'; import { BENCHMARK_BLOCK_SIZES } from '@aztec/circuit-types/stats'; -import { BenchmarkingContract } from '@aztec/noir-contracts.js/Benchmarking'; -import { SequencerClient } from '@aztec/sequencer-client'; +import { type BenchmarkingContract } from '@aztec/noir-contracts.js/Benchmarking'; +import { type 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 bfc94261072..a786e4d263a 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 AccountWalletWithPrivateKey, + type AztecAddress, + 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 8fe85f16166..0841a9725c8 100644 --- a/yarn-project/end-to-end/src/benchmarks/utils.ts +++ b/yarn-project/end-to-end/src/benchmarks/utils.ts @@ -1,25 +1,25 @@ -import { AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node'; +import { type AztecNodeConfig, type AztecNodeService } from '@aztec/aztec-node'; import { - AztecNode, + type AztecNode, BatchCall, - GrumpkinScalar, + type GrumpkinScalar, INITIAL_L2_BLOCK_NUM, - PXE, - PartialAddress, - SentTx, + type PXE, + type PartialAddress, + type SentTx, retryUntil, sleep, } from '@aztec/aztec.js'; import { times } from '@aztec/foundation/collection'; import { randomInt } from '@aztec/foundation/crypto'; import { BenchmarkingContract } from '@aztec/noir-contracts.js/Benchmarking'; -import { PXEService, createPXEService } from '@aztec/pxe'; +import { type PXEService, createPXEService } from '@aztec/pxe'; 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 80f970483b1..409c4598db0 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, - CompleteAddress, - DebugLogger, + type AztecAddress, + type AztecNode, + type CompleteAddress, + 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 beb19f2ef51..0d44c5603c5 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, + type 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_authwit.test.ts b/yarn-project/end-to-end/src/e2e_authwit.test.ts index 09e4acf53fe..44fb5e83da2 100644 --- a/yarn-project/end-to-end/src/e2e_authwit.test.ts +++ b/yarn-project/end-to-end/src/e2e_authwit.test.ts @@ -1,4 +1,10 @@ -import { AccountWallet, CompleteAddress, Fr, computeInnerAuthWitHash, computeOuterAuthWitHash } from '@aztec/aztec.js'; +import { + type AccountWallet, + type CompleteAddress, + Fr, + computeInnerAuthWitHash, + computeOuterAuthWitHash, +} from '@aztec/aztec.js'; import { SchnorrAccountContract } from '@aztec/noir-contracts.js'; import { jest } from '@jest/globals'; 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 99032a48228..c4742bce15c 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 bd5bcb70637..8c1fe2ec191 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 @@ -1,21 +1,21 @@ import { - AccountWallet, + type AccountWallet, AztecAddress, - CheatCodes, - CompleteAddress, - DebugLogger, + type CheatCodes, + type CompleteAddress, + type DebugLogger, ExtendedNote, Fr, FunctionSelector, Note, - TxHash, - Wallet, + type TxHash, + type Wallet, computeAuthWitMessageHash, computeMessageSecretHash, } from '@aztec/aztec.js'; import { openTmpStore } from '@aztec/kv-store/utils'; import { Pedersen, SparseTree, newTree } from '@aztec/merkle-tree'; -import { SlowTreeContract, TokenBlacklistContract, TokenContract } from '@aztec/noir-contracts.js'; +import { SlowTreeContract, TokenBlacklistContract, type TokenContract } from '@aztec/noir-contracts.js'; import { jest } from '@jest/globals'; 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 36c99191177..cf7208ccb1f 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 AztecAddress, + type AztecNode, BatchCall, ContractDeployer, ContractFunctionInteraction, - DebugLogger, + type DebugLogger, Fr, - PXE, - SentTx, - TxReceipt, + type PXE, + type SentTx, + type 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 1520f91c92a..354196882bc 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 @@ -1,12 +1,12 @@ import { getSchnorrAccount } from '@aztec/accounts/schnorr'; import { INITIAL_TEST_ENCRYPTION_KEYS } from '@aztec/accounts/testing'; import { - AccountWallet, + type 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 20c7761db90..f6f5568ec1c 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 @@ -1,18 +1,27 @@ import { - CheatCodes, - CompleteAddress, + type CheatCodes, + type CompleteAddress, EthAddress, 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 7fd0884a091..1edf7050eba 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 ea4f806fb7b..61e562eb330 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 { type AccountWallet, type AztecAddress, type 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 52bfa8b5b06..b05638697a9 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 AccountWallet, + type AztecAddress, + type AztecNode, + type DebugLogger, EthAddress, Fr, L1Actor, @@ -11,7 +11,7 @@ import { computeAuthWitMessageHash, } from '@aztec/aztec.js'; import { sha256ToField } from '@aztec/foundation/crypto'; -import { TokenBridgeContract, TokenContract } from '@aztec/noir-contracts.js'; +import { type TokenBridgeContract, type TokenContract } from '@aztec/noir-contracts.js'; import { toFunctionSelector } from 'viem/utils'; 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 eaa666f525c..494a4bc1b11 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 @@ -1,14 +1,14 @@ import { - AccountWallet, - AztecAddress, - CheatCodes, - DebugLogger, + type AccountWallet, + type AztecAddress, + type CheatCodes, + type DebugLogger, ExtendedNote, Fr, GrumpkinScalar, Note, - PXE, - TxHash, + type PXE, + type TxHash, computeMessageSecretHash, generatePublicKey, } from '@aztec/aztec.js'; 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 2dfd5ea8a10..ac44271c959 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 AccountWalletWithPrivateKey, + type AztecAddress, + 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 c2a36bb435c..11a81b84f16 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 7638c537499..75f152ad05c 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, - ContractBase, - ContractClassWithId, + type ContractArtifact, + type ContractBase, + 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,14 +24,14 @@ 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'; import { CounterContract, StatefulTestContract } from '@aztec/noir-contracts.js'; import { TestContract, TestContractArtifact } from '@aztec/noir-contracts.js/Test'; import { TokenContract, TokenContractArtifact } from '@aztec/noir-contracts.js/Token'; -import { SequencerClient } from '@aztec/sequencer-client'; +import { type SequencerClient } from '@aztec/sequencer-client'; import { setup } from './fixtures/utils.js'; 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 047e57674e4..54b2f467c82 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 @@ -1,16 +1,16 @@ import { - AccountWallet, - AztecAddress, + type AccountWallet, + type AztecAddress, BatchCall, - CompleteAddress, - DebugLogger, + type CompleteAddress, + 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 b03a1d67052..3b11f865776 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, + type AztecAddress, BatchCall, - DebugLogger, + type DebugLogger, ExtendedNote, Fr, - FunctionCall, + type FunctionCall, FunctionSelector, Note, PrivateFeePaymentMethod, PublicFeePaymentMethod, - TxHash, + type 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 850b349fa58..3b4d88e5e6e 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 @@ -1,10 +1,10 @@ import { - AccountWallet, + type AccountWallet, AztecAddress, - CompleteAddress, + type 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 b349bfb39c3..817e894b68f 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 @@ -1,8 +1,8 @@ import { - AccountWallet, - CheatCodes, - CompleteAddress, - DebugLogger, + type AccountWallet, + type CheatCodes, + type CompleteAddress, + 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 c54dab89ca0..0b8307f1fb4 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 b4d911dfb02..f064e08ae99 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, - CompleteAddress, - DebugLogger, + type AztecAddress, + type AztecNode, + type CompleteAddress, + 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 8582ae4ecde..ae73dabb611 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 { type 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 ef7e51ca910..4e9df2086e5 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 402b50f5b05..6ca1d04e782 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 { type 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 450bc0eb214..d075e0a88ca 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, type 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 e94ecec0cd5..1115cbee062 100644 --- a/yarn-project/end-to-end/src/e2e_outbox.test.ts +++ b/yarn-project/end-to-end/src/e2e_outbox.test.ts @@ -1,11 +1,11 @@ import { - AccountWalletWithPrivateKey, - AztecNode, + type AccountWalletWithPrivateKey, + type AztecNode, BatchCall, - DeployL1Contracts, + type DeployL1Contracts, EthAddress, Fr, - SiblingPath, + type SiblingPath, } from '@aztec/aztec.js'; import { sha256ToField } from '@aztec/foundation/crypto'; import { truncateAndPad } from '@aztec/foundation/serialize'; 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 618986c2ab1..3f7cc1c469e 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,17 +1,17 @@ import { getSchnorrAccount } from '@aztec/accounts/schnorr'; -import { AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node'; +import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node'; import { - AztecAddress, + type AztecAddress, CompleteAddress, - DebugLogger, + type DebugLogger, Fr, Grumpkin, GrumpkinScalar, - SentTx, + type SentTx, TxStatus, } from '@aztec/aztec.js'; -import { BootstrapNode, P2PConfig, createLibP2PPeerId } from '@aztec/p2p'; -import { ConstantKeyPair, PXEService, createPXEService, getPXEServiceConfig as getRpcConfig } from '@aztec/pxe'; +import { BootstrapNode, type P2PConfig, createLibP2PPeerId } from '@aztec/p2p'; +import { ConstantKeyPair, type 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 1e30daec290..5cf47cd3f53 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,11 @@ -import { AztecAddress, AztecNode, CompleteAddress, DebugLogger, Fr, Wallet } from '@aztec/aztec.js'; +import { + type AztecAddress, + type AztecNode, + type 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 52eb18a4fe2..e74cecc589a 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 AccountWallet, + type ContractInstanceWithAddress, ExtendedNote, Note, - TxHash, + type TxHash, computeMessageSecretHash, waitForAccountSynch, } from '@aztec/aztec.js'; -import { Salt } from '@aztec/aztec.js/account'; -import { AztecAddress, CompleteAddress, Fq, Fr } from '@aztec/circuits.js'; -import { DeployL1Contracts } from '@aztec/ethereum'; +import { type Salt } from '@aztec/aztec.js/account'; +import { type AztecAddress, type CompleteAddress, Fq, Fr } from '@aztec/circuits.js'; +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 7d700bdffdc..e030088e40b 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 { type AccountWallet, type AztecAddress, type 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 740fb2a5c99..10864f56c67 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,26 +1,26 @@ import { - AccountWallet, - AztecAddress, - AztecNode, - CompleteAddress, - DebugLogger, - DeployL1Contracts, + type AccountWallet, + type AztecAddress, + type AztecNode, + type CompleteAddress, + type DebugLogger, + type DeployL1Contracts, EthAddress, Fr, L1Actor, L1ToL2Message, L2Actor, - PXE, + type PXE, computeAuthWitMessageHash, computeMessageSecretHash, } from '@aztec/aztec.js'; import { sha256ToField } from '@aztec/foundation/crypto'; import { InboxAbi, OutboxAbi } from '@aztec/l1-artifacts'; import { TestContract } from '@aztec/noir-contracts.js'; -import { TokenContract } from '@aztec/noir-contracts.js/Token'; -import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge'; +import { type TokenContract } from '@aztec/noir-contracts.js/Token'; +import { type 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 0b67d07c67d..cd2eaccf915 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 { type AztecAddress, type DebugLogger, type 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 a3c5867d403..24b602ea7bc 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 4e4d1c80f79..b776ed3d3e3 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 { type 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 8aebff15752..5e3f441ff2b 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 b51892a656c..839e1628acc 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 d1f01897e01..91f534a68eb 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,12 +1,12 @@ import { - AccountWallet, - CompleteAddress, - DebugLogger, + type AccountWallet, + type CompleteAddress, + type DebugLogger, ExtendedNote, Fr, FunctionSelector, Note, - TxHash, + type TxHash, computeAuthWitMessageHash, computeMessageSecretHash, } from '@aztec/aztec.js'; diff --git a/yarn-project/end-to-end/src/fixtures/utils.ts b/yarn-project/end-to-end/src/fixtures/utils.ts index 463ddbe28d5..8210145c223 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 AccountWalletWithPrivateKey, + type AztecAddress, + type AztecNode, BatchCall, CheatCodes, - CompleteAddress, - ContractMethod, - DebugLogger, - DeployL1Contracts, + type CompleteAddress, + type ContractMethod, + type DebugLogger, + type DeployL1Contracts, EncryptedL2BlockL2Logs, EthCheatCodes, - L1ContractArtifactsForDeployment, + type L1ContractArtifactsForDeployment, LogType, - PXE, - SentTx, + type PXE, + type 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 { SequencerClient } from '@aztec/sequencer-client'; +import { PXEService, type PXEServiceConfig, createPXEService, getPXEServiceConfig } from '@aztec/pxe'; +import { type 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 32910fade34..16074a7e306 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 @@ -1,11 +1,11 @@ import { createAccount, getDeployedTestAccountsWallets } from '@aztec/accounts/testing'; import { - AccountWallet, + type AccountWallet, CheatCodes, 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 604f5edf920..8309946d1f5 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, - CompleteAddress, + type AuthWitnessProvider, + type 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 050cf0da6bf..8cd75292f5d 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,16 +1,25 @@ -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'; +import { + AztecAddress, + Body, + Fr, + GlobalVariables, + L2Actor, + type 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'; import { EthAddress, - Header, + type Header, MAX_NEW_L2_TO_L1_MSGS_PER_TX, MAX_NEW_NULLIFIERS_PER_TX, MAX_REVERTIBLE_NOTE_HASHES_PER_TX, @@ -22,34 +31,34 @@ 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'; import { SHA256Trunc, StandardTree } from '@aztec/merkle-tree'; import { TxProver } from '@aztec/prover-client'; -import { L1Publisher, getL1Publisher } from '@aztec/sequencer-client'; +import { type 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/browser.ts b/yarn-project/end-to-end/src/shared/browser.ts index 3f67c743f68..81d4725cf10 100644 --- a/yarn-project/end-to-end/src/shared/browser.ts +++ b/yarn-project/end-to-end/src/shared/browser.ts @@ -1,16 +1,16 @@ /* eslint-disable no-console */ -import * as AztecAccountsSchnorr from '@aztec/accounts/schnorr'; -import * as AztecAccountsSingleKey from '@aztec/accounts/single_key'; -import * as AztecAccountsTesting from '@aztec/accounts/testing'; +import type * as AztecAccountsSchnorr from '@aztec/accounts/schnorr'; +import type * as AztecAccountsSingleKey from '@aztec/accounts/single_key'; +import type * as AztecAccountsTesting from '@aztec/accounts/testing'; import * as AztecJs from '@aztec/aztec.js'; import { TokenContractArtifact } from '@aztec/noir-contracts.js/Token'; import { contractArtifactToBuffer } from '@aztec/types/abi'; -import { Server } from 'http'; +import { type Server } from 'http'; import Koa from 'koa'; import serve from 'koa-static'; import path, { dirname } from 'path'; -import { Browser, Page, launch } from 'puppeteer'; +import { type Browser, type Page, launch } from 'puppeteer'; declare global { /** diff --git a/yarn-project/end-to-end/src/shared/cli.ts b/yarn-project/end-to-end/src/shared/cli.ts index 9c47e30398c..032a348eaf5 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, + type 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 89f8778ae5f..603560339c8 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 AztecAddress, + type AztecNode, + type DebugLogger, EthAddress, ExtendedNote, - FieldsOf, + type FieldsOf, Fr, Note, - PXE, - SiblingPath, - TxHash, - TxReceipt, - Wallet, + type PXE, + type SiblingPath, + type TxHash, + type TxReceipt, + 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 ef5140df02f..9e7bb4d740e 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 { + type 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/uniswap_l1_l2.ts b/yarn-project/end-to-end/src/shared/uniswap_l1_l2.ts index 865b0cb9cd4..a5cd9744075 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, + type 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/lending_simulator.ts b/yarn-project/end-to-end/src/simulators/lending_simulator.ts index 48bd93fcd15..2d5c2f344a0 100644 --- a/yarn-project/end-to-end/src/simulators/lending_simulator.ts +++ b/yarn-project/end-to-end/src/simulators/lending_simulator.ts @@ -1,9 +1,9 @@ // Convenience struct to hold an account's address and secret that can easily be passed around. -import { AztecAddress, CheatCodes, Fr } from '@aztec/aztec.js'; +import { type AztecAddress, type CheatCodes, Fr } from '@aztec/aztec.js'; import { pedersenHash } from '@aztec/foundation/crypto'; -import { LendingContract } from '@aztec/noir-contracts.js/Lending'; +import { type LendingContract } from '@aztec/noir-contracts.js/Lending'; -import { TokenSimulator } from './token_simulator.js'; +import { type TokenSimulator } from './token_simulator.js'; /** * Contains utilities to compute the "key" for private holdings in the public state. 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 686cec91cc5..9a5a1938165 100644 --- a/yarn-project/end-to-end/src/simulators/token_simulator.ts +++ b/yarn-project/end-to-end/src/simulators/token_simulator.ts @@ -1,6 +1,6 @@ /* eslint-disable jsdoc/require-jsdoc */ -import { AztecAddress, DebugLogger } from '@aztec/aztec.js'; -import { TokenContract } from '@aztec/noir-contracts.js/Token'; +import { type AztecAddress, type DebugLogger } from '@aztec/aztec.js'; +import { type TokenContract } from '@aztec/noir-contracts.js/Token'; export class TokenSimulator { private balancesPrivate: Map = new Map(); 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 461e8307020..f4bf1b92efd 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 e855e48324f..acc3c011e4e 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 { AztecAddress, FunctionData, GeneratorIndex, TxContext } from '@aztec/circuits.js'; -import { FunctionAbi, encodeArguments } from '@aztec/foundation/abi'; +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 { type AztecAddress, FunctionData, GeneratorIndex, TxContext } from '@aztec/circuits.js'; +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 5e851d59f44..67e41819e68 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 { AztecAddress, Fr, FunctionData, TxContext } from '@aztec/circuits.js'; -import { FunctionAbi, encodeArguments } from '@aztec/foundation/abi'; +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 { type AztecAddress, Fr, FunctionData, TxContext } from '@aztec/circuits.js'; +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 c76d20e70db..894dcdc4f5e 100644 --- a/yarn-project/entrypoints/src/entrypoint_payload.ts +++ b/yarn-project/entrypoints/src/entrypoint_payload.ts @@ -1,7 +1,7 @@ -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 { AztecAddress } from '@aztec/circuits.js'; +import { type FunctionCall, PackedArguments, emptyFunctionCall } from '@aztec/circuit-types'; +import { type 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 59431343878..86e3d82e0ea 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 { AztecAddress, FunctionData, TxContext } from '@aztec/circuits.js'; -import { FunctionAbi, encodeArguments } from '@aztec/foundation/abi'; +import { type EntrypointInterface } from '@aztec/aztec.js/entrypoint'; +import { type FunctionCall, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types'; +import { type AztecAddress, FunctionData, TxContext } from '@aztec/circuits.js'; +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 fa71f161b2a..92e0b01c9d3 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 7fb7939056e..6df49139bd9 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 91d66239a00..0f8d401a01d 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 6765234a136..8ef2db85236 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/l1_contract_addresses.ts b/yarn-project/ethereum/src/l1_contract_addresses.ts index ff4e4c6a373..bcbcddbc260 100644 --- a/yarn-project/ethereum/src/l1_contract_addresses.ts +++ b/yarn-project/ethereum/src/l1_contract_addresses.ts @@ -1,4 +1,4 @@ -import { EthAddress } from '@aztec/foundation/eth-address'; +import { type EthAddress } from '@aztec/foundation/eth-address'; export const l1ContractsNames = [ 'availabilityOracleAddress', diff --git a/yarn-project/ethereum/src/testnet.ts b/yarn-project/ethereum/src/testnet.ts index 074e73ef096..c6e28871a3e 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/.eslintrc.cjs b/yarn-project/foundation/.eslintrc.cjs index daa6e7a51eb..ec3bcb348b7 100644 --- a/yarn-project/foundation/.eslintrc.cjs +++ b/yarn-project/foundation/.eslintrc.cjs @@ -41,6 +41,7 @@ module.exports = { '@typescript-eslint/await-thenable': 'error', '@typescript-eslint/no-floating-promises': 2, '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], + '@typescript-eslint/consistent-type-imports': ['error', { fixStyle: 'inline-type-imports' }], 'require-await': 2, 'no-console': 'error', 'no-constant-condition': 'off', diff --git a/yarn-project/foundation/src/abi/abi.test.ts b/yarn-project/foundation/src/abi/abi.test.ts index afa4d484e6b..b7b1334e432 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 7cefecf772b..717f3b38dde 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 { type 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 e1f4558afa2..a65f52925ea 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 Fr } from '../fields/index.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 a234bc04758..f78e1325dfd 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 59fc8deb749..7ca7260db68 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/event_selector.ts b/yarn-project/foundation/src/abi/event_selector.ts index 48779aabad6..f9fa0a5b05e 100644 --- a/yarn-project/foundation/src/abi/event_selector.ts +++ b/yarn-project/foundation/src/abi/event_selector.ts @@ -1,6 +1,6 @@ import { fromHex, toBigIntBE } from '../bigint-buffer/index.js'; import { keccak, randomBytes } from '../crypto/index.js'; -import { Fr } from '../fields/fields.js'; +import { type Fr } from '../fields/fields.js'; import { BufferReader } from '../serialize/buffer_reader.js'; import { Selector } from './selector.js'; diff --git a/yarn-project/foundation/src/abi/function_selector.ts b/yarn-project/foundation/src/abi/function_selector.ts index 9ffcc958883..3c71482a6a0 100644 --- a/yarn-project/foundation/src/abi/function_selector.ts +++ b/yarn-project/foundation/src/abi/function_selector.ts @@ -1,9 +1,9 @@ import { fromHex, toBigIntBE } from '../bigint-buffer/index.js'; import { keccak, randomBytes } from '../crypto/index.js'; -import { Fr } from '../fields/fields.js'; +import { type 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 97af4818fff..4821aa45f8d 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/aztec-address/index.ts b/yarn-project/foundation/src/aztec-address/index.ts index ea1407b9eaa..c932c10cdaa 100644 --- a/yarn-project/foundation/src/aztec-address/index.ts +++ b/yarn-project/foundation/src/aztec-address/index.ts @@ -1,7 +1,7 @@ import { inspect } from 'util'; import { Fr, fromBuffer } from '../fields/index.js'; -import { BufferReader, FieldReader } from '../serialize/index.js'; +import { type BufferReader, FieldReader } from '../serialize/index.js'; /** * AztecAddress represents a 32-byte address in the Aztec Protocol. diff --git a/yarn-project/foundation/src/collection/array.ts b/yarn-project/foundation/src/collection/array.ts index 4ec479470e8..3a397db8b50 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 c7a90507001..29fc82dcac3 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 6b9676f3913..1ff89efda47 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 be9d4ec39b9..a8fad0b12d6 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 1e0c69d2579..46ab33f0da5 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/convert.ts b/yarn-project/foundation/src/json-rpc/convert.ts index 6de58f4fee8..7bdb85aa34b 100644 --- a/yarn-project/foundation/src/json-rpc/convert.ts +++ b/yarn-project/foundation/src/json-rpc/convert.ts @@ -1,7 +1,7 @@ import { Buffer } from 'buffer'; import cloneDeepWith from 'lodash.clonedeepwith'; -import { ClassConverter } from './class_converter.js'; +import { type ClassConverter } from './class_converter.js'; /** * Check prototype chain to determine if an object is 'plain' (not a class instance). 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 b46a1983ada..47cc279a401 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 bd2d537bc54..9c342805d09 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 4e13f742236..dee595f96c7 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 074df6356e9..aeef1993b45 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 9c9998a98c4..2747618147d 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 a3bb6c1575a..e7b7fcac968 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 0c2eb485d89..82de7f28696 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 d3bb2e12bea..be1bf669a82 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 be3a06e72dd..1c1242457b4 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 { Fq, type Fr } from '../fields/fields.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 319112ebede..144827a907f 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 d7b55435a15..2f5cde89013 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 68a34492004..94b62175d06 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 779a21cd224..5db7b9168bb 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 c019477d238..67a93caf757 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 502f65c7a17..13b94efcda3 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 e4dba2498cb..dbaeb2950f5 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 { TransportClient } from '../transport_client.js'; -import { DispatchMsg } from './create_dispatch_fn.js'; +import { type TransferDescriptor, isTransferDescriptor } from '../interface/transferable.js'; +import { type TransportClient } from '../transport_client.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 af01fd19520..b42e2ec1fcf 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 d71b3ffb1a8..1b2da8134ac 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 type 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 37524380ca4..b49f80d5b8b 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 { type 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 11cbb7d129e..e81394d5c83 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, type 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 447aec1f08e..406b2eea87e 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 25ebc40738e..b96acc726c8 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 { type 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 3fb2fd836d5..5709e662edc 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 64732ab857b..706215779b7 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/wasm_module.ts b/yarn-project/foundation/src/wasm/wasm_module.ts index db4e1da83c9..20851a05cc6 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 37683aea550..06a59e22c3d 100644 --- a/yarn-project/foundation/src/worker/browser/start_web_module.ts +++ b/yarn-project/foundation/src/worker/browser/start_web_module.ts @@ -1,5 +1,5 @@ -import { DispatchMsg, TransportServer, WorkerListener } from '../../transport/index.js'; -import { WasmModule } from '../../wasm/index.js'; +import { type DispatchMsg, TransportServer, WorkerListener } from '../../transport/index.js'; +import { type WasmModule } from '../../wasm/index.js'; /** * Start the transport server corresponding to this module. 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 6e5322a3723..f19e2b9bcda 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 a28d3fd7482..7560c60852e 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/node/node_data_store.ts b/yarn-project/foundation/src/worker/node/node_data_store.ts index 24bb39747bf..fd0986487c4 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 d297ed727bc..bd4c8b096f3 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 14f01cfb70d..ac445de1926 100644 --- a/yarn-project/foundation/src/worker/node/start_node_module.ts +++ b/yarn-project/foundation/src/worker/node/start_node_module.ts @@ -1,7 +1,7 @@ import { parentPort } from 'worker_threads'; -import { DispatchMsg, NodeListener, TransportServer } from '../../transport/index.js'; -import { WasmModule } from '../../wasm/wasm_module.js'; +import { type DispatchMsg, NodeListener, TransportServer } from '../../transport/index.js'; +import { type WasmModule } from '../../wasm/wasm_module.js'; if (!parentPort) { throw new Error('InvalidWorker'); diff --git a/yarn-project/foundation/src/worker/wasm_worker.ts b/yarn-project/foundation/src/worker/wasm_worker.ts index a9dcb4a7ad2..e9036023ee3 100644 --- a/yarn-project/foundation/src/worker/wasm_worker.ts +++ b/yarn-project/foundation/src/worker/wasm_worker.ts @@ -1,5 +1,5 @@ -import { Proxify } from '../transport/index.js'; -import { WasmModule } from '../wasm/wasm_module.js'; +import { type Proxify } from '../transport/index.js'; +import { type WasmModule } from '../wasm/wasm_module.js'; /** * Represents either a WASM web worker, or node.js worker. diff --git a/yarn-project/foundation/src/worker/worker_pool.ts b/yarn-project/foundation/src/worker/worker_pool.ts index b121f8f85c8..7e153489586 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 fc40b397485..0202652cbc0 100644 --- a/yarn-project/key-store/src/key_pair.ts +++ b/yarn-project/key-store/src/key_pair.ts @@ -1,6 +1,6 @@ -import { KeyPair, PublicKey } from '@aztec/circuit-types'; -import { GrumpkinPrivateKey, GrumpkinScalar } from '@aztec/circuits.js'; -import { Grumpkin } from '@aztec/circuits.js/barretenberg'; +import { type KeyPair, type PublicKey } from '@aztec/circuit-types'; +import { type GrumpkinPrivateKey, GrumpkinScalar } from '@aztec/circuits.js'; +import { type Grumpkin } from '@aztec/circuits.js/barretenberg'; /** * The ConstantKeyPair class is an implementation of the KeyPair interface, which allows generation and management of diff --git a/yarn-project/key-store/src/test_key_store.ts b/yarn-project/key-store/src/test_key_store.ts index f0bab98c51d..a5bfe3144b3 100644 --- a/yarn-project/key-store/src/test_key_store.ts +++ b/yarn-project/key-store/src/test_key_store.ts @@ -1,15 +1,15 @@ -import { KeyPair, KeyStore, PublicKey } from '@aztec/circuit-types'; +import { type KeyPair, type KeyStore, type PublicKey } from '@aztec/circuit-types'; import { - AztecAddress, - GrumpkinPrivateKey, + type AztecAddress, + type GrumpkinPrivateKey, GrumpkinScalar, Point, computeNullifierSecretKey, computeSiloedNullifierSecretKey, derivePublicKey, } from '@aztec/circuits.js'; -import { Grumpkin } from '@aztec/circuits.js/barretenberg'; -import { AztecKVStore, AztecMap } from '@aztec/kv-store'; +import { type Grumpkin } from '@aztec/circuits.js/barretenberg'; +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 0f68626e691..67c8151ffbc 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/map.ts b/yarn-project/kv-store/src/interfaces/map.ts index 0916146a4ab..d763254d31a 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 9b0f1c9364d..16962cf5695 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.test.ts b/yarn-project/kv-store/src/lmdb/array.test.ts index 3058302e87f..140d620a87d 100644 --- a/yarn-project/kv-store/src/lmdb/array.test.ts +++ b/yarn-project/kv-store/src/lmdb/array.test.ts @@ -1,4 +1,4 @@ -import { Database, open } from 'lmdb'; +import { type Database, open } from 'lmdb'; import { LmdbAztecArray } from './array.js'; diff --git a/yarn-project/kv-store/src/lmdb/array.ts b/yarn-project/kv-store/src/lmdb/array.ts index 1da3676aac0..3ba338d028f 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 { type 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.test.ts b/yarn-project/kv-store/src/lmdb/counter.test.ts index df490811a4e..36ac3e42679 100644 --- a/yarn-project/kv-store/src/lmdb/counter.test.ts +++ b/yarn-project/kv-store/src/lmdb/counter.test.ts @@ -1,6 +1,6 @@ import { randomBytes } from '@aztec/foundation/crypto'; -import { Database, open } from 'lmdb'; +import { type Database, open } from 'lmdb'; import { LmdbAztecCounter } from './counter.js'; diff --git a/yarn-project/kv-store/src/lmdb/counter.ts b/yarn-project/kv-store/src/lmdb/counter.ts index 74886e89dbf..26b60b624f0 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, type 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.test.ts b/yarn-project/kv-store/src/lmdb/map.test.ts index 007b4c4eb8f..9195dbcfd39 100644 --- a/yarn-project/kv-store/src/lmdb/map.test.ts +++ b/yarn-project/kv-store/src/lmdb/map.test.ts @@ -1,4 +1,4 @@ -import { Database, open } from 'lmdb'; +import { type Database, open } from 'lmdb'; 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 6e5fa67ef1e..be303a7ffab 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 { type 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 0fa4ffe69e4..abeefec242c 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 { type 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 af949224e97..ef1c735ed32 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 { type Database, type Key, type 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 e41297b9e82..d527e43a8b5 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 EthAddress } from '@aztec/foundation/eth-address'; +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 34d00d6b41a..7c77e8cf370 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 ba6d0ad983b..bb2cd0db0d7 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 44bd849479b..3e7c1b64c5c 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 SiblingPath } from '@aztec/circuit-types'; +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 dd5c30a78f0..44fd8c4d4d7 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 SiblingPath } from '@aztec/circuit-types'; +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 f1e40d37dbd..06c142edbe2 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 043d242f43a..b2a1d396b49 100644 --- a/yarn-project/merkle-tree/src/load_tree.ts +++ b/yarn-project/merkle-tree/src/load_tree.ts @@ -1,8 +1,8 @@ -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'; +import { type TreeBase, getTreeMeta } from './tree_base.js'; /** * Creates a new tree and sets its root, depth and size based on the meta data which are associated with the name. diff --git a/yarn-project/merkle-tree/src/new_tree.ts b/yarn-project/merkle-tree/src/new_tree.ts index a4d73af3693..d8040fc9f46 100644 --- a/yarn-project/merkle-tree/src/new_tree.ts +++ b/yarn-project/merkle-tree/src/new_tree.ts @@ -1,8 +1,8 @@ -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'; +import { type TreeBase } from './tree_base.js'; /** * Creates a new tree. diff --git a/yarn-project/merkle-tree/src/pedersen.ts b/yarn-project/merkle-tree/src/pedersen.ts index b4a749e5a8a..b49c34c527e 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 2945e0705d0..a1cba65c5ae 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 84a205a7741..111f6de0439 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 2549bf1544b..eca6d258f36 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 { TreeBase } from '../tree_base.js'; -import { TreeSnapshot, TreeSnapshotBuilder } from './snapshot_builder.js'; +import { type AppendOnlyTree } from '../interfaces/append_only_tree.js'; +import { type TreeBase } from '../tree_base.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 89a3d5af722..63e41641622 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 TreeBase } from '../tree_base.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 bc01c0b9ea1..486f633262a 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 9417dadf67b..dc519325f26 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 { type 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 beedabaec47..aa374542a9f 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 c608daa1118..c39108239d9 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 { TreeBase } from '../tree_base.js'; +import { type IndexedTree, type PreimageFactory } from '../interfaces/indexed_tree.js'; +import { type 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 bfdc3065846..5821ae95104 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 SiblingPath } from '@aztec/circuit-types'; +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 4dcf97bd5b4..b1bcd9a8fa1 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 TreeBase } from '../tree_base.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 4d11aa49359..c7a97acffee 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 646f01a2412..3ea1a8d9eb6 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 42e9a3cbfbe..cfe3bc3ebdd 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 a605e19025e..0ed6196c0e9 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 baf96a21df9..cd946ac771a 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 45c8cc6a6ce..fe27a0fb7a5 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 b544b661c5e..a2533ad9e6d 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 74b75c5dd43..dba34f92d8f 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 b1a221988bf..81c07c74165 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 db2ed88bfb2..cd20e8e0f2d 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 ee3513d6b67..4ac4ce2b4c3 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,6 +1,6 @@ -import { LogFn } from '@aztec/foundation/log'; +import { type LogFn } from '@aztec/foundation/log'; -import { Command } from 'commander'; +import { type Command } from 'commander'; import { dirname } from 'path'; export function addNoirCompilerCommanderActions(program: Command, log: LogFn = () => {}) { 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 eabae4c11a1..3a2f1d92e2e 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 87e22fcb23e..1a77f8916cb 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, diff --git a/yarn-project/noir-compiler/src/utils.ts b/yarn-project/noir-compiler/src/utils.ts index 7a93eda2518..6a097708b01 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 3e381b6ba00..19e1c28c060 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 cf56cc0b7c1..fb07caed0b4 100644 --- a/yarn-project/noir-protocol-circuits-types/src/index.ts +++ b/yarn-project/noir-protocol-circuits-types/src/index.ts @@ -1,26 +1,30 @@ import { - BaseOrMergeRollupPublicInputs, - BaseParityInputs, - BaseRollupInputs, - MergeRollupInputs, - ParityPublicInputs, - PrivateKernelInitCircuitPrivateInputs, - PrivateKernelInnerCircuitPrivateInputs, - PrivateKernelInnerCircuitPublicInputs, - PrivateKernelTailCircuitPrivateInputs, - PrivateKernelTailCircuitPublicInputs, - PublicKernelCircuitPrivateInputs, - PublicKernelCircuitPublicInputs, - PublicKernelTailCircuitPrivateInputs, - RootParityInputs, - RootRollupInputs, - RootRollupPublicInputs, + type BaseOrMergeRollupPublicInputs, + type BaseParityInputs, + type BaseRollupInputs, + type MergeRollupInputs, + type ParityPublicInputs, + type PrivateKernelInitCircuitPrivateInputs, + type PrivateKernelInnerCircuitPrivateInputs, + type PrivateKernelInnerCircuitPublicInputs, + type PrivateKernelTailCircuitPrivateInputs, + type PrivateKernelTailCircuitPublicInputs, + type PublicKernelCircuitPrivateInputs, + type PublicKernelCircuitPublicInputs, + type PublicKernelTailCircuitPrivateInputs, + type RootParityInputs, + type RootRollupInputs, + type 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 WasmBlackBoxFunctionSolver, + createBlackBoxSolver, + executeCircuitWithBlackBoxSolver, +} from '@noir-lang/acvm_js'; +import { type Abi, abiDecode, abiEncode } from '@noir-lang/noirc_abi'; +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 +59,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 8082a6c7801..6453b0313e0 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 1854a5fd73b..4c60072d12d 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 f0c35c66437..80835e3c71a 100644 --- a/yarn-project/noir-protocol-circuits-types/src/type_conversion.ts +++ b/yarn-project/noir-protocol-circuits-types/src/type_conversion.ts @@ -1,11 +1,11 @@ import { - ARCHIVE_HEIGHT, + type ARCHIVE_HEIGHT, AggregationObject, AppendOnlyTreeSnapshot, AztecAddress, BaseOrMergeRollupPublicInputs, - BaseParityInputs, - BaseRollupInputs, + type BaseParityInputs, + type BaseRollupInputs, CallContext, CallRequest, CallerContext, @@ -13,18 +13,18 @@ import { CombinedConstantData, ConstantRollupData, ContentCommitment, - ContractStorageRead, - ContractStorageUpdateRequest, + type ContractStorageRead, + type ContractStorageUpdateRequest, EthAddress, - FUNCTION_TREE_HEIGHT, + type FUNCTION_TREE_HEIGHT, Fr, FunctionData, FunctionSelector, GlobalVariables, - GrumpkinPrivateKey, + type GrumpkinPrivateKey, GrumpkinScalar, Header, - L2ToL1Message, + type L2ToL1Message, MAX_NEW_L2_TO_L1_MSGS_PER_TX, MAX_NEW_NOTE_HASHES_PER_TX, MAX_NEW_NULLIFIERS_PER_TX, @@ -45,168 +45,168 @@ import { MAX_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX, MAX_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, MaxBlockNumber, - MembershipWitness, - MergeRollupInputs, - NULLIFIER_TREE_HEIGHT, + type MembershipWitness, + type MergeRollupInputs, + type NULLIFIER_TREE_HEIGHT, NUM_BYTES_PER_SHA256, - NonMembershipHint, - NoteHashReadRequestMembershipWitness, + type NonMembershipHint, + type NoteHashReadRequestMembershipWitness, NullifierKeyValidationRequest, NullifierKeyValidationRequestContext, - NullifierLeafPreimage, - NullifierNonExistentReadRequestHints, - NullifierReadRequestHints, - PUBLIC_DATA_TREE_HEIGHT, + type NullifierLeafPreimage, + type NullifierNonExistentReadRequestHints, + type NullifierReadRequestHints, + type PUBLIC_DATA_TREE_HEIGHT, ParityPublicInputs, PartialStateReference, - PendingReadHint, + type PendingReadHint, Point, - PreviousRollupData, + type PreviousRollupData, PrivateAccumulatedNonRevertibleData, PrivateAccumulatedRevertibleData, - PrivateCallData, - PrivateCallStackItem, - PrivateCircuitPublicInputs, - PrivateKernelInitCircuitPrivateInputs, - PrivateKernelInnerCircuitPrivateInputs, + type PrivateCallData, + type PrivateCallStackItem, + type PrivateCircuitPublicInputs, + type PrivateKernelInitCircuitPrivateInputs, + type PrivateKernelInnerCircuitPrivateInputs, PrivateKernelInnerCircuitPublicInputs, - PrivateKernelInnerData, - PrivateKernelTailCircuitPrivateInputs, + type PrivateKernelInnerData, + type PrivateKernelTailCircuitPrivateInputs, PrivateKernelTailCircuitPublicInputs, PublicAccumulatedNonRevertibleData, PublicAccumulatedRevertibleData, - PublicCallData, - PublicCallStackItem, - PublicCircuitPublicInputs, + type PublicCallData, + type PublicCallStackItem, + type PublicCircuitPublicInputs, PublicDataRead, - PublicDataTreeLeaf, - PublicDataTreeLeafPreimage, + type PublicDataTreeLeaf, + type PublicDataTreeLeafPreimage, PublicDataUpdateRequest, - PublicKernelCircuitPrivateInputs, + type PublicKernelCircuitPrivateInputs, PublicKernelCircuitPublicInputs, - PublicKernelData, - PublicKernelTailCircuitPrivateInputs, + type PublicKernelData, + type PublicKernelTailCircuitPrivateInputs, ReadRequest, ReadRequestContext, - ReadRequestStatus, + type ReadRequestStatus, RevertCode, - RollupKernelCircuitPublicInputs, - RollupKernelData, + type RollupKernelCircuitPublicInputs, + type RollupKernelData, RollupValidationRequests, - RootParityInput, - RootParityInputs, - RootRollupInputs, + type RootParityInput, + type RootParityInputs, + type RootRollupInputs, RootRollupPublicInputs, - SettledReadHint, + type SettledReadHint, SideEffect, SideEffectLinkedToNoteHash, - StateDiffHints, + type StateDiffHints, StateReference, TxContext, - TxRequest, + type TxRequest, 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 055f8ac6e14..e70e871fbd6 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 b2411e80118..a31752544ef 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 1b2134ac45d..f4e9a8d3e76 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, type TxEffect, type 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 d0c9ba8da8a..91c0a5561f0 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 c93931afc1e..920efc8ea37 100644 --- a/yarn-project/p2p/src/client/p2p_client.ts +++ b/yarn-project/p2p/src/client/p2p_client.ts @@ -1,11 +1,18 @@ -import { L2Block, L2BlockContext, L2BlockDownloader, L2BlockSource, Tx, TxHash } from '@aztec/circuit-types'; +import { + type L2Block, + L2BlockContext, + L2BlockDownloader, + type L2BlockSource, + type Tx, + type 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 bfc6b1d1364..aff96c9cdf8 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 { type Tx, type 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 68ca52b7ec3..a0c2772feec 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 b9a38f2cd0c..6ee37d7d697 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 4237307d963..4e73de1e5b0 100644 --- a/yarn-project/p2p/src/service/libp2p_service.ts +++ b/yarn-project/p2p/src/service/libp2p_service.ts @@ -1,4 +1,4 @@ -import { Tx, TxHash } from '@aztec/circuit-types'; +import { type Tx, type TxHash } from '@aztec/circuit-types'; import { SerialQueue } from '@aztec/foundation/fifo'; import { createDebugLogger } from '@aztec/foundation/log'; @@ -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/service/service.ts b/yarn-project/p2p/src/service/service.ts index 7c2410b129a..fc9580d9b6d 100644 --- a/yarn-project/p2p/src/service/service.ts +++ b/yarn-project/p2p/src/service/service.ts @@ -1,4 +1,4 @@ -import { Tx, TxHash } from '@aztec/circuit-types'; +import { type Tx, type TxHash } from '@aztec/circuit-types'; /** * The interface for a P2P service implementation. diff --git a/yarn-project/p2p/src/service/tx_messages.test.ts b/yarn-project/p2p/src/service/tx_messages.test.ts index eedaca26560..6f097e36337 100644 --- a/yarn-project/p2p/src/service/tx_messages.test.ts +++ b/yarn-project/p2p/src/service/tx_messages.test.ts @@ -1,4 +1,4 @@ -import { Tx, mockTx, randomTxHash } from '@aztec/circuit-types'; +import { type Tx, mockTx, randomTxHash } from '@aztec/circuit-types'; import { expect } from '@jest/globals'; 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 fd1eba930e2..13729720692 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 8f4aad46a38..27aa1683fff 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.ts b/yarn-project/p2p/src/tx_pool/tx_pool.ts index 659f5a6d0ca..0ca939f7989 100644 --- a/yarn-project/p2p/src/tx_pool/tx_pool.ts +++ b/yarn-project/p2p/src/tx_pool/tx_pool.ts @@ -1,4 +1,4 @@ -import { Tx, TxHash } from '@aztec/circuit-types'; +import { type Tx, type TxHash } from '@aztec/circuit-types'; /** * Interface of a transaction pool. The pool includes tx requests and is kept up-to-date by a P2P client. 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 e2e9f74156e..ea08bd1b475 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 2a3ca423ce6..433bf7b269c 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 ea85f6f6acf..d5f5fcbff00 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 { type 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 042b3701e49..0dbaf8c2d74 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 2ecfe6c8ed1..d38126bf262 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 { type AztecAddress, type 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/instance-deployer/artifact.ts b/yarn-project/protocol-contracts/src/instance-deployer/artifact.ts index 3ae928ab045..809e35873ac 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 1a0942a9f2c..7a3101fa789 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 ede18eb397b..b3cf23f9f41 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 c9298b886f6..1d33cee36ed 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 { type 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 8d7e4ccb371..8286373e9da 100644 --- a/yarn-project/protocol-contracts/src/protocol_contract.ts +++ b/yarn-project/protocol-contracts/src/protocol_contract.ts @@ -1,12 +1,12 @@ import { - AztecAddress, + type AztecAddress, EthAddress, 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 d2c1f4842e4..f95b46fb006 100644 --- a/yarn-project/prover-client/src/dummy-prover.ts +++ b/yarn-project/prover-client/src/dummy-prover.ts @@ -1,13 +1,13 @@ 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'; +import { type GlobalVariables, makeEmptyProof } from '@aztec/circuits.js'; +import { type Fr } from '@aztec/foundation/fields'; export class DummyProver implements ProverClient { public start(): Promise { 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 5156edd6301..587881aad0c 100644 --- a/yarn-project/prover-client/src/orchestrator/block-building-helpers.ts +++ b/yarn-project/prover-client/src/orchestrator/block-building-helpers.ts @@ -1,13 +1,13 @@ -import { MerkleTreeId, ProcessedTx } from '@aztec/circuit-types'; +import { MerkleTreeId, type ProcessedTx } from '@aztec/circuit-types'; import { ARCHIVE_HEIGHT, AppendOnlyTreeSnapshot, - BaseOrMergeRollupPublicInputs, - BaseParityInputs, + type BaseOrMergeRollupPublicInputs, + type BaseParityInputs, BaseRollupInputs, ConstantRollupData, Fr, - GlobalVariables, + type GlobalVariables, L1_TO_L2_MSG_SUBTREE_HEIGHT, L1_TO_L2_MSG_SUBTREE_SIBLING_PATH_LENGTH, MAX_NEW_NULLIFIERS_PER_TX, @@ -20,14 +20,14 @@ import { NULLIFIER_SUBTREE_HEIGHT, NULLIFIER_SUBTREE_SIBLING_PATH_LENGTH, NULLIFIER_TREE_HEIGHT, - NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, + type NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, NullifierLeafPreimage, PUBLIC_DATA_SUBTREE_HEIGHT, PUBLIC_DATA_SUBTREE_SIBLING_PATH_LENGTH, PUBLIC_DATA_TREE_HEIGHT, PartialStateReference, PreviousRollupData, - Proof, + type Proof, PublicDataTreeLeaf, PublicDataTreeLeafPreimage, ROLLUP_VK_TREE_HEIGHT, @@ -35,22 +35,22 @@ import { RollupKernelData, RollupTypes, RootParityInput, - RootParityInputs, + type RootParityInputs, RootRollupInputs, - RootRollupPublicInputs, + type RootRollupPublicInputs, StateDiffHints, - StateReference, + type StateReference, VK_TREE_HEIGHT, - VerificationKey, + type 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 c4af9a479dc..d27a591b872 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator.test.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator.test.ts @@ -1,15 +1,15 @@ import { MerkleTreeId, PROVING_STATUS, - ProcessedTx, - ProvingSuccess, + type ProcessedTx, + type ProvingSuccess, makeEmptyProcessedTx as makeEmptyProcessedTxFromHistoricalTreeRoots, makeProcessedTx, mockTx, } from '@aztec/circuit-types'; import { AztecAddress, - BaseOrMergeRollupPublicInputs, + type BaseOrMergeRollupPublicInputs, EthAddress, Fr, GlobalVariables, @@ -29,7 +29,7 @@ import { PublicDataTreeLeaf, PublicDataUpdateRequest, PublicKernelCircuitPublicInputs, - RootRollupPublicInputs, + type RootRollupPublicInputs, SideEffect, SideEffectLinkedToNoteHash, sideEffectCmp, @@ -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 d813a9dc0d1..9845e6f51c5 100644 --- a/yarn-project/prover-client/src/orchestrator/orchestrator.ts +++ b/yarn-project/prover-client/src/orchestrator/orchestrator.ts @@ -1,33 +1,33 @@ -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, type 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, + type AppendOnlyTreeSnapshot, + type BaseOrMergeRollupPublicInputs, BaseParityInputs, - BaseRollupInputs, + type BaseRollupInputs, Fr, - GlobalVariables, + type GlobalVariables, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, NUM_BASE_PARITY_PER_ROOT_PARITY, - Proof, - RootParityInput, + type Proof, + type RootParityInput, RootParityInputs, } from '@aztec/circuits.js'; 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 232f7ad40e5..c21f7e4e385 100644 --- a/yarn-project/prover-client/src/orchestrator/proving-state.ts +++ b/yarn-project/prover-client/src/orchestrator/proving-state.ts @@ -1,14 +1,14 @@ -import { ProcessedTx, ProvingResult } from '@aztec/circuit-types'; +import { type ProcessedTx, type ProvingResult } from '@aztec/circuit-types'; import { - BaseOrMergeRollupPublicInputs, - Fr, - GlobalVariables, - NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, - Proof, - RootParityInput, + type BaseOrMergeRollupPublicInputs, + type Fr, + type GlobalVariables, + type NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP, + type Proof, + type 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 7ca043c8f8f..c06d68ad444 100644 --- a/yarn-project/prover-client/src/prover/empty.ts +++ b/yarn-project/prover-client/src/prover/empty.ts @@ -1,20 +1,20 @@ /* eslint-disable require-await */ import { AggregationObject, - BaseOrMergeRollupPublicInputs, - BaseParityInputs, - BaseRollupInputs, - MergeRollupInputs, - ParityPublicInputs, + type BaseOrMergeRollupPublicInputs, + type BaseParityInputs, + type BaseRollupInputs, + type MergeRollupInputs, + type ParityPublicInputs, Proof, - PublicCircuitPublicInputs, - PublicKernelCircuitPublicInputs, - RootParityInputs, - RootRollupInputs, - RootRollupPublicInputs, + type PublicCircuitPublicInputs, + type PublicKernelCircuitPublicInputs, + type RootParityInputs, + type RootRollupInputs, + type 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/prover/index.ts b/yarn-project/prover-client/src/prover/index.ts index 333d872cb96..4c1be5db433 100644 --- a/yarn-project/prover-client/src/prover/index.ts +++ b/yarn-project/prover-client/src/prover/index.ts @@ -1,15 +1,15 @@ import { - BaseOrMergeRollupPublicInputs, - BaseParityInputs, - BaseRollupInputs, - MergeRollupInputs, - ParityPublicInputs, - Proof, - PublicCircuitPublicInputs, - PublicKernelCircuitPublicInputs, - RootParityInputs, - RootRollupInputs, - RootRollupPublicInputs, + type BaseOrMergeRollupPublicInputs, + type BaseParityInputs, + type BaseRollupInputs, + type MergeRollupInputs, + type ParityPublicInputs, + type Proof, + type PublicCircuitPublicInputs, + type PublicKernelCircuitPublicInputs, + type RootParityInputs, + type RootRollupInputs, + type RootRollupPublicInputs, } from '@aztec/circuits.js'; /** diff --git a/yarn-project/prover-client/src/simulator/rollup.ts b/yarn-project/prover-client/src/simulator/rollup.ts index 5101c07b2d9..9faf8bc158e 100644 --- a/yarn-project/prover-client/src/simulator/rollup.ts +++ b/yarn-project/prover-client/src/simulator/rollup.ts @@ -1,13 +1,13 @@ -import { CircuitSimulationStats } from '@aztec/circuit-types/stats'; +import { type CircuitSimulationStats } from '@aztec/circuit-types/stats'; import { - BaseOrMergeRollupPublicInputs, - BaseParityInputs, - BaseRollupInputs, - MergeRollupInputs, - ParityPublicInputs, - RootParityInputs, - RootRollupInputs, - RootRollupPublicInputs, + type BaseOrMergeRollupPublicInputs, + type BaseParityInputs, + type BaseRollupInputs, + type MergeRollupInputs, + type ParityPublicInputs, + type RootParityInputs, + type RootRollupInputs, + type RootRollupPublicInputs, } from '@aztec/circuits.js'; import { createDebugLogger } from '@aztec/foundation/log'; import { elapsed } from '@aztec/foundation/timer'; @@ -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 782b65d14c2..a9cb35d5f7e 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 { Fr, GlobalVariables } from '@aztec/circuits.js'; -import { SimulationProvider } from '@aztec/simulator'; -import { WorldStateSynchronizer } from '@aztec/world-state'; +import { type ProcessedTx } from '@aztec/circuit-types'; +import { type ProverClient, type ProvingTicket } from '@aztec/circuit-types/interfaces'; +import { type Fr, type GlobalVariables } from '@aztec/circuits.js'; +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 ad51ed876c9..eaf53cb9be6 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 { type AztecAddress, MembershipWitness, VK_TREE_HEIGHT } from '@aztec/circuits.js'; import { - ContractArtifact, - FunctionArtifact, - FunctionDebugMetadata, - FunctionSelector, + type ContractArtifact, + type FunctionArtifact, + type FunctionDebugMetadata, + type FunctionSelector, getFunctionDebugMetadata, } from '@aztec/foundation/abi'; -import { Fr } from '@aztec/foundation/fields'; +import { type 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 6ea2e061723..4feffc5207b 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 @@ -5,11 +5,11 @@ import { computePrivateFunctionsTree, getContractClassFromArtifact, } from '@aztec/circuits.js'; -import { MerkleTree } from '@aztec/circuits.js/merkle'; -import { ContractArtifact, FunctionSelector } from '@aztec/foundation/abi'; +import { type MerkleTree } from '@aztec/circuits.js/merkle'; +import { type ContractArtifact, type 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 e49d96c061c..85f726d0973 100644 --- a/yarn-project/pxe/src/database/contracts/contract_artifact_db.ts +++ b/yarn-project/pxe/src/database/contracts/contract_artifact_db.ts @@ -1,5 +1,5 @@ -import { ContractArtifact } from '@aztec/foundation/abi'; -import { Fr } from '@aztec/foundation/fields'; +import { type ContractArtifact } from '@aztec/foundation/abi'; +import { type Fr } from '@aztec/foundation/fields'; /** * PXE database for managing contract artifacts. 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 0fbd0696384..77abb2f1641 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 AztecAddress } from '@aztec/circuits.js'; +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 06354bb4074..d45d179e5b2 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 8fabdf14872..aae846bde60 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 { Fr, type Point } from '@aztec/foundation/fields'; +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 5ca51311182..5717a668451 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 a755f710331..13aeccf6158 100644 --- a/yarn-project/pxe/src/database/pxe_database.ts +++ b/yarn-project/pxe/src/database/pxe_database.ts @@ -1,14 +1,14 @@ -import { NoteFilter } from '@aztec/circuit-types'; -import { CompleteAddress, Header, PublicKey } from '@aztec/circuits.js'; -import { 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 { ContractArtifactDatabase } from './contracts/contract_artifact_db.js'; -import { ContractInstanceDatabase } from './contracts/contract_instance_db.js'; -import { DeferredNoteDao } from './deferred_note_dao.js'; -import { NoteDao } from './note_dao.js'; +import { type NoteFilter } from '@aztec/circuit-types'; +import { type CompleteAddress, type Header, type PublicKey } from '@aztec/circuits.js'; +import { type ContractArtifact } from '@aztec/foundation/abi'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; +import { type Fr } from '@aztec/foundation/fields'; +import { type ContractInstanceWithAddress } from '@aztec/types/contracts'; + +import { type ContractArtifactDatabase } from './contracts/contract_artifact_db.js'; +import { type ContractInstanceDatabase } from './contracts/contract_instance_db.js'; +import { type DeferredNoteDao } from './deferred_note_dao.js'; +import { type NoteDao } from './note_dao.js'; /** * A database interface that provides methods for retrieving, adding, and removing transactional data related to Aztec 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 7ee0a403ebe..9a1fbbe46f8 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'; @@ -6,9 +6,9 @@ import { Fr, Point } from '@aztec/foundation/fields'; import { BenchmarkingContractArtifact } from '@aztec/noir-contracts.js/Benchmarking'; import { SerializableContractInstance } from '@aztec/types/contracts'; -import { NoteDao } from './note_dao.js'; +import { type 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/kernel_oracle/index.ts b/yarn-project/pxe/src/kernel_oracle/index.ts index d37b84338cd..a1948244093 100644 --- a/yarn-project/pxe/src/kernel_oracle/index.ts +++ b/yarn-project/pxe/src/kernel_oracle/index.ts @@ -1,18 +1,18 @@ -import { AztecNode, KeyStore } from '@aztec/circuit-types'; +import { type AztecNode, type KeyStore } from '@aztec/circuit-types'; import { - AztecAddress, - Fr, - FunctionSelector, + type AztecAddress, + type Fr, + type FunctionSelector, MembershipWitness, - NOTE_HASH_TREE_HEIGHT, - Point, + type NOTE_HASH_TREE_HEIGHT, + type Point, 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 ContractDataOracle } from '../contract_data_oracle/index.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 eb7ee451963..f57f1d8c7b4 100644 --- a/yarn-project/pxe/src/kernel_prover/hints_builder.ts +++ b/yarn-project/pxe/src/kernel_prover/hints_builder.ts @@ -1,24 +1,24 @@ import { Fr, GrumpkinScalar, - MAX_NEW_NOTE_HASHES_PER_TX, + type MAX_NEW_NOTE_HASHES_PER_TX, MAX_NEW_NULLIFIERS_PER_TX, MAX_NOTE_HASH_READ_REQUESTS_PER_TX, MAX_NULLIFIER_KEY_VALIDATION_REQUESTS_PER_TX, - MAX_NULLIFIER_READ_REQUESTS_PER_TX, + type MAX_NULLIFIER_READ_REQUESTS_PER_TX, MembershipWitness, NULLIFIER_TREE_HEIGHT, - NullifierKeyValidationRequestContext, - ReadRequestContext, - SideEffect, - SideEffectLinkedToNoteHash, - SideEffectType, + type NullifierKeyValidationRequestContext, + type ReadRequestContext, + type SideEffect, + type SideEffectLinkedToNoteHash, + 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 27ca152a181..094acb78924 100644 --- a/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts +++ b/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts @@ -13,7 +13,7 @@ import { PrivateKernelInnerCircuitPublicInputs, PrivateKernelTailCircuitPublicInputs, SideEffect, - TxRequest, + type TxRequest, VK_TREE_HEIGHT, VerificationKey, makeEmptyProof, @@ -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 f2d8e65ad93..6875db0ec9f 100644 --- a/yarn-project/pxe/src/kernel_prover/kernel_prover.ts +++ b/yarn-project/pxe/src/kernel_prover/kernel_prover.ts @@ -1,9 +1,9 @@ import { - AztecAddress, + type AztecAddress, CallRequest, Fr, - MAX_NEW_NOTE_HASHES_PER_TX, - MAX_NEW_NULLIFIERS_PER_TX, + type MAX_NEW_NOTE_HASHES_PER_TX, + type MAX_NEW_NULLIFIERS_PER_TX, MAX_NOTE_HASH_READ_REQUESTS_PER_CALL, MAX_PRIVATE_CALL_STACK_LENGTH_PER_CALL, MAX_PUBLIC_CALL_STACK_LENGTH_PER_CALL, @@ -14,9 +14,9 @@ import { PrivateKernelInnerCircuitPublicInputs, PrivateKernelInnerData, PrivateKernelTailCircuitPrivateInputs, - SideEffect, - SideEffectLinkedToNoteHash, - TxRequest, + type SideEffect, + type SideEffectLinkedToNoteHash, + type TxRequest, VK_TREE_HEIGHT, VerificationKey, makeEmptyProof, @@ -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 6dfabdc0642..c7db9590c60 100644 --- a/yarn-project/pxe/src/kernel_prover/proof_creator.ts +++ b/yarn-project/pxe/src/kernel_prover/proof_creator.ts @@ -1,16 +1,16 @@ -import { CircuitSimulationStats } from '@aztec/circuit-types/stats'; +import { type CircuitSimulationStats } from '@aztec/circuit-types/stats'; import { - PrivateCircuitPublicInputs, - PrivateKernelInitCircuitPrivateInputs, - PrivateKernelInnerCircuitPrivateInputs, - PrivateKernelInnerCircuitPublicInputs, - PrivateKernelTailCircuitPrivateInputs, - PrivateKernelTailCircuitPublicInputs, - Proof, + type PrivateCircuitPublicInputs, + type PrivateKernelInitCircuitPrivateInputs, + type PrivateKernelInnerCircuitPrivateInputs, + type PrivateKernelInnerCircuitPublicInputs, + type PrivateKernelTailCircuitPrivateInputs, + type PrivateKernelTailCircuitPublicInputs, + type Proof, makeEmptyProof, } from '@aztec/circuits.js'; import { siloNoteHash } from '@aztec/circuits.js/hash'; -import { Fr } from '@aztec/foundation/fields'; +import { type Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; import { elapsed } from '@aztec/foundation/timer'; import { executeInit, executeInner, executeTail } from '@aztec/noir-protocol-circuits-types'; 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 2126f70e38d..143b0c227c5 100644 --- a/yarn-project/pxe/src/kernel_prover/proving_data_oracle.ts +++ b/yarn-project/pxe/src/kernel_prover/proving_data_oracle.ts @@ -1,16 +1,16 @@ -import { NullifierMembershipWitness } from '@aztec/circuit-types'; +import { type NullifierMembershipWitness } from '@aztec/circuit-types'; import { - FUNCTION_TREE_HEIGHT, - Fr, - FunctionSelector, - GrumpkinPrivateKey, - MembershipWitness, - NOTE_HASH_TREE_HEIGHT, - Point, - VK_TREE_HEIGHT, - VerificationKey, + type FUNCTION_TREE_HEIGHT, + type Fr, + type FunctionSelector, + type GrumpkinPrivateKey, + type MembershipWitness, + type NOTE_HASH_TREE_HEIGHT, + type Point, + type VK_TREE_HEIGHT, + type VerificationKey, } from '@aztec/circuits.js'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; /** * Provides functionality to fetch membership witnesses for verification keys, 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 3f026ce3a9d..18b18ba0295 100644 --- a/yarn-project/pxe/src/note_processor/note_processor.test.ts +++ b/yarn-project/pxe/src/note_processor/note_processor.test.ts @@ -1,12 +1,12 @@ import { - AztecNode, + type AztecNode, EncryptedFunctionL2Logs, EncryptedL2BlockL2Logs, EncryptedL2Log, EncryptedTxL2Logs, - KeyPair, - KeyStore, - L1NotePayload, + type KeyPair, + type KeyStore, + type L1NotePayload, L2Block, L2BlockContext, TaggedNote, @@ -15,17 +15,17 @@ 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 { type 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 { type NoteDao } from '../database/note_dao.js'; import { NoteProcessor } from './note_processor.js'; const TXS_PER_BLOCK = 4; diff --git a/yarn-project/pxe/src/note_processor/note_processor.ts b/yarn-project/pxe/src/note_processor/note_processor.ts index 7edfe6e5b09..e5db07c9d71 100644 --- a/yarn-project/pxe/src/note_processor/note_processor.ts +++ b/yarn-project/pxe/src/note_processor/note_processor.ts @@ -1,22 +1,22 @@ import { - AztecNode, - EncryptedL2BlockL2Logs, - KeyStore, + type AztecNode, + type EncryptedL2BlockL2Logs, + type KeyStore, L1NotePayload, - L2BlockContext, + type 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 { type Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; 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 { NoteDao } from '../database/note_dao.js'; +import { type PxeDatabase } from '../database/index.js'; +import { type 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 396012a4ee9..02b8526be07 100644 --- a/yarn-project/pxe/src/note_processor/produce_note_dao.ts +++ b/yarn-project/pxe/src/note_processor/produce_note_dao.ts @@ -1,7 +1,7 @@ -import { L1NotePayload, TxHash } from '@aztec/circuit-types'; -import { Fr, PublicKey } from '@aztec/circuits.js'; +import { type L1NotePayload, type TxHash } from '@aztec/circuit-types'; +import { Fr, type PublicKey } from '@aztec/circuits.js'; import { computeCommitmentNonce, siloNullifier } from '@aztec/circuits.js/hash'; -import { AcirSimulator } from '@aztec/simulator'; +import { type AcirSimulator } from '@aztec/simulator'; import { NoteDao } from '../database/note_dao.js'; 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 ef91f7836be..955d4ae80d7 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 12813a382b1..7daead96c66 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 21e03cccf7d..338d0c6cedc 100644 --- a/yarn-project/pxe/src/pxe_service/pxe_service.ts +++ b/yarn-project/pxe/src/pxe_service/pxe_service.ts @@ -1,61 +1,61 @@ import { - AuthWitness, - AztecNode, + type AuthWitness, + type AztecNode, EncryptedTxL2Logs, ExtendedNote, - FunctionCall, - GetUnencryptedLogsResponse, - KeyStore, - L2Block, - LogFilter, + type FunctionCall, + type GetUnencryptedLogsResponse, + type KeyStore, + type L2Block, + type LogFilter, MerkleTreeId, - NoteFilter, - PXE, + type NoteFilter, + type PXE, SimulationError, Tx, - TxEffect, - TxExecutionRequest, - TxHash, - TxReceipt, + type TxEffect, + type TxExecutionRequest, + type TxHash, + type TxReceipt, 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, - PrivateKernelTailCircuitPublicInputs, - PublicCallRequest, + type PartialAddress, + type PrivateKernelTailCircuitPublicInputs, + type 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 AcirSimulator, + 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 fcb41bd9014..bbef70b77ba 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 7c24b72307b..7eb329c42e3 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 40d30a9198d..e1a4c898578 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 1be28074b65..56e65ee0e81 100644 --- a/yarn-project/pxe/src/simulator_oracle/index.ts +++ b/yarn-project/pxe/src/simulator_oracle/index.ts @@ -1,30 +1,30 @@ import { - AztecNode, - KeyStore, - L2Block, + type AztecNode, + type KeyStore, + type L2Block, MerkleTreeId, - NoteStatus, - NullifierMembershipWitness, - PublicDataWitness, - SiblingPath, + type NoteStatus, + type NullifierMembershipWitness, + type PublicDataWitness, + type SiblingPath, } from '@aztec/circuit-types'; import { - AztecAddress, - CompleteAddress, - EthAddress, - Fr, - FunctionSelector, - Header, - L1_TO_L2_MSG_TREE_HEIGHT, + type AztecAddress, + type CompleteAddress, + type EthAddress, + type Fr, + type FunctionSelector, + type Header, + type 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 ContractDataOracle } from '../contract_data_oracle/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 5de7f55dfb8..81f079c6b7e 100644 --- a/yarn-project/pxe/src/synchronizer/synchronizer.test.ts +++ b/yarn-project/pxe/src/synchronizer/synchronizer.test.ts @@ -1,5 +1,5 @@ -import { AztecNode, L2Block } from '@aztec/circuit-types'; -import { CompleteAddress, Fr, GrumpkinScalar, Header, INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js'; +import { type AztecNode, L2Block } from '@aztec/circuit-types'; +import { CompleteAddress, Fr, GrumpkinScalar, type Header, INITIAL_L2_BLOCK_NUM } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { makeHeader } from '@aztec/circuits.js/testing'; import { randomInt } from '@aztec/foundation/crypto'; @@ -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 7ae66192402..a73bc1416a2 100644 --- a/yarn-project/pxe/src/synchronizer/synchronizer.ts +++ b/yarn-project/pxe/src/synchronizer/synchronizer.ts @@ -1,13 +1,20 @@ -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 { SerialQueue } from '@aztec/foundation/fifo'; -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; +import { + type AztecNode, + type KeyStore, + L2BlockContext, + L2BlockL2Logs, + MerkleTreeId, + type TxHash, +} from '@aztec/circuit-types'; +import { type NoteProcessorCaughtUpStats } from '@aztec/circuit-types/stats'; +import { type AztecAddress, type Fr, INITIAL_L2_BLOCK_NUM, type PublicKey } from '@aztec/circuits.js'; +import { type SerialQueue } from '@aztec/foundation/fifo'; +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 { NoteDao } from '../database/note_dao.js'; +import { type DeferredNoteDao } from '../database/deferred_note_dao.js'; +import { type PxeDatabase } from '../database/index.js'; +import { type NoteDao } from '../database/note_dao.js'; import { NoteProcessor } from '../note_processor/index.js'; /** diff --git a/yarn-project/scripts/src/benchmarks/aggregate.ts b/yarn-project/scripts/src/benchmarks/aggregate.ts index 528dda9b2ca..ce1d8905463 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 79a96f8fe14..3cbf3656784 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 f54dabbe3a9..b86863b9393 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 2884374561a..156b0c38c93 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/global_builder.ts b/yarn-project/sequencer-client/src/global_variable_builder/global_builder.ts index 2b6212b71da..ea489d4dd3b 100644 --- a/yarn-project/sequencer-client/src/global_variable_builder/global_builder.ts +++ b/yarn-project/sequencer-client/src/global_variable_builder/global_builder.ts @@ -1,4 +1,4 @@ -import { AztecAddress, EthAddress, GlobalVariables } from '@aztec/circuits.js'; +import { type AztecAddress, type EthAddress, GlobalVariables } from '@aztec/circuits.js'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; 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 91ab6caecb8..7c762838e0a 100644 --- a/yarn-project/sequencer-client/src/global_variable_builder/index.ts +++ b/yarn-project/sequencer-client/src/global_variable_builder/index.ts @@ -1,5 +1,5 @@ -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'; 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 363e63ed8d1..bb1acd8720c 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,18 +2,18 @@ import { createEthereumChain } from '@aztec/ethereum'; import { RollupAbi } from '@aztec/l1-artifacts'; import { - GetContractReturnType, - HttpTransport, - PublicClient, + type GetContractReturnType, + type HttpTransport, + type PublicClient, createPublicClient, getAddress, getContract, http, } from 'viem'; -import * as chains from 'viem/chains'; +import type * 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 96ad07bd6f1..e78fa7c2d19 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 9fd03d25880..529011d5005 100644 --- a/yarn-project/sequencer-client/src/publisher/index.ts +++ b/yarn-project/sequencer-client/src/publisher/index.ts @@ -1,4 +1,4 @@ -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'; 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 d66e92757df..9cedeee9122 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 4fb6a11fcb2..c184a4fa442 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 L2Block } from '@aztec/circuit-types'; +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 f703a22af69..6691ac741da 100644 --- a/yarn-project/sequencer-client/src/publisher/viem-tx-sender.ts +++ b/yarn-project/sequencer-client/src/publisher/viem-tx-sender.ts @@ -1,14 +1,14 @@ -import { L2Block } from '@aztec/circuit-types'; +import { type L2Block } from '@aztec/circuit-types'; import { createEthereumChain } from '@aztec/ethereum'; 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/receiver.ts b/yarn-project/sequencer-client/src/receiver.ts index f731a8f8504..07db079ba33 100644 --- a/yarn-project/sequencer-client/src/receiver.ts +++ b/yarn-project/sequencer-client/src/receiver.ts @@ -1,4 +1,4 @@ -import { L2Block } from '@aztec/circuit-types'; +import { type L2Block } from '@aztec/circuit-types'; /** * Given the necessary rollup data, verifies it, and updates the underlying state accordingly to advance the state of the system. 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 6508ec26618..edb65cc32ee 100644 --- a/yarn-project/sequencer-client/src/sequencer/abstract_phase_manager.ts +++ b/yarn-project/sequencer-client/src/sequencer/abstract_phase_manager.ts @@ -1,12 +1,12 @@ -import { MerkleTreeId, SimulationError, Tx, UnencryptedFunctionL2Logs } from '@aztec/circuit-types'; +import { MerkleTreeId, type SimulationError, type Tx, type UnencryptedFunctionL2Logs } from '@aztec/circuit-types'; import { AztecAddress, CallRequest, ContractStorageRead, ContractStorageUpdateRequest, Fr, - GlobalVariables, - Header, + type GlobalVariables, + type Header, L2ToL1Message, MAX_NEW_L2_TO_L1_MSGS_PER_CALL, MAX_NEW_NOTE_HASHES_PER_CALL, @@ -20,16 +20,16 @@ import { MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_CALL, MAX_REVERTIBLE_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX, MembershipWitness, - PrivateKernelTailCircuitPublicInputs, - Proof, + type PrivateKernelTailCircuitPublicInputs, + type Proof, PublicCallData, - PublicCallRequest, + type PublicCallRequest, PublicCallStackItem, PublicCircuitPublicInputs, PublicDataRead, PublicDataUpdateRequest, PublicKernelCircuitPrivateInputs, - PublicKernelCircuitPublicInputs, + type PublicKernelCircuitPublicInputs, PublicKernelData, PublicKernelTailCircuitPrivateInputs, RETURN_VALUES_LENGTH, @@ -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, - PublicExecutor, + type PublicExecution, + type PublicExecutionResult, + type 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 9ba3cf97196..e09fe0051fa 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,10 +1,15 @@ -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 { type Tx } from '@aztec/circuit-types'; +import { + type GlobalVariables, + type Header, + type Proof, + type PublicKernelCircuitPublicInputs, +} from '@aztec/circuits.js'; +import { type PublicExecutor, type PublicStateDB } from '@aztec/simulator'; +import { type MerkleTreeOperations } from '@aztec/world-state'; -import { PublicKernelCircuitSimulator } from '../simulator/index.js'; -import { ContractsDataSourcePublicDB } from '../simulator/public_executor.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type ContractsDataSourcePublicDB } from '../simulator/public_executor.js'; import { AbstractPhaseManager, PublicKernelPhase } from './abstract_phase_manager.js'; /** diff --git a/yarn-project/sequencer-client/src/sequencer/hints_builder.ts b/yarn-project/sequencer-client/src/sequencer/hints_builder.ts index 0a92e862e95..61e28fc5dcf 100644 --- a/yarn-project/sequencer-client/src/sequencer/hints_builder.ts +++ b/yarn-project/sequencer-client/src/sequencer/hints_builder.ts @@ -1,21 +1,21 @@ import { MerkleTreeId } from '@aztec/circuit-types'; import { - Fr, + type Fr, MAX_NEW_NULLIFIERS_PER_TX, - MAX_NON_REVERTIBLE_NULLIFIERS_PER_TX, - MAX_NULLIFIER_NON_EXISTENT_READ_REQUESTS_PER_TX, - MAX_NULLIFIER_READ_REQUESTS_PER_TX, - MAX_REVERTIBLE_NULLIFIERS_PER_TX, + type MAX_NON_REVERTIBLE_NULLIFIERS_PER_TX, + type MAX_NULLIFIER_NON_EXISTENT_READ_REQUESTS_PER_TX, + type MAX_NULLIFIER_READ_REQUESTS_PER_TX, + type MAX_REVERTIBLE_NULLIFIERS_PER_TX, MembershipWitness, NULLIFIER_TREE_HEIGHT, - ReadRequestContext, - SideEffectLinkedToNoteHash, + type ReadRequestContext, + type SideEffectLinkedToNoteHash, buildNullifierNonExistentReadRequestHints, 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 9c34ee17e1d..d2e3ec594a4 100644 --- a/yarn-project/sequencer-client/src/sequencer/phase_manager_factory.ts +++ b/yarn-project/sequencer-client/src/sequencer/phase_manager_factory.ts @@ -1,11 +1,11 @@ -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 { type Tx } from '@aztec/circuit-types'; +import { type GlobalVariables, type Header, type PublicKernelCircuitPublicInputs } from '@aztec/circuits.js'; +import { type PublicExecutor, type PublicStateDB } from '@aztec/simulator'; +import { type MerkleTreeOperations } from '@aztec/world-state'; -import { PublicKernelCircuitSimulator } from '../simulator/index.js'; -import { ContractsDataSourcePublicDB } from '../simulator/public_executor.js'; -import { AbstractPhaseManager, PublicKernelPhase } from './abstract_phase_manager.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type ContractsDataSourcePublicDB } from '../simulator/public_executor.js'; +import { type AbstractPhaseManager, PublicKernelPhase } from './abstract_phase_manager.js'; import { AppLogicPhaseManager } from './app_logic_phase_manager.js'; import { SetupPhaseManager } from './setup_phase_manager.js'; import { TailPhaseManager } from './tail_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 7044472cb53..592fe9019a5 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, @@ -13,7 +13,7 @@ import { } from '@aztec/circuit-types'; import { ARGS_LENGTH, - AztecAddress, + type AztecAddress, CallContext, CallRequest, ContractStorageUpdateRequest, @@ -26,11 +26,11 @@ import { MAX_PRIVATE_CALL_STACK_LENGTH_PER_TX, MAX_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX, PUBLIC_DATA_TREE_HEIGHT, - PrivateKernelTailCircuitPublicInputs, - Proof, + type PrivateKernelTailCircuitPublicInputs, + type Proof, PublicAccumulatedNonRevertibleData, PublicAccumulatedRevertibleData, - PublicCallRequest, + type PublicCallRequest, PublicKernelCircuitPublicInputs, ValidationRequests, makeEmptyProof, @@ -45,14 +45,14 @@ 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, type 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 { ContractsDataSourcePublicDB, WorldStatePublicDB } from '../simulator/public_executor.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type ContractsDataSourcePublicDB, type 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 bb0b3dfe93a..064d0c45b4d 100644 --- a/yarn-project/sequencer-client/src/sequencer/public_processor.ts +++ b/yarn-project/sequencer-client/src/sequencer/public_processor.ts @@ -1,7 +1,7 @@ import { - FailedTx, - ProcessedTx, - SimulationError, + type FailedTx, + type ProcessedTx, + type SimulationError, Tx, getPreviousOutputAndProof, makeEmptyProcessedTx, @@ -9,18 +9,18 @@ import { toTxEffect, validateProcessedTx, } from '@aztec/circuit-types'; -import { TxSequencerProcessingStats } from '@aztec/circuit-types/stats'; -import { GlobalVariables, Header } from '@aztec/circuits.js'; +import { type TxSequencerProcessingStats } from '@aztec/circuit-types/stats'; +import { type GlobalVariables, type 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'; +import { type AbstractPhaseManager } from './abstract_phase_manager.js'; import { PhaseManagerFactory } from './phase_manager_factory.js'; /** diff --git a/yarn-project/sequencer-client/src/sequencer/sequencer.test.ts b/yarn-project/sequencer-client/src/sequencer/sequencer.test.ts index ed46187cd94..49d0b074824 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,15 +20,15 @@ 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 { L1Publisher } from '../index.js'; -import { PublicProcessor, PublicProcessorFactory } from './public_processor.js'; +import { type GlobalVariableBuilder } from '../global_variable_builder/global_builder.js'; +import { type L1Publisher } from '../index.js'; +import { type PublicProcessor, type PublicProcessorFactory } from './public_processor.js'; import { Sequencer } from './sequencer.js'; import { TxValidatorFactory } from './tx_validator_factory.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/sequencer.ts b/yarn-project/sequencer-client/src/sequencer/sequencer.ts index 4823f48d3fa..7976b9ae6fb 100644 --- a/yarn-project/sequencer-client/src/sequencer/sequencer.ts +++ b/yarn-project/sequencer-client/src/sequencer/sequencer.ts @@ -1,20 +1,20 @@ -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 { AztecAddress, EthAddress, GlobalVariables } from '@aztec/circuits.js'; +import { type L1ToL2MessageSource, type 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, type 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 { GlobalVariableBuilder } from '../global_variable_builder/global_builder.js'; -import { L1Publisher } from '../publisher/l1-publisher.js'; -import { SequencerConfig } from './config.js'; -import { PublicProcessorFactory } from './public_processor.js'; -import { TxValidator } from './tx_validator.js'; -import { TxValidatorFactory } from './tx_validator_factory.js'; +import { type P2P } from '@aztec/p2p'; +import { type WorldStateStatus, type WorldStateSynchronizer } from '@aztec/world-state'; + +import { type GlobalVariableBuilder } from '../global_variable_builder/global_builder.js'; +import { type L1Publisher } from '../publisher/l1-publisher.js'; +import { type SequencerConfig } from './config.js'; +import { type PublicProcessorFactory } from './public_processor.js'; +import { type TxValidator } from './tx_validator.js'; +import { type TxValidatorFactory } from './tx_validator_factory.js'; /** * Sequencer client 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 9b198177c62..aa26bad1583 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 @@ -7,14 +7,14 @@ import { MAX_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX, } from '@aztec/circuits.js'; import { makeTuple } from '@aztec/foundation/array'; -import { PublicExecutor } from '@aztec/simulator'; -import { MerkleTreeOperations, TreeInfo } from '@aztec/world-state'; +import { type PublicExecutor } from '@aztec/simulator'; +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 { ContractsDataSourcePublicDB, WorldStatePublicDB } from '../simulator/public_executor.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type ContractsDataSourcePublicDB, type WorldStatePublicDB } from '../simulator/public_executor.js'; import { SetupPhaseManager } from './setup_phase_manager.js'; class TestSetupPhaseManager extends SetupPhaseManager { 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 76da4e232a6..c491843436c 100644 --- a/yarn-project/sequencer-client/src/sequencer/setup_phase_manager.ts +++ b/yarn-project/sequencer-client/src/sequencer/setup_phase_manager.ts @@ -1,10 +1,15 @@ -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 { type Tx } from '@aztec/circuit-types'; +import { + type GlobalVariables, + type Header, + type Proof, + type PublicKernelCircuitPublicInputs, +} from '@aztec/circuits.js'; +import { type PublicExecutor, type PublicStateDB } from '@aztec/simulator'; +import { type MerkleTreeOperations } from '@aztec/world-state'; -import { PublicKernelCircuitSimulator } from '../simulator/index.js'; -import { ContractsDataSourcePublicDB } from '../simulator/public_executor.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type 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 0fe236452d9..684931c30a7 100644 --- a/yarn-project/sequencer-client/src/sequencer/tail_phase_manager.ts +++ b/yarn-project/sequencer-client/src/sequencer/tail_phase_manager.ts @@ -1,10 +1,15 @@ -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 { type Tx } from '@aztec/circuit-types'; +import { + type GlobalVariables, + type Header, + type Proof, + type PublicKernelCircuitPublicInputs, +} from '@aztec/circuits.js'; +import { type PublicExecutor, type PublicStateDB } from '@aztec/simulator'; +import { type MerkleTreeOperations } from '@aztec/world-state'; -import { PublicKernelCircuitSimulator } from '../simulator/index.js'; -import { ContractsDataSourcePublicDB } from '../simulator/public_executor.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type ContractsDataSourcePublicDB } from '../simulator/public_executor.js'; import { AbstractPhaseManager, PublicKernelPhase } from './abstract_phase_manager.js'; export class TailPhaseManager extends AbstractPhaseManager { 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 ddaaa7c8943..62cd6bfdf3b 100644 --- a/yarn-project/sequencer-client/src/sequencer/teardown_phase_manager.ts +++ b/yarn-project/sequencer-client/src/sequencer/teardown_phase_manager.ts @@ -1,10 +1,15 @@ -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 { type Tx } from '@aztec/circuit-types'; +import { + type GlobalVariables, + type Header, + type Proof, + type PublicKernelCircuitPublicInputs, +} from '@aztec/circuits.js'; +import { type PublicExecutor, type PublicStateDB } from '@aztec/simulator'; +import { type MerkleTreeOperations } from '@aztec/world-state'; -import { PublicKernelCircuitSimulator } from '../simulator/index.js'; -import { ContractsDataSourcePublicDB } from '../simulator/public_executor.js'; +import { type PublicKernelCircuitSimulator } from '../simulator/index.js'; +import { type 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 a9f13a43079..8336bd31619 100644 --- a/yarn-project/sequencer-client/src/sequencer/tx_validator.test.ts +++ b/yarn-project/sequencer-client/src/sequencer/tx_validator.test.ts @@ -1,13 +1,13 @@ import { mockTx as baseMockTx } from '@aztec/circuit-types'; import { - AztecAddress, + type AztecAddress, CallContext, CallRequest, EthAddress, Fr, FunctionData, FunctionSelector, - GlobalVariables, + type GlobalVariables, MAX_NON_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX, MAX_REVERTIBLE_PUBLIC_CALL_STACK_LENGTH_PER_TX, PublicCallRequest, @@ -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 ac586965586..5460aab82e3 100644 --- a/yarn-project/sequencer-client/src/sequencer/tx_validator.ts +++ b/yarn-project/sequencer-client/src/sequencer/tx_validator.ts @@ -1,9 +1,15 @@ -import { ProcessedTx, Tx } from '@aztec/circuit-types'; -import { AztecAddress, EthAddress, Fr, GlobalVariables, PublicCallRequest } from '@aztec/circuits.js'; +import { type ProcessedTx, Tx } from '@aztec/circuit-types'; +import { + type AztecAddress, + type EthAddress, + Fr, + type GlobalVariables, + type 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 75a7a7b2ce3..6608071edb9 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 AztecAddress, type EthAddress, type Fr, type GlobalVariables } from '@aztec/circuits.js'; +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/sequencer/utils.ts b/yarn-project/sequencer-client/src/sequencer/utils.ts index 0780dd2d05f..8dbc45241f8 100644 --- a/yarn-project/sequencer-client/src/sequencer/utils.ts +++ b/yarn-project/sequencer-client/src/sequencer/utils.ts @@ -1,4 +1,4 @@ -import { Tx } from '@aztec/circuit-types'; +import { type Tx } from '@aztec/circuit-types'; import { CallRequest } from '@aztec/circuits.js'; /** diff --git a/yarn-project/sequencer-client/src/simulator/index.ts b/yarn-project/sequencer-client/src/simulator/index.ts index ba9106b6b1a..0991a64755f 100644 --- a/yarn-project/sequencer-client/src/simulator/index.ts +++ b/yarn-project/sequencer-client/src/simulator/index.ts @@ -1,7 +1,7 @@ import { - PublicKernelCircuitPrivateInputs, - PublicKernelCircuitPublicInputs, - PublicKernelTailCircuitPrivateInputs, + type PublicKernelCircuitPrivateInputs, + type PublicKernelCircuitPublicInputs, + type PublicKernelTailCircuitPrivateInputs, } from '@aztec/circuits.js'; /** diff --git a/yarn-project/sequencer-client/src/simulator/public_executor.ts b/yarn-project/sequencer-client/src/simulator/public_executor.ts index 6ff7728fb1d..d943af10530 100644 --- a/yarn-project/sequencer-client/src/simulator/public_executor.ts +++ b/yarn-project/sequencer-client/src/simulator/public_executor.ts @@ -1,22 +1,31 @@ -import { MerkleTreeId, NullifierMembershipWitness, Tx } from '@aztec/circuit-types'; +import { MerkleTreeId, NullifierMembershipWitness, type Tx } from '@aztec/circuit-types'; import { - AztecAddress, + type AztecAddress, ContractClassRegisteredEvent, ContractInstanceDeployedEvent, - EthAddress, + type EthAddress, Fr, - FunctionSelector, - L1_TO_L2_MSG_TREE_HEIGHT, - NULLIFIER_TREE_HEIGHT, - NullifierLeafPreimage, - PublicDataTreeLeafPreimage, + type FunctionSelector, + type L1_TO_L2_MSG_TREE_HEIGHT, + type NULLIFIER_TREE_HEIGHT, + type NullifierLeafPreimage, + type PublicDataTreeLeafPreimage, } from '@aztec/circuits.js'; 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 c60e74b63ae..3cf576f2981 100644 --- a/yarn-project/sequencer-client/src/simulator/public_kernel.ts +++ b/yarn-project/sequencer-client/src/simulator/public_kernel.ts @@ -1,8 +1,8 @@ -import { CircuitSimulationStats } from '@aztec/circuit-types/stats'; +import { type CircuitSimulationStats } from '@aztec/circuit-types/stats'; import { - PublicKernelCircuitPrivateInputs, - PublicKernelCircuitPublicInputs, - PublicKernelTailCircuitPrivateInputs, + type PublicKernelCircuitPrivateInputs, + type PublicKernelCircuitPublicInputs, + type PublicKernelTailCircuitPrivateInputs, } from '@aztec/circuits.js'; import { createDebugLogger } from '@aztec/foundation/log'; import { elapsed } from '@aztec/foundation/timer'; @@ -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 d33e8a06d56..42a4d2576ae 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 ffa53b6ad05..d33a660e92e 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, - WasmBlackBoxFunctionSolver, + type ExecutionError, + type ForeignCallInput, + type ForeignCallOutput, + type 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 d155d668048..3053d948a0b 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 6a04ec9e5b0..74701582330 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 e3080d16ac1..655584512e9 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/index.ts b/yarn-project/simulator/src/acvm/oracle/index.ts index 56f45c81f70..a89ffce2a1b 100644 --- a/yarn-project/simulator/src/acvm/oracle/index.ts +++ b/yarn-project/simulator/src/acvm/oracle/index.ts @@ -1,4 +1,4 @@ -import { Oracle } from './oracle.js'; +import { type Oracle } from './oracle.js'; export * from './debug.js'; export * from './oracle.js'; diff --git a/yarn-project/simulator/src/acvm/oracle/oracle.ts b/yarn-project/simulator/src/acvm/oracle/oracle.ts index 812c41bc068..9266daff20e 100644 --- a/yarn-project/simulator/src/acvm/oracle/oracle.ts +++ b/yarn-project/simulator/src/acvm/oracle/oracle.ts @@ -6,11 +6,11 @@ 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'; -import { TypedOracle } from './typed_oracle.js'; +import { type TypedOracle } from './typed_oracle.js'; /** * A data source that has all the apis required by Aztec.nr. diff --git a/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts b/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts index b315f61d371..9d15b4467fd 100644 --- a/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts +++ b/yarn-project/simulator/src/acvm/oracle/typed_oracle.ts @@ -1,26 +1,26 @@ import { - CompleteAddress, - MerkleTreeId, - Note, - NoteStatus, - NullifierMembershipWitness, - PublicDataWitness, - PublicKey, - SiblingPath, - UnencryptedL2Log, + type CompleteAddress, + type MerkleTreeId, + type Note, + type NoteStatus, + type NullifierMembershipWitness, + type PublicDataWitness, + type PublicKey, + type SiblingPath, + type UnencryptedL2Log, } from '@aztec/circuit-types'; import { - GrumpkinPrivateKey, - Header, - L1_TO_L2_MSG_TREE_HEIGHT, - PrivateCallStackItem, - PublicCallRequest, + type GrumpkinPrivateKey, + type Header, + type L1_TO_L2_MSG_TREE_HEIGHT, + type PrivateCallStackItem, + type PublicCallRequest, } from '@aztec/circuits.js'; -import { FunctionSelector } from '@aztec/foundation/abi'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { EthAddress } from '@aztec/foundation/eth-address'; +import { type FunctionSelector } from '@aztec/foundation/abi'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; +import { type 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 c35f16545b1..0e3a1656d05 100644 --- a/yarn-project/simulator/src/acvm/serialize.ts +++ b/yarn-project/simulator/src/acvm/serialize.ts @@ -1,9 +1,9 @@ -import { ENQUEUE_PUBLIC_FUNCTION_CALL_RETURN_LENGTH, PublicCallRequest } from '@aztec/circuits.js'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { EthAddress } from '@aztec/foundation/eth-address'; +import { ENQUEUE_PUBLIC_FUNCTION_CALL_RETURN_LENGTH, type PublicCallRequest } from '@aztec/circuits.js'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; +import { type 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_context.ts b/yarn-project/simulator/src/avm/avm_context.ts index 3ae5e6dfe3c..269908b3ae1 100644 --- a/yarn-project/simulator/src/avm/avm_context.ts +++ b/yarn-project/simulator/src/avm/avm_context.ts @@ -1,9 +1,9 @@ -import { AztecAddress, FunctionSelector } from '@aztec/circuits.js'; -import { Fr } from '@aztec/foundation/fields'; +import { type AztecAddress, FunctionSelector } from '@aztec/circuits.js'; +import { type Fr } from '@aztec/foundation/fields'; -import { AvmExecutionEnvironment } from './avm_execution_environment.js'; +import { type AvmExecutionEnvironment } from './avm_execution_environment.js'; import { AvmMachineState } from './avm_machine_state.js'; -import { AvmPersistableStateManager } from './journal/journal.js'; +import { type AvmPersistableStateManager } from './journal/journal.js'; /** * An execution context includes the information necessary to initiate AVM diff --git a/yarn-project/simulator/src/avm/avm_execution_environment.ts b/yarn-project/simulator/src/avm/avm_execution_environment.ts index 2381cf2f16b..ee6c9e3d301 100644 --- a/yarn-project/simulator/src/avm/avm_execution_environment.ts +++ b/yarn-project/simulator/src/avm/avm_execution_environment.ts @@ -1,8 +1,8 @@ -import { FunctionSelector, GlobalVariables } from '@aztec/circuits.js'; +import { FunctionSelector, type GlobalVariables } from '@aztec/circuits.js'; import { computeVarArgsHash } from '@aztec/circuits.js/hash'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { EthAddress } from '@aztec/foundation/eth-address'; -import { Fr } from '@aztec/foundation/fields'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; +import { type EthAddress } from '@aztec/foundation/eth-address'; +import { type Fr } from '@aztec/foundation/fields'; export class AvmContextInputs { static readonly SIZE = 2; diff --git a/yarn-project/simulator/src/avm/avm_machine_state.ts b/yarn-project/simulator/src/avm/avm_machine_state.ts index 5b4888185a6..a7b6f04334f 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 { type 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 7f4b07462a0..a9b2f1f9a5b 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_message_call_result.ts b/yarn-project/simulator/src/avm/avm_message_call_result.ts index 3b7b4e87a0f..9585ff75448 100644 --- a/yarn-project/simulator/src/avm/avm_message_call_result.ts +++ b/yarn-project/simulator/src/avm/avm_message_call_result.ts @@ -1,4 +1,4 @@ -import { Fr } from '@aztec/foundation/fields'; +import { type Fr } from '@aztec/foundation/fields'; /** * Results of an contract call's execution in the AVM. diff --git a/yarn-project/simulator/src/avm/avm_simulator.ts b/yarn-project/simulator/src/avm/avm_simulator.ts index 5404cded450..2448b5e1baf 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/errors.ts b/yarn-project/simulator/src/avm/errors.ts index cf3b3294227..403853e7e02 100644 --- a/yarn-project/simulator/src/avm/errors.ts +++ b/yarn-project/simulator/src/avm/errors.ts @@ -1,4 +1,4 @@ -import { AztecAddress } from '@aztec/circuits.js'; +import { type AztecAddress } from '@aztec/circuits.js'; /** * Avm-specific errors should derive from this diff --git a/yarn-project/simulator/src/avm/fixtures/index.ts b/yarn-project/simulator/src/avm/fixtures/index.ts index 88fc65a2de2..cb7fb7e776b 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 6d249d49e0d..03f7cfea29b 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 83be8cbf560..302a403d4e5 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 b2709d01d3c..d7274dec92b 100644 --- a/yarn-project/simulator/src/avm/journal/journal.ts +++ b/yarn-project/simulator/src/avm/journal/journal.ts @@ -3,11 +3,11 @@ import { AztecAddress, EthAddress, L2ToL1Message } from '@aztec/circuits.js'; import { EventSelector } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; -import { HostStorage } from './host_storage.js'; +import { type 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 5a459823acc..16f4d359a53 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 d8b79fc79c0..33c747977d7 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 a7b309fbb30..93231b4b727 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 620e2e0462c..48e4df34dc7 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/journal/trace_types.ts b/yarn-project/simulator/src/avm/journal/trace_types.ts index 3d065c4fd7d..f86b51e57e5 100644 --- a/yarn-project/simulator/src/avm/journal/trace_types.ts +++ b/yarn-project/simulator/src/avm/journal/trace_types.ts @@ -1,4 +1,4 @@ -import { Fr } from '@aztec/foundation/fields'; +import { type Fr } from '@aztec/foundation/fields'; //export type TracedContractCall = { // callPointer: Fr; 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 3976c805a04..9b064a20827 100644 --- a/yarn-project/simulator/src/avm/opcodes/accrued_substate.test.ts +++ b/yarn-project/simulator/src/avm/opcodes/accrued_substate.test.ts @@ -4,8 +4,8 @@ import { EventSelector } from '@aztec/foundation/abi'; import { mock } from 'jest-mock-extended'; -import { CommitmentsDB } from '../../index.js'; -import { AvmContext } from '../avm_context.js'; +import { type CommitmentsDB } from '../../index.js'; +import { type AvmContext } from '../avm_context.js'; import { Field, Uint8 } from '../avm_memory_types.js'; import { InstructionExecutionError } from '../errors.js'; import { diff --git a/yarn-project/simulator/src/avm/opcodes/addressing_mode.ts b/yarn-project/simulator/src/avm/opcodes/addressing_mode.ts index 97e19d9f083..c3d0308c1c8 100644 --- a/yarn-project/simulator/src/avm/opcodes/addressing_mode.ts +++ b/yarn-project/simulator/src/avm/opcodes/addressing_mode.ts @@ -1,6 +1,6 @@ import { strict as assert } from 'assert'; -import { TaggedMemory } from '../avm_memory_types.js'; +import { type TaggedMemory } from '../avm_memory_types.js'; export enum AddressingMode { DIRECT, diff --git a/yarn-project/simulator/src/avm/opcodes/arithmetic.test.ts b/yarn-project/simulator/src/avm/opcodes/arithmetic.test.ts index 23ba3b19539..10c92d9588c 100644 --- a/yarn-project/simulator/src/avm/opcodes/arithmetic.test.ts +++ b/yarn-project/simulator/src/avm/opcodes/arithmetic.test.ts @@ -1,4 +1,4 @@ -import { AvmContext } from '../avm_context.js'; +import { type AvmContext } from '../avm_context.js'; import { Field, TypeTag, Uint8, Uint16, Uint32, Uint64, Uint128 } from '../avm_memory_types.js'; import { initContext } from '../fixtures/index.js'; import { Add, Div, FieldDiv, Mul, Sub } from './arithmetic.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/arithmetic.ts b/yarn-project/simulator/src/avm/opcodes/arithmetic.ts index 44790a692d8..597ead05cc7 100644 --- a/yarn-project/simulator/src/avm/opcodes/arithmetic.ts +++ b/yarn-project/simulator/src/avm/opcodes/arithmetic.ts @@ -1,6 +1,6 @@ import type { AvmContext } from '../avm_context.js'; -import { GasCost, GasCostConstants, getGasCostMultiplierFromTypeTag, makeGasCost } from '../avm_gas_cost.js'; -import { Field, MemoryValue, TypeTag } from '../avm_memory_types.js'; +import { type GasCost, GasCostConstants, getGasCostMultiplierFromTypeTag, makeGasCost } from '../avm_gas_cost.js'; +import { type Field, type MemoryValue, TypeTag } from '../avm_memory_types.js'; import { Opcode, OperandType } from '../serialization/instruction_serialization.js'; import { Addressing, AddressingMode } from './addressing_mode.js'; import { Instruction } from './instruction.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/bitwise.test.ts b/yarn-project/simulator/src/avm/opcodes/bitwise.test.ts index 8a16f215f03..afd6fa26126 100644 --- a/yarn-project/simulator/src/avm/opcodes/bitwise.test.ts +++ b/yarn-project/simulator/src/avm/opcodes/bitwise.test.ts @@ -1,4 +1,4 @@ -import { AvmContext } from '../avm_context.js'; +import { type AvmContext } from '../avm_context.js'; import { TypeTag, Uint16, Uint32 } from '../avm_memory_types.js'; import { initContext } from '../fixtures/index.js'; import { And, Not, Or, Shl, Shr, Xor } from './bitwise.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/bitwise.ts b/yarn-project/simulator/src/avm/opcodes/bitwise.ts index 9161c8bb22c..a7aeb0cfe0b 100644 --- a/yarn-project/simulator/src/avm/opcodes/bitwise.ts +++ b/yarn-project/simulator/src/avm/opcodes/bitwise.ts @@ -1,5 +1,5 @@ import type { AvmContext } from '../avm_context.js'; -import { IntegralValue } from '../avm_memory_types.js'; +import { type IntegralValue } from '../avm_memory_types.js'; import { Opcode } from '../serialization/instruction_serialization.js'; import { ThreeOperandInstruction, TwoOperandInstruction } from './instruction_impl.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/comparators.test.ts b/yarn-project/simulator/src/avm/opcodes/comparators.test.ts index 4591a05a195..34ee18be64f 100644 --- a/yarn-project/simulator/src/avm/opcodes/comparators.test.ts +++ b/yarn-project/simulator/src/avm/opcodes/comparators.test.ts @@ -1,4 +1,4 @@ -import { AvmContext } from '../avm_context.js'; +import { type AvmContext } from '../avm_context.js'; import { Field, TypeTag, Uint8, Uint16, Uint32 } from '../avm_memory_types.js'; import { TagCheckError } from '../errors.js'; import { initContext } from '../fixtures/index.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/control_flow.test.ts b/yarn-project/simulator/src/avm/opcodes/control_flow.test.ts index 660c561a3e5..abd6ea2958f 100644 --- a/yarn-project/simulator/src/avm/opcodes/control_flow.test.ts +++ b/yarn-project/simulator/src/avm/opcodes/control_flow.test.ts @@ -1,4 +1,4 @@ -import { AvmContext } from '../avm_context.js'; +import { type AvmContext } from '../avm_context.js'; import { Uint16 } from '../avm_memory_types.js'; import { InstructionExecutionError } from '../errors.js'; import { initContext } from '../fixtures/index.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/control_flow.ts b/yarn-project/simulator/src/avm/opcodes/control_flow.ts index 0ebc96b6ccb..4f88e6139f1 100644 --- a/yarn-project/simulator/src/avm/opcodes/control_flow.ts +++ b/yarn-project/simulator/src/avm/opcodes/control_flow.ts @@ -1,5 +1,5 @@ import type { AvmContext } from '../avm_context.js'; -import { IntegralValue } from '../avm_memory_types.js'; +import { type IntegralValue } from '../avm_memory_types.js'; import { InstructionExecutionError } from '../errors.js'; import { Opcode, OperandType } from '../serialization/instruction_serialization.js'; import { Instruction } from './instruction.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/environment_getters.ts b/yarn-project/simulator/src/avm/opcodes/environment_getters.ts index f2ddd5d67f6..b82ed750844 100644 --- a/yarn-project/simulator/src/avm/opcodes/environment_getters.ts +++ b/yarn-project/simulator/src/avm/opcodes/environment_getters.ts @@ -1,4 +1,4 @@ -import { Fr } from '@aztec/circuits.js'; +import { type Fr } from '@aztec/circuits.js'; import type { AvmContext } from '../avm_context.js'; import type { AvmExecutionEnvironment } from '../avm_execution_environment.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 d6112104d45..9647aaeea3d 100644 --- a/yarn-project/simulator/src/avm/opcodes/external_calls.test.ts +++ b/yarn-project/simulator/src/avm/opcodes/external_calls.test.ts @@ -3,15 +3,15 @@ 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 { AvmContext } from '../avm_context.js'; +import { type CommitmentsDB, type PublicContractsDB, type PublicStateDB } from '../../index.js'; +import { type AvmContext } from '../avm_context.js'; import { Field, Uint8 } from '../avm_memory_types.js'; import { adjustCalldataIndex, initContext } from '../fixtures/index.js'; import { HostStorage } from '../journal/host_storage.js'; import { AvmPersistableStateManager } from '../journal/journal.js'; import { encodeToBytecode } from '../serialization/bytecode_serialization.js'; import { Call, Return, Revert, StaticCall } from './external_calls.js'; -import { Instruction } from './instruction.js'; +import { type Instruction } from './instruction.js'; import { CalldataCopy } from './memory.js'; import { SStore } from './storage.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/hashing.test.ts b/yarn-project/simulator/src/avm/opcodes/hashing.test.ts index 957f62ca507..b2c4dc44cf9 100644 --- a/yarn-project/simulator/src/avm/opcodes/hashing.test.ts +++ b/yarn-project/simulator/src/avm/opcodes/hashing.test.ts @@ -1,6 +1,6 @@ import { keccak, pedersenHash, poseidonHash, sha256 } from '@aztec/foundation/crypto'; -import { AvmContext } from '../avm_context.js'; +import { type AvmContext } from '../avm_context.js'; import { Field, Uint32 } from '../avm_memory_types.js'; import { initContext } from '../fixtures/index.js'; import { Addressing, AddressingMode } from './addressing_mode.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/hashing.ts b/yarn-project/simulator/src/avm/opcodes/hashing.ts index a7e54e539e6..9a60e47a6c8 100644 --- a/yarn-project/simulator/src/avm/opcodes/hashing.ts +++ b/yarn-project/simulator/src/avm/opcodes/hashing.ts @@ -1,7 +1,7 @@ import { toBigIntBE } from '@aztec/foundation/bigint-buffer'; import { keccak, pedersenHash, poseidonHash, sha256 } from '@aztec/foundation/crypto'; -import { AvmContext } from '../avm_context.js'; +import { type AvmContext } from '../avm_context.js'; import { Field } from '../avm_memory_types.js'; import { Opcode, OperandType } from '../serialization/instruction_serialization.js'; import { Addressing } from './addressing_mode.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/instruction.ts b/yarn-project/simulator/src/avm/opcodes/instruction.ts index 2660052c265..93bf6c307dc 100644 --- a/yarn-project/simulator/src/avm/opcodes/instruction.ts +++ b/yarn-project/simulator/src/avm/opcodes/instruction.ts @@ -1,9 +1,9 @@ import { strict as assert } from 'assert'; import type { AvmContext } from '../avm_context.js'; -import { DynamicGasCost, GasCost, GasCosts } from '../avm_gas_cost.js'; -import { BufferCursor } from '../serialization/buffer_cursor.js'; -import { Opcode, OperandType, deserialize, serialize } from '../serialization/instruction_serialization.js'; +import { DynamicGasCost, type GasCost, GasCosts } from '../avm_gas_cost.js'; +import { type BufferCursor } from '../serialization/buffer_cursor.js'; +import { Opcode, type OperandType, deserialize, serialize } from '../serialization/instruction_serialization.js'; type InstructionConstructor = { new (...args: any[]): Instruction; diff --git a/yarn-project/simulator/src/avm/opcodes/memory.test.ts b/yarn-project/simulator/src/avm/opcodes/memory.test.ts index 0b8102f98c7..c133f4a4c04 100644 --- a/yarn-project/simulator/src/avm/opcodes/memory.test.ts +++ b/yarn-project/simulator/src/avm/opcodes/memory.test.ts @@ -1,6 +1,6 @@ import { Fr } from '@aztec/foundation/fields'; -import { AvmContext } from '../avm_context.js'; +import { type AvmContext } from '../avm_context.js'; import { Field, TypeTag, Uint8, Uint16, Uint32, Uint64, Uint128 } from '../avm_memory_types.js'; import { InstructionExecutionError } from '../errors.js'; import { adjustCalldataIndex, initContext, initExecutionEnvironment } from '../fixtures/index.js'; diff --git a/yarn-project/simulator/src/avm/opcodes/memory.ts b/yarn-project/simulator/src/avm/opcodes/memory.ts index 87a5ccdd465..74137183d8b 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 ab98f3e7140..79b0bb3f0d7 100644 --- a/yarn-project/simulator/src/avm/opcodes/storage.test.ts +++ b/yarn-project/simulator/src/avm/opcodes/storage.test.ts @@ -1,12 +1,12 @@ 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 { type AvmContext } from '../avm_context.js'; import { Field } from '../avm_memory_types.js'; import { initContext, initExecutionEnvironment } from '../fixtures/index.js'; -import { AvmPersistableStateManager } from '../journal/journal.js'; +import { type AvmPersistableStateManager } from '../journal/journal.js'; import { SLoad, SStore, StaticCallStorageAlterError } from './storage.js'; describe('Storage Instructions', () => { 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 a9d8f08bec2..82641334b25 100644 --- a/yarn-project/simulator/src/avm/serialization/bytecode_serialization.test.ts +++ b/yarn-project/simulator/src/avm/serialization/bytecode_serialization.test.ts @@ -1,9 +1,9 @@ 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 { Opcode } from './instruction_serialization.js'; +import { type BufferCursor } from './buffer_cursor.js'; +import { type InstructionSet, decodeFromBytecode, encodeToBytecode } from './bytecode_serialization.js'; +import { type Opcode } from './instruction_serialization.js'; class InstA { constructor(private n: number) {} diff --git a/yarn-project/simulator/src/avm/temporary_executor_migration.ts b/yarn-project/simulator/src/avm/temporary_executor_migration.ts index 4c2e0bb203d..2d226c7de48 100644 --- a/yarn-project/simulator/src/avm/temporary_executor_migration.ts +++ b/yarn-project/simulator/src/avm/temporary_executor_migration.ts @@ -3,19 +3,19 @@ import { UnencryptedFunctionL2Logs } from '@aztec/circuit-types'; import { ContractStorageRead, ContractStorageUpdateRequest, - GlobalVariables, + type GlobalVariables, L2ToL1Message, - ReadRequest, + type ReadRequest, SideEffect, - SideEffectLinkedToNoteHash, + type SideEffectLinkedToNoteHash, } from '@aztec/circuits.js'; 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 AvmContractCallResults } from './avm_message_call_result.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 8586f777ae1..3f626293121 100644 --- a/yarn-project/simulator/src/client/client_execution_context.ts +++ b/yarn-project/simulator/src/client/client_execution_context.ts @@ -1,37 +1,37 @@ import { - AuthWitness, - AztecNode, + type AuthWitness, + type AztecNode, EncryptedFunctionL2Logs, EncryptedL2Log, L1NotePayload, Note, - NoteStatus, + type NoteStatus, TaggedNote, UnencryptedFunctionL2Logs, - UnencryptedL2Log, + type UnencryptedL2Log, } from '@aztec/circuit-types'; import { CallContext, FunctionData, FunctionSelector, - Header, + type Header, NoteHashReadRequestMembershipWitness, PublicCallRequest, - SideEffect, + type SideEffect, TxContext, } from '@aztec/circuits.js'; -import { Grumpkin } from '@aztec/circuits.js/barretenberg'; +import { type Grumpkin } from '@aztec/circuits.js/barretenberg'; import { computePublicDataTreeLeafSlot, computeUniqueCommitment, siloNoteHash } from '@aztec/circuits.js/hash'; -import { FunctionAbi, FunctionArtifact, countArgumentsSize } from '@aztec/foundation/abi'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { Fr, Point } from '@aztec/foundation/fields'; +import { type FunctionAbi, type FunctionArtifact, countArgumentsSize } from '@aztec/foundation/abi'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; +import { Fr, type Point } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; -import { NoteData, toACVMWitness } from '../acvm/index.js'; -import { PackedArgsCache } from '../common/packed_args_cache.js'; -import { DBOracle } from './db_oracle.js'; -import { ExecutionNoteCache } from './execution_note_cache.js'; -import { ExecutionResult, NoteAndSlot } from './execution_result.js'; +import { type NoteData, toACVMWitness } from '../acvm/index.js'; +import { type PackedArgsCache } from '../common/packed_args_cache.js'; +import { type DBOracle } from './db_oracle.js'; +import { type ExecutionNoteCache } from './execution_note_cache.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 9f6462e331a..4338f4c3a9b 100644 --- a/yarn-project/simulator/src/client/db_oracle.ts +++ b/yarn-project/simulator/src/client/db_oracle.ts @@ -1,13 +1,19 @@ -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 { 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 { KeyPair, NoteData } from '../acvm/index.js'; -import { CommitmentsDB } from '../public/db.js'; +import { + type L2Block, + type MerkleTreeId, + type NoteStatus, + type NullifierMembershipWitness, + type PublicDataWitness, +} from '@aztec/circuit-types'; +import { type CompleteAddress, type Header } from '@aztec/circuits.js'; +import { type FunctionArtifactWithDebugMetadata, type FunctionSelector } from '@aztec/foundation/abi'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; +import { type EthAddress } from '@aztec/foundation/eth-address'; +import { type Fr } from '@aztec/foundation/fields'; +import { type ContractInstance } from '@aztec/types/contracts'; + +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 ad4be3e8c34..67752a52a29 100644 --- a/yarn-project/simulator/src/client/execution_note_cache.ts +++ b/yarn-project/simulator/src/client/execution_note_cache.ts @@ -1,8 +1,8 @@ import { siloNullifier } from '@aztec/circuits.js/hash'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type 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 f09c5bf0744..0938c50af58 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 4fccc6e8e01..5118b28d607 100644 --- a/yarn-project/simulator/src/client/execution_result.ts +++ b/yarn-project/simulator/src/client/execution_result.ts @@ -1,9 +1,13 @@ -import { EncryptedFunctionL2Logs, Note, UnencryptedFunctionL2Logs } from '@aztec/circuit-types'; -import { NoteHashReadRequestMembershipWitness, PrivateCallStackItem, PublicCallRequest } from '@aztec/circuits.js'; -import { DecodedReturn } from '@aztec/foundation/abi'; -import { Fr } from '@aztec/foundation/fields'; +import { type EncryptedFunctionL2Logs, type Note, type UnencryptedFunctionL2Logs } from '@aztec/circuit-types'; +import { + type NoteHashReadRequestMembershipWitness, + type PrivateCallStackItem, + type PublicCallRequest, +} from '@aztec/circuits.js'; +import { type DecodedReturn } from '@aztec/foundation/abi'; +import { type 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/pick_notes.ts b/yarn-project/simulator/src/client/pick_notes.ts index 4531a487ef6..26e65e64616 100644 --- a/yarn-project/simulator/src/client/pick_notes.ts +++ b/yarn-project/simulator/src/client/pick_notes.ts @@ -1,4 +1,4 @@ -import { Comparator, Note } from '@aztec/circuit-types'; +import { Comparator, type Note } from '@aztec/circuit-types'; import { Fr } from '@aztec/foundation/fields'; export interface PropertySelector { diff --git a/yarn-project/simulator/src/client/private_execution.test.ts b/yarn-project/simulator/src/client/private_execution.test.ts index 1c959d2ae9b..e79629abfd1 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, type 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 75bc079900b..de31eae0da1 100644 --- a/yarn-project/simulator/src/client/private_execution.ts +++ b/yarn-project/simulator/src/client/private_execution.ts @@ -1,14 +1,14 @@ -import { FunctionData, PrivateCallStackItem, PrivateCircuitPublicInputs } from '@aztec/circuits.js'; -import { FunctionArtifactWithDebugMetadata, decodeReturnValues } from '@aztec/foundation/abi'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type FunctionData, PrivateCallStackItem, PrivateCircuitPublicInputs } from '@aztec/circuits.js'; +import { type FunctionArtifactWithDebugMetadata, decodeReturnValues } from '@aztec/foundation/abi'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; 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 ClientExecutionContext } from './client_execution_context.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 636f3349fb5..4bb3dc3d3f3 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 4c1e829c8e6..6f7058a59bb 100644 --- a/yarn-project/simulator/src/client/simulator.ts +++ b/yarn-project/simulator/src/client/simulator.ts @@ -1,26 +1,26 @@ -import { AztecNode, FunctionCall, Note, TxExecutionRequest } from '@aztec/circuit-types'; +import { type AztecNode, type FunctionCall, type Note, type 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, } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { EthAddress } from '@aztec/foundation/eth-address'; +import { type 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 { type 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 b4997ddba21..dea57f9e00b 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 19b78bec0f5..352c3a52e62 100644 --- a/yarn-project/simulator/src/client/unconstrained_execution.ts +++ b/yarn-project/simulator/src/client/unconstrained_execution.ts @@ -1,14 +1,14 @@ -import { FunctionData } from '@aztec/circuits.js'; -import { DecodedReturn, FunctionArtifactWithDebugMetadata, decodeReturnValues } from '@aztec/foundation/abi'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { Fr } from '@aztec/foundation/fields'; +import { type FunctionData } from '@aztec/circuits.js'; +import { type DecodedReturn, type FunctionArtifactWithDebugMetadata, decodeReturnValues } from '@aztec/foundation/abi'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; +import { type Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; import { extractReturnWitness } from '../acvm/deserialize.js'; import { Oracle, acvm, extractCallStack, toACVMWitness } from '../acvm/index.js'; import { ExecutionError } from '../common/errors.js'; import { AcirSimulator } from './simulator.js'; -import { ViewDataOracle } from './view_data_oracle.js'; +import { type ViewDataOracle } from './view_data_oracle.js'; // docs:start:execute_unconstrained_function /** diff --git a/yarn-project/simulator/src/client/view_data_oracle.ts b/yarn-project/simulator/src/client/view_data_oracle.ts index 5e6f33e3b6a..92fac26f4ad 100644 --- a/yarn-project/simulator/src/client/view_data_oracle.ts +++ b/yarn-project/simulator/src/client/view_data_oracle.ts @@ -1,21 +1,21 @@ import { - AuthWitness, - AztecNode, - CompleteAddress, + type AuthWitness, + type AztecNode, + type CompleteAddress, MerkleTreeId, - NoteStatus, - NullifierMembershipWitness, - PublicDataWitness, + type NoteStatus, + type NullifierMembershipWitness, + type PublicDataWitness, } from '@aztec/circuit-types'; -import { Header } from '@aztec/circuits.js'; +import { type Header } from '@aztec/circuits.js'; import { siloNullifier } from '@aztec/circuits.js/hash'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type 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 722819537a2..1d0bdf18402 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 23f31610c1a..89cfdd48988 100644 --- a/yarn-project/simulator/src/public/avm_executor.test.ts +++ b/yarn-project/simulator/src/public/avm_executor.test.ts @@ -1,13 +1,13 @@ -import { AztecAddress, CallContext, EthAddress, FunctionData, FunctionSelector, Header } from '@aztec/circuits.js'; +import { AztecAddress, CallContext, EthAddress, FunctionData, FunctionSelector, type Header } from '@aztec/circuits.js'; import { makeHeader } from '@aztec/circuits.js/testing'; 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 3e05d7212f8..88d2a66025a 100644 --- a/yarn-project/simulator/src/public/db.ts +++ b/yarn-project/simulator/src/public/db.ts @@ -1,10 +1,10 @@ -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 NullifierMembershipWitness } from '@aztec/circuit-types'; +import { type EthAddress, type FunctionSelector, type L1_TO_L2_MSG_TREE_HEIGHT } from '@aztec/circuits.js'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; +import { type Fr } from '@aztec/foundation/fields'; +import { type ContractInstanceWithAddress } from '@aztec/types/contracts'; -import { MessageLoadOracleInputs } from '../acvm/index.js'; +import { type MessageLoadOracleInputs } from '../acvm/index.js'; /** * Database interface for providing access to public state. diff --git a/yarn-project/simulator/src/public/execution.ts b/yarn-project/simulator/src/public/execution.ts index d0a5e387b06..96ac9e84e97 100644 --- a/yarn-project/simulator/src/public/execution.ts +++ b/yarn-project/simulator/src/public/execution.ts @@ -1,16 +1,16 @@ -import { SimulationError, UnencryptedFunctionL2Logs } from '@aztec/circuit-types'; +import { type SimulationError, type UnencryptedFunctionL2Logs } from '@aztec/circuit-types'; import { - AztecAddress, - ContractStorageRead, - ContractStorageUpdateRequest, - Fr, - L2ToL1Message, - PublicCallRequest, + type AztecAddress, + type ContractStorageRead, + type ContractStorageUpdateRequest, + type Fr, + type L2ToL1Message, + type PublicCallRequest, PublicDataRead, PublicDataUpdateRequest, - ReadRequest, - SideEffect, - SideEffectLinkedToNoteHash, + type ReadRequest, + type SideEffect, + type SideEffectLinkedToNoteHash, } from '@aztec/circuits.js'; import { computePublicDataTreeLeafSlot, computePublicDataTreeValue } from '@aztec/circuits.js/hash'; diff --git a/yarn-project/simulator/src/public/executor.ts b/yarn-project/simulator/src/public/executor.ts index 13ffcecc79b..9b79022825c 100644 --- a/yarn-project/simulator/src/public/executor.ts +++ b/yarn-project/simulator/src/public/executor.ts @@ -1,5 +1,5 @@ import { UnencryptedFunctionL2Logs } from '@aztec/circuit-types'; -import { Fr, GlobalVariables, Header, PublicCircuitPublicInputs } from '@aztec/circuits.js'; +import { Fr, type GlobalVariables, type Header, PublicCircuitPublicInputs } from '@aztec/circuits.js'; import { createDebugLogger } from '@aztec/foundation/log'; import { spawn } from 'child_process'; @@ -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 03f6a631f9b..d5c33178652 100644 --- a/yarn-project/simulator/src/public/index.test.ts +++ b/yarn-project/simulator/src/public/index.test.ts @@ -1,10 +1,10 @@ -import { L1ToL2Message, NullifierMembershipWitness, SiblingPath } from '@aztec/circuit-types'; +import { type L1ToL2Message, NullifierMembershipWitness, SiblingPath } from '@aztec/circuit-types'; import { AppendOnlyTreeSnapshot, CallContext, FunctionData, GlobalVariables, - Header, + type Header, L1_TO_L2_MSG_TREE_HEIGHT, L2ToL1Message, NULLIFIER_TREE_HEIGHT, @@ -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/public_execution_context.ts b/yarn-project/simulator/src/public/public_execution_context.ts index ab54bf1c792..b999d27ad13 100644 --- a/yarn-project/simulator/src/public/public_execution_context.ts +++ b/yarn-project/simulator/src/public/public_execution_context.ts @@ -1,15 +1,25 @@ -import { NullifierMembershipWitness, UnencryptedFunctionL2Logs, UnencryptedL2Log } from '@aztec/circuit-types'; -import { CallContext, FunctionData, FunctionSelector, GlobalVariables, Header } from '@aztec/circuits.js'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { + type NullifierMembershipWitness, + UnencryptedFunctionL2Logs, + type UnencryptedL2Log, +} from '@aztec/circuit-types'; +import { + CallContext, + FunctionData, + type FunctionSelector, + type GlobalVariables, + type Header, +} from '@aztec/circuits.js'; +import { type 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 PackedArgsCache, type SideEffectCounter } from '../common/index.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 dd995566e30..a4b63c54a60 100644 --- a/yarn-project/simulator/src/public/state_actions.ts +++ b/yarn-project/simulator/src/public/state_actions.ts @@ -1,8 +1,8 @@ import { ContractStorageRead, ContractStorageUpdateRequest } from '@aztec/circuits.js'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { type 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 ec777bdea39..df1df4a1be6 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 cdf49df7f5a..16e83ddda1b 100644 --- a/yarn-project/simulator/src/simulator/acvm_wasm.ts +++ b/yarn-project/simulator/src/simulator/acvm_wasm.ts @@ -1,9 +1,13 @@ -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 WasmBlackBoxFunctionSolver, + createBlackBoxSolver, + executeCircuitWithBlackBoxSolver, +} from '@noir-lang/acvm_js'; +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 a9fd9266351..e0a087fcc37 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/simulator/src/test/utils.ts b/yarn-project/simulator/src/test/utils.ts index 1e0118b9c97..5b611e84602 100644 --- a/yarn-project/simulator/src/test/utils.ts +++ b/yarn-project/simulator/src/test/utils.ts @@ -1,5 +1,5 @@ import { L1Actor, L1ToL2Message, L2Actor } from '@aztec/circuit-types'; -import { AztecAddress, EthAddress, Fr } from '@aztec/circuits.js'; +import { type AztecAddress, EthAddress, type Fr } from '@aztec/circuits.js'; import { computeMessageSecretHash } from '@aztec/circuits.js/hash'; import { sha256ToField } from '@aztec/foundation/crypto'; diff --git a/yarn-project/simulator/src/utils.ts b/yarn-project/simulator/src/utils.ts index 9dc93abe392..380222fa578 100644 --- a/yarn-project/simulator/src/utils.ts +++ b/yarn-project/simulator/src/utils.ts @@ -1,5 +1,5 @@ import { pedersenHash } from '@aztec/foundation/crypto'; -import { Fr } from '@aztec/foundation/fields'; +import { type Fr } from '@aztec/foundation/fields'; /** * Computes the resulting storage slot for an entry in a mapping. diff --git a/yarn-project/types/src/abi/contract_artifact.ts b/yarn-project/types/src/abi/contract_artifact.ts index 1185cc5f04f..587e6c195c8 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, - ABIParameterVisibility, - ABIType, - ContractArtifact, - FunctionArtifact, + type ABIParameter, + type ABIParameterVisibility, + 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_class.ts b/yarn-project/types/src/contracts/contract_class.ts index a532dfb9e1c..a7869382f3f 100644 --- a/yarn-project/types/src/contracts/contract_class.ts +++ b/yarn-project/types/src/contracts/contract_class.ts @@ -1,5 +1,5 @@ -import { FunctionSelector } from '@aztec/foundation/abi'; -import { Fr } from '@aztec/foundation/fields'; +import { type FunctionSelector } from '@aztec/foundation/abi'; +import { type Fr } from '@aztec/foundation/fields'; const VERSION = 1 as const; diff --git a/yarn-project/types/src/contracts/contract_data_source.ts b/yarn-project/types/src/contracts/contract_data_source.ts index c9d438cd24e..e785b948639 100644 --- a/yarn-project/types/src/contracts/contract_data_source.ts +++ b/yarn-project/types/src/contracts/contract_data_source.ts @@ -1,9 +1,9 @@ -import { FunctionSelector } from '@aztec/foundation/abi'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { Fr } from '@aztec/foundation/fields'; +import { type FunctionSelector } from '@aztec/foundation/abi'; +import { type AztecAddress } from '@aztec/foundation/aztec-address'; +import { type 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 354857b6b61..8f14656bc90 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 48d77996d89..b4c96b6cedb 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 097129d74fb..c244ee69995 100644 --- a/yarn-project/types/src/noir/index.ts +++ b/yarn-project/types/src/noir/index.ts @@ -1,10 +1,10 @@ import { - ABIParameter, - ABIParameterVisibility, - ABIType, - DebugFileMap, - DebugInfo, - EventAbi, + type ABIParameter, + type ABIParameterVisibility, + 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 4395b58033d..9796b24cb12 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 4da1279012b..1ccdb134c64 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, type 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 001fd91abc2..548c37a0f19 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, type 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, + type 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 51b8e1d4880..24dfa22226c 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 7df7a084f32..19cadde30a3 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 MerkleTreeId } from '@aztec/circuit-types'; +import { type Fr, MAX_NEW_NULLIFIERS_PER_TX, MAX_PUBLIC_DATA_UPDATE_REQUESTS_PER_TX } from '@aztec/circuits.js'; +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 3cacb652fe0..fd6fc5801c0 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 { type L2Block, type MerkleTreeId, type SiblingPath } from '@aztec/circuit-types'; +import { type Fr, type Header, type NullifierLeafPreimage, type 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 aad3c019a6b..d26a7d12b66 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 L2Block, type MerkleTreeId, type SiblingPath } from '@aztec/circuit-types'; +import { type Fr, type Header, type NullifierLeafPreimage, type StateReference } from '@aztec/circuits.js'; +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 188213d66c7..850899e7d0c 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 { MerkleTreeId, type SiblingPath } from '@aztec/circuit-types'; +import { AppendOnlyTreeSnapshot, Fr, type Header, PartialStateReference, StateReference } from '@aztec/circuits.js'; +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 352d94e8fb7..6a12541500b 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 @@ -1,4 +1,4 @@ -import { L2Block, MerkleTreeId, SiblingPath } from '@aztec/circuit-types'; +import { type L2Block, MerkleTreeId, type SiblingPath } from '@aztec/circuit-types'; import { ARCHIVE_HEIGHT, AppendOnlyTreeSnapshot, @@ -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';