Class: TXIndexer

indexer~TXIndexer(options)

TXIndexer

Constructor

new TXIndexer(options)

Create a indexer

Extends:
  • Indexer
Parameters:
Name Type Description
options Object
Source:

Extends

  • Indexer

Methods

(async) getMeta(hash) → {Promise}

Get a transaction with metadata.

Parameters:
Name Type Description
hash Hash
Source:
Returns:
  • Returns TXMeta.
Type
Promise

(async) getSpentView(tx) → {Promise}

Get coin viewpoint (historical).

Parameters:
Name Type Description
tx TX
Source:
Returns:
  • Returns CoinView.
Type
Promise

(async) getTX(hash) → {Promise}

Retrieve a transaction.

Parameters:
Name Type Description
hash Hash
Source:
Returns:
  • Returns TX.
Type
Promise

(async) hasTX(hash) → {Promise}

Parameters:
Name Type Description
hash Hash
Source:
Returns:
  • Returns Boolean.
Type
Promise

(async, private) indexBlock(meta, block, view)

Index transactions by txid.

Parameters:
Name Type Description
meta BlockMeta
block Block
view CoinView
Source:

(async, private) unindexBlock(meta, block, view)

Remove transactions from index.

Parameters:
Name Type Description
meta BlockMeta
block Block
view CoinView
Source: