@aztec/node-keystore 2.0.0-rc.8 → 2.0.2-rc.2
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/keystore_manager.d.ts +2 -1
- package/dest/keystore_manager.d.ts.map +1 -1
- package/dest/keystore_manager.js +60 -82
- package/dest/schemas.d.ts +563 -903
- package/dest/schemas.d.ts.map +1 -1
- package/dest/schemas.js +24 -26
- package/dest/types.d.ts +10 -11
- package/dest/types.d.ts.map +1 -1
- package/dest/types.js +1 -1
- package/package.json +4 -4
- package/src/keystore_manager.ts +73 -94
- package/src/loader.ts +1 -1
- package/src/schemas.ts +27 -33
- package/src/types.ts +14 -18
package/src/types.ts
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* These types define the JSON structure for configuring validators, provers, and
|
|
6
6
|
* their associated keys and addresses.
|
|
7
7
|
*/
|
|
8
|
+
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
9
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
8
10
|
|
|
9
11
|
/** Parameterized hex string type for specific byte lengths */
|
|
10
12
|
export type Hex<TByteLength extends number> = `0x${string}` & { readonly _length: TByteLength };
|
|
@@ -15,12 +17,6 @@ export type EthJsonKeyFileV3Config = { path: string; password?: string };
|
|
|
15
17
|
/** A private key is a 32-byte 0x-prefixed hex */
|
|
16
18
|
export type EthPrivateKey = Hex<32>;
|
|
17
19
|
|
|
18
|
-
/** An address is a 20-byte 0x-prefixed hex */
|
|
19
|
-
export type EthAddressHex = Hex<20>;
|
|
20
|
-
|
|
21
|
-
/** An Aztec address is a 32-byte 0x-prefixed hex */
|
|
22
|
-
export type AztecAddressHex = Hex<32>;
|
|
23
|
-
|
|
24
20
|
/** URL type for remote signers */
|
|
25
21
|
export type Url = string;
|
|
26
22
|
|
|
@@ -40,9 +36,9 @@ export type EthRemoteSignerConfig =
|
|
|
40
36
|
* If only the address is set, then the default remote signer config from the parent config is used.
|
|
41
37
|
*/
|
|
42
38
|
export type EthRemoteSignerAccount =
|
|
43
|
-
|
|
|
39
|
+
| EthAddress
|
|
44
40
|
| {
|
|
45
|
-
address:
|
|
41
|
+
address: EthAddress;
|
|
46
42
|
remoteSignerUrl?: Url;
|
|
47
43
|
certPath?: string;
|
|
48
44
|
certPass?: string;
|
|
@@ -63,14 +59,14 @@ export type EthMnemonicConfig = {
|
|
|
63
59
|
/** One or more L1 accounts */
|
|
64
60
|
export type EthAccounts = EthAccount | EthAccount[] | EthMnemonicConfig;
|
|
65
61
|
|
|
66
|
-
export type
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
62
|
+
export type ProverKeyStoreWithId = {
|
|
63
|
+
/** Address that identifies the prover. This address will receive the rewards. */
|
|
64
|
+
id: EthAddress;
|
|
65
|
+
/** One or more EOAs used for sending proof L1 txs. */
|
|
66
|
+
publisher: EthAccounts;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export type ProverKeyStore = ProverKeyStoreWithId | EthAccount;
|
|
74
70
|
|
|
75
71
|
export type ValidatorKeyStore = {
|
|
76
72
|
/**
|
|
@@ -82,7 +78,7 @@ export type ValidatorKeyStore = {
|
|
|
82
78
|
* Coinbase address to use when proposing an L2 block as any of the validators in this configuration block.
|
|
83
79
|
* Falls back to the attester address if not set.
|
|
84
80
|
*/
|
|
85
|
-
coinbase?:
|
|
81
|
+
coinbase?: EthAddress;
|
|
86
82
|
/**
|
|
87
83
|
* One or more EOAs used for sending block proposal L1 txs for all validators in this configuration block.
|
|
88
84
|
* Falls back to the attester account if not set.
|
|
@@ -91,7 +87,7 @@ export type ValidatorKeyStore = {
|
|
|
91
87
|
/**
|
|
92
88
|
* Fee recipient address to use when proposing an L2 block as any of the validators in this configuration block.
|
|
93
89
|
*/
|
|
94
|
-
feeRecipient:
|
|
90
|
+
feeRecipient: AztecAddress;
|
|
95
91
|
/**
|
|
96
92
|
* Default remote signer for all accounts in this block.
|
|
97
93
|
*/
|