UNPKG

@ledgerhq/coin-stacks

Version:
24 lines 1.36 kB
import { GetAccountShape } from "@ledgerhq/coin-framework/bridge/jsHelpers"; import { Account, TokenAccount } from "@ledgerhq/types-live"; import BigNumber from "bignumber.js"; import { TransactionResponse } from "../network"; /** * Calculates the spendable balance by subtracting pending transactions from the total balance */ export declare function calculateSpendableBalance(totalBalance: BigNumber, pendingTxs: Array<{ fee_rate: string; token_transfer: { amount: string; }; }>): BigNumber; /** * Creates a token account for a specific token */ export declare function createTokenAccount(address: string, parentAccountId: string, tokenId: string, tokenBalance: string, transactionsList: TransactionResponse[], initialAccount?: Account): Promise<TokenAccount | null>; /** * Builds token accounts for all tokens with transactions or balances */ export declare function buildTokenAccounts(address: string, parentAccountId: string, tokenTxs: Record<string, TransactionResponse[]>, tokenBalances: Record<string, string>, initialAccount?: Account): Promise<TokenAccount[]>; export declare const getAccountShape: GetAccountShape; export declare const sync: (initialAccount: Account, syncConfig: import("@ledgerhq/types-live").SyncConfig) => import("rxjs").Observable<(arg0: Account) => Account>; //# sourceMappingURL=synchronization.d.ts.map