Skip to main content
Version: 27.4.x

Class: Staking

api/client/Staking.Staking

Handles Staking related functionality

Methods

bond

bond(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Bond POLYX for staking

Parameters

NameType
argsBondPolyxParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

the signing account cannot be a stash

Note

this method is of type ProcedureMethod, which means you can call bond.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/client/Staking.ts:112


bondExtra

bondExtra(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Bond extra POLYX for staking

Parameters

NameType
argsUpdatePolyxBondParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this transaction must be signed by a stash

Note

this method is of type ProcedureMethod, which means you can call bondExtra.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/client/Staking.ts:124


eraInfo

eraInfo(): Promise<StakingEraInfo>

Retrieve the current staking era

Returns

Promise<StakingEraInfo>

Note

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

Defined in

api/client/Staking.ts:239

eraInfo(callback): Promise<UnsubCallback>

Parameters

NameType
callbackSubCallback<StakingEraInfo>

Returns

Promise<UnsubCallback>

Defined in

api/client/Staking.ts:240


getValidators

getValidators(paginationOpts?): Promise<ResultSet<StakingCommission>>

Return information about nomination targets

Parameters

NameType
paginationOpts?PaginationOptions

Returns

Promise<ResultSet<StakingCommission>>

Note

supports pagination

Defined in

api/client/Staking.ts:191


nominate

nominate(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Nominate validators for the bonded POLYX

Parameters

NameType
argsNominateValidatorsParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this transaction must be signed by a controller

Note

this method is of type ProcedureMethod, which means you can call nominate.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/client/Staking.ts:158


setController

setController(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Allow for a stash account to update its controller

Parameters

NameType
argsSetStakingControllerParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

the transaction must be signed by a stash account

Note

this method is of type ProcedureMethod, which means you can call setController.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/client/Staking.ts:170


setPayee

setPayee(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Allow for a stash account to update where it's staking rewards are deposited

Parameters

NameType
argsSetStakingPayeeParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

the transaction must be signed by a controller account

Note

this method is of type ProcedureMethod, which means you can call setPayee.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/client/Staking.ts:182


unbond

unbond(args, opts?): Promise<GenericPolymeshTransaction<void, void>>

Unbond POLYX for staking. The unbonded amount can be withdrawn after the lockup period

Parameters

NameType
argsUpdatePolyxBondParams
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this method is of type ProcedureMethod, which means you can call unbond.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/client/Staking.ts:134


withdraw

withdraw(opts?): Promise<GenericPolymeshTransaction<void, void>>

Withdraw unbonded POLYX to free it for the stash account

Parameters

NameType
opts?ProcedureOpts

Returns

Promise<GenericPolymeshTransaction<void, void>>

Note

this transaction must be signed by a controller

Note

this method is of type NoArgsProcedureMethod, which means you can call withdraw.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Defined in

api/client/Staking.ts:146