Constructor
new TXMeta(optionsopt, nullable)
Create an extended transaction.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<optional> <nullable> |
- Source:
Members
block :Hash
Type:
- Source:
Methods
(static) fromTX(tx, entry, index) → {TXMeta}
Instantiate TXMeta from options.
Parameters:
Name | Type | Description |
---|---|---|
tx |
TX | |
entry |
ChainEntry | |
index |
Number |
- Source:
Returns:
- Type
- TXMeta
(static) isTXMeta(obj) → {Boolean}
Test whether an object is an TXMeta.
Parameters:
Name | Type | Description |
---|---|---|
obj |
Object |
- Source:
Returns:
- Type
- Boolean
format(view) → {Object}
Inspect the transaction.
Parameters:
Name | Type | Description |
---|---|---|
view |
CoinView |
- Source:
Returns:
- Type
- Object
fromJSON(json)
Inject properties from a json object.
Parameters:
Name | Type | Description |
---|---|---|
json |
Object |
- Source:
fromOptions(options)
Inject properties from options object.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object |
- Source:
fromTX(tx, entry, index)
Inject properties from options object.
Parameters:
Name | Type | Description |
---|---|---|
tx |
TX | |
entry |
ChainEntry | |
index |
Number |
- Source:
getJSON(networkopt, viewopt, chainHeightopt) → {Object}
Convert the transaction to an object suitable for JSON serialization.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
network |
Network |
<optional> |
|
view |
CoinView |
<optional> |
|
chainHeight |
Number |
<optional> |
- Source:
Returns:
- Type
- Object
getSize() → {Number}
Calculate serialization size.
- Source:
Returns:
- Type
- Number
read(br)
Inject properties from "extended" serialization format.
Parameters:
Name | Type | Description |
---|---|---|
br |
bio.BufferReader |
- Source:
write(bw) → {BufioWriter}
Serialize a transaction to "extended format". This is the serialization format we use internally to store transactions in the database. The extended serialization includes the height, block hash, index, timestamp, and pending-since time.
Parameters:
Name | Type | Description |
---|---|---|
bw |
BufioWriter |
- Source:
Returns:
- Type
- BufioWriter