Options
All
  • Public
  • Public/Protected
  • All
Menu

FantomSDK allows you to interact with Fantom Liquid Staking smart contracts on Fantom (Mainnet, Tesnet): aFTMb, aFTMc, and FantomPool.

For more information on Fantom Liquid Staking from Ankr, refer to the development details.

Hierarchy

  • FantomSDK

Implements

Index

Constructors

Properties

apiGateWay: ApiGateway

apiGateWay — gateway instance.

apiUrl?: string

apiUrl — URL of the advanced API.

readonly
currentAccount: string

currentAccount — connected account.

readProvider: Web3KeyReadProvider

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

readonly
writeProvider: Web3KeyWriteProvider

writeProvider — provider which has signer for signing transactions.

readonly
instance?: FantomSDK

instance — SDK instance.

static

Methods

  • addTokenToWallet(token: string): Promise<boolean>
  • approveACForAB(amount?: BigNumber, scale?: number): Promise<undefined | IWeb3SendResult>
  • checkAllowance(amount: BigNumber): Promise<boolean>
  • Checks if allowance is greater or equal to amount.

    note

    Allowance is the amount which spender is still allowed to withdraw from owner.

    Parameters

    • amount: BigNumber

    Returns Promise<boolean>

    • true if amount doesn't exceed allowance, false - otherwise.
  • convertFromWei(amount: string): BigNumber
  • fetchTxReceipt(txHash: string): Promise<null | TransactionReceipt>
  • getABBalance(): Promise<BigNumber>
  • getACAllowance(spender?: string): Promise<BigNumber>
  • getACBalance(): Promise<BigNumber>
  • getACRatio(): Promise<BigNumber>
  • getAftmbTokenContract(isForceRead?: boolean): Promise<Contract>
  • getAftmcTokenContract(isForceRead?: boolean): Promise<Contract>
  • getBurnFee(amount: BigNumber): Promise<BigNumber>
  • getFtmBalance(): Promise<BigNumber>
  • getIncreasedGasLimit(gasLimit: number): number
  • getLatestBlock(): Promise<number>
  • getMinimumStake(): Promise<BigNumber>
  • getStakeGasFee(amount: BigNumber, token: TFtmSyntToken): Promise<BigNumber>
  • lockShares(args: IShareArgs): Promise<IWeb3SendResult>
  • stake(amount: BigNumber, token: string): Promise<IStakeData>
  • unlockShares(args: IShareArgs): Promise<IWeb3SendResult>
  • unstake(amount: BigNumber, token: string): Promise<IWeb3SendResult>

Generated using TypeDoc