import { ResultAsync } from 'neverthrow' import { OpenApiClientCall } from './open-api-client' import { OpenRPCClientCall } from './open-rpc-client' type TransportType = 'json-rpc' | 'open-api' export type Call = ( method: Methods, param: Params, ) => ResultAsync export type Transport = { type: T call: T extends 'open-api' ? OpenApiClientCall : OpenRPCClientCall } export type Client = (url: URL) => Transport