@meteora-ag/cp-amm-sdk 1.2.0 → 1.2.2

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.d.mts CHANGED
@@ -7166,7 +7166,7 @@ declare function getTokenProgram(flag: number): PublicKey;
7166
7166
  * @param mint - The mint
7167
7167
  * @returns The token decimals
7168
7168
  */
7169
- declare const getTokenDecimals: (connection: Connection, mint: PublicKey) => Promise<number>;
7169
+ declare const getTokenDecimals: (connection: Connection, mint: PublicKey, tokenProgram: PublicKey) => Promise<number>;
7170
7170
  /**
7171
7171
  * Gets the or creates the ATA instruction
7172
7172
  * @param connection - The connection
package/dist/index.d.ts CHANGED
@@ -7166,7 +7166,7 @@ declare function getTokenProgram(flag: number): PublicKey;
7166
7166
  * @param mint - The mint
7167
7167
  * @returns The token decimals
7168
7168
  */
7169
- declare const getTokenDecimals: (connection: Connection, mint: PublicKey) => Promise<number>;
7169
+ declare const getTokenDecimals: (connection: Connection, mint: PublicKey, tokenProgram: PublicKey) => Promise<number>;
7170
7170
  /**
7171
7171
  * Gets the or creates the ATA instruction
7172
7172
  * @param connection - The connection
package/dist/index.js CHANGED
@@ -7689,8 +7689,8 @@ var _bytes = require('@coral-xyz/anchor/dist/cjs/utils/bytes');
7689
7689
  function getTokenProgram(flag) {
7690
7690
  return flag == 0 ? _spltoken.TOKEN_PROGRAM_ID : _spltoken.TOKEN_2022_PROGRAM_ID;
7691
7691
  }
7692
- var getTokenDecimals = (connection, mint) => __async(null, null, function* () {
7693
- return (yield _spltoken.getMint.call(void 0, connection, mint)).decimals;
7692
+ var getTokenDecimals = (connection, mint, tokenProgram) => __async(null, null, function* () {
7693
+ return (yield _spltoken.getMint.call(void 0, connection, mint, "confirmed", tokenProgram)).decimals;
7694
7694
  });
7695
7695
  var getOrCreateATAInstruction = (_0, _1, _2, ..._3) => __async(null, [_0, _1, _2, ..._3], function* (connection, tokenMint, owner, payer = owner, allowOwnerOffCurve = true, tokenProgram) {
7696
7696
  const toAccount = _spltoken.getAssociatedTokenAddressSync.call(void 0,
@@ -8876,8 +8876,8 @@ function getBaseFeeHandler(cliffFeeNumerator, firstFactor, secondFactor, thirdFa
8876
8876
  const feeRateLimiter = new FeeRateLimiter(
8877
8877
  cliffFeeNumerator,
8878
8878
  firstFactor,
8879
- maxLimiterDuration,
8880
8879
  maxFeeBps,
8880
+ maxLimiterDuration,
8881
8881
  thirdFactor
8882
8882
  );
8883
8883
  return feeRateLimiter;