/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type AppSchemasV2LedgersLedgerCkerc20Contract = { chainId: string; address: string; }; /** @internal */ export const AppSchemasV2LedgersLedgerCkerc20Contract$inboundSchema: z.ZodType< AppSchemasV2LedgersLedgerCkerc20Contract, z.ZodTypeDef, unknown > = z.object({ chain_id: z.string(), address: z.string(), }).transform((v) => { return remap$(v, { "chain_id": "chainId", }); }); /** @internal */ export type AppSchemasV2LedgersLedgerCkerc20Contract$Outbound = { chain_id: string; address: string; }; /** @internal */ export const AppSchemasV2LedgersLedgerCkerc20Contract$outboundSchema: z.ZodType< AppSchemasV2LedgersLedgerCkerc20Contract$Outbound, z.ZodTypeDef, AppSchemasV2LedgersLedgerCkerc20Contract > = z.object({ chainId: z.string(), address: z.string(), }).transform((v) => { return remap$(v, { chainId: "chain_id", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AppSchemasV2LedgersLedgerCkerc20Contract$ { /** @deprecated use `AppSchemasV2LedgersLedgerCkerc20Contract$inboundSchema` instead. */ export const inboundSchema = AppSchemasV2LedgersLedgerCkerc20Contract$inboundSchema; /** @deprecated use `AppSchemasV2LedgersLedgerCkerc20Contract$outboundSchema` instead. */ export const outboundSchema = AppSchemasV2LedgersLedgerCkerc20Contract$outboundSchema; /** @deprecated use `AppSchemasV2LedgersLedgerCkerc20Contract$Outbound` instead. */ export type Outbound = AppSchemasV2LedgersLedgerCkerc20Contract$Outbound; } export function appSchemasV2LedgersLedgerCkerc20ContractToJSON( appSchemasV2LedgersLedgerCkerc20Contract: AppSchemasV2LedgersLedgerCkerc20Contract, ): string { return JSON.stringify( AppSchemasV2LedgersLedgerCkerc20Contract$outboundSchema.parse( appSchemasV2LedgersLedgerCkerc20Contract, ), ); } export function appSchemasV2LedgersLedgerCkerc20ContractFromJSON( jsonString: string, ): SafeParseResult< AppSchemasV2LedgersLedgerCkerc20Contract, SDKValidationError > { return safeParse( jsonString, (x) => AppSchemasV2LedgersLedgerCkerc20Contract$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'AppSchemasV2LedgersLedgerCkerc20Contract' from JSON`, ); }