@meteora-ag/zap-sdk 1.0.5 → 1.0.6
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 +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +49 -49
package/dist/index.d.mts
CHANGED
|
@@ -274,7 +274,7 @@ declare class Zap {
|
|
|
274
274
|
zapOutThroughDlmm(params: ZapOutThroughDlmmParams): Promise<Transaction>;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
declare function getJupiterQuote(inputMint: PublicKey, outputMint: PublicKey, amount: BN, maxAccounts: number, slippageBps: number, onlyDirectRoutes: boolean, restrictIntermediateTokens: boolean, apiUrl?: string, apiKey?: string): Promise<JupiterQuoteResponse>;
|
|
277
|
+
declare function getJupiterQuote(inputMint: PublicKey, outputMint: PublicKey, amount: BN, maxAccounts: number, slippageBps: number, dynamicSlippage: boolean | undefined, onlyDirectRoutes: boolean, restrictIntermediateTokens: boolean, apiUrl?: string, apiKey?: string): Promise<JupiterQuoteResponse>;
|
|
278
278
|
declare function getJupiterSwapInstruction(userPublicKey: PublicKey, quoteResponse: any, apiUrl?: string, apiKey?: string): Promise<JupiterSwapInstructionResponse>;
|
|
279
279
|
|
|
280
280
|
declare function getDammV2Pool(connection: Connection, poolAddress: PublicKey): Promise<PoolState>;
|
package/dist/index.d.ts
CHANGED
|
@@ -274,7 +274,7 @@ declare class Zap {
|
|
|
274
274
|
zapOutThroughDlmm(params: ZapOutThroughDlmmParams): Promise<Transaction>;
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
declare function getJupiterQuote(inputMint: PublicKey, outputMint: PublicKey, amount: BN, maxAccounts: number, slippageBps: number, onlyDirectRoutes: boolean, restrictIntermediateTokens: boolean, apiUrl?: string, apiKey?: string): Promise<JupiterQuoteResponse>;
|
|
277
|
+
declare function getJupiterQuote(inputMint: PublicKey, outputMint: PublicKey, amount: BN, maxAccounts: number, slippageBps: number, dynamicSlippage: boolean | undefined, onlyDirectRoutes: boolean, restrictIntermediateTokens: boolean, apiUrl?: string, apiKey?: string): Promise<JupiterQuoteResponse>;
|
|
278
278
|
declare function getJupiterSwapInstruction(userPublicKey: PublicKey, quoteResponse: any, apiUrl?: string, apiKey?: string): Promise<JupiterSwapInstructionResponse>;
|
|
279
279
|
|
|
280
280
|
declare function getDammV2Pool(connection: Connection, poolAddress: PublicKey): Promise<PoolState>;
|
package/dist/index.js
CHANGED
|
@@ -209,7 +209,7 @@ var idl_default = {
|
|
|
209
209
|
};
|
|
210
210
|
|
|
211
211
|
// src/helpers/jupiter.ts
|
|
212
|
-
function getJupiterQuote(inputMint, outputMint, amount, maxAccounts, slippageBps, onlyDirectRoutes, restrictIntermediateTokens, apiUrl = "https://lite-api.jup.ag", apiKey) {
|
|
212
|
+
function getJupiterQuote(inputMint, outputMint, amount, maxAccounts, slippageBps, dynamicSlippage = false, onlyDirectRoutes, restrictIntermediateTokens, apiUrl = "https://lite-api.jup.ag", apiKey) {
|
|
213
213
|
return __async(this, null, function* () {
|
|
214
214
|
const params = new URLSearchParams({
|
|
215
215
|
inputMint: inputMint.toString(),
|
|
@@ -218,7 +218,8 @@ function getJupiterQuote(inputMint, outputMint, amount, maxAccounts, slippageBps
|
|
|
218
218
|
slippageBps: slippageBps.toString(),
|
|
219
219
|
maxAccounts: maxAccounts.toString(),
|
|
220
220
|
onlyDirectRoutes: onlyDirectRoutes.toString(),
|
|
221
|
-
restrictIntermediateTokens: restrictIntermediateTokens.toString()
|
|
221
|
+
restrictIntermediateTokens: restrictIntermediateTokens.toString(),
|
|
222
|
+
dynamicSlippage: dynamicSlippage.toString()
|
|
222
223
|
});
|
|
223
224
|
const url = `${apiUrl}/swap/v1/quote?${params.toString()}`;
|
|
224
225
|
console.log(url);
|
package/dist/index.mjs
CHANGED
|
@@ -147,7 +147,7 @@ var idl_default = {
|
|
|
147
147
|
};
|
|
148
148
|
|
|
149
149
|
// src/helpers/jupiter.ts
|
|
150
|
-
function getJupiterQuote(inputMint, outputMint, amount, maxAccounts, slippageBps, onlyDirectRoutes, restrictIntermediateTokens, apiUrl = "https://lite-api.jup.ag", apiKey) {
|
|
150
|
+
function getJupiterQuote(inputMint, outputMint, amount, maxAccounts, slippageBps, dynamicSlippage = false, onlyDirectRoutes, restrictIntermediateTokens, apiUrl = "https://lite-api.jup.ag", apiKey) {
|
|
151
151
|
return __async(this, null, function* () {
|
|
152
152
|
const params = new URLSearchParams({
|
|
153
153
|
inputMint: inputMint.toString(),
|
|
@@ -156,7 +156,8 @@ function getJupiterQuote(inputMint, outputMint, amount, maxAccounts, slippageBps
|
|
|
156
156
|
slippageBps: slippageBps.toString(),
|
|
157
157
|
maxAccounts: maxAccounts.toString(),
|
|
158
158
|
onlyDirectRoutes: onlyDirectRoutes.toString(),
|
|
159
|
-
restrictIntermediateTokens: restrictIntermediateTokens.toString()
|
|
159
|
+
restrictIntermediateTokens: restrictIntermediateTokens.toString(),
|
|
160
|
+
dynamicSlippage: dynamicSlippage.toString()
|
|
160
161
|
});
|
|
161
162
|
const url = `${apiUrl}/swap/v1/quote?${params.toString()}`;
|
|
162
163
|
console.log(url);
|
package/package.json
CHANGED
|
@@ -1,50 +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.6",
|
|
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
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"import": "./dist/index.js",
|
|
24
|
+
"require": "./dist/index.cjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/bn.js": "^5.1.0",
|
|
29
|
+
"@types/bun": "latest",
|
|
30
|
+
"tsup": "^8.4.0",
|
|
31
|
+
"tsx": "^4.20.3"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"typescript": "^5"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@coral-xyz/anchor": "^0.31.1",
|
|
38
|
+
"@meteora-ag/cp-amm-sdk": "1.1.0",
|
|
39
|
+
"@meteora-ag/dlmm": "^1.6.1",
|
|
40
|
+
"@solana/spl-token": "^0.4.13",
|
|
41
|
+
"@solana/web3.js": "^1.98.2",
|
|
42
|
+
"bn.js": "^5.2.2",
|
|
43
|
+
"decimal.js": "^10.4.2",
|
|
44
|
+
"jito-ts": "^4.2.0"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "rm -rf dist && tsup src/index.ts --format esm,cjs --dts",
|
|
48
|
+
"clean": "rm -rf dist && rm -rf node_modules rm -rf pnpm-lock.yaml"
|
|
49
|
+
}
|
|
50
|
+
}
|