@aztec/validator-client 0.0.0-test.1 → 0.0.1-commit.017a351

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.
Files changed (66) hide show
  1. package/README.md +325 -0
  2. package/dest/checkpoint_builder.d.ts +79 -0
  3. package/dest/checkpoint_builder.d.ts.map +1 -0
  4. package/dest/checkpoint_builder.js +251 -0
  5. package/dest/config.d.ts +3 -14
  6. package/dest/config.d.ts.map +1 -1
  7. package/dest/config.js +75 -12
  8. package/dest/duties/validation_service.d.ts +49 -13
  9. package/dest/duties/validation_service.d.ts.map +1 -1
  10. package/dest/duties/validation_service.js +112 -18
  11. package/dest/factory.d.ts +34 -6
  12. package/dest/factory.d.ts.map +1 -1
  13. package/dest/factory.js +19 -6
  14. package/dest/index.d.ts +5 -2
  15. package/dest/index.d.ts.map +1 -1
  16. package/dest/index.js +4 -1
  17. package/dest/key_store/ha_key_store.d.ts +99 -0
  18. package/dest/key_store/ha_key_store.d.ts.map +1 -0
  19. package/dest/key_store/ha_key_store.js +208 -0
  20. package/dest/key_store/index.d.ts +4 -1
  21. package/dest/key_store/index.d.ts.map +1 -1
  22. package/dest/key_store/index.js +3 -0
  23. package/dest/key_store/interface.d.ts +85 -6
  24. package/dest/key_store/interface.d.ts.map +1 -1
  25. package/dest/key_store/interface.js +3 -3
  26. package/dest/key_store/local_key_store.d.ts +46 -11
  27. package/dest/key_store/local_key_store.d.ts.map +1 -1
  28. package/dest/key_store/local_key_store.js +68 -17
  29. package/dest/key_store/node_keystore_adapter.d.ts +151 -0
  30. package/dest/key_store/node_keystore_adapter.d.ts.map +1 -0
  31. package/dest/key_store/node_keystore_adapter.js +330 -0
  32. package/dest/key_store/web3signer_key_store.d.ts +66 -0
  33. package/dest/key_store/web3signer_key_store.d.ts.map +1 -0
  34. package/dest/key_store/web3signer_key_store.js +156 -0
  35. package/dest/metrics.d.ts +25 -5
  36. package/dest/metrics.d.ts.map +1 -1
  37. package/dest/metrics.js +86 -21
  38. package/dest/proposal_handler.d.ts +134 -0
  39. package/dest/proposal_handler.d.ts.map +1 -0
  40. package/dest/proposal_handler.js +1072 -0
  41. package/dest/validator.d.ts +109 -59
  42. package/dest/validator.d.ts.map +1 -1
  43. package/dest/validator.js +698 -171
  44. package/package.json +37 -21
  45. package/src/checkpoint_builder.ts +417 -0
  46. package/src/config.ts +87 -26
  47. package/src/duties/validation_service.ts +200 -21
  48. package/src/factory.ts +82 -11
  49. package/src/index.ts +4 -1
  50. package/src/key_store/ha_key_store.ts +269 -0
  51. package/src/key_store/index.ts +3 -0
  52. package/src/key_store/interface.ts +100 -5
  53. package/src/key_store/local_key_store.ts +77 -18
  54. package/src/key_store/node_keystore_adapter.ts +398 -0
  55. package/src/key_store/web3signer_key_store.ts +205 -0
  56. package/src/metrics.ts +121 -22
  57. package/src/proposal_handler.ts +1161 -0
  58. package/src/validator.ts +975 -222
  59. package/dest/errors/index.d.ts +0 -2
  60. package/dest/errors/index.d.ts.map +0 -1
  61. package/dest/errors/index.js +0 -1
  62. package/dest/errors/validator.error.d.ts +0 -29
  63. package/dest/errors/validator.error.d.ts.map +0 -1
  64. package/dest/errors/validator.error.js +0 -45
  65. package/src/errors/index.ts +0 -1
  66. package/src/errors/validator.error.ts +0 -55
@@ -1,28 +1,63 @@
1
- import type { Buffer32 } from '@aztec/foundation/buffer';
1
+ import { Buffer32 } from '@aztec/foundation/buffer';
2
2
  import type { EthAddress } from '@aztec/foundation/eth-address';
3
3
  import type { Signature } from '@aztec/foundation/eth-signature';
4
+ import type { SigningContext } from '@aztec/validator-ha-signer/types';
5
+ import { type TypedDataDefinition } from 'viem';
4
6
  import type { ValidatorKeyStore } from './interface.js';
5
7
  /**
6
8
  * Local Key Store
7
9
  *
8
- * An implementation of the Key store using an in memory private key.
10
+ * An implementation of the Key store using in memory private keys.
9
11
  */
10
12
  export declare class LocalKeyStore implements ValidatorKeyStore {
11
- private signer;
12
- constructor(privateKey: Buffer32);
13
+ private signers;
14
+ private signersByAddress;
15
+ constructor(privateKeys: Buffer32[]);
13
16
  /**
14
- * Get the address of the signer
17
+ * Get the address of a signer by index
15
18
  *
19
+ * @param index - The index of the signer
16
20
  * @returns the address
17
21
  */
18
- getAddress(): EthAddress;
22
+ getAddress(index: number): EthAddress;
19
23
  /**
20
- * Sign a message with the keystore private key
24
+ * Get the addresses of all signers
21
25
  *
22
- * @param messageBuffer - The message buffer to sign
26
+ * @returns the addresses
27
+ */
28
+ getAddresses(): EthAddress[];
29
+ /**
30
+ * Sign a message with all keystore private keys
31
+ * @param typedData - The complete EIP-712 typed data structure (domain, types, primaryType, message)
32
+ * @param _context - Signing context (ignored by LocalKeyStore, used for HA protection)
23
33
  * @return signature
24
34
  */
25
- sign(digest: Buffer32): Promise<Signature>;
26
- signMessage(message: Buffer32): Promise<Signature>;
35
+ signTypedData(typedData: TypedDataDefinition, _context: SigningContext): Promise<Signature[]>;
36
+ /**
37
+ * Sign a message with a specific address's private key
38
+ * @param address - The address of the signer to use
39
+ * @param typedData - The complete EIP-712 typed data structure (domain, types, primaryType, message)
40
+ * @param _context - Signing context (ignored by LocalKeyStore, used for HA protection)
41
+ * @returns signature for the specified address
42
+ * @throws Error if the address is not found in the keystore
43
+ */
44
+ signTypedDataWithAddress(address: EthAddress, typedData: TypedDataDefinition, _context: SigningContext): Promise<Signature>;
45
+ /**
46
+ * Sign a message using eth_sign with all keystore private keys
47
+ *
48
+ * @param message - The message to sign
49
+ * @param _context - Signing context (ignored by LocalKeyStore, used for HA protection)
50
+ * @return signatures
51
+ */
52
+ signMessage(message: Buffer32, _context: SigningContext): Promise<Signature[]>;
53
+ /**
54
+ * Sign a message using eth_sign with a specific address's private key
55
+ * @param address - The address of the signer to use
56
+ * @param message - The message to sign
57
+ * @param _context - Signing context (ignored by LocalKeyStore, used for HA protection)
58
+ * @returns signature for the specified address
59
+ * @throws Error if the address is not found in the keystore
60
+ */
61
+ signMessageWithAddress(address: EthAddress, message: Buffer32, _context: SigningContext): Promise<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C,CAMlH;CACF"}
@@ -1,32 +1,83 @@
1
- import { Secp256k1Signer } from '@aztec/foundation/crypto';
1
+ import { Buffer32 } from '@aztec/foundation/buffer';
2
+ import { Secp256k1Signer } from '@aztec/foundation/crypto/secp256k1-signer';
3
+ import { hashTypedData } from 'viem';
2
4
  /**
3
5
  * Local Key Store
4
6
  *
5
- * An implementation of the Key store using an in memory private key.
7
+ * An implementation of the Key store using in memory private keys.
6
8
  */ export class LocalKeyStore {
7
- signer;
8
- constructor(privateKey){
9
- this.signer = new Secp256k1Signer(privateKey);
9
+ signers;
10
+ signersByAddress;
11
+ constructor(privateKeys){
12
+ this.signers = privateKeys.map((privateKey)=>new Secp256k1Signer(privateKey));
13
+ this.signersByAddress = new Map(this.signers.map((signer)=>[
14
+ signer.address.toString(),
15
+ signer
16
+ ]));
10
17
  }
11
18
  /**
12
- * Get the address of the signer
19
+ * Get the address of a signer by index
13
20
  *
21
+ * @param index - The index of the signer
14
22
  * @returns the address
15
- */ getAddress() {
16
- return this.signer.address;
23
+ */ getAddress(index) {
24
+ if (index >= this.signers.length) {
25
+ throw new Error(`Index ${index} is out of bounds.`);
26
+ }
27
+ return this.signers[index].address;
17
28
  }
18
29
  /**
19
- * Sign a message with the keystore private key
30
+ * Get the addresses of all signers
20
31
  *
21
- * @param messageBuffer - The message buffer to sign
32
+ * @returns the addresses
33
+ */ getAddresses() {
34
+ return this.signers.map((signer)=>signer.address);
35
+ }
36
+ /**
37
+ * Sign a message with all keystore private keys
38
+ * @param typedData - The complete EIP-712 typed data structure (domain, types, primaryType, message)
39
+ * @param _context - Signing context (ignored by LocalKeyStore, used for HA protection)
22
40
  * @return signature
23
- */ sign(digest) {
24
- const signature = this.signer.sign(digest);
25
- return Promise.resolve(signature);
41
+ */ signTypedData(typedData, _context) {
42
+ const digest = hashTypedData(typedData);
43
+ return Promise.all(this.signers.map((signer)=>signer.sign(Buffer32.fromString(digest))));
44
+ }
45
+ /**
46
+ * Sign a message with a specific address's private key
47
+ * @param address - The address of the signer to use
48
+ * @param typedData - The complete EIP-712 typed data structure (domain, types, primaryType, message)
49
+ * @param _context - Signing context (ignored by LocalKeyStore, used for HA protection)
50
+ * @returns signature for the specified address
51
+ * @throws Error if the address is not found in the keystore
52
+ */ signTypedDataWithAddress(address, typedData, _context) {
53
+ const signer = this.signersByAddress.get(address.toString());
54
+ if (!signer) {
55
+ throw new Error(`No signer found for address ${address.toString()}`);
56
+ }
57
+ const digest = hashTypedData(typedData);
58
+ return Promise.resolve(signer.sign(Buffer32.fromString(digest)));
26
59
  }
27
- signMessage(message) {
28
- // Sign message adds eth sign prefix and hashes before signing
29
- const signature = this.signer.signMessage(message);
30
- return Promise.resolve(signature);
60
+ /**
61
+ * Sign a message using eth_sign with all keystore private keys
62
+ *
63
+ * @param message - The message to sign
64
+ * @param _context - Signing context (ignored by LocalKeyStore, used for HA protection)
65
+ * @return signatures
66
+ */ signMessage(message, _context) {
67
+ return Promise.all(this.signers.map((signer)=>signer.signMessage(message)));
68
+ }
69
+ /**
70
+ * Sign a message using eth_sign with a specific address's private key
71
+ * @param address - The address of the signer to use
72
+ * @param message - The message to sign
73
+ * @param _context - Signing context (ignored by LocalKeyStore, used for HA protection)
74
+ * @returns signature for the specified address
75
+ * @throws Error if the address is not found in the keystore
76
+ */ signMessageWithAddress(address, message, _context) {
77
+ const signer = this.signersByAddress.get(address.toString());
78
+ if (!signer) {
79
+ throw new Error(`No signer found for address ${address.toString()}`);
80
+ }
81
+ return Promise.resolve(signer.signMessage(message));
31
82
  }
32
83
  }
@@ -0,0 +1,151 @@
1
+ import type { Buffer32 } from '@aztec/foundation/buffer';
2
+ import { EthAddress } from '@aztec/foundation/eth-address';
3
+ import type { Signature } from '@aztec/foundation/eth-signature';
4
+ import { KeystoreManager } from '@aztec/node-keystore';
5
+ import type { EthRemoteSignerConfig } from '@aztec/node-keystore';
6
+ import { AztecAddress } from '@aztec/stdlib/aztec-address';
7
+ import type { SigningContext } from '@aztec/validator-ha-signer/types';
8
+ import type { TypedDataDefinition } from 'viem';
9
+ import type { ExtendedValidatorKeyStore } from './interface.js';
10
+ export declare class NodeKeystoreAdapter implements ExtendedValidatorKeyStore {
11
+ private readonly keystoreManager;
12
+ private readonly validators;
13
+ private readonly addressIndex;
14
+ private constructor();
15
+ /**
16
+ * Create an adapter from a keystore JSON file on disk.
17
+ * @param keystoreFilePath Absolute or relative path to a keystore JSON file
18
+ * @returns A configured NodeKeystoreAdapter instance
19
+ * @throws Error when the file fails schema validation or cannot be read
20
+ */
21
+ static fromKeystoreFile(keystoreFilePath: string): NodeKeystoreAdapter;
22
+ /**
23
+ * Create an adapter from an in-memory keystore-like object.
24
+ * Validates resolved duplicate attester addresses across validators and sources.
25
+ * @param keystoreConfig Parsed config object (typically result of loadKeystoreFile)
26
+ * @returns A configured NodeKeystoreAdapter instance
27
+ * @throws Error when resolved duplicate attester addresses are detected
28
+ */
29
+ static fromKeystoreConfig(keystoreConfig: unknown): NodeKeystoreAdapter;
30
+ /**
31
+ * Build an adapter directly from a list of validator private keys.
32
+ * Each key becomes a separate validator using the same key for attester and publisher,
33
+ * coinbase defaults to the derived EOA address, and feeRecipient is a 32-byte padded address.
34
+ * Note: Fee recipient is a temporary placeholder, replace with actual fee recipient when implemented.
35
+ */
36
+ static fromPrivateKeys(privateKeys: string[]): NodeKeystoreAdapter;
37
+ /**
38
+ * Build an adapter for a Web3Signer setup by providing the signer URL and the EOA addresses.
39
+ * Each address becomes a separate validator; attester and publisher point to the same remote signer entry.
40
+ * Note: Fee recipient is a temporary placeholder, replace with actual fee recipient when implemented.
41
+ */
42
+ static fromWeb3Signer(web3SignerUrl: string, addresses: EthAddress[]): NodeKeystoreAdapter;
43
+ static fromKeyStoreManager(manager: KeystoreManager): NodeKeystoreAdapter;
44
+ /**
45
+ * Normalize address keys to lowercase hex strings for map/set usage.
46
+ */
47
+ private static key;
48
+ /**
49
+ * Ensure per-validator signer cache exists; build it by creating
50
+ * attester/publisher signers and populating indices when missing.
51
+ * @param validatorIndex Index of the validator in the keystore
52
+ * @returns The cached validator entry
53
+ */
54
+ private ensureValidator;
55
+ /**
56
+ * Iterate all validator indices in the keystore manager.
57
+ */
58
+ private validatorIndices;
59
+ /**
60
+ * Find the validator index that contains the given attester address.
61
+ * @param attesterAddress Address to locate
62
+ * @returns Validator index
63
+ * @throws Error when no validator contains the attester
64
+ */
65
+ private findValidatorIndexForAttester;
66
+ /**
67
+ * Get attester address by flat index across all validators' attester sets.
68
+ * @param index Zero-based flat index across all attesters
69
+ * @returns EthAddress for the indexed attester
70
+ * @throws Error when index is out of bounds
71
+ */
72
+ getAddress(index: number): EthAddress;
73
+ /**
74
+ * Get all attester addresses across validators (legacy-compatible view).
75
+ */
76
+ getAddresses(): EthAddress[];
77
+ /**
78
+ * Sign typed data with all attester signers across validators.
79
+ * @param typedData EIP-712 typed data
80
+ * @param _context Signing context (ignored by NodeKeystoreAdapter, used for HA protection)
81
+ * @returns Array of signatures in validator order, flattened
82
+ */
83
+ signTypedData(typedData: TypedDataDefinition, _context: SigningContext): Promise<Signature[]>;
84
+ /**
85
+ * Sign a message with all attester signers across validators.
86
+ * @param message 32-byte message (already hashed/padded as needed)
87
+ * @param _context Signing context (ignored by NodeKeystoreAdapter, used for HA protection)
88
+ * @returns Array of signatures in validator order, flattened
89
+ */
90
+ signMessage(message: Buffer32, _context: SigningContext): Promise<Signature[]>;
91
+ /**
92
+ * Sign typed data with a signer identified by address (any role).
93
+ * Hydrates caches on-demand when the address is first seen.
94
+ * @param address Address to sign with
95
+ * @param typedData EIP-712 typed data
96
+ * @param _context Signing context (ignored by NodeKeystoreAdapter, used for HA protection)
97
+ * @returns Signature from the signer matching the address
98
+ * @throws Error when no signer exists for the address
99
+ */
100
+ signTypedDataWithAddress(address: EthAddress, typedData: TypedDataDefinition, _context: SigningContext): Promise<Signature>;
101
+ /**
102
+ * Sign a message with a signer identified by address (any role).
103
+ * Hydrates caches on-demand when the address is first seen.
104
+ * @param address Address to sign with
105
+ * @param message 32-byte message
106
+ * @param _context Signing context (ignored by NodeKeystoreAdapter, used for HA protection)
107
+ * @returns Signature from the signer matching the address
108
+ * @throws Error when no signer exists for the address
109
+ */
110
+ signMessageWithAddress(address: EthAddress, message: Buffer32, _context: SigningContext): Promise<Signature>;
111
+ /**
112
+ * Get all attester addresses across validators (alias of getAddresses).
113
+ */
114
+ getAttesterAddresses(): EthAddress[];
115
+ /**
116
+ * Get the effective coinbase address for the validator that contains the given attester.
117
+ * @param attesterAddress Address of an attester belonging to the validator
118
+ * @returns Coinbase EthAddress
119
+ */
120
+ getCoinbaseAddress(attesterAddress: EthAddress): EthAddress;
121
+ /**
122
+ * Get the publisher addresses for the validator that contains the given attester.
123
+ * @param attesterAddress Address of an attester belonging to the validator
124
+ * @returns Array of publisher addresses
125
+ */
126
+ getPublisherAddresses(attesterAddress: EthAddress): EthAddress[];
127
+ getAttestorForPublisher(publisherAddress: EthAddress): EthAddress;
128
+ /**
129
+ * Get the fee recipient for the validator that contains the given attester.
130
+ * @param attesterAddress Address of an attester belonging to the validator
131
+ * @returns Fee recipient as AztecAddress
132
+ */
133
+ getFeeRecipient(attesterAddress: EthAddress): AztecAddress;
134
+ /**
135
+ * Get the effective remote signer configuration for the attester.
136
+ * Precedence: account-level override > validator-level override > file-level default.
137
+ * Returns undefined for local signers (private key / JSON-V3 / mnemonic).
138
+ * @param attesterAddress Address of an attester belonging to the validator
139
+ * @returns Effective remote signer configuration or undefined
140
+ */
141
+ getRemoteSignerConfig(attesterAddress: EthAddress): EthRemoteSignerConfig | undefined;
142
+ /**
143
+ * Start the key store - no-op
144
+ */
145
+ start(): Promise<void>;
146
+ /**
147
+ * Stop the key store - no-op
148
+ */
149
+ stop(): Promise<void>;
150
+ }
151
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZV9rZXlzdG9yZV9hZGFwdGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMva2V5X3N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