Balance
Balance class Service used to retrieve different balances from the Casper network
Constructor Summary
Public Constructor | ||
public |
constructor(keyManager: AbstractKeyManager, client: ClientCasper) Constructor |
Member Summary
Public Members | ||
public |
|
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
async fetchAllStakeBalance(): Promise<*[]> Retrieve current user stake balance from the network from all validators. |
|
public |
async fetchBalance(): Promise<String> Retrieve current user balance from the network. |
|
public |
async fetchBalanceOfPublicKey(publicKey: *): Promise<String> Retrieve balance of a public key from the network. |
|
public |
async fetchStakeBalance(validatorPublicKey: string): Promise<BigNumber> Retrieve current user stake balance from the network for a given validator. |
|
public |
async fetchValidatorBalance(): Promise<Object> Retrieve current validator balance from the network. |
|
public |
async getValidatorsInfo(): Promise<*> Retrieve validator info with cache era based |
Public Constructors
public constructor(keyManager: AbstractKeyManager, client: ClientCasper) source
Constructor
Params:
Name | Type | Attribute | Description |
keyManager | AbstractKeyManager | Instance of a KeyManager |
|
client | ClientCasper | Instance of CasperClient |
Public Members
public client: ClientCasper source
public keyManager: AbstractKeyManager source
public validatorsInfo: ValidatorsInfoResult source
Public Methods
public async fetchAllStakeBalance(): Promise<*[]> source
Retrieve current user stake balance from the network from all validators.
public async fetchBalanceOfPublicKey(publicKey: *): Promise<String> source
Retrieve balance of a public key from the network.
Params:
Name | Type | Attribute | Description |
publicKey | * |
public async fetchStakeBalance(validatorPublicKey: string): Promise<BigNumber> source
Retrieve current user stake balance from the network for a given validator.
Params:
Name | Type | Attribute | Description |
validatorPublicKey | string | Public key of the validator |