@aztec/cli 1.0.0-nightly.20250729 → 1.0.0-nightly.20250730
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.
- package/dest/cmds/misc/generate_bootnode_enr.d.ts +1 -1
- package/dest/cmds/misc/generate_bootnode_enr.d.ts.map +1 -1
- package/dest/cmds/misc/generate_bootnode_enr.js +2 -3
- package/dest/cmds/misc/generate_p2p_private_key.d.ts.map +1 -1
- package/dest/cmds/misc/generate_p2p_private_key.js +4 -3
- package/dest/cmds/misc/index.js +3 -3
- package/package.json +23 -22
- package/src/cmds/misc/generate_bootnode_enr.ts +2 -3
- package/src/cmds/misc/generate_p2p_private_key.ts +5 -3
- package/src/cmds/misc/index.ts +3 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec/foundation/log';
|
|
2
|
-
export declare function generateEncodedBootnodeENR(privateKey: string, p2pIp: string, p2pPort: number, l1ChainId: number, log: LogFn): void
|
|
2
|
+
export declare function generateEncodedBootnodeENR(privateKey: string, p2pIp: string, p2pPort: number, l1ChainId: number, log: LogFn): Promise<void>;
|
|
3
3
|
//# sourceMappingURL=generate_bootnode_enr.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate_bootnode_enr.d.ts","sourceRoot":"","sources":["../../../src/cmds/misc/generate_bootnode_enr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"generate_bootnode_enr.d.ts","sourceRoot":"","sources":["../../../src/cmds/misc/generate_bootnode_enr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,wBAAsB,0BAA0B,CAC9C,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,KAAK,iBAIX"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { privateKeyFromHex } from '@aztec/p2p';
|
|
2
1
|
import { createBootnodeENRandPeerId } from '@aztec/p2p/enr';
|
|
3
|
-
export function generateEncodedBootnodeENR(privateKey, p2pIp, p2pPort, l1ChainId, log) {
|
|
4
|
-
const { enr } = createBootnodeENRandPeerId(
|
|
2
|
+
export async function generateEncodedBootnodeENR(privateKey, p2pIp, p2pPort, l1ChainId, log) {
|
|
3
|
+
const { enr } = await createBootnodeENRandPeerId(privateKey, p2pIp, p2pPort, l1ChainId);
|
|
5
4
|
log(`ENR: ${enr.encodeTxt()}`);
|
|
6
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate_p2p_private_key.d.ts","sourceRoot":"","sources":["../../../src/cmds/misc/generate_p2p_private_key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"generate_p2p_private_key.d.ts","sourceRoot":"","sources":["../../../src/cmds/misc/generate_p2p_private_key.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAInD,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,KAAK,iBAKrD"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSecp256k1PeerId } from '@libp2p/peer-id-factory';
|
|
2
2
|
export async function generateP2PPrivateKey(log) {
|
|
3
|
-
const
|
|
4
|
-
|
|
3
|
+
const peerId = await createSecp256k1PeerId();
|
|
4
|
+
const exportedPeerId = Buffer.from(peerId.privateKey).toString('hex');
|
|
5
|
+
log(`Private key: ${exportedPeerId}`);
|
|
5
6
|
log(`Peer Id: ${peerId}`);
|
|
6
7
|
}
|
package/dest/cmds/misc/index.js
CHANGED
|
@@ -18,10 +18,10 @@ export function injectCommands(program, log) {
|
|
|
18
18
|
});
|
|
19
19
|
program.command('generate-bootnode-enr').summary('Generates the encoded ENR record for a bootnode.').description('Generates the encoded ENR record for a bootnode.').argument('<privateKey>', 'The peer id private key of the bootnode').argument('<p2pIp>', 'The bootnode P2P IP address').argument('<p2pPort>', 'The bootnode P2P port').addOption(l1ChainIdOption).action(async (privateKey, p2pIp, p2pPort, options)=>{
|
|
20
20
|
const { generateEncodedBootnodeENR } = await import('./generate_bootnode_enr.js');
|
|
21
|
-
generateEncodedBootnodeENR(privateKey, p2pIp, p2pPort, options.l1ChainId, log);
|
|
21
|
+
await generateEncodedBootnodeENR(privateKey, p2pIp, p2pPort, options.l1ChainId, log);
|
|
22
22
|
});
|
|
23
|
-
program.command('decode-enr').summary('Decodes an ENR record').description('Decodes and ENR record').argument('<enr>', 'The encoded ENR string').action((enr)=>{
|
|
24
|
-
printENR(enr, log);
|
|
23
|
+
program.command('decode-enr').summary('Decodes an ENR record').description('Decodes and ENR record').argument('<enr>', 'The encoded ENR string').action(async (enr)=>{
|
|
24
|
+
await printENR(enr, log);
|
|
25
25
|
});
|
|
26
26
|
program.command('example-contracts').description('Lists the example contracts available to deploy from @aztec/noir-contracts.js').action(async ()=>{
|
|
27
27
|
const { exampleContracts } = await import('./example_contracts.js');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli",
|
|
3
|
-
"version": "1.0.0-nightly.
|
|
3
|
+
"version": "1.0.0-nightly.20250730",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./contracts": "./dest/cmds/contracts/index.js",
|
|
@@ -69,17 +69,18 @@
|
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@aztec/archiver": "1.0.0-nightly.
|
|
73
|
-
"@aztec/aztec.js": "1.0.0-nightly.
|
|
74
|
-
"@aztec/constants": "1.0.0-nightly.
|
|
75
|
-
"@aztec/entrypoints": "1.0.0-nightly.
|
|
76
|
-
"@aztec/ethereum": "1.0.0-nightly.
|
|
77
|
-
"@aztec/foundation": "1.0.0-nightly.
|
|
78
|
-
"@aztec/l1-artifacts": "1.0.0-nightly.
|
|
79
|
-
"@aztec/p2p": "1.0.0-nightly.
|
|
80
|
-
"@aztec/stdlib": "1.0.0-nightly.
|
|
81
|
-
"@aztec/world-state": "1.0.0-nightly.
|
|
72
|
+
"@aztec/archiver": "1.0.0-nightly.20250730",
|
|
73
|
+
"@aztec/aztec.js": "1.0.0-nightly.20250730",
|
|
74
|
+
"@aztec/constants": "1.0.0-nightly.20250730",
|
|
75
|
+
"@aztec/entrypoints": "1.0.0-nightly.20250730",
|
|
76
|
+
"@aztec/ethereum": "1.0.0-nightly.20250730",
|
|
77
|
+
"@aztec/foundation": "1.0.0-nightly.20250730",
|
|
78
|
+
"@aztec/l1-artifacts": "1.0.0-nightly.20250730",
|
|
79
|
+
"@aztec/p2p": "1.0.0-nightly.20250730",
|
|
80
|
+
"@aztec/stdlib": "1.0.0-nightly.20250730",
|
|
81
|
+
"@aztec/world-state": "1.0.0-nightly.20250730",
|
|
82
82
|
"@iarna/toml": "^2.2.5",
|
|
83
|
+
"@libp2p/peer-id-factory": "^3.0.4",
|
|
83
84
|
"commander": "^12.1.0",
|
|
84
85
|
"lodash.chunk": "^4.2.0",
|
|
85
86
|
"lodash.groupby": "^4.6.0",
|
|
@@ -89,8 +90,8 @@
|
|
|
89
90
|
"viem": "2.23.7"
|
|
90
91
|
},
|
|
91
92
|
"devDependencies": {
|
|
92
|
-
"@aztec/accounts": "1.0.0-nightly.
|
|
93
|
-
"@aztec/protocol-contracts": "1.0.0-nightly.
|
|
93
|
+
"@aztec/accounts": "1.0.0-nightly.20250730",
|
|
94
|
+
"@aztec/protocol-contracts": "1.0.0-nightly.20250730",
|
|
94
95
|
"@jest/globals": "^30.0.0",
|
|
95
96
|
"@types/jest": "^30.0.0",
|
|
96
97
|
"@types/lodash.chunk": "^4.2.9",
|
|
@@ -106,15 +107,15 @@
|
|
|
106
107
|
"typescript": "^5.3.3"
|
|
107
108
|
},
|
|
108
109
|
"peerDependencies": {
|
|
109
|
-
"@aztec/accounts": "1.0.0-nightly.
|
|
110
|
-
"@aztec/bb-prover": "1.0.0-nightly.
|
|
111
|
-
"@aztec/ethereum": "1.0.0-nightly.
|
|
112
|
-
"@aztec/l1-artifacts": "1.0.0-nightly.
|
|
113
|
-
"@aztec/noir-contracts.js": "1.0.0-nightly.
|
|
114
|
-
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.
|
|
115
|
-
"@aztec/noir-test-contracts.js": "1.0.0-nightly.
|
|
116
|
-
"@aztec/protocol-contracts": "1.0.0-nightly.
|
|
117
|
-
"@aztec/stdlib": "1.0.0-nightly.
|
|
110
|
+
"@aztec/accounts": "1.0.0-nightly.20250730",
|
|
111
|
+
"@aztec/bb-prover": "1.0.0-nightly.20250730",
|
|
112
|
+
"@aztec/ethereum": "1.0.0-nightly.20250730",
|
|
113
|
+
"@aztec/l1-artifacts": "1.0.0-nightly.20250730",
|
|
114
|
+
"@aztec/noir-contracts.js": "1.0.0-nightly.20250730",
|
|
115
|
+
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.20250730",
|
|
116
|
+
"@aztec/noir-test-contracts.js": "1.0.0-nightly.20250730",
|
|
117
|
+
"@aztec/protocol-contracts": "1.0.0-nightly.20250730",
|
|
118
|
+
"@aztec/stdlib": "1.0.0-nightly.20250730"
|
|
118
119
|
},
|
|
119
120
|
"files": [
|
|
120
121
|
"dest",
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec/foundation/log';
|
|
2
|
-
import { privateKeyFromHex } from '@aztec/p2p';
|
|
3
2
|
import { createBootnodeENRandPeerId } from '@aztec/p2p/enr';
|
|
4
3
|
|
|
5
|
-
export function generateEncodedBootnodeENR(
|
|
4
|
+
export async function generateEncodedBootnodeENR(
|
|
6
5
|
privateKey: string,
|
|
7
6
|
p2pIp: string,
|
|
8
7
|
p2pPort: number,
|
|
9
8
|
l1ChainId: number,
|
|
10
9
|
log: LogFn,
|
|
11
10
|
) {
|
|
12
|
-
const { enr } = createBootnodeENRandPeerId(
|
|
11
|
+
const { enr } = await createBootnodeENRandPeerId(privateKey, p2pIp, p2pPort, l1ChainId);
|
|
13
12
|
log(`ENR: ${enr.encodeTxt()}`);
|
|
14
13
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec/foundation/log';
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { createSecp256k1PeerId } from '@libp2p/peer-id-factory';
|
|
3
4
|
|
|
4
5
|
export async function generateP2PPrivateKey(log: LogFn) {
|
|
5
|
-
const
|
|
6
|
-
|
|
6
|
+
const peerId = await createSecp256k1PeerId();
|
|
7
|
+
const exportedPeerId = Buffer.from(peerId.privateKey!).toString('hex');
|
|
8
|
+
log(`Private key: ${exportedPeerId}`);
|
|
7
9
|
log(`Peer Id: ${peerId}`);
|
|
8
10
|
}
|
package/src/cmds/misc/index.ts
CHANGED
|
@@ -40,7 +40,7 @@ export function injectCommands(program: Command, log: LogFn) {
|
|
|
40
40
|
.addOption(l1ChainIdOption)
|
|
41
41
|
.action(async (privateKey: string, p2pIp: string, p2pPort: number, options) => {
|
|
42
42
|
const { generateEncodedBootnodeENR } = await import('./generate_bootnode_enr.js');
|
|
43
|
-
generateEncodedBootnodeENR(privateKey, p2pIp, p2pPort, options.l1ChainId, log);
|
|
43
|
+
await generateEncodedBootnodeENR(privateKey, p2pIp, p2pPort, options.l1ChainId, log);
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
program
|
|
@@ -48,8 +48,8 @@ export function injectCommands(program: Command, log: LogFn) {
|
|
|
48
48
|
.summary('Decodes an ENR record')
|
|
49
49
|
.description('Decodes and ENR record')
|
|
50
50
|
.argument('<enr>', 'The encoded ENR string')
|
|
51
|
-
.action((enr: string) => {
|
|
52
|
-
printENR(enr, log);
|
|
51
|
+
.action(async (enr: string) => {
|
|
52
|
+
await printENR(enr, log);
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
program
|