UNPKG

@ledgerhq/coin-ton

Version:
40 lines 1.51 kB
import BigNumber from "bignumber.js"; import { TonAccount, TonComment, TonSubAccount, TonTransaction, Transaction } from "./types"; /** * Checks if the given recipient address is valid. */ export declare const isAddressValid: (recipient: string) => boolean; /** * Compares two addresses to check if they are equal. */ export declare const addressesAreEqual: (addr1: string, addr2: string) => boolean; /** * Finds a sub-account by its ID in a TON account. * Returns undefined if no matching sub-account is found. */ export declare function findSubAccountById(account: TonAccount, id: string): TonSubAccount | undefined; /** * Builds a TonTransaction object based on the given transaction details. */ export declare function buildTonTransaction(transaction: Transaction, seqno: number, account: TonAccount): TonTransaction; /** * Validates if the given comment is valid. */ export declare const commentIsValid: (msg: TonComment) => boolean; /** * Gets the transfer expiration time. */ export declare const getTransferExpirationTime: () => number; /** * Estimates the fees for a Ton transaction. */ export declare const getTonEstimatedFees: (account: TonAccount, needsInit: boolean, tx: TonTransaction) => Promise<BigNumber>; /** * Converts a Ledger path string to an array of numbers.length. */ export declare const getLedgerTonPath: (path: string) => number[]; export declare enum BotScenario { DEFAULT = "default", TOKEN_TRANSFER = "token-transfer" } //# sourceMappingURL=utils.d.ts.map