import { TxHash } from '@xchainjs/xchain-client'; import { BaseAmount } from '@xchainjs/xchain-util'; import { AddressDTO, AddressParams, AddressUTXO, BalanceParams, GetTxsDTO, SochainNetwork, Transaction, TxConfirmedStatus, TxHashParams } from './sochain-api-types'; /** * Get address information. * * @param {string} sochainUrl The sochain node url. * @param {string} network * @param {string} address * @returns {AddressDTO} */ export declare const getAddress: ({ apiKey, sochainUrl, network, address }: AddressParams) => Promise; /** * Get transaction by hash. * * @see https://sochain.com/api#get-tx * * @param {string} sochainUrl The sochain node url. * @param {string} network network id * @param {string} hash The transaction hash. * @returns {Transactions} */ export declare const getTx: ({ apiKey, sochainUrl, network, hash }: TxHashParams) => Promise; /** * Get transactions * * @see https://sochain.com/api#get-tx * * @param {string} sochainUrl The sochain node url. * @param {string} network network id * @param {string} hash The transaction hash. * @returns {Transactions} */ export declare const getTxs: ({ apiKey, address, sochainUrl, network, page, }: { apiKey: string; address: string; sochainUrl: string; network: SochainNetwork; page: number; }) => Promise; /** * Get address balance. * * @see https://sochain.com/api#get-balance * * @param {string} sochainUrl The sochain node url. * @param {string} network Network * @param {string} address Address * @param {boolean} confirmedOnly Flag whether to get balances of confirmed txs only or for all * @returns {number} */ export declare const getBalance: ({ apiKey, sochainUrl, network, address, confirmedOnly, assetDecimals, }: BalanceParams) => Promise; /** * Get unspent txs * * @see https://sochain.com/api#get-unspent-tx * * @param {string} sochainUrl The sochain node url. * @param {string} network * @param {string} address * @returns {AddressUTXO[]} */ export declare const getUnspentTxs: ({ apiKey, sochainUrl, network, address, page, }: AddressParams) => Promise; /** * Get Tx Confirmation status * * @see https://sochain.com/api#get-is-tx-confirmed * * @param {string} sochainUrl The sochain node url. * @param {Network} network * @param {string} hash tx id * @returns {TxConfirmedStatus} */ export declare const getIsTxConfirmed: ({ apiKey, sochainUrl, network, hash, }: TxHashParams) => Promise; /** * Helper to get `confirmed` status of a tx. * * It will get it from cache or try to get it from Sochain (if not cached before) */ export declare const getConfirmedTxStatus: ({ apiKey, txHash, sochainUrl, network, }: { apiKey: string; sochainUrl: string; txHash: TxHash; network: SochainNetwork; }) => Promise; /** * Get unspent txs and filter out pending UTXOs * * @see https://sochain.com/api#get-unspent-tx * * @param {string} sochainUrl The sochain node url. * @param {Network} network * @param {string} address * @returns {AddressUTXO[]} */ export declare const getConfirmedUnspentTxs: ({ apiKey, sochainUrl, network, address, }: AddressParams) => Promise; /** * Get address balance. * * @see https://sochain.com/api#get-balance * * @param {string} sochainUrl The sochain node url. * @param {string} network Network * @param {string} address Address * @param {boolean} confirmedOnly Flag whether to get balances of confirmed txs only or for all * @returns {number} */ export declare const broadcastTx: ({ apiKey, sochainUrl, network, txHex, }: { apiKey: string; sochainUrl: string; txHex: string; network: SochainNetwork; }) => Promise;