@solana/web3.js 1.16.2 → 1.17.1

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/lib/index.iife.js CHANGED
@@ -18173,7 +18173,7 @@ var solanaWeb3 = (function (exports) {
18173
18173
  logs: nullable(array(string()))
18174
18174
  }));
18175
18175
 
18176
- function createRpcClient(url, useHttps, httpHeaders, fetchMiddleware) {
18176
+ function createRpcClient(url, useHttps, httpHeaders, fetchMiddleware, disableRetryOnRateLimit) {
18177
18177
 
18178
18178
  let fetchWithMiddleware;
18179
18179
 
@@ -18220,6 +18220,10 @@ var solanaWeb3 = (function (exports) {
18220
18220
  break;
18221
18221
  }
18222
18222
 
18223
+ if (disableRetryOnRateLimit === true) {
18224
+ break;
18225
+ }
18226
+
18223
18227
  too_many_requests_retries -= 1;
18224
18228
 
18225
18229
  if (too_many_requests_retries === 0) {
@@ -18952,6 +18956,7 @@ var solanaWeb3 = (function (exports) {
18952
18956
  let wsEndpoint;
18953
18957
  let httpHeaders;
18954
18958
  let fetchMiddleware;
18959
+ let disableRetryOnRateLimit;
18955
18960
 
18956
18961
  if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {
18957
18962
  this._commitment = commitmentOrConfig;
@@ -18960,11 +18965,12 @@ var solanaWeb3 = (function (exports) {
18960
18965
  wsEndpoint = commitmentOrConfig.wsEndpoint;
18961
18966
  httpHeaders = commitmentOrConfig.httpHeaders;
18962
18967
  fetchMiddleware = commitmentOrConfig.fetchMiddleware;
18968
+ disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;
18963
18969
  }
18964
18970
 
18965
18971
  this._rpcEndpoint = endpoint;
18966
18972
  this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);
18967
- this._rpcClient = createRpcClient(url.href, useHttps, httpHeaders, fetchMiddleware);
18973
+ this._rpcClient = createRpcClient(url.href, useHttps, httpHeaders, fetchMiddleware, disableRetryOnRateLimit);
18968
18974
  this._rpcRequest = createRpcRequest(this._rpcClient);
18969
18975
  this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);
18970
18976
  this._rpcWebSocket = new Client_1(this._rpcWsEndpoint, {