Class: TXMeta

primitives~TXMeta(optionsnullable)

TXMeta An extended transaction object.

Constructor

new TXMeta(optionsnullable)

Create an extended transaction.

Parameters:
Name Type Attributes Description
options Object <nullable>
Source:

Methods

(static) fromJSON(json) → {TX}

Instantiate a transaction from a jsonified transaction object.

Parameters:
Name Type Description
json Object

The jsonified transaction object.

Source:
Returns:
Type
TX

(static) fromOptions(options) → {TXMeta}

Instantiate TXMeta from options.

Parameters:
Name Type Description
options Object
Source:
Returns:
Type
TXMeta

(static) fromRaw(data, encnullable) → {TX}

Instantiate a transaction from a Buffer in "extended" serialization format.

Parameters:
Name Type Attributes Description
data Buffer
enc String <nullable>

One of "hex" or null.

Source:
Returns:
Type
TX

(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) fromRaw(data)

Inject properties from "extended" serialization format.

Parameters:
Name Type Description
data Buffer
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

inspectSymbol() → {Object}

Inspect the transaction.

Source:
Returns:
Type
Object

toJSON() → {Object}

Convert transaction to JSON.

Source:
Returns:
Type
Object

toRaw() → {Buffer}

Serialize a transaction to "extended format". This is the serialization format bcoin uses 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