@soku-dex/sdk
    Preparing search index...

    Class LiquidityPool

    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    Methods

    • Returns Promise<
          {
              balance: bigint;
              blockId: { seqno: number; shard: string; workchain: number };
              data: null | LiquidityPool$Data;
              lastTransaction: null | { hash: string; lt: string };
              state: "active" | "uninitialized" | "frozen";
              timestamp: number;
          },
      >

    • Creates a new liquidity pool with the specified configuration.

      Parameters

      • options: {
            client: TonClient;
            curve?: "unbalanced" | "balanced";
            dryRun?: boolean;
            isContractDeployedFn?: (address: Address) => Promise<boolean>;
            jettonWalletAddressGenerator0?: (owner: Address) => Promise<Address>;
            jettonWalletAddressGenerator1?: (owner: Address) => Promise<Address>;
            network: "testnet" | "mainnet";
            seed?: bigint;
            sender: Sender;
            shouldResume?: boolean;
            tokenMaster0?: OpenedContract<JettonMaster> | OpenedContract<SampleJetton>;
            tokenMaster1?: OpenedContract<JettonMaster> | OpenedContract<SampleJetton>;
            tokenType0?: "jetton" | "ton";
            tokenType1?: "jetton" | "ton";
        }

        Configuration options for creating the liquidity pool

        • client: TonClient

          TON client instance for blockchain interactions

        • Optionalcurve?: "unbalanced" | "balanced"

          DEX curve type (e.g., constant product, constant sum)

        • OptionaldryRun?: boolean

          If true, contracts are not actually deployed (for testing/validation)

        • OptionalisContractDeployedFn?: (address: Address) => Promise<boolean>

          Function to check if a contract is deployed at a given address, by default it will use the client's isContractDeployed method

        • OptionaljettonWalletAddressGenerator0?: (owner: Address) => Promise<Address>

          Optional custom function to generate wallet addresses for token0 instead of requesting it from the contract

        • OptionaljettonWalletAddressGenerator1?: (owner: Address) => Promise<Address>

          Optional custom function to generate wallet addresses for token1 instead of requesting it from the contract

        • network: "testnet" | "mainnet"

          The network to create the liquidity pool on, either 'testnet' or 'mainnet'

        • Optionalseed?: bigint

          Seed value for deterministic address generation

        • sender: Sender

          Sender account for deploying contracts

        • OptionalshouldResume?: boolean

          If true, attempts to resume from a previous deployment state

        • OptionaltokenMaster0?: OpenedContract<JettonMaster> | OpenedContract<SampleJetton>

          Optional Jetton master contract for the first token, if type is 'ton' it will be ignored

        • OptionaltokenMaster1?: OpenedContract<JettonMaster> | OpenedContract<SampleJetton>

          Optional Jetton master contract for the second token, if type is 'ton' it will be ignored

        • OptionaltokenType0?: "jetton" | "ton"

          Type identifier for the first token

        • OptionaltokenType1?: "jetton" | "ton"

          Type identifier for the second token

      Returns Promise<
          {
              activeDexes: ShardDex[];
              inactiveDexes: ShardDex[];
              pool: OpenedContract<LiquidityPoolWrapper>;
          },
      >

      Promise resolving to the created liquidity pool instance