Skip to content
docs

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.

claimWithdrawals(options?): Promise<ClaimWithdrawalsResult>

Defined in: protocols/staking.ts:88

Claim finalized requests; the native coin returns to the account.

ClaimWithdrawalsOptions

Promise<ClaimWithdrawalsResult>


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).

Promise<number>


getStakedBalance(): Promise<StakedBalance>

Defined in: protocols/staking.ts:92

The account’s staked position.

Promise<StakedBalance>


getWithdrawalRequests(): Promise<WithdrawalRequestsView>

Defined in: protocols/staking.ts:86

The account’s open requests, and which are claimable.

Promise<WithdrawalRequestsView>


quoteClaimWithdrawals(options?): Promise<Omit<ClaimWithdrawalsResult, "hash">>

Defined in: protocols/staking.ts:90

Network fee of IStakingProtocol.claimWithdrawals.

ClaimWithdrawalsOptions

Promise<Omit<ClaimWithdrawalsResult, "hash">>


quoteRequestWithdrawal(options): Promise<Omit<WithdrawalRequestResult, "hash" | "approveHash">>

Defined in: protocols/staking.ts:84

Network fee of IStakingProtocol.requestWithdrawal.

WithdrawalRequestOptions

Promise<Omit<WithdrawalRequestResult, "hash" | "approveHash">>


quoteStake(options): Promise<Omit<StakeResult, "hash">>

Defined in: protocols/staking.ts:78

Network fee of IStakingProtocol.stake; nothing is signed.

StakeOptions

Promise<Omit<StakeResult, "hash">>


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.

WithdrawalRequestOptions

Promise<WithdrawalRequestResult>


stake(options): Promise<StakeResult>

Defined in: protocols/staking.ts:76

Stake native coin and receive the protocol’s staked token.

StakeOptions

Promise<StakeResult>