Private constructor. Instead, use EthereumSDK.getInstance
.
apiUrl — URL of the advanced API.
currentAccount — connected account.
readProvider — provider which allows to read data without connecting the wallet.
writeProvider — provider which has signer for signing transactions.
instance — SDK instance.
Add token to wallet.
token symbol (aETHb or aETHc)
Approve aETHc for aETHb, i.e. allow aETHb smart contract to access and transfer aETHc tokens.
Claim tokens.
token symbol
Fetch transaction data.
transaction hash
Fetch transaction receipt.
transaction hash.
Return aETHb token balance.
Return aETHc allowance.
Return aETHc token balance.
Return aETHc/ETH ratio.
Get claimable amount.
token symbol
Return ETH balance.
Internal function to return increased gas limit.
initial gas limit
Internal function to check the current network.
Get latest block number.
Get minimum stake amount.
An internal function for getting past events from the API or blockchain according to the current environment.
Internal function to get past events from indexed logs API.
Internal function to get past events, using the defined range.
Get total pending unstake amount.
Get pending data for aETHb and aETHc.
Internal function to choose the right provider for read or write purpose.
Get stake gas fee.
amount to stake
token symbol
Get transaction history.
Get transaction history.
from block
to block
Switch aETHc to aETHb.
object with amount to switch and scale
Stake token.
amount of token
choose which token to receive (aETHb or aETHc)
Stake without claim.
This method is only for creating a testing capability. It is related to the STAKAN-1259 Do not use it for the production code.
amount to stake
Switch aETHb to aETHc.
object with amount to switch and scale
Unstake token.
Internal function to get aETHb token contract.
readProvider or writeProvider
Internal function to get aETHc token contract.
readProvider or writeProvider
Internal function to get GlobalPool contract.
readProvider or writeProvider
Initialization method for SDK.
Auto-connects write provider if chains are the same. Initializes read provider to support multiple chains.
Generated using TypeDoc
EthereumSDK allows you to interact with Ethereum Liquid Staking smart contracts on Ethereum (Mainnet, Goerli Tesnet) BNB Smart Chain: aETHb, aETHc, and GlobalPool.
For more information on Ethereum Liquid Staking from Ankr, refer to the development details.