diff --git a/classes/LiquidityModule.html b/classes/LiquidityModule.html index 31d93e2..ec4e0eb 100644 --- a/classes/LiquidityModule.html +++ b/classes/LiquidityModule.html @@ -1 +1 @@ -LiquidityModule | @pontem/liquidswap-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • LiquidityModule

Implements

  • IModule

Index

Constructors

Properties

_sdk: SDK

Accessors

Methods

  • calculateOutputBurn(params: ICalculateBurnLiquidityParams): Promise<undefined | { withoutSlippage: { x: string; y: string }; x: string; y: string }>
  • Parameters

    • params: ICalculateBurnLiquidityParams

    Returns Promise<undefined | { withoutSlippage: { x: string; y: string }; x: string; y: string }>

  • calculateRateAndMinReceivedLP(params: ICalculateRatesParams): Promise<{ rate: string; receiveLp: string }>
  • calculateSupply(params: ICalculateSupplyParams): string
  • checkPoolExistence(params: TGetResourcesPayload): Promise<boolean>
  • createAddLiquidityPayload(params: TCreateLiquidityPoolTXPayloadParams): Promise<TxPayloadCallFunction>
  • createBurnLiquidityPayload(params: ICreateBurnLiquidityPayload): Promise<{ arguments: string[]; function: string; type: string; type_arguments: string[] }>
  • Parameters

    • params: ICreateBurnLiquidityPayload

    Returns Promise<{ arguments: string[]; function: string; type: string; type_arguments: string[] }>

  • getAmountIn(params: Omit<ICalculateRatesParams, "interactiveToken">): Promise<string>
  • getAmountOut(params: Omit<ICalculateRatesParams, "interactiveToken">): Promise<string>
  • getLiquidityPoolResource(params: TGetResourcesPayload): Promise<{ liquidityPoolResource: undefined | AptosResource<AptosPoolResource> }>
  • Parameters

    • params: TGetResourcesPayload

    Returns Promise<{ liquidityPoolResource: undefined | AptosResource<AptosPoolResource> }>

  • getLiquiditySupplyResource(params: TGetResourcesPayload): Promise<{ liquidityPoolResource: undefined | AptosResource<AptosCoinInfoResource> }>
  • Parameters

    • params: TGetResourcesPayload

    Returns Promise<{ liquidityPoolResource: undefined | AptosResource<AptosCoinInfoResource> }>

Generated using TypeDoc

\ No newline at end of file +LiquidityModule | @pontem/liquidswap-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • LiquidityModule

Implements

  • IModule

Index

Constructors

Properties

_sdk: SDK

Accessors

Methods

  • calculateOutputBurn(params: ICalculateBurnLiquidityParams): Promise<undefined | { withoutSlippage: { x: string; y: string }; x: string; y: string }>
  • Parameters

    • params: ICalculateBurnLiquidityParams

    Returns Promise<undefined | { withoutSlippage: { x: string; y: string }; x: string; y: string }>

  • calculateRateAndMinReceivedLP(params: ICalculateRatesParams): Promise<{ rate: string; receiveLp: string }>
  • calculateSupply(params: ICalculateSupplyParams): string
  • checkPoolExistence(params: TGetResourcesPayload): Promise<boolean>
  • createAddLiquidityPayload(params: TCreateLiquidityPoolTXPayloadParams): Promise<TxPayloadCallFunction>
  • createBurnLiquidityPayload(params: ICreateBurnLiquidityPayload): Promise<{ arguments: string[]; function: string; type: string; type_arguments: string[] }>
  • Parameters

    • params: ICreateBurnLiquidityPayload

    Returns Promise<{ arguments: string[]; function: string; type: string; type_arguments: string[] }>

  • getAmountIn(params: Omit<ICalculateRatesParams, "interactiveToken">): Promise<string>
  • getAmountOut(params: Omit<ICalculateRatesParams, "interactiveToken">): Promise<string>
  • getLiquidityPoolResource(params: TGetResourcesPayload): Promise<{ liquidityPoolResource: undefined | AptosResource<AptosPoolResource> }>
  • Parameters

    • params: TGetResourcesPayload

    Returns Promise<{ liquidityPoolResource: undefined | AptosResource<AptosPoolResource> }>

  • getLiquiditySupplyResource(params: TGetResourcesPayload): Promise<{ liquidityPoolResource: undefined | AptosResource<AptosCoinInfoResource> }>
  • Parameters

    • params: TGetResourcesPayload

    Returns Promise<{ liquidityPoolResource: undefined | AptosResource<AptosCoinInfoResource> }>

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/ResourcesModule.html b/classes/ResourcesModule.html index 510f1a6..cb6abc3 100644 --- a/classes/ResourcesModule.html +++ b/classes/ResourcesModule.html @@ -1 +1 @@ -ResourcesModule | @pontem/liquidswap-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ResourcesModule

Implements

  • IModule

Index

Constructors

Properties

Accessors

Methods

Constructors

Properties

_sdk: SDK

Accessors

Methods

  • fetchAccountResource<T>(accountAddress: string, resourceType: string): Promise<undefined | AptosResource<T>>
  • Type parameters

    • T = unknown

    Parameters

    • accountAddress: string
    • resourceType: string

    Returns Promise<undefined | AptosResource<T>>

Generated using TypeDoc

\ No newline at end of file +ResourcesModule | @pontem/liquidswap-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ResourcesModule

Implements

  • IModule

Index

Constructors

Properties

Accessors

Methods

Constructors

Properties

_sdk: SDK

Accessors

Methods

  • fetchAccountResource<T>(accountAddress: string, resourceType: string): Promise<undefined | AptosResource<T>>
  • Type parameters

    • T = unknown

    Parameters

    • accountAddress: string
    • resourceType: string

    Returns Promise<undefined | AptosResource<T>>

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/SDK.html b/classes/SDK.html index 2531523..7f88786 100644 --- a/classes/SDK.html +++ b/classes/SDK.html @@ -1 +1 @@ -SDK | @pontem/liquidswap-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SDK

Index

Constructors

Properties

_client: AptosClient
_curves: ICurves
_liquidity: LiquidityModule
_networkOptions: Required<INetworkOptions>
_resources: ResourcesModule
_swap: SwapModule

Accessors

  • get client(): AptosClient
  • get curves(): ICurves
  • get networkOptions(): Required<INetworkOptions>
  • Returns Required<INetworkOptions>

Generated using TypeDoc

\ No newline at end of file +SDK | @pontem/liquidswap-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SDK

Index

Constructors

Properties

_client: AptosClient
_curves: ICurves
_liquidity: LiquidityModule
_networkOptions: Required<INetworkOptions>
_resources: ResourcesModule
_swap: SwapModule

Accessors

  • get client(): AptosClient
  • get curves(): ICurves
  • get networkOptions(): Required<INetworkOptions>
  • Returns Required<INetworkOptions>

Generated using TypeDoc

\ No newline at end of file diff --git a/classes/SwapModule.html b/classes/SwapModule.html index 3a29b58..9100237 100644 --- a/classes/SwapModule.html +++ b/classes/SwapModule.html @@ -1 +1 @@ -SwapModule | @pontem/liquidswap-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SwapModule

Implements

  • IModule

Index

Constructors

Properties

_sdk: SDK

Accessors

Methods

  • getLiquidityPoolResource(params: GetLiquidityPoolResourceParams): Promise<{ liquidityPoolResource: undefined | AptosResource<AptosPoolResource>; liquidityPoolType: string }>
  • Parameters

    • params: GetLiquidityPoolResourceParams

    Returns Promise<{ liquidityPoolResource: undefined | AptosResource<AptosPoolResource>; liquidityPoolType: string }>

Generated using TypeDoc

\ No newline at end of file +SwapModule | @pontem/liquidswap-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SwapModule

Implements

  • IModule

Index

Constructors

Properties

_sdk: SDK

Accessors

Methods

  • getLiquidityPoolResource(params: GetLiquidityPoolResourceParams): Promise<{ liquidityPoolResource: undefined | AptosResource<AptosPoolResource>; liquidityPoolType: string }>
  • Parameters

    • params: GetLiquidityPoolResourceParams

    Returns Promise<{ liquidityPoolResource: undefined | AptosResource<AptosPoolResource>; liquidityPoolType: string }>

Generated using TypeDoc

\ No newline at end of file diff --git a/interfaces/SdkOptions.html b/interfaces/SdkOptions.html index fc3def7..d933491 100644 --- a/interfaces/SdkOptions.html +++ b/interfaces/SdkOptions.html @@ -1 +1 @@ -SdkOptions | @pontem/liquidswap-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SdkOptions

Index

Properties

networkOptions?: INetworkOptions
nodeOptions?: Partial<ClientConfig>
nodeUrl: string

Generated using TypeDoc

\ No newline at end of file +SdkOptions | @pontem/liquidswap-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SdkOptions

Index

Properties

networkOptions?: INetworkOptions
nodeOptions?: Partial<ClientConfig>
nodeUrl: string

Generated using TypeDoc

\ No newline at end of file diff --git a/modules.html b/modules.html index 0e3e64e..9c4e19b 100644 --- a/modules.html +++ b/modules.html @@ -1,4 +1,4 @@ -@pontem/liquidswap-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

@pontem/liquidswap-sdk

Index

References

Renames and re-exports SDK

Type aliases

CalculateRatesParams: { additionalFee?: number; amount: Decimal | number; curveType: CurveType; fromToken: AptosResourceType; interactiveToken: "from" | "to"; toToken: AptosResourceType; version?: typeof VERSION_0 | typeof VERSION_0_5 }

Type declaration

  • Optional additionalFee?: number
  • amount: Decimal | number
  • curveType: CurveType
  • fromToken: AptosResourceType
  • interactiveToken: "from" | "to"
  • toToken: AptosResourceType
  • Optional version?: typeof VERSION_0 | typeof VERSION_0_5
CreateTXPayloadParams: { curveType: CurveType; fromAmount: Decimal | number; fromToken: AptosResourceType; interactiveToken: "from" | "to"; slippage: number; stableSwapType: "high" | "normal"; toAmount: Decimal | number; toToken: AptosResourceType; version?: typeof VERSION_0 | typeof VERSION_0_5 }

Type declaration

  • curveType: CurveType
  • fromAmount: Decimal | number
  • fromToken: AptosResourceType
  • interactiveToken: "from" | "to"
  • slippage: number
  • stableSwapType: "high" | "normal"
  • toAmount: Decimal | number
  • toToken: AptosResourceType
  • Optional version?: typeof VERSION_0 | typeof VERSION_0_5

Functions

  • convertDecimalToFixedString(value: Decimal, decimals: number): string
  • convertValueToDecimal(value: string | number, decimals?: undefined | number): Decimal
  • Parameters

    • value: string | number
    • decimals: undefined | number = 0

    Returns Decimal

  • getCoinInWithFees(coinOutVal: Decimal, reserveOutSize: Decimal, reserveInSize: Decimal, fee: Decimal): Decimal
  • +@pontem/liquidswap-sdk
    Options
    All
    • Public
    • Public/Protected
    • All
    Menu

    @pontem/liquidswap-sdk

    Index

    References

    Renames and re-exports SDK

    Type aliases

    CalculateRatesParams: { additionalFee?: number; amount: Decimal | number; curveType: CurveType; fromToken: AptosResourceType; interactiveToken: "from" | "to"; toToken: AptosResourceType; version?: typeof VERSION_0 | typeof VERSION_0_5 }

    Type declaration

    • Optional additionalFee?: number
    • amount: Decimal | number
    • curveType: CurveType
    • fromToken: AptosResourceType
    • interactiveToken: "from" | "to"
    • toToken: AptosResourceType
    • Optional version?: typeof VERSION_0 | typeof VERSION_0_5
    CreateTXPayloadParams: { curveType: CurveType; fromAmount: Decimal | number; fromToken: AptosResourceType; interactiveToken: "from" | "to"; slippage: number; stableSwapType: "high" | "normal"; toAmount: Decimal | number; toToken: AptosResourceType; version?: typeof VERSION_0 | typeof VERSION_0_5 }

    Type declaration

    • curveType: CurveType
    • fromAmount: Decimal | number
    • fromToken: AptosResourceType
    • interactiveToken: "from" | "to"
    • slippage: number
    • stableSwapType: "high" | "normal"
    • toAmount: Decimal | number
    • toToken: AptosResourceType
    • Optional version?: typeof VERSION_0 | typeof VERSION_0_5

    Functions

    • convertDecimalToFixedString(value: Decimal, decimals: number): string
    • convertValueToDecimal(value: string | number, decimals?: undefined | number): Decimal
    • Parameters

      • value: string | number
      • decimals: undefined | number = 0

      Returns Decimal

    • getCoinInWithFees(coinOutVal: Decimal, reserveOutSize: Decimal, reserveInSize: Decimal, fee: Decimal): Decimal
    • Calculates rate with uncorrelated curve for 'from' input based on 'to' input

      Parameters

      • coinOutVal: Decimal

        amount of second('to') token

        @@ -8,7 +8,7 @@

        amount of reserves for first('from') token

      • fee: Decimal

        amount of fee

        -

      Returns Decimal

    • getCoinOutWithFees(coinInVal: Decimal, reserveInSize: Decimal, reserveOutSize: Decimal, fee: Decimal): Decimal

    Returns Decimal

  • getCoinOutWithFees(coinInVal: Decimal, reserveInSize: Decimal, reserveOutSize: Decimal, fee: Decimal): Decimal
  • Calculates rate with uncorrelated curve for 'to' input based on 'from' input

    Parameters

    • coinInVal: Decimal

      amount of first('from') token

      @@ -18,7 +18,7 @@

      amount of reserves for second('to') token

    • fee: Decimal

      amount of fee

      -

    Returns Decimal

  • getCoinsInWithFeesStable(coinOut: Decimal, reserveOut: Decimal, reserveIn: Decimal, scaleOut: Decimal, scaleIn: Decimal, fee: Decimal): Decimal

Returns Decimal

  • getCoinsInWithFeesStable(coinOut: Decimal, reserveOut: Decimal, reserveIn: Decimal, scaleOut: Decimal, scaleIn: Decimal, fee: Decimal): Decimal
  • Calculates rate with stable curve for 'from' input based on 'to' input

    Parameters

    • coinOut: Decimal

      amount of second('to') token

      @@ -32,7 +32,7 @@

      precision for the ('from')token in decimal places

    • fee: Decimal

      amount of fee

      -

    Returns Decimal

  • getCoinsOutWithFeesStable(coinIn: Decimal, reserveIn: Decimal, reserveOut: Decimal, scaleIn: Decimal, scaleOut: Decimal, fee: Decimal): Decimal

Returns Decimal

  • getCoinsOutWithFeesStable(coinIn: Decimal, reserveIn: Decimal, reserveOut: Decimal, scaleIn: Decimal, scaleOut: Decimal, fee: Decimal): Decimal
  • Calculates rate with stable curve for 'from' input based on 'to' input

    Parameters

    • coinIn: Decimal

      amount of first('from') token