Reference / Modules / client / BalanceState
Class: BalanceState
client.BalanceState
A State instance is a state in the "state machine" sense. It comes with some behavior and state transition methods. A state transition method returns an instance of the next state given the executed operation, which discards current object.
This class should be extended by client class. It provides method enabling the client class to query if it was already discarded or not as well as methods actually discarding the state.
Hierarchy
-
↳
BalanceState
Table of contents
Constructors
Properties
Accessors
Methods
- _refresh
- _transfer
- _transferAll
- discard
- discardOnSuccess
- ensureCurrent
- ensureFundsForFees
- finalizeOnSuccess
- getCurrentState
- getCurrentStateOrThrow
- refresh
- syncDiscardOnSuccess
- transfer
- transferAll
Constructors
constructor
• new BalanceState(state
): BalanceState
Parameters
Name | Type |
---|---|
state | BalanceSharedState |
Returns
Overrides
Defined in
packages/client/src/Balance.ts:97
Properties
sharedState
• Private
sharedState: BalanceSharedState
Defined in
packages/client/src/Balance.ts:102
Accessors
balances
• get
balances(): CoinBalance
[]
Returns
CoinBalance
[]
Defined in
packages/client/src/Balance.ts:108
discarded
• get
discarded(): boolean