UNPKG

@xchainjs/xchain-litecoin

Version:

Custom Litecoin client and utilities used by XChainJS clients

64 lines (63 loc) 2.29 kB
import { Network } from '@xchainjs/xchain-client'; import { BaseAmount } from '@xchainjs/xchain-util'; import { AddressParams, BalanceParams, LtcAddressDTO, LtcAddressUTXO, LtcGetTxsDTO, Transaction, TxHashParams } from './types/sochain-api-types'; /** * Retrieves address information from the Sochain API. * * @see https://sochain.com/api#get-display-data-address * * @param {string} sochainUrl The sochain node url. * @param {string} network * @param {string} address * @returns {LtcAddressDTO} */ export declare const getAddress: ({ apiKey, sochainUrl, network, address }: AddressParams) => Promise<LtcAddressDTO>; /** * Retrieves transaction details by hash from the Sochain API. * * @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<Transaction>; /** * Retrieves transactions associated with an address from the Sochain API. * * @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: Network; page: number; }) => Promise<LtcGetTxsDTO>; /** * Retrieves the balance of an address from the Sochain API. * @see https://sochain.com/api#get-balance * * @param {string} sochainUrl The sochain node url. * @param {string} network * @param {string} address * @returns {number} */ export declare const getBalance: ({ apiKey, sochainUrl, network, address }: BalanceParams) => Promise<BaseAmount>; /** * Retrieves unspent transactions associated with an address from the Sochain API. * * @see https://sochain.com/api#get-unspent-tx * * @param {string} sochainUrl The sochain node url. * @param {string} network * @param {string} address * @returns {LtcAddressUTXO[]} */ export declare const getUnspentTxs: ({ apiKey, sochainUrl, network, address, page, }: AddressParams) => Promise<LtcAddressUTXO[]>;