@meteora-ag/dynamic-bonding-curve-sdk 1.5.11 → 1.5.13

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
@@ -590,7 +590,7 @@ function feeNumeratorToBps(feeNumerator) {
590
590
 
591
591
 
592
592
 
593
- var getOrCreateATAInstruction = async (connection, tokenMint, owner, payer, allowOwnerOffCurve = true, tokenProgram) => {
593
+ var getOrCreateATAInstruction = async (connection, tokenMint, owner, payer, allowOwnerOffCurve = true, tokenProgram, commitment = "confirmed") => {
594
594
  const toAccount = _spltoken.getAssociatedTokenAddressSync.call(void 0,
595
595
  tokenMint,
596
596
  owner,
@@ -598,7 +598,7 @@ var getOrCreateATAInstruction = async (connection, tokenMint, owner, payer, allo
598
598
  tokenProgram
599
599
  );
600
600
  try {
601
- await _spltoken.getAccount.call(void 0, connection, toAccount);
601
+ await _spltoken.getAccount.call(void 0, connection, toAccount, commitment, tokenProgram);
602
602
  return { ataPubkey: toAccount, ix: void 0 };
603
603
  } catch (e) {
604
604
  if (e instanceof _spltoken.TokenAccountNotFoundError || e instanceof _spltoken.TokenInvalidAccountOwnerError) {
@@ -685,7 +685,7 @@ async function getTokenType(connection, tokenMint) {
685
685
  }
686
686
  return accountInfo.owner.equals(_spltoken.TOKEN_PROGRAM_ID) ? 0 /* SPLToken */ : 1 /* Token2022 */;
687
687
  }
688
- async function prepareTokenAccountTx(connection, owner, payer, tokenMint, amount, tokenProgram) {
688
+ async function prepareTokenAccountTx(connection, owner, payer, tokenMint, amount, tokenProgram, commitment = "confirmed") {
689
689
  const instructions = [];
690
690
  const { ataPubkey: tokenAccount, ix: createAtaIx } = await getOrCreateATAInstruction(
691
691
  connection,
@@ -693,7 +693,8 @@ async function prepareTokenAccountTx(connection, owner, payer, tokenMint, amount
693
693
  owner,
694
694
  payer,
695
695
  true,
696
- tokenProgram
696
+ tokenProgram,
697
+ commitment
697
698
  );
698
699
  createAtaIx && instructions.push(createAtaIx);
699
700
  if (tokenMint.equals(_spltoken.NATIVE_MINT)) {
@@ -2861,32 +2862,20 @@ var getTwoCurve = (migrationSqrtPrice, midSqrtPrice, initialSqrtPrice, swapAmoun
2861
2862
  function checkRateLimiterApplied(baseFeeMode, swapBaseForQuote, currentPoint, activationPoint, maxLimiterDuration) {
2862
2863
  return baseFeeMode === 2 /* RateLimiter */ && !swapBaseForQuote && currentPoint.gte(activationPoint) && currentPoint.lte(activationPoint.add(maxLimiterDuration));
2863
2864
  }
2864
- function getBaseFeeParams(baseFeeParams, tokenQuoteDecimal, activationType) {
2865
+ function getBaseFeeParams(baseFeeParams) {
2865
2866
  if (baseFeeParams.baseFeeMode === 2 /* RateLimiter */) {
2866
- const {
2867
- baseFeeBps,
2868
- feeIncrementBps,
2869
- referenceAmount,
2870
- maxLimiterDuration
2871
- } = baseFeeParams.rateLimiterParam;
2872
- return getRateLimiterParams(
2873
- baseFeeBps,
2874
- feeIncrementBps,
2875
- referenceAmount,
2876
- maxLimiterDuration,
2877
- tokenQuoteDecimal,
2878
- activationType
2879
- );
2880
- } else {
2881
- const { startingFeeBps, endingFeeBps, numberOfPeriod, totalDuration } = baseFeeParams.feeSchedulerParam;
2882
- return getFeeSchedulerParams(
2883
- startingFeeBps,
2884
- endingFeeBps,
2885
- baseFeeParams.baseFeeMode,
2886
- numberOfPeriod,
2887
- totalDuration
2867
+ throw new Error(
2868
+ "BaseFeeMode.RateLimiter is deprecated. New configs must use FeeSchedulerLinear or FeeSchedulerExponential."
2888
2869
  );
2889
2870
  }
2871
+ const { startingFeeBps, endingFeeBps, numberOfPeriod, totalDuration } = baseFeeParams.feeSchedulerParam;
2872
+ return getFeeSchedulerParams(
2873
+ startingFeeBps,
2874
+ endingFeeBps,
2875
+ baseFeeParams.baseFeeMode,
2876
+ numberOfPeriod,
2877
+ totalDuration
2878
+ );
2890
2879
  }
2891
2880
  function getQuoteReserveFromNextSqrtPrice(nextSqrtPrice, config) {
2892
2881
  let totalAmount = new (0, _bnjs2.default)(0);
@@ -2931,7 +2920,9 @@ function getMigratedPoolFeeParams(migrationOption, migrationFeeOption, migratedP
2931
2920
  compoundingFeeBps: 0
2932
2921
  };
2933
2922
  if (migrationOption === 0 /* MET_DAMM */) {
2934
- return defaultResult;
2923
+ throw new Error(
2924
+ "MigrationOption.MET_DAMM (DAMM v1) is deprecated. New configs must use MigrationOption.MET_DAMM_V2."
2925
+ );
2935
2926
  }
2936
2927
  if (migrationOption === 1 /* MET_DAMM_V2 */) {
2937
2928
  const baseFeeMode = _nullishCoalesce(_optionalChain([migratedPoolFee, 'optionalAccess', _3 => _3.baseFeeMode]), () => ( 0)) /* FeeTimeSchedulerLinear */;
@@ -3077,7 +3068,8 @@ var SEED = Object.freeze({
3077
3068
  VIRTUAL_POOL_METADATA: "virtual_pool_metadata",
3078
3069
  ESCROW: "escrow",
3079
3070
  BASE_LOCKER: "base_locker",
3080
- VAULT: "vault"
3071
+ VAULT: "vault",
3072
+ TOKEN_BADGE: "token_badge"
3081
3073
  });
3082
3074
  function deriveDbcEventAuthority() {
3083
3075
  const [eventAuthority] = _web3js.PublicKey.findProgramAddressSync(
@@ -3316,6 +3308,24 @@ function deriveBaseKeyForLocker(virtualPool) {
3316
3308
  DYNAMIC_BONDING_CURVE_PROGRAM_ID
3317
3309
  )[0];
3318
3310
  }
3311
+ function deriveTokenBadgeAddress(tokenMint) {
3312
+ return _web3js.PublicKey.findProgramAddressSync(
3313
+ [Buffer.from(SEED.TOKEN_BADGE), tokenMint.toBuffer()],
3314
+ DYNAMIC_BONDING_CURVE_PROGRAM_ID
3315
+ )[0];
3316
+ }
3317
+ function getTokenBadgeRemainingAccounts(tokenBadge) {
3318
+ if (!tokenBadge) {
3319
+ return [];
3320
+ }
3321
+ return [
3322
+ {
3323
+ pubkey: tokenBadge,
3324
+ isSigner: false,
3325
+ isWritable: false
3326
+ }
3327
+ ];
3328
+ }
3319
3329
 
3320
3330
  // src/helpers/validation.ts
3321
3331
 
@@ -3328,6 +3338,18 @@ function deriveBaseKeyForLocker(virtualPool) {
3328
3338
 
3329
3339
  var DAMM_V2_MIN_FEE_NUMERATOR = 1e5;
3330
3340
  var DAMM_V2_MAX_FEE_NUMERATOR = 99e7;
3341
+ function assertConfigAllowsNewPool(params) {
3342
+ if (params.baseFeeMode === 2 /* RateLimiter */) {
3343
+ throw new Error(
3344
+ "BaseFeeMode.RateLimiter is deprecated. New configs and pools must use FeeSchedulerLinear or FeeSchedulerExponential. Existing rate-limiter pools are unaffected."
3345
+ );
3346
+ }
3347
+ if (params.migrationOption === 0 /* MET_DAMM */) {
3348
+ throw new Error(
3349
+ "MigrationOption.MET_DAMM (DAMM v1) is deprecated. New configs and pools must use MigrationOption.MET_DAMM_V2. Existing DAMM v1 pools can still migrate."
3350
+ );
3351
+ }
3352
+ }
3331
3353
  function validatePoolFees(poolFees, collectFeeMode, activationType) {
3332
3354
  if (!poolFees) return false;
3333
3355
  if (poolFees.baseFee) {
@@ -3702,6 +3724,10 @@ function validateConfigParameters(configParam, options = false) {
3702
3724
  isTransferHook: _nullishCoalesce(options.isTransferHook, () => ( false)),
3703
3725
  transferHookProgram: options.transferHookProgram
3704
3726
  };
3727
+ assertConfigAllowsNewPool({
3728
+ baseFeeMode: _optionalChain([configParam, 'access', _25 => _25.poolFees, 'optionalAccess', _26 => _26.baseFee, 'optionalAccess', _27 => _27.baseFeeMode]),
3729
+ migrationOption: configParam.migrationOption
3730
+ });
3705
3731
  if (!configParam.poolFees) {
3706
3732
  throw new Error("Pool fees are required");
3707
3733
  }
@@ -3761,8 +3787,8 @@ function validateConfigParameters(configParam, options = false) {
3761
3787
  if (!validateTokenDecimals(configParam.tokenDecimal)) {
3762
3788
  throw new Error("Token decimal must be between 6 and 9");
3763
3789
  }
3764
- const partnerVestingPercentage = _nullishCoalesce(_optionalChain([configParam, 'access', _25 => _25.partnerLiquidityVestingInfo, 'optionalAccess', _26 => _26.vestingPercentage]), () => ( 0));
3765
- const creatorVestingPercentage = _nullishCoalesce(_optionalChain([configParam, 'access', _27 => _27.creatorLiquidityVestingInfo, 'optionalAccess', _28 => _28.vestingPercentage]), () => ( 0));
3790
+ const partnerVestingPercentage = _nullishCoalesce(_optionalChain([configParam, 'access', _28 => _28.partnerLiquidityVestingInfo, 'optionalAccess', _29 => _29.vestingPercentage]), () => ( 0));
3791
+ const creatorVestingPercentage = _nullishCoalesce(_optionalChain([configParam, 'access', _30 => _30.creatorLiquidityVestingInfo, 'optionalAccess', _31 => _31.vestingPercentage]), () => ( 0));
3766
3792
  if (!validateLPPercentages(
3767
3793
  configParam.partnerLiquidityPercentage,
3768
3794
  configParam.partnerPermanentLockedLiquidityPercentage,
@@ -4093,11 +4119,7 @@ function buildCurve(params) {
4093
4119
  creatorLiquidityPercentage,
4094
4120
  creatorLiquidityVestingInfoParams
4095
4121
  } = liquidityDistribution;
4096
- const baseFee = getBaseFeeParams(
4097
- baseFeeParams,
4098
- tokenQuoteDecimal,
4099
- activationType
4100
- );
4122
+ const baseFee = getBaseFeeParams(baseFeeParams);
4101
4123
  const {
4102
4124
  totalLockedVestingAmount,
4103
4125
  numberOfVestingPeriod,
@@ -4335,11 +4357,7 @@ function buildCurveWithTwoSegments(params) {
4335
4357
  creatorLiquidityPercentage,
4336
4358
  creatorLiquidityVestingInfoParams
4337
4359
  } = liquidityDistribution;
4338
- const baseFee = getBaseFeeParams(
4339
- baseFeeParams,
4340
- tokenQuoteDecimal,
4341
- activationType
4342
- );
4360
+ const baseFee = getBaseFeeParams(baseFeeParams);
4343
4361
  const {
4344
4362
  totalLockedVestingAmount,
4345
4363
  numberOfVestingPeriod,
@@ -4562,11 +4580,7 @@ function buildCurveWithMidPrice(params) {
4562
4580
  creatorLiquidityPercentage,
4563
4581
  creatorLiquidityVestingInfoParams
4564
4582
  } = liquidityDistribution;
4565
- const baseFee = getBaseFeeParams(
4566
- baseFeeParams,
4567
- tokenQuoteDecimal,
4568
- activationType
4569
- );
4583
+ const baseFee = getBaseFeeParams(baseFeeParams);
4570
4584
  const {
4571
4585
  totalLockedVestingAmount,
4572
4586
  numberOfVestingPeriod,
@@ -4775,11 +4789,7 @@ function buildCurveWithLiquidityWeights(params) {
4775
4789
  creatorLiquidityPercentage,
4776
4790
  creatorLiquidityVestingInfoParams
4777
4791
  } = liquidityDistribution;
4778
- const baseFee = getBaseFeeParams(
4779
- baseFeeParams,
4780
- tokenQuoteDecimal,
4781
- activationType
4782
- );
4792
+ const baseFee = getBaseFeeParams(baseFeeParams);
4783
4793
  const {
4784
4794
  totalLockedVestingAmount,
4785
4795
  numberOfVestingPeriod,
@@ -5017,11 +5027,7 @@ function buildCurveWithCustomSqrtPrices(params) {
5017
5027
  "liquidityWeights length must equal sqrtPrices.length - 1"
5018
5028
  );
5019
5029
  }
5020
- const baseFee = getBaseFeeParams(
5021
- baseFeeParams,
5022
- tokenQuoteDecimal,
5023
- activationType
5024
- );
5030
+ const baseFee = getBaseFeeParams(baseFeeParams);
5025
5031
  const {
5026
5032
  totalLockedVestingAmount,
5027
5033
  numberOfVestingPeriod,
@@ -5190,7 +5196,7 @@ var idl_default = {
5190
5196
  address: "dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN",
5191
5197
  metadata: {
5192
5198
  name: "dynamic_bonding_curve",
5193
- version: "0.2.0",
5199
+ version: "0.2.1",
5194
5200
  spec: "0.1.0",
5195
5201
  description: "Created with Anchor"
5196
5202
  },
@@ -5439,122 +5445,6 @@ var idl_default = {
5439
5445
  ],
5440
5446
  args: []
5441
5447
  },
5442
- {
5443
- name: "claim_protocol_fee",
5444
- docs: [
5445
- "Accepts: VirtualPool only."
5446
- ],
5447
- discriminator: [
5448
- 165,
5449
- 228,
5450
- 133,
5451
- 48,
5452
- 99,
5453
- 249,
5454
- 255,
5455
- 33
5456
- ],
5457
- accounts: [
5458
- {
5459
- name: "pool_authority",
5460
- address: "FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"
5461
- },
5462
- {
5463
- name: "config",
5464
- relations: [
5465
- "pool"
5466
- ]
5467
- },
5468
- {
5469
- name: "pool",
5470
- writable: true
5471
- },
5472
- {
5473
- name: "base_vault",
5474
- docs: [
5475
- "The vault token account for input token"
5476
- ],
5477
- writable: true,
5478
- relations: [
5479
- "pool"
5480
- ]
5481
- },
5482
- {
5483
- name: "quote_vault",
5484
- docs: [
5485
- "The vault token account for output token"
5486
- ],
5487
- writable: true,
5488
- relations: [
5489
- "pool"
5490
- ]
5491
- },
5492
- {
5493
- name: "base_mint",
5494
- docs: [
5495
- "The mint of token a"
5496
- ],
5497
- relations: [
5498
- "pool"
5499
- ]
5500
- },
5501
- {
5502
- name: "quote_mint",
5503
- docs: [
5504
- "The mint of token b"
5505
- ],
5506
- relations: [
5507
- "config"
5508
- ]
5509
- },
5510
- {
5511
- name: "token_base_account",
5512
- writable: true
5513
- },
5514
- {
5515
- name: "token_quote_account",
5516
- writable: true
5517
- },
5518
- {
5519
- name: "operator"
5520
- },
5521
- {
5522
- name: "signer",
5523
- docs: [
5524
- "Signer"
5525
- ],
5526
- signer: true
5527
- },
5528
- {
5529
- name: "token_base_program",
5530
- docs: [
5531
- "Token a program"
5532
- ]
5533
- },
5534
- {
5535
- name: "token_quote_program",
5536
- docs: [
5537
- "Token b program"
5538
- ]
5539
- },
5540
- {
5541
- name: "event_authority"
5542
- },
5543
- {
5544
- name: "program"
5545
- }
5546
- ],
5547
- args: [
5548
- {
5549
- name: "max_base_amount",
5550
- type: "u64"
5551
- },
5552
- {
5553
- name: "max_quote_amount",
5554
- type: "u64"
5555
- }
5556
- ]
5557
- },
5558
5448
  {
5559
5449
  name: "claim_protocol_fee2",
5560
5450
  docs: [
@@ -5941,6 +5831,43 @@ var idl_default = {
5941
5831
  ],
5942
5832
  args: []
5943
5833
  },
5834
+ {
5835
+ name: "close_token_badge",
5836
+ discriminator: [
5837
+ 108,
5838
+ 146,
5839
+ 86,
5840
+ 110,
5841
+ 179,
5842
+ 254,
5843
+ 10,
5844
+ 104
5845
+ ],
5846
+ accounts: [
5847
+ {
5848
+ name: "token_badge",
5849
+ writable: true
5850
+ },
5851
+ {
5852
+ name: "operator"
5853
+ },
5854
+ {
5855
+ name: "signer",
5856
+ signer: true
5857
+ },
5858
+ {
5859
+ name: "rent_receiver",
5860
+ writable: true
5861
+ },
5862
+ {
5863
+ name: "event_authority"
5864
+ },
5865
+ {
5866
+ name: "program"
5867
+ }
5868
+ ],
5869
+ args: []
5870
+ },
5944
5871
  {
5945
5872
  name: "create_config",
5946
5873
  discriminator: [
@@ -6321,56 +6248,128 @@ var idl_default = {
6321
6248
  ]
6322
6249
  },
6323
6250
  {
6324
- name: "create_virtual_pool_metadata",
6325
- docs: [
6326
- "Accepts: VirtualPool or TransferHookPool."
6327
- ],
6251
+ name: "create_token_badge",
6328
6252
  discriminator: [
6329
- 45,
6330
- 97,
6331
- 187,
6332
- 103,
6333
- 254,
6334
- 109,
6335
- 124,
6336
- 134
6253
+ 88,
6254
+ 206,
6255
+ 0,
6256
+ 91,
6257
+ 60,
6258
+ 175,
6259
+ 151,
6260
+ 118
6337
6261
  ],
6338
6262
  accounts: [
6339
6263
  {
6340
- name: "virtual_pool"
6341
- },
6342
- {
6343
- name: "virtual_pool_metadata",
6344
- docs: [
6345
- "Virtual pool metadata"
6346
- ],
6264
+ name: "token_badge",
6347
6265
  writable: true,
6348
6266
  pda: {
6349
6267
  seeds: [
6350
6268
  {
6351
6269
  kind: "const",
6352
6270
  value: [
6353
- 118,
6354
- 105,
6355
- 114,
6356
6271
  116,
6357
- 117,
6358
- 97,
6359
- 108,
6360
- 95,
6361
- 112,
6362
6272
  111,
6363
- 111,
6364
- 108,
6365
- 95,
6366
- 109,
6273
+ 107,
6367
6274
  101,
6368
- 116,
6275
+ 110,
6276
+ 95,
6277
+ 98,
6369
6278
  97,
6370
6279
  100,
6371
- 97,
6372
- 116,
6373
- 97
6280
+ 103,
6281
+ 101
6282
+ ]
6283
+ },
6284
+ {
6285
+ kind: "account",
6286
+ path: "token_mint"
6287
+ }
6288
+ ]
6289
+ }
6290
+ },
6291
+ {
6292
+ name: "token_mint"
6293
+ },
6294
+ {
6295
+ name: "operator"
6296
+ },
6297
+ {
6298
+ name: "signer",
6299
+ docs: [
6300
+ "Operator"
6301
+ ],
6302
+ signer: true
6303
+ },
6304
+ {
6305
+ name: "payer",
6306
+ writable: true,
6307
+ signer: true
6308
+ },
6309
+ {
6310
+ name: "system_program",
6311
+ address: "11111111111111111111111111111111"
6312
+ },
6313
+ {
6314
+ name: "event_authority"
6315
+ },
6316
+ {
6317
+ name: "program"
6318
+ }
6319
+ ],
6320
+ args: []
6321
+ },
6322
+ {
6323
+ name: "create_virtual_pool_metadata",
6324
+ docs: [
6325
+ "Accepts: VirtualPool or TransferHookPool."
6326
+ ],
6327
+ discriminator: [
6328
+ 45,
6329
+ 97,
6330
+ 187,
6331
+ 103,
6332
+ 254,
6333
+ 109,
6334
+ 124,
6335
+ 134
6336
+ ],
6337
+ accounts: [
6338
+ {
6339
+ name: "virtual_pool"
6340
+ },
6341
+ {
6342
+ name: "virtual_pool_metadata",
6343
+ docs: [
6344
+ "Virtual pool metadata"
6345
+ ],
6346
+ writable: true,
6347
+ pda: {
6348
+ seeds: [
6349
+ {
6350
+ kind: "const",
6351
+ value: [
6352
+ 118,
6353
+ 105,
6354
+ 114,
6355
+ 116,
6356
+ 117,
6357
+ 97,
6358
+ 108,
6359
+ 95,
6360
+ 112,
6361
+ 111,
6362
+ 111,
6363
+ 108,
6364
+ 95,
6365
+ 109,
6366
+ 101,
6367
+ 116,
6368
+ 97,
6369
+ 100,
6370
+ 97,
6371
+ 116,
6372
+ 97
6374
6373
  ]
6375
6374
  },
6376
6375
  {
@@ -8412,78 +8411,6 @@ var idl_default = {
8412
8411
  type: "u8"
8413
8412
  }
8414
8413
  ]
8415
- },
8416
- {
8417
- name: "zap_protocol_fee",
8418
- docs: [
8419
- "Accepts: VirtualPool only."
8420
- ],
8421
- discriminator: [
8422
- 213,
8423
- 155,
8424
- 187,
8425
- 34,
8426
- 56,
8427
- 182,
8428
- 91,
8429
- 240
8430
- ],
8431
- accounts: [
8432
- {
8433
- name: "pool_authority",
8434
- address: "FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"
8435
- },
8436
- {
8437
- name: "config",
8438
- relations: [
8439
- "pool"
8440
- ]
8441
- },
8442
- {
8443
- name: "pool",
8444
- writable: true
8445
- },
8446
- {
8447
- name: "token_vault",
8448
- writable: true
8449
- },
8450
- {
8451
- name: "token_mint"
8452
- },
8453
- {
8454
- name: "receiver_token",
8455
- writable: true
8456
- },
8457
- {
8458
- name: "operator",
8459
- docs: [
8460
- "zap claim fee operator"
8461
- ]
8462
- },
8463
- {
8464
- name: "signer",
8465
- docs: [
8466
- "Operator"
8467
- ],
8468
- signer: true
8469
- },
8470
- {
8471
- name: "token_program",
8472
- docs: [
8473
- "Token program"
8474
- ]
8475
- },
8476
- {
8477
- name: "sysvar_instructions",
8478
- address: "Sysvar1nstructions1111111111111111111111111"
8479
- }
8480
- ],
8481
- args: [
8482
- {
8483
- name: "max_amount",
8484
- type: "u64"
8485
- }
8486
- ]
8487
8414
  }
8488
8415
  ],
8489
8416
  accounts: [
@@ -8565,6 +8492,19 @@ var idl_default = {
8565
8492
  43
8566
8493
  ]
8567
8494
  },
8495
+ {
8496
+ name: "TokenBadge",
8497
+ discriminator: [
8498
+ 116,
8499
+ 219,
8500
+ 204,
8501
+ 229,
8502
+ 249,
8503
+ 116,
8504
+ 255,
8505
+ 150
8506
+ ]
8507
+ },
8568
8508
  {
8569
8509
  name: "TransferHookPool",
8570
8510
  discriminator: [
@@ -8632,19 +8572,6 @@ var idl_default = {
8632
8572
  62
8633
8573
  ]
8634
8574
  },
8635
- {
8636
- name: "EvtClaimProtocolFee",
8637
- discriminator: [
8638
- 186,
8639
- 244,
8640
- 75,
8641
- 251,
8642
- 188,
8643
- 13,
8644
- 25,
8645
- 33
8646
- ]
8647
- },
8648
8575
  {
8649
8576
  name: "EvtClaimProtocolFee2",
8650
8577
  discriminator: [
@@ -8684,6 +8611,19 @@ var idl_default = {
8684
8611
  23
8685
8612
  ]
8686
8613
  },
8614
+ {
8615
+ name: "EvtCloseTokenBadge",
8616
+ discriminator: [
8617
+ 60,
8618
+ 217,
8619
+ 34,
8620
+ 82,
8621
+ 183,
8622
+ 10,
8623
+ 89,
8624
+ 188
8625
+ ]
8626
+ },
8687
8627
  {
8688
8628
  name: "EvtCreateClaimFeeOperator",
8689
8629
  discriminator: [
@@ -8749,6 +8689,19 @@ var idl_default = {
8749
8689
  139
8750
8690
  ]
8751
8691
  },
8692
+ {
8693
+ name: "EvtCreateTokenBadge",
8694
+ discriminator: [
8695
+ 141,
8696
+ 120,
8697
+ 134,
8698
+ 116,
8699
+ 34,
8700
+ 28,
8701
+ 114,
8702
+ 160
8703
+ ]
8704
+ },
8752
8705
  {
8753
8706
  name: "EvtCreatorWithdrawSurplus",
8754
8707
  discriminator: [
@@ -9330,6 +9283,36 @@ var idl_default = {
9330
9283
  code: 6076,
9331
9284
  name: "PoolTypeMismatch",
9332
9285
  msg: "Pool type does not match instruction"
9286
+ },
9287
+ {
9288
+ code: 6077,
9289
+ name: "InvalidRemainingAccountSliceType",
9290
+ msg: "Invalid remaining account slice type for this instruction"
9291
+ },
9292
+ {
9293
+ code: 6078,
9294
+ name: "DeprecatedBaseFeeMode",
9295
+ msg: "Deprecated base fee mode"
9296
+ },
9297
+ {
9298
+ code: 6079,
9299
+ name: "CannotCreateTokenBadgeOnSupportedMint",
9300
+ msg: "Cannot create token badge on supported mint"
9301
+ },
9302
+ {
9303
+ code: 6080,
9304
+ name: "InvalidTokenBadge",
9305
+ msg: "Invalid token badge"
9306
+ },
9307
+ {
9308
+ code: 6081,
9309
+ name: "QuoteMintHasNonZeroTransferFee",
9310
+ msg: "Quote mint has a non zero transfer fee"
9311
+ },
9312
+ {
9313
+ code: 6082,
9314
+ name: "DeprecatedMigrationOption",
9315
+ msg: "Deprecated migration option"
9333
9316
  }
9334
9317
  ],
9335
9318
  types: [
@@ -9898,26 +9881,6 @@ var idl_default = {
9898
9881
  ]
9899
9882
  }
9900
9883
  },
9901
- {
9902
- name: "EvtClaimProtocolFee",
9903
- type: {
9904
- kind: "struct",
9905
- fields: [
9906
- {
9907
- name: "pool",
9908
- type: "pubkey"
9909
- },
9910
- {
9911
- name: "token_base_amount",
9912
- type: "u64"
9913
- },
9914
- {
9915
- name: "token_quote_amount",
9916
- type: "u64"
9917
- }
9918
- ]
9919
- }
9920
- },
9921
9884
  {
9922
9885
  name: "EvtClaimProtocolFee2",
9923
9886
  type: {
@@ -9982,22 +9945,34 @@ var idl_default = {
9982
9945
  }
9983
9946
  },
9984
9947
  {
9985
- name: "EvtCreateClaimFeeOperator",
9986
- docs: [
9987
- "Create claim fee operator"
9988
- ],
9948
+ name: "EvtCloseTokenBadge",
9989
9949
  type: {
9990
9950
  kind: "struct",
9991
9951
  fields: [
9992
9952
  {
9993
- name: "operator",
9953
+ name: "token_mint",
9994
9954
  type: "pubkey"
9995
9955
  }
9996
9956
  ]
9997
9957
  }
9998
9958
  },
9999
9959
  {
10000
- name: "EvtCreateConfig",
9960
+ name: "EvtCreateClaimFeeOperator",
9961
+ docs: [
9962
+ "Create claim fee operator"
9963
+ ],
9964
+ type: {
9965
+ kind: "struct",
9966
+ fields: [
9967
+ {
9968
+ name: "operator",
9969
+ type: "pubkey"
9970
+ }
9971
+ ]
9972
+ }
9973
+ },
9974
+ {
9975
+ name: "EvtCreateConfig",
10001
9976
  docs: [
10002
9977
  "Create config"
10003
9978
  ],
@@ -10197,6 +10172,18 @@ var idl_default = {
10197
10172
  ]
10198
10173
  }
10199
10174
  },
10175
+ {
10176
+ name: "EvtCreateTokenBadge",
10177
+ type: {
10178
+ kind: "struct",
10179
+ fields: [
10180
+ {
10181
+ name: "token_mint",
10182
+ type: "pubkey"
10183
+ }
10184
+ ]
10185
+ }
10186
+ },
10200
10187
  {
10201
10188
  name: "EvtCreatorWithdrawSurplus",
10202
10189
  type: {
@@ -11978,6 +11965,40 @@ var idl_default = {
11978
11965
  ]
11979
11966
  }
11980
11967
  },
11968
+ {
11969
+ name: "TokenBadge",
11970
+ docs: [
11971
+ "Parameter that set by the protocol"
11972
+ ],
11973
+ serialization: "bytemuck",
11974
+ repr: {
11975
+ kind: "c"
11976
+ },
11977
+ type: {
11978
+ kind: "struct",
11979
+ fields: [
11980
+ {
11981
+ name: "token_mint",
11982
+ docs: [
11983
+ "token mint"
11984
+ ],
11985
+ type: "pubkey"
11986
+ },
11987
+ {
11988
+ name: "_padding",
11989
+ docs: [
11990
+ "Reserve"
11991
+ ],
11992
+ type: {
11993
+ array: [
11994
+ "u8",
11995
+ 128
11996
+ ]
11997
+ }
11998
+ }
11999
+ ]
12000
+ }
12001
+ },
11981
12002
  {
11982
12003
  name: "TokenSupplyParams",
11983
12004
  type: {
@@ -20981,7 +21002,7 @@ var idl_default4 = {
20981
21002
  address: "cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG",
20982
21003
  metadata: {
20983
21004
  name: "cp_amm",
20984
- version: "0.2.0",
21005
+ version: "0.2.4",
20985
21006
  spec: "0.1.0",
20986
21007
  description: "Created with Anchor"
20987
21008
  },
@@ -21069,9 +21090,9 @@ var idl_default4 = {
21069
21090
  ]
21070
21091
  },
21071
21092
  {
21072
- name: "owner",
21093
+ name: "signer",
21073
21094
  docs: [
21074
- "owner of position"
21095
+ "Signer"
21075
21096
  ],
21076
21097
  signer: true
21077
21098
  },
@@ -21088,33 +21109,7 @@ var idl_default4 = {
21088
21109
  ]
21089
21110
  },
21090
21111
  {
21091
- name: "event_authority",
21092
- pda: {
21093
- seeds: [
21094
- {
21095
- kind: "const",
21096
- value: [
21097
- 95,
21098
- 95,
21099
- 101,
21100
- 118,
21101
- 101,
21102
- 110,
21103
- 116,
21104
- 95,
21105
- 97,
21106
- 117,
21107
- 116,
21108
- 104,
21109
- 111,
21110
- 114,
21111
- 105,
21112
- 116,
21113
- 121
21114
- ]
21115
- }
21116
- ]
21117
- }
21112
+ name: "event_authority"
21118
21113
  },
21119
21114
  {
21120
21115
  name: "program"
@@ -21217,9 +21212,9 @@ var idl_default4 = {
21217
21212
  ]
21218
21213
  },
21219
21214
  {
21220
- name: "owner",
21215
+ name: "signer",
21221
21216
  docs: [
21222
- "owner of position"
21217
+ "Signer"
21223
21218
  ],
21224
21219
  signer: true
21225
21220
  },
@@ -21236,33 +21231,7 @@ var idl_default4 = {
21236
21231
  ]
21237
21232
  },
21238
21233
  {
21239
- name: "event_authority",
21240
- pda: {
21241
- seeds: [
21242
- {
21243
- kind: "const",
21244
- value: [
21245
- 95,
21246
- 95,
21247
- 101,
21248
- 118,
21249
- 101,
21250
- 110,
21251
- 116,
21252
- 95,
21253
- 97,
21254
- 117,
21255
- 116,
21256
- 104,
21257
- 111,
21258
- 114,
21259
- 105,
21260
- 116,
21261
- 121
21262
- ]
21263
- }
21264
- ]
21265
- }
21234
+ name: "event_authority"
21266
21235
  },
21267
21236
  {
21268
21237
  name: "program"
@@ -21271,137 +21240,74 @@ var idl_default4 = {
21271
21240
  args: []
21272
21241
  },
21273
21242
  {
21274
- name: "claim_protocol_fee",
21243
+ name: "claim_protocol_fee2",
21275
21244
  discriminator: [
21276
- 165,
21277
- 228,
21278
- 133,
21279
- 48,
21280
- 99,
21281
- 249,
21282
- 255,
21283
- 33
21245
+ 235,
21246
+ 194,
21247
+ 54,
21248
+ 69,
21249
+ 65,
21250
+ 10,
21251
+ 236,
21252
+ 112
21284
21253
  ],
21285
21254
  accounts: [
21286
21255
  {
21287
- name: "pool_authority",
21288
- address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
21289
- },
21290
- {
21291
- name: "pool",
21292
- writable: true
21293
- },
21294
- {
21295
- name: "token_a_vault",
21296
- docs: [
21297
- "The vault token account for input token"
21298
- ],
21299
- writable: true,
21300
- relations: [
21301
- "pool"
21302
- ]
21303
- },
21304
- {
21305
- name: "token_b_vault",
21256
+ name: "receiver_token_account",
21306
21257
  docs: [
21307
- "The vault token account for output token"
21258
+ "receiver token account for the claimed token. validated through the protocol_fee program"
21308
21259
  ],
21309
- writable: true,
21310
- relations: [
21311
- "pool"
21312
- ]
21260
+ writable: true
21313
21261
  },
21314
21262
  {
21315
21263
  name: "token_a_mint",
21316
- docs: [
21317
- "The mint of token a"
21318
- ],
21319
21264
  relations: [
21320
21265
  "pool"
21321
21266
  ]
21322
21267
  },
21323
21268
  {
21324
21269
  name: "token_b_mint",
21325
- docs: [
21326
- "The mint of token b"
21327
- ],
21328
21270
  relations: [
21329
21271
  "pool"
21330
21272
  ]
21331
21273
  },
21332
21274
  {
21333
- name: "token_a_account",
21334
- writable: true
21335
- },
21336
- {
21337
- name: "token_b_account",
21338
- writable: true
21275
+ name: "token_a_program"
21339
21276
  },
21340
21277
  {
21341
- name: "operator",
21342
- docs: [
21343
- "Claim fee operator"
21344
- ]
21278
+ name: "token_b_program"
21345
21279
  },
21346
21280
  {
21347
- name: "signer",
21348
- docs: [
21349
- "Operator"
21350
- ],
21351
- signer: true
21281
+ name: "pool",
21282
+ writable: true
21352
21283
  },
21353
21284
  {
21354
- name: "token_a_program",
21355
- docs: [
21356
- "Token a program"
21285
+ name: "token_a_vault",
21286
+ writable: true,
21287
+ relations: [
21288
+ "pool"
21357
21289
  ]
21358
21290
  },
21359
21291
  {
21360
- name: "token_b_program",
21361
- docs: [
21362
- "Token b program"
21292
+ name: "token_b_vault",
21293
+ writable: true,
21294
+ relations: [
21295
+ "pool"
21363
21296
  ]
21364
21297
  },
21365
21298
  {
21366
- name: "event_authority",
21367
- pda: {
21368
- seeds: [
21369
- {
21370
- kind: "const",
21371
- value: [
21372
- 95,
21373
- 95,
21374
- 101,
21375
- 118,
21376
- 101,
21377
- 110,
21378
- 116,
21379
- 95,
21380
- 97,
21381
- 117,
21382
- 116,
21383
- 104,
21384
- 111,
21385
- 114,
21386
- 105,
21387
- 116,
21388
- 121
21389
- ]
21390
- }
21391
- ]
21392
- }
21299
+ name: "pool_authority",
21300
+ address: "HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"
21393
21301
  },
21394
21302
  {
21395
- name: "program"
21303
+ name: "signer",
21304
+ signer: true,
21305
+ address: "FkU5rQCWQM131skHCpcEbK8P1JrQGsBgqXe55w525SSF"
21396
21306
  }
21397
21307
  ],
21398
21308
  args: [
21399
21309
  {
21400
- name: "max_amount_a",
21401
- type: "u64"
21402
- },
21403
- {
21404
- name: "max_amount_b",
21310
+ name: "max_amount",
21405
21311
  type: "u64"
21406
21312
  }
21407
21313
  ]
@@ -21455,9 +21361,9 @@ var idl_default4 = {
21455
21361
  ]
21456
21362
  },
21457
21363
  {
21458
- name: "owner",
21364
+ name: "signer",
21459
21365
  docs: [
21460
- "owner of position"
21366
+ "Signer"
21461
21367
  ],
21462
21368
  signer: true
21463
21369
  },
@@ -21465,33 +21371,7 @@ var idl_default4 = {
21465
21371
  name: "token_program"
21466
21372
  },
21467
21373
  {
21468
- name: "event_authority",
21469
- pda: {
21470
- seeds: [
21471
- {
21472
- kind: "const",
21473
- value: [
21474
- 95,
21475
- 95,
21476
- 101,
21477
- 118,
21478
- 101,
21479
- 110,
21480
- 116,
21481
- 95,
21482
- 97,
21483
- 117,
21484
- 116,
21485
- 104,
21486
- 111,
21487
- 114,
21488
- 105,
21489
- 116,
21490
- 121
21491
- ]
21492
- }
21493
- ]
21494
- }
21374
+ name: "event_authority"
21495
21375
  },
21496
21376
  {
21497
21377
  name: "program"
@@ -21537,33 +21417,7 @@ var idl_default4 = {
21537
21417
  writable: true
21538
21418
  },
21539
21419
  {
21540
- name: "event_authority",
21541
- pda: {
21542
- seeds: [
21543
- {
21544
- kind: "const",
21545
- value: [
21546
- 95,
21547
- 95,
21548
- 101,
21549
- 118,
21550
- 101,
21551
- 110,
21552
- 116,
21553
- 95,
21554
- 97,
21555
- 117,
21556
- 116,
21557
- 104,
21558
- 111,
21559
- 114,
21560
- 105,
21561
- 116,
21562
- 121
21563
- ]
21564
- }
21565
- ]
21566
- }
21420
+ name: "event_authority"
21567
21421
  },
21568
21422
  {
21569
21423
  name: "program"
@@ -21597,33 +21451,7 @@ var idl_default4 = {
21597
21451
  writable: true
21598
21452
  },
21599
21453
  {
21600
- name: "event_authority",
21601
- pda: {
21602
- seeds: [
21603
- {
21604
- kind: "const",
21605
- value: [
21606
- 95,
21607
- 95,
21608
- 101,
21609
- 118,
21610
- 101,
21611
- 110,
21612
- 116,
21613
- 95,
21614
- 97,
21615
- 117,
21616
- 116,
21617
- 104,
21618
- 111,
21619
- 114,
21620
- 105,
21621
- 116,
21622
- 121
21623
- ]
21624
- }
21625
- ]
21626
- }
21454
+ name: "event_authority"
21627
21455
  },
21628
21456
  {
21629
21457
  name: "program"
@@ -21692,33 +21520,7 @@ var idl_default4 = {
21692
21520
  address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
21693
21521
  },
21694
21522
  {
21695
- name: "event_authority",
21696
- pda: {
21697
- seeds: [
21698
- {
21699
- kind: "const",
21700
- value: [
21701
- 95,
21702
- 95,
21703
- 101,
21704
- 118,
21705
- 101,
21706
- 110,
21707
- 116,
21708
- 95,
21709
- 97,
21710
- 117,
21711
- 116,
21712
- 104,
21713
- 111,
21714
- 114,
21715
- 105,
21716
- 116,
21717
- 121
21718
- ]
21719
- }
21720
- ]
21721
- }
21523
+ name: "event_authority"
21722
21524
  },
21723
21525
  {
21724
21526
  name: "program"
@@ -21755,33 +21557,7 @@ var idl_default4 = {
21755
21557
  writable: true
21756
21558
  },
21757
21559
  {
21758
- name: "event_authority",
21759
- pda: {
21760
- seeds: [
21761
- {
21762
- kind: "const",
21763
- value: [
21764
- 95,
21765
- 95,
21766
- 101,
21767
- 118,
21768
- 101,
21769
- 110,
21770
- 116,
21771
- 95,
21772
- 97,
21773
- 117,
21774
- 116,
21775
- 104,
21776
- 111,
21777
- 114,
21778
- 105,
21779
- 116,
21780
- 121
21781
- ]
21782
- }
21783
- ]
21784
- }
21560
+ name: "event_authority"
21785
21561
  },
21786
21562
  {
21787
21563
  name: "program"
@@ -21845,33 +21621,7 @@ var idl_default4 = {
21845
21621
  address: "11111111111111111111111111111111"
21846
21622
  },
21847
21623
  {
21848
- name: "event_authority",
21849
- pda: {
21850
- seeds: [
21851
- {
21852
- kind: "const",
21853
- value: [
21854
- 95,
21855
- 95,
21856
- 101,
21857
- 118,
21858
- 101,
21859
- 110,
21860
- 116,
21861
- 95,
21862
- 97,
21863
- 117,
21864
- 116,
21865
- 104,
21866
- 111,
21867
- 114,
21868
- 105,
21869
- 116,
21870
- 121
21871
- ]
21872
- }
21873
- ]
21874
- }
21624
+ name: "event_authority"
21875
21625
  },
21876
21626
  {
21877
21627
  name: "program"
@@ -21945,33 +21695,7 @@ var idl_default4 = {
21945
21695
  address: "11111111111111111111111111111111"
21946
21696
  },
21947
21697
  {
21948
- name: "event_authority",
21949
- pda: {
21950
- seeds: [
21951
- {
21952
- kind: "const",
21953
- value: [
21954
- 95,
21955
- 95,
21956
- 101,
21957
- 118,
21958
- 101,
21959
- 110,
21960
- 116,
21961
- 95,
21962
- 97,
21963
- 117,
21964
- 116,
21965
- 104,
21966
- 111,
21967
- 114,
21968
- 105,
21969
- 116,
21970
- 121
21971
- ]
21972
- }
21973
- ]
21974
- }
21698
+ name: "event_authority"
21975
21699
  },
21976
21700
  {
21977
21701
  name: "program"
@@ -22050,33 +21774,7 @@ var idl_default4 = {
22050
21774
  address: "11111111111111111111111111111111"
22051
21775
  },
22052
21776
  {
22053
- name: "event_authority",
22054
- pda: {
22055
- seeds: [
22056
- {
22057
- kind: "const",
22058
- value: [
22059
- 95,
22060
- 95,
22061
- 101,
22062
- 118,
22063
- 101,
22064
- 110,
22065
- 116,
22066
- 95,
22067
- 97,
22068
- 117,
22069
- 116,
22070
- 104,
22071
- 111,
22072
- 114,
22073
- 105,
22074
- 116,
22075
- 121
22076
- ]
22077
- }
22078
- ]
22079
- }
21777
+ name: "event_authority"
22080
21778
  },
22081
21779
  {
22082
21780
  name: "program"
@@ -22206,33 +21904,7 @@ var idl_default4 = {
22206
21904
  address: "11111111111111111111111111111111"
22207
21905
  },
22208
21906
  {
22209
- name: "event_authority",
22210
- pda: {
22211
- seeds: [
22212
- {
22213
- kind: "const",
22214
- value: [
22215
- 95,
22216
- 95,
22217
- 101,
22218
- 118,
22219
- 101,
22220
- 110,
22221
- 116,
22222
- 95,
22223
- 97,
22224
- 117,
22225
- 116,
22226
- 104,
22227
- 111,
22228
- 114,
22229
- 105,
22230
- 116,
22231
- 121
22232
- ]
22233
- }
22234
- ]
22235
- }
21907
+ name: "event_authority"
22236
21908
  },
22237
21909
  {
22238
21910
  name: "program"
@@ -22301,33 +21973,7 @@ var idl_default4 = {
22301
21973
  address: "11111111111111111111111111111111"
22302
21974
  },
22303
21975
  {
22304
- name: "event_authority",
22305
- pda: {
22306
- seeds: [
22307
- {
22308
- kind: "const",
22309
- value: [
22310
- 95,
22311
- 95,
22312
- 101,
22313
- 118,
22314
- 101,
22315
- 110,
22316
- 116,
22317
- 95,
22318
- 97,
22319
- 117,
22320
- 116,
22321
- 104,
22322
- 111,
22323
- 114,
22324
- 105,
22325
- 116,
22326
- 121
22327
- ]
22328
- }
22329
- ]
22330
- }
21976
+ name: "event_authority"
22331
21977
  },
22332
21978
  {
22333
21979
  name: "program"
@@ -22504,33 +22150,7 @@ var idl_default4 = {
22504
22150
  name: "token_program"
22505
22151
  },
22506
22152
  {
22507
- name: "event_authority",
22508
- pda: {
22509
- seeds: [
22510
- {
22511
- kind: "const",
22512
- value: [
22513
- 95,
22514
- 95,
22515
- 101,
22516
- 118,
22517
- 101,
22518
- 110,
22519
- 116,
22520
- 95,
22521
- 97,
22522
- 117,
22523
- 116,
22524
- 104,
22525
- 111,
22526
- 114,
22527
- 105,
22528
- 116,
22529
- 121
22530
- ]
22531
- }
22532
- ]
22533
- }
22153
+ name: "event_authority"
22534
22154
  },
22535
22155
  {
22536
22156
  name: "program"
@@ -22779,33 +22399,7 @@ var idl_default4 = {
22779
22399
  address: "11111111111111111111111111111111"
22780
22400
  },
22781
22401
  {
22782
- name: "event_authority",
22783
- pda: {
22784
- seeds: [
22785
- {
22786
- kind: "const",
22787
- value: [
22788
- 95,
22789
- 95,
22790
- 101,
22791
- 118,
22792
- 101,
22793
- 110,
22794
- 116,
22795
- 95,
22796
- 97,
22797
- 117,
22798
- 116,
22799
- 104,
22800
- 111,
22801
- 114,
22802
- 105,
22803
- 116,
22804
- 121
22805
- ]
22806
- }
22807
- ]
22808
- }
22402
+ name: "event_authority"
22809
22403
  },
22810
22404
  {
22811
22405
  name: "program"
@@ -23059,33 +22653,7 @@ var idl_default4 = {
23059
22653
  address: "11111111111111111111111111111111"
23060
22654
  },
23061
22655
  {
23062
- name: "event_authority",
23063
- pda: {
23064
- seeds: [
23065
- {
23066
- kind: "const",
23067
- value: [
23068
- 95,
23069
- 95,
23070
- 101,
23071
- 118,
23072
- 101,
23073
- 110,
23074
- 116,
23075
- 95,
23076
- 97,
23077
- 117,
23078
- 116,
23079
- 104,
23080
- 111,
23081
- 114,
23082
- 105,
23083
- 116,
23084
- 121
23085
- ]
23086
- }
23087
- ]
23088
- }
22656
+ name: "event_authority"
23089
22657
  },
23090
22658
  {
23091
22659
  name: "program"
@@ -23343,33 +22911,7 @@ var idl_default4 = {
23343
22911
  address: "11111111111111111111111111111111"
23344
22912
  },
23345
22913
  {
23346
- name: "event_authority",
23347
- pda: {
23348
- seeds: [
23349
- {
23350
- kind: "const",
23351
- value: [
23352
- 95,
23353
- 95,
23354
- 101,
23355
- 118,
23356
- 101,
23357
- 110,
23358
- 116,
23359
- 95,
23360
- 97,
23361
- 117,
23362
- 116,
23363
- 104,
23364
- 111,
23365
- 114,
23366
- 105,
23367
- 116,
23368
- 121
23369
- ]
23370
- }
23371
- ]
23372
- }
22914
+ name: "event_authority"
23373
22915
  },
23374
22916
  {
23375
22917
  name: "program"
@@ -23460,33 +23002,7 @@ var idl_default4 = {
23460
23002
  address: "11111111111111111111111111111111"
23461
23003
  },
23462
23004
  {
23463
- name: "event_authority",
23464
- pda: {
23465
- seeds: [
23466
- {
23467
- kind: "const",
23468
- value: [
23469
- 95,
23470
- 95,
23471
- 101,
23472
- 118,
23473
- 101,
23474
- 110,
23475
- 116,
23476
- 95,
23477
- 97,
23478
- 117,
23479
- 116,
23480
- 104,
23481
- 111,
23482
- 114,
23483
- 105,
23484
- 116,
23485
- 121
23486
- ]
23487
- }
23488
- ]
23489
- }
23005
+ name: "event_authority"
23490
23006
  },
23491
23007
  {
23492
23008
  name: "program"
@@ -23537,40 +23053,14 @@ var idl_default4 = {
23537
23053
  ]
23538
23054
  },
23539
23055
  {
23540
- name: "owner",
23056
+ name: "signer",
23541
23057
  docs: [
23542
- "owner of position"
23058
+ "Signer"
23543
23059
  ],
23544
23060
  signer: true
23545
23061
  },
23546
23062
  {
23547
- name: "event_authority",
23548
- pda: {
23549
- seeds: [
23550
- {
23551
- kind: "const",
23552
- value: [
23553
- 95,
23554
- 95,
23555
- 101,
23556
- 118,
23557
- 101,
23558
- 110,
23559
- 116,
23560
- 95,
23561
- 97,
23562
- 117,
23563
- 116,
23564
- 104,
23565
- 111,
23566
- 114,
23567
- 105,
23568
- 116,
23569
- 121
23570
- ]
23571
- }
23572
- ]
23573
- }
23063
+ name: "event_authority"
23574
23064
  },
23575
23065
  {
23576
23066
  name: "program"
@@ -23622,9 +23112,9 @@ var idl_default4 = {
23622
23112
  ]
23623
23113
  },
23624
23114
  {
23625
- name: "owner",
23115
+ name: "signer",
23626
23116
  docs: [
23627
- "owner of position"
23117
+ "Signer"
23628
23118
  ],
23629
23119
  signer: true
23630
23120
  },
@@ -23638,33 +23128,7 @@ var idl_default4 = {
23638
23128
  address: "11111111111111111111111111111111"
23639
23129
  },
23640
23130
  {
23641
- name: "event_authority",
23642
- pda: {
23643
- seeds: [
23644
- {
23645
- kind: "const",
23646
- value: [
23647
- 95,
23648
- 95,
23649
- 101,
23650
- 118,
23651
- 101,
23652
- 110,
23653
- 116,
23654
- 95,
23655
- 97,
23656
- 117,
23657
- 116,
23658
- 104,
23659
- 111,
23660
- 114,
23661
- 105,
23662
- 116,
23663
- 121
23664
- ]
23665
- }
23666
- ]
23667
- }
23131
+ name: "event_authority"
23668
23132
  },
23669
23133
  {
23670
23134
  name: "program"
@@ -23712,40 +23176,14 @@ var idl_default4 = {
23712
23176
  ]
23713
23177
  },
23714
23178
  {
23715
- name: "owner",
23179
+ name: "signer",
23716
23180
  docs: [
23717
- "owner of position"
23181
+ "Signer"
23718
23182
  ],
23719
23183
  signer: true
23720
23184
  },
23721
23185
  {
23722
- name: "event_authority",
23723
- pda: {
23724
- seeds: [
23725
- {
23726
- kind: "const",
23727
- value: [
23728
- 95,
23729
- 95,
23730
- 101,
23731
- 118,
23732
- 101,
23733
- 110,
23734
- 116,
23735
- 95,
23736
- 97,
23737
- 117,
23738
- 116,
23739
- 104,
23740
- 111,
23741
- 114,
23742
- 105,
23743
- 116,
23744
- 121
23745
- ]
23746
- }
23747
- ]
23748
- }
23186
+ name: "event_authority"
23749
23187
  },
23750
23188
  {
23751
23189
  name: "program"
@@ -23880,9 +23318,9 @@ var idl_default4 = {
23880
23318
  ]
23881
23319
  },
23882
23320
  {
23883
- name: "owner",
23321
+ name: "signer",
23884
23322
  docs: [
23885
- "owner of position"
23323
+ "Signer"
23886
23324
  ],
23887
23325
  signer: true
23888
23326
  },
@@ -23899,33 +23337,7 @@ var idl_default4 = {
23899
23337
  ]
23900
23338
  },
23901
23339
  {
23902
- name: "event_authority",
23903
- pda: {
23904
- seeds: [
23905
- {
23906
- kind: "const",
23907
- value: [
23908
- 95,
23909
- 95,
23910
- 101,
23911
- 118,
23912
- 101,
23913
- 110,
23914
- 116,
23915
- 95,
23916
- 97,
23917
- 117,
23918
- 116,
23919
- 104,
23920
- 111,
23921
- 114,
23922
- 105,
23923
- 116,
23924
- 121
23925
- ]
23926
- }
23927
- ]
23928
- }
23340
+ name: "event_authority"
23929
23341
  },
23930
23342
  {
23931
23343
  name: "program"
@@ -24029,9 +23441,9 @@ var idl_default4 = {
24029
23441
  ]
24030
23442
  },
24031
23443
  {
24032
- name: "owner",
23444
+ name: "signer",
24033
23445
  docs: [
24034
- "owner of position"
23446
+ "Signer"
24035
23447
  ],
24036
23448
  signer: true
24037
23449
  },
@@ -24048,33 +23460,7 @@ var idl_default4 = {
24048
23460
  ]
24049
23461
  },
24050
23462
  {
24051
- name: "event_authority",
24052
- pda: {
24053
- seeds: [
24054
- {
24055
- kind: "const",
24056
- value: [
24057
- 95,
24058
- 95,
24059
- 101,
24060
- 118,
24061
- 101,
24062
- 110,
24063
- 116,
24064
- 95,
24065
- 97,
24066
- 117,
24067
- 116,
24068
- 104,
24069
- 111,
24070
- 114,
24071
- 105,
24072
- 116,
24073
- 121
24074
- ]
24075
- }
24076
- ]
24077
- }
23463
+ name: "event_authority"
24078
23464
  },
24079
23465
  {
24080
23466
  name: "program"
@@ -24116,33 +23502,7 @@ var idl_default4 = {
24116
23502
  signer: true
24117
23503
  },
24118
23504
  {
24119
- name: "event_authority",
24120
- pda: {
24121
- seeds: [
24122
- {
24123
- kind: "const",
24124
- value: [
24125
- 95,
24126
- 95,
24127
- 101,
24128
- 118,
24129
- 101,
24130
- 110,
24131
- 116,
24132
- 95,
24133
- 97,
24134
- 117,
24135
- 116,
24136
- 104,
24137
- 111,
24138
- 114,
24139
- 105,
24140
- 116,
24141
- 121
24142
- ]
24143
- }
24144
- ]
24145
- }
23505
+ name: "event_authority"
24146
23506
  },
24147
23507
  {
24148
23508
  name: "program"
@@ -24217,33 +23577,7 @@ var idl_default4 = {
24217
23577
  signer: true
24218
23578
  },
24219
23579
  {
24220
- name: "event_authority",
24221
- pda: {
24222
- seeds: [
24223
- {
24224
- kind: "const",
24225
- value: [
24226
- 95,
24227
- 95,
24228
- 101,
24229
- 118,
24230
- 101,
24231
- 110,
24232
- 116,
24233
- 95,
24234
- 97,
24235
- 117,
24236
- 116,
24237
- 104,
24238
- 111,
24239
- 114,
24240
- 105,
24241
- 116,
24242
- 121
24243
- ]
24244
- }
24245
- ]
24246
- }
23580
+ name: "event_authority"
24247
23581
  },
24248
23582
  {
24249
23583
  name: "program"
@@ -24322,33 +23656,7 @@ var idl_default4 = {
24322
23656
  signer: true
24323
23657
  },
24324
23658
  {
24325
- name: "event_authority",
24326
- pda: {
24327
- seeds: [
24328
- {
24329
- kind: "const",
24330
- value: [
24331
- 95,
24332
- 95,
24333
- 101,
24334
- 118,
24335
- 101,
24336
- 110,
24337
- 116,
24338
- 95,
24339
- 97,
24340
- 117,
24341
- 116,
24342
- 104,
24343
- 111,
24344
- 114,
24345
- 105,
24346
- 116,
24347
- 121
24348
- ]
24349
- }
24350
- ]
24351
- }
23659
+ name: "event_authority"
24352
23660
  },
24353
23661
  {
24354
23662
  name: "program"
@@ -24459,33 +23767,7 @@ var idl_default4 = {
24459
23767
  optional: true
24460
23768
  },
24461
23769
  {
24462
- name: "event_authority",
24463
- pda: {
24464
- seeds: [
24465
- {
24466
- kind: "const",
24467
- value: [
24468
- 95,
24469
- 95,
24470
- 101,
24471
- 118,
24472
- 101,
24473
- 110,
24474
- 116,
24475
- 95,
24476
- 97,
24477
- 117,
24478
- 116,
24479
- 104,
24480
- 111,
24481
- 114,
24482
- 105,
24483
- 116,
24484
- 121
24485
- ]
24486
- }
24487
- ]
24488
- }
23770
+ name: "event_authority"
24489
23771
  },
24490
23772
  {
24491
23773
  name: "program"
@@ -24600,33 +23882,7 @@ var idl_default4 = {
24600
23882
  optional: true
24601
23883
  },
24602
23884
  {
24603
- name: "event_authority",
24604
- pda: {
24605
- seeds: [
24606
- {
24607
- kind: "const",
24608
- value: [
24609
- 95,
24610
- 95,
24611
- 101,
24612
- 118,
24613
- 101,
24614
- 110,
24615
- 116,
24616
- 95,
24617
- 97,
24618
- 117,
24619
- 116,
24620
- 104,
24621
- 111,
24622
- 114,
24623
- 105,
24624
- 116,
24625
- 121
24626
- ]
24627
- }
24628
- ]
24629
- }
23885
+ name: "event_authority"
24630
23886
  },
24631
23887
  {
24632
23888
  name: "program"
@@ -24643,6 +23899,47 @@ var idl_default4 = {
24643
23899
  }
24644
23900
  ]
24645
23901
  },
23902
+ {
23903
+ name: "update_delegate_permission",
23904
+ discriminator: [
23905
+ 175,
23906
+ 165,
23907
+ 56,
23908
+ 64,
23909
+ 0,
23910
+ 251,
23911
+ 89,
23912
+ 47
23913
+ ],
23914
+ accounts: [
23915
+ {
23916
+ name: "position",
23917
+ writable: true
23918
+ },
23919
+ {
23920
+ name: "position_nft_account",
23921
+ docs: [
23922
+ "The token account for nft"
23923
+ ]
23924
+ },
23925
+ {
23926
+ name: "owner",
23927
+ signer: true
23928
+ },
23929
+ {
23930
+ name: "event_authority"
23931
+ },
23932
+ {
23933
+ name: "program"
23934
+ }
23935
+ ],
23936
+ args: [
23937
+ {
23938
+ name: "permission",
23939
+ type: "u32"
23940
+ }
23941
+ ]
23942
+ },
24646
23943
  {
24647
23944
  name: "update_pool_fees",
24648
23945
  discriminator: [
@@ -24668,33 +23965,7 @@ var idl_default4 = {
24668
23965
  signer: true
24669
23966
  },
24670
23967
  {
24671
- name: "event_authority",
24672
- pda: {
24673
- seeds: [
24674
- {
24675
- kind: "const",
24676
- value: [
24677
- 95,
24678
- 95,
24679
- 101,
24680
- 118,
24681
- 101,
24682
- 110,
24683
- 116,
24684
- 95,
24685
- 97,
24686
- 117,
24687
- 116,
24688
- 104,
24689
- 111,
24690
- 114,
24691
- 105,
24692
- 116,
24693
- 121
24694
- ]
24695
- }
24696
- ]
24697
- }
23968
+ name: "event_authority"
24698
23969
  },
24699
23970
  {
24700
23971
  name: "program"
@@ -24733,33 +24004,7 @@ var idl_default4 = {
24733
24004
  signer: true
24734
24005
  },
24735
24006
  {
24736
- name: "event_authority",
24737
- pda: {
24738
- seeds: [
24739
- {
24740
- kind: "const",
24741
- value: [
24742
- 95,
24743
- 95,
24744
- 101,
24745
- 118,
24746
- 101,
24747
- 110,
24748
- 116,
24749
- 95,
24750
- 97,
24751
- 117,
24752
- 116,
24753
- 104,
24754
- 111,
24755
- 114,
24756
- 105,
24757
- 116,
24758
- 121
24759
- ]
24760
- }
24761
- ]
24762
- }
24007
+ name: "event_authority"
24763
24008
  },
24764
24009
  {
24765
24010
  name: "program"
@@ -24798,33 +24043,7 @@ var idl_default4 = {
24798
24043
  signer: true
24799
24044
  },
24800
24045
  {
24801
- name: "event_authority",
24802
- pda: {
24803
- seeds: [
24804
- {
24805
- kind: "const",
24806
- value: [
24807
- 95,
24808
- 95,
24809
- 101,
24810
- 118,
24811
- 101,
24812
- 110,
24813
- 116,
24814
- 95,
24815
- 97,
24816
- 117,
24817
- 116,
24818
- 104,
24819
- 111,
24820
- 114,
24821
- 105,
24822
- 116,
24823
- 121
24824
- ]
24825
- }
24826
- ]
24827
- }
24046
+ name: "event_authority"
24828
24047
  },
24829
24048
  {
24830
24049
  name: "program"
@@ -24842,16 +24061,16 @@ var idl_default4 = {
24842
24061
  ]
24843
24062
  },
24844
24063
  {
24845
- name: "withdraw_ineligible_reward",
24064
+ name: "withdraw_dead_liquidity_reward",
24846
24065
  discriminator: [
24847
- 148,
24848
- 206,
24849
- 42,
24850
- 195,
24851
- 247,
24852
- 49,
24853
- 103,
24854
- 8
24066
+ 121,
24067
+ 99,
24068
+ 224,
24069
+ 91,
24070
+ 178,
24071
+ 14,
24072
+ 22,
24073
+ 132
24855
24074
  ],
24856
24075
  accounts: [
24857
24076
  {
@@ -24881,33 +24100,7 @@ var idl_default4 = {
24881
24100
  name: "token_program"
24882
24101
  },
24883
24102
  {
24884
- name: "event_authority",
24885
- pda: {
24886
- seeds: [
24887
- {
24888
- kind: "const",
24889
- value: [
24890
- 95,
24891
- 95,
24892
- 101,
24893
- 118,
24894
- 101,
24895
- 110,
24896
- 116,
24897
- 95,
24898
- 97,
24899
- 117,
24900
- 116,
24901
- 104,
24902
- 111,
24903
- 114,
24904
- 105,
24905
- 116,
24906
- 121
24907
- ]
24908
- }
24909
- ]
24910
- }
24103
+ name: "event_authority"
24911
24104
  },
24912
24105
  {
24913
24106
  name: "program"
@@ -24921,16 +24114,16 @@ var idl_default4 = {
24921
24114
  ]
24922
24115
  },
24923
24116
  {
24924
- name: "zap_protocol_fee",
24117
+ name: "withdraw_ineligible_reward",
24925
24118
  discriminator: [
24926
- 213,
24927
- 155,
24928
- 187,
24929
- 34,
24930
- 56,
24931
- 182,
24932
- 91,
24933
- 240
24119
+ 148,
24120
+ 206,
24121
+ 42,
24122
+ 195,
24123
+ 247,
24124
+ 49,
24125
+ 103,
24126
+ 8
24934
24127
  ],
24935
24128
  accounts: [
24936
24129
  {
@@ -24942,44 +24135,34 @@ var idl_default4 = {
24942
24135
  writable: true
24943
24136
  },
24944
24137
  {
24945
- name: "token_vault",
24138
+ name: "reward_vault",
24946
24139
  writable: true
24947
24140
  },
24948
24141
  {
24949
- name: "token_mint"
24142
+ name: "reward_mint"
24950
24143
  },
24951
24144
  {
24952
- name: "receiver_token",
24145
+ name: "funder_token_account",
24953
24146
  writable: true
24954
24147
  },
24955
24148
  {
24956
- name: "operator",
24957
- docs: [
24958
- "zap claim fee operator"
24959
- ]
24149
+ name: "funder",
24150
+ signer: true
24960
24151
  },
24961
24152
  {
24962
- name: "signer",
24963
- docs: [
24964
- "Operator"
24965
- ],
24966
- signer: true
24153
+ name: "token_program"
24967
24154
  },
24968
24155
  {
24969
- name: "token_program",
24970
- docs: [
24971
- "Token program"
24972
- ]
24156
+ name: "event_authority"
24973
24157
  },
24974
24158
  {
24975
- name: "sysvar_instructions",
24976
- address: "Sysvar1nstructions1111111111111111111111111"
24159
+ name: "program"
24977
24160
  }
24978
24161
  ],
24979
24162
  args: [
24980
24163
  {
24981
- name: "max_amount",
24982
- type: "u64"
24164
+ name: "reward_index",
24165
+ type: "u8"
24983
24166
  }
24984
24167
  ]
24985
24168
  }
@@ -25118,16 +24301,16 @@ var idl_default4 = {
25118
24301
  ]
25119
24302
  },
25120
24303
  {
25121
- name: "EvtClaimProtocolFee",
24304
+ name: "EvtClaimProtocolFee2",
25122
24305
  discriminator: [
25123
- 186,
25124
- 244,
25125
- 75,
25126
- 251,
25127
- 188,
25128
- 13,
25129
- 25,
25130
- 33
24306
+ 187,
24307
+ 133,
24308
+ 66,
24309
+ 9,
24310
+ 205,
24311
+ 161,
24312
+ 84,
24313
+ 13
25131
24314
  ]
25132
24315
  },
25133
24316
  {
@@ -25351,6 +24534,19 @@ var idl_default4 = {
25351
24534
  153
25352
24535
  ]
25353
24536
  },
24537
+ {
24538
+ name: "EvtUpdateDelegatePermission",
24539
+ discriminator: [
24540
+ 66,
24541
+ 188,
24542
+ 75,
24543
+ 151,
24544
+ 150,
24545
+ 232,
24546
+ 87,
24547
+ 93
24548
+ ]
24549
+ },
25354
24550
  {
25355
24551
  name: "EvtUpdatePoolFees",
25356
24552
  discriminator: [
@@ -25390,6 +24586,19 @@ var idl_default4 = {
25390
24586
  146
25391
24587
  ]
25392
24588
  },
24589
+ {
24590
+ name: "EvtWithdrawDeadLiquidityReward",
24591
+ discriminator: [
24592
+ 228,
24593
+ 66,
24594
+ 150,
24595
+ 195,
24596
+ 42,
24597
+ 62,
24598
+ 163,
24599
+ 13
24600
+ ]
24601
+ },
25393
24602
  {
25394
24603
  name: "EvtWithdrawIneligibleReward",
25395
24604
  discriminator: [
@@ -25744,6 +24953,31 @@ var idl_default4 = {
25744
24953
  code: 6067,
25745
24954
  name: "InvalidCompoundingFeeBps",
25746
24955
  msg: "Invalid compounding fee bps"
24956
+ },
24957
+ {
24958
+ code: 6068,
24959
+ name: "InvalidClaimProtocolFeeAccounts",
24960
+ msg: "Invalid claim protocol fee accounts"
24961
+ },
24962
+ {
24963
+ code: 6069,
24964
+ name: "TransferFeeExcludedAmountIsZero",
24965
+ msg: "Transfer fee excluded amount is zero"
24966
+ },
24967
+ {
24968
+ code: 6070,
24969
+ name: "DelegatedAmountNonZero",
24970
+ msg: "Delegated amount is not zero"
24971
+ },
24972
+ {
24973
+ code: 6071,
24974
+ name: "DeprecatedBaseFeeMode",
24975
+ msg: "Deprecated base fee mode"
24976
+ },
24977
+ {
24978
+ code: 6072,
24979
+ name: "InvalidConfigPermission",
24980
+ msg: "Invalid config permission"
25747
24981
  }
25748
24982
  ],
25749
24983
  types: [
@@ -26031,16 +25265,22 @@ var idl_default4 = {
26031
25265
  ],
26032
25266
  type: "u128"
26033
25267
  },
25268
+ {
25269
+ name: "permission",
25270
+ docs: [
25271
+ "config permission bitmask"
25272
+ ],
25273
+ type: "u128"
25274
+ },
26034
25275
  {
26035
25276
  name: "_padding_1",
26036
25277
  docs: [
26037
- "Fee curve point",
26038
25278
  "Padding for further use"
26039
25279
  ],
26040
25280
  type: {
26041
25281
  array: [
26042
25282
  "u64",
26043
- 10
25283
+ 8
26044
25284
  ]
26045
25285
  }
26046
25286
  }
@@ -26087,6 +25327,10 @@ var idl_default4 = {
26087
25327
  {
26088
25328
  name: "pool_creator_authority",
26089
25329
  type: "pubkey"
25330
+ },
25331
+ {
25332
+ name: "permission",
25333
+ type: "u128"
26090
25334
  }
26091
25335
  ]
26092
25336
  }
@@ -26287,7 +25531,7 @@ var idl_default4 = {
26287
25531
  }
26288
25532
  },
26289
25533
  {
26290
- name: "EvtClaimProtocolFee",
25534
+ name: "EvtClaimProtocolFee2",
26291
25535
  type: {
26292
25536
  kind: "struct",
26293
25537
  fields: [
@@ -26296,11 +25540,15 @@ var idl_default4 = {
26296
25540
  type: "pubkey"
26297
25541
  },
26298
25542
  {
26299
- name: "token_a_amount",
26300
- type: "u64"
25543
+ name: "receiver_token_account",
25544
+ type: "pubkey"
26301
25545
  },
26302
25546
  {
26303
- name: "token_b_amount",
25547
+ name: "token_mint",
25548
+ type: "pubkey"
25549
+ },
25550
+ {
25551
+ name: "amount",
26304
25552
  type: "u64"
26305
25553
  }
26306
25554
  ]
@@ -26434,6 +25682,10 @@ var idl_default4 = {
26434
25682
  {
26435
25683
  name: "config",
26436
25684
  type: "pubkey"
25685
+ },
25686
+ {
25687
+ name: "permission",
25688
+ type: "u128"
26437
25689
  }
26438
25690
  ]
26439
25691
  }
@@ -26457,6 +25709,10 @@ var idl_default4 = {
26457
25709
  {
26458
25710
  name: "index",
26459
25711
  type: "u64"
25712
+ },
25713
+ {
25714
+ name: "permission",
25715
+ type: "u128"
26460
25716
  }
26461
25717
  ]
26462
25718
  }
@@ -27008,6 +26264,32 @@ var idl_default4 = {
27008
26264
  ]
27009
26265
  }
27010
26266
  },
26267
+ {
26268
+ name: "EvtUpdateDelegatePermission",
26269
+ type: {
26270
+ kind: "struct",
26271
+ fields: [
26272
+ {
26273
+ name: "position",
26274
+ type: "pubkey"
26275
+ },
26276
+ {
26277
+ name: "owner",
26278
+ type: "pubkey"
26279
+ },
26280
+ {
26281
+ name: "permission",
26282
+ type: "u32"
26283
+ },
26284
+ {
26285
+ name: "delegate",
26286
+ type: {
26287
+ option: "pubkey"
26288
+ }
26289
+ }
26290
+ ]
26291
+ }
26292
+ },
27011
26293
  {
27012
26294
  name: "EvtUpdatePoolFees",
27013
26295
  type: {
@@ -27080,6 +26362,26 @@ var idl_default4 = {
27080
26362
  ]
27081
26363
  }
27082
26364
  },
26365
+ {
26366
+ name: "EvtWithdrawDeadLiquidityReward",
26367
+ type: {
26368
+ kind: "struct",
26369
+ fields: [
26370
+ {
26371
+ name: "pool",
26372
+ type: "pubkey"
26373
+ },
26374
+ {
26375
+ name: "reward_mint",
26376
+ type: "pubkey"
26377
+ },
26378
+ {
26379
+ name: "amount",
26380
+ type: "u64"
26381
+ }
26382
+ ]
26383
+ }
26384
+ },
27083
26385
  {
27084
26386
  name: "EvtWithdrawIneligibleReward",
27085
26387
  type: {
@@ -27508,9 +26810,21 @@ var idl_default4 = {
27508
26810
  ],
27509
26811
  type: "u64"
27510
26812
  },
26813
+ {
26814
+ name: "dead_liquidity_fee_checkpoint",
26815
+ docs: [
26816
+ "Cumulative dead-liquidity fee (Compounding Pool only)"
26817
+ ],
26818
+ type: "u64"
26819
+ },
27511
26820
  {
27512
26821
  name: "padding_2",
27513
- type: "u128"
26822
+ type: {
26823
+ array: [
26824
+ "u8",
26825
+ 8
26826
+ ]
26827
+ }
27514
26828
  },
27515
26829
  {
27516
26830
  name: "sqrt_min_price",
@@ -28071,12 +27385,24 @@ var idl_default4 = {
28071
27385
  }
28072
27386
  }
28073
27387
  },
27388
+ {
27389
+ name: "delegate_permission",
27390
+ docs: [
27391
+ "delegate permission bitmask (paired with SPL token Approve)"
27392
+ ],
27393
+ type: "u32"
27394
+ },
28074
27395
  {
28075
27396
  name: "padding",
28076
27397
  docs: [
28077
27398
  "padding for future usage"
28078
27399
  ],
28079
- type: "u128"
27400
+ type: {
27401
+ array: [
27402
+ "u8",
27403
+ 12
27404
+ ]
27405
+ }
28080
27406
  }
28081
27407
  ]
28082
27408
  }
@@ -28169,16 +27495,11 @@ var idl_default4 = {
28169
27495
  }
28170
27496
  },
28171
27497
  {
28172
- name: "_padding_1",
27498
+ name: "dead_liquidity_reward_checkpoint",
28173
27499
  docs: [
28174
- "Padding to ensure `reward_rate: u128` is 16-byte aligned"
27500
+ "Cumulative dead-liquidity reward (Compounding Pool only)"
28175
27501
  ],
28176
- type: {
28177
- array: [
28178
- "u8",
28179
- 8
28180
- ]
28181
- }
27502
+ type: "u64"
28182
27503
  },
28183
27504
  {
28184
27505
  name: "mint",
@@ -28557,6 +27878,10 @@ var idl_default4 = {
28557
27878
  {
28558
27879
  name: "collect_fee_mode",
28559
27880
  type: "u8"
27881
+ },
27882
+ {
27883
+ name: "permission",
27884
+ type: "u128"
28560
27885
  }
28561
27886
  ]
28562
27887
  }
@@ -28715,6 +28040,17 @@ var idl_default4 = {
28715
28040
  }
28716
28041
  }
28717
28042
  }
28043
+ },
28044
+ {
28045
+ name: "compounding_fee_bps",
28046
+ docs: [
28047
+ "Compounding fee update mode:",
28048
+ "- None: skip compounding fee update",
28049
+ "- Some: update compounding_fee_bps; pool must use CollectFeeMode::Compounding"
28050
+ ],
28051
+ type: {
28052
+ option: "u16"
28053
+ }
28718
28054
  }
28719
28055
  ]
28720
28056
  }
@@ -29075,7 +28411,7 @@ var StateService = class {
29075
28411
  address,
29076
28412
  this.commitment
29077
28413
  );
29078
- return _nullishCoalesce(_optionalChain([configWithTransferHook, 'optionalAccess', _29 => _29.config]), () => ( null));
28414
+ return _nullishCoalesce(_optionalChain([configWithTransferHook, 'optionalAccess', _32 => _32.config]), () => ( null));
29079
28415
  }
29080
28416
  /**
29081
28417
  * Fetch all pool config accounts.
@@ -29335,6 +28671,17 @@ var StateService = class {
29335
28671
  );
29336
28672
  return metadata;
29337
28673
  }
28674
+ /**
28675
+ * Fetch the DBC token badge for a mint, if one exists.
28676
+ */
28677
+ async getTokenBadge(tokenMint) {
28678
+ const mint = tokenMint instanceof _web3js.PublicKey ? tokenMint : new (0, _web3js.PublicKey)(tokenMint);
28679
+ const address = deriveTokenBadgeAddress(mint);
28680
+ return this.program.account.tokenBadge.fetchNullable(
28681
+ address,
28682
+ this.commitment
28683
+ );
28684
+ }
29338
28685
  };
29339
28686
 
29340
28687
  // src/services/program.ts
@@ -29378,7 +28725,7 @@ var DynamicBondingCurveProgram = class {
29378
28725
  outputTokenProgram: getTokenProgram(virtualPoolState.poolType)
29379
28726
  };
29380
28727
  }
29381
- async buildCreateConfigTx(configParam, config, feeClaimer, leftoverReceiver, quoteMint, payer) {
28728
+ async buildCreateConfigTx(configParam, config, feeClaimer, leftoverReceiver, quoteMint, payer, tokenBadge) {
29382
28729
  validateConfigParameters({ ...configParam, leftoverReceiver });
29383
28730
  return this.program.methods.createConfig(configParam).accountsPartial({
29384
28731
  config,
@@ -29386,9 +28733,9 @@ var DynamicBondingCurveProgram = class {
29386
28733
  leftoverReceiver,
29387
28734
  quoteMint,
29388
28735
  payer
29389
- }).transaction();
28736
+ }).remainingAccounts(getTokenBadgeRemainingAccounts(tokenBadge)).transaction();
29390
28737
  }
29391
- async buildCreateConfigWithTransferHookTx(configParam, config, feeClaimer, leftoverReceiver, quoteMint, transferHookProgram, payer) {
28738
+ async buildCreateConfigWithTransferHookTx(configParam, config, feeClaimer, leftoverReceiver, quoteMint, transferHookProgram, payer, tokenBadge) {
29392
28739
  validateConfigParameters(
29393
28740
  { ...configParam, leftoverReceiver },
29394
28741
  { isTransferHook: true, transferHookProgram }
@@ -29400,7 +28747,7 @@ var DynamicBondingCurveProgram = class {
29400
28747
  quoteMint,
29401
28748
  transferHookProgram,
29402
28749
  payer
29403
- }).transaction();
28750
+ }).remainingAccounts(getTokenBadgeRemainingAccounts(tokenBadge)).transaction();
29404
28751
  }
29405
28752
  async initializeSplPool(params) {
29406
28753
  const {
@@ -29415,7 +28762,9 @@ var DynamicBondingCurveProgram = class {
29415
28762
  baseMint,
29416
28763
  baseVault,
29417
28764
  quoteVault,
29418
- quoteMint
28765
+ quoteMint,
28766
+ tokenBadge,
28767
+ tokenQuoteProgram
29419
28768
  } = params;
29420
28769
  return this.program.methods.initializeVirtualPoolWithSplToken({
29421
28770
  name,
@@ -29432,10 +28781,10 @@ var DynamicBondingCurveProgram = class {
29432
28781
  baseVault,
29433
28782
  quoteVault,
29434
28783
  quoteMint,
29435
- tokenQuoteProgram: _spltoken.TOKEN_PROGRAM_ID,
28784
+ tokenQuoteProgram,
29436
28785
  metadataProgram: METAPLEX_PROGRAM_ID,
29437
28786
  tokenProgram: _spltoken.TOKEN_PROGRAM_ID
29438
- }).transaction();
28787
+ }).remainingAccounts(getTokenBadgeRemainingAccounts(tokenBadge)).transaction();
29439
28788
  }
29440
28789
  async initializeToken2022Pool(params) {
29441
28790
  const {
@@ -29449,7 +28798,9 @@ var DynamicBondingCurveProgram = class {
29449
28798
  baseMint,
29450
28799
  baseVault,
29451
28800
  quoteVault,
29452
- quoteMint
28801
+ quoteMint,
28802
+ tokenBadge,
28803
+ tokenQuoteProgram
29453
28804
  } = params;
29454
28805
  return this.program.methods.initializeVirtualPoolWithToken2022({
29455
28806
  name,
@@ -29465,9 +28816,9 @@ var DynamicBondingCurveProgram = class {
29465
28816
  baseVault,
29466
28817
  quoteVault,
29467
28818
  quoteMint,
29468
- tokenQuoteProgram: _spltoken.TOKEN_PROGRAM_ID,
28819
+ tokenQuoteProgram,
29469
28820
  tokenProgram: _spltoken.TOKEN_2022_PROGRAM_ID
29470
- }).transaction();
28821
+ }).remainingAccounts(getTokenBadgeRemainingAccounts(tokenBadge)).transaction();
29471
28822
  }
29472
28823
  async initializeToken2022PoolWithTransferHook(params) {
29473
28824
  const {
@@ -29483,7 +28834,8 @@ var DynamicBondingCurveProgram = class {
29483
28834
  quoteVault,
29484
28835
  quoteMint,
29485
28836
  transferHookProgram,
29486
- tokenQuoteProgram
28837
+ tokenQuoteProgram,
28838
+ tokenBadge
29487
28839
  } = params;
29488
28840
  return this.program.methods.initializeVirtualPoolWithToken2022TransferHook({
29489
28841
  name,
@@ -29502,13 +28854,27 @@ var DynamicBondingCurveProgram = class {
29502
28854
  transferHookProgram,
29503
28855
  tokenQuoteProgram,
29504
28856
  tokenProgram: _spltoken.TOKEN_2022_PROGRAM_ID
29505
- }).transaction();
28857
+ }).remainingAccounts(getTokenBadgeRemainingAccounts(tokenBadge)).transaction();
29506
28858
  }
29507
28859
  async buildCreatePoolTx(createPoolParam, tokenType, quoteMint) {
29508
- const { baseMint, name, symbol, uri, poolCreator, config, payer } = createPoolParam;
28860
+ const {
28861
+ baseMint,
28862
+ name,
28863
+ symbol,
28864
+ uri,
28865
+ poolCreator,
28866
+ config,
28867
+ payer,
28868
+ tokenBadge
28869
+ } = createPoolParam;
29509
28870
  const pool = deriveDbcPoolAddress(quoteMint, baseMint, config);
29510
28871
  const baseVault = deriveDbcTokenVaultAddress(pool, baseMint);
29511
28872
  const quoteVault = deriveDbcTokenVaultAddress(pool, quoteMint);
28873
+ const quoteTokenType = await getTokenType(this.connection, quoteMint);
28874
+ if (quoteTokenType === null) {
28875
+ throw new Error(`Invalid quote mint: ${quoteMint.toString()}`);
28876
+ }
28877
+ const tokenQuoteProgram = getTokenProgram(quoteTokenType);
29512
28878
  const baseParams = {
29513
28879
  name,
29514
28880
  symbol,
@@ -29520,13 +28886,21 @@ var DynamicBondingCurveProgram = class {
29520
28886
  baseMint,
29521
28887
  baseVault,
29522
28888
  quoteVault,
29523
- quoteMint
28889
+ quoteMint,
28890
+ tokenBadge
29524
28891
  };
29525
28892
  if (tokenType === 0 /* SPLToken */) {
29526
28893
  const mintMetadata = deriveMintMetadata(baseMint);
29527
- return this.initializeSplPool({ ...baseParams, mintMetadata });
28894
+ return this.initializeSplPool({
28895
+ ...baseParams,
28896
+ mintMetadata,
28897
+ tokenQuoteProgram
28898
+ });
29528
28899
  }
29529
- return this.initializeToken2022Pool(baseParams);
28900
+ return this.initializeToken2022Pool({
28901
+ ...baseParams,
28902
+ tokenQuoteProgram
28903
+ });
29530
28904
  }
29531
28905
  async buildCreatePoolWithTransferHookTx(createPoolParam, quoteMint, tokenQuoteProgram) {
29532
28906
  const {
@@ -29537,7 +28911,8 @@ var DynamicBondingCurveProgram = class {
29537
28911
  poolCreator,
29538
28912
  config,
29539
28913
  payer,
29540
- transferHookProgram
28914
+ transferHookProgram,
28915
+ tokenBadge
29541
28916
  } = createPoolParam;
29542
28917
  if (!validateTransferHookProgram(transferHookProgram)) {
29543
28918
  throw new Error(
@@ -29560,7 +28935,8 @@ var DynamicBondingCurveProgram = class {
29560
28935
  quoteVault,
29561
28936
  quoteMint,
29562
28937
  transferHookProgram,
29563
- tokenQuoteProgram
28938
+ tokenQuoteProgram,
28939
+ tokenBadge
29564
28940
  });
29565
28941
  }
29566
28942
  async buildSwapBuyTx(firstBuyParam, baseMint, config, baseFee, swapBaseForQuote, activationType, tokenType, quoteMint, enableFirstSwapWithMinFee) {
@@ -29613,7 +28989,8 @@ var DynamicBondingCurveProgram = class {
29613
28989
  buyer,
29614
28990
  buyer,
29615
28991
  true,
29616
- inputTokenProgram
28992
+ inputTokenProgram,
28993
+ this.commitment
29617
28994
  ),
29618
28995
  getOrCreateATAInstruction(
29619
28996
  this.connection,
@@ -29621,7 +28998,8 @@ var DynamicBondingCurveProgram = class {
29621
28998
  receiver ? receiver : buyer,
29622
28999
  buyer,
29623
29000
  true,
29624
- outputTokenProgram
29001
+ outputTokenProgram,
29002
+ this.commitment
29625
29003
  )
29626
29004
  ]);
29627
29005
  createAtaTokenAIx && preInstructions.push(createAtaTokenAIx);
@@ -29719,7 +29097,8 @@ var DynamicBondingCurveProgram = class {
29719
29097
  buyer,
29720
29098
  buyer,
29721
29099
  true,
29722
- inputTokenProgram
29100
+ inputTokenProgram,
29101
+ this.commitment
29723
29102
  ),
29724
29103
  getOrCreateATAInstruction(
29725
29104
  this.connection,
@@ -29727,7 +29106,8 @@ var DynamicBondingCurveProgram = class {
29727
29106
  receiver ? receiver : buyer,
29728
29107
  buyer,
29729
29108
  true,
29730
- outputTokenProgram
29109
+ outputTokenProgram,
29110
+ this.commitment
29731
29111
  )
29732
29112
  ]);
29733
29113
  createAtaTokenAIx && preInstructions.push(createAtaTokenAIx);
@@ -29943,7 +29323,8 @@ var DynamicBondingCurveProgram = class {
29943
29323
  sender,
29944
29324
  sender,
29945
29325
  true,
29946
- tokenQuoteProgram
29326
+ tokenQuoteProgram,
29327
+ this.commitment
29947
29328
  );
29948
29329
  createTokenQuoteAccountIx && preInstructions.push(createTokenQuoteAccountIx);
29949
29330
  if (poolConfigState.quoteMint.equals(_spltoken.NATIVE_MINT)) {
@@ -29973,7 +29354,8 @@ var DynamicBondingCurveProgram = class {
29973
29354
  owner,
29974
29355
  payer,
29975
29356
  true,
29976
- tokenAProgram
29357
+ tokenAProgram,
29358
+ this.commitment
29977
29359
  ),
29978
29360
  getOrCreateATAInstruction(
29979
29361
  this.connection,
@@ -29981,7 +29363,8 @@ var DynamicBondingCurveProgram = class {
29981
29363
  owner,
29982
29364
  payer,
29983
29365
  true,
29984
- tokenBProgram
29366
+ tokenBProgram,
29367
+ this.commitment
29985
29368
  )
29986
29369
  ]);
29987
29370
  createAtaTokenAIx && instructions.push(createAtaTokenAIx);
@@ -30073,7 +29456,8 @@ var MigrationService = class extends DynamicBondingCurveProgram {
30073
29456
  poolConfigState.leftoverReceiver,
30074
29457
  payer,
30075
29458
  true,
30076
- tokenBaseProgram
29459
+ tokenBaseProgram,
29460
+ this.commitment
30077
29461
  );
30078
29462
  createBaseTokenAccountIx && preInstructions.push(createBaseTokenAccountIx);
30079
29463
  return this.program.methods.withdrawLeftover().accountsPartial({
@@ -30518,6 +29902,7 @@ var PartnerService = class extends DynamicBondingCurveProgram {
30518
29902
  leftoverReceiver,
30519
29903
  quoteMint,
30520
29904
  payer,
29905
+ tokenBadge,
30521
29906
  ...configParam
30522
29907
  } = params;
30523
29908
  return this.buildCreateConfigTx(
@@ -30526,7 +29911,8 @@ var PartnerService = class extends DynamicBondingCurveProgram {
30526
29911
  new (0, _web3js.PublicKey)(feeClaimer),
30527
29912
  new (0, _web3js.PublicKey)(leftoverReceiver),
30528
29913
  new (0, _web3js.PublicKey)(quoteMint),
30529
- new (0, _web3js.PublicKey)(payer)
29914
+ new (0, _web3js.PublicKey)(payer),
29915
+ tokenBadge ? new (0, _web3js.PublicKey)(tokenBadge) : void 0
30530
29916
  );
30531
29917
  }
30532
29918
  /**
@@ -30540,6 +29926,7 @@ var PartnerService = class extends DynamicBondingCurveProgram {
30540
29926
  quoteMint,
30541
29927
  transferHookProgram,
30542
29928
  payer,
29929
+ tokenBadge,
30543
29930
  ...configParam
30544
29931
  } = params;
30545
29932
  return this.buildCreateConfigWithTransferHookTx(
@@ -30549,7 +29936,8 @@ var PartnerService = class extends DynamicBondingCurveProgram {
30549
29936
  new (0, _web3js.PublicKey)(leftoverReceiver),
30550
29937
  new (0, _web3js.PublicKey)(quoteMint),
30551
29938
  new (0, _web3js.PublicKey)(transferHookProgram),
30552
- new (0, _web3js.PublicKey)(payer)
29939
+ new (0, _web3js.PublicKey)(payer),
29940
+ tokenBadge ? new (0, _web3js.PublicKey)(tokenBadge) : void 0
30553
29941
  );
30554
29942
  }
30555
29943
  /**
@@ -30563,25 +29951,29 @@ var PartnerService = class extends DynamicBondingCurveProgram {
30563
29951
  quoteMint,
30564
29952
  payer,
30565
29953
  preCreatePoolParam,
29954
+ tokenBadge,
30566
29955
  ...configParam
30567
29956
  } = params;
30568
29957
  const tx = new (0, _web3js.Transaction)();
30569
29958
  const configKey = new (0, _web3js.PublicKey)(config);
30570
29959
  const quoteMintToken = new (0, _web3js.PublicKey)(quoteMint);
30571
29960
  const payerAddress = new (0, _web3js.PublicKey)(payer);
29961
+ const tokenBadgeKey = tokenBadge ? new (0, _web3js.PublicKey)(tokenBadge) : void 0;
30572
29962
  const createConfigTx = await this.buildCreateConfigTx(
30573
29963
  configParam,
30574
29964
  configKey,
30575
29965
  new (0, _web3js.PublicKey)(feeClaimer),
30576
29966
  new (0, _web3js.PublicKey)(leftoverReceiver),
30577
29967
  quoteMintToken,
30578
- payerAddress
29968
+ payerAddress,
29969
+ tokenBadgeKey
30579
29970
  );
30580
29971
  const createPoolTx = await this.buildCreatePoolTx(
30581
29972
  {
30582
29973
  ...preCreatePoolParam,
30583
29974
  config: configKey,
30584
- payer: payerAddress
29975
+ payer: payerAddress,
29976
+ tokenBadge: tokenBadgeKey
30585
29977
  },
30586
29978
  params.tokenType,
30587
29979
  quoteMintToken
@@ -30601,12 +29993,14 @@ var PartnerService = class extends DynamicBondingCurveProgram {
30601
29993
  transferHookProgram,
30602
29994
  payer,
30603
29995
  preCreatePoolParam,
29996
+ tokenBadge,
30604
29997
  ...configParam
30605
29998
  } = params;
30606
29999
  const tx = new (0, _web3js.Transaction)();
30607
30000
  const configKey = new (0, _web3js.PublicKey)(config);
30608
30001
  const quoteMintToken = new (0, _web3js.PublicKey)(quoteMint);
30609
30002
  const payerAddress = new (0, _web3js.PublicKey)(payer);
30003
+ const tokenBadgeKey = tokenBadge ? new (0, _web3js.PublicKey)(tokenBadge) : void 0;
30610
30004
  const createConfigTx = await this.buildCreateConfigWithTransferHookTx(
30611
30005
  configParam,
30612
30006
  configKey,
@@ -30614,7 +30008,8 @@ var PartnerService = class extends DynamicBondingCurveProgram {
30614
30008
  new (0, _web3js.PublicKey)(leftoverReceiver),
30615
30009
  quoteMintToken,
30616
30010
  new (0, _web3js.PublicKey)(transferHookProgram),
30617
- payerAddress
30011
+ payerAddress,
30012
+ tokenBadgeKey
30618
30013
  );
30619
30014
  const tokenQuoteProgram = getTokenProgram(
30620
30015
  await getTokenType(this.connection, quoteMintToken)
@@ -30624,7 +30019,8 @@ var PartnerService = class extends DynamicBondingCurveProgram {
30624
30019
  ...preCreatePoolParam,
30625
30020
  config: configKey,
30626
30021
  payer: payerAddress,
30627
- transferHookProgram: new (0, _web3js.PublicKey)(transferHookProgram)
30022
+ transferHookProgram: new (0, _web3js.PublicKey)(transferHookProgram),
30023
+ tokenBadge: tokenBadgeKey
30628
30024
  },
30629
30025
  quoteMintToken,
30630
30026
  tokenQuoteProgram
@@ -30646,23 +30042,27 @@ var PartnerService = class extends DynamicBondingCurveProgram {
30646
30042
  payer,
30647
30043
  preCreatePoolParam,
30648
30044
  firstBuyParam,
30045
+ tokenBadge,
30649
30046
  ...configParam
30650
30047
  } = params;
30651
30048
  const configKey = new (0, _web3js.PublicKey)(config);
30652
30049
  const quoteMintToken = new (0, _web3js.PublicKey)(quoteMint);
30653
30050
  const payerAddress = new (0, _web3js.PublicKey)(payer);
30051
+ const tokenBadgeKey = tokenBadge ? new (0, _web3js.PublicKey)(tokenBadge) : void 0;
30654
30052
  const createConfigTx = await this.buildCreateConfigTx(
30655
30053
  configParam,
30656
30054
  configKey,
30657
30055
  new (0, _web3js.PublicKey)(feeClaimer),
30658
30056
  new (0, _web3js.PublicKey)(leftoverReceiver),
30659
30057
  quoteMintToken,
30660
- payerAddress
30058
+ payerAddress,
30059
+ tokenBadgeKey
30661
30060
  );
30662
30061
  const createPoolParam = {
30663
30062
  ...preCreatePoolParam,
30664
30063
  config: configKey,
30665
- payer: payerAddress
30064
+ payer: payerAddress,
30065
+ tokenBadge: tokenBadgeKey
30666
30066
  };
30667
30067
  const createPoolWithFirstBuyTx = await this.buildCreatePoolTx(
30668
30068
  createPoolParam,
@@ -30701,12 +30101,14 @@ var PartnerService = class extends DynamicBondingCurveProgram {
30701
30101
  payer,
30702
30102
  preCreatePoolParam,
30703
30103
  firstBuyParam,
30104
+ tokenBadge,
30704
30105
  ...configParam
30705
30106
  } = params;
30706
30107
  const configKey = new (0, _web3js.PublicKey)(config);
30707
30108
  const quoteMintToken = new (0, _web3js.PublicKey)(quoteMint);
30708
30109
  const payerAddress = new (0, _web3js.PublicKey)(payer);
30709
30110
  const transferHookProgramKey = new (0, _web3js.PublicKey)(transferHookProgram);
30111
+ const tokenBadgeKey = tokenBadge ? new (0, _web3js.PublicKey)(tokenBadge) : void 0;
30710
30112
  const createConfigTx = await this.buildCreateConfigWithTransferHookTx(
30711
30113
  configParam,
30712
30114
  configKey,
@@ -30714,7 +30116,8 @@ var PartnerService = class extends DynamicBondingCurveProgram {
30714
30116
  new (0, _web3js.PublicKey)(leftoverReceiver),
30715
30117
  quoteMintToken,
30716
30118
  transferHookProgramKey,
30717
- payerAddress
30119
+ payerAddress,
30120
+ tokenBadgeKey
30718
30121
  );
30719
30122
  const tokenQuoteProgram = getTokenProgram(
30720
30123
  await getTokenType(this.connection, quoteMintToken)
@@ -30724,7 +30127,8 @@ var PartnerService = class extends DynamicBondingCurveProgram {
30724
30127
  ...preCreatePoolParam,
30725
30128
  config: configKey,
30726
30129
  payer: payerAddress,
30727
- transferHookProgram: transferHookProgramKey
30130
+ transferHookProgram: transferHookProgramKey,
30131
+ tokenBadge: tokenBadgeKey
30728
30132
  },
30729
30133
  quoteMintToken,
30730
30134
  tokenQuoteProgram
@@ -30944,7 +30348,8 @@ var PartnerService = class extends DynamicBondingCurveProgram {
30944
30348
  feeClaimer,
30945
30349
  feeClaimer,
30946
30350
  true,
30947
- tokenQuoteProgram
30351
+ tokenQuoteProgram,
30352
+ this.commitment
30948
30353
  );
30949
30354
  createQuoteTokenAccountIx && preInstructions.push(createQuoteTokenAccountIx);
30950
30355
  if (poolConfigState.quoteMint.equals(_spltoken.NATIVE_MINT)) {
@@ -31522,11 +30927,18 @@ var PoolService = class extends DynamicBondingCurveProgram {
31522
30927
 
31523
30928
 
31524
30929
 
31525
-
31526
-
31527
-
31528
-
31529
30930
  var CreatorService = class extends DynamicBondingCurveProgram {
30931
+ async getPoolConfigForNewPool(config) {
30932
+ const poolConfigState = await this.state.getPoolConfig(config);
30933
+ if (!poolConfigState) {
30934
+ throw new Error(`Pool config not found for virtual pool`);
30935
+ }
30936
+ assertConfigAllowsNewPool({
30937
+ baseFeeMode: poolConfigState.poolFees.baseFee.baseFeeMode,
30938
+ migrationOption: poolConfigState.migrationOption
30939
+ });
30940
+ return poolConfigState;
30941
+ }
31530
30942
  /**
31531
30943
  * Build a transaction that creates metadata for a virtual pool.
31532
30944
  */
@@ -31551,10 +30963,7 @@ var CreatorService = class extends DynamicBondingCurveProgram {
31551
30963
  */
31552
30964
  async createPool(params) {
31553
30965
  const { config } = params;
31554
- const poolConfigState = await this.state.getPoolConfig(config);
31555
- if (!poolConfigState) {
31556
- throw new Error(`Pool config not found for virtual pool`);
31557
- }
30966
+ const poolConfigState = await this.getPoolConfigForNewPool(config);
31558
30967
  return this.buildCreatePoolTx(
31559
30968
  params,
31560
30969
  poolConfigState.tokenType,
@@ -31566,10 +30975,7 @@ var CreatorService = class extends DynamicBondingCurveProgram {
31566
30975
  */
31567
30976
  async createPoolWithTransferHook(params) {
31568
30977
  const { config } = params;
31569
- const poolConfigState = await this.state.getPoolConfig(config);
31570
- if (!poolConfigState) {
31571
- throw new Error(`Pool config not found for virtual pool`);
31572
- }
30978
+ const poolConfigState = await this.getPoolConfigForNewPool(config);
31573
30979
  const tokenQuoteProgram = getTokenProgram(
31574
30980
  poolConfigState.quoteTokenFlag
31575
30981
  );
@@ -31587,10 +30993,7 @@ var CreatorService = class extends DynamicBondingCurveProgram {
31587
30993
  async createPoolWithFirstBuy(params) {
31588
30994
  const { createPoolParam, firstBuyParam } = params;
31589
30995
  const { config } = createPoolParam;
31590
- const poolConfigState = await this.state.getPoolConfig(config);
31591
- if (!poolConfigState) {
31592
- throw new Error(`Pool config not found for virtual pool`);
31593
- }
30996
+ const poolConfigState = await this.getPoolConfigForNewPool(config);
31594
30997
  const createPoolWithFirstBuyTx = await this.buildCreatePoolTx(
31595
30998
  createPoolParam,
31596
30999
  poolConfigState.tokenType,
@@ -31618,10 +31021,7 @@ var CreatorService = class extends DynamicBondingCurveProgram {
31618
31021
  async createPoolWithFirstBuyWithTransferHook(params) {
31619
31022
  const { createPoolParam, firstBuyParam } = params;
31620
31023
  const { config } = createPoolParam;
31621
- const poolConfigState = await this.state.getPoolConfig(config);
31622
- if (!poolConfigState) {
31623
- throw new Error(`Pool config not found for virtual pool`);
31624
- }
31024
+ const poolConfigState = await this.getPoolConfigForNewPool(config);
31625
31025
  const createPoolWithFirstBuyTx = await this.buildCreatePoolWithTransferHookTx(
31626
31026
  createPoolParam,
31627
31027
  poolConfigState.quoteMint,
@@ -31647,10 +31047,7 @@ var CreatorService = class extends DynamicBondingCurveProgram {
31647
31047
  async createPoolWithPartnerAndCreatorFirstBuy(params) {
31648
31048
  const { createPoolParam, partnerFirstBuyParam, creatorFirstBuyParam } = params;
31649
31049
  const { config } = createPoolParam;
31650
- const poolConfigState = await this.state.getPoolConfig(config);
31651
- if (!poolConfigState) {
31652
- throw new Error(`Pool config not found for virtual pool`);
31653
- }
31050
+ const poolConfigState = await this.getPoolConfigForNewPool(config);
31654
31051
  const createPoolWithFirstBuysTx = await this.buildCreatePoolTx(
31655
31052
  createPoolParam,
31656
31053
  poolConfigState.tokenType,
@@ -31704,10 +31101,7 @@ var CreatorService = class extends DynamicBondingCurveProgram {
31704
31101
  async createPoolWithPartnerAndCreatorFirstBuyWithTransferHook(params) {
31705
31102
  const { createPoolParam, partnerFirstBuyParam, creatorFirstBuyParam } = params;
31706
31103
  const { config } = createPoolParam;
31707
- const poolConfigState = await this.state.getPoolConfig(config);
31708
- if (!poolConfigState) {
31709
- throw new Error(`Pool config not found for virtual pool`);
31710
- }
31104
+ const poolConfigState = await this.getPoolConfigForNewPool(config);
31711
31105
  const createPoolWithFirstBuysTx = await this.buildCreatePoolWithTransferHookTx(
31712
31106
  createPoolParam,
31713
31107
  poolConfigState.quoteMint,
@@ -31903,19 +31297,19 @@ var CreatorService = class extends DynamicBondingCurveProgram {
31903
31297
  async creatorWithdrawSurplus(params) {
31904
31298
  const { creator, pool } = params;
31905
31299
  const { virtualPool, poolConfigState } = await this.getPoolWithConfig(pool);
31300
+ const tokenQuoteProgram = getTokenProgram(
31301
+ poolConfigState.quoteTokenFlag
31302
+ );
31906
31303
  const preInstructions = [];
31907
31304
  const postInstructions = [];
31908
- const tokenQuoteAccount = findAssociatedTokenAddress(
31909
- creator,
31305
+ const { ataPubkey: tokenQuoteAccount, ix: createQuoteTokenAccountIx } = await getOrCreateATAInstruction(
31306
+ this.connection,
31910
31307
  poolConfigState.quoteMint,
31911
- _spltoken.TOKEN_PROGRAM_ID
31912
- );
31913
- const createQuoteTokenAccountIx = _spltoken.createAssociatedTokenAccountIdempotentInstruction.call(void 0,
31914
31308
  creator,
31915
- tokenQuoteAccount,
31916
31309
  creator,
31917
- poolConfigState.quoteMint,
31918
- _spltoken.TOKEN_PROGRAM_ID
31310
+ true,
31311
+ tokenQuoteProgram,
31312
+ this.commitment
31919
31313
  );
31920
31314
  if (createQuoteTokenAccountIx) {
31921
31315
  preInstructions.push(createQuoteTokenAccountIx);
@@ -31935,7 +31329,7 @@ var CreatorService = class extends DynamicBondingCurveProgram {
31935
31329
  quoteVault: virtualPool.poolState.quoteVault,
31936
31330
  quoteMint: poolConfigState.quoteMint,
31937
31331
  creator,
31938
- tokenQuoteProgram: _spltoken.TOKEN_PROGRAM_ID
31332
+ tokenQuoteProgram
31939
31333
  };
31940
31334
  return this.program.methods.creatorWithdrawSurplus().accountsPartial(accounts).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
31941
31335
  }
@@ -32259,5 +31653,8 @@ var DynamicBondingCurveClient = class _DynamicBondingCurveClient {
32259
31653
 
32260
31654
 
32261
31655
 
32262
- exports.AccountsType = AccountsType; exports.ActivationType = ActivationType; exports.BASE_ADDRESS = BASE_ADDRESS; exports.BIN_STEP_BPS_DEFAULT = BIN_STEP_BPS_DEFAULT; exports.BIN_STEP_BPS_U128_DEFAULT = BIN_STEP_BPS_U128_DEFAULT; exports.BaseFeeMode = BaseFeeMode; 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.DEFAULT_LIQUIDITY_VESTING_INFO_PARAMS = DEFAULT_LIQUIDITY_VESTING_INFO_PARAMS; exports.DEFAULT_MIGRATED_POOL_FEE_PARAMS = DEFAULT_MIGRATED_POOL_FEE_PARAMS; exports.DEFAULT_MIGRATED_POOL_MARKET_CAP_FEE_SCHEDULER_PARAMS = DEFAULT_MIGRATED_POOL_MARKET_CAP_FEE_SCHEDULER_PARAMS; 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.DYNAMIC_FEE_ROUNDING_OFFSET = DYNAMIC_FEE_ROUNDING_OFFSET; exports.DYNAMIC_FEE_SCALING_FACTOR = DYNAMIC_FEE_SCALING_FACTOR; exports.DammV2BaseFeeMode = DammV2BaseFeeMode; exports.DammV2DynamicFeeMode = DammV2DynamicFeeMode; exports.DynamicBondingCurveClient = DynamicBondingCurveClient; exports.DynamicBondingCurveIdl = idl_default; exports.DynamicBondingCurveProgram = DynamicBondingCurveProgram; exports.FEE_DENOMINATOR = FEE_DENOMINATOR; exports.FeeRateLimiter = FeeRateLimiter; exports.FeeScheduler = FeeScheduler; exports.HOST_FEE_PERCENT = HOST_FEE_PERCENT; exports.LOCKER_PROGRAM_ID = LOCKER_PROGRAM_ID; exports.MAX_BASIS_POINT = MAX_BASIS_POINT; exports.MAX_CREATOR_MIGRATION_FEE_PERCENTAGE = MAX_CREATOR_MIGRATION_FEE_PERCENTAGE; exports.MAX_CURVE_POINT = MAX_CURVE_POINT; exports.MAX_FEE_BPS = MAX_FEE_BPS; exports.MAX_FEE_NUMERATOR = MAX_FEE_NUMERATOR; exports.MAX_LOCK_DURATION_IN_SECONDS = MAX_LOCK_DURATION_IN_SECONDS; exports.MAX_MIGRATED_POOL_FEE_BPS = MAX_MIGRATED_POOL_FEE_BPS; exports.MAX_MIGRATION_FEE_PERCENTAGE = MAX_MIGRATION_FEE_PERCENTAGE; exports.MAX_POOL_CREATION_FEE = MAX_POOL_CREATION_FEE; exports.MAX_PRICE_CHANGE_BPS_DEFAULT = MAX_PRICE_CHANGE_BPS_DEFAULT; exports.MAX_RATE_LIMITER_DURATION_IN_SECONDS = MAX_RATE_LIMITER_DURATION_IN_SECONDS; exports.MAX_RATE_LIMITER_DURATION_IN_SLOTS = MAX_RATE_LIMITER_DURATION_IN_SLOTS; exports.MAX_SQRT_PRICE = MAX_SQRT_PRICE; exports.METAPLEX_PROGRAM_ID = METAPLEX_PROGRAM_ID; exports.MIN_FEE_BPS = MIN_FEE_BPS; exports.MIN_FEE_NUMERATOR = MIN_FEE_NUMERATOR; exports.MIN_LOCKED_LIQUIDITY_BPS = MIN_LOCKED_LIQUIDITY_BPS; exports.MIN_MIGRATED_POOL_FEE_BPS = MIN_MIGRATED_POOL_FEE_BPS; exports.MIN_POOL_CREATION_FEE = MIN_POOL_CREATION_FEE; exports.MIN_SQRT_PRICE = MIN_SQRT_PRICE; exports.MigratedCollectFeeMode = MigratedCollectFeeMode; exports.MigrationFeeOption = MigrationFeeOption; exports.MigrationOption = MigrationOption; exports.MigrationService = MigrationService; exports.OFFSET = OFFSET; exports.ONE_Q64 = ONE_Q64; exports.PROTOCOL_FEE_PERCENT = PROTOCOL_FEE_PERCENT; exports.PROTOCOL_POOL_CREATION_FEE_PERCENT = PROTOCOL_POOL_CREATION_FEE_PERCENT; exports.PartnerService = PartnerService; exports.PoolService = PoolService; exports.RESOLUTION = RESOLUTION; exports.Rounding = Rounding; exports.SECONDS_PER_DAY = SECONDS_PER_DAY; exports.SWAP_BUFFER_PERCENTAGE = SWAP_BUFFER_PERCENTAGE; exports.SafeMath = SafeMath; exports.StateService = StateService; exports.SwapMode = SwapMode; exports.TokenAuthorityOption = TokenAuthorityOption; exports.TokenDecimal = TokenDecimal; exports.TokenType = TokenType; exports.TradeDirection = TradeDirection; exports.U128_MAX = U128_MAX; exports.U16_MAX = U16_MAX; exports.U24_MAX = U24_MAX; exports.U64_MAX = U64_MAX; exports.VAULT_PROGRAM_ID = VAULT_PROGRAM_ID; exports.bpsToFeeNumerator = bpsToFeeNumerator; exports.buildCurve = buildCurve; exports.buildCurveWithCustomSqrtPrices = buildCurveWithCustomSqrtPrices; exports.buildCurveWithLiquidityWeights = buildCurveWithLiquidityWeights; exports.buildCurveWithMarketCap = buildCurveWithMarketCap; exports.buildCurveWithMidPrice = buildCurveWithMidPrice; exports.buildCurveWithTwoSegments = buildCurveWithTwoSegments; exports.calculateAdjustedPercentageSupplyOnMigration = calculateAdjustedPercentageSupplyOnMigration; exports.calculateBaseToQuoteFromAmountIn = calculateBaseToQuoteFromAmountIn; exports.calculateBaseToQuoteFromAmountOut = calculateBaseToQuoteFromAmountOut; exports.calculateFeeSchedulerEndingBaseFeeBps = calculateFeeSchedulerEndingBaseFeeBps; exports.calculateLockedLiquidityBpsAtTime = calculateLockedLiquidityBpsAtTime; exports.calculateQuoteToBaseFromAmountIn = calculateQuoteToBaseFromAmountIn; exports.calculateQuoteToBaseFromAmountOut = calculateQuoteToBaseFromAmountOut; exports.checkRateLimiterApplied = checkRateLimiterApplied; exports.cleanUpTokenAccountTx = cleanUpTokenAccountTx; exports.computeSqrtPriceStepBps = computeSqrtPriceStepBps; exports.convertDecimalToBN = convertDecimalToBN; exports.convertToLamports = convertToLamports; exports.createDammV1Program = createDammV1Program; exports.createDammV2Program = createDammV2Program; exports.createDbcProgram = createDbcProgram; exports.createDynamicVaultProgram = createDynamicVaultProgram; exports.createInitializePermissionlessDynamicVaultIx = createInitializePermissionlessDynamicVaultIx; exports.createLockEscrowIx = createLockEscrowIx; exports.createProgramAccountFilter = createProgramAccountFilter; exports.createSqrtPrices = createSqrtPrices; 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.getBaseFeeHandler = getBaseFeeHandler; exports.getBaseFeeNumerator = getBaseFeeNumerator; exports.getBaseFeeNumeratorByPeriod = getBaseFeeNumeratorByPeriod; exports.getBaseFeeParams = getBaseFeeParams; exports.getBaseTokenForSwap = getBaseTokenForSwap; exports.getCheckedAmounts = getCheckedAmounts; exports.getCurrentPoint = getCurrentPoint; exports.getCurveBreakdown = getCurveBreakdown; exports.getDeltaAmountBaseUnsigned = getDeltaAmountBaseUnsigned; exports.getDeltaAmountBaseUnsigned256 = getDeltaAmountBaseUnsigned256; exports.getDeltaAmountBaseUnsignedUnchecked = getDeltaAmountBaseUnsignedUnchecked; exports.getDeltaAmountQuoteUnsigned = getDeltaAmountQuoteUnsigned; exports.getDeltaAmountQuoteUnsigned256 = getDeltaAmountQuoteUnsigned256; exports.getDeltaAmountQuoteUnsignedUnchecked = getDeltaAmountQuoteUnsignedUnchecked; exports.getDynamicFeeParams = getDynamicFeeParams; exports.getExcludedFeeAmount = getExcludedFeeAmount; exports.getFeeMode = getFeeMode; exports.getFeeNumeratorFromExcludedAmount = getFeeNumeratorFromExcludedAmount; exports.getFeeNumeratorFromIncludedAmount = getFeeNumeratorFromIncludedAmount; exports.getFeeNumeratorOnExponentialFeeScheduler = getFeeNumeratorOnExponentialFeeScheduler; exports.getFeeNumeratorOnLinearFeeScheduler = getFeeNumeratorOnLinearFeeScheduler; exports.getFeeOnAmount = getFeeOnAmount; exports.getFeeSchedulerMaxBaseFeeNumerator = getFeeSchedulerMaxBaseFeeNumerator; exports.getFeeSchedulerMinBaseFeeNumerator = getFeeSchedulerMinBaseFeeNumerator; exports.getFeeSchedulerParams = getFeeSchedulerParams; exports.getFirstCurve = getFirstCurve; exports.getFirstKey = getFirstKey; exports.getIncludedFeeAmount = getIncludedFeeAmount; exports.getInitialLiquidityFromDeltaBase = getInitialLiquidityFromDeltaBase; exports.getInitialLiquidityFromDeltaQuote = getInitialLiquidityFromDeltaQuote; exports.getLiquidity = getLiquidity; exports.getLiquidityVestingInfoParams = getLiquidityVestingInfoParams; exports.getLockedVestingParams = getLockedVestingParams; exports.getMaxIndex = getMaxIndex; exports.getMaxOutAmountWithMinBaseFee = getMaxOutAmountWithMinBaseFee; exports.getMigratedPoolFeeParams = getMigratedPoolFeeParams; exports.getMigratedPoolMarketCapFeeSchedulerParams = getMigratedPoolMarketCapFeeSchedulerParams; exports.getMigrationBaseToken = getMigrationBaseToken; exports.getMigrationQuoteAmount = getMigrationQuoteAmount; exports.getMigrationQuoteAmountFromMigrationQuoteThreshold = getMigrationQuoteAmountFromMigrationQuoteThreshold; exports.getMigrationQuoteThresholdFromMigrationQuoteAmount = getMigrationQuoteThresholdFromMigrationQuoteAmount; exports.getMigrationThresholdPrice = getMigrationThresholdPrice; exports.getNextSqrtPriceFromBaseAmountInRoundingUp = getNextSqrtPriceFromBaseAmountInRoundingUp; exports.getNextSqrtPriceFromBaseAmountOutRoundingUp = getNextSqrtPriceFromBaseAmountOutRoundingUp; exports.getNextSqrtPriceFromInput = getNextSqrtPriceFromInput; exports.getNextSqrtPriceFromOutput = getNextSqrtPriceFromOutput; exports.getNextSqrtPriceFromQuoteAmountInRoundingDown = getNextSqrtPriceFromQuoteAmountInRoundingDown; exports.getNextSqrtPriceFromQuoteAmountOutRoundingDown = getNextSqrtPriceFromQuoteAmountOutRoundingDown; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPercentageSupplyOnMigration = getPercentageSupplyOnMigration; exports.getPriceFromSqrtPrice = getPriceFromSqrtPrice; exports.getProtocolMigrationFee = getProtocolMigrationFee; exports.getQuoteReserveFromNextSqrtPrice = getQuoteReserveFromNextSqrtPrice; exports.getRateLimiterExcludedFeeAmount = getRateLimiterExcludedFeeAmount; exports.getRateLimiterMinBaseFeeNumerator = getRateLimiterMinBaseFeeNumerator; exports.getRateLimiterParams = getRateLimiterParams; exports.getSecondKey = getSecondKey; exports.getSqrtPriceFromMarketCap = getSqrtPriceFromMarketCap; exports.getSqrtPriceFromPrice = getSqrtPriceFromPrice; exports.getStartingBaseFeeBpsFromBaseFeeParams = getStartingBaseFeeBpsFromBaseFeeParams; exports.getSwapAmountWithBuffer = getSwapAmountWithBuffer; exports.getSwapResult = getSwapResult; exports.getSwapResultFromExactInput = getSwapResultFromExactInput; exports.getSwapResultFromExactOutput = getSwapResultFromExactOutput; exports.getSwapResultFromPartialInput = getSwapResultFromPartialInput; exports.getTokenDecimals = getTokenDecimals; exports.getTokenProgram = getTokenProgram; exports.getTokenType = getTokenType; exports.getTokenomics = getTokenomics; exports.getTotalFeeNumerator = getTotalFeeNumerator; exports.getTotalFeeNumeratorFromExcludedFeeAmount = getTotalFeeNumeratorFromExcludedFeeAmount; exports.getTotalFeeNumeratorFromIncludedFeeAmount = getTotalFeeNumeratorFromIncludedFeeAmount; exports.getTotalSupplyFromCurve = getTotalSupplyFromCurve; exports.getTotalTokenSupply = getTotalTokenSupply; exports.getTotalVestingAmount = getTotalVestingAmount; exports.getTwoCurve = getTwoCurve; exports.getVariableFeeNumerator = getVariableFeeNumerator; exports.getVestingLockedLiquidityBpsAtNSeconds = getVestingLockedLiquidityBpsAtNSeconds; exports.hasMintAuthority = hasMintAuthority; exports.isDefaultLockedVesting = isDefaultLockedVesting; exports.isDynamicFeeEnabled = isDynamicFeeEnabled; exports.isNativeSol = isNativeSol; exports.isNonZeroRateLimiter = isNonZeroRateLimiter; exports.isRateLimiterApplied = isRateLimiterApplied; exports.isZeroRateLimiter = isZeroRateLimiter; exports.mulDiv = mulDiv; exports.mulShr = mulShr; exports.pow = pow; exports.prepareSwapAmountParam = prepareSwapAmountParam; exports.prepareTokenAccountTx = prepareTokenAccountTx; exports.splitFees = splitFees; exports.sqrt = sqrt; exports.swapQuote = swapQuote; exports.swapQuoteExactIn = swapQuoteExactIn; exports.swapQuoteExactOut = swapQuoteExactOut; exports.swapQuotePartialFill = swapQuotePartialFill; exports.toNumerator = toNumerator; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.validateActivationType = validateActivationType; exports.validateBalance = validateBalance; exports.validateBaseTokenType = validateBaseTokenType; exports.validateCollectFeeMode = validateCollectFeeMode; exports.validateCompoundingFeeBps = validateCompoundingFeeBps; exports.validateConfigParameters = validateConfigParameters; exports.validateCurve = validateCurve; exports.validateDynamicFee = validateDynamicFee; exports.validateFeeRateLimiter = validateFeeRateLimiter; exports.validateFeeScheduler = validateFeeScheduler; exports.validateLPPercentages = validateLPPercentages; exports.validateLiquidityVestingInfo = validateLiquidityVestingInfo; exports.validateMarketCapFeeSchedulerRequiresPoolFeeBps = validateMarketCapFeeSchedulerRequiresPoolFeeBps; exports.validateMigratedCollectFeeMode = validateMigratedCollectFeeMode; exports.validateMigratedPoolBaseFeeMode = validateMigratedPoolBaseFeeMode; exports.validateMigratedPoolFee = validateMigratedPoolFee; exports.validateMigrationAndTokenType = validateMigrationAndTokenType; exports.validateMigrationFee = validateMigrationFee; exports.validateMigrationFeeOption = validateMigrationFeeOption; exports.validateMinimumLockedLiquidity = validateMinimumLockedLiquidity; exports.validatePoolCreationFee = validatePoolCreationFee; exports.validatePoolFees = validatePoolFees; exports.validateQuoteMintBasic = validateQuoteMintBasic; exports.validateSwapAmount = validateSwapAmount; exports.validateTokenAuthorityOptions = validateTokenAuthorityOptions; exports.validateTokenDecimals = validateTokenDecimals; exports.validateTokenSupply = validateTokenSupply; exports.validateTransferHookProgram = validateTransferHookProgram; exports.validateTransferHookProgramExecutable = validateTransferHookProgramExecutable; exports.wrapSOLInstruction = wrapSOLInstruction;
31656
+
31657
+
31658
+
31659
+ exports.AccountsType = AccountsType; exports.ActivationType = ActivationType; exports.BASE_ADDRESS = BASE_ADDRESS; exports.BIN_STEP_BPS_DEFAULT = BIN_STEP_BPS_DEFAULT; exports.BIN_STEP_BPS_U128_DEFAULT = BIN_STEP_BPS_U128_DEFAULT; exports.BaseFeeMode = BaseFeeMode; 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.DEFAULT_LIQUIDITY_VESTING_INFO_PARAMS = DEFAULT_LIQUIDITY_VESTING_INFO_PARAMS; exports.DEFAULT_MIGRATED_POOL_FEE_PARAMS = DEFAULT_MIGRATED_POOL_FEE_PARAMS; exports.DEFAULT_MIGRATED_POOL_MARKET_CAP_FEE_SCHEDULER_PARAMS = DEFAULT_MIGRATED_POOL_MARKET_CAP_FEE_SCHEDULER_PARAMS; 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.DYNAMIC_FEE_ROUNDING_OFFSET = DYNAMIC_FEE_ROUNDING_OFFSET; exports.DYNAMIC_FEE_SCALING_FACTOR = DYNAMIC_FEE_SCALING_FACTOR; exports.DammV2BaseFeeMode = DammV2BaseFeeMode; exports.DammV2DynamicFeeMode = DammV2DynamicFeeMode; exports.DynamicBondingCurveClient = DynamicBondingCurveClient; exports.DynamicBondingCurveIdl = idl_default; exports.DynamicBondingCurveProgram = DynamicBondingCurveProgram; exports.FEE_DENOMINATOR = FEE_DENOMINATOR; exports.FeeRateLimiter = FeeRateLimiter; exports.FeeScheduler = FeeScheduler; exports.HOST_FEE_PERCENT = HOST_FEE_PERCENT; exports.LOCKER_PROGRAM_ID = LOCKER_PROGRAM_ID; exports.MAX_BASIS_POINT = MAX_BASIS_POINT; exports.MAX_CREATOR_MIGRATION_FEE_PERCENTAGE = MAX_CREATOR_MIGRATION_FEE_PERCENTAGE; exports.MAX_CURVE_POINT = MAX_CURVE_POINT; exports.MAX_FEE_BPS = MAX_FEE_BPS; exports.MAX_FEE_NUMERATOR = MAX_FEE_NUMERATOR; exports.MAX_LOCK_DURATION_IN_SECONDS = MAX_LOCK_DURATION_IN_SECONDS; exports.MAX_MIGRATED_POOL_FEE_BPS = MAX_MIGRATED_POOL_FEE_BPS; exports.MAX_MIGRATION_FEE_PERCENTAGE = MAX_MIGRATION_FEE_PERCENTAGE; exports.MAX_POOL_CREATION_FEE = MAX_POOL_CREATION_FEE; exports.MAX_PRICE_CHANGE_BPS_DEFAULT = MAX_PRICE_CHANGE_BPS_DEFAULT; exports.MAX_RATE_LIMITER_DURATION_IN_SECONDS = MAX_RATE_LIMITER_DURATION_IN_SECONDS; exports.MAX_RATE_LIMITER_DURATION_IN_SLOTS = MAX_RATE_LIMITER_DURATION_IN_SLOTS; exports.MAX_SQRT_PRICE = MAX_SQRT_PRICE; exports.METAPLEX_PROGRAM_ID = METAPLEX_PROGRAM_ID; exports.MIN_FEE_BPS = MIN_FEE_BPS; exports.MIN_FEE_NUMERATOR = MIN_FEE_NUMERATOR; exports.MIN_LOCKED_LIQUIDITY_BPS = MIN_LOCKED_LIQUIDITY_BPS; exports.MIN_MIGRATED_POOL_FEE_BPS = MIN_MIGRATED_POOL_FEE_BPS; exports.MIN_POOL_CREATION_FEE = MIN_POOL_CREATION_FEE; exports.MIN_SQRT_PRICE = MIN_SQRT_PRICE; exports.MigratedCollectFeeMode = MigratedCollectFeeMode; exports.MigrationFeeOption = MigrationFeeOption; exports.MigrationOption = MigrationOption; exports.MigrationService = MigrationService; exports.OFFSET = OFFSET; exports.ONE_Q64 = ONE_Q64; exports.PROTOCOL_FEE_PERCENT = PROTOCOL_FEE_PERCENT; exports.PROTOCOL_POOL_CREATION_FEE_PERCENT = PROTOCOL_POOL_CREATION_FEE_PERCENT; exports.PartnerService = PartnerService; exports.PoolService = PoolService; exports.RESOLUTION = RESOLUTION; exports.Rounding = Rounding; exports.SECONDS_PER_DAY = SECONDS_PER_DAY; exports.SWAP_BUFFER_PERCENTAGE = SWAP_BUFFER_PERCENTAGE; exports.SafeMath = SafeMath; exports.StateService = StateService; exports.SwapMode = SwapMode; exports.TokenAuthorityOption = TokenAuthorityOption; exports.TokenDecimal = TokenDecimal; exports.TokenType = TokenType; exports.TradeDirection = TradeDirection; exports.U128_MAX = U128_MAX; exports.U16_MAX = U16_MAX; exports.U24_MAX = U24_MAX; exports.U64_MAX = U64_MAX; exports.VAULT_PROGRAM_ID = VAULT_PROGRAM_ID; exports.assertConfigAllowsNewPool = assertConfigAllowsNewPool; exports.bpsToFeeNumerator = bpsToFeeNumerator; exports.buildCurve = buildCurve; exports.buildCurveWithCustomSqrtPrices = buildCurveWithCustomSqrtPrices; exports.buildCurveWithLiquidityWeights = buildCurveWithLiquidityWeights; exports.buildCurveWithMarketCap = buildCurveWithMarketCap; exports.buildCurveWithMidPrice = buildCurveWithMidPrice; exports.buildCurveWithTwoSegments = buildCurveWithTwoSegments; exports.calculateAdjustedPercentageSupplyOnMigration = calculateAdjustedPercentageSupplyOnMigration; exports.calculateBaseToQuoteFromAmountIn = calculateBaseToQuoteFromAmountIn; exports.calculateBaseToQuoteFromAmountOut = calculateBaseToQuoteFromAmountOut; exports.calculateFeeSchedulerEndingBaseFeeBps = calculateFeeSchedulerEndingBaseFeeBps; exports.calculateLockedLiquidityBpsAtTime = calculateLockedLiquidityBpsAtTime; exports.calculateQuoteToBaseFromAmountIn = calculateQuoteToBaseFromAmountIn; exports.calculateQuoteToBaseFromAmountOut = calculateQuoteToBaseFromAmountOut; exports.checkRateLimiterApplied = checkRateLimiterApplied; exports.cleanUpTokenAccountTx = cleanUpTokenAccountTx; exports.computeSqrtPriceStepBps = computeSqrtPriceStepBps; exports.convertDecimalToBN = convertDecimalToBN; exports.convertToLamports = convertToLamports; exports.createDammV1Program = createDammV1Program; exports.createDammV2Program = createDammV2Program; exports.createDbcProgram = createDbcProgram; exports.createDynamicVaultProgram = createDynamicVaultProgram; exports.createInitializePermissionlessDynamicVaultIx = createInitializePermissionlessDynamicVaultIx; exports.createLockEscrowIx = createLockEscrowIx; exports.createProgramAccountFilter = createProgramAccountFilter; exports.createSqrtPrices = createSqrtPrices; 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.deriveTokenBadgeAddress = deriveTokenBadgeAddress; 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.getBaseFeeHandler = getBaseFeeHandler; exports.getBaseFeeNumerator = getBaseFeeNumerator; exports.getBaseFeeNumeratorByPeriod = getBaseFeeNumeratorByPeriod; exports.getBaseFeeParams = getBaseFeeParams; exports.getBaseTokenForSwap = getBaseTokenForSwap; exports.getCheckedAmounts = getCheckedAmounts; exports.getCurrentPoint = getCurrentPoint; exports.getCurveBreakdown = getCurveBreakdown; exports.getDeltaAmountBaseUnsigned = getDeltaAmountBaseUnsigned; exports.getDeltaAmountBaseUnsigned256 = getDeltaAmountBaseUnsigned256; exports.getDeltaAmountBaseUnsignedUnchecked = getDeltaAmountBaseUnsignedUnchecked; exports.getDeltaAmountQuoteUnsigned = getDeltaAmountQuoteUnsigned; exports.getDeltaAmountQuoteUnsigned256 = getDeltaAmountQuoteUnsigned256; exports.getDeltaAmountQuoteUnsignedUnchecked = getDeltaAmountQuoteUnsignedUnchecked; exports.getDynamicFeeParams = getDynamicFeeParams; exports.getExcludedFeeAmount = getExcludedFeeAmount; exports.getFeeMode = getFeeMode; exports.getFeeNumeratorFromExcludedAmount = getFeeNumeratorFromExcludedAmount; exports.getFeeNumeratorFromIncludedAmount = getFeeNumeratorFromIncludedAmount; exports.getFeeNumeratorOnExponentialFeeScheduler = getFeeNumeratorOnExponentialFeeScheduler; exports.getFeeNumeratorOnLinearFeeScheduler = getFeeNumeratorOnLinearFeeScheduler; exports.getFeeOnAmount = getFeeOnAmount; exports.getFeeSchedulerMaxBaseFeeNumerator = getFeeSchedulerMaxBaseFeeNumerator; exports.getFeeSchedulerMinBaseFeeNumerator = getFeeSchedulerMinBaseFeeNumerator; exports.getFeeSchedulerParams = getFeeSchedulerParams; exports.getFirstCurve = getFirstCurve; exports.getFirstKey = getFirstKey; exports.getIncludedFeeAmount = getIncludedFeeAmount; exports.getInitialLiquidityFromDeltaBase = getInitialLiquidityFromDeltaBase; exports.getInitialLiquidityFromDeltaQuote = getInitialLiquidityFromDeltaQuote; exports.getLiquidity = getLiquidity; exports.getLiquidityVestingInfoParams = getLiquidityVestingInfoParams; exports.getLockedVestingParams = getLockedVestingParams; exports.getMaxIndex = getMaxIndex; exports.getMaxOutAmountWithMinBaseFee = getMaxOutAmountWithMinBaseFee; exports.getMigratedPoolFeeParams = getMigratedPoolFeeParams; exports.getMigratedPoolMarketCapFeeSchedulerParams = getMigratedPoolMarketCapFeeSchedulerParams; exports.getMigrationBaseToken = getMigrationBaseToken; exports.getMigrationQuoteAmount = getMigrationQuoteAmount; exports.getMigrationQuoteAmountFromMigrationQuoteThreshold = getMigrationQuoteAmountFromMigrationQuoteThreshold; exports.getMigrationQuoteThresholdFromMigrationQuoteAmount = getMigrationQuoteThresholdFromMigrationQuoteAmount; exports.getMigrationThresholdPrice = getMigrationThresholdPrice; exports.getNextSqrtPriceFromBaseAmountInRoundingUp = getNextSqrtPriceFromBaseAmountInRoundingUp; exports.getNextSqrtPriceFromBaseAmountOutRoundingUp = getNextSqrtPriceFromBaseAmountOutRoundingUp; exports.getNextSqrtPriceFromInput = getNextSqrtPriceFromInput; exports.getNextSqrtPriceFromOutput = getNextSqrtPriceFromOutput; exports.getNextSqrtPriceFromQuoteAmountInRoundingDown = getNextSqrtPriceFromQuoteAmountInRoundingDown; exports.getNextSqrtPriceFromQuoteAmountOutRoundingDown = getNextSqrtPriceFromQuoteAmountOutRoundingDown; exports.getOrCreateATAInstruction = getOrCreateATAInstruction; exports.getPercentageSupplyOnMigration = getPercentageSupplyOnMigration; exports.getPriceFromSqrtPrice = getPriceFromSqrtPrice; exports.getProtocolMigrationFee = getProtocolMigrationFee; exports.getQuoteReserveFromNextSqrtPrice = getQuoteReserveFromNextSqrtPrice; exports.getRateLimiterExcludedFeeAmount = getRateLimiterExcludedFeeAmount; exports.getRateLimiterMinBaseFeeNumerator = getRateLimiterMinBaseFeeNumerator; exports.getRateLimiterParams = getRateLimiterParams; exports.getSecondKey = getSecondKey; exports.getSqrtPriceFromMarketCap = getSqrtPriceFromMarketCap; exports.getSqrtPriceFromPrice = getSqrtPriceFromPrice; exports.getStartingBaseFeeBpsFromBaseFeeParams = getStartingBaseFeeBpsFromBaseFeeParams; exports.getSwapAmountWithBuffer = getSwapAmountWithBuffer; exports.getSwapResult = getSwapResult; exports.getSwapResultFromExactInput = getSwapResultFromExactInput; exports.getSwapResultFromExactOutput = getSwapResultFromExactOutput; exports.getSwapResultFromPartialInput = getSwapResultFromPartialInput; exports.getTokenBadgeRemainingAccounts = getTokenBadgeRemainingAccounts; exports.getTokenDecimals = getTokenDecimals; exports.getTokenProgram = getTokenProgram; exports.getTokenType = getTokenType; exports.getTokenomics = getTokenomics; exports.getTotalFeeNumerator = getTotalFeeNumerator; exports.getTotalFeeNumeratorFromExcludedFeeAmount = getTotalFeeNumeratorFromExcludedFeeAmount; exports.getTotalFeeNumeratorFromIncludedFeeAmount = getTotalFeeNumeratorFromIncludedFeeAmount; exports.getTotalSupplyFromCurve = getTotalSupplyFromCurve; exports.getTotalTokenSupply = getTotalTokenSupply; exports.getTotalVestingAmount = getTotalVestingAmount; exports.getTwoCurve = getTwoCurve; exports.getVariableFeeNumerator = getVariableFeeNumerator; exports.getVestingLockedLiquidityBpsAtNSeconds = getVestingLockedLiquidityBpsAtNSeconds; exports.hasMintAuthority = hasMintAuthority; exports.isDefaultLockedVesting = isDefaultLockedVesting; exports.isDynamicFeeEnabled = isDynamicFeeEnabled; exports.isNativeSol = isNativeSol; exports.isNonZeroRateLimiter = isNonZeroRateLimiter; exports.isRateLimiterApplied = isRateLimiterApplied; exports.isZeroRateLimiter = isZeroRateLimiter; exports.mulDiv = mulDiv; exports.mulShr = mulShr; exports.pow = pow; exports.prepareSwapAmountParam = prepareSwapAmountParam; exports.prepareTokenAccountTx = prepareTokenAccountTx; exports.splitFees = splitFees; exports.sqrt = sqrt; exports.swapQuote = swapQuote; exports.swapQuoteExactIn = swapQuoteExactIn; exports.swapQuoteExactOut = swapQuoteExactOut; exports.swapQuotePartialFill = swapQuotePartialFill; exports.toNumerator = toNumerator; exports.unwrapSOLInstruction = unwrapSOLInstruction; exports.validateActivationType = validateActivationType; exports.validateBalance = validateBalance; exports.validateBaseTokenType = validateBaseTokenType; exports.validateCollectFeeMode = validateCollectFeeMode; exports.validateCompoundingFeeBps = validateCompoundingFeeBps; exports.validateConfigParameters = validateConfigParameters; exports.validateCurve = validateCurve; exports.validateDynamicFee = validateDynamicFee; exports.validateFeeRateLimiter = validateFeeRateLimiter; exports.validateFeeScheduler = validateFeeScheduler; exports.validateLPPercentages = validateLPPercentages; exports.validateLiquidityVestingInfo = validateLiquidityVestingInfo; exports.validateMarketCapFeeSchedulerRequiresPoolFeeBps = validateMarketCapFeeSchedulerRequiresPoolFeeBps; exports.validateMigratedCollectFeeMode = validateMigratedCollectFeeMode; exports.validateMigratedPoolBaseFeeMode = validateMigratedPoolBaseFeeMode; exports.validateMigratedPoolFee = validateMigratedPoolFee; exports.validateMigrationAndTokenType = validateMigrationAndTokenType; exports.validateMigrationFee = validateMigrationFee; exports.validateMigrationFeeOption = validateMigrationFeeOption; exports.validateMinimumLockedLiquidity = validateMinimumLockedLiquidity; exports.validatePoolCreationFee = validatePoolCreationFee; exports.validatePoolFees = validatePoolFees; exports.validateQuoteMintBasic = validateQuoteMintBasic; exports.validateSwapAmount = validateSwapAmount; exports.validateTokenAuthorityOptions = validateTokenAuthorityOptions; exports.validateTokenDecimals = validateTokenDecimals; exports.validateTokenSupply = validateTokenSupply; exports.validateTransferHookProgram = validateTransferHookProgram; exports.validateTransferHookProgramExecutable = validateTransferHookProgramExecutable; exports.wrapSOLInstruction = wrapSOLInstruction;
32263
31660
  //# sourceMappingURL=index.cjs.map