Options
All
  • Public
  • Public/Protected
  • All
Menu

PolygonOnPolygonSDK allows you to interact with Polygon Liquid Staking smart contracts on the Polygon blockchain: MATIC, aMATICb, ankrMATIC, and SwapPool.

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

Hierarchy

  • PolygonOnPolygonSDK

Implements

Index

Constructors

Properties

contractConfig: IPolygonConfig

Contract addresses by current network mode.

currentAccount: string

currentAccount — connected account.

networkMode: ENetworkMode

Network mode.

readonly
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 — SDK instance.

static

Accessors

  • get isMainnet(): boolean

Methods

  • addTokenToWallet(token: string): Promise<boolean>
  • approveACToken(amount?: BigNumber, scale?: number): Promise<IWeb3SendResult>
  • convertFromWei(amount: string): BigNumber
  • convertToWei(amount: Value): BigNumber
  • getABBalance(): Promise<BigNumber>
  • getABRatio(): Promise<BigNumber>
  • getABTokenContract(): Contract
  • getACAllowance(): Promise<BigNumber>
  • getACBalance(): Promise<BigNumber>
  • getACPoolLiquidity(): Promise<BigNumber>
  • getACPoolLiquidityInMATIC(): Promise<BigNumber>
  • getACRatio(): Promise<BigNumber>
  • getACTokenContract(): Contract
  • getIncreasedGasLimit(gasLimit: number): number
  • getMATICPoolLiquidityInAC(): Promise<BigNumber>
  • getMaticBalance(): Promise<BigNumber>
  • getMaticTokenContract(): Contract
  • getMinimumStake(): Promise<BigNumber>
  • getPendingClaim(): Promise<BigNumber>
  • getStakeFeePct(): Promise<BigNumber>
  • getStakeGasFee(amount: BigNumber, token: TMaticSyntToken, scale?: number): Promise<BigNumber>
  • getSwapPoolContract(): Contract
  • getTxReceipt(txHash: string): Promise<null | TransactionReceipt>
  • getUnstakeFeePct(): Promise<BigNumber>
  • stake(amount: BigNumber, token: string, scale?: number): Promise<IStakeData>
  • unstake(amount: BigNumber, token: string, scale?: number): Promise<IWeb3SendResult>

Generated using TypeDoc