Class: Staking
api/client/Staking.Staking
Handles Staking related functionality
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
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
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
▸ eraInfo(callback
): Promise
<UnsubCallback
>
Parameters
Name | Type |
---|---|
callback | SubCallback <StakingEraInfo > |
Returns
Promise
<UnsubCallback
>
Defined in
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
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
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
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
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
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