Module: lib/blockchains/bitcoin/listener

Module to connect to the Bitcoin network and crawl/listen for transactions

Source:

Methods

(inner) initListener(btcConfig, btcState) → {Promise}

Initiates the listener for Bitcoin blockchain transactions

Parameters:
Name Type Description
btcConfig Object

the Bitcoin blockchain configuration

btcState Object

the Bitcoin blockchain state

Source:
Returns:

resolve if succesfully initialised

Type
Promise

(inner) scanBlocks(cursor, endBlock, wfMessagesopt) → {Promise}

Scans a block for Whiteflag messages, and triggers to scan next block

Parameters:
Name Type Attributes Description
cursor number

the block to scan

endBlock number

the last block to scan block

wfMessages Array.<wfMessages> <optional>

Whiteflag messages processed in an earlier block

Source:
Returns:

resolves if all blocks are successfully processed

Type
Promise