UNPKG

@avalanche-sdk/client

Version:

A TypeScript SDK for interacting with the Avalanche network through JSON-RPC APIs. This SDK provides a comprehensive set of tools to interact with all Avalanche chains (P-Chain, X-Chain, C-Chain) and various APIs, including wallet functionality for transa

55 lines (52 loc) 1.06 kB
import { CustomTransportConfig, FallbackTransportConfig, HttpTransportConfig, RpcSchema, Transport, WebSocketTransportConfig, } from "viem"; import { IpcTransportConfig } from "viem/node"; export type AvalancheTransportConfig< transport extends Transport, rpcSchema extends RpcSchema | undefined = undefined, raw extends boolean = false > = | { type: "http"; url?: string; config?: HttpTransportConfig<rpcSchema, raw>; } | { type: "ws"; url?: string; config?: WebSocketTransportConfig; } | { type: "custom"; provider: any; config?: CustomTransportConfig; } | { type: "ipc"; path: string; config?: IpcTransportConfig; } | { type: "fallback"; transports: transport[]; config?: FallbackTransportConfig; }; export type ClientType = | "pChain" | "cChain" | "xChain" | "public" | "admin" | "info" | "indexPChainBlock" | "indexCChainBlock" | "indexXChainBlock" | "indexXChainTx" | "health" | "wallet";