@openzeppelin/defender-sdk-base-client
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -92,2 +92,6 @@ "use strict"; | ||
} | ||
// by default no retries on 500 errors except for Cloudflare errors | ||
if (isInternalServerError(error) && !isCloudFlareError(error)) { | ||
throw error; | ||
} | ||
// this means ID token has expired so we'll recreate session and try again | ||
@@ -128,2 +132,3 @@ if (isAuthenticationError(error)) { | ||
const isCloudFlareError = (axiosError) => axiosError.response?.status === 520 && (axiosError.response?.data).includes('Cloudflare'); | ||
const isInternalServerError = (axiosError) => axiosError.response?.status ? axiosError.response.status >= 500 : false; | ||
const exponentialDelay = (retryNumber = 0, _error = undefined, delayFactor = 100) => { | ||
@@ -130,0 +135,0 @@ const delay = 2 ** retryNumber * delayFactor; |
export type Network = SupportedNetwork | TenantNetwork; | ||
export type SupportedNetwork = PublicNetwork | CustomNetwork; | ||
export type PublicNetwork = 'alfajores' | 'amoy' | 'arbitrum-nova' | 'arbitrum-sepolia' | 'arbitrum' | 'aurora' | 'auroratest' | 'avalanche' | 'base-sepolia' | 'base' | 'bsc' | 'bsctest' | 'celo' | 'fantom' | 'fantomtest' | 'fuji' | 'fuse' | 'geist-mainnet' | 'geist-polter' | 'hedera' | 'hederatest' | 'holesky' | 'japan-testnet' | 'japan' | 'linea-goerli' | 'linea-sepolia' | 'linea' | 'mainnet' | 'mantle-sepolia' | 'mantle' | 'matic-zkevm-testnet' | 'matic-zkevm' | 'matic' | 'meld-kanazawa' | 'meld' | 'moonbase' | 'moonbeam' | 'moonriver' | 'mumbai' | 'optimism-sepolia' | 'optimism' | 'scroll-sepolia' | 'scroll' | 'sepolia' | 'sokol' | 'unichain-sepolia' | 'xdai' | 'zksync-sepolia' | 'zksync'; | ||
export type PublicNetwork = 'alfajores' | 'amoy' | 'arbitrum-nova' | 'arbitrum-sepolia' | 'arbitrum' | 'aurora' | 'auroratest' | 'avalanche' | 'base-sepolia' | 'base' | 'bsc' | 'bsctest' | 'celo' | 'fantom' | 'fantomtest' | 'fuji' | 'fuse' | 'geist-mainnet' | 'geist-polter' | 'hedera' | 'hederatest' | 'holesky' | 'japan-testnet' | 'japan' | 'linea-goerli' | 'linea-sepolia' | 'linea' | 'mainnet' | 'mantle-sepolia' | 'mantle' | 'matic-zkevm-testnet' | 'matic-zkevm' | 'matic' | 'meld-kanazawa' | 'meld' | 'moonbase' | 'moonbeam' | 'moonriver' | 'mumbai' | 'optimism-sepolia' | 'optimism' | 'peaq-mainnet' | 'peaq-agung' | 'scroll-sepolia' | 'scroll' | 'sepolia' | 'sokol' | 'unichain' | 'unichain-sepolia' | 'xdai' | 'zksync-sepolia' | 'zksync'; | ||
export type CustomNetwork = 'x-dfk-avax-chain' | 'x-dfk-avax-chain-test' | 'x-security-alliance'; | ||
@@ -5,0 +5,0 @@ export type TenantNetwork = string; |
@@ -47,2 +47,4 @@ "use strict"; | ||
'optimism', | ||
'peaq-mainnet', | ||
'peaq-agung', | ||
'scroll-sepolia', | ||
@@ -52,2 +54,3 @@ 'scroll', | ||
'sokol', | ||
'unichain', | ||
'unichain-sepolia', | ||
@@ -114,2 +117,4 @@ 'x-dfk-avax-chain-test', | ||
'optimism': 10, | ||
'peaq-mainnet': 3338, | ||
'peaq-agung': 9990, | ||
'optimism-sepolia': 11155420, | ||
@@ -120,2 +125,3 @@ 'scroll': 534352, | ||
'sokol': 77, | ||
'unichain': 130, | ||
'unichain-sepolia': 1301, | ||
@@ -122,0 +128,0 @@ 'x-dfk-avax-chain': 53935, |
{ | ||
"name": "@openzeppelin/defender-sdk-base-client", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
76283
762