Skip to main content
Version: v28.0.x

Class: Staking

api/entities/Account/Staking.Staking

Handles Account staking related functionality

Hierarchy

Methods

getCommission

getCommission(): Promise<null | StakingCommission>

Returns

Promise<null | StakingCommission>

null unless the account is seeking nominations as a validator

Defined in

api/entities/Account/Staking/index.ts:245


getController

getController(): Promise<null | Account>

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

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

Note

a stash can be its own controller

Defined in

api/entities/Account/Staking/index.ts:189

getController(callback): Promise<UnsubCallback>

Fetch the controller associated to this account if there is one

Parameters

NameTypeDescription
callbackSubCallback<null | Account>Callback function to handle subscription updates

Returns

Promise<UnsubCallback>

An unsubscribe function

Note

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

Note

a stash can be its own controller

Defined in

api/entities/Account/Staking/index.ts:199


getLedger

getLedger(): Promise<null | StakingLedger>

Fetch the ledger information for a stash account

Returns

Promise<null | StakingLedger>

null unless the account is a controller

Defined in

api/entities/Account/Staking/index.ts:32


getNomination

getNomination(): Promise<null | StakingNomination>

Fetch this account's current nominations

Returns

Promise<null | StakingNomination>

The nominations or null if the account is not a controller

Note

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

Note

null is returned unless the account is a controller

Defined in

api/entities/Account/Staking/index.ts:128

getNomination(callback): Promise<UnsubCallback>

Fetch this account's current nominations

Parameters

NameTypeDescription
callbackSubCallback<null | StakingNomination>Callback function to handle subscription updates

Returns

Promise<UnsubCallback>

An unsubscribe function

Note

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

Note

null is returned unless the account is a controller

Defined in

api/entities/Account/Staking/index.ts:138


getPayee

getPayee(): Promise<null | StakingPayee>

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

Note

null is returned when the account is not a stash

Note

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

Defined in

api/entities/Account/Staking/index.ts:58

getPayee(callback): Promise<UnsubCallback>

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

Parameters

NameTypeDescription
callbackSubCallback<null | StakingPayee>Callback function to handle subscription updates

Returns

Promise<UnsubCallback>

An unsubscribe function

Note

null is returned when the account is not a stash

Note

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

Defined in

api/entities/Account/Staking/index.ts:68