IStakingProtocol
Defined in: protocols/staking.ts:74
The staking interface every staking module implements. Unstaking has two phases:
requestWithdrawal puts an amount in the protocol’s queue, and claimWithdrawals collects it
once finalized.
Methods
Section titled “Methods”claimWithdrawals()
Section titled “claimWithdrawals()”claimWithdrawals(
options?):Promise<ClaimWithdrawalsResult>
Defined in: protocols/staking.ts:88
Claim finalized requests; the native coin returns to the account.
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”Promise<ClaimWithdrawalsResult>
getApr()
Section titled “getApr()”getApr():
Promise<number>
Defined in: protocols/staking.ts:94
APR in percent: 2.5 = 2.5 % (every staking module and app reads it this way).
Returns
Section titled “Returns”Promise<number>
getStakedBalance()
Section titled “getStakedBalance()”getStakedBalance():
Promise<StakedBalance>
Defined in: protocols/staking.ts:92
The account’s staked position.
Returns
Section titled “Returns”Promise<StakedBalance>
getWithdrawalRequests()
Section titled “getWithdrawalRequests()”getWithdrawalRequests():
Promise<WithdrawalRequestsView>
Defined in: protocols/staking.ts:86
The account’s open requests, and which are claimable.
Returns
Section titled “Returns”Promise<WithdrawalRequestsView>
quoteClaimWithdrawals()
Section titled “quoteClaimWithdrawals()”quoteClaimWithdrawals(
options?):Promise<Omit<ClaimWithdrawalsResult,"hash">>
Defined in: protocols/staking.ts:90
Network fee of IStakingProtocol.claimWithdrawals.
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”Promise<Omit<ClaimWithdrawalsResult, "hash">>
quoteRequestWithdrawal()
Section titled “quoteRequestWithdrawal()”quoteRequestWithdrawal(
options):Promise<Omit<WithdrawalRequestResult,"hash"|"approveHash">>
Defined in: protocols/staking.ts:84
Network fee of IStakingProtocol.requestWithdrawal.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<Omit<WithdrawalRequestResult, "hash" | "approveHash">>
quoteStake()
Section titled “quoteStake()”quoteStake(
options):Promise<Omit<StakeResult,"hash">>
Defined in: protocols/staking.ts:78
Network fee of IStakingProtocol.stake; nothing is signed.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<Omit<StakeResult, "hash">>
requestWithdrawal()
Section titled “requestWithdrawal()”requestWithdrawal(
options):Promise<WithdrawalRequestResult>
Defined in: protocols/staking.ts:82
Put staked tokens in the withdrawal queue. Sends an approval first when the protocol needs one.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<WithdrawalRequestResult>
stake()
Section titled “stake()”stake(
options):Promise<StakeResult>
Defined in: protocols/staking.ts:76
Stake native coin and receive the protocol’s staked token.
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<StakeResult>