@aztec/cli 1.0.0-nightly.20250727 → 1.0.0-nightly.20250729
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/devnet/bootstrap_network.js +2 -0
- 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 +3 -2
- package/dest/cmds/misc/generate_p2p_private_key.d.ts.map +1 -1
- package/dest/cmds/misc/generate_p2p_private_key.js +3 -4
- package/dest/cmds/misc/index.js +3 -3
- package/package.json +22 -23
- package/src/cmds/devnet/bootstrap_network.ts +2 -0
- package/src/cmds/misc/generate_bootnode_enr.ts +3 -2
- package/src/cmds/misc/generate_p2p_private_key.ts +3 -5
- package/src/cmds/misc/index.ts +3 -3
|
@@ -76,10 +76,12 @@ export async function bootstrapNetwork(pxeUrl, l1Urls, l1ChainId, l1PrivateKey,
|
|
|
76
76
|
*/ async function deployERC20(l1Client) {
|
|
77
77
|
const { TestERC20Abi, TestERC20Bytecode, TokenPortalAbi, TokenPortalBytecode } = await import('@aztec/l1-artifacts');
|
|
78
78
|
const erc20 = {
|
|
79
|
+
name: 'TestERC20',
|
|
79
80
|
contractAbi: TestERC20Abi,
|
|
80
81
|
contractBytecode: TestERC20Bytecode
|
|
81
82
|
};
|
|
82
83
|
const portal = {
|
|
84
|
+
name: 'TokenPortal',
|
|
83
85
|
contractAbi: TokenPortalAbi,
|
|
84
86
|
contractBytecode: TokenPortalBytecode
|
|
85
87
|
};
|
|
@@ -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):
|
|
2
|
+
export declare function generateEncodedBootnodeENR(privateKey: string, p2pIp: string, p2pPort: number, l1ChainId: number, log: LogFn): 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;AAInD,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,KAAK,QAIX"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { privateKeyFromHex } from '@aztec/p2p';
|
|
1
2
|
import { createBootnodeENRandPeerId } from '@aztec/p2p/enr';
|
|
2
|
-
export
|
|
3
|
-
const { enr } =
|
|
3
|
+
export function generateEncodedBootnodeENR(privateKey, p2pIp, p2pPort, l1ChainId, log) {
|
|
4
|
+
const { enr } = createBootnodeENRandPeerId(privateKeyFromHex(privateKey), p2pIp, p2pPort, l1ChainId);
|
|
4
5
|
log(`ENR: ${enr.encodeTxt()}`);
|
|
5
6
|
}
|
|
@@ -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;AAGnD,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,KAAK,iBAIrD"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSecp256k1PrivateKeyWithPeerId, privateKeyToHex } from '@aztec/p2p';
|
|
2
2
|
export async function generateP2PPrivateKey(log) {
|
|
3
|
-
const peerId = await
|
|
4
|
-
|
|
5
|
-
log(`Private key: ${exportedPeerId}`);
|
|
3
|
+
const { privateKey, peerId } = await createSecp256k1PrivateKeyWithPeerId();
|
|
4
|
+
log(`Private key: ${privateKeyToHex(privateKey)}`);
|
|
6
5
|
log(`Peer Id: ${peerId}`);
|
|
7
6
|
}
|
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
|
-
|
|
21
|
+
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(
|
|
24
|
-
|
|
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);
|
|
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.20250729",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./contracts": "./dest/cmds/contracts/index.js",
|
|
@@ -69,18 +69,17 @@
|
|
|
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.20250729",
|
|
73
|
+
"@aztec/aztec.js": "1.0.0-nightly.20250729",
|
|
74
|
+
"@aztec/constants": "1.0.0-nightly.20250729",
|
|
75
|
+
"@aztec/entrypoints": "1.0.0-nightly.20250729",
|
|
76
|
+
"@aztec/ethereum": "1.0.0-nightly.20250729",
|
|
77
|
+
"@aztec/foundation": "1.0.0-nightly.20250729",
|
|
78
|
+
"@aztec/l1-artifacts": "1.0.0-nightly.20250729",
|
|
79
|
+
"@aztec/p2p": "1.0.0-nightly.20250729",
|
|
80
|
+
"@aztec/stdlib": "1.0.0-nightly.20250729",
|
|
81
|
+
"@aztec/world-state": "1.0.0-nightly.20250729",
|
|
82
82
|
"@iarna/toml": "^2.2.5",
|
|
83
|
-
"@libp2p/peer-id-factory": "^3.0.4",
|
|
84
83
|
"commander": "^12.1.0",
|
|
85
84
|
"lodash.chunk": "^4.2.0",
|
|
86
85
|
"lodash.groupby": "^4.6.0",
|
|
@@ -90,8 +89,8 @@
|
|
|
90
89
|
"viem": "2.23.7"
|
|
91
90
|
},
|
|
92
91
|
"devDependencies": {
|
|
93
|
-
"@aztec/accounts": "1.0.0-nightly.
|
|
94
|
-
"@aztec/protocol-contracts": "1.0.0-nightly.
|
|
92
|
+
"@aztec/accounts": "1.0.0-nightly.20250729",
|
|
93
|
+
"@aztec/protocol-contracts": "1.0.0-nightly.20250729",
|
|
95
94
|
"@jest/globals": "^30.0.0",
|
|
96
95
|
"@types/jest": "^30.0.0",
|
|
97
96
|
"@types/lodash.chunk": "^4.2.9",
|
|
@@ -107,15 +106,15 @@
|
|
|
107
106
|
"typescript": "^5.3.3"
|
|
108
107
|
},
|
|
109
108
|
"peerDependencies": {
|
|
110
|
-
"@aztec/accounts": "1.0.0-nightly.
|
|
111
|
-
"@aztec/bb-prover": "1.0.0-nightly.
|
|
112
|
-
"@aztec/ethereum": "1.0.0-nightly.
|
|
113
|
-
"@aztec/l1-artifacts": "1.0.0-nightly.
|
|
114
|
-
"@aztec/noir-contracts.js": "1.0.0-nightly.
|
|
115
|
-
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.
|
|
116
|
-
"@aztec/noir-test-contracts.js": "1.0.0-nightly.
|
|
117
|
-
"@aztec/protocol-contracts": "1.0.0-nightly.
|
|
118
|
-
"@aztec/stdlib": "1.0.0-nightly.
|
|
109
|
+
"@aztec/accounts": "1.0.0-nightly.20250729",
|
|
110
|
+
"@aztec/bb-prover": "1.0.0-nightly.20250729",
|
|
111
|
+
"@aztec/ethereum": "1.0.0-nightly.20250729",
|
|
112
|
+
"@aztec/l1-artifacts": "1.0.0-nightly.20250729",
|
|
113
|
+
"@aztec/noir-contracts.js": "1.0.0-nightly.20250729",
|
|
114
|
+
"@aztec/noir-protocol-circuits-types": "1.0.0-nightly.20250729",
|
|
115
|
+
"@aztec/noir-test-contracts.js": "1.0.0-nightly.20250729",
|
|
116
|
+
"@aztec/protocol-contracts": "1.0.0-nightly.20250729",
|
|
117
|
+
"@aztec/stdlib": "1.0.0-nightly.20250729"
|
|
119
118
|
},
|
|
120
119
|
"files": [
|
|
121
120
|
"dest",
|
|
@@ -140,10 +140,12 @@ async function deployERC20(l1Client: ExtendedViemWalletClient) {
|
|
|
140
140
|
const { TestERC20Abi, TestERC20Bytecode, TokenPortalAbi, TokenPortalBytecode } = await import('@aztec/l1-artifacts');
|
|
141
141
|
|
|
142
142
|
const erc20: ContractArtifacts = {
|
|
143
|
+
name: 'TestERC20',
|
|
143
144
|
contractAbi: TestERC20Abi,
|
|
144
145
|
contractBytecode: TestERC20Bytecode,
|
|
145
146
|
};
|
|
146
147
|
const portal: ContractArtifacts = {
|
|
148
|
+
name: 'TokenPortal',
|
|
147
149
|
contractAbi: TokenPortalAbi,
|
|
148
150
|
contractBytecode: TokenPortalBytecode,
|
|
149
151
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec/foundation/log';
|
|
2
|
+
import { privateKeyFromHex } from '@aztec/p2p';
|
|
2
3
|
import { createBootnodeENRandPeerId } from '@aztec/p2p/enr';
|
|
3
4
|
|
|
4
|
-
export
|
|
5
|
+
export function generateEncodedBootnodeENR(
|
|
5
6
|
privateKey: string,
|
|
6
7
|
p2pIp: string,
|
|
7
8
|
p2pPort: number,
|
|
8
9
|
l1ChainId: number,
|
|
9
10
|
log: LogFn,
|
|
10
11
|
) {
|
|
11
|
-
const { enr } =
|
|
12
|
+
const { enr } = createBootnodeENRandPeerId(privateKeyFromHex(privateKey), p2pIp, p2pPort, l1ChainId);
|
|
12
13
|
log(`ENR: ${enr.encodeTxt()}`);
|
|
13
14
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { LogFn } from '@aztec/foundation/log';
|
|
2
|
-
|
|
3
|
-
import { createSecp256k1PeerId } from '@libp2p/peer-id-factory';
|
|
2
|
+
import { createSecp256k1PrivateKeyWithPeerId, privateKeyToHex } from '@aztec/p2p';
|
|
4
3
|
|
|
5
4
|
export async function generateP2PPrivateKey(log: LogFn) {
|
|
6
|
-
const peerId = await
|
|
7
|
-
|
|
8
|
-
log(`Private key: ${exportedPeerId}`);
|
|
5
|
+
const { privateKey, peerId } = await createSecp256k1PrivateKeyWithPeerId();
|
|
6
|
+
log(`Private key: ${privateKeyToHex(privateKey)}`);
|
|
9
7
|
log(`Peer Id: ${peerId}`);
|
|
10
8
|
}
|
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
|
-
|
|
43
|
+
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(
|
|
52
|
-
|
|
51
|
+
.action((enr: string) => {
|
|
52
|
+
printENR(enr, log);
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
program
|