Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Hierarchy

  • EthereumSDK

Implements

Index

Constructors

Properties

currentAccount: string

currentAccount — connected account.

readProvider: Web3KeyReadProvider

readProvider — provider which allows to read data without connecting the wallet.

readonly
stakeGasFee?: BigNumber

stakeGasFee — cached stake gas fee.

writeProvider: Web3KeyWriteProvider

writeProvider — provider which has signer for signing transactions.

readonly
instance?: EthereumSDK

instance — SDK instance.

static

Methods

  • addTokenToWallet(token: string): Promise<boolean>
  • approveACForAB(amount?: BigNumber, scale?: number): Promise<IWeb3SendResult>
  • claim(token: string): Promise<IWeb3SendResult>
  • connectWriteProvider(): Promise<void>
  • fetchTxData(txHash: string, shouldDecodeAmount?: boolean): Promise<IFetchTxData>
  • fetchTxReceipt(txHash: string): Promise<null | TransactionReceipt>
  • getABBalance(isFormatted?: boolean): Promise<BigNumber>
  • getACAllowance(): Promise<BigNumber>
  • getACBalance(isFormatted?: boolean): Promise<BigNumber>
  • getACRatio(isFormatted?: boolean): Promise<BigNumber>
  • getClaimable(token: string): Promise<BigNumber>
  • getEthBalance(): Promise<BigNumber>
  • getIsEthChain(): boolean
  • getLatestBlock(): Promise<number>
  • getMinimumStake(): Promise<BigNumber>
  • getPastEventsAPI(__namedParameters: IGetPastEvents): Promise<EventData[]>
  • getPastEventsBlockchain(__namedParameters: IGetPastEvents): Promise<EventData[]>
  • getPendingClaim(): Promise<BigNumber>
  • getStakeGasFee(amount: BigNumber, token: string): Promise<BigNumber>
  • lockShares(args: IShareArgs): Promise<IWeb3SendResult>
  • stake(amount: BigNumber, token: string): Promise<IStakeData>
  • stakeWithoutClaim(amount: BigNumber): Promise<IWeb3SendResult>
  • unlockShares(args: IShareArgs): Promise<IWeb3SendResult>
  • unstake(_amount: BigNumber, _token: string): Promise<IWeb3SendResult>

Generated using TypeDoc