@gearbox-protocol/sdk 8.28.1 → 8.28.3

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.
@@ -18,7 +18,7 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var EthCallSpy_exports = {};
20
20
  __export(EthCallSpy_exports, {
21
- default: () => EthCallSpy
21
+ EthCallSpy: () => EthCallSpy
22
22
  });
23
23
  module.exports = __toCommonJS(EthCallSpy_exports);
24
24
  class EthCallSpy {
@@ -79,3 +79,7 @@ class EthCallSpy {
79
79
  this.#detectedCalls.push({ request: data });
80
80
  }
81
81
  }
82
+ // Annotate the CommonJS export names for ESM import in node:
83
+ 0 && (module.exports = {
84
+ EthCallSpy
85
+ });
@@ -57,5 +57,5 @@ class EthCallSpy {
57
57
  }
58
58
  }
59
59
  export {
60
- EthCallSpy as default
60
+ EthCallSpy
61
61
  };
@@ -1,18 +1,19 @@
1
- import type { HttpTransportConfig, PublicRpcSchema } from "viem";
1
+ import type { EIP1193Parameters, HttpTransportConfig, PublicRpcSchema } from "viem";
2
2
  import type { ILogger } from "../sdk/index.js";
3
3
  export type EthCallMethod = Extract<PublicRpcSchema[number], {
4
4
  Method: "eth_call";
5
5
  }>;
6
+ export type EthCallRequest = EIP1193Parameters<[EthCallMethod]>;
6
7
  export interface DetectedCall {
7
- request: EthCallMethod;
8
+ request: EthCallRequest;
8
9
  response?: EthCallMethod["ReturnType"];
9
10
  responseHeaders?: Record<string, string>;
10
11
  }
11
- export type CheckMulticallFn = (data: EthCallMethod) => boolean;
12
+ export type CheckMulticallFn = (data: EthCallRequest) => boolean;
12
13
  /**
13
14
  * Helper to spy on eth_call requests and responses in viem transport
14
15
  */
15
- export default class EthCallSpy {
16
+ export declare class EthCallSpy {
16
17
  #private;
17
18
  enabled: boolean;
18
19
  constructor(check: CheckMulticallFn, logger?: ILogger, enabled?: boolean);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "8.28.1",
3
+ "version": "8.28.3",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",