UNPKG

@ledgerhq/coin-hedera

Version:
74 lines 3.89 kB
import BigNumber from "bignumber.js"; import type { HederaMirrorAccount, HederaMirrorBlock, HederaMirrorToken, HederaMirrorTransaction, HederaMirrorNetworkFees, HederaMirrorContractCallResult, HederaMirrorNode } from "../types"; declare function getAccountsForPublicKey(publicKey: string): Promise<HederaMirrorAccount[]>; /** * Fetches account information from the Hedera Mirror Node API, excluding transactions. * * @param address - The Hedera account ID (e.g., "0.0.12345") * @param timestamp - Optional timestamp filter to get historical account state. * Supports comparison operators: * - "lt:1234567890.123456789" - state before the timestamp * - "eq:1234567890.123456789" - state at the timestamp * Used primarily for analyzing state changes in staking operations. * @returns Promise resolving to account data * @throws HederaAddAccountError if account not found (404) */ declare function getAccount(address: string, timestamp?: string): Promise<HederaMirrorAccount>; declare function getAccountTransactions({ address, pagingToken, limit, order, fetchAllPages, }: { address: string; pagingToken: string | null; limit?: number | undefined; order?: "asc" | "desc" | undefined; fetchAllPages: boolean; }): Promise<{ transactions: HederaMirrorTransaction[]; nextCursor: string | null; }>; declare function getAccountTokens(address: string): Promise<HederaMirrorToken[]>; declare function getLatestTransaction(before: Date): Promise<HederaMirrorTransaction>; declare function getLatestBlock(): Promise<HederaMirrorBlock>; declare function getNetworkFees(): Promise<HederaMirrorNetworkFees>; declare function getContractCallResult(transactionHash: string): Promise<HederaMirrorContractCallResult>; declare function findTransactionByContractCall(timestamp: string, contractId: string): Promise<HederaMirrorTransaction | null>; declare function findTransactionByContractCallV2({ timestamp, payerAddress, }: { timestamp: string; payerAddress: string; }): Promise<HederaMirrorTransaction | null>; declare function getERC20Balance(accountEvmAddress: string, contractEvmAddress: string): Promise<BigNumber>; declare function estimateContractCallGas(senderEvmAddress: string, recipientEvmAddress: string, contractEvmAddress: string, amount: bigint): Promise<BigNumber>; declare function getTransactionsByTimestampRange({ address, startTimestamp, endTimestamp, limit, order, }: { address?: string; startTimestamp: `${string}:${string}`; endTimestamp: `${string}:${string}`; limit?: number; order?: "asc" | "desc"; }): Promise<HederaMirrorTransaction[]>; declare function getNode(nodeId: number): Promise<HederaMirrorNode | null>; declare function getNodes({ cursor, limit, order, fetchAllPages, }: { cursor?: string; limit?: number; order?: "asc" | "desc"; fetchAllPages: boolean; }): Promise<{ nodes: HederaMirrorNode[]; nextCursor: string | null; }>; export declare const apiClient: { getAccountsForPublicKey: typeof getAccountsForPublicKey; getAccount: typeof getAccount; getAccountTokens: typeof getAccountTokens; getAccountTransactions: typeof getAccountTransactions; getLatestBlock: typeof getLatestBlock; getLatestTransaction: typeof getLatestTransaction; getNetworkFees: typeof getNetworkFees; getContractCallResult: typeof getContractCallResult; findTransactionByContractCall: typeof findTransactionByContractCall; findTransactionByContractCallV2: typeof findTransactionByContractCallV2; getERC20Balance: typeof getERC20Balance; estimateContractCallGas: typeof estimateContractCallGas; getTransactionsByTimestampRange: typeof getTransactionsByTimestampRange; getNode: typeof getNode; getNodes: typeof getNodes; }; export {}; //# sourceMappingURL=api.d.ts.map