Class: MockDao

MockDao

Dao for accessing test data.

new MockDao(chain)

Creates a MockDao Instance
Parameters:
Name Type Description
chain Bech32hrp Bech32hrp describing the chain to access
Returns:
dao - An instance of the dao
Type
MockDao

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