/* * 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 AppSchemasLedgersLedgerCkerc20Contract = { chainId: string; address: string; }; /** @internal */ export const AppSchemasLedgersLedgerCkerc20Contract$inboundSchema: z.ZodType< AppSchemasLedgersLedgerCkerc20Contract, z.ZodTypeDef, unknown > = z.object({ chain_id: z.string(), address: z.string(), }).transform((v) => { return remap$(v, { "chain_id": "chainId", }); }); /** @internal */ export type AppSchemasLedgersLedgerCkerc20Contract$Outbound = { chain_id: string; address: string; }; /** @internal */ export const AppSchemasLedgersLedgerCkerc20Contract$outboundSchema: z.ZodType< AppSchemasLedgersLedgerCkerc20Contract$Outbound, z.ZodTypeDef, AppSchemasLedgersLedgerCkerc20Contract > = 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 AppSchemasLedgersLedgerCkerc20Contract$ { /** @deprecated use `AppSchemasLedgersLedgerCkerc20Contract$inboundSchema` instead. */ export const inboundSchema = AppSchemasLedgersLedgerCkerc20Contract$inboundSchema; /** @deprecated use `AppSchemasLedgersLedgerCkerc20Contract$outboundSchema` instead. */ export const outboundSchema = AppSchemasLedgersLedgerCkerc20Contract$outboundSchema; /** @deprecated use `AppSchemasLedgersLedgerCkerc20Contract$Outbound` instead. */ export type Outbound = AppSchemasLedgersLedgerCkerc20Contract$Outbound; } export function appSchemasLedgersLedgerCkerc20ContractToJSON( appSchemasLedgersLedgerCkerc20Contract: AppSchemasLedgersLedgerCkerc20Contract, ): string { return JSON.stringify( AppSchemasLedgersLedgerCkerc20Contract$outboundSchema.parse( appSchemasLedgersLedgerCkerc20Contract, ), ); } export function appSchemasLedgersLedgerCkerc20ContractFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AppSchemasLedgersLedgerCkerc20Contract$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AppSchemasLedgersLedgerCkerc20Contract' from JSON`, ); }