@gearbox-protocol/sdk 12.3.11 → 12.3.13

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.
@@ -27,7 +27,6 @@ __export(RevolverTransport_exports, {
27
27
  module.exports = __toCommonJS(RevolverTransport_exports);
28
28
  var import_viem = require("viem");
29
29
  var import_v4 = require("zod/v4");
30
- var import_sdk = require("../sdk/index.js");
31
30
  var import_transports = require("./transports.js");
32
31
  const providerConfigSchema = import_v4.z.object({
33
32
  /**
@@ -49,7 +48,6 @@ const providerConfigSchema = import_v4.z.object({
49
48
  });
50
49
  const SelectionStrategy = import_v4.z.enum(["simple", "ordered"]);
51
50
  const revolverTransportConfigSchema = import_v4.z.object({
52
- network: import_sdk.NetworkType,
53
51
  /**
54
52
  * Providers to use
55
53
  */
@@ -24,9 +24,11 @@ __export(providers_exports, {
24
24
  getDrpcUrl: () => getDrpcUrl,
25
25
  getErpcKey: () => getErpcKey,
26
26
  getRpcProviderUrl: () => getRpcProviderUrl,
27
- getThirdWebUrl: () => getThirdWebUrl
27
+ getThirdWebUrl: () => getThirdWebUrl,
28
+ rpcProvidersSchema: () => rpcProvidersSchema
28
29
  });
29
30
  module.exports = __toCommonJS(providers_exports);
31
+ var import_v4 = require("zod/v4");
30
32
  var import_sdk = require("../sdk/index.js");
31
33
  const SUPPORTED_RPC_PROVIDERS = [
32
34
  "alchemy",
@@ -34,6 +36,7 @@ const SUPPORTED_RPC_PROVIDERS = [
34
36
  "thirdweb",
35
37
  "ankr"
36
38
  ];
39
+ const rpcProvidersSchema = import_v4.z.enum(SUPPORTED_RPC_PROVIDERS);
37
40
  function getRpcProviderUrl(provider, network, apiKey, protocol = "http") {
38
41
  switch (provider) {
39
42
  case "alchemy":
@@ -158,5 +161,6 @@ function getErpcKey(network, projectId, urlBase) {
158
161
  getDrpcUrl,
159
162
  getErpcKey,
160
163
  getRpcProviderUrl,
161
- getThirdWebUrl
164
+ getThirdWebUrl,
165
+ rpcProvidersSchema
162
166
  });
@@ -11,7 +11,6 @@ import {
11
11
  withRetry
12
12
  } from "viem";
13
13
  import { z } from "zod/v4";
14
- import { NetworkType } from "../sdk/index.js";
15
14
  import { httpTransportOptionsSchema } from "./transports.js";
16
15
  const providerConfigSchema = z.object({
17
16
  /**
@@ -33,7 +32,6 @@ const providerConfigSchema = z.object({
33
32
  });
34
33
  const SelectionStrategy = z.enum(["simple", "ordered"]);
35
34
  const revolverTransportConfigSchema = z.object({
36
- network: NetworkType,
37
35
  /**
38
36
  * Providers to use
39
37
  */
@@ -1,3 +1,4 @@
1
+ import { z } from "zod/v4";
1
2
  import { chains, getChain } from "../sdk/index.js";
2
3
  const SUPPORTED_RPC_PROVIDERS = [
3
4
  "alchemy",
@@ -5,6 +6,7 @@ const SUPPORTED_RPC_PROVIDERS = [
5
6
  "thirdweb",
6
7
  "ankr"
7
8
  ];
9
+ const rpcProvidersSchema = z.enum(SUPPORTED_RPC_PROVIDERS);
8
10
  function getRpcProviderUrl(provider, network, apiKey, protocol = "http") {
9
11
  switch (provider) {
10
12
  case "alchemy":
@@ -128,5 +130,6 @@ export {
128
130
  getDrpcUrl,
129
131
  getErpcKey,
130
132
  getRpcProviderUrl,
131
- getThirdWebUrl
133
+ getThirdWebUrl,
134
+ rpcProvidersSchema
132
135
  };
@@ -40,24 +40,6 @@ export declare const SelectionStrategy: z.ZodEnum<{
40
40
  */
41
41
  export type SelectionStrategy = z.infer<typeof SelectionStrategy>;
42
42
  export declare const revolverTransportConfigSchema: z.ZodObject<{
43
- network: z.ZodEnum<{
44
- Mainnet: "Mainnet";
45
- Arbitrum: "Arbitrum";
46
- Optimism: "Optimism";
47
- Base: "Base";
48
- Sonic: "Sonic";
49
- MegaETH: "MegaETH";
50
- Monad: "Monad";
51
- Berachain: "Berachain";
52
- Avalanche: "Avalanche";
53
- BNB: "BNB";
54
- WorldChain: "WorldChain";
55
- Etherlink: "Etherlink";
56
- Hemi: "Hemi";
57
- Lisk: "Lisk";
58
- Plasma: "Plasma";
59
- Somnia: "Somnia";
60
- }>;
61
43
  providers: z.ZodArray<z.ZodObject<{
62
44
  name: z.ZodString;
63
45
  url: z.ZodURL;
@@ -1,6 +1,13 @@
1
+ import { z } from "zod/v4";
1
2
  import { type NetworkType } from "../sdk/index.js";
2
3
  export declare const SUPPORTED_RPC_PROVIDERS: readonly ["alchemy", "drpc", "thirdweb", "ankr"];
3
- export type RpcProvider = (typeof SUPPORTED_RPC_PROVIDERS)[number];
4
+ export declare const rpcProvidersSchema: z.ZodEnum<{
5
+ alchemy: "alchemy";
6
+ drpc: "drpc";
7
+ thirdweb: "thirdweb";
8
+ ankr: "ankr";
9
+ }>;
10
+ export type RpcProvider = z.infer<typeof rpcProvidersSchema>;
4
11
  export declare function getRpcProviderUrl(provider: RpcProvider, network: NetworkType, apiKey: string, protocol?: "http" | "ws"): string | undefined;
5
12
  export declare function getAlchemyUrl(network: NetworkType, apiKey: string, protocol?: "http" | "ws"): string | undefined;
6
13
  export declare function getDrpcUrl(network: NetworkType, apiKey: string, protocol?: "http" | "ws"): string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "12.3.11",
3
+ "version": "12.3.13",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",