/// import { IndexerUTXO } from '@/Explorer'; import { BN } from 'luxnet'; import { iHistoryBaseTxTokenOwners } from '@/History'; export declare function filterDuplicateStrings(vals: string[]): string[]; export declare function isArraysOverlap(arr1: any[], arr2: any[]): boolean; /** * Returns true if this utxo is owned by any of the given addresses * @param ownerAddrs Addresses to check against * @param output The UTXO */ export declare function isOutputOwner(ownerAddrs: string[], output: IndexerUTXO): boolean; export declare function isOutputOwnerC(ownerAddr: string, output: IndexerUTXO): boolean; /** * Returns the total amount of `assetID` in the given `utxos` owned by `address`. Checks for X/P addresses. * @param utxos UTXOs to calculate balance from. * @param addresses The wallet's addresses. * @param assetID Only count outputs of this asset ID. * @param chainID Only count the outputs on this chain. * @param isStake Set to `true` if looking for staking utxos. */ export declare function getAssetBalanceFromUTXOs(utxos: IndexerUTXO[], addresses: string[], assetID: string, chainID: string, isStake?: boolean): BN; /** * Returns the total amount of `assetID` in the given `utxos` owned by `address`. Checks for EVM address. * @param utxos UTXOs to calculate balance from. * @param address The wallet's evm address `0x...`. * @param assetID Only count outputs of this asset ID. * @param chainID Only count the outputs on this chain. * @param isStake Set to `true` if looking for staking utxos. */ export declare function getEvmAssetBalanceFromUTXOs(utxos: IndexerUTXO[], address: string, assetID: string, chainID: string, isStake?: boolean): BN; /** * Returns UTXOs owned by the given addresses * @param outs UTXOs to filter * @param myAddrs Addresses to filter by */ export declare function getOwnedOutputs(outs: IndexerUTXO[], myAddrs: string[]): IndexerUTXO[]; /** * Returns addresses of the given UTXOs * @param outs UTXOs to get the addresses of. */ export declare function getAddresses(outs: IndexerUTXO[]): string[]; /** * Returns only the UTXOs of the given asset id. * @param outs * @param assetID */ export declare function getAssetOutputs(outs: IndexerUTXO[], assetID: string): IndexerUTXO[]; /** * Returns UTXOs not owned by the given addresses * @param outs UTXOs to filter * @param myAddrs Addresses to filter by */ export declare function getNotOwnedOutputs(outs: IndexerUTXO[], myAddrs: string[]): IndexerUTXO[]; export declare function getOutputTotals(outs: IndexerUTXO[]): BN; export declare function getRewardOuts(outs: IndexerUTXO[]): IndexerUTXO[]; /** * Returns outputs belonging to the given chain ID * @param outs UTXOs to filter * @param chainID Chain ID to filter by */ export declare function getOutputsOfChain(outs: IndexerUTXO[], chainID: string): IndexerUTXO[]; /** * Filters the UTXOs of a certain output type * @param outs UTXOs to filter * @param type Output type to filter by */ export declare function getOutputsOfType(outs: IndexerUTXO[], type: number): IndexerUTXO[]; /** * Returns a map of asset id to owner addresses * @param outs */ export declare function getOutputsAssetOwners(outs: IndexerUTXO[]): iHistoryBaseTxTokenOwners; /** * Returns an array of Asset IDs from the given UTXOs * @param outs Array of UTXOs */ export declare function getOutputsAssetIDs(outs: IndexerUTXO[]): string[];