@aztec/validator-client 0.0.1-commit.fce3e4f → 0.0.1-commit.ff7989d6c
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/README.md +285 -0
- package/dest/block_proposal_handler.d.ts +24 -13
- package/dest/block_proposal_handler.d.ts.map +1 -1
- package/dest/block_proposal_handler.js +329 -87
- package/dest/checkpoint_builder.d.ts +66 -0
- package/dest/checkpoint_builder.d.ts.map +1 -0
- package/dest/checkpoint_builder.js +175 -0
- package/dest/config.d.ts +1 -1
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +16 -8
- package/dest/duties/validation_service.d.ts +42 -13
- package/dest/duties/validation_service.d.ts.map +1 -1
- package/dest/duties/validation_service.js +111 -28
- package/dest/factory.d.ts +13 -8
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +2 -2
- package/dest/index.d.ts +3 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +2 -0
- package/dest/key_store/ha_key_store.d.ts +99 -0
- package/dest/key_store/ha_key_store.d.ts.map +1 -0
- package/dest/key_store/ha_key_store.js +208 -0
- package/dest/key_store/index.d.ts +2 -1
- package/dest/key_store/index.d.ts.map +1 -1
- package/dest/key_store/index.js +1 -0
- package/dest/key_store/interface.d.ts +36 -6
- package/dest/key_store/interface.d.ts.map +1 -1
- package/dest/key_store/local_key_store.d.ts +10 -5
- package/dest/key_store/local_key_store.d.ts.map +1 -1
- package/dest/key_store/local_key_store.js +9 -5
- package/dest/key_store/node_keystore_adapter.d.ts +18 -5
- package/dest/key_store/node_keystore_adapter.d.ts.map +1 -1
- package/dest/key_store/node_keystore_adapter.js +18 -4
- package/dest/key_store/web3signer_key_store.d.ts +10 -5
- package/dest/key_store/web3signer_key_store.d.ts.map +1 -1
- package/dest/key_store/web3signer_key_store.js +9 -5
- package/dest/metrics.d.ts +4 -3
- package/dest/metrics.d.ts.map +1 -1
- package/dest/metrics.js +34 -30
- package/dest/tx_validator/index.d.ts +3 -0
- package/dest/tx_validator/index.d.ts.map +1 -0
- package/dest/tx_validator/index.js +2 -0
- package/dest/tx_validator/nullifier_cache.d.ts +14 -0
- package/dest/tx_validator/nullifier_cache.d.ts.map +1 -0
- package/dest/tx_validator/nullifier_cache.js +24 -0
- package/dest/tx_validator/tx_validator_factory.d.ts +19 -0
- package/dest/tx_validator/tx_validator_factory.d.ts.map +1 -0
- package/dest/tx_validator/tx_validator_factory.js +54 -0
- package/dest/validator.d.ts +74 -21
- package/dest/validator.d.ts.map +1 -1
- package/dest/validator.js +452 -56
- package/package.json +23 -13
- package/src/block_proposal_handler.ts +253 -59
- package/src/checkpoint_builder.ts +321 -0
- package/src/config.ts +15 -7
- package/src/duties/validation_service.ts +162 -33
- package/src/factory.ts +17 -8
- package/src/index.ts +2 -0
- package/src/key_store/ha_key_store.ts +269 -0
- package/src/key_store/index.ts +1 -0
- package/src/key_store/interface.ts +44 -5
- package/src/key_store/local_key_store.ts +14 -5
- package/src/key_store/node_keystore_adapter.ts +28 -5
- package/src/key_store/web3signer_key_store.ts +18 -5
- package/src/metrics.ts +45 -33
- package/src/tx_validator/index.ts +2 -0
- package/src/tx_validator/nullifier_cache.ts +30 -0
- package/src/tx_validator/tx_validator_factory.ts +154 -0
- package/src/validator.ts +619 -85
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* High Availability Key Store
|
|
3
|
+
*
|
|
4
|
+
* A ValidatorKeyStore wrapper that adds slashing protection for HA validator setups.
|
|
5
|
+
* When multiple validator nodes are running, only one node will sign for a given duty.
|
|
6
|
+
*/
|
|
7
|
+
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
8
|
+
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
9
|
+
import type { Signature } from '@aztec/foundation/eth-signature';
|
|
10
|
+
import type { EthRemoteSignerConfig } from '@aztec/node-keystore';
|
|
11
|
+
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
12
|
+
import { type SigningContext } from '@aztec/validator-ha-signer/types';
|
|
13
|
+
import type { ValidatorHASigner } from '@aztec/validator-ha-signer/validator-ha-signer';
|
|
14
|
+
import { type TypedDataDefinition } from 'viem';
|
|
15
|
+
import type { ExtendedValidatorKeyStore } from './interface.js';
|
|
16
|
+
/**
|
|
17
|
+
* High Availability Key Store
|
|
18
|
+
*
|
|
19
|
+
* Wraps a base ExtendedValidatorKeyStore and ValidatorHASigner to provide
|
|
20
|
+
* HA-protected signing operations (when context is provided).
|
|
21
|
+
*
|
|
22
|
+
* The extended interface methods (getAttesterAddresses, getCoinbaseAddress, etc.)
|
|
23
|
+
* are pure pass-through since they don't require HA coordination.
|
|
24
|
+
*
|
|
25
|
+
* Usage:
|
|
26
|
+
* ```typescript
|
|
27
|
+
* const baseKeyStore = NodeKeystoreAdapter.fromPrivateKeys(privateKeys);
|
|
28
|
+
* const haSigner = new ValidatorHASigner(db, config);
|
|
29
|
+
* const haKeyStore = new HAKeyStore(baseKeyStore, haSigner);
|
|
30
|
+
*
|
|
31
|
+
* // Without context - signs directly (no HA protection)
|
|
32
|
+
* const sig = await haKeyStore.signMessageWithAddress(addr, msg);
|
|
33
|
+
*
|
|
34
|
+
* // With context - HA protected, throws DutyAlreadySignedError if already signed
|
|
35
|
+
* const result = await haKeyStore.signMessageWithAddress(addr, msg, {
|
|
36
|
+
* slot: 100n,
|
|
37
|
+
* blockNumber: 50n,
|
|
38
|
+
* dutyType: DutyType.BLOCK_PROPOSAL,
|
|
39
|
+
* });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare class HAKeyStore implements ExtendedValidatorKeyStore {
|
|
43
|
+
private readonly baseKeyStore;
|
|
44
|
+
private readonly haSigner;
|
|
45
|
+
private readonly log;
|
|
46
|
+
constructor(baseKeyStore: ExtendedValidatorKeyStore, haSigner: ValidatorHASigner);
|
|
47
|
+
/**
|
|
48
|
+
* Sign typed data with all addresses.
|
|
49
|
+
* Coordinates across nodes to prevent double-signing for most duty types.
|
|
50
|
+
* AUTH_REQUEST and TXS duties bypass HA protection since signing multiple times is safe.
|
|
51
|
+
* Returns only signatures that were successfully claimed by this node.
|
|
52
|
+
*/
|
|
53
|
+
signTypedData(typedData: TypedDataDefinition, context: SigningContext): Promise<Signature[]>;
|
|
54
|
+
/**
|
|
55
|
+
* Sign a message with all addresses.
|
|
56
|
+
* Coordinates across nodes to prevent double-signing for most duty types.
|
|
57
|
+
* AUTH_REQUEST and TXS duties bypass HA protection since signing multiple times is safe.
|
|
58
|
+
* Returns only signatures that were successfully claimed by this node.
|
|
59
|
+
*/
|
|
60
|
+
signMessage(message: Buffer32, context: SigningContext): Promise<Signature[]>;
|
|
61
|
+
/**
|
|
62
|
+
* Sign typed data with a specific address.
|
|
63
|
+
* Coordinates across nodes to prevent double-signing for most duty types.
|
|
64
|
+
* AUTH_REQUEST and TXS duties bypass HA protection since signing multiple times is safe.
|
|
65
|
+
* @throws DutyAlreadySignedError if the duty was already signed by another node
|
|
66
|
+
* @throws SlashingProtectionError if attempting to sign different data for the same slot
|
|
67
|
+
*/
|
|
68
|
+
signTypedDataWithAddress(address: EthAddress, typedData: TypedDataDefinition, context: SigningContext): Promise<Signature>;
|
|
69
|
+
/**
|
|
70
|
+
* Sign a message with a specific address.
|
|
71
|
+
* Coordinates across nodes to prevent double-signing for most duty types.
|
|
72
|
+
* AUTH_REQUEST and TXS duties bypass HA protection since signing multiple times is safe.
|
|
73
|
+
* @throws DutyAlreadySignedError if the duty was already signed by another node
|
|
74
|
+
* @throws SlashingProtectionError if attempting to sign different data for the same slot
|
|
75
|
+
*/
|
|
76
|
+
signMessageWithAddress(address: EthAddress, message: Buffer32, context: SigningContext): Promise<Signature>;
|
|
77
|
+
getAddress(index: number): EthAddress;
|
|
78
|
+
getAddresses(): EthAddress[];
|
|
79
|
+
getAttesterAddresses(): EthAddress[];
|
|
80
|
+
getCoinbaseAddress(attesterAddress: EthAddress): EthAddress;
|
|
81
|
+
getPublisherAddresses(attesterAddress: EthAddress): EthAddress[];
|
|
82
|
+
getFeeRecipient(attesterAddress: EthAddress): AztecAddress;
|
|
83
|
+
getRemoteSignerConfig(attesterAddress: EthAddress): EthRemoteSignerConfig | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Process signing errors from the HA signer.
|
|
86
|
+
* Logs expected HA errors (already signed) at appropriate levels.
|
|
87
|
+
* Re-throws unexpected errors.
|
|
88
|
+
*/
|
|
89
|
+
private processSigningError;
|
|
90
|
+
/**
|
|
91
|
+
* Start the high-availability key store
|
|
92
|
+
*/
|
|
93
|
+
start(): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Stop the high-availability key store
|
|
96
|
+
*/
|
|
97
|
+
stop(): Promise<void>;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGFfa2V5X3N0b3JlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMva2V5X3N0b3JlL2hhX2tleV9zdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7R0FLRztBQUNILE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUNwRCxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUNoRSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxpQ0FBaUMsQ0FBQztBQUVqRSxPQUFPLEtBQUssRUFBRSxxQkFBcUIsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ2xFLE9BQU8sS0FBSyxFQUFFLFlBQVksRUFBRSxNQUFNLDZCQUE2QixDQUFDO0FBRWhFLE9BQU8sRUFFTCxLQUFLLGNBQWMsRUFFcEIsTUFBTSxrQ0FBa0MsQ0FBQztBQUMxQyxPQUFPLEtBQUssRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGdEQUFnRCx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S,CAEpF;IAED;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAwB3B;;OAEG;IACU,KAAK,kBAEjB;IAED;;OAEG;IACU,IAAI,kBAEhB;CACF"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* High Availability Key Store
|
|
3
|
+
*
|
|
4
|
+
* A ValidatorKeyStore wrapper that adds slashing protection for HA validator setups.
|
|
5
|
+
* When multiple validator nodes are running, only one node will sign for a given duty.
|
|
6
|
+
*/ import { Buffer32 } from '@aztec/foundation/buffer';
|
|
7
|
+
import { createLogger } from '@aztec/foundation/log';
|
|
8
|
+
import { DutyAlreadySignedError, SlashingProtectionError } from '@aztec/validator-ha-signer/errors';
|
|
9
|
+
import { isHAProtectedContext } from '@aztec/validator-ha-signer/types';
|
|
10
|
+
import { hashTypedData } from 'viem';
|
|
11
|
+
/**
|
|
12
|
+
* High Availability Key Store
|
|
13
|
+
*
|
|
14
|
+
* Wraps a base ExtendedValidatorKeyStore and ValidatorHASigner to provide
|
|
15
|
+
* HA-protected signing operations (when context is provided).
|
|
16
|
+
*
|
|
17
|
+
* The extended interface methods (getAttesterAddresses, getCoinbaseAddress, etc.)
|
|
18
|
+
* are pure pass-through since they don't require HA coordination.
|
|
19
|
+
*
|
|
20
|
+
* Usage:
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const baseKeyStore = NodeKeystoreAdapter.fromPrivateKeys(privateKeys);
|
|
23
|
+
* const haSigner = new ValidatorHASigner(db, config);
|
|
24
|
+
* const haKeyStore = new HAKeyStore(baseKeyStore, haSigner);
|
|
25
|
+
*
|
|
26
|
+
* // Without context - signs directly (no HA protection)
|
|
27
|
+
* const sig = await haKeyStore.signMessageWithAddress(addr, msg);
|
|
28
|
+
*
|
|
29
|
+
* // With context - HA protected, throws DutyAlreadySignedError if already signed
|
|
30
|
+
* const result = await haKeyStore.signMessageWithAddress(addr, msg, {
|
|
31
|
+
* slot: 100n,
|
|
32
|
+
* blockNumber: 50n,
|
|
33
|
+
* dutyType: DutyType.BLOCK_PROPOSAL,
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*/ export class HAKeyStore {
|
|
37
|
+
baseKeyStore;
|
|
38
|
+
haSigner;
|
|
39
|
+
log;
|
|
40
|
+
constructor(baseKeyStore, haSigner){
|
|
41
|
+
this.baseKeyStore = baseKeyStore;
|
|
42
|
+
this.haSigner = haSigner;
|
|
43
|
+
this.log = createLogger('ha-key-store');
|
|
44
|
+
this.log.info('HAKeyStore initialized', {
|
|
45
|
+
nodeId: haSigner.nodeId
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Sign typed data with all addresses.
|
|
50
|
+
* Coordinates across nodes to prevent double-signing for most duty types.
|
|
51
|
+
* AUTH_REQUEST and TXS duties bypass HA protection since signing multiple times is safe.
|
|
52
|
+
* Returns only signatures that were successfully claimed by this node.
|
|
53
|
+
*/ async signTypedData(typedData, context) {
|
|
54
|
+
// no need for HA protection on auth request and txs signatures
|
|
55
|
+
if (!isHAProtectedContext(context)) {
|
|
56
|
+
return this.baseKeyStore.signTypedData(typedData, context);
|
|
57
|
+
}
|
|
58
|
+
// Sign each address with HA protection
|
|
59
|
+
const addresses = this.getAddresses();
|
|
60
|
+
const results = await Promise.allSettled(addresses.map((addr)=>this.signTypedDataWithAddress(addr, typedData, context)));
|
|
61
|
+
// Filter out failures (already signed by other nodes or other errors)
|
|
62
|
+
return results.filter((result)=>{
|
|
63
|
+
if (result.status === 'fulfilled') {
|
|
64
|
+
return true;
|
|
65
|
+
}
|
|
66
|
+
// Log expected HA errors (already signed) at debug level
|
|
67
|
+
if (result.reason instanceof DutyAlreadySignedError) {
|
|
68
|
+
this.log.debug(`Duty already signed by another node`, {
|
|
69
|
+
dutyType: context.dutyType,
|
|
70
|
+
slot: context.slot,
|
|
71
|
+
signedByNode: result.reason.signedByNode
|
|
72
|
+
});
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
// Re-throw unexpected errors
|
|
76
|
+
throw result.reason;
|
|
77
|
+
}).map((result)=>result.value);
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Sign a message with all addresses.
|
|
81
|
+
* Coordinates across nodes to prevent double-signing for most duty types.
|
|
82
|
+
* AUTH_REQUEST and TXS duties bypass HA protection since signing multiple times is safe.
|
|
83
|
+
* Returns only signatures that were successfully claimed by this node.
|
|
84
|
+
*/ async signMessage(message, context) {
|
|
85
|
+
// no need for HA protection on auth request and txs signatures
|
|
86
|
+
if (!isHAProtectedContext(context)) {
|
|
87
|
+
return this.baseKeyStore.signMessage(message, context);
|
|
88
|
+
}
|
|
89
|
+
// Sign each address with HA protection
|
|
90
|
+
const addresses = this.getAddresses();
|
|
91
|
+
const results = await Promise.allSettled(addresses.map((addr)=>this.signMessageWithAddress(addr, message, context)));
|
|
92
|
+
// Filter out failures (already signed by other nodes or other errors)
|
|
93
|
+
return results.filter((result)=>{
|
|
94
|
+
if (result.status === 'fulfilled') {
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
// Log expected HA errors (already signed) at debug level
|
|
98
|
+
if (result.reason instanceof DutyAlreadySignedError) {
|
|
99
|
+
this.log.debug(`Duty already signed by another node`, {
|
|
100
|
+
dutyType: context.dutyType,
|
|
101
|
+
slot: context.slot,
|
|
102
|
+
signedByNode: result.reason.signedByNode
|
|
103
|
+
});
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
// Re-throw unexpected errors
|
|
107
|
+
throw result.reason;
|
|
108
|
+
}).map((result)=>result.value);
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Sign typed data with a specific address.
|
|
112
|
+
* Coordinates across nodes to prevent double-signing for most duty types.
|
|
113
|
+
* AUTH_REQUEST and TXS duties bypass HA protection since signing multiple times is safe.
|
|
114
|
+
* @throws DutyAlreadySignedError if the duty was already signed by another node
|
|
115
|
+
* @throws SlashingProtectionError if attempting to sign different data for the same slot
|
|
116
|
+
*/ async signTypedDataWithAddress(address, typedData, context) {
|
|
117
|
+
// AUTH_REQUEST and TXS bypass HA protection - multiple signatures are safe
|
|
118
|
+
if (!isHAProtectedContext(context)) {
|
|
119
|
+
return this.baseKeyStore.signTypedDataWithAddress(address, typedData, context);
|
|
120
|
+
}
|
|
121
|
+
// Compute signing root from typed data for HA tracking
|
|
122
|
+
const digest = hashTypedData(typedData);
|
|
123
|
+
const messageHash = Buffer32.fromString(digest);
|
|
124
|
+
try {
|
|
125
|
+
return await this.haSigner.signWithProtection(address, messageHash, context, ()=>this.baseKeyStore.signTypedDataWithAddress(address, typedData, context));
|
|
126
|
+
} catch (error) {
|
|
127
|
+
this.processSigningError(error, context);
|
|
128
|
+
throw error;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Sign a message with a specific address.
|
|
133
|
+
* Coordinates across nodes to prevent double-signing for most duty types.
|
|
134
|
+
* AUTH_REQUEST and TXS duties bypass HA protection since signing multiple times is safe.
|
|
135
|
+
* @throws DutyAlreadySignedError if the duty was already signed by another node
|
|
136
|
+
* @throws SlashingProtectionError if attempting to sign different data for the same slot
|
|
137
|
+
*/ async signMessageWithAddress(address, message, context) {
|
|
138
|
+
// no need for HA protection on auth request and txs signatures
|
|
139
|
+
if (!isHAProtectedContext(context)) {
|
|
140
|
+
return this.baseKeyStore.signMessageWithAddress(address, message, context);
|
|
141
|
+
}
|
|
142
|
+
try {
|
|
143
|
+
return await this.haSigner.signWithProtection(address, message, context, (messageHash)=>this.baseKeyStore.signMessageWithAddress(address, messageHash, context));
|
|
144
|
+
} catch (error) {
|
|
145
|
+
this.processSigningError(error, context);
|
|
146
|
+
throw error;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
150
|
+
// pass-through methods (no HA logic needed)
|
|
151
|
+
// ─────────────────────────────────────────────────────────────────────────────
|
|
152
|
+
getAddress(index) {
|
|
153
|
+
return this.baseKeyStore.getAddress(index);
|
|
154
|
+
}
|
|
155
|
+
getAddresses() {
|
|
156
|
+
return this.baseKeyStore.getAddresses();
|
|
157
|
+
}
|
|
158
|
+
getAttesterAddresses() {
|
|
159
|
+
return this.baseKeyStore.getAttesterAddresses();
|
|
160
|
+
}
|
|
161
|
+
getCoinbaseAddress(attesterAddress) {
|
|
162
|
+
return this.baseKeyStore.getCoinbaseAddress(attesterAddress);
|
|
163
|
+
}
|
|
164
|
+
getPublisherAddresses(attesterAddress) {
|
|
165
|
+
return this.baseKeyStore.getPublisherAddresses(attesterAddress);
|
|
166
|
+
}
|
|
167
|
+
getFeeRecipient(attesterAddress) {
|
|
168
|
+
return this.baseKeyStore.getFeeRecipient(attesterAddress);
|
|
169
|
+
}
|
|
170
|
+
getRemoteSignerConfig(attesterAddress) {
|
|
171
|
+
return this.baseKeyStore.getRemoteSignerConfig(attesterAddress);
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Process signing errors from the HA signer.
|
|
175
|
+
* Logs expected HA errors (already signed) at appropriate levels.
|
|
176
|
+
* Re-throws unexpected errors.
|
|
177
|
+
*/ processSigningError(error, context) {
|
|
178
|
+
if (error instanceof DutyAlreadySignedError) {
|
|
179
|
+
this.log.debug(`Duty already signed by another node with the same payload`, {
|
|
180
|
+
dutyType: context.dutyType,
|
|
181
|
+
slot: context.slot,
|
|
182
|
+
signedByNode: error.signedByNode
|
|
183
|
+
});
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
if (error instanceof SlashingProtectionError) {
|
|
187
|
+
this.log.warn(`Duty already signed by another node with different payload`, {
|
|
188
|
+
dutyType: context.dutyType,
|
|
189
|
+
slot: context.slot,
|
|
190
|
+
existingMessageHash: error.existingMessageHash,
|
|
191
|
+
attemptedMessageHash: error.attemptedMessageHash
|
|
192
|
+
});
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
// Re-throw errors
|
|
196
|
+
throw error;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Start the high-availability key store
|
|
200
|
+
*/ async start() {
|
|
201
|
+
await this.haSigner.start();
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Stop the high-availability key store
|
|
205
|
+
*/ async stop() {
|
|
206
|
+
await this.haSigner.stop();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
@@ -2,4 +2,5 @@ export * from './interface.js';
|
|
|
2
2
|
export * from './local_key_store.js';
|
|
3
3
|
export * from './node_keystore_adapter.js';
|
|
4
4
|
export * from './web3signer_key_store.js';
|
|
5
|
-
|
|
5
|
+
export * from './ha_key_store.js';
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9rZXlfc3RvcmUvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxnQkFBZ0IsQ0FBQztBQUMvQixjQUFjLHNCQUFzQixDQUFDO0FBQ3JDLGNBQWMsNEJBQTRCLENBQUM7QUFDM0MsY0FBYywyQkFBMkIsQ0FBQztBQUMxQyxjQUFjLG1CQUFtQixDQUFDIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/key_store/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/key_store/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC"}
|
package/dest/key_store/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
|
3
3
|
import type { Signature } from '@aztec/foundation/eth-signature';
|
|
4
4
|
import type { EthRemoteSignerConfig } from '@aztec/node-keystore';
|
|
5
5
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
|
+
import type { SigningContext } from '@aztec/validator-ha-signer/types';
|
|
6
7
|
import type { TypedDataDefinition } from 'viem';
|
|
7
8
|
/** Key Store
|
|
8
9
|
*
|
|
@@ -22,17 +23,38 @@ export interface ValidatorKeyStore {
|
|
|
22
23
|
* @returns all addresses
|
|
23
24
|
*/
|
|
24
25
|
getAddresses(): EthAddress[];
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* Sign typed data with all keystore private keys
|
|
28
|
+
* @param typedData - The complete EIP-712 typed data structure
|
|
29
|
+
* @param context - Signing context for HA slashing protection
|
|
30
|
+
* @returns signatures (when context provided with HA, only successfully claimed signatures are returned)
|
|
31
|
+
*/
|
|
32
|
+
signTypedData(typedData: TypedDataDefinition, context: SigningContext): Promise<Signature[]>;
|
|
33
|
+
/**
|
|
34
|
+
* Sign typed data with a specific address's private key
|
|
35
|
+
* @param address - The address of the signer to use
|
|
36
|
+
* @param typedData - The complete EIP-712 typed data structure
|
|
37
|
+
* @param context - Signing context for HA slashing protection
|
|
38
|
+
* @returns signature
|
|
39
|
+
*/
|
|
40
|
+
signTypedDataWithAddress(address: EthAddress, typedData: TypedDataDefinition, context: SigningContext): Promise<Signature>;
|
|
27
41
|
/**
|
|
28
42
|
* Flavor of sign message that followed EIP-712 eth signed message prefix
|
|
29
43
|
* Note: this is only required when we are using ecdsa signatures over secp256k1
|
|
30
44
|
*
|
|
31
45
|
* @param message - The message to sign.
|
|
32
|
-
* @
|
|
46
|
+
* @param context - Signing context for HA slashing protection
|
|
47
|
+
* @returns The signatures (when context provided with HA, only successfully claimed signatures are returned).
|
|
48
|
+
*/
|
|
49
|
+
signMessage(message: Buffer32, context: SigningContext): Promise<Signature[]>;
|
|
50
|
+
/**
|
|
51
|
+
* Sign a message with a specific address's private key
|
|
52
|
+
* @param address - The address of the signer to use
|
|
53
|
+
* @param message - The message to sign
|
|
54
|
+
* @param context - Signing context for HA slashing protection
|
|
55
|
+
* @returns signature
|
|
33
56
|
*/
|
|
34
|
-
|
|
35
|
-
signMessageWithAddress(address: EthAddress, message: Buffer32): Promise<Signature>;
|
|
57
|
+
signMessageWithAddress(address: EthAddress, message: Buffer32, context: SigningContext): Promise<Signature>;
|
|
36
58
|
}
|
|
37
59
|
/**
|
|
38
60
|
* Extended ValidatorKeyStore interface that supports the new keystore configuration model
|
|
@@ -70,5 +92,13 @@ export interface ExtendedValidatorKeyStore extends ValidatorKeyStore {
|
|
|
70
92
|
* @returns the remote signer configuration or undefined
|
|
71
93
|
*/
|
|
72
94
|
getRemoteSignerConfig(attesterAddress: EthAddress): EthRemoteSignerConfig | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Start the key store
|
|
97
|
+
*/
|
|
98
|
+
start(): Promise<void>;
|
|
99
|
+
/**
|
|
100
|
+
* Stop the key store
|
|
101
|
+
*/
|
|
102
|
+
stop(): Promise<void>;
|
|
73
103
|
}
|
|
74
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
104
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMva2V5X3N0b3JlL2ludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUN6RCxPQUFPLEtBQUssRUFBRSxVQUFVLEVBQUUsTUFBTSwrQkFBK0IsQ0FBQztBQUNoRSxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxpQ0FBaUMsQ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xDQUFDO0NBQzdHO0FBRUQ7OztHQUdHO0FBQ0gsTUFBTSxXQUFXLHlCQUEwQixTQUFRLGlCQUFpQjtJQUNsRTs7O09BR0c7SUFDSCxvQkFBb0IsSUFBSSxVQUFVLEVBQUUsQ0FBQztJQUVyQzs7Ozs7T0FLRztJQUNILGtCQUFrQixDQUFDLGVBQWUsRUFBRSxVQUFVLEdBQUcsVUFBVSxDQUFDO0lBRTVEOzs7OztPQUtHO0lBQ0gscUJBQXFCLENBQUMsZUFBZSxFQUFFLFVBQVUsR0FBRyxVQUFVLEVBQUUsQ0FBQztJQUVqRTs7OztPQUlHO0lBQ0gsZUFBZSxDQUFDLGVBQWUsRUFBRSxVQUFVLEdBQUcsWUFBWSxDQUFDO0lBRTNEOzs7O09BSUc7SUFDSCxxQkFBcUIsQ0FBQyxlQUFlLEVBQUUsVUFBVSxHQUFHLHFCQUFxQixHQUFHLFNBQVMsQ0FBQztJQUV0Rjs7T0FFRztJQUNILEtBQUssSUFBSSxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7SUFFdkI7O09BRUc7SUFDSCxJQUFJLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0NBQ3ZCIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../src/key_store/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../../src/key_store/interface.ts"],"names":[],"mappings":"AAAA,OAAO,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AAe,EAAE,UAAU,GAAG,UAAU,CAAC;IAE5D;;;;;OAKG;IACH,qBAAqB,CAAC,eAAe,EAAE,UAAU,GAAG,UAAU,EAAE,CAAC;IAEjE;;;;OAIG;IACH,eAAe,CAAC,eAAe,EAAE,UAAU,GAAG,YAAY,CAAC;IAE3D;;;;OAIG;IACH,qBAAqB,CAAC,eAAe,EAAE,UAAU,GAAG,qBAAqB,GAAG,SAAS,CAAC;IAEtF;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;OAEG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
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';
|
|
4
5
|
import { type TypedDataDefinition } from 'viem';
|
|
5
6
|
import type { ValidatorKeyStore } from './interface.js';
|
|
6
7
|
/**
|
|
@@ -28,31 +29,35 @@ export declare class LocalKeyStore implements ValidatorKeyStore {
|
|
|
28
29
|
/**
|
|
29
30
|
* Sign a message with all keystore private keys
|
|
30
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)
|
|
31
33
|
* @return signature
|
|
32
34
|
*/
|
|
33
|
-
signTypedData(typedData: TypedDataDefinition): Promise<Signature[]>;
|
|
35
|
+
signTypedData(typedData: TypedDataDefinition, _context: SigningContext): Promise<Signature[]>;
|
|
34
36
|
/**
|
|
35
37
|
* Sign a message with a specific address's private key
|
|
36
38
|
* @param address - The address of the signer to use
|
|
37
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)
|
|
38
41
|
* @returns signature for the specified address
|
|
39
42
|
* @throws Error if the address is not found in the keystore
|
|
40
43
|
*/
|
|
41
|
-
signTypedDataWithAddress(address: EthAddress, typedData: TypedDataDefinition): Promise<Signature>;
|
|
44
|
+
signTypedDataWithAddress(address: EthAddress, typedData: TypedDataDefinition, _context: SigningContext): Promise<Signature>;
|
|
42
45
|
/**
|
|
43
46
|
* Sign a message using eth_sign with all keystore private keys
|
|
44
47
|
*
|
|
45
48
|
* @param message - The message to sign
|
|
49
|
+
* @param _context - Signing context (ignored by LocalKeyStore, used for HA protection)
|
|
46
50
|
* @return signatures
|
|
47
51
|
*/
|
|
48
|
-
signMessage(message: Buffer32): Promise<Signature[]>;
|
|
52
|
+
signMessage(message: Buffer32, _context: SigningContext): Promise<Signature[]>;
|
|
49
53
|
/**
|
|
50
54
|
* Sign a message using eth_sign with a specific address's private key
|
|
51
55
|
* @param address - The address of the signer to use
|
|
52
56
|
* @param message - The message to sign
|
|
57
|
+
* @param _context - Signing context (ignored by LocalKeyStore, used for HA protection)
|
|
53
58
|
* @returns signature for the specified address
|
|
54
59
|
* @throws Error if the address is not found in the keystore
|
|
55
60
|
*/
|
|
56
|
-
signMessageWithAddress(address: EthAddress, message: Buffer32): Promise<Signature>;
|
|
61
|
+
signMessageWithAddress(address: EthAddress, message: Buffer32, _context: SigningContext): Promise<Signature>;
|
|
57
62
|
}
|
|
58
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
63
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxfa2V5X3N0b3JlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMva2V5X3N0b3JlL2xvY2FsX2tleV9zdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFFcEQsT0FBTyxLQUFLLEVBQUUs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LENBQUMsQ0FFcEY7SUFFRDs7Ozs7OztPQU9HO0lBQ0ksc0JBQXNCLENBQUMsT0FBTyxFQUFFLFVBQVUsRUFBRSxPQUFPLEVBQUUsUUFBUSxFQUFFLFFBQVEsRUFBRSxjQUFjLEdBQUcsT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQU1sSDtDQUNGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local_key_store.d.ts","sourceRoot":"","sources":["../../src/key_store/local_key_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"local_key_store.d.ts","sourceRoot":"","sources":["../../src/key_store/local_key_store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,KAAK,mBAAmB,EAAiB,MAAM,MAAM,CAAC;AAE/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD;;;;GAIG;AACH,qBAAa,aAAc,YAAW,iBAAiB;IACrD,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,gBAAgB,CAAsC;IAE9D,YAAY,WAAW,EAAE,QAAQ,EAAE,EAGlC;IAED;;;;;OAKG;IACI,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAK3C;IAED;;;;OAIG;IACI,YAAY,IAAI,UAAU,EAAE,CAElC;IAED;;;;;OAKG;IACI,aAAa,CAAC,SAAS,EAAE,mBAAmB,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAGnG;IAED;;;;;;;OAOG;IACI,wBAAwB,CAC7B,OAAO,EAAE,UAAU,EACnB,SAAS,EAAE,mBAAmB,EAC9B,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,CAOpB;IAED;;;;;;OAMG;IACI,WAAW,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAEpF;IAED;;;;;;;OAOG;IACI,sBAAsB,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC,CAMlH;CACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
2
|
-
import { Secp256k1Signer } from '@aztec/foundation/crypto';
|
|
2
|
+
import { Secp256k1Signer } from '@aztec/foundation/crypto/secp256k1-signer';
|
|
3
3
|
import { hashTypedData } from 'viem';
|
|
4
4
|
/**
|
|
5
5
|
* Local Key Store
|
|
@@ -36,8 +36,9 @@ import { hashTypedData } from 'viem';
|
|
|
36
36
|
/**
|
|
37
37
|
* Sign a message with all keystore private keys
|
|
38
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)
|
|
39
40
|
* @return signature
|
|
40
|
-
*/ signTypedData(typedData) {
|
|
41
|
+
*/ signTypedData(typedData, _context) {
|
|
41
42
|
const digest = hashTypedData(typedData);
|
|
42
43
|
return Promise.all(this.signers.map((signer)=>signer.sign(Buffer32.fromString(digest))));
|
|
43
44
|
}
|
|
@@ -45,9 +46,10 @@ import { hashTypedData } from 'viem';
|
|
|
45
46
|
* Sign a message with a specific address's private key
|
|
46
47
|
* @param address - The address of the signer to use
|
|
47
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)
|
|
48
50
|
* @returns signature for the specified address
|
|
49
51
|
* @throws Error if the address is not found in the keystore
|
|
50
|
-
*/ signTypedDataWithAddress(address, typedData) {
|
|
52
|
+
*/ signTypedDataWithAddress(address, typedData, _context) {
|
|
51
53
|
const signer = this.signersByAddress.get(address.toString());
|
|
52
54
|
if (!signer) {
|
|
53
55
|
throw new Error(`No signer found for address ${address.toString()}`);
|
|
@@ -59,17 +61,19 @@ import { hashTypedData } from 'viem';
|
|
|
59
61
|
* Sign a message using eth_sign with all keystore private keys
|
|
60
62
|
*
|
|
61
63
|
* @param message - The message to sign
|
|
64
|
+
* @param _context - Signing context (ignored by LocalKeyStore, used for HA protection)
|
|
62
65
|
* @return signatures
|
|
63
|
-
*/ signMessage(message) {
|
|
66
|
+
*/ signMessage(message, _context) {
|
|
64
67
|
return Promise.all(this.signers.map((signer)=>signer.signMessage(message)));
|
|
65
68
|
}
|
|
66
69
|
/**
|
|
67
70
|
* Sign a message using eth_sign with a specific address's private key
|
|
68
71
|
* @param address - The address of the signer to use
|
|
69
72
|
* @param message - The message to sign
|
|
73
|
+
* @param _context - Signing context (ignored by LocalKeyStore, used for HA protection)
|
|
70
74
|
* @returns signature for the specified address
|
|
71
75
|
* @throws Error if the address is not found in the keystore
|
|
72
|
-
*/ signMessageWithAddress(address, message) {
|
|
76
|
+
*/ signMessageWithAddress(address, message, _context) {
|
|
73
77
|
const signer = this.signersByAddress.get(address.toString());
|
|
74
78
|
if (!signer) {
|
|
75
79
|
throw new Error(`No signer found for address ${address.toString()}`);
|
|
@@ -4,6 +4,7 @@ import type { Signature } from '@aztec/foundation/eth-signature';
|
|
|
4
4
|
import { KeystoreManager } from '@aztec/node-keystore';
|
|
5
5
|
import type { EthRemoteSignerConfig } from '@aztec/node-keystore';
|
|
6
6
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
|
+
import type { SigningContext } from '@aztec/validator-ha-signer/types';
|
|
7
8
|
import type { TypedDataDefinition } from 'viem';
|
|
8
9
|
import type { ExtendedValidatorKeyStore } from './interface.js';
|
|
9
10
|
export declare class NodeKeystoreAdapter implements ExtendedValidatorKeyStore {
|
|
@@ -76,33 +77,37 @@ export declare class NodeKeystoreAdapter implements ExtendedValidatorKeyStore {
|
|
|
76
77
|
/**
|
|
77
78
|
* Sign typed data with all attester signers across validators.
|
|
78
79
|
* @param typedData EIP-712 typed data
|
|
80
|
+
* @param _context Signing context (ignored by NodeKeystoreAdapter, used for HA protection)
|
|
79
81
|
* @returns Array of signatures in validator order, flattened
|
|
80
82
|
*/
|
|
81
|
-
signTypedData(typedData: TypedDataDefinition): Promise<Signature[]>;
|
|
83
|
+
signTypedData(typedData: TypedDataDefinition, _context: SigningContext): Promise<Signature[]>;
|
|
82
84
|
/**
|
|
83
85
|
* Sign a message with all attester signers across validators.
|
|
84
86
|
* @param message 32-byte message (already hashed/padded as needed)
|
|
87
|
+
* @param _context Signing context (ignored by NodeKeystoreAdapter, used for HA protection)
|
|
85
88
|
* @returns Array of signatures in validator order, flattened
|
|
86
89
|
*/
|
|
87
|
-
signMessage(message: Buffer32): Promise<Signature[]>;
|
|
90
|
+
signMessage(message: Buffer32, _context: SigningContext): Promise<Signature[]>;
|
|
88
91
|
/**
|
|
89
92
|
* Sign typed data with a signer identified by address (any role).
|
|
90
93
|
* Hydrates caches on-demand when the address is first seen.
|
|
91
94
|
* @param address Address to sign with
|
|
92
95
|
* @param typedData EIP-712 typed data
|
|
96
|
+
* @param _context Signing context (ignored by NodeKeystoreAdapter, used for HA protection)
|
|
93
97
|
* @returns Signature from the signer matching the address
|
|
94
98
|
* @throws Error when no signer exists for the address
|
|
95
99
|
*/
|
|
96
|
-
signTypedDataWithAddress(address: EthAddress, typedData: TypedDataDefinition): Promise<Signature>;
|
|
100
|
+
signTypedDataWithAddress(address: EthAddress, typedData: TypedDataDefinition, _context: SigningContext): Promise<Signature>;
|
|
97
101
|
/**
|
|
98
102
|
* Sign a message with a signer identified by address (any role).
|
|
99
103
|
* Hydrates caches on-demand when the address is first seen.
|
|
100
104
|
* @param address Address to sign with
|
|
101
105
|
* @param message 32-byte message
|
|
106
|
+
* @param _context Signing context (ignored by NodeKeystoreAdapter, used for HA protection)
|
|
102
107
|
* @returns Signature from the signer matching the address
|
|
103
108
|
* @throws Error when no signer exists for the address
|
|
104
109
|
*/
|
|
105
|
-
signMessageWithAddress(address: EthAddress, message: Buffer32): Promise<Signature>;
|
|
110
|
+
signMessageWithAddress(address: EthAddress, message: Buffer32, _context: SigningContext): Promise<Signature>;
|
|
106
111
|
/**
|
|
107
112
|
* Get all attester addresses across validators (alias of getAddresses).
|
|
108
113
|
*/
|
|
@@ -134,5 +139,13 @@ export declare class NodeKeystoreAdapter implements ExtendedValidatorKeyStore {
|
|
|
134
139
|
* @returns Effective remote signer configuration or undefined
|
|
135
140
|
*/
|
|
136
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>;
|
|
137
150
|
}
|
|
138
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
151
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZV9rZXlzdG9yZV9hZGFwdGVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMva2V5X3N0b3JlL25vZGVfa2V5c3RvcmVfYWRhcHRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFDQSxPQUFPLEtBQUssRUFBRSxRQUFRLEVBQUUsTUFBTSwwQkFBMEIsQ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