Class: Credit

wallet.Credit(coinopt, nullable, spentopt, nullable)

Credit (wrapped coin)

Constructor

new Credit(coinopt, nullable, spentopt, nullable)

Create a credit.

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

Methods

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

Instantiate credit from transaction.

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

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

Inject properties from tx object.

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

getSize() → {Number}

Get serialization size.

Source:
Returns:
Type
Number

read(br) → {this}

Inject properties from serialized data.

Parameters:
Name Type Description
br bio.BufferReader
Source:
Returns:
Type
this

write(bw) → {BufioWriter}

Serialize credit.

Parameters:
Name Type Description
bw BufioWriter
Source:
Returns:
Type
BufioWriter