@gearbox-protocol/sdk 11.7.1 → 11.8.0

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.
@@ -58,9 +58,10 @@ class RevolverTransport {
58
58
  shouldRetry: config.shouldRetry ?? defaultShouldRetry
59
59
  };
60
60
  const transports = config.providers.map(
61
- ({ url, name, cooldown }) => ({
61
+ ({ url, name, cooldown, httpClientOptions }) => ({
62
62
  name,
63
63
  transport: (0, import_viem.http)(url, {
64
+ ...httpClientOptions,
64
65
  retryCount: config.retryCount,
65
66
  retryDelay: config.retryDelay,
66
67
  timeout: config.timeout,
@@ -45,7 +45,11 @@ function createClient(opts, network) {
45
45
  transport = opts.transport;
46
46
  } else {
47
47
  const rpcs = opts.rpcURLs.map(
48
- (url) => (0, import_viem.http)(url, { timeout: opts.timeout, retryCount: opts.retryCount })
48
+ (url) => (0, import_viem.http)(url, {
49
+ ...opts.httpClientOptions,
50
+ timeout: opts.timeout,
51
+ retryCount: opts.retryCount
52
+ })
49
53
  );
50
54
  transport = rpcs.length > 1 ? (0, import_viem.fallback)(rpcs) : rpcs[0];
51
55
  }
@@ -347,7 +347,9 @@ const chains = {
347
347
  },
348
348
  blockTime: 200,
349
349
  network: "Somnia",
350
- defaultMarketConfigurators: {},
350
+ defaultMarketConfigurators: {
351
+ "0x1ca8b92aa7233a9f8f7ba031ac45c878141adff0": "Invariant Group"
352
+ },
351
353
  isPublic: false,
352
354
  wellKnownToken: {
353
355
  address: "0x67B302E35Aef5EEE8c32D934F5856869EF428330",
@@ -45,9 +45,10 @@ class RevolverTransport {
45
45
  shouldRetry: config.shouldRetry ?? defaultShouldRetry
46
46
  };
47
47
  const transports = config.providers.map(
48
- ({ url, name, cooldown }) => ({
48
+ ({ url, name, cooldown, httpClientOptions }) => ({
49
49
  name,
50
50
  transport: http(url, {
51
+ ...httpClientOptions,
51
52
  retryCount: config.retryCount,
52
53
  retryDelay: config.retryDelay,
53
54
  timeout: config.timeout,
@@ -44,7 +44,11 @@ function createClient(opts, network) {
44
44
  transport = opts.transport;
45
45
  } else {
46
46
  const rpcs = opts.rpcURLs.map(
47
- (url) => http(url, { timeout: opts.timeout, retryCount: opts.retryCount })
47
+ (url) => http(url, {
48
+ ...opts.httpClientOptions,
49
+ timeout: opts.timeout,
50
+ retryCount: opts.retryCount
51
+ })
48
52
  );
49
53
  transport = rpcs.length > 1 ? fallback(rpcs) : rpcs[0];
50
54
  }
@@ -332,7 +332,9 @@ const chains = {
332
332
  },
333
333
  blockTime: 200,
334
334
  network: "Somnia",
335
- defaultMarketConfigurators: {},
335
+ defaultMarketConfigurators: {
336
+ "0x1ca8b92aa7233a9f8f7ba031ac45c878141adff0": "Invariant Group"
337
+ },
336
338
  isPublic: false,
337
339
  wellKnownToken: {
338
340
  address: "0x67B302E35Aef5EEE8c32D934F5856869EF428330",
@@ -5,6 +5,7 @@ export interface ProviderConfig {
5
5
  name: string;
6
6
  url: string;
7
7
  cooldown?: number;
8
+ httpClientOptions?: HttpRpcClientOptions | undefined;
8
9
  }
9
10
  export interface ProviderStatus {
10
11
  id: string;
@@ -1,5 +1,6 @@
1
1
  import type { Address, Hex } from "viem";
2
2
  import { type PublicClient, type Transport } from "viem";
3
+ import type { HttpRpcClientOptions } from "viem/utils";
3
4
  import type { BaseContract, BaseState, IBaseContract } from "./base/index.js";
4
5
  import { AddressLabeller, TokensMeta } from "./base/index.js";
5
6
  import type { GearboxChain, NetworkType } from "./chain/chains.js";
@@ -40,6 +41,7 @@ export type ClientOptions = {
40
41
  * Retry count for RPC
41
42
  */
42
43
  retryCount?: number;
44
+ httpClientOptions?: HttpRpcClientOptions | undefined;
43
45
  } | {
44
46
  /**
45
47
  * Alternatively, can pass viem transport
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "11.7.1",
3
+ "version": "11.8.0",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",