diff --git a/CHANGELOG.md b/CHANGELOG.md index a10de9564d4..b3c4bb0d909 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -614,7 +614,7 @@ * Noir circuit tests ([#3229](https://github.com/AztecProtocol/aztec-packages/issues/3229)) ([dbfb086](https://github.com/AztecProtocol/aztec-packages/commit/dbfb0862a26944e240c84406c7d856c022b25f47)) * Private kernel circuits ([#3240](https://github.com/AztecProtocol/aztec-packages/issues/3240)) ([b7fbe19](https://github.com/AztecProtocol/aztec-packages/commit/b7fbe19a04a1097df7597ac8a32996994840f57c)) * Prune 0 values from L2Tx ([#3224](https://github.com/AztecProtocol/aztec-packages/issues/3224)) ([2de206d](https://github.com/AztecProtocol/aztec-packages/commit/2de206d7959078f5289441e35788d83661a2c9f6)) -* Refactor e2e to not use @aztec/types ([#3175](https://github.com/AztecProtocol/aztec-packages/issues/3175)) ([006a07a](https://github.com/AztecProtocol/aztec-packages/commit/006a07a1dd89e4e4e792d7a3e8332351f8b32351)), closes [#3157](https://github.com/AztecProtocol/aztec-packages/issues/3157) +* Refactor e2e to not use @aztec/circuit-types ([#3175](https://github.com/AztecProtocol/aztec-packages/issues/3175)) ([006a07a](https://github.com/AztecProtocol/aztec-packages/commit/006a07a1dd89e4e4e792d7a3e8332351f8b32351)), closes [#3157](https://github.com/AztecProtocol/aztec-packages/issues/3157) * Remove extra println in noir protoco circuit ([#3219](https://github.com/AztecProtocol/aztec-packages/issues/3219)) ([3295fdd](https://github.com/AztecProtocol/aztec-packages/commit/3295fdd99d92b215f2cbc2707980a7055557cb2a)) * Split out relations, PG, Honk variants ([#3238](https://github.com/AztecProtocol/aztec-packages/issues/3238)) ([8abd39f](https://github.com/AztecProtocol/aztec-packages/commit/8abd39f5f8a434d96fe259df9c5940787bd705f1)) * Update Noir version ([#3082](https://github.com/AztecProtocol/aztec-packages/issues/3082)) ([59eb6af](https://github.com/AztecProtocol/aztec-packages/commit/59eb6af2da9801fb6927f4b98615b2c3f8f3ec28)) diff --git a/boxes/package.json b/boxes/package.json index daa17918ede..282622f14fb 100644 --- a/boxes/package.json +++ b/boxes/package.json @@ -17,7 +17,7 @@ "@aztec/circuits.js": "portal:../yarn-project/circuits.js", "@aztec/foundation": "portal:../yarn-project/foundation", "@aztec/bb.js": "portal:../barretenberg/ts", - "@aztec/types": "portal:../yarn-project/types", + "@aztec/circuit-types": "portal:../yarn-project/circuit-types", "@aztec/ethereum": "portal:../yarn-project/ethereum" } } diff --git a/boxes/yarn.lock b/boxes/yarn.lock index 3ef58267bdb..52561d05d8d 100644 --- a/boxes/yarn.lock +++ b/boxes/yarn.lock @@ -37,7 +37,7 @@ __metadata: "@aztec/circuits.js": "workspace:^" "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" - "@aztec/types": "workspace:^" + "@aztec/circuit-types": "workspace:^" tslib: "npm:^2.4.0" languageName: node linkType: soft @@ -68,7 +68,7 @@ __metadata: "@aztec/circuits.js": "workspace:^" "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" - "@aztec/types": "workspace:^" + "@aztec/circuit-types": "workspace:^" lodash.every: "npm:^4.6.0" lodash.partition: "npm:^4.6.0" tslib: "npm:^2.4.0" @@ -281,9 +281,9 @@ __metadata: languageName: node linkType: soft -"@aztec/types@portal:../yarn-project/types::locator=%40aztec%2Fboxes%40workspace%3A.": +"@aztec/circuit-types@portal:../yarn-project/types::locator=%40aztec%2Fboxes%40workspace%3A.": version: 0.0.0-use.local - resolution: "@aztec/types@portal:../yarn-project/types::locator=%40aztec%2Fboxes%40workspace%3A." + resolution: "@aztec/circuit-types@portal:../yarn-project/types::locator=%40aztec%2Fboxes%40workspace%3A." dependencies: "@aztec/circuits.js": "workspace:^" "@aztec/ethereum": "workspace:^" diff --git a/docs/docs/dev_docs/aztecjs/main.md b/docs/docs/dev_docs/aztecjs/main.md index b3e98d0d1da..531754b2992 100644 --- a/docs/docs/dev_docs/aztecjs/main.md +++ b/docs/docs/dev_docs/aztecjs/main.md @@ -14,7 +14,7 @@ Aztec.js is a library that provides APIs for managing accounts and interacting w ```typescript import { getSchnorrAccount } from "@aztec/aztec.js"; -import { GrumpkinPrivateKey } from "@aztec/types"; +import { GrumpkinPrivateKey } from "@aztec/circuit-types"; const encryptionPrivateKey = GrumpkinPrivateKey.random(); const signingPrivateKey = GrumpkinPrivateKey.random(); diff --git a/docs/docs/dev_docs/tutorials/token_portal/setup.md b/docs/docs/dev_docs/tutorials/token_portal/setup.md index 40541565c88..0cbb5b16329 100644 --- a/docs/docs/dev_docs/tutorials/token_portal/setup.md +++ b/docs/docs/dev_docs/tutorials/token_portal/setup.md @@ -130,7 +130,7 @@ Inside the `packages` directory, run ```bash mkdir src && cd src && yarn init -yp -yarn add @aztec/aztec.js @aztec/accounts @aztec/noir-contracts @aztec/types @aztec/foundation @aztec/l1-artifacts viem "@types/node@^20.8.2" +yarn add @aztec/aztec.js @aztec/accounts @aztec/noir-contracts @aztec/circuit-types @aztec/foundation @aztec/l1-artifacts viem "@types/node@^20.8.2" yarn add -D jest @jest/globals ts-jest ``` @@ -159,7 +159,7 @@ Your `package.json` should look something like this: "@aztec/aztec.js": "^0.8.7", "@aztec/foundation": "^0.8.7", "@aztec/noir-contracts": "^0.8.7", - "@aztec/types": "^0.8.7", + "@aztec/circuit-types": "^0.8.7", "@types/node": "^20.8.2", "ethers": "^5.7" }, diff --git a/docs/docs/dev_docs/wallets/architecture.md b/docs/docs/dev_docs/wallets/architecture.md index c6e261cf772..7785d43e41b 100644 --- a/docs/docs/dev_docs/wallets/architecture.md +++ b/docs/docs/dev_docs/wallets/architecture.md @@ -24,7 +24,7 @@ Refer to the page on [writing an account contract](./writing_an_account_contract A wallet exposes the PXE interface to dapps by running an PXE instance. The PXE requires a keystore and a database implementation for storing keys, private state, and recipient encryption public keys. -#include_code pxe-interface /yarn-project/types/src/interfaces/pxe.ts typescript +#include_code pxe-interface /yarn-project/circuit-types/src/interfaces/pxe.ts typescript diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 3bb61948edd..5f19cd0a574 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -127,8 +127,8 @@ const config = { "docusaurus-plugin-typedoc", { id: "apis/pxe", - entryPoints: ["../yarn-project/types/src/interfaces/pxe.ts"], - tsconfig: "../yarn-project/types/tsconfig.json", + entryPoints: ["../yarn-project/circuit-types/src/interfaces/pxe.ts"], + tsconfig: "../yarn-project/circuit-types/tsconfig.json", entryPointStrategy: "expand", out: "apis/pxe", disableSources: true, diff --git a/yarn-project/accounts/README.md b/yarn-project/accounts/README.md index 66cee36774d..96afcdc10d5 100644 --- a/yarn-project/accounts/README.md +++ b/yarn-project/accounts/README.md @@ -20,7 +20,7 @@ npm install @aztec/accounts ```typescript import { getSchnorrAccount } from '@aztec/accounts/schnorr'; -import { GrumpkinPrivateKey } from '@aztec/types'; +import { GrumpkinPrivateKey } from '@aztec/circuit-types'; const encryptionPrivateKey = GrumpkinPrivateKey.random(); const signingPrivateKey = GrumpkinPrivateKey.random(); diff --git a/yarn-project/accounts/package.json b/yarn-project/accounts/package.json index 21c0e1d8aaa..b4424cab7a1 100644 --- a/yarn-project/accounts/package.json +++ b/yarn-project/accounts/package.json @@ -46,10 +46,10 @@ }, "dependencies": { "@aztec/aztec.js": "workspace:^", + "@aztec/circuit-types": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/ethereum": "workspace:^", "@aztec/foundation": "workspace:^", - "@aztec/types": "workspace:^", "tslib": "^2.4.0" }, "devDependencies": { diff --git a/yarn-project/accounts/src/defaults/account_contract.ts b/yarn-project/accounts/src/defaults/account_contract.ts index 3d1e67db5d9..1247248995c 100644 --- a/yarn-project/accounts/src/defaults/account_contract.ts +++ b/yarn-project/accounts/src/defaults/account_contract.ts @@ -1,6 +1,6 @@ import { AccountContract, AccountInterface, AuthWitnessProvider } from '@aztec/aztec.js/account'; +import { CompleteAddress, NodeInfo } from '@aztec/circuit-types'; import { ContractArtifact } from '@aztec/foundation/abi'; -import { CompleteAddress, NodeInfo } from '@aztec/types'; import { DefaultAccountInterface } from '../defaults/account_interface.js'; diff --git a/yarn-project/accounts/src/defaults/account_entrypoint.ts b/yarn-project/accounts/src/defaults/account_entrypoint.ts index 43db45f79eb..782d5c4119a 100644 --- a/yarn-project/accounts/src/defaults/account_entrypoint.ts +++ b/yarn-project/accounts/src/defaults/account_entrypoint.ts @@ -1,7 +1,7 @@ import { AuthWitnessProvider, EntrypointInterface } from '@aztec/aztec.js/account'; +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 { FunctionCall, PackedArguments, TxExecutionRequest } from '@aztec/types'; import { DEFAULT_CHAIN_ID, DEFAULT_VERSION } from './constants.js'; import { buildPayload, hashPayload } from './entrypoint_payload.js'; diff --git a/yarn-project/accounts/src/defaults/account_interface.ts b/yarn-project/accounts/src/defaults/account_interface.ts index d6227c6b062..f4bbd465cf2 100644 --- a/yarn-project/accounts/src/defaults/account_interface.ts +++ b/yarn-project/accounts/src/defaults/account_interface.ts @@ -1,6 +1,6 @@ import { AccountInterface, AuthWitnessProvider, EntrypointInterface } from '@aztec/aztec.js/account'; +import { AuthWitness, FunctionCall, NodeInfo, TxExecutionRequest } from '@aztec/circuit-types'; import { CompleteAddress, Fr } from '@aztec/circuits.js'; -import { AuthWitness, FunctionCall, NodeInfo, TxExecutionRequest } from '@aztec/types'; import { DefaultAccountEntrypoint } from './account_entrypoint.js'; diff --git a/yarn-project/accounts/src/defaults/entrypoint_payload.ts b/yarn-project/accounts/src/defaults/entrypoint_payload.ts index 6ff8c947931..96461519bfb 100644 --- a/yarn-project/accounts/src/defaults/entrypoint_payload.ts +++ b/yarn-project/accounts/src/defaults/entrypoint_payload.ts @@ -1,7 +1,7 @@ +import { FunctionCall, PackedArguments, emptyFunctionCall } from '@aztec/circuit-types'; import { Fr, GeneratorIndex } from '@aztec/circuits.js'; import { padArrayEnd } from '@aztec/foundation/collection'; import { pedersenHash } from '@aztec/foundation/crypto'; -import { FunctionCall, PackedArguments, emptyFunctionCall } from '@aztec/types'; // These must match the values defined in yarn-project/aztec-nr/aztec/src/entrypoint.nr const ACCOUNT_MAX_CALLS = 4; diff --git a/yarn-project/accounts/src/ecdsa/account_contract.ts b/yarn-project/accounts/src/ecdsa/account_contract.ts index 6c96d9cb652..250c1c0ce83 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 { Ecdsa } from '@aztec/circuits.js/barretenberg'; import { ContractArtifact } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; -import { AuthWitness, CompleteAddress } from '@aztec/types'; import { DefaultAccountContract } from '../defaults/account_contract.js'; import { EcdsaAccountContractArtifact } from './artifact.js'; diff --git a/yarn-project/accounts/src/ecdsa/index.ts b/yarn-project/accounts/src/ecdsa/index.ts index a4a0ca92027..deec58e1c6b 100644 --- a/yarn-project/accounts/src/ecdsa/index.ts +++ b/yarn-project/accounts/src/ecdsa/index.ts @@ -6,8 +6,8 @@ */ import { AccountManager, Salt } from '@aztec/aztec.js/account'; import { AccountWallet, getWallet } from '@aztec/aztec.js/wallet'; +import { CompleteAddress, GrumpkinPrivateKey, PXE } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/circuits.js'; -import { CompleteAddress, GrumpkinPrivateKey, PXE } from '@aztec/types'; 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 72a242310ed..38fc197b6d3 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 { Schnorr } from '@aztec/circuits.js/barretenberg'; import { ContractArtifact } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; -import { AuthWitness, CompleteAddress, GrumpkinPrivateKey } from '@aztec/types'; import { DefaultAccountContract } from '../defaults/account_contract.js'; import { SchnorrAccountContractArtifact } from './artifact.js'; diff --git a/yarn-project/accounts/src/schnorr/index.ts b/yarn-project/accounts/src/schnorr/index.ts index e61525a5eaf..c5b44332648 100644 --- a/yarn-project/accounts/src/schnorr/index.ts +++ b/yarn-project/accounts/src/schnorr/index.ts @@ -6,8 +6,8 @@ */ import { AccountManager, Salt } from '@aztec/aztec.js/account'; import { AccountWallet, getWallet } from '@aztec/aztec.js/wallet'; +import { CompleteAddress, GrumpkinPrivateKey, PXE } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/circuits.js'; -import { CompleteAddress, GrumpkinPrivateKey, PXE } from '@aztec/types'; 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 082ec84336c..5af79176758 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 { Schnorr } from '@aztec/circuits.js/barretenberg'; import { ContractArtifact } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; -import { AuthWitness, CompleteAddress, GrumpkinPrivateKey } from '@aztec/types'; import { DefaultAccountContract } from '../defaults/account_contract.js'; import { SchnorrSingleKeyAccountContractArtifact } from './artifact.js'; diff --git a/yarn-project/accounts/src/single_key/index.ts b/yarn-project/accounts/src/single_key/index.ts index 9b224dd7d88..85ee4254dc5 100644 --- a/yarn-project/accounts/src/single_key/index.ts +++ b/yarn-project/accounts/src/single_key/index.ts @@ -6,8 +6,8 @@ */ import { AccountManager, Salt } from '@aztec/aztec.js/account'; import { AccountWallet, getWallet } from '@aztec/aztec.js/wallet'; +import { CompleteAddress, GrumpkinPrivateKey, PXE } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/circuits.js'; -import { CompleteAddress, GrumpkinPrivateKey, PXE } from '@aztec/types'; 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 7688913d1d9..33fc70dd49c 100644 --- a/yarn-project/accounts/src/testing/configuration.ts +++ b/yarn-project/accounts/src/testing/configuration.ts @@ -1,7 +1,7 @@ import { generatePublicKey } from '@aztec/aztec.js'; import { AccountWalletWithPrivateKey } from '@aztec/aztec.js/wallet'; +import { PXE } from '@aztec/circuit-types'; import { Fr, GrumpkinScalar } from '@aztec/foundation/fields'; -import { PXE } from '@aztec/types'; 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 266e239fa4d..ddeb90bd2bc 100644 --- a/yarn-project/accounts/src/testing/create_account.ts +++ b/yarn-project/accounts/src/testing/create_account.ts @@ -1,6 +1,6 @@ import { AccountWalletWithPrivateKey } from '@aztec/aztec.js/wallet'; +import { PXE } from '@aztec/circuit-types'; import { GrumpkinScalar } from '@aztec/circuits.js'; -import { PXE } from '@aztec/types'; import { getSchnorrAccount } from '../schnorr/index.js'; diff --git a/yarn-project/accounts/tsconfig.dest.json b/yarn-project/accounts/tsconfig.dest.json index 7436bb06ad8..5997e69d530 100644 --- a/yarn-project/accounts/tsconfig.dest.json +++ b/yarn-project/accounts/tsconfig.dest.json @@ -11,7 +11,7 @@ "path": "../foundation/tsconfig.dest.json" }, { - "path": "../types/tsconfig.dest.json" + "path": "../circuit-types/tsconfig.dest.json" } ], "exclude": ["src/**/*.test.ts"] diff --git a/yarn-project/accounts/tsconfig.json b/yarn-project/accounts/tsconfig.json index d95dd516822..ad4468866e2 100644 --- a/yarn-project/accounts/tsconfig.json +++ b/yarn-project/accounts/tsconfig.json @@ -9,6 +9,9 @@ { "path": "../aztec.js" }, + { + "path": "../circuit-types" + }, { "path": "../circuits.js" }, @@ -17,9 +20,6 @@ }, { "path": "../foundation" - }, - { - "path": "../types" } ], "include": ["src", "src/**/*.json"] diff --git a/yarn-project/acir-simulator/package.json b/yarn-project/acir-simulator/package.json index 848a5ad4ae2..9a3a0361d72 100644 --- a/yarn-project/acir-simulator/package.json +++ b/yarn-project/acir-simulator/package.json @@ -30,9 +30,9 @@ "rootDir": "./src" }, "dependencies": { + "@aztec/circuit-types": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/foundation": "workspace:^", - "@aztec/types": "workspace:^", "@noir-lang/acvm_js": "portal:../../noir/packages/acvm_js", "levelup": "^5.1.1", "memdown": "^6.1.1", diff --git a/yarn-project/acir-simulator/src/acvm/acvm.ts b/yarn-project/acir-simulator/src/acvm/acvm.ts index 396dd8d5e07..178ccbee21d 100644 --- a/yarn-project/acir-simulator/src/acvm/acvm.ts +++ b/yarn-project/acir-simulator/src/acvm/acvm.ts @@ -1,6 +1,6 @@ +import { NoirCallStack, SourceCodeLocation } from '@aztec/circuit-types'; import { FunctionDebugMetadata, OpcodeLocation } from '@aztec/foundation/abi'; import { createDebugLogger } from '@aztec/foundation/log'; -import { NoirCallStack, SourceCodeLocation } from '@aztec/types'; import { ExecutionError, diff --git a/yarn-project/acir-simulator/src/acvm/oracle/oracle.ts b/yarn-project/acir-simulator/src/acvm/oracle/oracle.ts index fd014c9da2b..c1d850218ef 100644 --- a/yarn-project/acir-simulator/src/acvm/oracle/oracle.ts +++ b/yarn-project/acir-simulator/src/acvm/oracle/oracle.ts @@ -1,10 +1,10 @@ +import { MerkleTreeId, UnencryptedL2Log } from '@aztec/circuit-types'; import { RETURN_VALUES_LENGTH } from '@aztec/circuits.js'; import { FunctionSelector } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { padArrayEnd } from '@aztec/foundation/collection'; import { Fr, Point } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; -import { MerkleTreeId, UnencryptedL2Log } from '@aztec/types'; import { ACVMField } from '../acvm_types.js'; import { frToNumber, fromACVMField } from '../deserialize.js'; diff --git a/yarn-project/acir-simulator/src/acvm/oracle/typed_oracle.ts b/yarn-project/acir-simulator/src/acvm/oracle/typed_oracle.ts index be8596717ed..995a285b7b1 100644 --- a/yarn-project/acir-simulator/src/acvm/oracle/typed_oracle.ts +++ b/yarn-project/acir-simulator/src/acvm/oracle/typed_oracle.ts @@ -1,8 +1,3 @@ -import { BlockHeader, PrivateCallStackItem, 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 { Fr, GrumpkinScalar } from '@aztec/foundation/fields'; import { CompleteAddress, MerkleTreeId, @@ -11,7 +6,12 @@ import { PublicDataWitness, PublicKey, UnencryptedL2Log, -} from '@aztec/types'; +} from '@aztec/circuit-types'; +import { BlockHeader, PrivateCallStackItem, 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 { Fr, GrumpkinScalar } from '@aztec/foundation/fields'; /** * Information about a note needed during execution. diff --git a/yarn-project/acir-simulator/src/client/client_execution_context.ts b/yarn-project/acir-simulator/src/client/client_execution_context.ts index c991bd24428..5df69a7037e 100644 --- a/yarn-project/acir-simulator/src/client/client_execution_context.ts +++ b/yarn-project/acir-simulator/src/client/client_execution_context.ts @@ -1,3 +1,4 @@ +import { AuthWitness, FunctionL2Logs, L1NotePayload, Note, UnencryptedL2Log } from '@aztec/circuit-types'; import { BlockHeader, CallContext, @@ -15,7 +16,6 @@ import { FunctionAbi, FunctionArtifact, countArgumentsSize } from '@aztec/founda import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr, Point } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; -import { AuthWitness, FunctionL2Logs, L1NotePayload, Note, UnencryptedL2Log } from '@aztec/types'; import { NoteData, diff --git a/yarn-project/acir-simulator/src/client/db_oracle.ts b/yarn-project/acir-simulator/src/client/db_oracle.ts index b389d423891..560c5923ecd 100644 --- a/yarn-project/acir-simulator/src/client/db_oracle.ts +++ b/yarn-project/acir-simulator/src/client/db_oracle.ts @@ -1,9 +1,9 @@ +import { L2Block, MerkleTreeId, NullifierMembershipWitness, PublicDataWitness } from '@aztec/circuit-types'; import { BlockHeader, CompleteAddress, GrumpkinPrivateKey, PublicKey } from '@aztec/circuits.js'; import { FunctionArtifact, FunctionDebugMetadata, 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 { L2Block, MerkleTreeId, NullifierMembershipWitness, PublicDataWitness } from '@aztec/types'; import { NoteData } from '../acvm/index.js'; import { CommitmentsDB } from '../public/db.js'; diff --git a/yarn-project/acir-simulator/src/client/execution_result.test.ts b/yarn-project/acir-simulator/src/client/execution_result.test.ts index bd635b2c098..181807c00f5 100644 --- a/yarn-project/acir-simulator/src/client/execution_result.test.ts +++ b/yarn-project/acir-simulator/src/client/execution_result.test.ts @@ -1,5 +1,5 @@ +import { FunctionL2Logs } from '@aztec/circuit-types'; import { PrivateCallStackItem } from '@aztec/circuits.js'; -import { FunctionL2Logs } from '@aztec/types'; import { ExecutionResult, collectEncryptedLogs, collectUnencryptedLogs } from './execution_result.js'; diff --git a/yarn-project/acir-simulator/src/client/execution_result.ts b/yarn-project/acir-simulator/src/client/execution_result.ts index c04de6e63a6..eb8876ff92e 100644 --- a/yarn-project/acir-simulator/src/client/execution_result.ts +++ b/yarn-project/acir-simulator/src/client/execution_result.ts @@ -1,7 +1,7 @@ +import { FunctionL2Logs, Note } from '@aztec/circuit-types'; import { PrivateCallStackItem, PublicCallRequest, ReadRequestMembershipWitness } from '@aztec/circuits.js'; import { DecodedReturn } from '@aztec/foundation/abi'; import { Fr } from '@aztec/foundation/fields'; -import { FunctionL2Logs, Note } from '@aztec/types'; import { ACVMField } from '../acvm/index.js'; diff --git a/yarn-project/acir-simulator/src/client/pick_notes.test.ts b/yarn-project/acir-simulator/src/client/pick_notes.test.ts index 1d9a5ffeb22..bf2ad610718 100644 --- a/yarn-project/acir-simulator/src/client/pick_notes.test.ts +++ b/yarn-project/acir-simulator/src/client/pick_notes.test.ts @@ -1,5 +1,5 @@ +import { Note } from '@aztec/circuit-types'; import { Fr } from '@aztec/foundation/fields'; -import { Note } from '@aztec/types'; import { SortOrder, pickNotes } from './pick_notes.js'; diff --git a/yarn-project/acir-simulator/src/client/pick_notes.ts b/yarn-project/acir-simulator/src/client/pick_notes.ts index e36e193b2ae..a964cf35177 100644 --- a/yarn-project/acir-simulator/src/client/pick_notes.ts +++ b/yarn-project/acir-simulator/src/client/pick_notes.ts @@ -1,5 +1,5 @@ +import { Note } from '@aztec/circuit-types'; import { Fr } from '@aztec/foundation/fields'; -import { Note } from '@aztec/types'; /** * Configuration for selecting values. diff --git a/yarn-project/acir-simulator/src/client/private_execution.test.ts b/yarn-project/acir-simulator/src/client/private_execution.test.ts index cd232cd177c..b1343a5f51e 100644 --- a/yarn-project/acir-simulator/src/client/private_execution.test.ts +++ b/yarn-project/acir-simulator/src/client/private_execution.test.ts @@ -1,3 +1,4 @@ +import { Note, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types'; import { BlockHeader, CallContext, @@ -38,7 +39,6 @@ import { TestContractArtifact, TokenContractArtifact, } from '@aztec/noir-contracts'; -import { Note, PackedArguments, TxExecutionRequest } from '@aztec/types'; import { jest } from '@jest/globals'; import { MockProxy, mock } from 'jest-mock-extended'; diff --git a/yarn-project/acir-simulator/src/client/simulator.test.ts b/yarn-project/acir-simulator/src/client/simulator.test.ts index 3b04dee7e6a..406a1292461 100644 --- a/yarn-project/acir-simulator/src/client/simulator.test.ts +++ b/yarn-project/acir-simulator/src/client/simulator.test.ts @@ -1,3 +1,4 @@ +import { Note } from '@aztec/circuit-types'; import { CompleteAddress } from '@aztec/circuits.js'; import { computeUniqueCommitment, siloCommitment } from '@aztec/circuits.js/abis'; import { ABIParameterVisibility } from '@aztec/foundation/abi'; @@ -5,7 +6,6 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { pedersenHash } from '@aztec/foundation/crypto'; import { Fr, GrumpkinScalar } from '@aztec/foundation/fields'; import { TokenContractArtifact } from '@aztec/noir-contracts/Token'; -import { Note } from '@aztec/types'; import { MockProxy, mock } from 'jest-mock-extended'; diff --git a/yarn-project/acir-simulator/src/client/simulator.ts b/yarn-project/acir-simulator/src/client/simulator.ts index 087b641e522..0e11e43509d 100644 --- a/yarn-project/acir-simulator/src/client/simulator.ts +++ b/yarn-project/acir-simulator/src/client/simulator.ts @@ -1,3 +1,4 @@ +import { AztecNode, FunctionCall, Note, TxExecutionRequest } from '@aztec/circuit-types'; import { CallContext, FunctionData } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { ArrayType, FunctionSelector, FunctionType, encodeArguments } from '@aztec/foundation/abi'; @@ -5,7 +6,6 @@ import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; -import { AztecNode, FunctionCall, Note, TxExecutionRequest } from '@aztec/types'; import { WasmBlackBoxFunctionSolver, createBlackBoxSolver } from '@noir-lang/acvm_js'; diff --git a/yarn-project/acir-simulator/src/client/unconstrained_execution.test.ts b/yarn-project/acir-simulator/src/client/unconstrained_execution.test.ts index 456ba584f8b..fcabbc09a1d 100644 --- a/yarn-project/acir-simulator/src/client/unconstrained_execution.test.ts +++ b/yarn-project/acir-simulator/src/client/unconstrained_execution.test.ts @@ -1,9 +1,9 @@ +import { FunctionCall, Note } from '@aztec/circuit-types'; import { BlockHeader, CompleteAddress, FunctionData } from '@aztec/circuits.js'; import { FunctionSelector, encodeArguments } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr, GrumpkinScalar } from '@aztec/foundation/fields'; import { StatefulTestContractArtifact } from '@aztec/noir-contracts/StatefulTest'; -import { FunctionCall, Note } from '@aztec/types'; import { mock } from 'jest-mock-extended'; diff --git a/yarn-project/acir-simulator/src/client/view_data_oracle.ts b/yarn-project/acir-simulator/src/client/view_data_oracle.ts index f2a6b437054..b029833f2ea 100644 --- a/yarn-project/acir-simulator/src/client/view_data_oracle.ts +++ b/yarn-project/acir-simulator/src/client/view_data_oracle.ts @@ -1,8 +1,3 @@ -import { BlockHeader, PublicKey } from '@aztec/circuits.js'; -import { computeGlobalsHash, siloNullifier } from '@aztec/circuits.js/abis'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { Fr } from '@aztec/foundation/fields'; -import { createDebugLogger } from '@aztec/foundation/log'; import { AuthWitness, AztecNode, @@ -11,7 +6,12 @@ import { MerkleTreeId, NullifierMembershipWitness, PublicDataWitness, -} from '@aztec/types'; +} from '@aztec/circuit-types'; +import { BlockHeader, PublicKey } from '@aztec/circuits.js'; +import { computeGlobalsHash, siloNullifier } from '@aztec/circuits.js/abis'; +import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { Fr } from '@aztec/foundation/fields'; +import { createDebugLogger } from '@aztec/foundation/log'; import { NoteData, TypedOracle } from '../acvm/index.js'; import { DBOracle } from './db_oracle.js'; diff --git a/yarn-project/acir-simulator/src/common/errors.ts b/yarn-project/acir-simulator/src/common/errors.ts index 9ec6701b41c..722819537a2 100644 --- a/yarn-project/acir-simulator/src/common/errors.ts +++ b/yarn-project/acir-simulator/src/common/errors.ts @@ -1,4 +1,4 @@ -import { FailingFunction, NoirCallStack, SimulationError } from '@aztec/types'; +import { FailingFunction, NoirCallStack, SimulationError } from '@aztec/circuit-types'; /** * An error that occurred during the execution of a function. diff --git a/yarn-project/acir-simulator/src/common/packed_args_cache.ts b/yarn-project/acir-simulator/src/common/packed_args_cache.ts index 30c8263efbd..ebc3689d769 100644 --- a/yarn-project/acir-simulator/src/common/packed_args_cache.ts +++ b/yarn-project/acir-simulator/src/common/packed_args_cache.ts @@ -1,5 +1,5 @@ +import { PackedArguments } from '@aztec/circuit-types'; import { Fr } from '@aztec/circuits.js'; -import { PackedArguments } from '@aztec/types'; /** * A cache for packed arguments during transaction execution. diff --git a/yarn-project/acir-simulator/src/public/execution.ts b/yarn-project/acir-simulator/src/public/execution.ts index 9df57b41e3e..c6df2312923 100644 --- a/yarn-project/acir-simulator/src/public/execution.ts +++ b/yarn-project/acir-simulator/src/public/execution.ts @@ -1,3 +1,4 @@ +import { FunctionL2Logs } from '@aztec/circuit-types'; import { AztecAddress, CallContext, @@ -11,7 +12,6 @@ import { SideEffectLinkedToNoteHash, } from '@aztec/circuits.js'; import { computePublicDataTreeLeafSlot, computePublicDataTreeValue } from '@aztec/circuits.js/abis'; -import { FunctionL2Logs } from '@aztec/types'; /** * The public function execution result. diff --git a/yarn-project/acir-simulator/src/public/public_execution_context.ts b/yarn-project/acir-simulator/src/public/public_execution_context.ts index 16a0d531d44..75942e7d93c 100644 --- a/yarn-project/acir-simulator/src/public/public_execution_context.ts +++ b/yarn-project/acir-simulator/src/public/public_execution_context.ts @@ -1,9 +1,9 @@ +import { FunctionL2Logs, UnencryptedL2Log } from '@aztec/circuit-types'; import { BlockHeader, CallContext, FunctionData, FunctionSelector, GlobalVariables } from '@aztec/circuits.js'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; -import { FunctionL2Logs, UnencryptedL2Log } from '@aztec/types'; import { TypedOracle, diff --git a/yarn-project/acir-simulator/src/test/utils.ts b/yarn-project/acir-simulator/src/test/utils.ts index f879dff69d9..e2e0310d458 100644 --- a/yarn-project/acir-simulator/src/test/utils.ts +++ b/yarn-project/acir-simulator/src/test/utils.ts @@ -1,8 +1,8 @@ +import { L1Actor, L1ToL2Message, L2Actor } from '@aztec/circuit-types'; import { AztecAddress, EthAddress, Fr } from '@aztec/circuits.js'; import { computeSecretMessageHash } from '@aztec/circuits.js/abis'; import { ContractArtifact, FunctionSelector, getFunctionDebugMetadata } from '@aztec/foundation/abi'; import { sha256 } from '@aztec/foundation/crypto'; -import { L1Actor, L1ToL2Message, L2Actor } from '@aztec/types'; import { FunctionArtifactWithDebugMetadata } from '../index.js'; diff --git a/yarn-project/acir-simulator/tsconfig.json b/yarn-project/acir-simulator/tsconfig.json index 3875d5fe231..da0e524126f 100644 --- a/yarn-project/acir-simulator/tsconfig.json +++ b/yarn-project/acir-simulator/tsconfig.json @@ -7,13 +7,13 @@ }, "references": [ { - "path": "../circuits.js" + "path": "../circuit-types" }, { - "path": "../foundation" + "path": "../circuits.js" }, { - "path": "../types" + "path": "../foundation" }, { "path": "../merkle-tree" diff --git a/yarn-project/archiver/package.json b/yarn-project/archiver/package.json index 3af3e147e2c..4ebbd12dfdb 100644 --- a/yarn-project/archiver/package.json +++ b/yarn-project/archiver/package.json @@ -34,11 +34,11 @@ "rootDir": "./src" }, "dependencies": { + "@aztec/circuit-types": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/ethereum": "workspace:^", "@aztec/foundation": "workspace:^", "@aztec/l1-artifacts": "workspace:^", - "@aztec/types": "workspace:^", "@types/lodash.omit": "^4.5.7", "debug": "^4.3.4", "lmdb": "^2.9.1", diff --git a/yarn-project/archiver/src/archiver/archiver.test.ts b/yarn-project/archiver/src/archiver/archiver.test.ts index 4f2d720d224..d873da2de83 100644 --- a/yarn-project/archiver/src/archiver/archiver.test.ts +++ b/yarn-project/archiver/src/archiver/archiver.test.ts @@ -1,10 +1,10 @@ +import { ExtendedContractData, L2Block, L2BlockL2Logs, LogType } from '@aztec/circuit-types'; import { NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP } from '@aztec/circuits.js'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; import { sleep } from '@aztec/foundation/sleep'; import { ContractDeploymentEmitterAbi, InboxAbi, RollupAbi } from '@aztec/l1-artifacts'; -import { ExtendedContractData, L2Block, L2BlockL2Logs, LogType } from '@aztec/types'; import { MockProxy, mock } from 'jest-mock-extended'; import times from 'lodash.times'; diff --git a/yarn-project/archiver/src/archiver/archiver.ts b/yarn-project/archiver/src/archiver/archiver.ts index 51bbe2b3cad..55bc7f09580 100644 --- a/yarn-project/archiver/src/archiver/archiver.ts +++ b/yarn-project/archiver/src/archiver/archiver.ts @@ -1,11 +1,3 @@ -import { FunctionSelector, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP } from '@aztec/circuits.js'; -import { createEthereumChain } from '@aztec/ethereum'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { padArrayEnd } from '@aztec/foundation/collection'; -import { EthAddress } from '@aztec/foundation/eth-address'; -import { Fr } from '@aztec/foundation/fields'; -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; -import { RunningPromise } from '@aztec/foundation/running-promise'; import { ContractData, ContractDataSource, @@ -22,7 +14,15 @@ import { LogFilter, LogType, TxHash, -} from '@aztec/types'; +} from '@aztec/circuit-types'; +import { FunctionSelector, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP } from '@aztec/circuits.js'; +import { createEthereumChain } from '@aztec/ethereum'; +import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { padArrayEnd } from '@aztec/foundation/collection'; +import { EthAddress } from '@aztec/foundation/eth-address'; +import { Fr } from '@aztec/foundation/fields'; +import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; +import { RunningPromise } from '@aztec/foundation/running-promise'; import omit from 'lodash.omit'; import { Chain, HttpTransport, PublicClient, createPublicClient, http } from 'viem'; diff --git a/yarn-project/archiver/src/archiver/archiver_store.ts b/yarn-project/archiver/src/archiver/archiver_store.ts index 9abfe82686b..44fe30cf9e5 100644 --- a/yarn-project/archiver/src/archiver/archiver_store.ts +++ b/yarn-project/archiver/src/archiver/archiver_store.ts @@ -1,5 +1,3 @@ -import { Fr } from '@aztec/circuits.js'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; import { CancelledL1ToL2Message, ContractData, @@ -13,7 +11,9 @@ import { LogType, PendingL1ToL2Message, TxHash, -} from '@aztec/types'; +} from '@aztec/circuit-types'; +import { Fr } from '@aztec/circuits.js'; +import { AztecAddress } from '@aztec/foundation/aztec-address'; /** * Interface describing a data store to be used by the archiver to store all its relevant data 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 9686eab0ea2..a044d6afcbb 100644 --- a/yarn-project/archiver/src/archiver/archiver_store_test_suite.ts +++ b/yarn-project/archiver/src/archiver/archiver_store_test_suite.ts @@ -1,5 +1,3 @@ -import { AztecAddress, Fr } from '@aztec/circuits.js'; -import { randomBytes } from '@aztec/foundation/crypto'; import { CancelledL1ToL2Message, ExtendedContractData, @@ -12,8 +10,10 @@ import { PendingL1ToL2Message, TxHash, UnencryptedL2Log, -} from '@aztec/types'; -import '@aztec/types/jest'; +} from '@aztec/circuit-types'; +import '@aztec/circuit-types/jest'; +import { AztecAddress, Fr } from '@aztec/circuits.js'; +import { randomBytes } from '@aztec/foundation/crypto'; import { ArchiverDataStore } from './archiver_store.js'; diff --git a/yarn-project/archiver/src/archiver/data_retrieval.ts b/yarn-project/archiver/src/archiver/data_retrieval.ts index 53b22b1a0f4..81ec341e160 100644 --- a/yarn-project/archiver/src/archiver/data_retrieval.ts +++ b/yarn-project/archiver/src/archiver/data_retrieval.ts @@ -1,5 +1,5 @@ +import { CancelledL1ToL2Message, ExtendedContractData, L2Block, PendingL1ToL2Message } from '@aztec/circuit-types'; import { EthAddress } from '@aztec/foundation/eth-address'; -import { CancelledL1ToL2Message, ExtendedContractData, L2Block, PendingL1ToL2Message } from '@aztec/types'; import { PublicClient } from 'viem'; diff --git a/yarn-project/archiver/src/archiver/eth_log_handlers.ts b/yarn-project/archiver/src/archiver/eth_log_handlers.ts index 99ed516b80b..312116f294c 100644 --- a/yarn-project/archiver/src/archiver/eth_log_handlers.ts +++ b/yarn-project/archiver/src/archiver/eth_log_handlers.ts @@ -1,7 +1,3 @@ -import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { EthAddress } from '@aztec/foundation/eth-address'; -import { Fr, Point } from '@aztec/foundation/fields'; -import { ContractDeploymentEmitterAbi, InboxAbi, RollupAbi } from '@aztec/l1-artifacts'; import { BufferReader, CancelledL1ToL2Message, @@ -13,7 +9,11 @@ import { L2Actor, L2Block, PendingL1ToL2Message, -} from '@aztec/types'; +} from '@aztec/circuit-types'; +import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { EthAddress } from '@aztec/foundation/eth-address'; +import { Fr, Point } from '@aztec/foundation/fields'; +import { ContractDeploymentEmitterAbi, InboxAbi, RollupAbi } from '@aztec/l1-artifacts'; import { Hex, Log, PublicClient, decodeFunctionData, getAbiItem, getAddress, hexToBytes } from 'viem'; diff --git a/yarn-project/archiver/src/archiver/lmdb_archiver_store.ts b/yarn-project/archiver/src/archiver/lmdb_archiver_store.ts index e57b34b31f3..923a7be5f69 100644 --- a/yarn-project/archiver/src/archiver/lmdb_archiver_store.ts +++ b/yarn-project/archiver/src/archiver/lmdb_archiver_store.ts @@ -1,7 +1,3 @@ -import { Fr } from '@aztec/circuits.js'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { toBigIntBE, toBufferBE } from '@aztec/foundation/bigint-buffer'; -import { createDebugLogger } from '@aztec/foundation/log'; import { CancelledL1ToL2Message, ContractData, @@ -19,7 +15,11 @@ import { PendingL1ToL2Message, TxHash, UnencryptedL2Log, -} from '@aztec/types'; +} from '@aztec/circuit-types'; +import { Fr } from '@aztec/circuits.js'; +import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { toBigIntBE, toBufferBE } from '@aztec/foundation/bigint-buffer'; +import { createDebugLogger } from '@aztec/foundation/log'; import { Database, RangeOptions, RootDatabase } from 'lmdb'; diff --git a/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.test.ts b/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.test.ts index 6058cbedddc..1c910e2d6b5 100644 --- a/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.test.ts +++ b/yarn-project/archiver/src/archiver/memory_archiver_store/l1_to_l2_message_store.test.ts @@ -1,5 +1,5 @@ +import { L1Actor, L1ToL2Message, L2Actor } from '@aztec/circuit-types'; import { Fr } from '@aztec/foundation/fields'; -import { L1Actor, L1ToL2Message, L2Actor } from '@aztec/types'; import { L1ToL2MessageStore, PendingL1ToL2MessageStore } from './l1_to_l2_message_store.js'; 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 fdc4bff61b6..e5a7ced4bfc 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,5 +1,5 @@ +import { L1ToL2Message } from '@aztec/circuit-types'; import { Fr } from '@aztec/foundation/fields'; -import { L1ToL2Message } from '@aztec/types'; /** * 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 1fe8fc43171..be9318df094 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,4 +1,4 @@ -import { L2Block } from '@aztec/types'; +import { L2Block } from '@aztec/circuit-types'; import { ArchiverDataStore } from '../archiver_store.js'; import { describeArchiverDataStore } from '../archiver_store_test_suite.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 3b032c19036..1c2c2fd5369 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,5 +1,3 @@ -import { Fr, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP } from '@aztec/circuits.js'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; import { CancelledL1ToL2Message, ContractData, @@ -18,7 +16,9 @@ import { PendingL1ToL2Message, TxHash, UnencryptedL2Log, -} from '@aztec/types'; +} from '@aztec/circuit-types'; +import { Fr, NUMBER_OF_L1_L2_MESSAGES_PER_ROLLUP } from '@aztec/circuits.js'; +import { AztecAddress } from '@aztec/foundation/aztec-address'; import { ArchiverDataStore } from '../archiver_store.js'; import { L1ToL2MessageStore, PendingL1ToL2MessageStore } from './l1_to_l2_message_store.js'; diff --git a/yarn-project/archiver/tsconfig.json b/yarn-project/archiver/tsconfig.json index 589a853cd3b..902e0c05490 100644 --- a/yarn-project/archiver/tsconfig.json +++ b/yarn-project/archiver/tsconfig.json @@ -6,6 +6,9 @@ "tsBuildInfoFile": ".tsbuildinfo" }, "references": [ + { + "path": "../circuit-types" + }, { "path": "../circuits.js" }, @@ -17,9 +20,6 @@ }, { "path": "../l1-artifacts" - }, - { - "path": "../types" } ], "include": ["src"] diff --git a/yarn-project/aztec-node/package.json b/yarn-project/aztec-node/package.json index 6dd220c05b7..8329e78d9ae 100644 --- a/yarn-project/aztec-node/package.json +++ b/yarn-project/aztec-node/package.json @@ -34,6 +34,7 @@ }, "dependencies": { "@aztec/archiver": "workspace:^", + "@aztec/circuit-types": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/ethereum": "workspace:^", "@aztec/foundation": "workspace:^", @@ -42,7 +43,6 @@ "@aztec/merkle-tree": "workspace:^", "@aztec/p2p": "workspace:^", "@aztec/sequencer-client": "workspace:^", - "@aztec/types": "workspace:^", "@aztec/world-state": "workspace:^", "koa": "^2.14.2", "koa-router": "^12.0.0", 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 09d316e8670..4c037f13ab4 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,8 +1,3 @@ -import { BlockHeader, FunctionSelector } from '@aztec/circuits.js'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { EthAddress } from '@aztec/foundation/eth-address'; -import { Fr } from '@aztec/foundation/fields'; -import { JsonRpcServer } from '@aztec/foundation/json-rpc/server'; import { AztecNode, ContractData, @@ -16,7 +11,12 @@ import { SiblingPath, Tx, TxHash, -} from '@aztec/types'; +} from '@aztec/circuit-types'; +import { BlockHeader, FunctionSelector } from '@aztec/circuits.js'; +import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { EthAddress } from '@aztec/foundation/eth-address'; +import { Fr } from '@aztec/foundation/fields'; +import { JsonRpcServer } from '@aztec/foundation/json-rpc/server'; /** * Wrap an AztecNode instance with a JSON RPC HTTP server. diff --git a/yarn-project/aztec-node/src/aztec-node/server.ts b/yarn-project/aztec-node/src/aztec-node/server.ts index 8abcbc0edee..12c11b9069f 100644 --- a/yarn-project/aztec-node/src/aztec-node/server.ts +++ b/yarn-project/aztec-node/src/aztec-node/server.ts @@ -1,4 +1,28 @@ import { Archiver, LMDBArchiverStore } from '@aztec/archiver'; +import { + AztecNode, + ContractData, + ContractDataSource, + ExtendedContractData, + GetUnencryptedLogsResponse, + INITIAL_L2_BLOCK_NUM, + L1ToL2MessageAndIndex, + L1ToL2MessageSource, + L2Block, + L2BlockL2Logs, + L2BlockSource, + L2LogsSource, + L2Tx, + LogFilter, + LogType, + MerkleTreeId, + NullifierMembershipWitness, + PublicDataWitness, + SequencerConfig, + SiblingPath, + Tx, + TxHash, +} from '@aztec/circuit-types'; import { ARCHIVE_HEIGHT, BlockHeader, @@ -24,30 +48,6 @@ import { SequencerClient, getGlobalVariableBuilder, } from '@aztec/sequencer-client'; -import { - AztecNode, - ContractData, - ContractDataSource, - ExtendedContractData, - GetUnencryptedLogsResponse, - INITIAL_L2_BLOCK_NUM, - L1ToL2MessageAndIndex, - L1ToL2MessageSource, - L2Block, - L2BlockL2Logs, - L2BlockSource, - L2LogsSource, - L2Tx, - LogFilter, - LogType, - MerkleTreeId, - NullifierMembershipWitness, - PublicDataWitness, - SequencerConfig, - SiblingPath, - Tx, - TxHash, -} from '@aztec/types'; import { MerkleTrees, ServerWorldStateSynchronizer, diff --git a/yarn-project/aztec-node/tsconfig.json b/yarn-project/aztec-node/tsconfig.json index 54b15a4bc8a..976b170d458 100644 --- a/yarn-project/aztec-node/tsconfig.json +++ b/yarn-project/aztec-node/tsconfig.json @@ -9,6 +9,9 @@ { "path": "../archiver" }, + { + "path": "../circuit-types" + }, { "path": "../circuits.js" }, @@ -33,9 +36,6 @@ { "path": "../sequencer-client" }, - { - "path": "../types" - }, { "path": "../world-state" } diff --git a/yarn-project/aztec-sandbox/package.json b/yarn-project/aztec-sandbox/package.json index 99c393a40ba..30d0f41da34 100644 --- a/yarn-project/aztec-sandbox/package.json +++ b/yarn-project/aztec-sandbox/package.json @@ -30,6 +30,7 @@ "@aztec/accounts": "workspace:^", "@aztec/aztec-node": "workspace:^", "@aztec/aztec.js": "workspace:^", + "@aztec/circuit-types": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/ethereum": "workspace:^", "@aztec/foundation": "workspace:^", @@ -38,7 +39,6 @@ "@aztec/noir-contracts": "workspace:^", "@aztec/p2p": "workspace:^", "@aztec/pxe": "workspace:^", - "@aztec/types": "workspace:^", "abitype": "^0.8.11", "koa": "^2.14.2", "koa-router": "^12.0.0", diff --git a/yarn-project/aztec-sandbox/src/examples/token.ts b/yarn-project/aztec-sandbox/src/examples/token.ts index 96ab05f435c..f5f62c73e56 100644 --- a/yarn-project/aztec-sandbox/src/examples/token.ts +++ b/yarn-project/aztec-sandbox/src/examples/token.ts @@ -1,8 +1,8 @@ import { getSingleKeyAccount } from '@aztec/accounts/single_key'; import { 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/Token'; -import { ExtendedNote } from '@aztec/types'; const logger = createDebugLogger('aztec:http-rpc-client'); diff --git a/yarn-project/aztec-sandbox/src/sandbox.ts b/yarn-project/aztec-sandbox/src/sandbox.ts index d10248a6947..a268904da11 100644 --- a/yarn-project/aztec-sandbox/src/sandbox.ts +++ b/yarn-project/aztec-sandbox/src/sandbox.ts @@ -1,5 +1,6 @@ #!/usr/bin/env -S node --no-warnings import { AztecNodeConfig, AztecNodeService, getConfigEnvVars } from '@aztec/aztec-node'; +import { AztecNode } from '@aztec/circuit-types'; import { DeployL1Contracts, L1ContractArtifactsForDeployment, @@ -22,7 +23,6 @@ import { RollupBytecode, } from '@aztec/l1-artifacts'; import { PXEServiceConfig, createPXEService, getPXEServiceConfig } from '@aztec/pxe'; -import { AztecNode } from '@aztec/types'; import { HDAccount, createPublicClient, http as httpViemTransport } from 'viem'; import { mnemonicToAccount } from 'viem/accounts'; diff --git a/yarn-project/aztec-sandbox/tsconfig.json b/yarn-project/aztec-sandbox/tsconfig.json index bdceec5cca5..7b9c2ea9188 100644 --- a/yarn-project/aztec-sandbox/tsconfig.json +++ b/yarn-project/aztec-sandbox/tsconfig.json @@ -15,6 +15,9 @@ { "path": "../aztec.js" }, + { + "path": "../circuit-types" + }, { "path": "../circuits.js" }, @@ -38,9 +41,6 @@ }, { "path": "../pxe" - }, - { - "path": "../types" } ], "include": ["src"] diff --git a/yarn-project/aztec.js/package.json b/yarn-project/aztec.js/package.json index 9939d5ccc3d..6448985e33f 100644 --- a/yarn-project/aztec.js/package.json +++ b/yarn-project/aztec.js/package.json @@ -48,10 +48,10 @@ "rootDir": "./src" }, "dependencies": { + "@aztec/circuit-types": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/ethereum": "workspace:^", "@aztec/foundation": "workspace:^", - "@aztec/types": "workspace:^", "tslib": "^2.4.0" }, "devDependencies": { diff --git a/yarn-project/aztec.js/src/account/contract.ts b/yarn-project/aztec.js/src/account/contract.ts index 1cb9e3c9cd5..59c295d5998 100644 --- a/yarn-project/aztec.js/src/account/contract.ts +++ b/yarn-project/aztec.js/src/account/contract.ts @@ -1,5 +1,5 @@ +import { CompleteAddress, NodeInfo } from '@aztec/circuit-types'; import { ContractArtifact } from '@aztec/foundation/abi'; -import { CompleteAddress, NodeInfo } from '@aztec/types'; import { AccountInterface } from './interface.js'; diff --git a/yarn-project/aztec.js/src/account/interface.ts b/yarn-project/aztec.js/src/account/interface.ts index c9926ff1053..a2eadd90489 100644 --- a/yarn-project/aztec.js/src/account/interface.ts +++ b/yarn-project/aztec.js/src/account/interface.ts @@ -1,5 +1,5 @@ +import { AuthWitness, CompleteAddress, FunctionCall, TxExecutionRequest } from '@aztec/circuit-types'; import { Fr } from '@aztec/foundation/fields'; -import { AuthWitness, CompleteAddress, FunctionCall, TxExecutionRequest } from '@aztec/types'; // 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 511a861a17a..a5b7bf963cb 100644 --- a/yarn-project/aztec.js/src/account/wallet.ts +++ b/yarn-project/aztec.js/src/account/wallet.ts @@ -1,4 +1,4 @@ -import { PXE } from '@aztec/types'; +import { PXE } from '@aztec/circuit-types'; import { AccountInterface } from './interface.js'; 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 5017320d21e..b93ea97e515 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,5 +1,5 @@ +import { TxHash, TxReceipt } from '@aztec/circuit-types'; import { FieldsOf } from '@aztec/circuits.js'; -import { TxHash, TxReceipt } from '@aztec/types'; import { Wallet } from '../account/index.js'; import { DefaultWaitOpts, SentTx, WaitOpts } from '../contract/index.js'; diff --git a/yarn-project/aztec.js/src/account_manager/index.ts b/yarn-project/aztec.js/src/account_manager/index.ts index c95ef8034fa..69d819a31c0 100644 --- a/yarn-project/aztec.js/src/account_manager/index.ts +++ b/yarn-project/aztec.js/src/account_manager/index.ts @@ -1,6 +1,6 @@ +import { CompleteAddress, GrumpkinPrivateKey, PXE } from '@aztec/circuit-types'; import { EthAddress, PublicKey, getContractDeploymentInfo } from '@aztec/circuits.js'; import { Fr } from '@aztec/foundation/fields'; -import { CompleteAddress, GrumpkinPrivateKey, PXE } from '@aztec/types'; import { AccountContract } from '../account/contract.js'; import { Salt } from '../account/index.js'; diff --git a/yarn-project/aztec.js/src/api/account.ts b/yarn-project/aztec.js/src/api/account.ts index 6192287792d..bb3fece73da 100644 --- a/yarn-project/aztec.js/src/api/account.ts +++ b/yarn-project/aztec.js/src/api/account.ts @@ -9,4 +9,4 @@ export { export { AccountManager } from '../account_manager/index.js'; -export { CompleteAddress } from '@aztec/types'; +export { CompleteAddress } from '@aztec/circuit-types'; diff --git a/yarn-project/aztec.js/src/api/interfaces/pxe.ts b/yarn-project/aztec.js/src/api/interfaces/pxe.ts index 3dc49f26d71..fb7e594fcd1 100644 --- a/yarn-project/aztec.js/src/api/interfaces/pxe.ts +++ b/yarn-project/aztec.js/src/api/interfaces/pxe.ts @@ -1 +1 @@ -export { PXE } from '@aztec/types/interfaces'; +export { PXE } from '@aztec/circuit-types/interfaces'; diff --git a/yarn-project/aztec.js/src/api/log_id.ts b/yarn-project/aztec.js/src/api/log_id.ts index 6439b39f7d9..87ee1ac71b1 100644 --- a/yarn-project/aztec.js/src/api/log_id.ts +++ b/yarn-project/aztec.js/src/api/log_id.ts @@ -1 +1 @@ -export { LogId } from '@aztec/types/log_id'; +export { LogId } from '@aztec/circuit-types/log_id'; diff --git a/yarn-project/aztec.js/src/api/tx_hash.ts b/yarn-project/aztec.js/src/api/tx_hash.ts index 35ef7f0b387..1184568a34e 100644 --- a/yarn-project/aztec.js/src/api/tx_hash.ts +++ b/yarn-project/aztec.js/src/api/tx_hash.ts @@ -1 +1 @@ -export { TxHash } from '@aztec/types/tx_hash'; +export { TxHash } from '@aztec/circuit-types/tx_hash'; 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 800ae901c8d..b0ace57c322 100644 --- a/yarn-project/aztec.js/src/contract/base_contract_interaction.ts +++ b/yarn-project/aztec.js/src/contract/base_contract_interaction.ts @@ -1,4 +1,4 @@ -import { PXE, Tx, TxExecutionRequest } from '@aztec/types'; +import { PXE, Tx, TxExecutionRequest } from '@aztec/circuit-types'; 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 68b5536644a..52c3e869de7 100644 --- a/yarn-project/aztec.js/src/contract/batch_call.ts +++ b/yarn-project/aztec.js/src/contract/batch_call.ts @@ -1,4 +1,4 @@ -import { FunctionCall, TxExecutionRequest } from '@aztec/types'; +import { FunctionCall, TxExecutionRequest } from '@aztec/circuit-types'; import { Wallet } from '../account/index.js'; import { BaseContractInteraction } from './base_contract_interaction.js'; diff --git a/yarn-project/aztec.js/src/contract/contract.test.ts b/yarn-project/aztec.js/src/contract/contract.test.ts index 55b0242145a..ced851c4c07 100644 --- a/yarn-project/aztec.js/src/contract/contract.test.ts +++ b/yarn-project/aztec.js/src/contract/contract.test.ts @@ -1,7 +1,7 @@ +import { ExtendedContractData, NodeInfo, Tx, TxExecutionRequest, TxHash, TxReceipt } from '@aztec/circuit-types'; import { AztecAddress, CompleteAddress, EthAddress } from '@aztec/circuits.js'; import { L1ContractAddresses } from '@aztec/ethereum'; import { ABIParameterVisibility, ContractArtifact, FunctionType } from '@aztec/foundation/abi'; -import { ExtendedContractData, NodeInfo, Tx, TxExecutionRequest, TxHash, TxReceipt } from '@aztec/types'; import { MockProxy, mock } from 'jest-mock-extended'; diff --git a/yarn-project/aztec.js/src/contract/contract.ts b/yarn-project/aztec.js/src/contract/contract.ts index 5b90579e281..61b7001628c 100644 --- a/yarn-project/aztec.js/src/contract/contract.ts +++ b/yarn-project/aztec.js/src/contract/contract.ts @@ -1,7 +1,7 @@ +import { PublicKey } from '@aztec/circuit-types'; import { ContractArtifact } from '@aztec/foundation/abi'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Point } from '@aztec/foundation/fields'; -import { PublicKey } from '@aztec/types'; import { Wallet } from '../account/index.js'; import { ContractBase } from './contract_base.js'; diff --git a/yarn-project/aztec.js/src/contract/contract_base.ts b/yarn-project/aztec.js/src/contract/contract_base.ts index 82e312f264c..e64439e108d 100644 --- a/yarn-project/aztec.js/src/contract/contract_base.ts +++ b/yarn-project/aztec.js/src/contract/contract_base.ts @@ -1,6 +1,6 @@ +import { CompleteAddress, DeployedContract } from '@aztec/circuit-types'; import { ContractArtifact, FunctionArtifact, FunctionSelector } from '@aztec/foundation/abi'; import { EthAddress } from '@aztec/foundation/eth-address'; -import { CompleteAddress, DeployedContract } from '@aztec/types'; import { 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 84ac432f48a..891ffb08a62 100644 --- a/yarn-project/aztec.js/src/contract/contract_function_interaction.ts +++ b/yarn-project/aztec.js/src/contract/contract_function_interaction.ts @@ -1,6 +1,6 @@ +import { FunctionCall, TxExecutionRequest } from '@aztec/circuit-types'; import { AztecAddress, FunctionData } from '@aztec/circuits.js'; import { FunctionAbi, FunctionType, encodeArguments } from '@aztec/foundation/abi'; -import { FunctionCall, TxExecutionRequest } from '@aztec/types'; import { Wallet } from '../account/wallet.js'; import { BaseContractInteraction, SendMethodOptions } from './base_contract_interaction.js'; diff --git a/yarn-project/aztec.js/src/contract/deploy_method.ts b/yarn-project/aztec.js/src/contract/deploy_method.ts index cac819e4cf7..42081173876 100644 --- a/yarn-project/aztec.js/src/contract/deploy_method.ts +++ b/yarn-project/aztec.js/src/contract/deploy_method.ts @@ -1,3 +1,4 @@ +import { PXE, PackedArguments, PublicKey, Tx, TxExecutionRequest } from '@aztec/circuit-types'; import { AztecAddress, CompleteAddress, @@ -9,7 +10,6 @@ import { import { ContractArtifact, FunctionArtifact, encodeArguments } from '@aztec/foundation/abi'; import { EthAddress } from '@aztec/foundation/eth-address'; import { Fr } from '@aztec/foundation/fields'; -import { PXE, PackedArguments, PublicKey, Tx, TxExecutionRequest } from '@aztec/types'; import { Wallet } from '../account/index.js'; import { BaseContractInteraction, SendMethodOptions } from './base_contract_interaction.js'; diff --git a/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts b/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts index a884a1e1302..3bd2f39486a 100644 --- a/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts +++ b/yarn-project/aztec.js/src/contract/deploy_sent_tx.ts @@ -1,5 +1,5 @@ +import { PXE, TxHash, TxReceipt } from '@aztec/circuit-types'; import { AztecAddress, CompleteAddress, FieldsOf } from '@aztec/circuits.js'; -import { PXE, TxHash, TxReceipt } from '@aztec/types'; import { Wallet } from '../account/index.js'; import { type Contract } from './contract.js'; 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 29cf7ef450f..ff8c98fdc42 100644 --- a/yarn-project/aztec.js/src/contract/sent_tx.test.ts +++ b/yarn-project/aztec.js/src/contract/sent_tx.test.ts @@ -1,4 +1,4 @@ -import { PXE, TxHash, TxReceipt, TxStatus } from '@aztec/types'; +import { PXE, TxHash, TxReceipt, TxStatus } from '@aztec/circuit-types'; import { MockProxy, mock } from 'jest-mock-extended'; diff --git a/yarn-project/aztec.js/src/contract/sent_tx.ts b/yarn-project/aztec.js/src/contract/sent_tx.ts index 851133e689b..9fcef7854c4 100644 --- a/yarn-project/aztec.js/src/contract/sent_tx.ts +++ b/yarn-project/aztec.js/src/contract/sent_tx.ts @@ -1,6 +1,6 @@ +import { ExtendedNote, GetUnencryptedLogsResponse, PXE, TxHash, TxReceipt, TxStatus } from '@aztec/circuit-types'; import { FieldsOf } from '@aztec/circuits.js'; import { retryUntil } from '@aztec/foundation/retry'; -import { ExtendedNote, GetUnencryptedLogsResponse, PXE, TxHash, TxReceipt, TxStatus } from '@aztec/types'; /** Options related to waiting for a tx. */ export type WaitOpts = { diff --git a/yarn-project/aztec.js/src/contract_deployer/contract_deployer.test.ts b/yarn-project/aztec.js/src/contract_deployer/contract_deployer.test.ts index 8622f29e6f7..8316f8f0a71 100644 --- a/yarn-project/aztec.js/src/contract_deployer/contract_deployer.test.ts +++ b/yarn-project/aztec.js/src/contract_deployer/contract_deployer.test.ts @@ -1,6 +1,6 @@ +import { PXE, PublicKey, Tx, TxHash, TxReceipt } from '@aztec/circuit-types'; import { EthAddress, Fr, Point } from '@aztec/circuits.js'; import { ContractArtifact, FunctionType } from '@aztec/foundation/abi'; -import { PXE, PublicKey, Tx, TxHash, TxReceipt } from '@aztec/types'; import { MockProxy, mock } from 'jest-mock-extended'; diff --git a/yarn-project/aztec.js/src/contract_deployer/contract_deployer.ts b/yarn-project/aztec.js/src/contract_deployer/contract_deployer.ts index 1cdc6a7b89f..8c6aaf2a0a3 100644 --- a/yarn-project/aztec.js/src/contract_deployer/contract_deployer.ts +++ b/yarn-project/aztec.js/src/contract_deployer/contract_deployer.ts @@ -1,7 +1,7 @@ +import { PXE, PublicKey } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/circuits.js'; import { ContractArtifact } from '@aztec/foundation/abi'; import { Point } from '@aztec/foundation/fields'; -import { PXE, PublicKey } from '@aztec/types'; import { Wallet } from '../account/wallet.js'; import { DeployMethod } from '../contract/deploy_method.js'; diff --git a/yarn-project/aztec.js/src/index.ts b/yarn-project/aztec.js/src/index.ts index f53e9715644..721b08bf15f 100644 --- a/yarn-project/aztec.js/src/index.ts +++ b/yarn-project/aztec.js/src/index.ts @@ -108,7 +108,7 @@ export { emptyFunctionCall, merkleTreeIds, mockTx, -} from '@aztec/types'; +} from '@aztec/circuit-types'; // TODO: These kinds of things have no place on our public api. // External devs will almost certainly have their own methods of doing these things. diff --git a/yarn-project/aztec.js/src/pxe_client.ts b/yarn-project/aztec.js/src/pxe_client.ts index 5e7cd3a3822..86ab174e769 100644 --- a/yarn-project/aztec.js/src/pxe_client.ts +++ b/yarn-project/aztec.js/src/pxe_client.ts @@ -1,13 +1,3 @@ -import { - AztecAddress, - CompleteAddress, - EthAddress, - Fr, - FunctionSelector, - GrumpkinScalar, - Point, -} from '@aztec/circuits.js'; -import { createJsonRpcClient, makeFetch } from '@aztec/foundation/json-rpc/client'; import { AuthWitness, ContractData, @@ -24,7 +14,17 @@ import { TxExecutionRequest, TxHash, TxReceipt, -} from '@aztec/types'; +} from '@aztec/circuit-types'; +import { + AztecAddress, + CompleteAddress, + EthAddress, + Fr, + FunctionSelector, + GrumpkinScalar, + Point, +} from '@aztec/circuits.js'; +import { createJsonRpcClient, makeFetch } from '@aztec/foundation/json-rpc/client'; export { makeFetch } from '@aztec/foundation/json-rpc/client'; diff --git a/yarn-project/aztec.js/src/utils/account.ts b/yarn-project/aztec.js/src/utils/account.ts index 56fe5b1d46f..35c437cc5ac 100644 --- a/yarn-project/aztec.js/src/utils/account.ts +++ b/yarn-project/aztec.js/src/utils/account.ts @@ -1,5 +1,5 @@ +import { CompleteAddress, PXE } from '@aztec/circuit-types'; import { retryUntil } from '@aztec/foundation/retry'; -import { CompleteAddress, PXE } from '@aztec/types'; import { DefaultWaitOpts, WaitOpts } from '../contract/index.js'; diff --git a/yarn-project/aztec.js/src/utils/authwit.ts b/yarn-project/aztec.js/src/utils/authwit.ts index 2d4aec8e3a7..f449a429b2b 100644 --- a/yarn-project/aztec.js/src/utils/authwit.ts +++ b/yarn-project/aztec.js/src/utils/authwit.ts @@ -1,6 +1,6 @@ +import { FunctionCall, PackedArguments } from '@aztec/circuit-types'; import { AztecAddress, GeneratorIndex } from '@aztec/circuits.js'; import { pedersenHash } from '@aztec/foundation/crypto'; -import { FunctionCall, PackedArguments } from '@aztec/types'; // 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 e8ea11bda59..fa4f7f6a453 100644 --- a/yarn-project/aztec.js/src/utils/cheat_codes.ts +++ b/yarn-project/aztec.js/src/utils/cheat_codes.ts @@ -1,8 +1,8 @@ +import { Note, PXE } from '@aztec/circuit-types'; import { AztecAddress, EthAddress, Fr } from '@aztec/circuits.js'; import { toBigIntBE, toHex } from '@aztec/foundation/bigint-buffer'; import { keccak, pedersenHash } from '@aztec/foundation/crypto'; import { createDebugLogger } from '@aztec/foundation/log'; -import { Note, PXE } from '@aztec/types'; import fs from 'fs'; diff --git a/yarn-project/aztec.js/src/utils/l2_contracts.ts b/yarn-project/aztec.js/src/utils/l2_contracts.ts index 67fcdb2851b..f734f26b364 100644 --- a/yarn-project/aztec.js/src/utils/l2_contracts.ts +++ b/yarn-project/aztec.js/src/utils/l2_contracts.ts @@ -1,5 +1,5 @@ +import { PXE } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { PXE } from '@aztec/types'; /** * Checks whether a give contract is deployed on the network. diff --git a/yarn-project/aztec.js/src/utils/pxe.ts b/yarn-project/aztec.js/src/utils/pxe.ts index 2f86e0d465a..cd2b257d1a4 100644 --- a/yarn-project/aztec.js/src/utils/pxe.ts +++ b/yarn-project/aztec.js/src/utils/pxe.ts @@ -1,6 +1,6 @@ +import { PXE } from '@aztec/circuit-types'; import { DebugLogger } from '@aztec/foundation/log'; import { retryUntil } from '@aztec/foundation/retry'; -import { PXE } from '@aztec/types'; export const waitForPXE = async (pxe: PXE, logger?: DebugLogger) => { await retryUntil(async () => { diff --git a/yarn-project/aztec.js/src/wallet/account_wallet.ts b/yarn-project/aztec.js/src/wallet/account_wallet.ts index e9906dd0fdf..c9c1a983489 100644 --- a/yarn-project/aztec.js/src/wallet/account_wallet.ts +++ b/yarn-project/aztec.js/src/wallet/account_wallet.ts @@ -1,6 +1,6 @@ +import { AuthWitness, FunctionCall, PXE, TxExecutionRequest } from '@aztec/circuit-types'; import { Fr } from '@aztec/circuits.js'; import { ABIParameterVisibility, FunctionAbi, FunctionType } from '@aztec/foundation/abi'; -import { AuthWitness, FunctionCall, PXE, TxExecutionRequest } from '@aztec/types'; import { AccountInterface } from '../account/interface.js'; import { ContractFunctionInteraction } from '../contract/contract_function_interaction.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 2b148478425..71f17ba891a 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,5 +1,5 @@ +import { PXE } from '@aztec/circuit-types'; import { GrumpkinPrivateKey } from '@aztec/circuits.js'; -import { PXE } from '@aztec/types'; import { 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 04a8c80920c..eec9239e8f0 100644 --- a/yarn-project/aztec.js/src/wallet/base_wallet.ts +++ b/yarn-project/aztec.js/src/wallet/base_wallet.ts @@ -1,4 +1,3 @@ -import { AztecAddress, CompleteAddress, Fr, GrumpkinPrivateKey, PartialAddress } from '@aztec/circuits.js'; import { AuthWitness, ContractData, @@ -18,7 +17,8 @@ import { TxExecutionRequest, TxHash, TxReceipt, -} from '@aztec/types'; +} from '@aztec/circuit-types'; +import { AztecAddress, CompleteAddress, Fr, GrumpkinPrivateKey, PartialAddress } from '@aztec/circuits.js'; import { Wallet } from '../account/wallet.js'; diff --git a/yarn-project/aztec.js/src/wallet/create_recipient.ts b/yarn-project/aztec.js/src/wallet/create_recipient.ts index 2d87185997b..94e7917aece 100644 --- a/yarn-project/aztec.js/src/wallet/create_recipient.ts +++ b/yarn-project/aztec.js/src/wallet/create_recipient.ts @@ -1,5 +1,5 @@ +import { PXE } from '@aztec/circuit-types'; import { CompleteAddress } from '@aztec/circuits.js'; -import { PXE } from '@aztec/types'; /** * Creates a random address and registers it as a recipient on the pxe server. Useful for testing. diff --git a/yarn-project/aztec.js/src/wallet/index.ts b/yarn-project/aztec.js/src/wallet/index.ts index dc4b55a20b1..18fcfe3514c 100644 --- a/yarn-project/aztec.js/src/wallet/index.ts +++ b/yarn-project/aztec.js/src/wallet/index.ts @@ -1,5 +1,5 @@ +import { PXE } from '@aztec/circuit-types'; import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { PXE } from '@aztec/types'; import { AccountContract } from '../account/contract.js'; import { AccountWallet } 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 05619535628..92a9643eb65 100644 --- a/yarn-project/aztec.js/src/wallet/signerless_wallet.ts +++ b/yarn-project/aztec.js/src/wallet/signerless_wallet.ts @@ -1,5 +1,5 @@ +import { AuthWitness, FunctionCall, PackedArguments, TxExecutionRequest } from '@aztec/circuit-types'; import { CompleteAddress, Fr, TxContext } from '@aztec/circuits.js'; -import { AuthWitness, FunctionCall, PackedArguments, TxExecutionRequest } from '@aztec/types'; import { BaseWallet } from './base_wallet.js'; diff --git a/yarn-project/aztec.js/tsconfig.dest.json b/yarn-project/aztec.js/tsconfig.dest.json index 34485a9f9f6..cc347e5c4c7 100644 --- a/yarn-project/aztec.js/tsconfig.dest.json +++ b/yarn-project/aztec.js/tsconfig.dest.json @@ -8,7 +8,7 @@ "path": "../foundation/tsconfig.dest.json" }, { - "path": "../types/tsconfig.dest.json" + "path": "../circuit-types/tsconfig.dest.json" } ], "exclude": ["src/**/*.test.ts"] diff --git a/yarn-project/aztec.js/tsconfig.json b/yarn-project/aztec.js/tsconfig.json index 7d0bb1110ba..bf1c63c497f 100644 --- a/yarn-project/aztec.js/tsconfig.json +++ b/yarn-project/aztec.js/tsconfig.json @@ -6,6 +6,9 @@ "tsBuildInfoFile": ".tsbuildinfo" }, "references": [ + { + "path": "../circuit-types" + }, { "path": "../circuits.js" }, @@ -14,9 +17,6 @@ }, { "path": "../foundation" - }, - { - "path": "../types" } ], "include": ["src", "src/**/*.json"] diff --git a/yarn-project/types/.eslintrc.cjs b/yarn-project/circuit-types/.eslintrc.cjs similarity index 100% rename from yarn-project/types/.eslintrc.cjs rename to yarn-project/circuit-types/.eslintrc.cjs diff --git a/yarn-project/types/README.md b/yarn-project/circuit-types/README.md similarity index 100% rename from yarn-project/types/README.md rename to yarn-project/circuit-types/README.md diff --git a/yarn-project/types/package.json b/yarn-project/circuit-types/package.json similarity index 98% rename from yarn-project/types/package.json rename to yarn-project/circuit-types/package.json index 5c472ea84dc..2a6ff691c0a 100644 --- a/yarn-project/types/package.json +++ b/yarn-project/circuit-types/package.json @@ -1,5 +1,5 @@ { - "name": "@aztec/types", + "name": "@aztec/circuit-types", "version": "0.1.0", "type": "module", "exports": { diff --git a/yarn-project/types/src/auth_witness.ts b/yarn-project/circuit-types/src/auth_witness.ts similarity index 100% rename from yarn-project/types/src/auth_witness.ts rename to yarn-project/circuit-types/src/auth_witness.ts diff --git a/yarn-project/types/src/aztec_node/rpc/aztec_node_client.ts b/yarn-project/circuit-types/src/aztec_node/rpc/aztec_node_client.ts similarity index 100% rename from yarn-project/types/src/aztec_node/rpc/aztec_node_client.ts rename to yarn-project/circuit-types/src/aztec_node/rpc/aztec_node_client.ts diff --git a/yarn-project/types/src/aztec_node/rpc/index.ts b/yarn-project/circuit-types/src/aztec_node/rpc/index.ts similarity index 100% rename from yarn-project/types/src/aztec_node/rpc/index.ts rename to yarn-project/circuit-types/src/aztec_node/rpc/index.ts diff --git a/yarn-project/types/src/constants.ts b/yarn-project/circuit-types/src/constants.ts similarity index 100% rename from yarn-project/types/src/constants.ts rename to yarn-project/circuit-types/src/constants.ts diff --git a/yarn-project/types/src/contract_dao.test.ts b/yarn-project/circuit-types/src/contract_dao.test.ts similarity index 100% rename from yarn-project/types/src/contract_dao.test.ts rename to yarn-project/circuit-types/src/contract_dao.test.ts diff --git a/yarn-project/types/src/contract_dao.ts b/yarn-project/circuit-types/src/contract_dao.ts similarity index 100% rename from yarn-project/types/src/contract_dao.ts rename to yarn-project/circuit-types/src/contract_dao.ts diff --git a/yarn-project/types/src/contract_data.test.ts b/yarn-project/circuit-types/src/contract_data.test.ts similarity index 100% rename from yarn-project/types/src/contract_data.test.ts rename to yarn-project/circuit-types/src/contract_data.test.ts diff --git a/yarn-project/types/src/contract_data.ts b/yarn-project/circuit-types/src/contract_data.ts similarity index 100% rename from yarn-project/types/src/contract_data.ts rename to yarn-project/circuit-types/src/contract_data.ts diff --git a/yarn-project/types/src/contract_database.ts b/yarn-project/circuit-types/src/contract_database.ts similarity index 100% rename from yarn-project/types/src/contract_database.ts rename to yarn-project/circuit-types/src/contract_database.ts diff --git a/yarn-project/types/src/function_call.ts b/yarn-project/circuit-types/src/function_call.ts similarity index 100% rename from yarn-project/types/src/function_call.ts rename to yarn-project/circuit-types/src/function_call.ts diff --git a/yarn-project/types/src/index.ts b/yarn-project/circuit-types/src/index.ts similarity index 100% rename from yarn-project/types/src/index.ts rename to yarn-project/circuit-types/src/index.ts diff --git a/yarn-project/types/src/interfaces/aztec-node.ts b/yarn-project/circuit-types/src/interfaces/aztec-node.ts similarity index 100% rename from yarn-project/types/src/interfaces/aztec-node.ts rename to yarn-project/circuit-types/src/interfaces/aztec-node.ts diff --git a/yarn-project/types/src/interfaces/configs.ts b/yarn-project/circuit-types/src/interfaces/configs.ts similarity index 100% rename from yarn-project/types/src/interfaces/configs.ts rename to yarn-project/circuit-types/src/interfaces/configs.ts diff --git a/yarn-project/types/src/interfaces/deployed-contract.ts b/yarn-project/circuit-types/src/interfaces/deployed-contract.ts similarity index 100% rename from yarn-project/types/src/interfaces/deployed-contract.ts rename to yarn-project/circuit-types/src/interfaces/deployed-contract.ts diff --git a/yarn-project/types/src/interfaces/hasher.ts b/yarn-project/circuit-types/src/interfaces/hasher.ts similarity index 100% rename from yarn-project/types/src/interfaces/hasher.ts rename to yarn-project/circuit-types/src/interfaces/hasher.ts diff --git a/yarn-project/types/src/interfaces/index.ts b/yarn-project/circuit-types/src/interfaces/index.ts similarity index 100% rename from yarn-project/types/src/interfaces/index.ts rename to yarn-project/circuit-types/src/interfaces/index.ts diff --git a/yarn-project/types/src/interfaces/node-info.ts b/yarn-project/circuit-types/src/interfaces/node-info.ts similarity index 100% rename from yarn-project/types/src/interfaces/node-info.ts rename to yarn-project/circuit-types/src/interfaces/node-info.ts diff --git a/yarn-project/types/src/interfaces/nullifier_tree.ts b/yarn-project/circuit-types/src/interfaces/nullifier_tree.ts similarity index 100% rename from yarn-project/types/src/interfaces/nullifier_tree.ts rename to yarn-project/circuit-types/src/interfaces/nullifier_tree.ts diff --git a/yarn-project/types/src/interfaces/public_data_tree.ts b/yarn-project/circuit-types/src/interfaces/public_data_tree.ts similarity index 100% rename from yarn-project/types/src/interfaces/public_data_tree.ts rename to yarn-project/circuit-types/src/interfaces/public_data_tree.ts diff --git a/yarn-project/types/src/interfaces/pxe.ts b/yarn-project/circuit-types/src/interfaces/pxe.ts similarity index 100% rename from yarn-project/types/src/interfaces/pxe.ts rename to yarn-project/circuit-types/src/interfaces/pxe.ts diff --git a/yarn-project/types/src/interfaces/state_info_provider.ts b/yarn-project/circuit-types/src/interfaces/state_info_provider.ts similarity index 100% rename from yarn-project/types/src/interfaces/state_info_provider.ts rename to yarn-project/circuit-types/src/interfaces/state_info_provider.ts diff --git a/yarn-project/types/src/interfaces/sync-status.ts b/yarn-project/circuit-types/src/interfaces/sync-status.ts similarity index 100% rename from yarn-project/types/src/interfaces/sync-status.ts rename to yarn-project/circuit-types/src/interfaces/sync-status.ts diff --git a/yarn-project/types/src/jest/eq_testers.ts b/yarn-project/circuit-types/src/jest/eq_testers.ts similarity index 100% rename from yarn-project/types/src/jest/eq_testers.ts rename to yarn-project/circuit-types/src/jest/eq_testers.ts diff --git a/yarn-project/types/src/jest/index.ts b/yarn-project/circuit-types/src/jest/index.ts similarity index 100% rename from yarn-project/types/src/jest/index.ts rename to yarn-project/circuit-types/src/jest/index.ts diff --git a/yarn-project/types/src/keys/index.ts b/yarn-project/circuit-types/src/keys/index.ts similarity index 100% rename from yarn-project/types/src/keys/index.ts rename to yarn-project/circuit-types/src/keys/index.ts diff --git a/yarn-project/types/src/keys/key_pair.ts b/yarn-project/circuit-types/src/keys/key_pair.ts similarity index 100% rename from yarn-project/types/src/keys/key_pair.ts rename to yarn-project/circuit-types/src/keys/key_pair.ts diff --git a/yarn-project/types/src/keys/key_store.ts b/yarn-project/circuit-types/src/keys/key_store.ts similarity index 100% rename from yarn-project/types/src/keys/key_store.ts rename to yarn-project/circuit-types/src/keys/key_store.ts diff --git a/yarn-project/types/src/l1_to_l2_message.test.ts b/yarn-project/circuit-types/src/l1_to_l2_message.test.ts similarity index 100% rename from yarn-project/types/src/l1_to_l2_message.test.ts rename to yarn-project/circuit-types/src/l1_to_l2_message.test.ts diff --git a/yarn-project/types/src/l1_to_l2_message.ts b/yarn-project/circuit-types/src/l1_to_l2_message.ts similarity index 100% rename from yarn-project/types/src/l1_to_l2_message.ts rename to yarn-project/circuit-types/src/l1_to_l2_message.ts diff --git a/yarn-project/types/src/l2_block.test.ts b/yarn-project/circuit-types/src/l2_block.test.ts similarity index 100% rename from yarn-project/types/src/l2_block.test.ts rename to yarn-project/circuit-types/src/l2_block.test.ts diff --git a/yarn-project/types/src/l2_block.ts b/yarn-project/circuit-types/src/l2_block.ts similarity index 100% rename from yarn-project/types/src/l2_block.ts rename to yarn-project/circuit-types/src/l2_block.ts diff --git a/yarn-project/types/src/l2_block_context.ts b/yarn-project/circuit-types/src/l2_block_context.ts similarity index 100% rename from yarn-project/types/src/l2_block_context.ts rename to yarn-project/circuit-types/src/l2_block_context.ts diff --git a/yarn-project/types/src/l2_block_downloader/index.ts b/yarn-project/circuit-types/src/l2_block_downloader/index.ts similarity index 100% rename from yarn-project/types/src/l2_block_downloader/index.ts rename to yarn-project/circuit-types/src/l2_block_downloader/index.ts diff --git a/yarn-project/types/src/l2_block_downloader/l2_block_downloader.ts b/yarn-project/circuit-types/src/l2_block_downloader/l2_block_downloader.ts similarity index 100% rename from yarn-project/types/src/l2_block_downloader/l2_block_downloader.ts rename to yarn-project/circuit-types/src/l2_block_downloader/l2_block_downloader.ts diff --git a/yarn-project/types/src/l2_block_source.ts b/yarn-project/circuit-types/src/l2_block_source.ts similarity index 100% rename from yarn-project/types/src/l2_block_source.ts rename to yarn-project/circuit-types/src/l2_block_source.ts diff --git a/yarn-project/types/src/l2_tx.test.ts b/yarn-project/circuit-types/src/l2_tx.test.ts similarity index 100% rename from yarn-project/types/src/l2_tx.test.ts rename to yarn-project/circuit-types/src/l2_tx.test.ts diff --git a/yarn-project/types/src/l2_tx.ts b/yarn-project/circuit-types/src/l2_tx.ts similarity index 100% rename from yarn-project/types/src/l2_tx.ts rename to yarn-project/circuit-types/src/l2_tx.ts diff --git a/yarn-project/types/src/logs/extended_unencrypted_l2_log.ts b/yarn-project/circuit-types/src/logs/extended_unencrypted_l2_log.ts similarity index 100% rename from yarn-project/types/src/logs/extended_unencrypted_l2_log.ts rename to yarn-project/circuit-types/src/logs/extended_unencrypted_l2_log.ts diff --git a/yarn-project/types/src/logs/function_l2_logs.test.ts b/yarn-project/circuit-types/src/logs/function_l2_logs.test.ts similarity index 100% rename from yarn-project/types/src/logs/function_l2_logs.test.ts rename to yarn-project/circuit-types/src/logs/function_l2_logs.test.ts diff --git a/yarn-project/types/src/logs/function_l2_logs.ts b/yarn-project/circuit-types/src/logs/function_l2_logs.ts similarity index 100% rename from yarn-project/types/src/logs/function_l2_logs.ts rename to yarn-project/circuit-types/src/logs/function_l2_logs.ts diff --git a/yarn-project/types/src/logs/get_unencrypted_logs_response.ts b/yarn-project/circuit-types/src/logs/get_unencrypted_logs_response.ts similarity index 100% rename from yarn-project/types/src/logs/get_unencrypted_logs_response.ts rename to yarn-project/circuit-types/src/logs/get_unencrypted_logs_response.ts diff --git a/yarn-project/types/src/logs/index.ts b/yarn-project/circuit-types/src/logs/index.ts similarity index 100% rename from yarn-project/types/src/logs/index.ts rename to yarn-project/circuit-types/src/logs/index.ts diff --git a/yarn-project/types/src/logs/l1_note_payload/browserify-cipher.d.ts b/yarn-project/circuit-types/src/logs/l1_note_payload/browserify-cipher.d.ts similarity index 100% rename from yarn-project/types/src/logs/l1_note_payload/browserify-cipher.d.ts rename to yarn-project/circuit-types/src/logs/l1_note_payload/browserify-cipher.d.ts diff --git a/yarn-project/types/src/logs/l1_note_payload/encrypt_buffer.test.ts b/yarn-project/circuit-types/src/logs/l1_note_payload/encrypt_buffer.test.ts similarity index 100% rename from yarn-project/types/src/logs/l1_note_payload/encrypt_buffer.test.ts rename to yarn-project/circuit-types/src/logs/l1_note_payload/encrypt_buffer.test.ts diff --git a/yarn-project/types/src/logs/l1_note_payload/encrypt_buffer.ts b/yarn-project/circuit-types/src/logs/l1_note_payload/encrypt_buffer.ts similarity index 100% rename from yarn-project/types/src/logs/l1_note_payload/encrypt_buffer.ts rename to yarn-project/circuit-types/src/logs/l1_note_payload/encrypt_buffer.ts diff --git a/yarn-project/types/src/logs/l1_note_payload/index.ts b/yarn-project/circuit-types/src/logs/l1_note_payload/index.ts similarity index 100% rename from yarn-project/types/src/logs/l1_note_payload/index.ts rename to yarn-project/circuit-types/src/logs/l1_note_payload/index.ts diff --git a/yarn-project/types/src/logs/l1_note_payload/l1_note_payload.test.ts b/yarn-project/circuit-types/src/logs/l1_note_payload/l1_note_payload.test.ts similarity index 100% rename from yarn-project/types/src/logs/l1_note_payload/l1_note_payload.test.ts rename to yarn-project/circuit-types/src/logs/l1_note_payload/l1_note_payload.test.ts diff --git a/yarn-project/types/src/logs/l1_note_payload/l1_note_payload.ts b/yarn-project/circuit-types/src/logs/l1_note_payload/l1_note_payload.ts similarity index 100% rename from yarn-project/types/src/logs/l1_note_payload/l1_note_payload.ts rename to yarn-project/circuit-types/src/logs/l1_note_payload/l1_note_payload.ts diff --git a/yarn-project/types/src/logs/l1_note_payload/note.test.ts b/yarn-project/circuit-types/src/logs/l1_note_payload/note.test.ts similarity index 100% rename from yarn-project/types/src/logs/l1_note_payload/note.test.ts rename to yarn-project/circuit-types/src/logs/l1_note_payload/note.test.ts diff --git a/yarn-project/types/src/logs/l1_note_payload/note.ts b/yarn-project/circuit-types/src/logs/l1_note_payload/note.ts similarity index 100% rename from yarn-project/types/src/logs/l1_note_payload/note.ts rename to yarn-project/circuit-types/src/logs/l1_note_payload/note.ts diff --git a/yarn-project/types/src/logs/l2_block_l2_logs.test.ts b/yarn-project/circuit-types/src/logs/l2_block_l2_logs.test.ts similarity index 100% rename from yarn-project/types/src/logs/l2_block_l2_logs.test.ts rename to yarn-project/circuit-types/src/logs/l2_block_l2_logs.test.ts diff --git a/yarn-project/types/src/logs/l2_block_l2_logs.ts b/yarn-project/circuit-types/src/logs/l2_block_l2_logs.ts similarity index 100% rename from yarn-project/types/src/logs/l2_block_l2_logs.ts rename to yarn-project/circuit-types/src/logs/l2_block_l2_logs.ts diff --git a/yarn-project/types/src/logs/l2_logs_source.ts b/yarn-project/circuit-types/src/logs/l2_logs_source.ts similarity index 100% rename from yarn-project/types/src/logs/l2_logs_source.ts rename to yarn-project/circuit-types/src/logs/l2_logs_source.ts diff --git a/yarn-project/types/src/logs/log_filter.ts b/yarn-project/circuit-types/src/logs/log_filter.ts similarity index 100% rename from yarn-project/types/src/logs/log_filter.ts rename to yarn-project/circuit-types/src/logs/log_filter.ts diff --git a/yarn-project/types/src/logs/log_id.test.ts b/yarn-project/circuit-types/src/logs/log_id.test.ts similarity index 100% rename from yarn-project/types/src/logs/log_id.test.ts rename to yarn-project/circuit-types/src/logs/log_id.test.ts diff --git a/yarn-project/types/src/logs/log_id.ts b/yarn-project/circuit-types/src/logs/log_id.ts similarity index 100% rename from yarn-project/types/src/logs/log_id.ts rename to yarn-project/circuit-types/src/logs/log_id.ts diff --git a/yarn-project/types/src/logs/log_type.ts b/yarn-project/circuit-types/src/logs/log_type.ts similarity index 100% rename from yarn-project/types/src/logs/log_type.ts rename to yarn-project/circuit-types/src/logs/log_type.ts diff --git a/yarn-project/types/src/logs/tx_l2_logs.test.ts b/yarn-project/circuit-types/src/logs/tx_l2_logs.test.ts similarity index 100% rename from yarn-project/types/src/logs/tx_l2_logs.test.ts rename to yarn-project/circuit-types/src/logs/tx_l2_logs.test.ts diff --git a/yarn-project/types/src/logs/tx_l2_logs.ts b/yarn-project/circuit-types/src/logs/tx_l2_logs.ts similarity index 100% rename from yarn-project/types/src/logs/tx_l2_logs.ts rename to yarn-project/circuit-types/src/logs/tx_l2_logs.ts diff --git a/yarn-project/types/src/logs/unencrypted_l2_log.test.ts b/yarn-project/circuit-types/src/logs/unencrypted_l2_log.test.ts similarity index 100% rename from yarn-project/types/src/logs/unencrypted_l2_log.test.ts rename to yarn-project/circuit-types/src/logs/unencrypted_l2_log.test.ts diff --git a/yarn-project/types/src/logs/unencrypted_l2_log.ts b/yarn-project/circuit-types/src/logs/unencrypted_l2_log.ts similarity index 100% rename from yarn-project/types/src/logs/unencrypted_l2_log.ts rename to yarn-project/circuit-types/src/logs/unencrypted_l2_log.ts diff --git a/yarn-project/types/src/merkle_tree_id.ts b/yarn-project/circuit-types/src/merkle_tree_id.ts similarity index 100% rename from yarn-project/types/src/merkle_tree_id.ts rename to yarn-project/circuit-types/src/merkle_tree_id.ts diff --git a/yarn-project/types/src/mocks.ts b/yarn-project/circuit-types/src/mocks.ts similarity index 100% rename from yarn-project/types/src/mocks.ts rename to yarn-project/circuit-types/src/mocks.ts diff --git a/yarn-project/types/src/notes/extended_note.test.ts b/yarn-project/circuit-types/src/notes/extended_note.test.ts similarity index 100% rename from yarn-project/types/src/notes/extended_note.test.ts rename to yarn-project/circuit-types/src/notes/extended_note.test.ts diff --git a/yarn-project/types/src/notes/extended_note.ts b/yarn-project/circuit-types/src/notes/extended_note.ts similarity index 100% rename from yarn-project/types/src/notes/extended_note.ts rename to yarn-project/circuit-types/src/notes/extended_note.ts diff --git a/yarn-project/types/src/notes/index.ts b/yarn-project/circuit-types/src/notes/index.ts similarity index 100% rename from yarn-project/types/src/notes/index.ts rename to yarn-project/circuit-types/src/notes/index.ts diff --git a/yarn-project/types/src/notes/note_filter.ts b/yarn-project/circuit-types/src/notes/note_filter.ts similarity index 100% rename from yarn-project/types/src/notes/note_filter.ts rename to yarn-project/circuit-types/src/notes/note_filter.ts diff --git a/yarn-project/types/src/packed_arguments.ts b/yarn-project/circuit-types/src/packed_arguments.ts similarity index 100% rename from yarn-project/types/src/packed_arguments.ts rename to yarn-project/circuit-types/src/packed_arguments.ts diff --git a/yarn-project/types/src/public_data_write.ts b/yarn-project/circuit-types/src/public_data_write.ts similarity index 100% rename from yarn-project/types/src/public_data_write.ts rename to yarn-project/circuit-types/src/public_data_write.ts diff --git a/yarn-project/types/src/sibling_path.ts b/yarn-project/circuit-types/src/sibling_path.ts similarity index 100% rename from yarn-project/types/src/sibling_path.ts rename to yarn-project/circuit-types/src/sibling_path.ts diff --git a/yarn-project/types/src/simulation_error.ts b/yarn-project/circuit-types/src/simulation_error.ts similarity index 100% rename from yarn-project/types/src/simulation_error.ts rename to yarn-project/circuit-types/src/simulation_error.ts diff --git a/yarn-project/types/src/stats/benchmarks.ts b/yarn-project/circuit-types/src/stats/benchmarks.ts similarity index 100% rename from yarn-project/types/src/stats/benchmarks.ts rename to yarn-project/circuit-types/src/stats/benchmarks.ts diff --git a/yarn-project/types/src/stats/index.ts b/yarn-project/circuit-types/src/stats/index.ts similarity index 100% rename from yarn-project/types/src/stats/index.ts rename to yarn-project/circuit-types/src/stats/index.ts diff --git a/yarn-project/types/src/stats/metrics.ts b/yarn-project/circuit-types/src/stats/metrics.ts similarity index 100% rename from yarn-project/types/src/stats/metrics.ts rename to yarn-project/circuit-types/src/stats/metrics.ts diff --git a/yarn-project/types/src/stats/stats.ts b/yarn-project/circuit-types/src/stats/stats.ts similarity index 100% rename from yarn-project/types/src/stats/stats.ts rename to yarn-project/circuit-types/src/stats/stats.ts diff --git a/yarn-project/types/src/tx/index.ts b/yarn-project/circuit-types/src/tx/index.ts similarity index 100% rename from yarn-project/types/src/tx/index.ts rename to yarn-project/circuit-types/src/tx/index.ts diff --git a/yarn-project/types/src/tx/tx.test.ts b/yarn-project/circuit-types/src/tx/tx.test.ts similarity index 100% rename from yarn-project/types/src/tx/tx.test.ts rename to yarn-project/circuit-types/src/tx/tx.test.ts diff --git a/yarn-project/types/src/tx/tx.ts b/yarn-project/circuit-types/src/tx/tx.ts similarity index 100% rename from yarn-project/types/src/tx/tx.ts rename to yarn-project/circuit-types/src/tx/tx.ts diff --git a/yarn-project/types/src/tx/tx_hash.ts b/yarn-project/circuit-types/src/tx/tx_hash.ts similarity index 100% rename from yarn-project/types/src/tx/tx_hash.ts rename to yarn-project/circuit-types/src/tx/tx_hash.ts diff --git a/yarn-project/types/src/tx/tx_receipt.ts b/yarn-project/circuit-types/src/tx/tx_receipt.ts similarity index 100% rename from yarn-project/types/src/tx/tx_receipt.ts rename to yarn-project/circuit-types/src/tx/tx_receipt.ts diff --git a/yarn-project/types/src/tx_execution_request.ts b/yarn-project/circuit-types/src/tx_execution_request.ts similarity index 100% rename from yarn-project/types/src/tx_execution_request.ts rename to yarn-project/circuit-types/src/tx_execution_request.ts diff --git a/yarn-project/types/tsconfig.dest.json b/yarn-project/circuit-types/tsconfig.dest.json similarity index 100% rename from yarn-project/types/tsconfig.dest.json rename to yarn-project/circuit-types/tsconfig.dest.json diff --git a/yarn-project/types/tsconfig.json b/yarn-project/circuit-types/tsconfig.json similarity index 100% rename from yarn-project/types/tsconfig.json rename to yarn-project/circuit-types/tsconfig.json diff --git a/yarn-project/cli/package.json b/yarn-project/cli/package.json index 3203f213d56..1da551f2376 100644 --- a/yarn-project/cli/package.json +++ b/yarn-project/cli/package.json @@ -36,12 +36,12 @@ "dependencies": { "@aztec/accounts": "workspace:^", "@aztec/aztec.js": "workspace:^", + "@aztec/circuit-types": "workspace:^", "@aztec/ethereum": "workspace:^", "@aztec/foundation": "workspace:^", "@aztec/l1-artifacts": "workspace:^", "@aztec/noir-compiler": "workspace:^", "@aztec/noir-contracts": "workspace:^", - "@aztec/types": "workspace:^", "@iarna/toml": "^2.2.5", "@libp2p/peer-id-factory": "^3.0.4", "commander": "^9.0.0", diff --git a/yarn-project/cli/src/client.test.ts b/yarn-project/cli/src/client.test.ts index 607e1660886..11823a90b25 100644 --- a/yarn-project/cli/src/client.test.ts +++ b/yarn-project/cli/src/client.test.ts @@ -1,4 +1,4 @@ -import { NodeInfo, PXE } from '@aztec/types'; +import { NodeInfo, PXE } from '@aztec/circuit-types'; import { MockProxy, mock } from 'jest-mock-extended'; diff --git a/yarn-project/cli/src/cmds/add_note.ts b/yarn-project/cli/src/cmds/add_note.ts index 33ad5a52f80..e547f76d3c9 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 { ExtendedNote, Note, TxHash } from '@aztec/types'; import { createCompatibleClient } from '../client.js'; import { parseFields } from '../parse_args.js'; diff --git a/yarn-project/cli/src/cmds/get_contract_data.ts b/yarn-project/cli/src/cmds/get_contract_data.ts index 16d13047972..432d4fa249e 100644 --- a/yarn-project/cli/src/cmds/get_contract_data.ts +++ b/yarn-project/cli/src/cmds/get_contract_data.ts @@ -1,6 +1,6 @@ import { AztecAddress } from '@aztec/aztec.js'; +import { ContractData } from '@aztec/circuit-types'; import { DebugLogger, LogFn } from '@aztec/foundation/log'; -import { ContractData } from '@aztec/types'; 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 e2b3aed2f16..df8b7a0c11a 100644 --- a/yarn-project/cli/src/cmds/register_recipient.ts +++ b/yarn-project/cli/src/cmds/register_recipient.ts @@ -1,6 +1,6 @@ import { AztecAddress, Fr, Point } from '@aztec/aztec.js'; +import { CompleteAddress } from '@aztec/circuit-types'; import { DebugLogger, LogFn } from '@aztec/foundation/log'; -import { CompleteAddress } from '@aztec/types'; import { createCompatibleClient } from '../client.js'; diff --git a/yarn-project/cli/src/cmds/unbox.ts b/yarn-project/cli/src/cmds/unbox.ts index e704574cf1d..0d70ea42a55 100644 --- a/yarn-project/cli/src/cmds/unbox.ts +++ b/yarn-project/cli/src/cmds/unbox.ts @@ -14,7 +14,7 @@ const resolutions: { [key: string]: string } = { '@aztec/circuits.js': 'portal:.aztec-packages/yarn-project/circuits.js', '@aztec/foundation': 'portal:.aztec-packages/yarn-project/foundation', '@aztec/bb.js': 'portal:.aztec-packages/barretenberg/ts', - '@aztec/types': 'portal:.aztec-packages/yarn-project/types', + '@aztec/circuit-types': 'portal:.aztec-packages/yarn-project/circuit-types', '@aztec/ethereum': 'portal:.aztec-packages/yarn-project/ethereum', }; diff --git a/yarn-project/cli/src/test/utils.test.ts b/yarn-project/cli/src/test/utils.test.ts index d0c9ff1b7ef..edbabea573b 100644 --- a/yarn-project/cli/src/test/utils.test.ts +++ b/yarn-project/cli/src/test/utils.test.ts @@ -1,5 +1,5 @@ import { AztecAddress, Fr } from '@aztec/aztec.js'; -import { CompleteAddress, PXE } from '@aztec/types'; +import { CompleteAddress, PXE } from '@aztec/circuit-types'; import { InvalidArgumentError } from 'commander'; import { MockProxy, mock } from 'jest-mock-extended'; diff --git a/yarn-project/cli/tsconfig.json b/yarn-project/cli/tsconfig.json index 325ed8c0edb..debdd0ba3c7 100644 --- a/yarn-project/cli/tsconfig.json +++ b/yarn-project/cli/tsconfig.json @@ -12,6 +12,9 @@ { "path": "../aztec.js" }, + { + "path": "../circuit-types" + }, { "path": "../ethereum" }, @@ -26,9 +29,6 @@ }, { "path": "../noir-contracts" - }, - { - "path": "../types" } ], "include": ["src"], diff --git a/yarn-project/deploy_npm.sh b/yarn-project/deploy_npm.sh index 119aa114edc..68b1812195a 100755 --- a/yarn-project/deploy_npm.sh +++ b/yarn-project/deploy_npm.sh @@ -81,7 +81,7 @@ function deploy_package() { # New packages here should be added after the last package that they depend on deploy_package foundation deploy_package circuits.js -deploy_package types +deploy_package circuit-types deploy_package aztec.js deploy_package accounts deploy_package l1-artifacts diff --git a/yarn-project/end-to-end/.eslintrc.cjs b/yarn-project/end-to-end/.eslintrc.cjs index 5ec691b10ff..b42746287c9 100644 --- a/yarn-project/end-to-end/.eslintrc.cjs +++ b/yarn-project/end-to-end/.eslintrc.cjs @@ -8,7 +8,7 @@ const e2eConfig = { 'no-restricted-imports': [ 'off', { - name: '@aztec/types/stats', + name: '@aztec/circuit-types/stats', }, ], }, @@ -19,9 +19,9 @@ const e2eConfig = { 'no-restricted-imports': [ 'error', { - name: '@aztec/types', + name: '@aztec/circuit-types', message: - 'Please do not import from @aztec/types directly. Instead, export the required type from @aztec/aztec.js.', + 'Please do not import from @aztec/circuit-types directly. Instead, export the required type from @aztec/aztec.js.', }, ], }, diff --git a/yarn-project/end-to-end/package.json b/yarn-project/end-to-end/package.json index 7fc87ba4554..25768e3f0a8 100644 --- a/yarn-project/end-to-end/package.json +++ b/yarn-project/end-to-end/package.json @@ -27,6 +27,7 @@ "@aztec/archiver": "workspace:^", "@aztec/aztec-node": "workspace:^", "@aztec/aztec.js": "workspace:^", + "@aztec/circuit-types": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/cli": "workspace:^", "@aztec/ethereum": "workspace:^", @@ -37,7 +38,6 @@ "@aztec/p2p": "workspace:^", "@aztec/pxe": "workspace:^", "@aztec/sequencer-client": "workspace:^", - "@aztec/types": "workspace:^", "@aztec/world-state": "workspace:^", "@jest/globals": "^29.5.0", "@noble/curves": "^1.0.0", 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 45d27e5be80..0fc0113999e 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,12 +1,12 @@ import { AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node'; import { Fr, GrumpkinScalar, INITIAL_L2_BLOCK_NUM, elapsed, sleep } from '@aztec/aztec.js'; -import { BenchmarkingContract } from '@aztec/noir-contracts/Benchmarking'; -import { SequencerClient } from '@aztec/sequencer-client'; import { BENCHMARK_HISTORY_BLOCK_SIZE, BENCHMARK_HISTORY_CHAIN_LENGTHS, NodeSyncedChainHistoryStats, -} from '@aztec/types/stats'; +} from '@aztec/circuit-types/stats'; +import { BenchmarkingContract } from '@aztec/noir-contracts/Benchmarking'; +import { SequencerClient } from '@aztec/sequencer-client'; import { EndToEndContext } from '../fixtures/utils.js'; import { 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 3452687290c..801ce861163 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,8 +1,8 @@ import { AztecNodeService } from '@aztec/aztec-node'; import { Fr, GrumpkinScalar } from '@aztec/aztec.js'; +import { BENCHMARK_BLOCK_SIZES } from '@aztec/circuit-types/stats'; import { BenchmarkingContract } from '@aztec/noir-contracts/Benchmarking'; import { SequencerClient } from '@aztec/sequencer-client'; -import { BENCHMARK_BLOCK_SIZES } from '@aztec/types/stats'; import { EndToEndContext } from '../fixtures/utils.js'; import { benchmarkSetup, sendTxs, waitNewPXESynced, waitRegisteredAccountSynced } from './utils.js'; diff --git a/yarn-project/end-to-end/tsconfig.json b/yarn-project/end-to-end/tsconfig.json index 80b2045a8b3..b44d4c38dfb 100644 --- a/yarn-project/end-to-end/tsconfig.json +++ b/yarn-project/end-to-end/tsconfig.json @@ -18,6 +18,9 @@ { "path": "../aztec.js" }, + { + "path": "../circuit-types" + }, { "path": "../circuits.js" }, @@ -48,9 +51,6 @@ { "path": "../sequencer-client" }, - { - "path": "../types" - }, { "path": "../world-state" } diff --git a/yarn-project/key-store/package.json b/yarn-project/key-store/package.json index a19af464fd2..d3283515ac1 100644 --- a/yarn-project/key-store/package.json +++ b/yarn-project/key-store/package.json @@ -30,10 +30,10 @@ "rootDir": "./src" }, "dependencies": { + "@aztec/circuit-types": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/foundation": "workspace:^", "@aztec/kv-store": "workspace:^", - "@aztec/types": "workspace:^", "tslib": "^2.4.0" }, "devDependencies": { diff --git a/yarn-project/key-store/src/key_pair.ts b/yarn-project/key-store/src/key_pair.ts index 9b8e335026f..fc40b397485 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 { KeyPair, PublicKey } from '@aztec/types'; /** * 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 65d64fd0231..f050a712904 100644 --- a/yarn-project/key-store/src/test_key_store.ts +++ b/yarn-project/key-store/src/test_key_store.ts @@ -1,7 +1,7 @@ +import { KeyPair, KeyStore, PublicKey } from '@aztec/circuit-types'; import { GrumpkinPrivateKey, GrumpkinScalar, Point } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { AztecKVStore, AztecMap } from '@aztec/kv-store'; -import { KeyPair, KeyStore, PublicKey } from '@aztec/types'; import { ConstantKeyPair } from './key_pair.js'; diff --git a/yarn-project/key-store/tsconfig.json b/yarn-project/key-store/tsconfig.json index e934003361b..4e0866fd521 100644 --- a/yarn-project/key-store/tsconfig.json +++ b/yarn-project/key-store/tsconfig.json @@ -6,6 +6,9 @@ "tsBuildInfoFile": ".tsbuildinfo" }, "references": [ + { + "path": "../circuit-types" + }, { "path": "../circuits.js" }, @@ -14,9 +17,6 @@ }, { "path": "../kv-store" - }, - { - "path": "../types" } ], "include": ["src"] diff --git a/yarn-project/merkle-tree/package.json b/yarn-project/merkle-tree/package.json index 4c7b53d8f42..cd00cbeaaba 100644 --- a/yarn-project/merkle-tree/package.json +++ b/yarn-project/merkle-tree/package.json @@ -32,8 +32,8 @@ "testTimeout": 15000 }, "dependencies": { + "@aztec/circuit-types": "workspace:^", "@aztec/foundation": "workspace:^", - "@aztec/types": "workspace:^", "levelup": "^5.1.1", "memdown": "^6.1.1", "sha256": "^0.2.0", diff --git a/yarn-project/merkle-tree/src/interfaces/indexed_tree.ts b/yarn-project/merkle-tree/src/interfaces/indexed_tree.ts index eee22a3ee2a..ab6ecf814e7 100644 --- a/yarn-project/merkle-tree/src/interfaces/indexed_tree.ts +++ b/yarn-project/merkle-tree/src/interfaces/indexed_tree.ts @@ -1,5 +1,5 @@ +import { SiblingPath } from '@aztec/circuit-types'; import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; -import { SiblingPath } from '@aztec/types'; import { AppendOnlyTree } from './append_only_tree.js'; diff --git a/yarn-project/merkle-tree/src/interfaces/merkle_tree.ts b/yarn-project/merkle-tree/src/interfaces/merkle_tree.ts index ba3ffb4309b..5a30253e3a8 100644 --- a/yarn-project/merkle-tree/src/interfaces/merkle_tree.ts +++ b/yarn-project/merkle-tree/src/interfaces/merkle_tree.ts @@ -1,4 +1,4 @@ -import { SiblingPath } from '@aztec/types'; +import { SiblingPath } from '@aztec/circuit-types'; /** * Defines the interface for a source of sibling paths. diff --git a/yarn-project/merkle-tree/src/load_tree.ts b/yarn-project/merkle-tree/src/load_tree.ts index 9753a2d528d..fb9e09d69eb 100644 --- a/yarn-project/merkle-tree/src/load_tree.ts +++ b/yarn-project/merkle-tree/src/load_tree.ts @@ -1,4 +1,4 @@ -import { Hasher } from '@aztec/types'; +import { Hasher } from '@aztec/circuit-types'; import { LevelUp } from 'levelup'; diff --git a/yarn-project/merkle-tree/src/new_tree.ts b/yarn-project/merkle-tree/src/new_tree.ts index 1395d012d25..a3d16bc78b5 100644 --- a/yarn-project/merkle-tree/src/new_tree.ts +++ b/yarn-project/merkle-tree/src/new_tree.ts @@ -1,4 +1,4 @@ -import { Hasher } from '@aztec/types'; +import { Hasher } from '@aztec/circuit-types'; import { LevelUp } from 'levelup'; diff --git a/yarn-project/merkle-tree/src/pedersen.ts b/yarn-project/merkle-tree/src/pedersen.ts index 0d1681c5077..47a8b775963 100644 --- a/yarn-project/merkle-tree/src/pedersen.ts +++ b/yarn-project/merkle-tree/src/pedersen.ts @@ -1,5 +1,5 @@ +import { Hasher } from '@aztec/circuit-types'; import { pedersenHash } from '@aztec/foundation/crypto'; -import { Hasher } from '@aztec/types'; /** * A helper class encapsulating Pedersen hash functionality. 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 46361bd5913..bcb39712c3c 100644 --- a/yarn-project/merkle-tree/src/snapshots/append_only_snapshot.ts +++ b/yarn-project/merkle-tree/src/snapshots/append_only_snapshot.ts @@ -1,4 +1,4 @@ -import { Hasher, SiblingPath } from '@aztec/types'; +import { Hasher, SiblingPath } from '@aztec/circuit-types'; import { LevelUp } from 'levelup'; 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 b1157cf9d44..4a65cee3b01 100644 --- a/yarn-project/merkle-tree/src/snapshots/base_full_snapshot.ts +++ b/yarn-project/merkle-tree/src/snapshots/base_full_snapshot.ts @@ -1,4 +1,4 @@ -import { SiblingPath } from '@aztec/types'; +import { SiblingPath } from '@aztec/circuit-types'; import { LevelUp, LevelUpChain } from 'levelup'; 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 3846bbcc21d..64cca7d3ee1 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,5 +1,5 @@ +import { Hasher } from '@aztec/circuit-types'; import { Fr, NullifierLeaf, NullifierLeafPreimage } from '@aztec/circuits.js'; -import { Hasher } from '@aztec/types'; import levelup, { LevelUp } from 'levelup'; diff --git a/yarn-project/merkle-tree/src/snapshots/snapshot_builder.ts b/yarn-project/merkle-tree/src/snapshots/snapshot_builder.ts index b1fd74f9bdc..5f8f98aed84 100644 --- a/yarn-project/merkle-tree/src/snapshots/snapshot_builder.ts +++ b/yarn-project/merkle-tree/src/snapshots/snapshot_builder.ts @@ -1,5 +1,5 @@ +import { SiblingPath } from '@aztec/circuit-types'; import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; -import { SiblingPath } from '@aztec/types'; /** * An interface for a tree that can record snapshots of its contents. 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 bd4f1e6bd0b..5f9c5b558b3 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,5 +1,5 @@ +import { Hasher, SiblingPath } from '@aztec/circuit-types'; import { createDebugLogger } from '@aztec/foundation/log'; -import { Hasher, SiblingPath } from '@aztec/types'; import { randomBytes } from 'crypto'; import { default as levelup } from 'levelup'; 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 0ffb87dcaa6..eba0ff4d1d4 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,9 +1,9 @@ +import { Hasher, SiblingPath } from '@aztec/circuit-types'; +import { TreeInsertionStats } from '@aztec/circuit-types/stats'; import { toBigIntBE, toBufferBE } from '@aztec/foundation/bigint-buffer'; import { createDebugLogger } from '@aztec/foundation/log'; import { Timer } from '@aztec/foundation/timer'; import { IndexedTreeLeaf, IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; -import { Hasher, SiblingPath } from '@aztec/types'; -import { TreeInsertionStats } from '@aztec/types/stats'; import { LevelUp } from 'levelup'; 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 470355f1e95..e650188db84 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 @@ -1,3 +1,4 @@ +import { Hasher, SiblingPath } from '@aztec/circuit-types'; import { Fr, NullifierLeaf, @@ -6,7 +7,6 @@ import { PublicDataTreeLeafPreimage, } from '@aztec/circuits.js'; import { toBufferBE } from '@aztec/foundation/bigint-buffer'; -import { Hasher, SiblingPath } from '@aztec/types'; import { default as levelup } from 'levelup'; 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 b211017d851..c417c254c51 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,5 +1,5 @@ +import { Hasher } from '@aztec/circuit-types'; import { randomBytes } from '@aztec/foundation/crypto'; -import { Hasher } from '@aztec/types'; import { default as levelup } from 'levelup'; 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 3c48cfd2212..cc9af7e28bf 100644 --- a/yarn-project/merkle-tree/src/standard_tree/standard_tree.ts +++ b/yarn-project/merkle-tree/src/standard_tree/standard_tree.ts @@ -1,5 +1,5 @@ +import { TreeInsertionStats } from '@aztec/circuit-types/stats'; import { Timer } from '@aztec/foundation/timer'; -import { TreeInsertionStats } from '@aztec/types/stats'; import { AppendOnlySnapshotBuilder, TreeSnapshot } from '../index.js'; import { AppendOnlyTree } from '../interfaces/append_only_tree.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 3ccbd7ff6d1..86d145b48bf 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,4 +1,4 @@ -import { Hasher, SiblingPath } from '@aztec/types'; +import { Hasher, SiblingPath } from '@aztec/circuit-types'; import { randomBytes } from 'crypto'; import { default as levelup } from 'levelup'; diff --git a/yarn-project/merkle-tree/src/test/test_suite.ts b/yarn-project/merkle-tree/src/test/test_suite.ts index 1940f32ce91..3323c47fc8d 100644 --- a/yarn-project/merkle-tree/src/test/test_suite.ts +++ b/yarn-project/merkle-tree/src/test/test_suite.ts @@ -1,4 +1,4 @@ -import { Hasher, SiblingPath } from '@aztec/types'; +import { Hasher, SiblingPath } from '@aztec/circuit-types'; import { default as levelup } from 'levelup'; diff --git a/yarn-project/merkle-tree/src/tree_base.ts b/yarn-project/merkle-tree/src/tree_base.ts index befad55ae72..4339804f150 100644 --- a/yarn-project/merkle-tree/src/tree_base.ts +++ b/yarn-project/merkle-tree/src/tree_base.ts @@ -1,6 +1,6 @@ +import { Hasher, SiblingPath } from '@aztec/circuit-types'; import { toBigIntLE, toBufferLE } from '@aztec/foundation/bigint-buffer'; import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; -import { Hasher, SiblingPath } from '@aztec/types'; import { LevelUp, LevelUpChain } from 'levelup'; diff --git a/yarn-project/merkle-tree/tsconfig.json b/yarn-project/merkle-tree/tsconfig.json index 35f81f8b801..d2bc1df097f 100644 --- a/yarn-project/merkle-tree/tsconfig.json +++ b/yarn-project/merkle-tree/tsconfig.json @@ -7,10 +7,10 @@ }, "references": [ { - "path": "../foundation" + "path": "../circuit-types" }, { - "path": "../types" + "path": "../foundation" }, { "path": "../circuits.js" diff --git a/yarn-project/noir-protocol-circuits/package.json b/yarn-project/noir-protocol-circuits/package.json index 2839c24f3bc..1a1bd96cb30 100644 --- a/yarn-project/noir-protocol-circuits/package.json +++ b/yarn-project/noir-protocol-circuits/package.json @@ -37,8 +37,8 @@ "tslib": "^2.4.0" }, "devDependencies": { + "@aztec/circuit-types": "workspace:^", "@aztec/merkle-tree": "workspace:^", - "@aztec/types": "workspace:^", "@jest/globals": "^29.5.0", "@types/jest": "^29.5.0", "@types/node": "^18.7.23", diff --git a/yarn-project/noir-protocol-circuits/src/noir_test_gen.test.ts b/yarn-project/noir-protocol-circuits/src/noir_test_gen.test.ts index ecb37e3a8d2..149a6db9575 100644 --- a/yarn-project/noir-protocol-circuits/src/noir_test_gen.test.ts +++ b/yarn-project/noir-protocol-circuits/src/noir_test_gen.test.ts @@ -1,3 +1,4 @@ +import { MerkleTreeId } from '@aztec/circuit-types'; import { AztecAddress, CONTRACT_TREE_HEIGHT, @@ -16,7 +17,6 @@ import { } from '@aztec/circuits.js/abis'; import { Fr } from '@aztec/foundation/fields'; import { Pedersen, StandardTree } from '@aztec/merkle-tree'; -import { MerkleTreeId } from '@aztec/types'; import { default as levelup } from 'levelup'; import memdown from 'memdown'; diff --git a/yarn-project/noir-protocol-circuits/tsconfig.json b/yarn-project/noir-protocol-circuits/tsconfig.json index d187e78ec1b..4c2a3c5e245 100644 --- a/yarn-project/noir-protocol-circuits/tsconfig.json +++ b/yarn-project/noir-protocol-circuits/tsconfig.json @@ -16,10 +16,10 @@ "path": "../noir-compiler" }, { - "path": "../merkle-tree" + "path": "../circuit-types" }, { - "path": "../types" + "path": "../merkle-tree" } ], "include": ["src", "src/**/*.json"], diff --git a/yarn-project/p2p/package.json b/yarn-project/p2p/package.json index 931eacd4167..6203bc73123 100644 --- a/yarn-project/p2p/package.json +++ b/yarn-project/p2p/package.json @@ -32,10 +32,10 @@ "rootDir": "./src" }, "dependencies": { + "@aztec/circuit-types": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/foundation": "workspace:^", "@aztec/kv-store": "workspace:^", - "@aztec/types": "workspace:^", "@chainsafe/libp2p-noise": "^13.0.0", "@chainsafe/libp2p-yamux": "^5.0.0", "@libp2p/bootstrap": "^9.0.4", diff --git a/yarn-project/p2p/src/client/index.ts b/yarn-project/p2p/src/client/index.ts index 6789fa2aa1f..b2411e80118 100644 --- a/yarn-project/p2p/src/client/index.ts +++ b/yarn-project/p2p/src/client/index.ts @@ -1,5 +1,5 @@ +import { L2BlockSource } from '@aztec/circuit-types'; import { AztecKVStore } from '@aztec/kv-store'; -import { L2BlockSource } from '@aztec/types'; import { P2PClient } from '../client/p2p_client.js'; import { P2PConfig } from '../config.js'; diff --git a/yarn-project/p2p/src/client/mocks.ts b/yarn-project/p2p/src/client/mocks.ts index 7548fb3175d..99bf33d033f 100644 --- a/yarn-project/p2p/src/client/mocks.ts +++ b/yarn-project/p2p/src/client/mocks.ts @@ -1,5 +1,5 @@ +import { L2Block, L2BlockSource, L2Tx, TxHash } from '@aztec/circuit-types'; import { EthAddress } from '@aztec/circuits.js'; -import { L2Block, L2BlockSource, L2Tx, TxHash } from '@aztec/types'; /** * A mocked implementation of L2BlockSource to be used in p2p tests. diff --git a/yarn-project/p2p/src/client/p2p_client.test.ts b/yarn-project/p2p/src/client/p2p_client.test.ts index 2b7d32e512b..4de4f519f13 100644 --- a/yarn-project/p2p/src/client/p2p_client.test.ts +++ b/yarn-project/p2p/src/client/p2p_client.test.ts @@ -1,6 +1,6 @@ +import { L2BlockSource, mockTx } from '@aztec/circuit-types'; import { EthAddress } from '@aztec/circuits.js'; import { AztecKVStore, AztecLmdbStore } from '@aztec/kv-store'; -import { L2BlockSource, mockTx } from '@aztec/types'; import { expect, jest } from '@jest/globals'; diff --git a/yarn-project/p2p/src/client/p2p_client.ts b/yarn-project/p2p/src/client/p2p_client.ts index 96a5738752d..6c9789259ac 100644 --- a/yarn-project/p2p/src/client/p2p_client.ts +++ b/yarn-project/p2p/src/client/p2p_client.ts @@ -1,5 +1,3 @@ -import { createDebugLogger } from '@aztec/foundation/log'; -import { AztecKVStore, AztecSingleton } from '@aztec/kv-store'; import { INITIAL_L2_BLOCK_NUM, L2Block, @@ -8,7 +6,9 @@ import { L2BlockSource, Tx, TxHash, -} from '@aztec/types'; +} from '@aztec/circuit-types'; +import { createDebugLogger } from '@aztec/foundation/log'; +import { AztecKVStore, AztecSingleton } from '@aztec/kv-store'; import { getP2PConfigEnvVars } from '../config.js'; import { P2PService } from '../service/service.js'; diff --git a/yarn-project/p2p/src/service/dummy_service.ts b/yarn-project/p2p/src/service/dummy_service.ts index 36b1953be75..bfc6b1d1364 100644 --- a/yarn-project/p2p/src/service/dummy_service.ts +++ b/yarn-project/p2p/src/service/dummy_service.ts @@ -1,4 +1,4 @@ -import { Tx, TxHash } from '@aztec/types'; +import { Tx, TxHash } from '@aztec/circuit-types'; import { P2PService } from './service.js'; diff --git a/yarn-project/p2p/src/service/known_txs.test.ts b/yarn-project/p2p/src/service/known_txs.test.ts index 1f8345751f5..68ca52b7ec3 100644 --- a/yarn-project/p2p/src/service/known_txs.test.ts +++ b/yarn-project/p2p/src/service/known_txs.test.ts @@ -1,4 +1,4 @@ -import { randomTxHash } from '@aztec/types'; +import { randomTxHash } from '@aztec/circuit-types'; import { expect } from '@jest/globals'; import { Ed25519PeerId, PeerId } from '@libp2p/interface-peer-id'; diff --git a/yarn-project/p2p/src/service/libp2p_service.ts b/yarn-project/p2p/src/service/libp2p_service.ts index 772c27ff53d..dff05585699 100644 --- a/yarn-project/p2p/src/service/libp2p_service.ts +++ b/yarn-project/p2p/src/service/libp2p_service.ts @@ -1,6 +1,6 @@ +import { Tx, TxHash } from '@aztec/circuit-types'; import { SerialQueue } from '@aztec/foundation/fifo'; import { createDebugLogger } from '@aztec/foundation/log'; -import { Tx, TxHash } from '@aztec/types'; import { noise } from '@chainsafe/libp2p-noise'; import { yamux } from '@chainsafe/libp2p-yamux'; diff --git a/yarn-project/p2p/src/service/service.ts b/yarn-project/p2p/src/service/service.ts index 7bdb41e1cf6..7c2410b129a 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/types'; +import { Tx, 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 3d112a902d1..e20f90582d1 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/types'; +import { Tx, mockTx, randomTxHash } from '@aztec/circuit-types'; import { expect } from '@jest/globals'; diff --git a/yarn-project/p2p/src/service/tx_messages.ts b/yarn-project/p2p/src/service/tx_messages.ts index f0070f58191..e0cbab8db68 100644 --- a/yarn-project/p2p/src/service/tx_messages.ts +++ b/yarn-project/p2p/src/service/tx_messages.ts @@ -1,6 +1,6 @@ +import { ExtendedContractData, Tx, TxHash, TxL2Logs } from '@aztec/circuit-types'; import { KernelCircuitPublicInputsFinal, MAX_NEW_CONTRACTS_PER_TX, Proof, PublicCallRequest } from '@aztec/circuits.js'; import { Tuple, numToUInt32BE } from '@aztec/foundation/serialize'; -import { ExtendedContractData, Tx, TxHash, TxL2Logs } from '@aztec/types'; /** * Enumeration of P2P message types. 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 bb2e0b9fbee..1d8d723ab5d 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,7 +1,7 @@ +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 { Tx, TxHash } from '@aztec/types'; -import { TxAddedToPoolStats } from '@aztec/types/stats'; import { TxPool } from './tx_pool.js'; 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 be6de982e19..ce4d284a281 100644 --- a/yarn-project/p2p/src/tx_pool/memory_tx_pool.ts +++ b/yarn-project/p2p/src/tx_pool/memory_tx_pool.ts @@ -1,6 +1,6 @@ +import { Tx, TxHash } from '@aztec/circuit-types'; +import { TxAddedToPoolStats } from '@aztec/circuit-types/stats'; import { createDebugLogger } from '@aztec/foundation/log'; -import { Tx, TxHash } from '@aztec/types'; -import { TxAddedToPoolStats } from '@aztec/types/stats'; import { TxPool } from './tx_pool.js'; diff --git a/yarn-project/p2p/src/tx_pool/tx_pool.ts b/yarn-project/p2p/src/tx_pool/tx_pool.ts index dced0c45674..659f5a6d0ca 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/types'; +import { Tx, 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 457f2b4ba56..0bf49f44184 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,4 +1,4 @@ -import { mockTx } from '@aztec/types'; +import { mockTx } from '@aztec/circuit-types'; import { TxPool } from './tx_pool.js'; diff --git a/yarn-project/p2p/tsconfig.json b/yarn-project/p2p/tsconfig.json index e934003361b..4e0866fd521 100644 --- a/yarn-project/p2p/tsconfig.json +++ b/yarn-project/p2p/tsconfig.json @@ -6,6 +6,9 @@ "tsBuildInfoFile": ".tsbuildinfo" }, "references": [ + { + "path": "../circuit-types" + }, { "path": "../circuits.js" }, @@ -14,9 +17,6 @@ }, { "path": "../kv-store" - }, - { - "path": "../types" } ], "include": ["src"] diff --git a/yarn-project/package.json b/yarn-project/package.json index a9721c086a4..fe89fde14ec 100644 --- a/yarn-project/package.json +++ b/yarn-project/package.json @@ -25,6 +25,7 @@ "aztec-sandbox", "aztec.js", "circuits.js", + "circuit-types", "cli", "docs", "end-to-end", @@ -42,7 +43,6 @@ "rollup-provider", "sequencer-client", "scripts", - "types", "world-state", "yarn-project-base", "kv-store" diff --git a/yarn-project/pxe/package.json b/yarn-project/pxe/package.json index db3c39c4573..45cc91169a5 100644 --- a/yarn-project/pxe/package.json +++ b/yarn-project/pxe/package.json @@ -34,6 +34,7 @@ }, "dependencies": { "@aztec/acir-simulator": "workspace:^", + "@aztec/circuit-types": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/ethereum": "workspace:^", "@aztec/foundation": "workspace:^", @@ -41,7 +42,6 @@ "@aztec/kv-store": "workspace:^", "@aztec/noir-compiler": "workspace:^", "@aztec/noir-protocol-circuits": "workspace:^", - "@aztec/types": "workspace:^", "koa": "^2.14.2", "koa-router": "^12.0.0", "lodash.omit": "^4.5.0", diff --git a/yarn-project/pxe/src/bin/index.ts b/yarn-project/pxe/src/bin/index.ts index 43e49dd8271..ac3f0d6f84e 100644 --- a/yarn-project/pxe/src/bin/index.ts +++ b/yarn-project/pxe/src/bin/index.ts @@ -1,7 +1,7 @@ #!/usr/bin/env -S node --no-warnings +import { createAztecNodeClient } from '@aztec/circuit-types'; import { init } from '@aztec/foundation/crypto'; import { createDebugLogger } from '@aztec/foundation/log'; -import { createAztecNodeClient } from '@aztec/types'; import { getPXEServiceConfig } from '../config/index.js'; import { startPXEHttpServer } from '../pxe_http/index.js'; diff --git a/yarn-project/pxe/src/config/index.ts b/yarn-project/pxe/src/config/index.ts index 7ad14c519c6..eaf7133944d 100644 --- a/yarn-project/pxe/src/config/index.ts +++ b/yarn-project/pxe/src/config/index.ts @@ -1,4 +1,4 @@ -import { INITIAL_L2_BLOCK_NUM } from '@aztec/types'; +import { INITIAL_L2_BLOCK_NUM } from '@aztec/circuit-types'; import { readFileSync } from 'fs'; import { dirname, resolve } from 'path'; diff --git a/yarn-project/pxe/src/contract_data_oracle/index.ts b/yarn-project/pxe/src/contract_data_oracle/index.ts index 5c1f07e03f0..858a7e65fda 100644 --- a/yarn-project/pxe/src/contract_data_oracle/index.ts +++ b/yarn-project/pxe/src/contract_data_oracle/index.ts @@ -1,7 +1,7 @@ import { ContractNotFoundError } from '@aztec/acir-simulator'; +import { ContractDatabase, StateInfoProvider } from '@aztec/circuit-types'; import { AztecAddress, ContractFunctionDao, MembershipWitness, VK_TREE_HEIGHT } from '@aztec/circuits.js'; import { FunctionDebugMetadata, FunctionSelector } from '@aztec/foundation/abi'; -import { ContractDatabase, StateInfoProvider } from '@aztec/types'; import { ContractTree } from '../contract_tree/index.js'; diff --git a/yarn-project/pxe/src/contract_database/memory_contract_database.ts b/yarn-project/pxe/src/contract_database/memory_contract_database.ts index a8b84dafda6..64597448593 100644 --- a/yarn-project/pxe/src/contract_database/memory_contract_database.ts +++ b/yarn-project/pxe/src/contract_database/memory_contract_database.ts @@ -1,7 +1,7 @@ +import { ContractDao, ContractDatabase } from '@aztec/circuit-types'; import { FunctionSelector } from '@aztec/circuits.js'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { DebugLogger } from '@aztec/foundation/log'; -import { ContractDao, ContractDatabase } from '@aztec/types'; /** * The MemoryContractDatabase class serves as an in-memory implementation of the ContractDatabase interface. diff --git a/yarn-project/pxe/src/contract_tree/index.ts b/yarn-project/pxe/src/contract_tree/index.ts index 8078e310f3d..bc8b9246478 100644 --- a/yarn-project/pxe/src/contract_tree/index.ts +++ b/yarn-project/pxe/src/contract_tree/index.ts @@ -1,3 +1,4 @@ +import { AztecNode, ContractDao, MerkleTreeId, PublicKey, StateInfoProvider } from '@aztec/circuit-types'; import { CONTRACT_TREE_HEIGHT, EthAddress, @@ -23,7 +24,6 @@ import { } from '@aztec/circuits.js/abis'; import { ContractArtifact, FunctionSelector } from '@aztec/foundation/abi'; import { assertLength } from '@aztec/foundation/serialize'; -import { AztecNode, ContractDao, MerkleTreeId, PublicKey, StateInfoProvider } from '@aztec/types'; /** * The ContractTree class represents a Merkle tree of functions for a particular contract. diff --git a/yarn-project/pxe/src/database/deferred_note_dao.test.ts b/yarn-project/pxe/src/database/deferred_note_dao.test.ts index 51f4ff9112f..f4e92964f45 100644 --- a/yarn-project/pxe/src/database/deferred_note_dao.test.ts +++ b/yarn-project/pxe/src/database/deferred_note_dao.test.ts @@ -1,5 +1,5 @@ +import { Note, randomTxHash } from '@aztec/circuit-types'; import { AztecAddress, Fr, Point } from '@aztec/circuits.js'; -import { Note, randomTxHash } from '@aztec/types'; import { DeferredNoteDao } from './deferred_note_dao.js'; diff --git a/yarn-project/pxe/src/database/deferred_note_dao.ts b/yarn-project/pxe/src/database/deferred_note_dao.ts index 58e51aa6016..9748587f6fe 100644 --- a/yarn-project/pxe/src/database/deferred_note_dao.ts +++ b/yarn-project/pxe/src/database/deferred_note_dao.ts @@ -1,6 +1,6 @@ +import { BufferReader, Note, TxHash } from '@aztec/circuit-types'; import { AztecAddress, Fr, Point, PublicKey, Vector } from '@aztec/circuits.js'; import { serializeToBuffer } from '@aztec/circuits.js/utils'; -import { BufferReader, Note, TxHash } from '@aztec/types'; /** * A note that is intended for us, but we cannot decode it yet because the contract is not yet in our database. diff --git a/yarn-project/pxe/src/database/kv_pxe_database.ts b/yarn-project/pxe/src/database/kv_pxe_database.ts index 8cfc806c7bc..a6216e9be06 100644 --- a/yarn-project/pxe/src/database/kv_pxe_database.ts +++ b/yarn-project/pxe/src/database/kv_pxe_database.ts @@ -1,7 +1,7 @@ +import { ContractDao, MerkleTreeId, NoteFilter, PublicKey } from '@aztec/circuit-types'; import { AztecAddress, BlockHeader, CompleteAddress } from '@aztec/circuits.js'; import { Fr, Point } from '@aztec/foundation/fields'; import { AztecArray, AztecKVStore, AztecMap, AztecMultiMap, AztecSingleton } from '@aztec/kv-store'; -import { ContractDao, MerkleTreeId, NoteFilter, PublicKey } from '@aztec/types'; import { DeferredNoteDao } from './deferred_note_dao.js'; import { NoteDao } from './note_dao.js'; diff --git a/yarn-project/pxe/src/database/memory_db.ts b/yarn-project/pxe/src/database/memory_db.ts index 6e0462a4c7a..174d80677c3 100644 --- a/yarn-project/pxe/src/database/memory_db.ts +++ b/yarn-project/pxe/src/database/memory_db.ts @@ -1,8 +1,8 @@ +import { MerkleTreeId, NoteFilter } from '@aztec/circuit-types'; import { BlockHeader, CompleteAddress, PublicKey } from '@aztec/circuits.js'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr, Point } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; -import { MerkleTreeId, NoteFilter } from '@aztec/types'; import { MemoryContractDatabase } from '../contract_database/index.js'; import { DeferredNoteDao } from './deferred_note_dao.js'; diff --git a/yarn-project/pxe/src/database/note_dao.test.ts b/yarn-project/pxe/src/database/note_dao.test.ts index f4c22304a3f..34baa9a14dd 100644 --- a/yarn-project/pxe/src/database/note_dao.test.ts +++ b/yarn-project/pxe/src/database/note_dao.test.ts @@ -1,5 +1,5 @@ +import { Note, randomTxHash } from '@aztec/circuit-types'; import { AztecAddress, Fr, Point } from '@aztec/circuits.js'; -import { Note, randomTxHash } from '@aztec/types'; import { NoteDao } from './note_dao.js'; diff --git a/yarn-project/pxe/src/database/note_dao.ts b/yarn-project/pxe/src/database/note_dao.ts index b531bcb058f..eee77c986c7 100644 --- a/yarn-project/pxe/src/database/note_dao.ts +++ b/yarn-project/pxe/src/database/note_dao.ts @@ -1,7 +1,7 @@ import { NoteData } from '@aztec/acir-simulator'; +import { BufferReader, Note, TxHash } from '@aztec/circuit-types'; import { AztecAddress, Fr, Point, PublicKey } from '@aztec/circuits.js'; import { toBigIntBE, toBufferBE } from '@aztec/foundation/bigint-buffer'; -import { BufferReader, Note, TxHash } from '@aztec/types'; /** * 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 134b56aa4c3..b08e9932f7c 100644 --- a/yarn-project/pxe/src/database/pxe_database.ts +++ b/yarn-project/pxe/src/database/pxe_database.ts @@ -1,7 +1,7 @@ +import { ContractDatabase, MerkleTreeId, NoteFilter } from '@aztec/circuit-types'; import { BlockHeader, CompleteAddress, PublicKey } from '@aztec/circuits.js'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; -import { ContractDatabase, MerkleTreeId, NoteFilter } from '@aztec/types'; import { DeferredNoteDao } from './deferred_note_dao.js'; import { NoteDao } from './note_dao.js'; diff --git a/yarn-project/pxe/src/database/pxe_database_test_suite.ts b/yarn-project/pxe/src/database/pxe_database_test_suite.ts index 5726dd293cd..5464ef98dde 100644 --- a/yarn-project/pxe/src/database/pxe_database_test_suite.ts +++ b/yarn-project/pxe/src/database/pxe_database_test_suite.ts @@ -1,6 +1,6 @@ +import { INITIAL_L2_BLOCK_NUM, MerkleTreeId, NoteFilter, randomTxHash } from '@aztec/circuit-types'; import { AztecAddress, BlockHeader, CompleteAddress } from '@aztec/circuits.js'; import { Fr, Point } from '@aztec/foundation/fields'; -import { INITIAL_L2_BLOCK_NUM, MerkleTreeId, NoteFilter, randomTxHash } from '@aztec/types'; import { NoteDao } from './note_dao.js'; import { randomNoteDao } from './note_dao.test.js'; diff --git a/yarn-project/pxe/src/index.ts b/yarn-project/pxe/src/index.ts index dff67ffbda4..d7cf6d57253 100644 --- a/yarn-project/pxe/src/index.ts +++ b/yarn-project/pxe/src/index.ts @@ -2,7 +2,7 @@ export * from './pxe_service/index.js'; export * from './pxe_http/index.js'; export * from './config/index.js'; -export { Tx, TxHash } from '@aztec/types'; +export { Tx, TxHash } from '@aztec/circuit-types'; export { TxRequest, PartialAddress } from '@aztec/circuits.js'; export * from '@aztec/foundation/fields'; diff --git a/yarn-project/pxe/src/kernel_oracle/index.ts b/yarn-project/pxe/src/kernel_oracle/index.ts index 79a32c21e9b..af05c8dafb6 100644 --- a/yarn-project/pxe/src/kernel_oracle/index.ts +++ b/yarn-project/pxe/src/kernel_oracle/index.ts @@ -1,6 +1,6 @@ +import { AztecNode, MerkleTreeId } from '@aztec/circuit-types'; import { AztecAddress, Fr, FunctionSelector, MembershipWitness, NOTE_HASH_TREE_HEIGHT } from '@aztec/circuits.js'; import { Tuple } from '@aztec/foundation/serialize'; -import { AztecNode, MerkleTreeId } from '@aztec/types'; import { ContractDataOracle } from '../contract_data_oracle/index.js'; import { ProvingDataOracle } from './../kernel_prover/proving_data_oracle.js'; 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 b47b59e5dca..f9bd279e259 100644 --- a/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts +++ b/yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts @@ -1,4 +1,5 @@ import { ExecutionResult, NoteAndSlot } from '@aztec/acir-simulator'; +import { FunctionL2Logs, Note } from '@aztec/circuit-types'; import { FunctionData, FunctionSelector, @@ -21,7 +22,6 @@ import { makeTxRequest } from '@aztec/circuits.js/factories'; import { AztecAddress } from '@aztec/foundation/aztec-address'; import { Fr } from '@aztec/foundation/fields'; import { Tuple } from '@aztec/foundation/serialize'; -import { FunctionL2Logs, Note } from '@aztec/types'; import { mock } from 'jest-mock-extended'; diff --git a/yarn-project/pxe/src/kernel_prover/proof_creator.ts b/yarn-project/pxe/src/kernel_prover/proof_creator.ts index 1da88a42f0d..3ab0b2aa053 100644 --- a/yarn-project/pxe/src/kernel_prover/proof_creator.ts +++ b/yarn-project/pxe/src/kernel_prover/proof_creator.ts @@ -1,3 +1,4 @@ +import { CircuitSimulationStats } from '@aztec/circuit-types/stats'; import { KernelCircuitPublicInputs, KernelCircuitPublicInputsFinal, @@ -13,7 +14,6 @@ import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; import { elapsed } from '@aztec/foundation/timer'; import { executeInit, executeInner, executeOrdering } from '@aztec/noir-protocol-circuits'; -import { CircuitSimulationStats } from '@aztec/types/stats'; /** * Represents the output of the proof creation process for init and inner private kernel circuit. 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 36c11ac8739..64d91fb4dcc 100644 --- a/yarn-project/pxe/src/note_processor/note_processor.test.ts +++ b/yarn-project/pxe/src/note_processor/note_processor.test.ts @@ -1,10 +1,4 @@ import { AcirSimulator } from '@aztec/acir-simulator'; -import { EthAddress, Fr, MAX_NEW_COMMITMENTS_PER_TX } from '@aztec/circuits.js'; -import { Grumpkin } from '@aztec/circuits.js/barretenberg'; -import { pedersenHash } from '@aztec/foundation/crypto'; -import { Point } from '@aztec/foundation/fields'; -import { ConstantKeyPair } from '@aztec/key-store'; -import { AztecLmdbStore } from '@aztec/kv-store'; import { AztecNode, FunctionL2Logs, @@ -17,7 +11,13 @@ import { L2BlockL2Logs, Note, TxL2Logs, -} from '@aztec/types'; +} from '@aztec/circuit-types'; +import { EthAddress, Fr, MAX_NEW_COMMITMENTS_PER_TX } from '@aztec/circuits.js'; +import { Grumpkin } from '@aztec/circuits.js/barretenberg'; +import { pedersenHash } from '@aztec/foundation/crypto'; +import { Point } from '@aztec/foundation/fields'; +import { ConstantKeyPair } from '@aztec/key-store'; +import { AztecLmdbStore } from '@aztec/kv-store'; import { jest } from '@jest/globals'; import { MockProxy, mock } from 'jest-mock-extended'; diff --git a/yarn-project/pxe/src/note_processor/note_processor.ts b/yarn-project/pxe/src/note_processor/note_processor.ts index 7c37f8644fc..0992685eaf1 100644 --- a/yarn-project/pxe/src/note_processor/note_processor.ts +++ b/yarn-project/pxe/src/note_processor/note_processor.ts @@ -1,11 +1,18 @@ import { ContractNotFoundError } from '@aztec/acir-simulator'; +import { + AztecNode, + INITIAL_L2_BLOCK_NUM, + KeyStore, + L1NotePayload, + L2BlockContext, + L2BlockL2Logs, +} from '@aztec/circuit-types'; +import { NoteProcessorStats } from '@aztec/circuit-types/stats'; import { MAX_NEW_COMMITMENTS_PER_TX, PublicKey } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; import { Timer } from '@aztec/foundation/timer'; -import { AztecNode, INITIAL_L2_BLOCK_NUM, KeyStore, L1NotePayload, L2BlockContext, L2BlockL2Logs } from '@aztec/types'; -import { NoteProcessorStats } from '@aztec/types/stats'; import { DeferredNoteDao } from '../database/deferred_note_dao.js'; import { PxeDatabase } from '../database/index.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 906948ef686..14384dd6685 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 { AcirSimulator } from '@aztec/acir-simulator'; +import { L1NotePayload, TxHash } from '@aztec/circuit-types'; import { Fr, PublicKey } from '@aztec/circuits.js'; import { computeCommitmentNonce, siloNullifier } from '@aztec/circuits.js/abis'; -import { L1NotePayload, TxHash } from '@aztec/types'; 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 0cde8a8b396..336f35b710c 100644 --- a/yarn-project/pxe/src/pxe_http/pxe_http_server.ts +++ b/yarn-project/pxe/src/pxe_http/pxe_http_server.ts @@ -1,8 +1,3 @@ -import { FunctionSelector } from '@aztec/circuits.js'; -import { AztecAddress } from '@aztec/foundation/aztec-address'; -import { EthAddress } from '@aztec/foundation/eth-address'; -import { Fr, GrumpkinScalar, Point } from '@aztec/foundation/fields'; -import { JsonRpcServer } from '@aztec/foundation/json-rpc/server'; import { AuthWitness, CompleteAddress, @@ -20,7 +15,12 @@ import { TxExecutionRequest, TxHash, TxReceipt, -} from '@aztec/types'; +} from '@aztec/circuit-types'; +import { FunctionSelector } from '@aztec/circuits.js'; +import { AztecAddress } from '@aztec/foundation/aztec-address'; +import { EthAddress } from '@aztec/foundation/eth-address'; +import { Fr, GrumpkinScalar, Point } from '@aztec/foundation/fields'; +import { JsonRpcServer } from '@aztec/foundation/json-rpc/server'; import http from 'http'; import { foundry } from 'viem/chains'; 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 f2942d8a800..2b52e0dfc3b 100644 --- a/yarn-project/pxe/src/pxe_service/create_pxe_service.ts +++ b/yarn-project/pxe/src/pxe_service/create_pxe_service.ts @@ -1,7 +1,7 @@ +import { AztecNode } from '@aztec/circuit-types'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { TestKeyStore } from '@aztec/key-store'; import { AztecLmdbStore } from '@aztec/kv-store'; -import { AztecNode } from '@aztec/types'; import { join } from 'path'; diff --git a/yarn-project/pxe/src/pxe_service/pxe_service.ts b/yarn-project/pxe/src/pxe_service/pxe_service.ts index ee487cce126..8a995517b3d 100644 --- a/yarn-project/pxe/src/pxe_service/pxe_service.ts +++ b/yarn-project/pxe/src/pxe_service/pxe_service.ts @@ -6,25 +6,6 @@ import { collectUnencryptedLogs, resolveOpcodeLocations, } from '@aztec/acir-simulator'; -import { - AztecAddress, - CallRequest, - CompleteAddress, - FunctionData, - GrumpkinPrivateKey, - KernelCircuitPublicInputsFinal, - MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX, - PartialAddress, - PublicCallRequest, -} from '@aztec/circuits.js'; -import { computeCommitmentNonce, siloNullifier } from '@aztec/circuits.js/abis'; -import { DecodedReturn, encodeArguments } from '@aztec/foundation/abi'; -import { 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 { Timer } from '@aztec/foundation/timer'; -import { NoirWasmVersion } from '@aztec/noir-compiler/versions'; import { AuthWitness, AztecNode, @@ -52,8 +33,27 @@ import { TxStatus, getNewContractPublicFunctions, isNoirCallStackUnresolved, -} from '@aztec/types'; -import { TxPXEProcessingStats } from '@aztec/types/stats'; +} from '@aztec/circuit-types'; +import { TxPXEProcessingStats } from '@aztec/circuit-types/stats'; +import { + AztecAddress, + CallRequest, + CompleteAddress, + FunctionData, + GrumpkinPrivateKey, + KernelCircuitPublicInputsFinal, + MAX_PUBLIC_CALL_STACK_LENGTH_PER_TX, + PartialAddress, + PublicCallRequest, +} from '@aztec/circuits.js'; +import { computeCommitmentNonce, siloNullifier } from '@aztec/circuits.js/abis'; +import { DecodedReturn, encodeArguments } from '@aztec/foundation/abi'; +import { 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 { Timer } from '@aztec/foundation/timer'; +import { NoirWasmVersion } from '@aztec/noir-compiler/versions'; import { PXEServiceConfig, getPackageInfo } from '../config/index.js'; import { ContractDataOracle } from '../contract_data_oracle/index.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 c1f35a4e760..aa5801a715b 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,9 +1,9 @@ +import { AztecNode, INITIAL_L2_BLOCK_NUM, L2Tx, PXE, mockTx } from '@aztec/circuit-types'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { L1ContractAddresses } from '@aztec/ethereum'; import { EthAddress } from '@aztec/foundation/eth-address'; import { TestKeyStore } from '@aztec/key-store'; import { AztecLmdbStore } from '@aztec/kv-store'; -import { AztecNode, INITIAL_L2_BLOCK_NUM, L2Tx, PXE, mockTx } from '@aztec/types'; import { MockProxy, mock } from 'jest-mock-extended'; 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 d23da97d651..869e400f731 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,7 +1,13 @@ +import { + DeployedContract, + INITIAL_L2_BLOCK_NUM, + PXE, + TxExecutionRequest, + randomDeployedContract, +} from '@aztec/circuit-types'; import { AztecAddress, CompleteAddress, Fr, FunctionData, Point, TxContext } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { ConstantKeyPair } from '@aztec/key-store'; -import { DeployedContract, INITIAL_L2_BLOCK_NUM, PXE, TxExecutionRequest, randomDeployedContract } from '@aztec/types'; export const pxeTestSuite = (testName: string, pxeSetup: () => Promise) => { describe(testName, () => { diff --git a/yarn-project/pxe/src/simulator/index.ts b/yarn-project/pxe/src/simulator/index.ts index 64abb774d20..48f72928065 100644 --- a/yarn-project/pxe/src/simulator/index.ts +++ b/yarn-project/pxe/src/simulator/index.ts @@ -1,5 +1,5 @@ import { AcirSimulator } from '@aztec/acir-simulator'; -import { KeyStore, StateInfoProvider } from '@aztec/types'; +import { KeyStore, StateInfoProvider } from '@aztec/circuit-types'; import { ContractDataOracle } from '../contract_data_oracle/index.js'; import { PxeDatabase } from '../database/pxe_database.js'; diff --git a/yarn-project/pxe/src/simulator_oracle/index.ts b/yarn-project/pxe/src/simulator_oracle/index.ts index 0d97403040f..7af6ca539d7 100644 --- a/yarn-project/pxe/src/simulator_oracle/index.ts +++ b/yarn-project/pxe/src/simulator_oracle/index.ts @@ -1,4 +1,12 @@ import { DBOracle, FunctionArtifactWithDebugMetadata, MessageLoadOracleInputs } from '@aztec/acir-simulator'; +import { + KeyStore, + L2Block, + MerkleTreeId, + NullifierMembershipWitness, + PublicDataWitness, + StateInfoProvider, +} from '@aztec/circuit-types'; import { AztecAddress, BlockHeader, @@ -10,14 +18,6 @@ import { PublicKey, } from '@aztec/circuits.js'; import { createDebugLogger } from '@aztec/foundation/log'; -import { - KeyStore, - L2Block, - MerkleTreeId, - NullifierMembershipWitness, - PublicDataWitness, - StateInfoProvider, -} from '@aztec/types'; import { ContractDataOracle } from '../contract_data_oracle/index.js'; import { PxeDatabase } from '../database/index.js'; diff --git a/yarn-project/pxe/src/synchronizer/synchronizer.test.ts b/yarn-project/pxe/src/synchronizer/synchronizer.test.ts index c910ca0c11c..19f10de11c8 100644 --- a/yarn-project/pxe/src/synchronizer/synchronizer.test.ts +++ b/yarn-project/pxe/src/synchronizer/synchronizer.test.ts @@ -1,9 +1,9 @@ +import { AztecNode, INITIAL_L2_BLOCK_NUM, L2Block, MerkleTreeId } from '@aztec/circuit-types'; import { BlockHeader, CompleteAddress, EthAddress, Fr, GrumpkinScalar } from '@aztec/circuits.js'; import { Grumpkin } from '@aztec/circuits.js/barretenberg'; import { SerialQueue } from '@aztec/foundation/fifo'; import { TestKeyStore } from '@aztec/key-store'; import { AztecLmdbStore } from '@aztec/kv-store'; -import { AztecNode, INITIAL_L2_BLOCK_NUM, L2Block, MerkleTreeId } from '@aztec/types'; import { MockProxy, mock } from 'jest-mock-extended'; import omit from 'lodash.omit'; diff --git a/yarn-project/pxe/src/synchronizer/synchronizer.ts b/yarn-project/pxe/src/synchronizer/synchronizer.ts index 04253c819c8..d0088fd9cc4 100644 --- a/yarn-project/pxe/src/synchronizer/synchronizer.ts +++ b/yarn-project/pxe/src/synchronizer/synchronizer.ts @@ -1,8 +1,3 @@ -import { AztecAddress, BlockHeader, Fr, PublicKey } from '@aztec/circuits.js'; -import { computeGlobalsHash } from '@aztec/circuits.js/abis'; -import { SerialQueue } from '@aztec/foundation/fifo'; -import { DebugLogger, createDebugLogger } from '@aztec/foundation/log'; -import { RunningPromise } from '@aztec/foundation/running-promise'; import { AztecNode, INITIAL_L2_BLOCK_NUM, @@ -12,8 +7,13 @@ import { LogType, MerkleTreeId, TxHash, -} from '@aztec/types'; -import { NoteProcessorCaughtUpStats } from '@aztec/types/stats'; +} from '@aztec/circuit-types'; +import { NoteProcessorCaughtUpStats } from '@aztec/circuit-types/stats'; +import { AztecAddress, BlockHeader, Fr, PublicKey } from '@aztec/circuits.js'; +import { computeGlobalsHash } from '@aztec/circuits.js/abis'; +import { SerialQueue } from '@aztec/foundation/fifo'; +import { 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'; diff --git a/yarn-project/pxe/tsconfig.json b/yarn-project/pxe/tsconfig.json index 907a410c56b..cfd0f2109fa 100644 --- a/yarn-project/pxe/tsconfig.json +++ b/yarn-project/pxe/tsconfig.json @@ -9,6 +9,9 @@ { "path": "../acir-simulator" }, + { + "path": "../circuit-types" + }, { "path": "../circuits.js" }, @@ -29,9 +32,6 @@ }, { "path": "../noir-protocol-circuits" - }, - { - "path": "../types" } ], "include": ["src"] diff --git a/yarn-project/scripts/package.json b/yarn-project/scripts/package.json index df218b1331d..72e86fe8921 100644 --- a/yarn-project/scripts/package.json +++ b/yarn-project/scripts/package.json @@ -23,8 +23,8 @@ "../package.common.json" ], "dependencies": { + "@aztec/circuit-types": "workspace:^", "@aztec/foundation": "workspace:^", - "@aztec/types": "workspace:^", "fs-extra": "^11.1.1", "lodash.pick": "^4.4.0", "tslib": "^2.4.0" diff --git a/yarn-project/scripts/src/benchmarks/aggregate.ts b/yarn-project/scripts/src/benchmarks/aggregate.ts index bb0dbb21fe1..9195b76904e 100644 --- a/yarn-project/scripts/src/benchmarks/aggregate.ts +++ b/yarn-project/scripts/src/benchmarks/aggregate.ts @@ -8,7 +8,6 @@ // // And then run this script from the yarn-project/scripts folder // LOG_FOLDER=../end-to-end/log yarn bench-aggregate -import { createConsoleLogger } from '@aztec/foundation/log'; import { BENCHMARK_BLOCK_SIZES, BENCHMARK_HISTORY_BLOCK_SIZE, @@ -28,7 +27,8 @@ import { TxAddedToPoolStats, TxPXEProcessingStats, TxSequencerProcessingStats, -} from '@aztec/types/stats'; +} from '@aztec/circuit-types/stats'; +import { createConsoleLogger } from '@aztec/foundation/log'; import * as fs from 'fs'; import { mkdirpSync } from 'fs-extra'; diff --git a/yarn-project/scripts/src/benchmarks/markdown.ts b/yarn-project/scripts/src/benchmarks/markdown.ts index 163db3beefa..4db86e19e23 100644 --- a/yarn-project/scripts/src/benchmarks/markdown.ts +++ b/yarn-project/scripts/src/benchmarks/markdown.ts @@ -1,7 +1,7 @@ // Generate a markdown file with a table summary of the aggregated benchmarks. // If a benchmark-base file is available, shows the comparison against base (ie master in a PR). +import { BENCHMARK_HISTORY_BLOCK_SIZE, Metrics } from '@aztec/circuit-types/stats'; import { createConsoleLogger } from '@aztec/foundation/log'; -import { BENCHMARK_HISTORY_BLOCK_SIZE, Metrics } from '@aztec/types/stats'; import * as fs from 'fs'; import pick from 'lodash.pick'; diff --git a/yarn-project/scripts/tsconfig.json b/yarn-project/scripts/tsconfig.json index 831130c7c84..904b812a155 100644 --- a/yarn-project/scripts/tsconfig.json +++ b/yarn-project/scripts/tsconfig.json @@ -7,10 +7,10 @@ }, "references": [ { - "path": "../foundation" + "path": "../circuit-types" }, { - "path": "../types" + "path": "../foundation" } ], "include": ["src"] diff --git a/yarn-project/sequencer-client/package.json b/yarn-project/sequencer-client/package.json index 8286edf3444..9cb67d3eeae 100644 --- a/yarn-project/sequencer-client/package.json +++ b/yarn-project/sequencer-client/package.json @@ -33,6 +33,7 @@ }, "dependencies": { "@aztec/acir-simulator": "workspace:^", + "@aztec/circuit-types": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/ethereum": "workspace:^", "@aztec/foundation": "workspace:^", @@ -40,7 +41,6 @@ "@aztec/merkle-tree": "workspace:^", "@aztec/noir-protocol-circuits": "workspace:^", "@aztec/p2p": "workspace:^", - "@aztec/types": "workspace:^", "@aztec/world-state": "workspace:^", "lodash.chunk": "^4.2.0", "lodash.pick": "^4.4.0", diff --git a/yarn-project/sequencer-client/src/block_builder/index.ts b/yarn-project/sequencer-client/src/block_builder/index.ts index a3679494ef2..df283609c32 100644 --- a/yarn-project/sequencer-client/src/block_builder/index.ts +++ b/yarn-project/sequencer-client/src/block_builder/index.ts @@ -1,6 +1,6 @@ +import { L2Block } from '@aztec/circuit-types'; import { GlobalVariables, Proof } from '@aztec/circuits.js'; import { Fr } from '@aztec/foundation/fields'; -import { L2Block } from '@aztec/types'; import { ProcessedTx } from '../sequencer/processed_tx.js'; diff --git a/yarn-project/sequencer-client/src/block_builder/solo_block_builder.test.ts b/yarn-project/sequencer-client/src/block_builder/solo_block_builder.test.ts index 84016aae8f4..d0e5b8ff6d6 100644 --- a/yarn-project/sequencer-client/src/block_builder/solo_block_builder.test.ts +++ b/yarn-project/sequencer-client/src/block_builder/solo_block_builder.test.ts @@ -1,3 +1,15 @@ +import { + ContractData, + ExtendedContractData, + L2Block, + L2BlockL2Logs, + MerkleTreeId, + PublicDataWrite, + Tx, + TxL2Logs, + makeEmptyLogs, + mockTx, +} from '@aztec/circuit-types'; import { AppendOnlyTreeSnapshot, BaseOrMergeRollupPublicInputs, @@ -37,18 +49,6 @@ import { } from '@aztec/circuits.js/factories'; import { toBufferBE } from '@aztec/foundation/bigint-buffer'; import { to2Fields } from '@aztec/foundation/serialize'; -import { - ContractData, - ExtendedContractData, - L2Block, - L2BlockL2Logs, - MerkleTreeId, - PublicDataWrite, - Tx, - TxL2Logs, - makeEmptyLogs, - mockTx, -} from '@aztec/types'; import { MerkleTreeOperations, MerkleTrees } from '@aztec/world-state'; import { MockProxy, mock } from 'jest-mock-extended'; diff --git a/yarn-project/sequencer-client/src/block_builder/solo_block_builder.ts b/yarn-project/sequencer-client/src/block_builder/solo_block_builder.ts index 1e46f17c933..08d44b2c39f 100644 --- a/yarn-project/sequencer-client/src/block_builder/solo_block_builder.ts +++ b/yarn-project/sequencer-client/src/block_builder/solo_block_builder.ts @@ -1,3 +1,4 @@ +import { ContractData, L2Block, L2BlockL2Logs, MerkleTreeId, PublicDataWrite, TxL2Logs } from '@aztec/circuit-types'; import { ARCHIVE_HEIGHT, AppendOnlyTreeSnapshot, @@ -54,7 +55,6 @@ import { padArrayEnd } from '@aztec/foundation/collection'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; import { Tuple, assertLength } from '@aztec/foundation/serialize'; -import { ContractData, L2Block, L2BlockL2Logs, MerkleTreeId, PublicDataWrite, TxL2Logs } from '@aztec/types'; import { MerkleTreeOperations } from '@aztec/world-state'; import chunk from 'lodash.chunk'; diff --git a/yarn-project/sequencer-client/src/client/sequencer-client.ts b/yarn-project/sequencer-client/src/client/sequencer-client.ts index ea0261c07e6..e826a761262 100644 --- a/yarn-project/sequencer-client/src/client/sequencer-client.ts +++ b/yarn-project/sequencer-client/src/client/sequencer-client.ts @@ -1,5 +1,5 @@ +import { ContractDataSource, L1ToL2MessageSource, L2BlockSource } from '@aztec/circuit-types'; import { P2P } from '@aztec/p2p'; -import { ContractDataSource, L1ToL2MessageSource, L2BlockSource } from '@aztec/types'; import { WorldStateSynchronizer } from '@aztec/world-state'; import { SoloBlockBuilder } from '../block_builder/solo_block_builder.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 00e64f64026..123203a59dd 100644 --- a/yarn-project/sequencer-client/src/publisher/l1-publisher.test.ts +++ b/yarn-project/sequencer-client/src/publisher/l1-publisher.test.ts @@ -1,4 +1,4 @@ -import { L2Block } from '@aztec/types'; +import { L2Block } from '@aztec/circuit-types'; import { MockProxy, mock } from 'jest-mock-extended'; diff --git a/yarn-project/sequencer-client/src/publisher/l1-publisher.ts b/yarn-project/sequencer-client/src/publisher/l1-publisher.ts index 9d300568960..d30b32de766 100644 --- a/yarn-project/sequencer-client/src/publisher/l1-publisher.ts +++ b/yarn-project/sequencer-client/src/publisher/l1-publisher.ts @@ -1,7 +1,7 @@ +import { ExtendedContractData, L2Block } from '@aztec/circuit-types'; +import { L1PublishStats } from '@aztec/circuit-types/stats'; import { createDebugLogger } from '@aztec/foundation/log'; import { InterruptibleSleep } from '@aztec/foundation/sleep'; -import { ExtendedContractData, L2Block } from '@aztec/types'; -import { L1PublishStats } from '@aztec/types/stats'; import pick from 'lodash.pick'; 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 fc4db14df53..89a3037ec32 100644 --- a/yarn-project/sequencer-client/src/publisher/viem-tx-sender.ts +++ b/yarn-project/sequencer-client/src/publisher/viem-tx-sender.ts @@ -1,7 +1,7 @@ +import { BLOB_SIZE_IN_BYTES, ExtendedContractData } from '@aztec/circuit-types'; import { createEthereumChain } from '@aztec/ethereum'; import { createDebugLogger } from '@aztec/foundation/log'; import { ContractDeploymentEmitterAbi, RollupAbi } from '@aztec/l1-artifacts'; -import { BLOB_SIZE_IN_BYTES, ExtendedContractData } from '@aztec/types'; import { GetContractReturnType, diff --git a/yarn-project/sequencer-client/src/receiver.ts b/yarn-project/sequencer-client/src/receiver.ts index 1d82470a895..f731a8f8504 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/types'; +import { 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/config.ts b/yarn-project/sequencer-client/src/sequencer/config.ts index 43585a9bcba..22278911935 100644 --- a/yarn-project/sequencer-client/src/sequencer/config.ts +++ b/yarn-project/sequencer-client/src/sequencer/config.ts @@ -1 +1 @@ -export { SequencerConfig } from '@aztec/types'; +export { SequencerConfig } from '@aztec/circuit-types'; diff --git a/yarn-project/sequencer-client/src/sequencer/processed_tx.ts b/yarn-project/sequencer-client/src/sequencer/processed_tx.ts index b3d098acb47..20df25c26b1 100644 --- a/yarn-project/sequencer-client/src/sequencer/processed_tx.ts +++ b/yarn-project/sequencer-client/src/sequencer/processed_tx.ts @@ -1,3 +1,4 @@ +import { ExtendedContractData, Tx, TxHash, TxL2Logs } from '@aztec/circuit-types'; import { BlockHeader, CombinedAccumulatedData, @@ -6,7 +7,6 @@ import { PublicKernelPublicInputs, makeEmptyProof, } from '@aztec/circuits.js'; -import { ExtendedContractData, Tx, TxHash, TxL2Logs } from '@aztec/types'; /** * Represents a tx that has been processed by the sequencer public processor, 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 ca45e5353d8..787554b6c5b 100644 --- a/yarn-project/sequencer-client/src/sequencer/public_processor.test.ts +++ b/yarn-project/sequencer-client/src/sequencer/public_processor.test.ts @@ -1,4 +1,14 @@ import { PublicExecution, PublicExecutionResult, PublicExecutor } from '@aztec/acir-simulator'; +import { + ExtendedContractData, + FunctionCall, + FunctionL2Logs, + SiblingPath, + SimulationError, + Tx, + TxL2Logs, + mockTx, +} from '@aztec/circuit-types'; import { ARGS_LENGTH, AztecAddress, @@ -26,16 +36,6 @@ import { makeSelector, } from '@aztec/circuits.js/factories'; import { padArrayEnd } from '@aztec/foundation/collection'; -import { - ExtendedContractData, - FunctionCall, - FunctionL2Logs, - SiblingPath, - SimulationError, - Tx, - TxL2Logs, - mockTx, -} from '@aztec/types'; import { MerkleTreeOperations, TreeInfo } from '@aztec/world-state'; import { MockProxy, mock } from 'jest-mock-extended'; diff --git a/yarn-project/sequencer-client/src/sequencer/public_processor.ts b/yarn-project/sequencer-client/src/sequencer/public_processor.ts index 88b470bd834..f48eebbecfe 100644 --- a/yarn-project/sequencer-client/src/sequencer/public_processor.ts +++ b/yarn-project/sequencer-client/src/sequencer/public_processor.ts @@ -7,6 +7,8 @@ import { collectPublicDataUpdateRequests, isPublicExecutionResult, } from '@aztec/acir-simulator'; +import { ContractDataSource, FunctionL2Logs, L1ToL2MessageSource, MerkleTreeId, Tx } from '@aztec/circuit-types'; +import { TxSequencerProcessingStats } from '@aztec/circuit-types/stats'; import { AztecAddress, BlockHeader, @@ -45,8 +47,6 @@ import { arrayNonEmptyLength, isArrayEmpty, padArrayEnd } from '@aztec/foundatio import { createDebugLogger } from '@aztec/foundation/log'; import { to2Fields } from '@aztec/foundation/serialize'; import { Timer } from '@aztec/foundation/timer'; -import { ContractDataSource, FunctionL2Logs, L1ToL2MessageSource, MerkleTreeId, Tx } from '@aztec/types'; -import { TxSequencerProcessingStats } from '@aztec/types/stats'; import { MerkleTreeOperations } from '@aztec/world-state'; import { getVerificationKeys } from '../index.js'; diff --git a/yarn-project/sequencer-client/src/sequencer/sequencer.test.ts b/yarn-project/sequencer-client/src/sequencer/sequencer.test.ts index 663b3e5d2f2..799ec870bd9 100644 --- a/yarn-project/sequencer-client/src/sequencer/sequencer.test.ts +++ b/yarn-project/sequencer-client/src/sequencer/sequencer.test.ts @@ -1,3 +1,4 @@ +import { L1ToL2MessageSource, L2Block, L2BlockSource, MerkleTreeId, Tx, TxHash, mockTx } from '@aztec/circuit-types'; import { BlockHeader, Fr, @@ -6,7 +7,6 @@ import { makeEmptyProof, } from '@aztec/circuits.js'; import { P2P, P2PClientState } from '@aztec/p2p'; -import { L1ToL2MessageSource, L2Block, L2BlockSource, MerkleTreeId, Tx, TxHash, mockTx } from '@aztec/types'; import { MerkleTreeOperations, WorldStateRunningState, WorldStateSynchronizer } from '@aztec/world-state'; import { MockProxy, mock, mockFn } from 'jest-mock-extended'; diff --git a/yarn-project/sequencer-client/src/sequencer/sequencer.ts b/yarn-project/sequencer-client/src/sequencer/sequencer.ts index 0817a15367f..bbb9a6af75c 100644 --- a/yarn-project/sequencer-client/src/sequencer/sequencer.ts +++ b/yarn-project/sequencer-client/src/sequencer/sequencer.ts @@ -1,11 +1,11 @@ +import { L1ToL2MessageSource, L2Block, L2BlockSource, MerkleTreeId, Tx } from '@aztec/circuit-types'; +import { L2BlockBuiltStats } from '@aztec/circuit-types/stats'; import { 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 { L1ToL2MessageSource, L2Block, L2BlockSource, MerkleTreeId, Tx } from '@aztec/types'; -import { L2BlockBuiltStats } from '@aztec/types/stats'; import { WorldStateStatus, WorldStateSynchronizer } from '@aztec/world-state'; import times from 'lodash.times'; diff --git a/yarn-project/sequencer-client/src/simulator/public_executor.ts b/yarn-project/sequencer-client/src/simulator/public_executor.ts index d17ffa36758..9015fb06bc4 100644 --- a/yarn-project/sequencer-client/src/simulator/public_executor.ts +++ b/yarn-project/sequencer-client/src/simulator/public_executor.ts @@ -1,7 +1,7 @@ import { CommitmentsDB, MessageLoadOracleInputs, PublicContractsDB, PublicStateDB } from '@aztec/acir-simulator'; +import { ContractDataSource, ExtendedContractData, L1ToL2MessageSource, MerkleTreeId, Tx } from '@aztec/circuit-types'; import { AztecAddress, EthAddress, Fr, FunctionSelector, PublicDataTreeLeafPreimage } from '@aztec/circuits.js'; import { computePublicDataTreeLeafSlot } from '@aztec/circuits.js/abis'; -import { ContractDataSource, ExtendedContractData, L1ToL2MessageSource, MerkleTreeId, Tx } from '@aztec/types'; import { MerkleTreeOperations } from '@aztec/world-state'; /** diff --git a/yarn-project/sequencer-client/src/simulator/public_kernel.ts b/yarn-project/sequencer-client/src/simulator/public_kernel.ts index dbbbe9fc268..7877c28eef8 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 { PublicKernelInputs, PublicKernelPublicInputs } from '@aztec/circuits.js'; import { createDebugLogger } from '@aztec/foundation/log'; import { elapsed } from '@aztec/foundation/timer'; import { executePublicKernelPrivatePrevious, executePublicKernelPublicPrevious } from '@aztec/noir-protocol-circuits'; -import { CircuitSimulationStats } from '@aztec/types/stats'; import { PublicKernelCircuitSimulator } from './index.js'; diff --git a/yarn-project/sequencer-client/src/simulator/rollup.ts b/yarn-project/sequencer-client/src/simulator/rollup.ts index f83015f2d4d..b8003df7c5e 100644 --- a/yarn-project/sequencer-client/src/simulator/rollup.ts +++ b/yarn-project/sequencer-client/src/simulator/rollup.ts @@ -1,3 +1,4 @@ +import { CircuitSimulationStats } from '@aztec/circuit-types/stats'; import { BaseOrMergeRollupPublicInputs, BaseRollupInputs, @@ -8,7 +9,6 @@ import { import { createDebugLogger } from '@aztec/foundation/log'; import { elapsed } from '@aztec/foundation/timer'; import { executeBaseRollup, executeMergeRollup, executeRootRollup } from '@aztec/noir-protocol-circuits'; -import { CircuitSimulationStats } from '@aztec/types/stats'; import { RollupSimulator } from './index.js'; 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 8a494ba1818..acfa1675c32 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,7 +1,7 @@ +import { MerkleTreeId } from '@aztec/circuit-types'; import { AztecAddress, Fr, PublicDataTreeLeafPreimage } from '@aztec/circuits.js'; import { computePublicDataTreeLeafSlot } from '@aztec/circuits.js/abis'; import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; -import { MerkleTreeId } from '@aztec/types'; import { MerkleTreeOperations } from '@aztec/world-state'; import { MockProxy, mock } from 'jest-mock-extended'; diff --git a/yarn-project/sequencer-client/tsconfig.json b/yarn-project/sequencer-client/tsconfig.json index 5edd5d2a2d3..5d388dd4472 100644 --- a/yarn-project/sequencer-client/tsconfig.json +++ b/yarn-project/sequencer-client/tsconfig.json @@ -9,6 +9,9 @@ { "path": "../acir-simulator" }, + { + "path": "../circuit-types" + }, { "path": "../circuits.js" }, @@ -30,9 +33,6 @@ { "path": "../p2p" }, - { - "path": "../types" - }, { "path": "../world-state" } diff --git a/yarn-project/tsconfig.json b/yarn-project/tsconfig.json index b5dcf4fc843..474964835e3 100644 --- a/yarn-project/tsconfig.json +++ b/yarn-project/tsconfig.json @@ -27,6 +27,7 @@ { "path": "pxe/tsconfig.json" }, { "path": "aztec-sandbox/tsconfig.json" }, { "path": "circuits.js/tsconfig.json" }, + { "path": "circuit-types/tsconfig.json" }, { "path": "cli/tsconfig.json" }, { "path": "end-to-end/tsconfig.json" }, { "path": "foundation/tsconfig.json" }, @@ -40,7 +41,6 @@ { "path": "p2p-bootstrap/tsconfig.json" }, { "path": "prover-client/tsconfig.json" }, { "path": "sequencer-client/tsconfig.json" }, - { "path": "types/tsconfig.json" }, { "path": "world-state/tsconfig.json" }, { "path": "scripts/tsconfig.json" } ], diff --git a/yarn-project/world-state/package.json b/yarn-project/world-state/package.json index 4713b486a60..402d3a6bd9c 100644 --- a/yarn-project/world-state/package.json +++ b/yarn-project/world-state/package.json @@ -30,10 +30,10 @@ "rootDir": "./src" }, "dependencies": { + "@aztec/circuit-types": "workspace:^", "@aztec/circuits.js": "workspace:^", "@aztec/foundation": "workspace:^", "@aztec/merkle-tree": "workspace:^", - "@aztec/types": "workspace:^", "levelup": "^5.1.1", "lodash.times": "^4.3.2", "memdown": "^6.1.1", 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 1bd846ee4d5..6fc22d50528 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,8 +1,8 @@ +import { L2Block, L2BlockSource, MerkleTreeId, SiblingPath } from '@aztec/circuit-types'; import { Fr } from '@aztec/circuits.js'; import { createDebugLogger } from '@aztec/foundation/log'; import { sleep } from '@aztec/foundation/sleep'; import { INITIAL_LEAF, Pedersen } from '@aztec/merkle-tree'; -import { L2Block, L2BlockSource, MerkleTreeId, SiblingPath } from '@aztec/types'; import { jest } from '@jest/globals'; import { mock } from 'jest-mock-extended'; 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 a064f6ae1af..ee0349ade38 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,8 +1,8 @@ +import { L2Block, L2BlockDownloader, L2BlockSource } from '@aztec/circuit-types'; +import { L2BlockHandledStats } from '@aztec/circuit-types/stats'; import { SerialQueue } from '@aztec/foundation/fifo'; import { createDebugLogger } from '@aztec/foundation/log'; import { elapsed } from '@aztec/foundation/timer'; -import { L2Block, L2BlockDownloader, L2BlockSource } from '@aztec/types'; -import { L2BlockHandledStats } from '@aztec/types/stats'; import { LevelUp } from 'levelup'; 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 ee57f8eaf54..c62b96d3db1 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,9 +1,9 @@ +import { L2Block, MerkleTreeId, SiblingPath } from '@aztec/circuit-types'; import { NullifierLeafPreimage } from '@aztec/circuits.js'; import { Fr } from '@aztec/foundation/fields'; import { createDebugLogger } from '@aztec/foundation/log'; import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; import { BatchInsertionResult } from '@aztec/merkle-tree'; -import { L2Block, MerkleTreeId, SiblingPath } from '@aztec/types'; /** * 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 9f82810f855..6d8127897d6 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,8 +1,8 @@ +import { L2Block, MerkleTreeId, SiblingPath } from '@aztec/circuit-types'; import { NullifierLeafPreimage } from '@aztec/circuits.js'; import { Fr } from '@aztec/foundation/fields'; import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; import { BatchInsertionResult } from '@aztec/merkle-tree'; -import { L2Block, MerkleTreeId, SiblingPath } from '@aztec/types'; import { MerkleTreeDb } from './merkle_tree_db.js'; import { CurrentTreeRoots, HandleL2BlockResult, MerkleTreeOperations, 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 c5217164fce..20289635ecf 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,7 +1,7 @@ +import { MerkleTreeId, SiblingPath } from '@aztec/circuit-types'; import { Fr } from '@aztec/circuits.js'; import { IndexedTreeLeafPreimage } from '@aztec/foundation/trees'; import { BatchInsertionResult, IndexedTreeSnapshot, TreeSnapshot } from '@aztec/merkle-tree'; -import { MerkleTreeId, SiblingPath } from '@aztec/types'; import { MerkleTreeDb } from './merkle_tree_db.js'; import { CurrentTreeRoots, HandleL2BlockResult, MerkleTreeOperations, 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 f99277326a8..8bf0a576282 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,3 +1,4 @@ +import { Hasher, L2Block, MerkleTreeId, SiblingPath } from '@aztec/circuit-types'; import { ARCHIVE_HEIGHT, CONTRACT_TREE_HEIGHT, @@ -31,7 +32,6 @@ import { loadTree, newTree, } from '@aztec/merkle-tree'; -import { Hasher, L2Block, MerkleTreeId, SiblingPath } from '@aztec/types'; import { default as levelup } from 'levelup'; diff --git a/yarn-project/world-state/tsconfig.json b/yarn-project/world-state/tsconfig.json index da9ae2e020e..2f4e3a853a2 100644 --- a/yarn-project/world-state/tsconfig.json +++ b/yarn-project/world-state/tsconfig.json @@ -6,6 +6,9 @@ "tsBuildInfoFile": ".tsbuildinfo" }, "references": [ + { + "path": "../circuit-types" + }, { "path": "../circuits.js" }, @@ -14,9 +17,6 @@ }, { "path": "../merkle-tree" - }, - { - "path": "../types" } ], "include": ["src"] diff --git a/yarn-project/yarn.lock b/yarn-project/yarn.lock index 1583b24e83e..9c0efe6bdcc 100644 --- a/yarn-project/yarn.lock +++ b/yarn-project/yarn.lock @@ -62,10 +62,10 @@ __metadata: resolution: "@aztec/accounts@workspace:accounts" dependencies: "@aztec/aztec.js": "workspace:^" + "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" - "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 @@ -83,11 +83,11 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/acir-simulator@workspace:acir-simulator" dependencies: + "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/merkle-tree": "workspace:^" "@aztec/noir-contracts": "workspace:^" - "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 "@noir-lang/acvm_js": "portal:../../noir/packages/acvm_js" "@types/jest": ^29.5.0 @@ -110,11 +110,11 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/archiver@workspace:archiver" dependencies: + "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/l1-artifacts": "workspace:^" - "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 "@types/debug": ^4.1.7 "@types/jest": ^29.5.0 @@ -165,6 +165,7 @@ __metadata: resolution: "@aztec/aztec-node@workspace:aztec-node" dependencies: "@aztec/archiver": "workspace:^" + "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" @@ -173,7 +174,6 @@ __metadata: "@aztec/merkle-tree": "workspace:^" "@aztec/p2p": "workspace:^" "@aztec/sequencer-client": "workspace:^" - "@aztec/types": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": ^29.5.0 "@types/jest": ^29.5.0 @@ -203,6 +203,7 @@ __metadata: "@aztec/accounts": "workspace:^" "@aztec/aztec-node": "workspace:^" "@aztec/aztec.js": "workspace:^" + "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" @@ -211,7 +212,6 @@ __metadata: "@aztec/noir-contracts": "workspace:^" "@aztec/p2p": "workspace:^" "@aztec/pxe": "workspace:^" - "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 "@types/jest": ^29.5.0 "@types/koa": ^2.13.6 @@ -234,10 +234,10 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/aztec.js@workspace:aztec.js" dependencies: + "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" - "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 @@ -289,6 +289,32 @@ __metadata: languageName: node linkType: soft +"@aztec/circuit-types@workspace:^, @aztec/circuit-types@workspace:circuit-types": + version: 0.0.0-use.local + resolution: "@aztec/circuit-types@workspace:circuit-types" + dependencies: + "@aztec/circuits.js": "workspace:^" + "@aztec/ethereum": "workspace:^" + "@aztec/foundation": "workspace:^" + "@jest/globals": ^29.5.0 + "@types/jest": ^29.5.0 + "@types/lodash.clonedeep": ^4.5.7 + "@types/lodash.isequal": ^4.5.6 + "@types/lodash.times": ^4.3.7 + "@types/node": ^18.7.23 + browserify-cipher: ^1.0.1 + jest: ^29.5.0 + jest-mock-extended: ^3.0.3 + lodash.clonedeep: ^4.5.0 + lodash.isequal: ^4.5.0 + lodash.times: ^4.3.2 + ts-jest: ^29.1.0 + ts-node: ^10.9.1 + tslib: ^2.5.0 + typescript: ^5.0.4 + languageName: unknown + linkType: soft + "@aztec/circuits.js@workspace:^, @aztec/circuits.js@workspace:circuits.js": version: 0.0.0-use.local resolution: "@aztec/circuits.js@workspace:circuits.js" @@ -318,12 +344,12 @@ __metadata: dependencies: "@aztec/accounts": "workspace:^" "@aztec/aztec.js": "workspace:^" + "@aztec/circuit-types": "workspace:^" "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/l1-artifacts": "workspace:^" "@aztec/noir-compiler": "workspace:^" "@aztec/noir-contracts": "workspace:^" - "@aztec/types": "workspace:^" "@iarna/toml": ^2.2.5 "@jest/globals": ^29.5.0 "@libp2p/peer-id-factory": ^3.0.4 @@ -366,6 +392,7 @@ __metadata: "@aztec/archiver": "workspace:^" "@aztec/aztec-node": "workspace:^" "@aztec/aztec.js": "workspace:^" + "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/cli": "workspace:^" "@aztec/ethereum": "workspace:^" @@ -376,7 +403,6 @@ __metadata: "@aztec/p2p": "workspace:^" "@aztec/pxe": "workspace:^" "@aztec/sequencer-client": "workspace:^" - "@aztec/types": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": ^29.5.0 "@noble/curves": ^1.0.0 @@ -502,10 +528,10 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/key-store@workspace:key-store" dependencies: + "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/kv-store": "workspace:^" - "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 "@types/jest": ^29.5.0 "@types/node": ^18.7.23 @@ -549,9 +575,9 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/merkle-tree@workspace:merkle-tree" dependencies: + "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/foundation": "workspace:^" - "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 "@types/jest": ^29.5.0 "@types/levelup": ^5.1.2 @@ -625,11 +651,11 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/noir-protocol-circuits@workspace:noir-protocol-circuits" dependencies: + "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/merkle-tree": "workspace:^" "@aztec/noir-compiler": "workspace:^" - "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 "@noir-lang/acvm_js": "portal:../../noir/packages/acvm_js" "@noir-lang/backend_barretenberg": "portal:../../noir/packages/backend_barretenberg" @@ -669,10 +695,10 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/p2p@workspace:p2p" dependencies: + "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/kv-store": "workspace:^" - "@aztec/types": "workspace:^" "@chainsafe/libp2p-noise": ^13.0.0 "@chainsafe/libp2p-yamux": ^5.0.0 "@jest/globals": ^29.5.0 @@ -722,6 +748,7 @@ __metadata: resolution: "@aztec/pxe@workspace:pxe" dependencies: "@aztec/acir-simulator": "workspace:^" + "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" @@ -729,7 +756,6 @@ __metadata: "@aztec/kv-store": "workspace:^" "@aztec/noir-compiler": "workspace:^" "@aztec/noir-protocol-circuits": "workspace:^" - "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 "@types/jest": ^29.5.0 "@types/lodash.omit": ^4.5.7 @@ -756,8 +782,8 @@ __metadata: version: 0.0.0-use.local resolution: "@aztec/scripts@workspace:scripts" dependencies: + "@aztec/circuit-types": "workspace:^" "@aztec/foundation": "workspace:^" - "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 "@types/jest": ^29.5.0 "@types/lodash.pick": ^4.4.7 @@ -781,6 +807,7 @@ __metadata: resolution: "@aztec/sequencer-client@workspace:sequencer-client" dependencies: "@aztec/acir-simulator": "workspace:^" + "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/ethereum": "workspace:^" "@aztec/foundation": "workspace:^" @@ -788,7 +815,6 @@ __metadata: "@aztec/merkle-tree": "workspace:^" "@aztec/noir-protocol-circuits": "workspace:^" "@aztec/p2p": "workspace:^" - "@aztec/types": "workspace:^" "@aztec/world-state": "workspace:^" "@jest/globals": ^29.5.0 "@types/jest": ^29.5.0 @@ -816,40 +842,14 @@ __metadata: languageName: unknown linkType: soft -"@aztec/types@workspace:^, @aztec/types@workspace:types": - version: 0.0.0-use.local - resolution: "@aztec/types@workspace:types" - dependencies: - "@aztec/circuits.js": "workspace:^" - "@aztec/ethereum": "workspace:^" - "@aztec/foundation": "workspace:^" - "@jest/globals": ^29.5.0 - "@types/jest": ^29.5.0 - "@types/lodash.clonedeep": ^4.5.7 - "@types/lodash.isequal": ^4.5.6 - "@types/lodash.times": ^4.3.7 - "@types/node": ^18.7.23 - browserify-cipher: ^1.0.1 - jest: ^29.5.0 - jest-mock-extended: ^3.0.3 - lodash.clonedeep: ^4.5.0 - lodash.isequal: ^4.5.0 - lodash.times: ^4.3.2 - ts-jest: ^29.1.0 - ts-node: ^10.9.1 - tslib: ^2.5.0 - typescript: ^5.0.4 - languageName: unknown - linkType: soft - "@aztec/world-state@workspace:^, @aztec/world-state@workspace:world-state": version: 0.0.0-use.local resolution: "@aztec/world-state@workspace:world-state" dependencies: + "@aztec/circuit-types": "workspace:^" "@aztec/circuits.js": "workspace:^" "@aztec/foundation": "workspace:^" "@aztec/merkle-tree": "workspace:^" - "@aztec/types": "workspace:^" "@jest/globals": ^29.5.0 "@types/jest": ^29.5.0 "@types/levelup": ^5.1.2