/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { EthereumVersion, EthereumVersion$inboundSchema, } from "./ethereumversion.js"; export type Ethereum = { accounts?: Array | null | undefined; hashrate?: string | undefined; version?: EthereumVersion | undefined; }; /** @internal */ export const Ethereum$inboundSchema: z.ZodType< Ethereum, z.ZodTypeDef, unknown > = z.object({ accounts: z.nullable(z.array(z.string())).optional(), hashrate: z.string().optional(), version: EthereumVersion$inboundSchema.optional(), }); export function ethereumFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Ethereum$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Ethereum' from JSON`, ); }