Skip to content
On this page

All Wallet SDK methods

Aptos

  • stake(token, address, amount): Stakes user tokens. For the initial stake, you need to stake a minimum of 10 APT. However, if you already have an active stake more than or equal to 10 APT, the minimum amount you can add is 0.1 Aptos.
  • reactivate(token, address, amount): Reactivates user Stake. The user can only reactivate that number of APT, which was unlocked previously. If a user possesses 15 unlocked APT, they are only able to reactivate the entire amount. This is due to the fact that the condition specifying the remaining unlocked amount must be equal to or greater than 10 APT is not met when unlocking just 10 APT.
  • unlock(token, address, amount): Unlocks user tokens. The user can only unlock more than 10 APT and must have more than or equal to 10 APT in the active stake.If a user possesses 15 APT, they are only able to unlock the entire amount. This is due to the fact that the condition specifying the remaining active stake must be equal to or greater than 10 APT is not met when unlocking just 10 APT.
  • unstake(token, address, amount): Unstakes user tokens. The user can only unstake that number of APT, which was unlocked previously. If a user possesses 15 unlocked APT, they are only able to unstake the entire amount. This is due to the fact that the condition specifying the remaining unlocked amount must be equal to or greater than 10 APT is not met when ustaking just 10 APT.
  • sendTransfer(address, recipientAddress, amount): Transfers user tokens. Using this method user can transfer APT from one wallet address to another.

Ethereum JS library methods

Actions

Getting Info

  • balance(): Returns total deposited and activated pools balance. The total amount of ETH that has been staked.
  • pendingBalance(): Returns the pending balance of staked ETH in the pool, which is always less than 32 ETH.
  • pendingBalanceOf(address): Returns the pending balance of the user, which represents the amount of ETH staked but not yet active due to the pool not being fully filled. There is one type of pending balance: "Autocompound," which represents rewards earned by the user that are automatically staked but not yet active.
  • pendingDepositedBalance(): Returns pool pending deposited balance. Balance was deposited into Beacon deposit contract but validators are still not active.
  • pendingRestakedRewards(): Returns pool restaked rewards which in pending status.
  • pendingDepositedBalanceOf(address): Returns user pending deposited balance. Balance which deposited into validator but not active yet. Pending deposited balance can't be unstake till validator activation.
  • pendingRestakedRewardOf(address): Returns user restaked rewards in pending state.
  • RestakedRewardOf(address): Returns total user restaked rewards. Includes rewards in pending state.
  • depositedBalanceOf(address): Returns user active origin deposited balance.
  • getPoolFee(): Returns Pool fee in bips (1/10000). To obtain the pool fee percentage, simply multiply it by 100.
  • autocompoundBalanceOf(address): Returns total user autocompound balance. The "Autocompound balance" refers to the user's actively staked ETH balance that continuously increases as rewards are restaked. Part of this balance could be in pending state after rewards autocompound.
  • withdrawRequestQueueParams(): Provides a overview of the withdrawal request queue. It retrieves information about the total amount of funds requested for withdrawal over the entire operational period, giving an insight into the overall demand for withdrawals. Additionally, the function details the current amount that is permissible for interchange with deposits, which is crucial for maintaining a balanced liquidity between incoming and outgoing funds.
  • withdrawRequest(address): Returns user withdraw request info. Actual requested amount and amount ready for claim
  • minStakeAmount(): Returns the minimum amount required for a single user stake.

Getting Validator Info

  • closeValidatorsStat(): Returns the number of validators expected to stop.
  • getPendingValidatorCount(): Returns number of validators prepared for deposit.
  • getPendingValidator(index): By using an index, retrieve the pending validator public key. Please note that the list of pending validators is dynamic, and the ordering may be unstable.
  • getValidatorCount(): Returns the total number of known validators. Validators can be in one of the following statuses: pending, deposited, or exited. Exited validators will be replaced by new pending validators to optimize memory usage.
  • getValidator(index): Returns validator pubkey and status.

Polygon

Cosmos

Solana

Why the Wallet SDK

It is very simple to integrate staking, using described methods with code examples.