@aztec/cli 2.1.2-rc.2 → 2.1.2-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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new.d.ts","sourceRoot":"","sources":["../../../src/cmds/validator_keys/new.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAgBhE,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,UAAU,CAAC;CAC7B,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,EAAE,GAAG,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"new.d.ts","sourceRoot":"","sources":["../../../src/cmds/validator_keys/new.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAgBhE,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,YAAY,CAAC;IAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,UAAU,CAAC;CAC7B,CAAC;AAEF,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,EAAE,GAAG,EAAE,KAAK,iBAyF1F"}
|
|
@@ -8,6 +8,13 @@ export async function newValidatorKeystore(options, log) {
|
|
|
8
8
|
throw new Error('Using --remote-signer requires a deterministic key source. Provide --mnemonic to derive keys, or omit --remote-signer to write new private keys to keystore.');
|
|
9
9
|
}
|
|
10
10
|
const mnemonic = _mnemonic ?? generateMnemonic(wordlist);
|
|
11
|
+
if (!_mnemonic && !json) {
|
|
12
|
+
log('No mnemonic provided, generating new one...');
|
|
13
|
+
log(`Using new mnemonic:`);
|
|
14
|
+
log('');
|
|
15
|
+
log(mnemonic);
|
|
16
|
+
log('');
|
|
17
|
+
}
|
|
11
18
|
const validatorCount = typeof count === 'number' && Number.isFinite(count) && count > 0 ? Math.floor(count) : 1;
|
|
12
19
|
const { outputPath } = await resolveKeystoreOutputPath(dataDir, file);
|
|
13
20
|
const { validators, summaries } = await buildValidatorEntries({
|
|
@@ -41,7 +48,11 @@ export async function newValidatorKeystore(options, log) {
|
|
|
41
48
|
validators
|
|
42
49
|
};
|
|
43
50
|
await writeKeystoreFile(outputPath, keystore);
|
|
44
|
-
|
|
51
|
+
const outputData = !_mnemonic ? {
|
|
52
|
+
...keystore,
|
|
53
|
+
generatedMnemonic: mnemonic
|
|
54
|
+
} : keystore;
|
|
55
|
+
maybePrintJson(log, json, outputData);
|
|
45
56
|
if (!json) {
|
|
46
57
|
log(`Wrote validator keystore to ${outputPath}`);
|
|
47
58
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli",
|
|
3
|
-
"version": "2.1.2-rc.
|
|
3
|
+
"version": "2.1.2-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.2-rc.
|
|
75
|
-
"@aztec/aztec.js": "2.1.2-rc.
|
|
76
|
-
"@aztec/constants": "2.1.2-rc.
|
|
77
|
-
"@aztec/entrypoints": "2.1.2-rc.
|
|
78
|
-
"@aztec/ethereum": "2.1.2-rc.
|
|
79
|
-
"@aztec/foundation": "2.1.2-rc.
|
|
80
|
-
"@aztec/l1-artifacts": "2.1.2-rc.
|
|
81
|
-
"@aztec/node-keystore": "2.1.2-rc.
|
|
82
|
-
"@aztec/node-lib": "2.1.2-rc.
|
|
83
|
-
"@aztec/p2p": "2.1.2-rc.
|
|
84
|
-
"@aztec/stdlib": "2.1.2-rc.
|
|
85
|
-
"@aztec/world-state": "2.1.2-rc.
|
|
74
|
+
"@aztec/archiver": "2.1.2-rc.3",
|
|
75
|
+
"@aztec/aztec.js": "2.1.2-rc.3",
|
|
76
|
+
"@aztec/constants": "2.1.2-rc.3",
|
|
77
|
+
"@aztec/entrypoints": "2.1.2-rc.3",
|
|
78
|
+
"@aztec/ethereum": "2.1.2-rc.3",
|
|
79
|
+
"@aztec/foundation": "2.1.2-rc.3",
|
|
80
|
+
"@aztec/l1-artifacts": "2.1.2-rc.3",
|
|
81
|
+
"@aztec/node-keystore": "2.1.2-rc.3",
|
|
82
|
+
"@aztec/node-lib": "2.1.2-rc.3",
|
|
83
|
+
"@aztec/p2p": "2.1.2-rc.3",
|
|
84
|
+
"@aztec/stdlib": "2.1.2-rc.3",
|
|
85
|
+
"@aztec/world-state": "2.1.2-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",
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
"viem": "npm:@spalladino/viem@2.38.2-eip7594.0"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
|
-
"@aztec/accounts": "2.1.2-rc.
|
|
100
|
-
"@aztec/protocol-contracts": "2.1.2-rc.
|
|
99
|
+
"@aztec/accounts": "2.1.2-rc.3",
|
|
100
|
+
"@aztec/protocol-contracts": "2.1.2-rc.3",
|
|
101
101
|
"@jest/globals": "^30.0.0",
|
|
102
102
|
"@types/jest": "^30.0.0",
|
|
103
103
|
"@types/lodash.chunk": "^4.2.9",
|
|
@@ -113,15 +113,15 @@
|
|
|
113
113
|
"typescript": "^5.3.3"
|
|
114
114
|
},
|
|
115
115
|
"peerDependencies": {
|
|
116
|
-
"@aztec/accounts": "2.1.2-rc.
|
|
117
|
-
"@aztec/bb-prover": "2.1.2-rc.
|
|
118
|
-
"@aztec/ethereum": "2.1.2-rc.
|
|
119
|
-
"@aztec/l1-artifacts": "2.1.2-rc.
|
|
120
|
-
"@aztec/noir-contracts.js": "2.1.2-rc.
|
|
121
|
-
"@aztec/noir-protocol-circuits-types": "2.1.2-rc.
|
|
122
|
-
"@aztec/noir-test-contracts.js": "2.1.2-rc.
|
|
123
|
-
"@aztec/protocol-contracts": "2.1.2-rc.
|
|
124
|
-
"@aztec/stdlib": "2.1.2-rc.
|
|
116
|
+
"@aztec/accounts": "2.1.2-rc.3",
|
|
117
|
+
"@aztec/bb-prover": "2.1.2-rc.3",
|
|
118
|
+
"@aztec/ethereum": "2.1.2-rc.3",
|
|
119
|
+
"@aztec/l1-artifacts": "2.1.2-rc.3",
|
|
120
|
+
"@aztec/noir-contracts.js": "2.1.2-rc.3",
|
|
121
|
+
"@aztec/noir-protocol-circuits-types": "2.1.2-rc.3",
|
|
122
|
+
"@aztec/noir-test-contracts.js": "2.1.2-rc.3",
|
|
123
|
+
"@aztec/protocol-contracts": "2.1.2-rc.3",
|
|
124
|
+
"@aztec/stdlib": "2.1.2-rc.3"
|
|
125
125
|
},
|
|
126
126
|
"files": [
|
|
127
127
|
"dest",
|
|
@@ -67,6 +67,14 @@ export async function newValidatorKeystore(options: NewValidatorKeystoreOptions,
|
|
|
67
67
|
|
|
68
68
|
const mnemonic = _mnemonic ?? generateMnemonic(wordlist);
|
|
69
69
|
|
|
70
|
+
if (!_mnemonic && !json) {
|
|
71
|
+
log('No mnemonic provided, generating new one...');
|
|
72
|
+
log(`Using new mnemonic:`);
|
|
73
|
+
log('');
|
|
74
|
+
log(mnemonic);
|
|
75
|
+
log('');
|
|
76
|
+
}
|
|
77
|
+
|
|
70
78
|
const validatorCount = typeof count === 'number' && Number.isFinite(count) && count > 0 ? Math.floor(count) : 1;
|
|
71
79
|
const { outputPath } = await resolveKeystoreOutputPath(dataDir, file);
|
|
72
80
|
|
|
@@ -99,7 +107,9 @@ export async function newValidatorKeystore(options: NewValidatorKeystoreOptions,
|
|
|
99
107
|
|
|
100
108
|
await writeKeystoreFile(outputPath, keystore);
|
|
101
109
|
|
|
102
|
-
|
|
110
|
+
const outputData = !_mnemonic ? { ...keystore, generatedMnemonic: mnemonic } : keystore;
|
|
111
|
+
|
|
112
|
+
maybePrintJson(log, json, outputData as unknown as Record<string, any>);
|
|
103
113
|
if (!json) {
|
|
104
114
|
log(`Wrote validator keystore to ${outputPath}`);
|
|
105
115
|
}
|