Class: ChainState

wallet.ChainState

new ChainState(wid, id)

Chain State

Parameters:
Name Type Description
wid WalletID
id String
Source:

Methods

(static) fromRaw(data) → {TXDBState}

Instantiate txdb state from serialized data.

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

clone() → {TXDBState}

Clone the state.

Source:
Returns:
Type
TXDBState

commit() → {Buffer}

Commit and serialize state.

Source:
Returns:
Type
Buffer

(private) fromRaw(data) → {TXDBState}

Inject properties from serialized data.

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

inspect() → {Object}

Inspect the state.

Source:
Returns:
Type
Object

toBalance() → {Balance}

Convert state to a balance object.

Source:
Returns:
Type
Balance

toJSON(minimalnullable) → {Object}

Convert state to a more json-friendly object.

Parameters:
Name Type Attributes Description
minimal Boolean <nullable>
Source:
Returns:
Type
Object

toRaw() → {Buffer}

Serialize state.

Source:
Returns:
Type
Buffer