Constructor
new TXRecord(mtime, txopt, blockopt)
Create tx record.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
mtime |
Number | ||
tx |
TX |
<optional> |
|
block |
BlockMeta |
<optional> |
- Source:
Members
(nullable) block :Hash
Type:
- Source:
Methods
(static) fromTX(txopt, blockopt, mtimeopt) → {TXRecord}
Instantiate tx record from tx and block.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
tx |
TX |
<optional> |
|
block |
BlockMeta |
<optional> |
|
mtime |
Number |
<optional> |
- Source:
Returns:
- Type
- TXRecord
fromTX(tx, blockopt) → {TXRecord}
Inject properties from tx and block.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
tx |
TX | ||
block |
BlockMeta |
<optional> |
- Source:
Returns:
- Type
- TXRecord
getBlock() → (nullable) {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
read(br) → {this}
Inject properties from "extended" format.
Parameters:
Name | Type | Description |
---|---|---|
br |
bio.BufferReader |
- Source:
Returns:
- Type
- this
setBlock(block)
Set block data (confirm).
Parameters:
Name | Type | Description |
---|---|---|
block |
BlockMeta |
- Source:
unsetBlock()
Unset block (unconfirm).
- Source:
write(bw) → {BufioWriter}
Serialize a transaction to "extended format".
Parameters:
Name | Type | Description |
---|---|---|
bw |
BufioWriter |
- Source:
Returns:
- Type
- BufioWriter