@aztec/node-keystore 0.0.1-commit.fcb71a6 → 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/dest/keystore_manager.d.ts +2 -2
- package/dest/keystore_manager.d.ts.map +1 -1
- package/dest/keystore_manager.js +10 -7
- package/dest/schemas.d.ts +292 -292
- package/package.json +5 -5
- package/src/keystore_manager.ts +14 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/node-keystore",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.ff7989d6c",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/index.js",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
]
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
68
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
69
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
67
|
+
"@aztec/ethereum": "0.0.1-commit.ff7989d6c",
|
|
68
|
+
"@aztec/foundation": "0.0.1-commit.ff7989d6c",
|
|
69
|
+
"@aztec/stdlib": "0.0.1-commit.ff7989d6c",
|
|
70
70
|
"@ethersproject/wallet": "^5.7.0",
|
|
71
71
|
"tslib": "^2.4.0",
|
|
72
72
|
"viem": "npm:@aztec/viem@2.38.2",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@jest/globals": "^30.0.0",
|
|
77
77
|
"@types/jest": "^30.0.0",
|
|
78
78
|
"@types/node": "^22.15.17",
|
|
79
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
79
|
+
"@typescript/native-preview": "7.0.0-dev.20260113.1",
|
|
80
80
|
"jest": "^30.0.0",
|
|
81
81
|
"ts-node": "^10.9.1",
|
|
82
82
|
"typescript": "^5.3.3"
|
package/src/keystore_manager.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type { EthSigner } from '@aztec/ethereum/eth-signer';
|
|
|
7
7
|
import { Buffer32 } from '@aztec/foundation/buffer';
|
|
8
8
|
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
9
9
|
import type { Signature } from '@aztec/foundation/eth-signature';
|
|
10
|
+
import { makeBackoff, retry } from '@aztec/foundation/retry';
|
|
10
11
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
11
12
|
|
|
12
13
|
import { Wallet } from '@ethersproject/wallet';
|
|
@@ -61,7 +62,7 @@ export class KeystoreManager {
|
|
|
61
62
|
|
|
62
63
|
/**
|
|
63
64
|
* Validates all remote signers in the keystore are accessible and have the required addresses.
|
|
64
|
-
*
|
|
65
|
+
* Retries each web3signer URL with backoff to tolerate transient unavailability at boot time.
|
|
65
66
|
*/
|
|
66
67
|
async validateSigners(): Promise<void> {
|
|
67
68
|
// Collect all remote signers with their addresses grouped by URL
|
|
@@ -127,12 +128,18 @@ export class KeystoreManager {
|
|
|
127
128
|
collectRemoteSigners(this.keystore.prover.publisher, this.keystore.remoteSigner);
|
|
128
129
|
}
|
|
129
130
|
|
|
130
|
-
// Validate each remote signer URL with all its addresses
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
// Validate each remote signer URL with all its addresses, retrying on transient failures
|
|
132
|
+
await Promise.all(
|
|
133
|
+
Array.from(remoteSignersByUrl.entries())
|
|
134
|
+
.filter(([, addresses]) => addresses.size > 0)
|
|
135
|
+
.map(([url, addresses]) =>
|
|
136
|
+
retry(
|
|
137
|
+
() => RemoteSigner.validateAccess(url, Array.from(addresses)),
|
|
138
|
+
`Validating web3signer at ${url}`,
|
|
139
|
+
makeBackoff([1, 2, 4, 8, 16]),
|
|
140
|
+
),
|
|
141
|
+
),
|
|
142
|
+
);
|
|
136
143
|
}
|
|
137
144
|
|
|
138
145
|
/**
|