@ledgerhq/coin-ton
Version:
36 lines • 1.31 kB
TypeScript
import { Account } from "@ledgerhq/types-live";
import BigNumber from "bignumber.js";
import { TonComment, 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;
/**
* Builds a TonTransaction object based on the given transaction details.
*/
export declare const buildTonTransaction: (transaction: Transaction, seqno: number, account: Account) => 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: Account, 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