Class: TXRecord

wallet/records~TXRecord(tx, blocknullable)

TX Record

Constructor

new TXRecord(tx, blocknullable)

Create tx record.

Parameters:
Name Type Attributes Description
tx TX
block BlockMeta <nullable>
Source:

Methods

(static) fromTX(tx, blocknullable) → {TXRecord}

Instantiate tx record from tx and block.

Parameters:
Name Type Attributes Description
tx TX
block Block <nullable>
Source:
Returns:
Type
TXRecord

(private) fromTX(tx, blocknullable) → {TXRecord}

Inject properties from tx and block.

Parameters:
Name Type Attributes Description
tx TX
block Block <nullable>
Source:
Returns:
Type
TXRecord

getBlock() → {BlockMeta}

Convert tx record to a block meta.

Source:
Returns:
Type
BlockMeta

getDepth(height) → {Number}

Calculate current number of transaction confirmations.

Parameters:
Name Type Description
height Number

Current chain height.

Source:
Returns:

confirmations

Type
Number

getSize() → {Number}

Get serialization size.

Source:
Returns:
Type
Number

(private) read(data)

Inject properties from "extended" format.

Parameters:
Name Type Description
data Buffer
Source:

setBlock(block)

Set block data (confirm).

Parameters:
Name Type Description
block BlockMeta
Source:

unsetBlock()

Unset block (unconfirm).

Source:

write() → {Buffer}

Serialize a transaction to "extended format".

Source:
Returns:
Type
Buffer