Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

Methods

  • _computePriceImpact(currentPrice: Price, amountIn: BN, amountOut: BN): Percent
  • Parameters

    • currentPrice: Price
    • amountIn: BN
    • amountOut: BN

    Returns Percent

  • Get token side of liquidity pool

    Parameters

    Returns AmountSide

    token side is base or quote

  • Get tokens side of liquidity pool

    Parameters

    Returns AmountSide[]

    tokens side array

  • getAssociatedAuthority(__namedParameters: { programId: PublicKey }): Promise<{ nonce: number; publicKey: PublicKey }>
  • Parameters

    • __namedParameters: { programId: PublicKey }
      • programId: PublicKey

    Returns Promise<{ nonce: number; publicKey: PublicKey }>

  • getAssociatedBaseVault(__namedParameters: { marketId: PublicKey; programId: PublicKey }): Promise<PublicKey>
  • Parameters

    • __namedParameters: { marketId: PublicKey; programId: PublicKey }
      • marketId: PublicKey
      • programId: PublicKey

    Returns Promise<PublicKey>

  • getAssociatedId(__namedParameters: { marketId: PublicKey; programId: PublicKey }): Promise<PublicKey>
  • Parameters

    • __namedParameters: { marketId: PublicKey; programId: PublicKey }
      • marketId: PublicKey
      • programId: PublicKey

    Returns Promise<PublicKey>

  • getAssociatedLpMint(__namedParameters: { marketId: PublicKey; programId: PublicKey }): Promise<PublicKey>
  • Parameters

    • __namedParameters: { marketId: PublicKey; programId: PublicKey }
      • marketId: PublicKey
      • programId: PublicKey

    Returns Promise<PublicKey>

  • getAssociatedLpVault(__namedParameters: { marketId: PublicKey; programId: PublicKey }): Promise<PublicKey>
  • Parameters

    • __namedParameters: { marketId: PublicKey; programId: PublicKey }
      • marketId: PublicKey
      • programId: PublicKey

    Returns Promise<PublicKey>

  • getAssociatedOpenOrders(__namedParameters: { marketId: PublicKey; programId: PublicKey }): Promise<PublicKey>
  • Parameters

    • __namedParameters: { marketId: PublicKey; programId: PublicKey }
      • marketId: PublicKey
      • programId: PublicKey

    Returns Promise<PublicKey>

  • getAssociatedPoolKeys(__namedParameters: { baseMint: PublicKey; marketId: PublicKey; quoteMint: PublicKey; version: number }): Promise<LiquidityAssociatedPoolKeysV4>
  • Parameters

    • __namedParameters: { baseMint: PublicKey; marketId: PublicKey; quoteMint: PublicKey; version: number }
      • baseMint: PublicKey
      • marketId: PublicKey
      • quoteMint: PublicKey
      • version: number

    Returns Promise<LiquidityAssociatedPoolKeysV4>

  • getAssociatedQuoteVault(__namedParameters: { marketId: PublicKey; programId: PublicKey }): Promise<PublicKey>
  • Parameters

    • __namedParameters: { marketId: PublicKey; programId: PublicKey }
      • marketId: PublicKey
      • programId: PublicKey

    Returns Promise<PublicKey>

  • getAssociatedTargetOrders(__namedParameters: { marketId: PublicKey; programId: PublicKey }): Promise<PublicKey>
  • Parameters

    • __namedParameters: { marketId: PublicKey; programId: PublicKey }
      • marketId: PublicKey
      • programId: PublicKey

    Returns Promise<PublicKey>

  • getAssociatedWithdrawQueue(__namedParameters: { marketId: PublicKey; programId: PublicKey }): Promise<PublicKey>
  • Parameters

    • __namedParameters: { marketId: PublicKey; programId: PublicKey }
      • marketId: PublicKey
      • programId: PublicKey

    Returns Promise<PublicKey>

  • getEnabledFeatures(poolInfo: LiquidityPoolInfo): { addLiquidity: boolean; removeLiquidity: boolean; swap: boolean }
  • Parameters

    Returns { addLiquidity: boolean; removeLiquidity: boolean; swap: boolean }

    • addLiquidity: boolean
    • removeLiquidity: boolean
    • swap: boolean
  • getProgramId(version: number): PublicKey
  • Parameters

    • version: number

    Returns PublicKey

  • getSerumVersion(version: number): 3
  • Parameters

    • version: number

    Returns 3

  • Parameters

    • programId: PublicKey

    Returns LiquidityVersion

  • isV4(lsl: any): lsl is { amountWaveRatio: BN; baseDecimal: BN; baseLotSize: BN; baseMint: PublicKey; baseNeedTakePnl: BN; baseTotalDeposited: BN; baseTotalPnl: BN; baseVault: PublicKey; depth: BN; lpMint: PublicKey; lpReserve: BN; lpVault: PublicKey; marketId: PublicKey; marketProgramId: PublicKey; maxOrder: BN; maxPriceMultiplier: BN; minPriceMultiplier: BN; minSeparateDenominator: BN; minSeparateNumerator: BN; minSize: BN; nonce: BN; openOrders: PublicKey; owner: PublicKey; padding: BN[]; pnlDenominator: BN; pnlNumerator: BN; quoteDecimal: BN; quoteLotSize: BN; quoteMint: PublicKey; quoteNeedTakePnl: BN; quoteTotalDeposited: BN; quoteTotalPnl: BN; quoteVault: PublicKey; resetFlag: BN; state: BN; status: BN; swapBase2QuoteFee: BN; swapBaseInAmount: BN; swapBaseOutAmount: BN; swapFeeDenominator: BN; swapFeeNumerator: BN; swapQuote2BaseFee: BN; swapQuoteInAmount: BN; swapQuoteOutAmount: BN; systemDecimalValue: BN; targetOrders: PublicKey; tradeFeeDenominator: BN; tradeFeeNumerator: BN; volMaxCutRatio: BN; withdrawQueue: PublicKey }
  • Parameters

    • lsl: any

    Returns lsl is { amountWaveRatio: BN; baseDecimal: BN; baseLotSize: BN; baseMint: PublicKey; baseNeedTakePnl: BN; baseTotalDeposited: BN; baseTotalPnl: BN; baseVault: PublicKey; depth: BN; lpMint: PublicKey; lpReserve: BN; lpVault: PublicKey; marketId: PublicKey; marketProgramId: PublicKey; maxOrder: BN; maxPriceMultiplier: BN; minPriceMultiplier: BN; minSeparateDenominator: BN; minSeparateNumerator: BN; minSize: BN; nonce: BN; openOrders: PublicKey; owner: PublicKey; padding: BN[]; pnlDenominator: BN; pnlNumerator: BN; quoteDecimal: BN; quoteLotSize: BN; quoteMint: PublicKey; quoteNeedTakePnl: BN; quoteTotalDeposited: BN; quoteTotalPnl: BN; quoteVault: PublicKey; resetFlag: BN; state: BN; status: BN; swapBase2QuoteFee: BN; swapBaseInAmount: BN; swapBaseOutAmount: BN; swapFeeDenominator: BN; swapFeeNumerator: BN; swapQuote2BaseFee: BN; swapQuoteInAmount: BN; swapQuoteOutAmount: BN; systemDecimalValue: BN; targetOrders: PublicKey; tradeFeeDenominator: BN; tradeFeeNumerator: BN; volMaxCutRatio: BN; withdrawQueue: PublicKey }

  • Parameters

    Returns Promise<{ signers: Signer[]; transaction: Transaction }>

  • Parameters

    Returns { signers: Signer[]; transaction: Transaction }

    • signers: Signer[]
    • transaction: Transaction
  • makeSimulatePoolInfoInstruction(__namedParameters: { poolKeys: LiquidityPoolKeysV4 }): TransactionInstruction
  • Parameters

    Returns Promise<{ signers: Signer[]; transaction: Transaction }>