/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; 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"; import { MoneroP2PPingResponse, MoneroP2PPingResponse$inboundSchema, } from "./monerop2ppingresponse.js"; export type MoneroP2P = { pingResponse?: MoneroP2PPingResponse | undefined; }; /** @internal */ export const MoneroP2P$inboundSchema: z.ZodType< MoneroP2P, z.ZodTypeDef, unknown > = z.object({ ping_response: MoneroP2PPingResponse$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "ping_response": "pingResponse", }); }); export function moneroP2PFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MoneroP2P$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MoneroP2P' from JSON`, ); }