/* * 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 { MoneroP2PPayload, MoneroP2PPayload$inboundSchema, } from "./monerop2ppayload.js"; import { MoneroP2PResponseHeader, MoneroP2PResponseHeader$inboundSchema, } from "./monerop2presponseheader.js"; export type MoneroP2PPingResponse = { payload?: MoneroP2PPayload | undefined; responseHeader?: MoneroP2PResponseHeader | undefined; }; /** @internal */ export const MoneroP2PPingResponse$inboundSchema: z.ZodType< MoneroP2PPingResponse, z.ZodTypeDef, unknown > = z.object({ payload: MoneroP2PPayload$inboundSchema.optional(), response_header: MoneroP2PResponseHeader$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "response_header": "responseHeader", }); }); export function moneroP2PPingResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => MoneroP2PPingResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MoneroP2PPingResponse' from JSON`, ); }