Skip to main content

RpcProviderWithRetries

Defined in: atomiq-chain-starknet/src/starknet/provider/RpcProviderWithRetries.ts:73

An RPC provider with built-in retry functionality, retries calls to the RPC service on failure

Extends

  • unknown

Constructors

Constructor

new RpcProviderWithRetries(options?, retryPolicy?): RpcProviderWithRetries;

Defined in: atomiq-chain-starknet/src/starknet/provider/RpcProviderWithRetries.ts:83

Creates a new RPC provider which retries RPC calls on failure, controlled by the passed retryPolicy NOTE: Tries to do naive detection of the spec version based on the suffix of nodeUrl, better pass the options.specVersion in the options!

Parameters

ParameterTypeDescription
options?RpcProviderOptions
retryPolicy?{ delay?: number; exponential?: boolean; maxRetries?: number; }
retryPolicy.delay?number-
retryPolicy.exponential?boolean-
retryPolicy.maxRetries?number-

Returns

RpcProviderWithRetries

Overrides

RpcProvider.constructor