StakingProtocol
Defined in: core/dist/index-QWdcwE6y.d.ts:783
Base class for staking modules: holds the account and config, and throws NotImplementedError
for every method a module leaves out.
Extends
Section titled “Extends”ProtocolBase<TConfig>
Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”TConfig
Section titled “TConfig”TConfig extends object = Record<string, never>
Implements
Section titled “Implements”IStakingProtocol
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new StakingProtocol<
TConfig>(account,config?):StakingProtocol<TConfig>
Defined in: core/dist/index-QWdcwE6y.d.ts:784
Parameters
Section titled “Parameters”account
Section titled “account”IWalletAccountReadOnly | IWalletAccount
config?
Section titled “config?”TConfig
Returns
Section titled “Returns”StakingProtocol<TConfig>
Overrides
Section titled “Overrides”ProtocolBase<TConfig>.constructor
Properties
Section titled “Properties”_account
Section titled “_account”
protectedreadonly_account:IWalletAccountReadOnly|IWalletAccount
Defined in: core/dist/index-QWdcwE6y.d.ts:309
Inherited from
Section titled “Inherited from”ProtocolBase._account
_config
Section titled “_config”
protectedreadonly_config:TConfig
Defined in: core/dist/index-QWdcwE6y.d.ts:310
Inherited from
Section titled “Inherited from”ProtocolBase._config
Methods
Section titled “Methods”claimWithdrawals()
Section titled “claimWithdrawals()”claimWithdrawals(
_o?):Promise<ClaimWithdrawalsResult>
Defined in: core/dist/index-QWdcwE6y.d.ts:790
Claim finalized requests; the native coin returns to the account.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<ClaimWithdrawalsResult>
Implementation of
Section titled “Implementation of”IStakingProtocol.claimWithdrawals
describeActivity()
Section titled “describeActivity()”describeActivity(
_tx,_ctx):ActivityItem|null
Defined in: core/dist/index-QWdcwE6y.d.ts:320
Recognize one of this protocol’s own transactions in an address’s history and
describe it for the wallet’s activity feed (“Supplied 100 USDC · Aave v3”).
Return null when the transaction is not this protocol’s: the kit then asks the
next module and finally falls back to send / receive / approve / contract call.
Must be pure and synchronous: no network, no account state. The conformance
suite feeds every module its recorded fixtures through this method.
Parameters
Section titled “Parameters”ChainTx
DescribeActivityContext
Returns
Section titled “Returns”ActivityItem | null
Inherited from
Section titled “Inherited from”ProtocolBase.describeActivity
getApr()
Section titled “getApr()”getApr():
Promise<number>
Defined in: core/dist/index-QWdcwE6y.d.ts:793
APR in percent: 2.5 = 2.5 % (every staking module and app reads it this way).
Returns
Section titled “Returns”Promise<number>
Implementation of
Section titled “Implementation of”IStakingProtocol.getApr
getStakedBalance()
Section titled “getStakedBalance()”getStakedBalance():
Promise<StakedBalance>
Defined in: core/dist/index-QWdcwE6y.d.ts:792
The account’s staked position.
Returns
Section titled “Returns”Promise<StakedBalance>
Implementation of
Section titled “Implementation of”IStakingProtocol.getStakedBalance
getWithdrawalRequests()
Section titled “getWithdrawalRequests()”getWithdrawalRequests():
Promise<WithdrawalRequestsView>
Defined in: core/dist/index-QWdcwE6y.d.ts:789
The account’s open requests, and which are claimable.
Returns
Section titled “Returns”Promise<WithdrawalRequestsView>
Implementation of
Section titled “Implementation of”IStakingProtocol.getWithdrawalRequests
quoteClaimWithdrawals()
Section titled “quoteClaimWithdrawals()”quoteClaimWithdrawals(
_o?):Promise<Omit<ClaimWithdrawalsResult,"hash">>
Defined in: core/dist/index-QWdcwE6y.d.ts:791
Network fee of IStakingProtocol.claimWithdrawals.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<Omit<ClaimWithdrawalsResult, "hash">>
Implementation of
Section titled “Implementation of”IStakingProtocol.quoteClaimWithdrawals
quoteRequestWithdrawal()
Section titled “quoteRequestWithdrawal()”quoteRequestWithdrawal(
_o):Promise<Omit<WithdrawalRequestResult,"hash"|"approveHash">>
Defined in: core/dist/index-QWdcwE6y.d.ts:788
Network fee of IStakingProtocol.requestWithdrawal.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<Omit<WithdrawalRequestResult, "hash" | "approveHash">>
Implementation of
Section titled “Implementation of”IStakingProtocol.quoteRequestWithdrawal
quoteStake()
Section titled “quoteStake()”quoteStake(
_o):Promise<Omit<StakeResult,"hash">>
Defined in: core/dist/index-QWdcwE6y.d.ts:786
Network fee of IStakingProtocol.stake; nothing is signed.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<Omit<StakeResult, "hash">>
Implementation of
Section titled “Implementation of”IStakingProtocol.quoteStake
requestWithdrawal()
Section titled “requestWithdrawal()”requestWithdrawal(
_o):Promise<WithdrawalRequestResult>
Defined in: core/dist/index-QWdcwE6y.d.ts:787
Put staked tokens in the withdrawal queue. Sends an approval first when the protocol needs one.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<WithdrawalRequestResult>
Implementation of
Section titled “Implementation of”IStakingProtocol.requestWithdrawal
requireSigningAccount()
Section titled “requireSigningAccount()”
protectedrequireSigningAccount(methodName):IWalletAccount
Defined in: core/dist/index-QWdcwE6y.d.ts:322
The account, narrowed to a signing one, or a ReadOnlyAccountError naming the caller.
Parameters
Section titled “Parameters”methodName
Section titled “methodName”string
Returns
Section titled “Returns”IWalletAccount
Inherited from
Section titled “Inherited from”ProtocolBase.requireSigningAccount
stake()
Section titled “stake()”stake(
_o):Promise<StakeResult>
Defined in: core/dist/index-QWdcwE6y.d.ts:785
Stake native coin and receive the protocol’s staked token.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Promise<StakeResult>
Implementation of
Section titled “Implementation of”IStakingProtocol.stake