1.0.10 • Published 6 months ago

@xchainjs/xchain-utxo-providers v1.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

XChainJS API UTXO providers Interface

A specification for a generalised interface for api providers, to be used by XChainJS implementations. The providers should not have any functionality to generate a key, instead, the xchain-crypto library should be used to ensure cross-chain compatible keystores are handled. The providers is only ever passed a master BIP39 phrase, from which a temporary key and address is decoded.

Documentation

xchain providers

Overview of xchain-utxo-providers\ Interface of xchain-utxo-providers

Design

The UtxoOnlineDataProvider has the following signature:

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>
}

Implementations

sochain v3

Website:          https://sochain.com/api/
Status:           Complete
FreeTier:         No
Chains supported: BTC,BTC-Testnet,LTC,LTC-Testnet,DOGE,DOGE-Testnet

blockcypher

Website:         https://www.blockcypher.com/
Status:           Complete
FreeTier:         Yes, rate limited 3 reqs/sec
Chains supported: BTC,BTC-Testnet,LTC,DOGE

haskoin

Website:         https://www.haskoin.com/
Status:           Complete
FreeTier:         Yes, rate limit unknown
Chains supported:  BTC,BTC-Testnet,BCH,BCH-Testnet
1.0.10

6 months ago

1.0.9

6 months ago

1.0.8

7 months ago

1.0.7

9 months ago

1.0.6

10 months ago

1.0.2

11 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.1

11 months ago

1.0.0

11 months ago

0.2.18

1 year ago

0.2.17

1 year ago

0.2.16

1 year ago

0.2.15

1 year ago

0.2.14

1 year ago

0.2.13

1 year ago

0.2.12

1 year ago

0.2.11

2 years ago

0.2.10

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.8

2 years ago

0.2.3

2 years ago

0.2.5

2 years ago

0.2.4

2 years ago

0.2.1

2 years ago

0.2.2

2 years ago

0.2.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago