Skip to main content
Version: 29.0.x

Class: Staking

Defined in: src/api/entities/Account/Staking/index.ts:26

Handles Account staking related functionality

Extends

Methods

getCommission()

getCommission(): Promise<null | StakingCommission>

Defined in: src/api/entities/Account/Staking/index.ts:243

Fetch the commission settings for this validator account

Returns

Promise<null | StakingCommission>

The commission details or null if the account is not seeking nominations as a validator


getController()

Call Signature

getController(): Promise<null | Account>

Defined in: src/api/entities/Account/Staking/index.ts:184

Fetch the controller associated to this account if there is one

Returns

Promise<null | Account>

The controller account or null if the account is not a stash

Note

a stash can be its own controller

Call Signature

getController(callback: SubCallback<null | Account>): Promise<UnsubCallback>

Defined in: src/api/entities/Account/Staking/index.ts:195

Fetch the controller associated to this account if there is one

Parameters
ParameterTypeDescription

callback

SubCallback<null | Account>

Callback function that can be used to listen for changes to the controller

Returns

Promise<UnsubCallback>

The controller account or null if the account is not a stash

Note

can be subscribed to, if connected to node using a web socket

Note

a stash can be its own controller


getLedger()

getLedger(): Promise<null | StakingLedger>

Defined in: src/api/entities/Account/Staking/index.ts:32

Fetch the ledger information for a stash account

Returns

Promise<null | StakingLedger>

The staking ledger information or null if the account is not a controller


getNomination()

Call Signature

getNomination(): Promise<null | StakingNomination>

Defined in: src/api/entities/Account/Staking/index.ts:124

Fetch this account's current nominations

Returns

Promise<null | StakingNomination>

The nomination details or null if the account is not a controller

Call Signature

getNomination(callback: SubCallback<null | StakingNomination>): Promise<UnsubCallback>

Defined in: src/api/entities/Account/Staking/index.ts:134

Fetch this account's current nominations

Parameters
ParameterTypeDescription

callback

SubCallback<null | StakingNomination>

Callback function that can be used to listen for changes to the nominations

Returns

Promise<UnsubCallback>

The nomination details or null if the account is not a controller

Note

can be subscribed to, if connected to node using a web socket


getPayee()

Call Signature

getPayee(): Promise<null | StakingPayee>

Defined in: src/api/entities/Account/Staking/index.ts:56

Fetch the payee that will receive a stash account's rewards

Returns

Promise<null | StakingPayee>

The payee account or null if the account is not a stash

Call Signature

getPayee(callback: SubCallback<null | StakingPayee>): Promise<UnsubCallback>

Defined in: src/api/entities/Account/Staking/index.ts:66

Fetch the payee that will receive a stash account's rewards

Parameters
ParameterTypeDescription

callback

SubCallback<null | StakingPayee>

Callback function that can be used to listen for changes to the staking payee

Returns

Promise<UnsubCallback>

The payee account or null if the account is not a stash

Note

can be subscribed to, if connected to node using a web socket