@meteora-ag/cp-amm-sdk 1.2.1 → 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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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,
|