@aztec/cli 2.1.4 → 2.1.5-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,7 @@ export type BuildValidatorsInput = {
20
20
  remoteSigner?: string;
21
21
  fundingAccount?: EthAddress;
22
22
  };
23
- export declare function withValidatorIndex(path: string, index: number): string;
23
+ export declare function withValidatorIndex(path: string, accountIndex?: number, addressIndex?: number): string;
24
24
  /**
25
25
  * Compute a compressed BN254 G1 public key from a private key.
26
26
  * @param privateKeyHex - Private key as 0x-prefixed hex string
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/cmds/validator_keys/shared.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAShE,MAAM,MAAM,gBAAgB,GAAG;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AAEvG,MAAM,MAAM,oBAAoB,GAAG;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,YAAY,CAAC,EAA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AE,GAC5C,OAAO,CAAC,IAAI,CAAC,CAuBf;AAED,8EAA8E;AAC9E,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CAQjB;AAED,kGAAkG;AAClG,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,iBAAiB,EAAE,EAC/B,OAAO,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC5C,OAAO,CAAC,IAAI,CAAC,CA2Cf"}
@@ -7,10 +7,11 @@ import { access, writeFile } from 'fs/promises';
7
7
  import { homedir } from 'os';
8
8
  import { dirname, isAbsolute, join } from 'path';
9
9
  import { mnemonicToAccount } from 'viem/accounts';
10
- export function withValidatorIndex(path, index) {
10
+ export function withValidatorIndex(path, accountIndex = 0, addressIndex = 0) {
11
11
  const parts = path.split('/');
12
- if (parts.length >= 4 && parts[0] === 'm' && parts[1] === '12381' && parts[2] === '3600') {
13
- parts[3] = String(index);
12
+ if (parts.length == 6 && parts[0] === 'm' && parts[1] === '12381' && parts[2] === '3600') {
13
+ parts[3] = String(accountIndex);
14
+ parts[5] = String(addressIndex);
14
15
  return parts.join('/');
15
16
  }
16
17
  return path;
@@ -41,7 +42,7 @@ export async function buildValidatorEntries(input) {
41
42
  }, async (_unused, i)=>{
42
43
  const addressIndex = baseAddressIndex + i;
43
44
  const basePath = blsPath ?? defaultBlsPath;
44
- const perValidatorPath = withValidatorIndex(basePath, addressIndex);
45
+ const perValidatorPath = withValidatorIndex(basePath, accountIndex, addressIndex);
45
46
  const blsPrivKey = ikm || mnemonic ? deriveBlsPrivateKey(mnemonic, ikm, perValidatorPath) : undefined;
46
47
  const blsPubCompressed = blsPrivKey ? await computeBlsPublicKeyCompressed(blsPrivKey) : undefined;
47
48
  const ethAttester = deriveEthAttester(mnemonic, accountIndex, addressIndex, remoteSigner);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/cli",
3
- "version": "2.1.4",
3
+ "version": "2.1.5-rc.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./contracts": "./dest/cmds/contracts/index.js",
@@ -71,18 +71,18 @@
71
71
  ]
72
72
  },
73
73
  "dependencies": {
74
- "@aztec/archiver": "2.1.4",
75
- "@aztec/aztec.js": "2.1.4",
76
- "@aztec/constants": "2.1.4",
77
- "@aztec/entrypoints": "2.1.4",
78
- "@aztec/ethereum": "2.1.4",
79
- "@aztec/foundation": "2.1.4",
80
- "@aztec/l1-artifacts": "2.1.4",
81
- "@aztec/node-keystore": "2.1.4",
82
- "@aztec/node-lib": "2.1.4",
83
- "@aztec/p2p": "2.1.4",
84
- "@aztec/stdlib": "2.1.4",
85
- "@aztec/world-state": "2.1.4",
74
+ "@aztec/archiver": "2.1.5-rc.3",
75
+ "@aztec/aztec.js": "2.1.5-rc.3",
76
+ "@aztec/constants": "2.1.5-rc.3",
77
+ "@aztec/entrypoints": "2.1.5-rc.3",
78
+ "@aztec/ethereum": "2.1.5-rc.3",
79
+ "@aztec/foundation": "2.1.5-rc.3",
80
+ "@aztec/l1-artifacts": "2.1.5-rc.3",
81
+ "@aztec/node-keystore": "2.1.5-rc.3",
82
+ "@aztec/node-lib": "2.1.5-rc.3",
83
+ "@aztec/p2p": "2.1.5-rc.3",
84
+ "@aztec/stdlib": "2.1.5-rc.3",
85
+ "@aztec/world-state": "2.1.5-rc.3",
86
86
  "@ethersproject/wallet": "^5.8.0",
87
87
  "@iarna/toml": "^2.2.5",
88
88
  "@libp2p/peer-id-factory": "^3.0.4",
@@ -93,14 +93,14 @@
93
93
  "semver": "^7.5.4",
94
94
  "source-map-support": "^0.5.21",
95
95
  "tslib": "^2.4.0",
96
- "viem": "npm:@spalladino/viem@2.38.2-eip7594.0"
96
+ "viem": "npm:@spalladino/viem@2.38.2-eip7594.2"
97
97
  },
98
98
  "devDependencies": {
99
- "@aztec/accounts": "2.1.4",
100
- "@aztec/aztec-node": "2.1.4",
101
- "@aztec/kv-store": "2.1.4",
102
- "@aztec/protocol-contracts": "2.1.4",
103
- "@aztec/telemetry-client": "2.1.4",
99
+ "@aztec/accounts": "2.1.5-rc.3",
100
+ "@aztec/aztec-node": "2.1.5-rc.3",
101
+ "@aztec/kv-store": "2.1.5-rc.3",
102
+ "@aztec/protocol-contracts": "2.1.5-rc.3",
103
+ "@aztec/telemetry-client": "2.1.5-rc.3",
104
104
  "@jest/globals": "^30.0.0",
105
105
  "@types/jest": "^30.0.0",
106
106
  "@types/lodash.chunk": "^4.2.9",
@@ -116,15 +116,15 @@
116
116
  "typescript": "^5.3.3"
117
117
  },
118
118
  "peerDependencies": {
119
- "@aztec/accounts": "2.1.4",
120
- "@aztec/bb-prover": "2.1.4",
121
- "@aztec/ethereum": "2.1.4",
122
- "@aztec/l1-artifacts": "2.1.4",
123
- "@aztec/noir-contracts.js": "2.1.4",
124
- "@aztec/noir-protocol-circuits-types": "2.1.4",
125
- "@aztec/noir-test-contracts.js": "2.1.4",
126
- "@aztec/protocol-contracts": "2.1.4",
127
- "@aztec/stdlib": "2.1.4"
119
+ "@aztec/accounts": "2.1.5-rc.3",
120
+ "@aztec/bb-prover": "2.1.5-rc.3",
121
+ "@aztec/ethereum": "2.1.5-rc.3",
122
+ "@aztec/l1-artifacts": "2.1.5-rc.3",
123
+ "@aztec/noir-contracts.js": "2.1.5-rc.3",
124
+ "@aztec/noir-protocol-circuits-types": "2.1.5-rc.3",
125
+ "@aztec/noir-test-contracts.js": "2.1.5-rc.3",
126
+ "@aztec/protocol-contracts": "2.1.5-rc.3",
127
+ "@aztec/stdlib": "2.1.5-rc.3"
128
128
  },
129
129
  "files": [
130
130
  "dest",
@@ -29,10 +29,11 @@ export type BuildValidatorsInput = {
29
29
  fundingAccount?: EthAddress;
30
30
  };
31
31
 
32
- export function withValidatorIndex(path: string, index: number) {
32
+ export function withValidatorIndex(path: string, accountIndex: number = 0, addressIndex: number = 0) {
33
33
  const parts = path.split('/');
34
- if (parts.length >= 4 && parts[0] === 'm' && parts[1] === '12381' && parts[2] === '3600') {
35
- parts[3] = String(index);
34
+ if (parts.length == 6 && parts[0] === 'm' && parts[1] === '12381' && parts[2] === '3600') {
35
+ parts[3] = String(accountIndex);
36
+ parts[5] = String(addressIndex);
36
37
  return parts.join('/');
37
38
  }
38
39
  return path;
@@ -81,7 +82,7 @@ export async function buildValidatorEntries(input: BuildValidatorsInput) {
81
82
  Array.from({ length: validatorCount }, async (_unused, i) => {
82
83
  const addressIndex = baseAddressIndex + i;
83
84
  const basePath = blsPath ?? defaultBlsPath;
84
- const perValidatorPath = withValidatorIndex(basePath, addressIndex);
85
+ const perValidatorPath = withValidatorIndex(basePath, accountIndex, addressIndex);
85
86
 
86
87
  const blsPrivKey = ikm || mnemonic ? deriveBlsPrivateKey(mnemonic, ikm, perValidatorPath) : undefined;
87
88
  const blsPubCompressed = blsPrivKey ? await computeBlsPublicKeyCompressed(blsPrivKey) : undefined;