@gearbox-protocol/sdk 12.3.11 → 12.3.12

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.
@@ -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
  });
@@ -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
  };
@@ -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.12",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",