Skip to content

api.client.Staking.Staking

prashantasdeveloper edited this page May 1, 2025 · 5 revisions

Class: Staking

api/client/Staking.Staking

Handles Staking related functionality

Table of contents

Methods

Methods

bond

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

Bond POLYX for staking

Parameters

Name Type
args BondPolyxParams
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

Name Type
args UpdatePolyxBondParams
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

Name Type
callback SubCallback<StakingEraInfo>

Returns

Promise<UnsubCallback>

Defined in

api/client/Staking.ts:240


getValidators

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

Return information about nomination targets

Parameters

Name Type
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

Name Type
args NominateValidatorsParams
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

Name Type
args SetStakingControllerParams
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

Name Type
args SetStakingPayeeParams
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

Name Type
args UpdatePolyxBondParams
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

Name Type
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

Clone this wiki locally