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

29 lines (24 loc) 777 B
import { RequestErrorType } from "viem/utils"; import { XChainBlockType } from "./common.js"; /** * The parameters for the `avm.getBlockByHeight` method. * * @property height - The height of the block to get. * @property encoding - The encoding of the block. Only "hex" or "json" are supported. */ export type GetBlockByHeightParameters = { height: number; encoding?: "hex" | "json"; }; /** * The return type for the `avm.getBlockByHeight` method. * * @see {@link XChainBlockType} */ export type GetBlockByHeightReturnType = XChainBlockType; export type GetBlockByHeightErrorType = RequestErrorType; export type GetBlockByHeightMethod = { Method: "avm.getBlockByHeight"; Parameters: GetBlockByHeightParameters; ReturnType: GetBlockByHeightReturnType; };