/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { safeParse } from "../lib/schemas.js"; import * as openEnums from "../types/enums.js"; import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import * as types from "../types/primitives.js"; import { SDKValidationError } from "./errors/sdk-validation-error.js"; export const Namespace = { Eip155: "eip155", Solana: "solana", } as const; export type Namespace = OpenEnum; export const FacilitatorChainScheme = { Exact: "exact", Upto: "upto", BatchSettlement: "batch-settlement", } as const; export type FacilitatorChainScheme = OpenEnum; export type FacilitatorChain = { network: string; name: string; namespace: Namespace; shortName?: string | undefined; isTestnet: boolean; explorer: string; explorerQuery?: string | undefined; rpcUrl: string; assetAddress: string; schemes: Array; asset: "USDC" | "USDT"; decimals: 6; }; /** @internal */ export const Namespace$inboundSchema: z.ZodMiniType = openEnums.inboundSchema(Namespace); /** @internal */ export const FacilitatorChainScheme$inboundSchema: z.ZodMiniType< FacilitatorChainScheme, unknown > = openEnums.inboundSchema(FacilitatorChainScheme); /** @internal */ export const FacilitatorChain$inboundSchema: z.ZodMiniType< FacilitatorChain, unknown > = z.object({ network: types.string(), name: types.string(), namespace: Namespace$inboundSchema, shortName: types.optional(types.string()), isTestnet: types.boolean(), explorer: types.string(), explorerQuery: types.optional(types.string()), rpcUrl: types.string(), assetAddress: types.string(), schemes: z.array(FacilitatorChainScheme$inboundSchema), asset: z.union([types.literal("USDC"), types.literal("USDT")]), decimals: types.literal(6), }); export function facilitatorChainFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => FacilitatorChain$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FacilitatorChain' from JSON`, ); }