@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
38 lines (33 loc) • 1.2 kB
text/typescript
import { RequestErrorType } from "viem/utils";
/**
* Parameters for the `index.getContainerByIndex` method.
*
* @property index - The index of the container to retrieve. The first container accepted is at index 0.
* @property encoding - The encoding format for the container data. Only "hex" is supported.
*/
export type GetContainerByIndexParameters = {
index: number;
encoding: "hex";
};
/**
* Return type for the index.getContainerByIndex method.
*
* @property id - The container's ID
* @property bytes - The byte representation of the container
* @property timestamp - The time at which this node accepted the container
* @property encoding - The encoding format used for the container data. Only "hex" is supported.
* @property index - How many containers were accepted in this index before this one
*/
export type GetContainerByIndexReturnType = {
id: string;
bytes: string;
timestamp: string;
encoding: "hex";
index: string;
};
export type GetContainerByIndexErrorType = RequestErrorType;
export type GetContainerByIndexMethod = {
Method: "index.getContainerByIndex";
Parameters: GetContainerByIndexParameters;
ReturnType: GetContainerByIndexReturnType;
};