How it Works
Design
import { Address, Asset } from '@xchainjs/xchain-util'
import { ExplorerProvider } from './explorer-provider'
import { Balance, Network, Tx, TxHash, TxHistoryParams, TxsPage } from './types'
export type Witness = {
value: number
script: Buffer
}
export type UTXO = {
hash: string
index: number
value: number
witnessUtxo: Witness
txHex?: string
}
export interface OnlineDataProvider {
getBalance(address: Address, assets?: Asset[]): Promise<Balance[]>
getTransactions(params: TxHistoryParams): Promise<TxsPage>
getTransactionData(txId: string, assetAddress?: Address): Promise<Tx>
}
export interface UtxoOnlineDataProvider extends OnlineDataProvider {
getConfirmedUnspentTxs(address: Address): Promise<UTXO[]>
getUnspentTxs(address: Address): Promise<UTXO[]>
broadcastTx(txHex: string): Promise<TxHash>
}Supported Providers
Sochain v3
Provider
Website
Status
FreeTier
Chains supported
Blockcypher
Provider
Website
Status
FreeTier
Chains supported
Haskoin
Provider
Website
Status
FreeTier
Chains supported
Last updated