Skip to content
On this page

Getting Info Ethereum

The get namespace contains method used for getting info. The unique method to the get namespace is:

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

Get Balance

ts
// Import SDK
import { Ethereum } from '@everstake/wallet-sdk';

// Return total deposited and activated pool balance in ETH.
const result = await Ethereum.balance();
console.log(result); // 64 (Amount in ETH)

Get Pending Pool Balance

ts
// Import SDK
import { Ethereum } from '@everstake/wallet-sdk';

// Return pool pending balance. Always < 32 ETH
const result = await Ethereum.pendingBalance();
console.log(result); // 12 (Amount in ETH)

Get Pending User Balance

ts
// Import SDK
import { Ethereum } from '@everstake/wallet-sdk';

// user public address
const address = '0x7CB380672D37E6Cc2e1dE28616076Cf3Cexample';

// Return user pending balance.
const result = await Ethereum.pendingBalanceOf(address);
console.log(result); // see the response below

result = { 
    autocompound: 3,
} // (Amount in ETH)

Get Pending User Deposited Balance

ts
// Import SDK
import { Ethereum } from '@everstake/wallet-sdk';

// user public address
const address = '0x7CB380672D37E6Cc2e1dE28616076Cf3Cexample';

// Return user stake in pending deposited state.
const result = await Ethereum.pendingDepositedBalanceOf(address);
console.log(result); 

Get Pending User Restake Rewards

ts
// Import SDK
import { Ethereum } from '@everstake/wallet-sdk';

// user public address
const address = '0x7CB380672D37E6Cc2e1dE28616076Cf3Cexample';

// Return user restaked rewards in pending state.
const result = await Ethereum.pendingRestakedRewardOf(address);
console.log(result); 

Get User Active Origin Deposited Balance

ts
// Import SDK
import { Ethereum } from '@everstake/wallet-sdk';

// user public address
const address = '0x7CB380672D37E6Cc2e1dE28616076Cf3Cexample';

// Return user active origin deposited balance.
const result = await Ethereum.depositedBalanceOf(address);
console.log(result); 

Get Pool Fee

ts
// Import SDK
import { Ethereum } from '@everstake/wallet-sdk';

// Return Pool fee
const result = await Ethereum.getPoolFee();
console.log(result); // 0.05

Get Autocompound Balance

ts
// Import SDK
import { Ethereum } from '@everstake/wallet-sdk';

// user public address
const address = '0x7CB380672D37E6Cc2e1dE28616076Cf3Cexample';

// Return total user autocompound balance. 
// Part of this balance could be in pending 
// state after rewards autocompound
const result = await Ethereum.autocompoundBalanceOf(address);
console.log(result); // 0.5 (Amount in ETH)

Get Withdraw Request Queue Params

ts
// Import SDK
import { Ethereum } from '@everstake/wallet-sdk';

// Return info about withdraw requests queue. 
// Totally alltime requested withdraw amount. 
// Actual allowed for intercharge with deposits amount. 
// Alltime withdraw treasury filled amount. 
// Alltime claimed by users amount
const result = await Ethereum.withdrawRequestQueueParams();
console.log(result); // see the response below

result = {
    // Totally alltime requested withdraw amount.
    withdrawRequested: 1,
    // Actual allowed for interchange with deposits amount.
    interchangeAllowed: 2,
    // Alltime withdraw treasury filled amount.
    filled: 3,
    // Alltime claimed by users amount
    claimed: 4,
}

Get Withdraw Request

ts
// Import SDK
import { Ethereum } from '@everstake/wallet-sdk';

// user public address
const address = '0x7CB380672D37E6Cc2e1dE28616076Cf3Cexample';

// Return user withdraw request info. Actual requested amount and amount ready for claim
const result = await Ethereum.withdrawRequest(address);
console.log(result); // see the response below

result = {
    requested: 1.2,
    readyForClaim: 1.2,
}

Get Unstake Balance

ts
// Import SDK
import { Ethereum } from '@everstake/wallet-sdk';

// user public address
const address = '0x7CB380672D37E6Cc2e1dE28616076Cf3Cexample';

// Return total active balance. Common + autocompound
const result = await Ethereum.unstakeBalanceOf(address);
console.log(result); // 4.5 (Amount in ETH)