@meteora-ag/zap-sdk 1.0.5-rc.2 → 1.0.5
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.js +1 -2
- package/dist/index.mjs +1 -3
- package/package.json +48 -49
package/dist/index.js
CHANGED
|
@@ -460,7 +460,6 @@ var getOrCreateATAInstruction = (connection, tokenMint, owner, payer, allowOwner
|
|
|
460
460
|
allowOwnerOffCurve,
|
|
461
461
|
tokenProgram
|
|
462
462
|
);
|
|
463
|
-
yield (0, import_spl_token3.getAccount)(connection, toAccount);
|
|
464
463
|
const ix = (0, import_spl_token3.createAssociatedTokenAccountIdempotentInstruction)(
|
|
465
464
|
payer,
|
|
466
465
|
toAccount,
|
|
@@ -893,7 +892,7 @@ var Zap = class {
|
|
|
893
892
|
]);
|
|
894
893
|
inputTokenAccountIx && preInstructions.push(inputTokenAccountIx);
|
|
895
894
|
outputTokenAccountIx && preInstructions.push(outputTokenAccountIx);
|
|
896
|
-
if (
|
|
895
|
+
if (inputMint.equals(import_spl_token5.NATIVE_MINT)) {
|
|
897
896
|
const wrapIxs = wrapSOLInstruction(
|
|
898
897
|
user,
|
|
899
898
|
inputTokenAccount,
|
package/dist/index.mjs
CHANGED
|
@@ -398,7 +398,6 @@ function getTokenProgramFromMint(connection, mint) {
|
|
|
398
398
|
import {
|
|
399
399
|
createAssociatedTokenAccountIdempotentInstruction,
|
|
400
400
|
createCloseAccountInstruction,
|
|
401
|
-
getAccount,
|
|
402
401
|
getAssociatedTokenAddressSync,
|
|
403
402
|
NATIVE_MINT as NATIVE_MINT2,
|
|
404
403
|
TOKEN_PROGRAM_ID as TOKEN_PROGRAM_ID3
|
|
@@ -414,7 +413,6 @@ var getOrCreateATAInstruction = (connection, tokenMint, owner, payer, allowOwner
|
|
|
414
413
|
allowOwnerOffCurve,
|
|
415
414
|
tokenProgram
|
|
416
415
|
);
|
|
417
|
-
yield getAccount(connection, toAccount);
|
|
418
416
|
const ix = createAssociatedTokenAccountIdempotentInstruction(
|
|
419
417
|
payer,
|
|
420
418
|
toAccount,
|
|
@@ -860,7 +858,7 @@ var Zap = class {
|
|
|
860
858
|
]);
|
|
861
859
|
inputTokenAccountIx && preInstructions.push(inputTokenAccountIx);
|
|
862
860
|
outputTokenAccountIx && preInstructions.push(outputTokenAccountIx);
|
|
863
|
-
if (
|
|
861
|
+
if (inputMint.equals(NATIVE_MINT3)) {
|
|
864
862
|
const wrapIxs = wrapSOLInstruction(
|
|
865
863
|
user,
|
|
866
864
|
inputTokenAccount,
|
package/package.json
CHANGED
|
@@ -1,51 +1,50 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
2
|
+
"name": "@meteora-ag/zap-sdk",
|
|
3
|
+
"version": "1.0.5",
|
|
4
|
+
"description": "A Typescript SDK for interacting with the Zap program on Meteora.",
|
|
5
|
+
"main": "dist/index.cjs",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"source": "src/index.ts",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"author": "Minh Do <minh@raccoons.dev>, Dann Wee <dann@raccoons.dev>",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"meteora-ag",
|
|
12
|
+
"zap",
|
|
13
|
+
"damm-v2",
|
|
14
|
+
"dlmm",
|
|
15
|
+
"jupiter"
|
|
16
|
+
],
|
|
17
|
+
"files": [
|
|
18
|
+
"dist/**"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "rm -rf dist && tsup src/index.ts --format esm,cjs --dts",
|
|
22
|
+
"clean": "rm -rf dist && rm -rf node_modules rm -rf pnpm-lock.yaml"
|
|
23
|
+
},
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.js",
|
|
28
|
+
"require": "./dist/index.cjs"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@types/bn.js": "^5.1.0",
|
|
33
|
+
"@types/bun": "latest",
|
|
34
|
+
"tsup": "^8.4.0",
|
|
35
|
+
"tsx": "^4.20.3"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"typescript": "^5"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@coral-xyz/anchor": "^0.31.1",
|
|
42
|
+
"@meteora-ag/cp-amm-sdk": "1.1.0",
|
|
43
|
+
"@meteora-ag/dlmm": "^1.6.1",
|
|
44
|
+
"@solana/spl-token": "^0.4.13",
|
|
45
|
+
"@solana/web3.js": "^1.98.2",
|
|
46
|
+
"bn.js": "^5.2.2",
|
|
47
|
+
"decimal.js": "^10.4.2",
|
|
48
|
+
"jito-ts": "^4.2.0"
|
|
49
|
+
}
|
|
51
50
|
}
|