From b1d85552e7804deb107035b5e2cd8b9883b8b946 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Mon, 29 Apr 2024 11:17:45 +0200 Subject: [PATCH] build: agent-js v1.2.1 (#593) # Motivation The migration to pure JS BLS verification in agent-js v1.2.0 has a notable impact on bundle size (roughly -15% according [forum post](https://forum.dfinity.org/t/agent-js-1-2-0-is-released/28881/2?u=peterparker)). Therefore it makes sense to promote those changes. # Notes To prevent the issue reported on the [forum](https://forum.dfinity.org/t/timestamp-failed-to-pass-the-watermark-after-retrying-the-configured-3-times/29180/3?u=peterparker) to happen, the number of retry for the agent has been set to 10 similiar has what was done in II (see [PR](https://github.com/dfinity/internet-identity/pull/2446)) # Changes - `npm run update:agent` - set number of retry to 10 and expose a parameter to tweak the value if required --- CHANGELOG.md | 2 + package-lock.json | 128 ++++++++++++------------ packages/ckbtc/package.json | 6 +- packages/cketh/package.json | 6 +- packages/cmc/package.json | 6 +- packages/ic-management/package.json | 6 +- packages/ledger-icp/package.json | 6 +- packages/ledger-icrc/package.json | 6 +- packages/nns/package.json | 6 +- packages/sns/package.json | 6 +- packages/utils/README.md | 9 +- packages/utils/package.json | 6 +- packages/utils/src/utils/agent.utils.ts | 4 + 13 files changed, 102 insertions(+), 95 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6724978f4..f20fc731f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,9 +17,11 @@ - Add support for `withdrawErc20`. - Additional fields related to ERC20 have been added to ckETH `minterInfo`. - Expose the function `ledger_id` for Index canister in the `ledger-icrc` library. +- Set number of retries to 10 (as opposed to default 3) in `createAgent` utility to make the agent more resilient against watermark check failures. ## Build +- Upgrade `agent-js` dependencies to `v1.2.1`. Note that it is advised to set the number of retries of the agent to 10 to prevent the potential issue `Timestamp failed to pass the watermark after retrying the configured 3 times. We cannot guarantee the integrity of the response since it could be a replay attack.` (see thread on the [forum](https://forum.dfinity.org/t/timestamp-failed-to-pass-the-watermark-after-retrying-the-configured-3-times/29180/3?u=peterparker)). - Upgrade `didc` to `0.3.7` that converts candid files into JS and TS. # 2024.03.25-1430Z diff --git a/package-lock.json b/package-lock.json index 037003703..e953ba1d7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -717,12 +717,12 @@ "dev": true }, "node_modules/@dfinity/agent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-1.0.1.tgz", - "integrity": "sha512-QoCiKIWEgsXoaiHpb76M2qLXYDS9IdfvC81dLJYvX9KVXRq8Ojo4S82tBqBFGtM0j0EKEC6mIAJV/bqhOJTtjQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-1.2.1.tgz", + "integrity": "sha512-8M1jEDBXU/eMqPJuBqrzFNwHU/54GQGP8uzUjW1lm8mh5LIWbzuNTrN7X+7WHiHuaYDQ19QfEn/HE7A+lTxqOw==", "peer": true, "dependencies": { - "@noble/curves": "^1.2.0", + "@noble/curves": "^1.4.0", "@noble/hashes": "^1.3.1", "base64-arraybuffer": "^0.2.0", "borc": "^2.1.1", @@ -730,17 +730,17 @@ "simple-cbor": "^0.4.1" }, "peerDependencies": { - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1" + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1" } }, "node_modules/@dfinity/candid": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-1.0.1.tgz", - "integrity": "sha512-PfZNV1fTOWtl+NhLOw71ACLYGugKF9HdEJKtkyBJqbj+6pqshvK6rllCUkGwMsmXfP8YopLzmoNVdy1rp/eOgg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-1.2.1.tgz", + "integrity": "sha512-IG+pzMWTEIbNc+SERuSR9Rmva7dVXinXQGaiC7xJeJOMia6M7shWzeqDkuSHYWx/tzB8VfpND/Gxw1lLAMqmYg==", "peer": true, "peerDependencies": { - "@dfinity/principal": "^1.0.1" + "@dfinity/principal": "^1.2.1" } }, "node_modules/@dfinity/ckbtc": { @@ -776,9 +776,9 @@ "link": true }, "node_modules/@dfinity/principal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-1.0.1.tgz", - "integrity": "sha512-pCAuTLcvZEZ8fYgVzTVhfUfFGadxeWN4v2z8Q0rizeiqcHKhbJVfWUiXXjzPGG5lNz2DxKyUHQ/WS4UTbTaxvg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-1.2.1.tgz", + "integrity": "sha512-sYyS8oMFLXqU/C29fpd56vTLw7YLX9zw4QGz0wQaeb5qBOrx7M3M4cX3Xijqvn765bYrs9fJXA8ePmipgJRGIQ==", "peer": true, "dependencies": { "@noble/hashes": "^1.3.1" @@ -1653,21 +1653,21 @@ } }, "node_modules/@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.0.tgz", + "integrity": "sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==", "peer": true, "dependencies": { - "@noble/hashes": "1.3.3" + "@noble/hashes": "1.4.0" }, "funding": { "url": "https://paulmillr.com/funding/" } }, "node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", "engines": { "node": ">= 16" }, @@ -7498,9 +7498,9 @@ "bech32": "^2.0.0" }, "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" } }, @@ -7509,9 +7509,9 @@ "version": "2.0.1", "license": "Apache-2.0", "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" } }, @@ -7520,9 +7520,9 @@ "version": "3.0.3", "license": "Apache-2.0", "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" } }, @@ -7531,9 +7531,9 @@ "version": "3.1.1", "license": "Apache-2.0", "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" } }, @@ -7542,9 +7542,9 @@ "version": "2.2.2", "license": "Apache-2.0", "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" } }, @@ -7553,9 +7553,9 @@ "version": "2.2.1", "license": "Apache-2.0", "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" } }, @@ -7571,10 +7571,10 @@ "@types/randombytes": "^2.0.0" }, "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", "@dfinity/ledger-icp": "^2.2.2", - "@dfinity/principal": "^1.0.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" } }, @@ -7597,10 +7597,10 @@ "@noble/hashes": "^1.3.2" }, "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", "@dfinity/ledger-icrc": "^2.2.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" } }, @@ -7609,9 +7609,9 @@ "version": "2.1.3", "license": "Apache-2.0", "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1" + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1" } } }, @@ -8125,12 +8125,12 @@ "dev": true }, "@dfinity/agent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-1.0.1.tgz", - "integrity": "sha512-QoCiKIWEgsXoaiHpb76M2qLXYDS9IdfvC81dLJYvX9KVXRq8Ojo4S82tBqBFGtM0j0EKEC6mIAJV/bqhOJTtjQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@dfinity/agent/-/agent-1.2.1.tgz", + "integrity": "sha512-8M1jEDBXU/eMqPJuBqrzFNwHU/54GQGP8uzUjW1lm8mh5LIWbzuNTrN7X+7WHiHuaYDQ19QfEn/HE7A+lTxqOw==", "peer": true, "requires": { - "@noble/curves": "^1.2.0", + "@noble/curves": "^1.4.0", "@noble/hashes": "^1.3.1", "base64-arraybuffer": "^0.2.0", "borc": "^2.1.1", @@ -8139,9 +8139,9 @@ } }, "@dfinity/candid": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-1.0.1.tgz", - "integrity": "sha512-PfZNV1fTOWtl+NhLOw71ACLYGugKF9HdEJKtkyBJqbj+6pqshvK6rllCUkGwMsmXfP8YopLzmoNVdy1rp/eOgg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@dfinity/candid/-/candid-1.2.1.tgz", + "integrity": "sha512-IG+pzMWTEIbNc+SERuSR9Rmva7dVXinXQGaiC7xJeJOMia6M7shWzeqDkuSHYWx/tzB8VfpND/Gxw1lLAMqmYg==", "peer": true, "requires": {} }, @@ -8189,9 +8189,9 @@ } }, "@dfinity/principal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-1.0.1.tgz", - "integrity": "sha512-pCAuTLcvZEZ8fYgVzTVhfUfFGadxeWN4v2z8Q0rizeiqcHKhbJVfWUiXXjzPGG5lNz2DxKyUHQ/WS4UTbTaxvg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@dfinity/principal/-/principal-1.2.1.tgz", + "integrity": "sha512-sYyS8oMFLXqU/C29fpd56vTLw7YLX9zw4QGz0wQaeb5qBOrx7M3M4cX3Xijqvn765bYrs9fJXA8ePmipgJRGIQ==", "peer": true, "requires": { "@noble/hashes": "^1.3.1" @@ -8757,18 +8757,18 @@ } }, "@noble/curves": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.3.0.tgz", - "integrity": "sha512-t01iSXPuN+Eqzb4eBX0S5oubSqXbK/xXa1Ne18Hj8f9pStxztHCE2gfboSp/dZRLSqfuLpRK2nDXDK+W9puocA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.0.tgz", + "integrity": "sha512-p+4cb332SFCrReJkCYe8Xzm0OWi4Jji5jVdIZRL/PmacmDkFNw6MrrV+gGpiPxLHbV+zKFRywUWbaseT+tZRXg==", "peer": true, "requires": { - "@noble/hashes": "1.3.3" + "@noble/hashes": "1.4.0" } }, "@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==" + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==" }, "@nodelib/fs.scandir": { "version": "2.1.5", diff --git a/packages/ckbtc/package.json b/packages/ckbtc/package.json index 84296916b..febab8944 100644 --- a/packages/ckbtc/package.json +++ b/packages/ckbtc/package.json @@ -38,9 +38,9 @@ ], "homepage": "https://github.com/dfinity/ic-js#readme", "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" }, "dependencies": { diff --git a/packages/cketh/package.json b/packages/cketh/package.json index f08f3ff62..1d1309d7e 100644 --- a/packages/cketh/package.json +++ b/packages/cketh/package.json @@ -38,9 +38,9 @@ ], "homepage": "https://github.com/dfinity/ic-js#readme", "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" } } diff --git a/packages/cmc/package.json b/packages/cmc/package.json index 2cbc0c27e..726747df7 100644 --- a/packages/cmc/package.json +++ b/packages/cmc/package.json @@ -36,9 +36,9 @@ ], "homepage": "https://github.com/dfinity/ic-js#readme", "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" } } diff --git a/packages/ic-management/package.json b/packages/ic-management/package.json index 15b87a1c7..d4cb04a30 100644 --- a/packages/ic-management/package.json +++ b/packages/ic-management/package.json @@ -34,9 +34,9 @@ ], "homepage": "https://github.com/dfinity/ic-js#readme", "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" } } diff --git a/packages/ledger-icp/package.json b/packages/ledger-icp/package.json index 95215b5b2..fa78bf2c2 100644 --- a/packages/ledger-icp/package.json +++ b/packages/ledger-icp/package.json @@ -38,9 +38,9 @@ ], "homepage": "https://github.com/dfinity/ic-js#readme", "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" } } diff --git a/packages/ledger-icrc/package.json b/packages/ledger-icrc/package.json index c1a3deac3..36215cbc2 100644 --- a/packages/ledger-icrc/package.json +++ b/packages/ledger-icrc/package.json @@ -37,9 +37,9 @@ ], "homepage": "https://github.com/dfinity/ic-js#readme", "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" } } diff --git a/packages/nns/package.json b/packages/nns/package.json index ccf633757..b3118b643 100644 --- a/packages/nns/package.json +++ b/packages/nns/package.json @@ -51,10 +51,10 @@ "network-nervous-system" ], "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", "@dfinity/ledger-icp": "^2.2.2", - "@dfinity/principal": "^1.0.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" } } diff --git a/packages/sns/package.json b/packages/sns/package.json index 63b3617d3..bddc1e768 100644 --- a/packages/sns/package.json +++ b/packages/sns/package.json @@ -36,10 +36,10 @@ "sns" ], "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", "@dfinity/ledger-icrc": "^2.2.1", - "@dfinity/principal": "^1.0.1", + "@dfinity/principal": "^1.2.1", "@dfinity/utils": "^2.1.3" }, "dependencies": { diff --git a/packages/utils/README.md b/packages/utils/README.md index a3e0d4115..7666fb924 100644 --- a/packages/utils/README.md +++ b/packages/utils/README.md @@ -90,9 +90,9 @@ Get a default agent that connects to mainnet with the anonymous identity. Create an agent for a given identity -| Function | Type | -| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `createAgent` | `({ identity, host, fetchRootKey, verifyQuerySignatures, }: { identity: Identity; host?: string or undefined; fetchRootKey?: boolean or undefined; verifyQuerySignatures?: boolean or undefined; }) => Promise` | +| Function | Type | +| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `createAgent` | `({ identity, host, fetchRootKey, verifyQuerySignatures, retryTimes, }: { identity: Identity; host?: string or undefined; fetchRootKey?: boolean or undefined; verifyQuerySignatures?: boolean or undefined; retryTimes?: number or undefined; }) => Promise<...>` | Parameters: @@ -100,8 +100,9 @@ Parameters: - `host`: An optional host to connect to - `fetchRootKey`: Fetch root key for certificate validation during local development or on testnet - `verifyQuerySignatures`: Check for signatures in the state tree signed by the node that replies to queries - i.e. certify responses. +- `retryTimes`: Set the number of retries the agent should perform before errorring. By default, 10 is applied (as opposed to default 3 in agent-js) to make the agent more resilient against watermark check failures. -[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/utils/src/utils/agent.utils.ts#L21) +[:link: Source](https://github.com/dfinity/ic-js/tree/main/packages/utils/src/utils/agent.utils.ts#L22) #### :gear: createServices diff --git a/packages/utils/package.json b/packages/utils/package.json index 0bf9a773c..aaa73c9d0 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -47,8 +47,8 @@ "service-nervous-system" ], "peerDependencies": { - "@dfinity/agent": "^1.0.1", - "@dfinity/candid": "^1.0.1", - "@dfinity/principal": "^1.0.1" + "@dfinity/agent": "^1.2.1", + "@dfinity/candid": "^1.2.1", + "@dfinity/principal": "^1.2.1" } } diff --git a/packages/utils/src/utils/agent.utils.ts b/packages/utils/src/utils/agent.utils.ts index 2b20ab876..c435a7125 100644 --- a/packages/utils/src/utils/agent.utils.ts +++ b/packages/utils/src/utils/agent.utils.ts @@ -17,23 +17,27 @@ export const defaultAgent = (): Agent => * @param host An optional host to connect to * @param fetchRootKey Fetch root key for certificate validation during local development or on testnet * @param verifyQuerySignatures Check for signatures in the state tree signed by the node that replies to queries - i.e. certify responses. + * @param retryTimes Set the number of retries the agent should perform before errorring. By default, 10 is applied (as opposed to default 3 in agent-js) to make the agent more resilient against watermark check failures. */ export const createAgent = async ({ identity, host, fetchRootKey = false, verifyQuerySignatures = false, + retryTimes = 10, }: { identity: Identity; host?: string; fetchRootKey?: boolean; // @deprecated Shipped as an opt-in feature but, will become the default in next major version verifyQuerySignatures?: boolean; + retryTimes?: number; }): Promise => { const agent: HttpAgent = new HttpAgent({ identity, ...(host !== undefined && { host }), verifyQuerySignatures, + retryTimes, }); if (fetchRootKey) {