@carrot-protocol/clend-rpc 0.1.18-changes1-dev-484147b → 0.1.19-jup-api-key-dev-8adb4a8
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/jupiterUtils.d.ts +5 -2
- package/dist/jupiterUtils.js +82 -69
- package/dist/jupiterUtils.js.map +1 -1
- package/package.json +1 -1
package/dist/jupiterUtils.d.ts
CHANGED
|
@@ -51,12 +51,15 @@ export interface IJupiterUtils {
|
|
|
51
51
|
getJupiterSwap(payer: web3.PublicKey, inputs: SwapInputs, quote: SwapQuote<QuoteResponse>): Promise<SwapIxs>;
|
|
52
52
|
}
|
|
53
53
|
export declare class JupiterUtils implements IJupiterUtils {
|
|
54
|
+
private readonly baseUrl;
|
|
55
|
+
private readonly headers;
|
|
56
|
+
constructor(apiKey?: string);
|
|
54
57
|
getJupiterPrice(mint: web3.PublicKey | string): Promise<number>;
|
|
55
58
|
getJupiterQuote(inputMint: web3.PublicKey, outputMint: web3.PublicKey, inputMintDecimals: number, outputMintDecimals: number, inputAmountLamports: Decimal, slippageBps: number, swapMode?: SwapMode): Promise<SwapQuote<QuoteResponse>>;
|
|
56
59
|
getJupiterSwap(payer: web3.PublicKey, inputs: SwapInputs, quote: SwapQuote<QuoteResponse>): Promise<SwapIxs>;
|
|
60
|
+
private quote;
|
|
61
|
+
private swapTxFromQuote;
|
|
57
62
|
}
|
|
58
|
-
export declare function quote(inputMint: web3.PublicKey, outputMint: web3.PublicKey, amount: Decimal, swapConfig: SwapConfig): Promise<QuoteResponse>;
|
|
59
|
-
export declare function swapTxFromQuote(payer: web3.PublicKey, quote: QuoteResponse, swapConfig: SwapConfig): Promise<SwapTxResponse>;
|
|
60
63
|
export declare function scaleJupQuoteResponse(quoteResponse: QuoteResponse, newAmount: Decimal): QuoteResponse;
|
|
61
64
|
export declare function transformResponseIxs(instructions: Instruction[]): web3.TransactionInstruction[];
|
|
62
65
|
export declare function transformResponseIx(instruction: Instruction): web3.TransactionInstruction;
|
package/dist/jupiterUtils.js
CHANGED
|
@@ -4,8 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.JupiterUtils = exports.JupSwapResponseError = void 0;
|
|
7
|
-
exports.quote = quote;
|
|
8
|
-
exports.swapTxFromQuote = swapTxFromQuote;
|
|
9
7
|
exports.scaleJupQuoteResponse = scaleJupQuoteResponse;
|
|
10
8
|
exports.transformResponseIxs = transformResponseIxs;
|
|
11
9
|
exports.transformResponseIx = transformResponseIx;
|
|
@@ -13,8 +11,9 @@ const anchor_1 = require("@coral-xyz/anchor");
|
|
|
13
11
|
const decimal_js_1 = __importDefault(require("decimal.js"));
|
|
14
12
|
const api_1 = require("@jup-ag/api");
|
|
15
13
|
const axios_1 = __importDefault(require("axios"));
|
|
16
|
-
const
|
|
17
|
-
const
|
|
14
|
+
const BASE_URL_FREE = "https://lite-api.jup.ag";
|
|
15
|
+
const BASE_URL_PAID = "https://api.jup.ag";
|
|
16
|
+
const PRICE_PATH = "/price/v2";
|
|
18
17
|
class JupSwapResponseError extends Error {
|
|
19
18
|
constructor(error, body) {
|
|
20
19
|
super(`JupSwapResponseError: ${body.error} (${body.error_code})`);
|
|
@@ -25,15 +24,27 @@ class JupSwapResponseError extends Error {
|
|
|
25
24
|
exports.JupSwapResponseError = JupSwapResponseError;
|
|
26
25
|
// Default implementation of JupiterUtils
|
|
27
26
|
class JupiterUtils {
|
|
27
|
+
constructor(apiKey) {
|
|
28
|
+
const defaultHeaders = {
|
|
29
|
+
"Content-Type": "application/json",
|
|
30
|
+
};
|
|
31
|
+
this.baseUrl = apiKey ? BASE_URL_PAID : BASE_URL_FREE;
|
|
32
|
+
this.headers = apiKey
|
|
33
|
+
? { ...defaultHeaders, "x-api-key": apiKey }
|
|
34
|
+
: defaultHeaders;
|
|
35
|
+
}
|
|
28
36
|
async getJupiterPrice(mint) {
|
|
29
37
|
const params = {
|
|
30
38
|
ids: mint.toString(),
|
|
31
39
|
};
|
|
32
|
-
const res = await axios_1.default.get(
|
|
40
|
+
const res = await axios_1.default.get(`${this.baseUrl}${PRICE_PATH}`, {
|
|
41
|
+
params,
|
|
42
|
+
headers: this.headers,
|
|
43
|
+
});
|
|
33
44
|
return res.data.data[mint.toString()]?.price || 0;
|
|
34
45
|
}
|
|
35
46
|
async getJupiterQuote(inputMint, outputMint, inputMintDecimals, outputMintDecimals, inputAmountLamports, slippageBps, swapMode = "ExactIn") {
|
|
36
|
-
const quoteResponse = await quote(inputMint, outputMint, inputAmountLamports, {
|
|
47
|
+
const quoteResponse = await this.quote(inputMint, outputMint, inputAmountLamports, {
|
|
37
48
|
slippageBps: slippageBps,
|
|
38
49
|
wrapAndUnwrapSol: false,
|
|
39
50
|
onlyDirectRoutes: true,
|
|
@@ -49,7 +60,7 @@ class JupiterUtils {
|
|
|
49
60
|
}
|
|
50
61
|
async getJupiterSwap(payer, inputs, quote) {
|
|
51
62
|
const scaledQuoteResponse = scaleJupQuoteResponse(quote.quoteResponse, new decimal_js_1.default(inputs.inputAmountLamports));
|
|
52
|
-
const { swapTxs, lookupTables } = await swapTxFromQuote(payer, scaledQuoteResponse, {
|
|
63
|
+
const { swapTxs, lookupTables } = await this.swapTxFromQuote(payer, scaledQuoteResponse, {
|
|
53
64
|
slippageBps: quote.quoteResponse.slippageBps,
|
|
54
65
|
wrapAndUnwrapSol: false,
|
|
55
66
|
onlyDirectRoutes: true,
|
|
@@ -61,73 +72,75 @@ class JupiterUtils {
|
|
|
61
72
|
lookupTables,
|
|
62
73
|
};
|
|
63
74
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
onlyDirectRoutes: swapConfig.onlyDirectRoutes,
|
|
78
|
-
};
|
|
79
|
-
try {
|
|
80
|
-
return await quoteApi.quoteGet(quoteRequest);
|
|
81
|
-
}
|
|
82
|
-
catch (e) {
|
|
83
|
-
if (e instanceof api_1.ResponseError) {
|
|
84
|
-
const body = (await e.response.json());
|
|
85
|
-
throw new JupSwapResponseError(e, body);
|
|
86
|
-
}
|
|
87
|
-
throw e;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
async function swapTxFromQuote(payer, quote, swapConfig) {
|
|
91
|
-
const quoteApi = (0, api_1.createJupiterApiClient)({
|
|
92
|
-
basePath: DEFAULT_JUP_V6_BASE_URL,
|
|
93
|
-
});
|
|
94
|
-
try {
|
|
95
|
-
const swapParameters = {
|
|
96
|
-
swapRequest: {
|
|
97
|
-
userPublicKey: payer.toBase58(),
|
|
98
|
-
quoteResponse: quote,
|
|
99
|
-
computeUnitPriceMicroLamports: 1,
|
|
100
|
-
wrapAndUnwrapSol: swapConfig?.wrapAndUnwrapSol ?? false,
|
|
101
|
-
destinationTokenAccount: undefined,
|
|
102
|
-
useSharedAccounts: false,
|
|
103
|
-
feeAccount: undefined,
|
|
104
|
-
skipUserAccountsRpcCalls: true,
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
const swap = await quoteApi.swapInstructionsPost(swapParameters);
|
|
108
|
-
const swapIxs = [transformResponseIx(swap.swapInstruction)];
|
|
109
|
-
return {
|
|
110
|
-
swapTxs: {
|
|
111
|
-
setupIxs: transformResponseIxs(swap.setupInstructions),
|
|
112
|
-
swapIxs,
|
|
113
|
-
cleanupIxs: transformResponseIxs(swap.cleanupInstruction ? [swap.cleanupInstruction] : []),
|
|
114
|
-
},
|
|
115
|
-
lookupTables: swap.addressLookupTableAddresses.map((k) => new anchor_1.web3.PublicKey(k)),
|
|
116
|
-
swapResponse: {
|
|
117
|
-
swapInAmountLamports: new decimal_js_1.default(quote.inAmount),
|
|
118
|
-
swapOutAmountLamports: new decimal_js_1.default(quote.outAmount),
|
|
119
|
-
swapMinOutAmountLamports: new decimal_js_1.default(quote.otherAmountThreshold),
|
|
120
|
-
},
|
|
75
|
+
// Helper functions
|
|
76
|
+
async quote(inputMint, outputMint, amount, swapConfig) {
|
|
77
|
+
const quoteApi = (0, api_1.createJupiterApiClient)({
|
|
78
|
+
basePath: this.baseUrl,
|
|
79
|
+
apiKey: this.headers["x-api-key"] ?? undefined,
|
|
80
|
+
});
|
|
81
|
+
const quoteRequest = {
|
|
82
|
+
inputMint: inputMint.toBase58(),
|
|
83
|
+
outputMint: outputMint.toBase58(),
|
|
84
|
+
amount: Number(amount),
|
|
85
|
+
slippageBps: Number(swapConfig.slippageBps),
|
|
86
|
+
swapMode: swapConfig.swapMode,
|
|
87
|
+
onlyDirectRoutes: swapConfig.onlyDirectRoutes,
|
|
121
88
|
};
|
|
89
|
+
try {
|
|
90
|
+
return await quoteApi.quoteGet(quoteRequest);
|
|
91
|
+
}
|
|
92
|
+
catch (e) {
|
|
93
|
+
if (e instanceof api_1.ResponseError) {
|
|
94
|
+
const body = (await e.response.json());
|
|
95
|
+
throw new JupSwapResponseError(e, body);
|
|
96
|
+
}
|
|
97
|
+
throw e;
|
|
98
|
+
}
|
|
122
99
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
100
|
+
async swapTxFromQuote(payer, quote, swapConfig) {
|
|
101
|
+
const quoteApi = (0, api_1.createJupiterApiClient)({
|
|
102
|
+
basePath: this.baseUrl,
|
|
103
|
+
apiKey: this.headers["x-api-key"] ?? undefined,
|
|
104
|
+
});
|
|
105
|
+
try {
|
|
106
|
+
const swapParameters = {
|
|
107
|
+
swapRequest: {
|
|
108
|
+
userPublicKey: payer.toBase58(),
|
|
109
|
+
quoteResponse: quote,
|
|
110
|
+
computeUnitPriceMicroLamports: 1,
|
|
111
|
+
wrapAndUnwrapSol: swapConfig?.wrapAndUnwrapSol ?? false,
|
|
112
|
+
destinationTokenAccount: undefined,
|
|
113
|
+
useSharedAccounts: false,
|
|
114
|
+
feeAccount: undefined,
|
|
115
|
+
skipUserAccountsRpcCalls: true,
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
const swap = await quoteApi.swapInstructionsPost(swapParameters);
|
|
119
|
+
const swapIxs = [transformResponseIx(swap.swapInstruction)];
|
|
120
|
+
return {
|
|
121
|
+
swapTxs: {
|
|
122
|
+
setupIxs: transformResponseIxs(swap.setupInstructions),
|
|
123
|
+
swapIxs,
|
|
124
|
+
cleanupIxs: transformResponseIxs(swap.cleanupInstruction ? [swap.cleanupInstruction] : []),
|
|
125
|
+
},
|
|
126
|
+
lookupTables: swap.addressLookupTableAddresses.map((k) => new anchor_1.web3.PublicKey(k)),
|
|
127
|
+
swapResponse: {
|
|
128
|
+
swapInAmountLamports: new decimal_js_1.default(quote.inAmount),
|
|
129
|
+
swapOutAmountLamports: new decimal_js_1.default(quote.outAmount),
|
|
130
|
+
swapMinOutAmountLamports: new decimal_js_1.default(quote.otherAmountThreshold),
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
catch (e) {
|
|
135
|
+
if (e instanceof api_1.ResponseError) {
|
|
136
|
+
const body = (await e.response.json());
|
|
137
|
+
throw new JupSwapResponseError(e, body);
|
|
138
|
+
}
|
|
139
|
+
throw e;
|
|
127
140
|
}
|
|
128
|
-
throw e;
|
|
129
141
|
}
|
|
130
142
|
}
|
|
143
|
+
exports.JupiterUtils = JupiterUtils;
|
|
131
144
|
function scaleJupQuoteResponse(quoteResponse, newAmount) {
|
|
132
145
|
const oldAmount = new decimal_js_1.default(quoteResponse.inAmount);
|
|
133
146
|
const scaleFactor = newAmount.div(oldAmount);
|
package/dist/jupiterUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jupiterUtils.js","sourceRoot":"","sources":["../src/jupiterUtils.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"jupiterUtils.js","sourceRoot":"","sources":["../src/jupiterUtils.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