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) fromTX(tx, index) → {Credit}

Instantiate credit from transaction.

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

(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

(private) read(data)

Inject properties from serialized data.

Parameters:
Name Type Description
data Buffer
Source:

write() → {Buffer}

Serialize credit.

Source:
Returns:
Type
Buffer