@ledgerhq/coin-aptos
Version:
Ledger Aptos Coin integration
37 lines • 2.05 kB
TypeScript
import { ApolloClient } from "@apollo/client";
import { type AccountData, Ed25519PublicKey, type GasEstimation, type InputEntryFunctionData, type RawTransaction, type UserTransactionResponse, type AptosSettings } from "@aptos-labs/ts-sdk";
import BigNumber from "bignumber.js";
import type { AptosBalance, AptosTransaction, TransactionOptions } from "../types";
import { BlockInfo, FeeEstimation, Operation, TransactionIntent } from "@ledgerhq/coin-framework/api/types";
export declare class AptosAPI {
private readonly aptosConfig;
private readonly aptosClient;
readonly apolloClient: ApolloClient<object>;
constructor(currencyIdOrSettings: AptosSettings | string);
getAccount(address: string): Promise<AccountData>;
getAccountInfo(address: string, startAt?: string): Promise<{
balance: BigNumber;
transactions: (AptosTransaction | null)[];
blockHeight: number;
}>;
estimateGasPrice(): Promise<GasEstimation>;
generateTransaction(address: string, payload: InputEntryFunctionData, options: TransactionOptions): Promise<RawTransaction>;
simulateTransaction(address: Ed25519PublicKey, tx: RawTransaction, options?: {
estimateGasUnitPrice: boolean;
estimateMaxGasAmount: boolean;
estimatePrioritizedGasUnitPrice: boolean;
}): Promise<UserTransactionResponse[]>;
broadcast(tx: string): Promise<string>;
getLastBlock(): Promise<BlockInfo>;
estimateFees(transactionIntent: TransactionIntent): Promise<FeeEstimation>;
getNextUnlockTime(stakingPoolAddress: string): Promise<string | undefined>;
getDelegatorBalanceInPool(poolAddress: string, delegatorAddress: string): Promise<Array<string>>;
listOperations(rawAddress: string, minHeight: number): Promise<[Operation[], string]>;
private getAllTransactions;
private fetchTransactions;
private richItemByVersion;
private getHeight;
private getBlock;
getBalances(address: string, contractAddress?: string): Promise<AptosBalance[]>;
}
//# sourceMappingURL=client.d.ts.map