Class: Credit

wallet~Credit(coin, spentnullable)

Credit (wrapped coin)

Constructor

new Credit(coin, spentnullable)

Create a credit.

Parameters:
Name Type Attributes Description
coin Coin
spent Boolean <nullable>
Properties:
Name Type Description
coin Coin
spent Boolean
Source:

Methods

(static) fromRaw(data) → {Credit}

Instantiate credit from serialized data.

Parameters:
Name Type Description
data Buffer
Source:
Returns:
Type
Credit

(static) fromTX(tx, index) → {Credit}

Instantiate credit from transaction.

Parameters:
Name Type Description
tx TX
index Number
Source:
Returns:
Type
Credit

(private) fromRaw(data)

Inject properties from serialized data.

Parameters:
Name Type Description
data Buffer
Source:

(private) fromTX(tx, index) → {Credit}

Inject properties from tx object.

Parameters:
Name Type Description
tx TX
index Number
Source:
Returns:
Type
Credit

getSize() → {Number}

Get serialization size.

Source:
Returns:
Type
Number

toRaw() → {Buffer}

Serialize credit.

Source:
Returns:
Type
Buffer