import { BigNumber } from "bignumber.js"; import type { Account, AccountLike, AccountLikeArray, TokenAccount } from "@ledgerhq/types-live"; import type { CryptoCurrency, TokenCurrency, Unit } from "../types"; export declare const getMainAccount: (account: A | TokenAccount, parentAccount?: A | null | undefined) => A; export declare const getFeesCurrency: (account?: AccountLike) => TokenCurrency | CryptoCurrency; export declare const getFeesUnit: (currency: TokenCurrency | CryptoCurrency) => Unit; export declare const getAccountCurrency: (account?: AccountLike) => TokenCurrency | CryptoCurrency; export declare const getAccountSpendableBalance: (account: AccountLike) => BigNumber; export declare const isAccountEmpty: (a: AccountLike) => boolean; export declare function clearAccount(account: T, familyClean?: (account: Account) => void): T; export declare function findSubAccountById(account: Account, id: string): TokenAccount | undefined; export declare function listSubAccounts(account: Account): TokenAccount[]; export type FlattenAccountsOptions = { enforceHideEmptySubAccounts?: boolean; }; export declare function flattenAccounts(topAccounts: AccountLikeArray, o?: FlattenAccountsOptions): AccountLike[]; export declare const shortAddressPreview: (addr: string, target?: number) => string; export declare const isAccountBalanceUnconfirmed: (account: AccountLike) => boolean; export declare const isUpToDateAccount: (account: Account | null | undefined) => boolean; export declare const makeEmptyTokenAccount: (account: Account, token: TokenCurrency) => TokenAccount; /** * Enhance an account to force token accounts presence */ export declare const accountWithMandatoryTokens: (account: Account, tokenCurrencies: TokenCurrency[]) => Account; /** * Find matching pair of subAccount/parentAccount for a given token curency * if no subAccount found will return parentAccount or null if no matches found */ export declare const findTokenAccountByCurrency: (tokenCurrency: TokenCurrency, accounts: Account[]) => { account?: TokenAccount; parentAccount: Account; } | null | undefined; export declare function isAccount(account?: AccountLike): account is Account; export declare function isTokenAccount(account?: AccountLike): account is TokenAccount; export declare function getParentAccount(account: AccountLike, accounts: AccountLike[]): Account; export declare function areAllOperationsLoaded(account: AccountLike): boolean; //# sourceMappingURL=helpers.d.ts.map