@aztec/cli 3.0.0-nightly.20251115 → 3.0.0-nightly.20251118
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,
|
|
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,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,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,
|
|
10
|
+
export function withValidatorIndex(path, accountIndex = 0, addressIndex = 0) {
|
|
11
11
|
const parts = path.split('/');
|
|
12
|
-
if (parts.length
|
|
13
|
-
parts[3] = String(
|
|
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": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20251118",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./contracts": "./dest/cmds/contracts/index.js",
|
|
@@ -71,21 +71,21 @@
|
|
|
71
71
|
]
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@aztec/accounts": "3.0.0-nightly.
|
|
75
|
-
"@aztec/archiver": "3.0.0-nightly.
|
|
76
|
-
"@aztec/aztec.js": "3.0.0-nightly.
|
|
77
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
78
|
-
"@aztec/entrypoints": "3.0.0-nightly.
|
|
79
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
80
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
81
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
82
|
-
"@aztec/node-keystore": "3.0.0-nightly.
|
|
83
|
-
"@aztec/node-lib": "3.0.0-nightly.
|
|
84
|
-
"@aztec/p2p": "3.0.0-nightly.
|
|
85
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
86
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
87
|
-
"@aztec/test-wallet": "3.0.0-nightly.
|
|
88
|
-
"@aztec/world-state": "3.0.0-nightly.
|
|
74
|
+
"@aztec/accounts": "3.0.0-nightly.20251118",
|
|
75
|
+
"@aztec/archiver": "3.0.0-nightly.20251118",
|
|
76
|
+
"@aztec/aztec.js": "3.0.0-nightly.20251118",
|
|
77
|
+
"@aztec/constants": "3.0.0-nightly.20251118",
|
|
78
|
+
"@aztec/entrypoints": "3.0.0-nightly.20251118",
|
|
79
|
+
"@aztec/ethereum": "3.0.0-nightly.20251118",
|
|
80
|
+
"@aztec/foundation": "3.0.0-nightly.20251118",
|
|
81
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20251118",
|
|
82
|
+
"@aztec/node-keystore": "3.0.0-nightly.20251118",
|
|
83
|
+
"@aztec/node-lib": "3.0.0-nightly.20251118",
|
|
84
|
+
"@aztec/p2p": "3.0.0-nightly.20251118",
|
|
85
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251118",
|
|
86
|
+
"@aztec/stdlib": "3.0.0-nightly.20251118",
|
|
87
|
+
"@aztec/test-wallet": "3.0.0-nightly.20251118",
|
|
88
|
+
"@aztec/world-state": "3.0.0-nightly.20251118",
|
|
89
89
|
"@ethersproject/wallet": "^5.8.0",
|
|
90
90
|
"@iarna/toml": "^2.2.5",
|
|
91
91
|
"@libp2p/peer-id-factory": "^3.0.4",
|
|
@@ -99,9 +99,9 @@
|
|
|
99
99
|
"viem": "npm:@spalladino/viem@2.38.2-eip7594.0"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
-
"@aztec/aztec-node": "3.0.0-nightly.
|
|
103
|
-
"@aztec/kv-store": "3.0.0-nightly.
|
|
104
|
-
"@aztec/telemetry-client": "3.0.0-nightly.
|
|
102
|
+
"@aztec/aztec-node": "3.0.0-nightly.20251118",
|
|
103
|
+
"@aztec/kv-store": "3.0.0-nightly.20251118",
|
|
104
|
+
"@aztec/telemetry-client": "3.0.0-nightly.20251118",
|
|
105
105
|
"@jest/globals": "^30.0.0",
|
|
106
106
|
"@types/jest": "^30.0.0",
|
|
107
107
|
"@types/lodash.chunk": "^4.2.9",
|
|
@@ -117,15 +117,15 @@
|
|
|
117
117
|
"typescript": "^5.3.3"
|
|
118
118
|
},
|
|
119
119
|
"peerDependencies": {
|
|
120
|
-
"@aztec/accounts": "3.0.0-nightly.
|
|
121
|
-
"@aztec/bb-prover": "3.0.0-nightly.
|
|
122
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
123
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
124
|
-
"@aztec/noir-contracts.js": "3.0.0-nightly.
|
|
125
|
-
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.
|
|
126
|
-
"@aztec/noir-test-contracts.js": "3.0.0-nightly.
|
|
127
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
128
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
120
|
+
"@aztec/accounts": "3.0.0-nightly.20251118",
|
|
121
|
+
"@aztec/bb-prover": "3.0.0-nightly.20251118",
|
|
122
|
+
"@aztec/ethereum": "3.0.0-nightly.20251118",
|
|
123
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20251118",
|
|
124
|
+
"@aztec/noir-contracts.js": "3.0.0-nightly.20251118",
|
|
125
|
+
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251118",
|
|
126
|
+
"@aztec/noir-test-contracts.js": "3.0.0-nightly.20251118",
|
|
127
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251118",
|
|
128
|
+
"@aztec/stdlib": "3.0.0-nightly.20251118"
|
|
129
129
|
},
|
|
130
130
|
"files": [
|
|
131
131
|
"dest",
|
|
@@ -29,10 +29,11 @@ export type BuildValidatorsInput = {
|
|
|
29
29
|
fundingAccount?: EthAddress;
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
export function withValidatorIndex(path: string,
|
|
32
|
+
export function withValidatorIndex(path: string, accountIndex: number = 0, addressIndex: number = 0) {
|
|
33
33
|
const parts = path.split('/');
|
|
34
|
-
if (parts.length
|
|
35
|
-
parts[3] = String(
|
|
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;
|