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

28 lines (23 loc) 799 B
import { RequestErrorType } from "viem/utils"; import { Encoding, PChainTransactionType } from "./common.js"; /** * Parameters for the `platform.getTx` method. * Get a transaction by its ID. * @property txID - The ID of the transaction to get * @property encoding - Optional. The encoding format to use. Can be either hex or json. Defaults to hex */ export type GetTxParameters = { txID: string; encoding?: Encoding; }; /** * Return type for the `platform.getTx` method. * Returns the transaction encoded to the specified format {@link PChainTransactionType} */ export type GetTxReturnType = PChainTransactionType; export type GetTxErrorType = RequestErrorType; export type GetTxMethod = { Method: "platform.getTx"; Parameters: GetTxParameters; ReturnType: GetTxReturnType; };