Skip to content

Commit 3f60839

Browse files
committed
fix: schema for rpc provider enum
1 parent 95b4b0c commit 3f60839

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/dev/providers.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { z } from "zod/v4";
12
import { chains, getChain, type NetworkType } from "../sdk/index.js";
23

34
export const SUPPORTED_RPC_PROVIDERS = [
@@ -7,7 +8,9 @@ export const SUPPORTED_RPC_PROVIDERS = [
78
"ankr",
89
] as const;
910

10-
export type RpcProvider = (typeof SUPPORTED_RPC_PROVIDERS)[number];
11+
export const rpcProvidersSchema = z.enum(SUPPORTED_RPC_PROVIDERS);
12+
13+
export type RpcProvider = z.infer<typeof rpcProvidersSchema>;
1114

1215
export function getRpcProviderUrl(
1316
provider: RpcProvider,

0 commit comments

Comments
 (0)