Constructor
new TXMeta(optionsnullable)
Create an extended transaction.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
Object |
<nullable> |
- Source:
Methods
(static) fromTX(options) → {TXMeta}
Instantiate TXMeta from options.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object |
- 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() → {Object}
Inspect the transaction.
- Source:
Returns:
- Type
- Object
(private) fromJSON(json)
Inject properties from a json object.
Parameters:
Name | Type | Description |
---|---|---|
json |
Object |
- Source:
(private) fromOptions(options)
Inject properties from options object.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object |
- Source:
(private) fromTX(options)
Inject properties from options object.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object |
- Source:
getJSON(network, view) → {Object}
Convert the transaction to an object suitable for JSON serialization.
Parameters:
Name | Type | Description |
---|---|---|
network |
Network | |
view |
CoinView |
- Source:
Returns:
- Type
- Object
getSize() → {Number}
Calculate serialization size.
- Source:
Returns:
- Type
- Number
(private) read(data)
Inject properties from "extended" serialization format.
Parameters:
Name | Type | Description |
---|---|---|
data |
Buffer |
- Source:
write() → {Buffer}
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.
- Source:
Returns:
- Type
- Buffer