Class: BlockcypherDao

BlockcypherDao

This class handles Data Access from the blockcypher API

new BlockcypherDao(chain)

Creates an instance of the BlockcypherDao
Parameters:
Name Type Description
chain Bech32hrp The chain should be set using one of the chain variables

Extends

Methods


getTxById(txid)

Returns a transaction object using the txid
Parameters:
Name Type Description
txid string The transaction id of the transaction to be returned
Returns:
tx - The transaction with the given transactionId
Type
Object

getTxByIndex(block_height, block_index)

Returns a transaction object using the block index
Parameters:
Name Type Description
block_height Number The block that the transaction is recorded in
block_index Number The position of the transaction in the block
Inherited From:
Overrides:
Returns:
tx - The transaction at the given position
Type
Object

<abstract> getTxiById(txid)

Parameters:
Name Type Description
txid string A transaction id referring to a tansaction in the data store
Inherited From:
Overrides:
Returns:
- tx The transaction data
Type
Object