UNPKG

@ledgerhq/coin-hedera

Version:
105 lines 4.88 kB
import BigNumber from "bignumber.js"; import { type HederaCoinConfig } from "../config"; import type { HederaMirrorAccount, HederaMirrorBlock, HederaMirrorToken, HederaMirrorTransaction, HederaMirrorNetworkFees, HederaMirrorContractCallResult, HederaMirrorNode } from "../types"; declare function getAccountsForPublicKey({ configOrCurrencyId, publicKey, }: { configOrCurrencyId: HederaCoinConfig | string; publicKey: string; }): Promise<HederaMirrorAccount[]>; /** * Fetches account information from the Hedera Mirror Node API, excluding transactions. * * @param configOrCurrencyId - Coin config object or currency ID string used to resolve the mirror node URL. * @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({ configOrCurrencyId, address, timestamp, }: { configOrCurrencyId: HederaCoinConfig | string; address: string; timestamp?: string; }): Promise<HederaMirrorAccount>; declare function getAccountTransactions({ configOrCurrencyId, address, pagingToken, limit, order, fetchAllPages, }: { configOrCurrencyId: HederaCoinConfig | string; address: string; pagingToken: string | null; limit?: number | undefined; order?: "asc" | "desc" | undefined; fetchAllPages: boolean; }): Promise<{ transactions: HederaMirrorTransaction[]; nextCursor: string | null; }>; declare function getAccountTokens({ configOrCurrencyId, address, }: { configOrCurrencyId: HederaCoinConfig | string; address: string; }): Promise<HederaMirrorToken[]>; declare function getLatestTransaction({ configOrCurrencyId, before, }: { configOrCurrencyId: HederaCoinConfig | string; before: Date; }): Promise<HederaMirrorTransaction>; declare function getLatestBlock({ configOrCurrencyId, }: { configOrCurrencyId: HederaCoinConfig | string; }): Promise<HederaMirrorBlock>; declare function getNetworkFees({ configOrCurrencyId, }: { configOrCurrencyId: HederaCoinConfig | string; }): Promise<HederaMirrorNetworkFees>; declare function getContractCallResult({ configOrCurrencyId, transactionHash, }: { configOrCurrencyId: HederaCoinConfig | string; transactionHash: string; }): Promise<HederaMirrorContractCallResult>; declare function findTransactionByContractCallV2({ configOrCurrencyId, timestamp, payerAddress, }: { configOrCurrencyId: HederaCoinConfig | string; timestamp: string; payerAddress: string; }): Promise<HederaMirrorTransaction | null>; declare function estimateContractCallGas({ configOrCurrencyId, senderEvmAddress, recipientEvmAddress, contractEvmAddress, amount, }: { configOrCurrencyId: HederaCoinConfig | string; senderEvmAddress: string; recipientEvmAddress: string; contractEvmAddress: string; amount: bigint; }): Promise<BigNumber>; declare function getTransactionsByTimestampRange({ configOrCurrencyId, address, startTimestamp, endTimestamp, limit, order, }: { configOrCurrencyId: HederaCoinConfig | string; address?: string; startTimestamp: `${string}:${string}`; endTimestamp: `${string}:${string}`; limit?: number; order?: "asc" | "desc"; }): Promise<HederaMirrorTransaction[]>; declare function getNode({ configOrCurrencyId, nodeId, }: { configOrCurrencyId: HederaCoinConfig | string; nodeId: number; }): Promise<HederaMirrorNode | null>; declare function getNodes({ configOrCurrencyId, cursor, limit, order, fetchAllPages, }: { configOrCurrencyId: HederaCoinConfig | string; 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; findTransactionByContractCallV2: typeof findTransactionByContractCallV2; estimateContractCallGas: typeof estimateContractCallGas; getTransactionsByTimestampRange: typeof getTransactionsByTimestampRange; getNode: typeof getNode; getNodes: typeof getNodes; }; export {}; //# sourceMappingURL=api.d.ts.map