@gearbox-protocol/sdk 9.15.3 → 9.16.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.
@@ -1,4 +1,4 @@
1
- import type { PublicClient, Transport } from "viem";
1
+ import type { Chain, PublicClient, Transport } from "viem";
2
2
  import type { IAddressLabeller } from "../base/IAddressLabeller.js";
3
3
  import type { GearboxChain, NetworkType } from "./chains.js";
4
4
  export interface NetworkOptions {
@@ -18,9 +18,14 @@ export type TransportOptions = {
18
18
  rpcURLs: string[];
19
19
  } | {
20
20
  /**
21
- * Alternatively, can pass entire viem transport
21
+ * Alternatively, can pass viem transport
22
22
  */
23
23
  transport: Transport;
24
+ } | {
25
+ /**
26
+ * Alternatively, can pass entire viem client
27
+ */
28
+ client: PublicClient;
24
29
  };
25
30
  export interface ConnectionOptions {
26
31
  /**
@@ -32,7 +37,7 @@ export interface ConnectionOptions {
32
37
  */
33
38
  retryCount?: number;
34
39
  }
35
- export declare function createTransport(opts: TransportOptions & ConnectionOptions): Transport;
40
+ export declare function createTransportClient(opts: TransportOptions & ConnectionOptions, chain?: Chain): [Transport, PublicClient];
36
41
  export declare class Provider {
37
42
  #private;
38
43
  readonly chainId: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "9.15.3",
3
+ "version": "9.16.0",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",