Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion yarn-project/accounts/src/defaults/account_contract.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AccountContract, AccountInterface, AuthWitnessProvider } from '@aztec/aztec.js/account';
import { CompleteAddress, NodeInfo } from '@aztec/circuit-types';
import { CompleteAddress } from '@aztec/circuit-types';
import { NodeInfo } from '@aztec/types/interfaces';
import { ContractArtifact } from '@aztec/foundation/abi';

import { DefaultAccountInterface } from '../defaults/account_interface.js';
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/accounts/src/defaults/account_interface.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AccountInterface, AuthWitnessProvider, EntrypointInterface } from '@aztec/aztec.js/account';
import { AuthWitness, FunctionCall, NodeInfo, TxExecutionRequest } from '@aztec/circuit-types';
import { AuthWitness, FunctionCall, TxExecutionRequest } from '@aztec/circuit-types';
import { NodeInfo } from '@aztec/types/interfaces';
import { CompleteAddress, Fr } from '@aztec/circuits.js';

import { DefaultAccountEntrypoint } from './account_entrypoint.js';
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/aztec.js/src/account/contract.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { CompleteAddress, NodeInfo } from '@aztec/circuit-types';
import { CompleteAddress } from '@aztec/circuit-types';
import { NodeInfo } from '@aztec/types/interfaces';
import { ContractArtifact } from '@aztec/foundation/abi';

import { AccountInterface } from './interface.js';
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/aztec.js/src/contract/contract.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ExtendedContractData, NodeInfo, Tx, TxExecutionRequest, TxHash, TxReceipt } from '@aztec/circuit-types';
import { ExtendedContractData, Tx, TxExecutionRequest, TxHash, TxReceipt } from '@aztec/circuit-types';
import { NodeInfo } from '@aztec/types/interfaces';
import { AztecAddress, CompleteAddress, EthAddress } from '@aztec/circuits.js';
import { L1ContractAddresses } from '@aztec/ethereum';
import { ABIParameterVisibility, ContractArtifact, FunctionType } from '@aztec/foundation/abi';
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/aztec.js/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ export {
LogId,
LogType,
MerkleTreeId,
NodeInfo,
Note,
PXE,
PackedArguments,
Expand All @@ -110,6 +109,8 @@ export {
mockTx,
} from '@aztec/circuit-types';

export { NodeInfo } from '@aztec/types/interfaces';

// TODO: These kinds of things have no place on our public api.
// External devs will almost certainly have their own methods of doing these things.
// If we want to use them in our own "aztec.js consuming code", import them from foundation as needed.
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/aztec.js/src/wallet/base_wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
L2Block,
L2Tx,
LogFilter,
NodeInfo,
NoteFilter,
PXE,
SyncStatus,
Expand All @@ -18,6 +17,7 @@ import {
TxHash,
TxReceipt,
} from '@aztec/circuit-types';
import { NodeInfo } from '@aztec/types/interfaces';
import { AztecAddress, CompleteAddress, Fr, GrumpkinPrivateKey, PartialAddress } from '@aztec/circuits.js';

import { Wallet } from '../account/wallet.js';
Expand Down
4 changes: 2 additions & 2 deletions yarn-project/circuit-types/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Types
A package containing types which are relevant through all the Aztec Typescript codebase (L2Block, Tx etc.).
# Circuit Types
A package containing circuit dependent types which are relevant through all the Aztec Typescript codebase.
3 changes: 2 additions & 1 deletion yarn-project/circuit-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"entryPoints": [
"./src/index.ts"
],
"name": "Aztec 3 Types",
"name": "Aztec 3 Circuit Types",
"tsconfig": "./tsconfig.json"
},
"scripts": {
Expand All @@ -40,6 +40,7 @@
"@aztec/circuits.js": "workspace:^",
"@aztec/ethereum": "workspace:^",
"@aztec/foundation": "workspace:^",
"@aztec/types": "workspace:^",
"browserify-cipher": "^1.0.1",
"lodash.clonedeep": "^4.5.0",
"lodash.isequal": "^4.5.0",
Expand Down
1 change: 0 additions & 1 deletion yarn-project/circuit-types/src/interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export * from './hasher.js';
export * from './aztec-node.js';
export * from './pxe.js';
export * from './deployed-contract.js';
export * from './node-info.js';
export * from './sync-status.js';
export * from './configs.js';
export * from './nullifier_tree.js';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/circuit-types/src/interfaces/pxe.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AztecAddress, CompleteAddress, Fr, GrumpkinPrivateKey, PartialAddress } from '@aztec/circuits.js';
import { NodeInfo } from '@aztec/types/interfaces';

import { AuthWitness } from '../auth_witness.js';
import { ContractData, ExtendedContractData } from '../contract_data.js';
Expand All @@ -10,7 +11,6 @@ import { NoteFilter } from '../notes/note_filter.js';
import { Tx, TxHash, TxReceipt } from '../tx/index.js';
import { TxExecutionRequest } from '../tx_execution_request.js';
import { DeployedContract } from './deployed-contract.js';
import { NodeInfo } from './node-info.js';
import { SyncStatus } from './sync-status.js';

// docs:start:pxe-interface
Expand Down
3 changes: 3 additions & 0 deletions yarn-project/circuit-types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
},
{
"path": "../foundation"
},
{
"path": "../types"
}
],
"include": ["src"]
Expand Down
3 changes: 2 additions & 1 deletion yarn-project/cli/src/client.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { NodeInfo, PXE } from '@aztec/circuit-types';
import { PXE } from '@aztec/circuit-types';
import { NodeInfo } from '@aztec/types/interfaces';

import { MockProxy, mock } from 'jest-mock-extended';

Expand Down
1 change: 1 addition & 0 deletions yarn-project/deploy_npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ function deploy_package() {

# New packages here should be added after the last package that they depend on
deploy_package foundation
deploy_package types
deploy_package circuits.js
deploy_package circuit-types
deploy_package aztec.js
Expand Down
1 change: 1 addition & 0 deletions yarn-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"rollup-provider",
"sequencer-client",
"scripts",
"types",
"world-state",
"yarn-project-base",
"kv-store"
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/pxe_service/pxe_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
L2Tx,
LogFilter,
MerkleTreeId,
NodeInfo,
NoteFilter,
PXE,
SimulationError,
Expand All @@ -34,6 +33,7 @@ import {
getNewContractPublicFunctions,
isNoirCallStackUnresolved,
} from '@aztec/circuit-types';
import { NodeInfo } from '@aztec/types/interfaces';
import { TxPXEProcessingStats } from '@aztec/circuit-types/stats';
import {
AztecAddress,
Expand Down
1 change: 1 addition & 0 deletions yarn-project/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
{ "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" }
],
Expand Down
1 change: 1 addition & 0 deletions yarn-project/types/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@aztec/foundation/eslint');
2 changes: 2 additions & 0 deletions yarn-project/types/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Types
A package containing non circuit dependent types which are relevant through all the Aztec Typescript codebase.
63 changes: 63 additions & 0 deletions yarn-project/types/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"name": "@aztec/types",
"version": "0.1.0",
"packageManager": "yarn@3.4.1",
"type": "module",
"main": "./dest/index.js",
"types": "./dest/index.d.ts",
"exports": {
"./interfaces": "./dest/interfaces/index.js"
},
"scripts": {
"build": "yarn clean && tsc -b",
"build:dev": "tsc -b --watch",
"clean": "rm -rf ./dest .tsbuildinfo",
"formatting": "run -T prettier --check ./src && run -T eslint ./src",
"formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src",
"test:light": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests",
"test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules $(yarn bin jest) --passWithNoTests"
},
"inherits": [
"../package.common.json"
],
"jest": {
"preset": "ts-jest/presets/default-esm",
"moduleNameMapper": {
"^(\\.{1,2}/.*)\\.[cm]?js$": "$1"
},
"testRegex": "./src/.*\\.test\\.(js|mjs|ts)$",
"rootDir": "./src"
},
"dependencies": {
"@aztec/foundation": "workspace:^"
},
"devDependencies": {
"@jest/globals": "^29.5.0",
"@types/debug": "^4.1.7",
"@types/detect-node": "^2.0.0",
"@types/jest": "^29.5.0",
"@types/supertest": "^2.0.12",
"@typescript-eslint/eslint-plugin": "^6.2.1",
"@typescript-eslint/parser": "^6.2.1",
"comlink": "^4.4.1",
"eslint": "^8.21.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jsdoc": "^40.1.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-tsdoc": "^0.2.17",
"jest": "^29.5.0",
"prettier": "^2.7.1",
"supertest": "^6.3.3",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
},
"files": [
"dest",
"src",
"!*.test.*"
],
"engines": {
"node": ">=18"
}
}
1 change: 1 addition & 0 deletions yarn-project/types/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './interfaces/index.js';
1 change: 1 addition & 0 deletions yarn-project/types/src/interfaces/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './node-info.js';
14 changes: 14 additions & 0 deletions yarn-project/types/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "..",
"compilerOptions": {
"outDir": "dest",
"rootDir": "src",
"tsBuildInfoFile": ".tsbuildinfo"
},
"include": ["src"],
"references": [
{
"path": "../foundation"
}
]
}
28 changes: 28 additions & 0 deletions yarn-project/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ __metadata:
"@aztec/circuits.js": "workspace:^"
"@aztec/ethereum": "workspace:^"
"@aztec/foundation": "workspace:^"
"@aztec/types": "workspace:^"
"@jest/globals": ^29.5.0
"@types/jest": ^29.5.0
"@types/lodash.clonedeep": ^4.5.7
Expand Down Expand Up @@ -842,6 +843,33 @@ __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/foundation": "workspace:^"
"@jest/globals": ^29.5.0
"@types/debug": ^4.1.7
"@types/detect-node": ^2.0.0
"@types/jest": ^29.5.0
"@types/supertest": ^2.0.12
"@typescript-eslint/eslint-plugin": ^6.2.1
"@typescript-eslint/parser": ^6.2.1
comlink: ^4.4.1
eslint: ^8.21.0
eslint-config-prettier: ^8.5.0
eslint-plugin-jsdoc: ^40.1.0
eslint-plugin-no-only-tests: ^3.1.0
eslint-plugin-tsdoc: ^0.2.17
jest: ^29.5.0
prettier: ^2.7.1
supertest: ^6.3.3
ts-jest: ^29.1.0
ts-node: ^10.9.1
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"
Expand Down