UNPKG

@aptos-labs/ts-sdk

Version:
54 lines (50 loc) 2.04 kB
import { AptosConfig } from '../api/aptosConfig.mjs'; import { LedgerInfo, AnyNumber, Block } from '../types/index.mjs'; import { ProcessorType } from '../utils/const.mjs'; import { GetChainTopUserTransactionsResponse, GraphqlQuery, GetProcessorStatusResponse } from '../types/indexer.mjs'; import '../utils/apiEndpoints.mjs'; import '../types/generated/operations.mjs'; import '../types/generated/types.mjs'; /** * This file contains the underlying implementations for exposed API surface in * the {@link api/general}. By moving the methods out into a separate file, * other namespaces and processes can access these methods without depending on the entire * general namespace and without having a dependency cycle error. */ declare function getLedgerInfo(args: { aptosConfig: AptosConfig; }): Promise<LedgerInfo>; declare function getBlockByVersion(args: { aptosConfig: AptosConfig; ledgerVersion: AnyNumber; options?: { withTransactions?: boolean; }; }): Promise<Block>; declare function getBlockByHeight(args: { aptosConfig: AptosConfig; blockHeight: AnyNumber; options?: { withTransactions?: boolean; }; }): Promise<Block>; declare function getChainTopUserTransactions(args: { aptosConfig: AptosConfig; limit: number; }): Promise<GetChainTopUserTransactionsResponse>; declare function queryIndexer<T extends {}>(args: { aptosConfig: AptosConfig; query: GraphqlQuery; originMethod?: string; }): Promise<T>; declare function getProcessorStatuses(args: { aptosConfig: AptosConfig; }): Promise<GetProcessorStatusResponse>; declare function getIndexerLastSuccessVersion(args: { aptosConfig: AptosConfig; }): Promise<bigint>; declare function getProcessorStatus(args: { aptosConfig: AptosConfig; processorType: ProcessorType; }): Promise<GetProcessorStatusResponse[0]>; export { getBlockByHeight, getBlockByVersion, getChainTopUserTransactions, getIndexerLastSuccessVersion, getLedgerInfo, getProcessorStatus, getProcessorStatuses, queryIndexer };