Class: AbstractDao

AbstractDao

AbstractDao describes the Dao interface and implements a set of methods that should be overridden by classes inheriting it.

<abstract> new AbstractDao(chain)

Generic data access object
Parameters:
Name Type Description
chain Bech32hrp Bech32hrp that identifies the chain to access.
Returns:
- An instance of the Dao
Type
dao

Methods


<abstract> getTxByIndex(block_height, 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
Returns:
tx - The transaction
Type
tx

<abstract> getTxiById(txid)

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