@meteora-ag/dynamic-bonding-curve-sdk 1.2.2 → 1.2.3-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -83,6 +83,8 @@ var MAX_CURVE_POINT = 16;
83
83
  var PARTNER_SURPLUS_SHARE = 80;
84
84
  var SWAP_BUFFER_PERCENTAGE = 25;
85
85
  var MAX_SWALLOW_PERCENTAGE = 20;
86
+ var MAX_MIGRATION_FEE_PERCENTAGE = 50;
87
+ var MAX_CREATOR_MIGRATION_FEE_PERCENTAGE = 100;
86
88
  var SLOT_DURATION = 400;
87
89
  var TIMESTAMP_DURATION = 1e3;
88
90
  var DYNAMIC_BONDING_CURVE_PROGRAM_ID = new (0, _web3js.PublicKey)(
@@ -518,6 +520,19 @@ var getMigrationQuoteThresholdFromMigrationQuoteAmount = (migrationQuoteAmount,
518
520
  const migrationQuoteThreshold = migrationQuoteAmount.mul(new (0, _decimaljs2.default)(100)).div(new (0, _decimaljs2.default)(100).sub(new (0, _decimaljs2.default)(migrationFeePercent)));
519
521
  return migrationQuoteThreshold;
520
522
  };
523
+ var getMigrationMarketCap = (percentageSupplyOnMigration, totalTokenSupply, migrationQuoteThreshold, migrationFeePercentage) => {
524
+ if (migrationFeePercentage > MAX_MIGRATION_FEE_PERCENTAGE) {
525
+ throw new Error("Migration fee percentage cannot be greater than 50");
526
+ }
527
+ const migrationBaseAmount = new (0, _decimaljs2.default)(totalTokenSupply).mul(new (0, _decimaljs2.default)(percentageSupplyOnMigration)).div(new (0, _decimaljs2.default)(100));
528
+ const migrationQuoteAmount = getMigrationQuoteAmountFromMigrationQuoteThreshold(
529
+ new (0, _decimaljs2.default)(migrationQuoteThreshold),
530
+ migrationFeePercentage
531
+ );
532
+ const migrationPrice = migrationQuoteAmount.div(migrationBaseAmount);
533
+ const migrationMarketCap = migrationPrice.mul(new (0, _decimaljs2.default)(totalTokenSupply));
534
+ return migrationMarketCap;
535
+ };
521
536
  var getMigrationBaseToken = (migrationQuoteAmount, sqrtMigrationPrice, migrationOption) => {
522
537
  if (migrationOption == 0 /* MET_DAMM */) {
523
538
  const price = sqrtMigrationPrice.mul(sqrtMigrationPrice);
@@ -1267,11 +1282,15 @@ function validateConfigParameters(configParam) {
1267
1282
  if (!validateMigrationFeeOption(configParam.migrationFeeOption)) {
1268
1283
  throw new Error("Invalid migration fee option");
1269
1284
  }
1270
- if (configParam.migrationFee.feePercentage < 0 || configParam.migrationFee.feePercentage > 50) {
1271
- throw new Error("Migration fee percentage must be between 0 and 50");
1285
+ if (configParam.migrationFee.feePercentage < 0 || configParam.migrationFee.feePercentage > MAX_MIGRATION_FEE_PERCENTAGE) {
1286
+ throw new Error(
1287
+ `Migration fee percentage must be between 0 and ${MAX_MIGRATION_FEE_PERCENTAGE}`
1288
+ );
1272
1289
  }
1273
- if (configParam.migrationFee.creatorFeePercentage < 0 || configParam.migrationFee.creatorFeePercentage > 100) {
1274
- throw new Error("Creator fee percentage must be between 0 and 100");
1290
+ if (configParam.migrationFee.creatorFeePercentage < 0 || configParam.migrationFee.creatorFeePercentage > MAX_CREATOR_MIGRATION_FEE_PERCENTAGE) {
1291
+ throw new Error(
1292
+ `Creator fee percentage must be between 0 and ${MAX_CREATOR_MIGRATION_FEE_PERCENTAGE}`
1293
+ );
1275
1294
  }
1276
1295
  if (!validateTokenDecimals(configParam.tokenDecimal)) {
1277
1296
  throw new Error("Token decimal must be between 6 and 9");
@@ -21264,6 +21283,39 @@ async function swapQuote(virtualPool, config, swapBaseForQuote, amountIn, slippa
21264
21283
  }
21265
21284
  return result;
21266
21285
  }
21286
+ function calculateQuoteExactInAmount(config, virtualPool, currentPoint) {
21287
+ if (virtualPool.quoteReserve.gte(config.migrationQuoteThreshold)) {
21288
+ return new (0, _bnjs2.default)(0);
21289
+ }
21290
+ const amountInAfterFee = config.migrationQuoteThreshold.sub(
21291
+ virtualPool.quoteReserve
21292
+ );
21293
+ if (config.collectFeeMode === 0 /* OnlyQuote */) {
21294
+ const baseFeeNumerator = getCurrentBaseFeeNumerator(
21295
+ config.poolFees.baseFee,
21296
+ currentPoint,
21297
+ virtualPool.activationPoint
21298
+ );
21299
+ let totalFeeNumerator = baseFeeNumerator;
21300
+ if (config.poolFees.dynamicFee.initialized !== 0) {
21301
+ const variableFee = getVariableFee(
21302
+ config.poolFees.dynamicFee,
21303
+ virtualPool.volatilityTracker
21304
+ );
21305
+ totalFeeNumerator = SafeMath.add(totalFeeNumerator, variableFee);
21306
+ }
21307
+ totalFeeNumerator = _bnjs2.default.min(totalFeeNumerator, new (0, _bnjs2.default)(MAX_FEE_NUMERATOR));
21308
+ const denominator = new (0, _bnjs2.default)(FEE_DENOMINATOR).sub(totalFeeNumerator);
21309
+ return mulDiv(
21310
+ amountInAfterFee,
21311
+ new (0, _bnjs2.default)(FEE_DENOMINATOR),
21312
+ denominator,
21313
+ 0 /* Up */
21314
+ );
21315
+ } else {
21316
+ return amountInAfterFee;
21317
+ }
21318
+ }
21267
21319
 
21268
21320
  // src/services/state.ts
21269
21321
 
@@ -21327,6 +21379,15 @@ var StateService = class extends DynamicBondingCurveProgram {
21327
21379
  const filters = createProgramAccountFilter(configAddress, 72);
21328
21380
  return this.program.account.virtualPool.all(filters);
21329
21381
  }
21382
+ /**
21383
+ * Get all dynamic bonding curve pools by creator address
21384
+ * @param creatorAddress - The address of the creator
21385
+ * @returns Array of pool accounts with their addresses
21386
+ */
21387
+ async getPoolsByCreator(creatorAddress) {
21388
+ const filters = createProgramAccountFilter(creatorAddress, 104);
21389
+ return this.program.account.virtualPool.all(filters);
21390
+ }
21330
21391
  /**
21331
21392
  * Get pool by base mint
21332
21393
  * @param baseMint - The base mint address
@@ -21448,61 +21509,37 @@ var StateService = class extends DynamicBondingCurveProgram {
21448
21509
  };
21449
21510
  }
21450
21511
  /**
21451
- * Get fee metrics for a specific pool
21452
- * @param poolAddress - The address of the pool
21453
- * @returns Object containing current and total fee metrics
21454
- */
21455
- async getPoolCreatorFeeMetrics(poolAddress) {
21456
- const pool = await this.getPool(poolAddress);
21457
- if (!pool) {
21458
- throw new Error(`Pool not found: ${poolAddress.toString()}`);
21459
- }
21460
- return {
21461
- creatorBaseFee: pool.creatorBaseFee,
21462
- creatorQuoteFee: pool.creatorQuoteFee
21463
- };
21464
- }
21465
- /**
21466
- * Get fee metrics for a specific pool
21467
- * @param poolAddress - The address of the pool
21468
- * @returns Object containing current and total fee metrics
21469
- */
21470
- async getPoolPartnerFeeMetrics(poolAddress) {
21471
- const pool = await this.getPool(poolAddress);
21472
- if (!pool) {
21473
- throw new Error(`Pool not found: ${poolAddress.toString()}`);
21474
- }
21475
- return {
21476
- partnerBaseFee: pool.partnerBaseFee,
21477
- partnerQuoteFee: pool.partnerQuoteFee
21478
- };
21479
- }
21480
- /**
21481
- * Get all quote fees for pools linked to a specific config key
21512
+ * Get all fees for pools linked to a specific config key
21482
21513
  * @param configAddress - The address of the pool config
21483
21514
  * @returns Array of pools with their quote fees
21484
21515
  */
21485
- async getPoolsQuoteFeesByConfig(configAddress) {
21516
+ async getPoolsFeesByConfig(configAddress) {
21486
21517
  const filteredPools = await this.getPoolsByConfig(configAddress);
21487
21518
  return filteredPools.map((pool) => ({
21488
21519
  poolAddress: pool.publicKey,
21520
+ partnerBaseFee: pool.account.partnerBaseFee,
21489
21521
  partnerQuoteFee: pool.account.partnerQuoteFee,
21522
+ creatorBaseFee: pool.account.creatorBaseFee,
21490
21523
  creatorQuoteFee: pool.account.creatorQuoteFee,
21524
+ totalTradingBaseFee: pool.account.metrics.totalTradingBaseFee,
21491
21525
  totalTradingQuoteFee: pool.account.metrics.totalTradingQuoteFee
21492
21526
  }));
21493
21527
  }
21494
21528
  /**
21495
- * Get all base fees for pools linked to a specific config key
21496
- * @param configAddress - The address of the pool config
21529
+ * Get all fees for pools linked to a specific creator
21530
+ * @param creatorAddress - The address of the creator
21497
21531
  * @returns Array of pools with their base fees
21498
21532
  */
21499
- async getPoolsBaseFeesByConfig(configAddress) {
21500
- const filteredPools = await this.getPoolsByConfig(configAddress);
21533
+ async getPoolsFeesByCreator(creatorAddress) {
21534
+ const filteredPools = await this.getPoolsByCreator(creatorAddress);
21501
21535
  return filteredPools.map((pool) => ({
21502
21536
  poolAddress: pool.publicKey,
21503
21537
  partnerBaseFee: pool.account.partnerBaseFee,
21538
+ partnerQuoteFee: pool.account.partnerQuoteFee,
21504
21539
  creatorBaseFee: pool.account.creatorBaseFee,
21505
- totalTradingBaseFee: pool.account.metrics.totalTradingBaseFee
21540
+ creatorQuoteFee: pool.account.creatorQuoteFee,
21541
+ totalTradingBaseFee: pool.account.metrics.totalTradingBaseFee,
21542
+ totalTradingQuoteFee: pool.account.metrics.totalTradingQuoteFee
21506
21543
  }));
21507
21544
  }
21508
21545
  };
@@ -22062,6 +22099,17 @@ var PoolService = class extends DynamicBondingCurveProgram {
22062
22099
  currentPoint
22063
22100
  );
22064
22101
  }
22102
+ swapQuoteExactIn(swapQuoteExactInParam) {
22103
+ const { virtualPool, config, currentPoint } = swapQuoteExactInParam;
22104
+ const requiredQuoteAmount = calculateQuoteExactInAmount(
22105
+ config,
22106
+ virtualPool,
22107
+ currentPoint
22108
+ );
22109
+ return {
22110
+ exactAmountIn: requiredQuoteAmount
22111
+ };
22112
+ }
22065
22113
  };
22066
22114
 
22067
22115
  // src/services/migration.ts
@@ -23635,5 +23683,9 @@ var DynamicBondingCurveClient = class _DynamicBondingCurveClient {
23635
23683
 
23636
23684
 
23637
23685
 
23638
- exports.ActivationType = ActivationType; exports.BASE_ADDRESS = BASE_ADDRESS; exports.BASIS_POINT_MAX = BASIS_POINT_MAX; exports.BIN_STEP_BPS_DEFAULT = BIN_STEP_BPS_DEFAULT; exports.BIN_STEP_BPS_U128_DEFAULT = BIN_STEP_BPS_U128_DEFAULT; exports.CollectFeeMode = CollectFeeMode; exports.CreatorService = CreatorService; exports.DAMM_V1_MIGRATION_FEE_ADDRESS = DAMM_V1_MIGRATION_FEE_ADDRESS; exports.DAMM_V1_PROGRAM_ID = DAMM_V1_PROGRAM_ID; exports.DAMM_V2_MIGRATION_FEE_ADDRESS = DAMM_V2_MIGRATION_FEE_ADDRESS; exports.DAMM_V2_PROGRAM_ID = DAMM_V2_PROGRAM_ID; exports.DYNAMIC_BONDING_CURVE_PROGRAM_ID = DYNAMIC_BONDING_CURVE_PROGRAM_ID; exports.DYNAMIC_FEE_DECAY_PERIOD_DEFAULT = DYNAMIC_FEE_DECAY_PERIOD_DEFAULT; exports.DYNAMIC_FEE_FILTER_PERIOD_DEFAULT = DYNAMIC_FEE_FILTER_PERIOD_DEFAULT; exports.DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT = DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT; exports.DynamicBondingCurveClient = DynamicBondingCurveClient; exports.DynamicBondingCurveProgram = DynamicBondingCurveProgram; exports.FEE_DENOMINATOR = FEE_DENOMINATOR; exports.FeeSchedulerMode = FeeSchedulerMode; exports.GetFeeMode = GetFeeMode; exports.LOCKER_PROGRAM_ID = LOCKER_PROGRAM_ID; exports.MAX_CURVE_POINT = MAX_CURVE_POINT; exports.MAX_FEE_NUMERATOR = MAX_FEE_NUMERATOR; exports.MAX_PRICE_CHANGE_BPS_DEFAULT = MAX_PRICE_CHANGE_BPS_DEFAULT; exports.MAX_SQRT_PRICE = MAX_SQRT_PRICE; exports.MAX_SWALLOW_PERCENTAGE = MAX_SWALLOW_PERCENTAGE; exports.METAPLEX_PROGRAM_ID = METAPLEX_PROGRAM_ID; exports.MIN_SQRT_PRICE = MIN_SQRT_PRICE; exports.MigrationFeeOption = MigrationFeeOption; exports.MigrationOption = MigrationOption; exports.MigrationService = MigrationService; exports.OFFSET = OFFSET; exports.ONE_Q64 = ONE_Q64; exports.PARTNER_SURPLUS_SHARE = PARTNER_SURPLUS_SHARE; exports.PartnerService = PartnerService; exports.PoolService = PoolService; exports.RESOLUTION = RESOLUTION; exports.Rounding = Rounding; exports.SLOT_DURATION = SLOT_DURATION; exports.SWAP_BUFFER_PERCENTAGE = SWAP_BUFFER_PERCENTAGE; exports.TIMESTAMP_DURATION = TIMESTAMP_DURATION; exports.TokenDecimal = TokenDecimal; exports.TokenType = TokenType; exports.TokenUpdateAuthorityOption = TokenUpdateAuthorityOption; exports.TradeDirection = TradeDirection; exports.U64_MAX = U64_MAX; exports.VAULT_PROGRAM_ID = VAULT_PROGRAM_ID; exports.bpsToFeeNumerator = bpsToFeeNumerator; exports.buildCurve = buildCurve; exports.buildCurveWithLiquidityWeights = buildCurveWithLiquidityWeights; exports.buildCurveWithMarketCap = buildCurveWithMarketCap; exports.buildCurveWithTwoSegments = buildCurveWithTwoSegments; exports.cleanUpTokenAccountTx = cleanUpTokenAccountTx; exports.convertDecimalToBN = convertDecimalToBN; exports.convertToLamports = convertToLamports; exports.createDammV1Program = createDammV1Program; exports.createDammV2Program = createDammV2Program; exports.createDbcProgram = createDbcProgram; exports.createInitializePermissionlessDynamicVaultIx = createInitializePermissionlessDynamicVaultIx; exports.createLockEscrowIx = createLockEscrowIx; exports.createProgramAccountFilter = createProgramAccountFilter; exports.createVaultProgram = createVaultProgram; exports.deriveBaseKeyForLocker = deriveBaseKeyForLocker; exports.deriveDammV1EventAuthority = deriveDammV1EventAuthority; exports.deriveDammV1LockEscrowAddress = deriveDammV1LockEscrowAddress; exports.deriveDammV1LpMintAddress = deriveDammV1LpMintAddress; exports.deriveDammV1MigrationMetadataAddress = deriveDammV1MigrationMetadataAddress; exports.deriveDammV1PoolAddress = deriveDammV1PoolAddress; exports.deriveDammV1PoolAuthority = deriveDammV1PoolAuthority; exports.deriveDammV1ProtocolFeeAddress = deriveDammV1ProtocolFeeAddress; exports.deriveDammV1VaultLPAddress = deriveDammV1VaultLPAddress; exports.deriveDammV2EventAuthority = deriveDammV2EventAuthority; exports.deriveDammV2LockEscrowAddress = deriveDammV2LockEscrowAddress; exports.deriveDammV2MigrationMetadataAddress = deriveDammV2MigrationMetadataAddress; exports.deriveDammV2PoolAddress = deriveDammV2PoolAddress; exports.deriveDammV2PoolAuthority = deriveDammV2PoolAuthority; exports.deriveDammV2TokenVaultAddress = deriveDammV2TokenVaultAddress; exports.deriveDbcEventAuthority = deriveDbcEventAuthority; exports.deriveDbcPoolAddress = deriveDbcPoolAddress; exports.deriveDbcPoolAuthority = deriveDbcPoolAuthority; exports.deriveDbcPoolMetadata = deriveDbcPoolMetadata; exports.deriveDbcTokenVaultAddress = deriveDbcTokenVaultAddress; exports.deriveEscrow = deriveEscrow; exports.deriveLockerEventAuthority = deriveLockerEventAuthority; exports.deriveMintMetadata = deriveMintMetadata; exports.derivePartnerMetadata = derivePartnerMetadata; exports.derivePositionAddress = derivePositionAddress; exports.derivePositionNftAccount = derivePositionNftAccount; exports.deriveTokenVaultKey = deriveTokenVaultKey; exports.deriveVaultAddress = deriveVaultAddress; exports.deriveVaultLpMintAddress = deriveVaultLpMintAddress; exports.deriveVaultPdas = deriveVaultPdas; exports.feeNumeratorToBps = feeNumeratorToBps; exports.findAssociatedTokenAddress = findAssociatedTokenAddress; exports.fromDecimalToBN = fromDecimalToBN; exports.getAccountCreationTimestamp = getAccountCreationTimestamp; exports.getAccountCreationTimestamps = getAccountCreationTimestamps; exports.getAccountData = getAccountData; exports.getBaseFeeParams = getBaseFeeParams; exports.getBaseTokenForSwap = getBaseTokenForSwap; exports.getCurrentBaseFeeNumerator = getCurrentBaseFeeNumerator; exports.getDeltaAmountBase = getDeltaAmountBase; exports.getDeltaAmountBaseUnsigned = getDeltaAmountBaseUnsigned; exports.getDeltaAmountQuoteUnsigned = getDeltaAmountQuoteUnsigned; exports.getDynamicFeeParams = getDynamicFeeParams; exports.getFeeInPeriod = getFeeInPeriod; exports.getFeeMode = getFeeMode; exports.getFeeOnAmount = getFeeOnAmount; exports.getFirstCurve = getFirstCurve; exports.getFirstKey = getFirstKey; exports.getInitialLiquidityFromDeltaBase = getInitialLiquidityFromDeltaBase; exports.getInitialLiquidityFromDeltaQuote = getInitialLiquidityFromDeltaQuote; exports.getInitializeAmounts = getInitializeAmounts; exports.getLiquidity = getLiquidity; exports.getLockedVestingParams = getLockedVestingParams; exports.getMigrationBaseToken = getMigrationBaseToken; exports.getMigrationQuoteAmount = getMigrationQuoteAmount; exports.getMigrationQuoteAmountFromMigrationQuoteThreshold = getMigrationQuoteAmountFromMigrationQuoteThreshold; exports.getMigrationQuoteThresholdFromMigrationQuoteAmount = getMigrationQuoteThresholdFromMigrationQuoteAmount; exports.getMigrationThresholdPrice = getMigrationThresholdPrice; exports.getMinBaseFeeBps = getMinBaseFeeBps; exports.getNextSqrtPriceFromAmountBaseRoundingUp = getNextSqrtPriceFromAmountBaseRoundingUp; exports.getNextSqrtPriceFromAmountQuoteRoundingDown = getNextSqrtPriceFromAmountQuoteRoundingDown; exports.getNextSqrtPriceFromInput = getNextSqrtPriceFromInput; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPercentageSupplyOnMigration = getPercentageSupplyOnMigration; exports.getPriceFromSqrtPrice = getPriceFromSqrtPrice; exports.getSecondKey = getSecondKey; exports.getSqrtPriceFromMarketCap = getSqrtPriceFromMarketCap; exports.getSqrtPriceFromPrice = getSqrtPriceFromPrice; exports.getSwapAmountFromBaseToQuote = getSwapAmountFromBaseToQuote; exports.getSwapAmountFromQuoteToBase = getSwapAmountFromQuoteToBase; exports.getSwapAmountWithBuffer = getSwapAmountWithBuffer; exports.getSwapResult = getSwapResult; exports.getTokenDecimals = getTokenDecimals; exports.getTokenProgram = getTokenProgram; exports.getTokenType = getTokenType; exports.getTotalSupplyFromCurve = getTotalSupplyFromCurve; exports.getTotalTokenSupply = getTotalTokenSupply; exports.getTotalVestingAmount = getTotalVestingAmount; exports.getTwoCurve = getTwoCurve; exports.getVariableFee = getVariableFee; exports.isDefaultLockedVesting = isDefaultLockedVesting; exports.isNativeSol = isNativeSol; exports.prepareTokenAccountTx = prepareTokenAccountTx; exports.swapQuote = swapQuote; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.validateActivationType = validateActivationType; exports.validateBalance = validateBalance; exports.validateBaseTokenType = validateBaseTokenType; exports.validateCollectFeeMode = validateCollectFeeMode; exports.validateConfigParameters = validateConfigParameters; exports.validateCurve = validateCurve; exports.validateLPPercentages = validateLPPercentages; exports.validateMigrationAndTokenType = validateMigrationAndTokenType; exports.validateMigrationFeeOption = validateMigrationFeeOption; exports.validatePoolFees = validatePoolFees; exports.validateSwapAmount = validateSwapAmount; exports.validateTokenDecimals = validateTokenDecimals; exports.validateTokenSupply = validateTokenSupply; exports.validateTokenUpdateAuthorityOptions = validateTokenUpdateAuthorityOptions; exports.wrapSOLInstruction = wrapSOLInstruction;
23686
+
23687
+
23688
+
23689
+
23690
+ exports.ActivationType = ActivationType; exports.BASE_ADDRESS = BASE_ADDRESS; exports.BASIS_POINT_MAX = BASIS_POINT_MAX; exports.BIN_STEP_BPS_DEFAULT = BIN_STEP_BPS_DEFAULT; exports.BIN_STEP_BPS_U128_DEFAULT = BIN_STEP_BPS_U128_DEFAULT; exports.CollectFeeMode = CollectFeeMode; exports.CreatorService = CreatorService; exports.DAMM_V1_MIGRATION_FEE_ADDRESS = DAMM_V1_MIGRATION_FEE_ADDRESS; exports.DAMM_V1_PROGRAM_ID = DAMM_V1_PROGRAM_ID; exports.DAMM_V2_MIGRATION_FEE_ADDRESS = DAMM_V2_MIGRATION_FEE_ADDRESS; exports.DAMM_V2_PROGRAM_ID = DAMM_V2_PROGRAM_ID; exports.DYNAMIC_BONDING_CURVE_PROGRAM_ID = DYNAMIC_BONDING_CURVE_PROGRAM_ID; exports.DYNAMIC_FEE_DECAY_PERIOD_DEFAULT = DYNAMIC_FEE_DECAY_PERIOD_DEFAULT; exports.DYNAMIC_FEE_FILTER_PERIOD_DEFAULT = DYNAMIC_FEE_FILTER_PERIOD_DEFAULT; exports.DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT = DYNAMIC_FEE_REDUCTION_FACTOR_DEFAULT; exports.DynamicBondingCurveClient = DynamicBondingCurveClient; exports.DynamicBondingCurveProgram = DynamicBondingCurveProgram; exports.FEE_DENOMINATOR = FEE_DENOMINATOR; exports.FeeSchedulerMode = FeeSchedulerMode; exports.GetFeeMode = GetFeeMode; exports.LOCKER_PROGRAM_ID = LOCKER_PROGRAM_ID; exports.MAX_CREATOR_MIGRATION_FEE_PERCENTAGE = MAX_CREATOR_MIGRATION_FEE_PERCENTAGE; exports.MAX_CURVE_POINT = MAX_CURVE_POINT; exports.MAX_FEE_NUMERATOR = MAX_FEE_NUMERATOR; exports.MAX_MIGRATION_FEE_PERCENTAGE = MAX_MIGRATION_FEE_PERCENTAGE; exports.MAX_PRICE_CHANGE_BPS_DEFAULT = MAX_PRICE_CHANGE_BPS_DEFAULT; exports.MAX_SQRT_PRICE = MAX_SQRT_PRICE; exports.MAX_SWALLOW_PERCENTAGE = MAX_SWALLOW_PERCENTAGE; exports.METAPLEX_PROGRAM_ID = METAPLEX_PROGRAM_ID; exports.MIN_SQRT_PRICE = MIN_SQRT_PRICE; exports.MigrationFeeOption = MigrationFeeOption; exports.MigrationOption = MigrationOption; exports.MigrationService = MigrationService; exports.OFFSET = OFFSET; exports.ONE_Q64 = ONE_Q64; exports.PARTNER_SURPLUS_SHARE = PARTNER_SURPLUS_SHARE; exports.PartnerService = PartnerService; exports.PoolService = PoolService; exports.RESOLUTION = RESOLUTION; exports.Rounding = Rounding; exports.SLOT_DURATION = SLOT_DURATION; exports.SWAP_BUFFER_PERCENTAGE = SWAP_BUFFER_PERCENTAGE; exports.TIMESTAMP_DURATION = TIMESTAMP_DURATION; exports.TokenDecimal = TokenDecimal; exports.TokenType = TokenType; exports.TokenUpdateAuthorityOption = TokenUpdateAuthorityOption; exports.TradeDirection = TradeDirection; exports.U64_MAX = U64_MAX; exports.VAULT_PROGRAM_ID = VAULT_PROGRAM_ID; exports.bpsToFeeNumerator = bpsToFeeNumerator; exports.buildCurve = buildCurve; exports.buildCurveWithLiquidityWeights = buildCurveWithLiquidityWeights; exports.buildCurveWithMarketCap = buildCurveWithMarketCap; exports.buildCurveWithTwoSegments = buildCurveWithTwoSegments; exports.calculateQuoteExactInAmount = calculateQuoteExactInAmount; exports.cleanUpTokenAccountTx = cleanUpTokenAccountTx; exports.convertDecimalToBN = convertDecimalToBN; exports.convertToLamports = convertToLamports; exports.createDammV1Program = createDammV1Program; exports.createDammV2Program = createDammV2Program; exports.createDbcProgram = createDbcProgram; exports.createInitializePermissionlessDynamicVaultIx = createInitializePermissionlessDynamicVaultIx; exports.createLockEscrowIx = createLockEscrowIx; exports.createProgramAccountFilter = createProgramAccountFilter; exports.createVaultProgram = createVaultProgram; exports.deriveBaseKeyForLocker = deriveBaseKeyForLocker; exports.deriveDammV1EventAuthority = deriveDammV1EventAuthority; exports.deriveDammV1LockEscrowAddress = deriveDammV1LockEscrowAddress; exports.deriveDammV1LpMintAddress = deriveDammV1LpMintAddress; exports.deriveDammV1MigrationMetadataAddress = deriveDammV1MigrationMetadataAddress; exports.deriveDammV1PoolAddress = deriveDammV1PoolAddress; exports.deriveDammV1PoolAuthority = deriveDammV1PoolAuthority; exports.deriveDammV1ProtocolFeeAddress = deriveDammV1ProtocolFeeAddress; exports.deriveDammV1VaultLPAddress = deriveDammV1VaultLPAddress; exports.deriveDammV2EventAuthority = deriveDammV2EventAuthority; exports.deriveDammV2LockEscrowAddress = deriveDammV2LockEscrowAddress; exports.deriveDammV2MigrationMetadataAddress = deriveDammV2MigrationMetadataAddress; exports.deriveDammV2PoolAddress = deriveDammV2PoolAddress; exports.deriveDammV2PoolAuthority = deriveDammV2PoolAuthority; exports.deriveDammV2TokenVaultAddress = deriveDammV2TokenVaultAddress; exports.deriveDbcEventAuthority = deriveDbcEventAuthority; exports.deriveDbcPoolAddress = deriveDbcPoolAddress; exports.deriveDbcPoolAuthority = deriveDbcPoolAuthority; exports.deriveDbcPoolMetadata = deriveDbcPoolMetadata; exports.deriveDbcTokenVaultAddress = deriveDbcTokenVaultAddress; exports.deriveEscrow = deriveEscrow; exports.deriveLockerEventAuthority = deriveLockerEventAuthority; exports.deriveMintMetadata = deriveMintMetadata; exports.derivePartnerMetadata = derivePartnerMetadata; exports.derivePositionAddress = derivePositionAddress; exports.derivePositionNftAccount = derivePositionNftAccount; exports.deriveTokenVaultKey = deriveTokenVaultKey; exports.deriveVaultAddress = deriveVaultAddress; exports.deriveVaultLpMintAddress = deriveVaultLpMintAddress; exports.deriveVaultPdas = deriveVaultPdas; exports.feeNumeratorToBps = feeNumeratorToBps; exports.findAssociatedTokenAddress = findAssociatedTokenAddress; exports.fromDecimalToBN = fromDecimalToBN; exports.getAccountCreationTimestamp = getAccountCreationTimestamp; exports.getAccountCreationTimestamps = getAccountCreationTimestamps; exports.getAccountData = getAccountData; exports.getBaseFeeParams = getBaseFeeParams; exports.getBaseTokenForSwap = getBaseTokenForSwap; exports.getCurrentBaseFeeNumerator = getCurrentBaseFeeNumerator; exports.getDeltaAmountBase = getDeltaAmountBase; exports.getDeltaAmountBaseUnsigned = getDeltaAmountBaseUnsigned; exports.getDeltaAmountQuoteUnsigned = getDeltaAmountQuoteUnsigned; exports.getDynamicFeeParams = getDynamicFeeParams; exports.getFeeInPeriod = getFeeInPeriod; exports.getFeeMode = getFeeMode; exports.getFeeOnAmount = getFeeOnAmount; exports.getFirstCurve = getFirstCurve; exports.getFirstKey = getFirstKey; exports.getInitialLiquidityFromDeltaBase = getInitialLiquidityFromDeltaBase; exports.getInitialLiquidityFromDeltaQuote = getInitialLiquidityFromDeltaQuote; exports.getInitializeAmounts = getInitializeAmounts; exports.getLiquidity = getLiquidity; exports.getLockedVestingParams = getLockedVestingParams; exports.getMigrationBaseToken = getMigrationBaseToken; exports.getMigrationMarketCap = getMigrationMarketCap; exports.getMigrationQuoteAmount = getMigrationQuoteAmount; exports.getMigrationQuoteAmountFromMigrationQuoteThreshold = getMigrationQuoteAmountFromMigrationQuoteThreshold; exports.getMigrationQuoteThresholdFromMigrationQuoteAmount = getMigrationQuoteThresholdFromMigrationQuoteAmount; exports.getMigrationThresholdPrice = getMigrationThresholdPrice; exports.getMinBaseFeeBps = getMinBaseFeeBps; exports.getNextSqrtPriceFromAmountBaseRoundingUp = getNextSqrtPriceFromAmountBaseRoundingUp; exports.getNextSqrtPriceFromAmountQuoteRoundingDown = getNextSqrtPriceFromAmountQuoteRoundingDown; exports.getNextSqrtPriceFromInput = getNextSqrtPriceFromInput; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPercentageSupplyOnMigration = getPercentageSupplyOnMigration; exports.getPriceFromSqrtPrice = getPriceFromSqrtPrice; exports.getSecondKey = getSecondKey; exports.getSqrtPriceFromMarketCap = getSqrtPriceFromMarketCap; exports.getSqrtPriceFromPrice = getSqrtPriceFromPrice; exports.getSwapAmountFromBaseToQuote = getSwapAmountFromBaseToQuote; exports.getSwapAmountFromQuoteToBase = getSwapAmountFromQuoteToBase; exports.getSwapAmountWithBuffer = getSwapAmountWithBuffer; exports.getSwapResult = getSwapResult; exports.getTokenDecimals = getTokenDecimals; exports.getTokenProgram = getTokenProgram; exports.getTokenType = getTokenType; exports.getTotalSupplyFromCurve = getTotalSupplyFromCurve; exports.getTotalTokenSupply = getTotalTokenSupply; exports.getTotalVestingAmount = getTotalVestingAmount; exports.getTwoCurve = getTwoCurve; exports.getVariableFee = getVariableFee; exports.isDefaultLockedVesting = isDefaultLockedVesting; exports.isNativeSol = isNativeSol; exports.prepareTokenAccountTx = prepareTokenAccountTx; exports.swapQuote = swapQuote; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.validateActivationType = validateActivationType; exports.validateBalance = validateBalance; exports.validateBaseTokenType = validateBaseTokenType; exports.validateCollectFeeMode = validateCollectFeeMode; exports.validateConfigParameters = validateConfigParameters; exports.validateCurve = validateCurve; exports.validateLPPercentages = validateLPPercentages; exports.validateMigrationAndTokenType = validateMigrationAndTokenType; exports.validateMigrationFeeOption = validateMigrationFeeOption; exports.validatePoolFees = validatePoolFees; exports.validateSwapAmount = validateSwapAmount; exports.validateTokenDecimals = validateTokenDecimals; exports.validateTokenSupply = validateTokenSupply; exports.validateTokenUpdateAuthorityOptions = validateTokenUpdateAuthorityOptions; exports.wrapSOLInstruction = wrapSOLInstruction;
23639
23691
  //# sourceMappingURL=index.cjs.map