@carrot-protocol/clend-rpc 0.1.18 → 0.1.19-jup-api-key-dev-39a1f27
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 +85 -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
|
+
readonly baseUrl: string;
|
|
55
|
+
readonly headers: Record<string, string>;
|
|
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,11 @@ 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";
|
|
17
|
+
const QUOTE_PATH = "/swap/v1/quote";
|
|
18
|
+
const QUOTE_URL = "https://quote-api.jup.ag/v6";
|
|
18
19
|
class JupSwapResponseError extends Error {
|
|
19
20
|
constructor(error, body) {
|
|
20
21
|
super(`JupSwapResponseError: ${body.error} (${body.error_code})`);
|
|
@@ -25,15 +26,27 @@ class JupSwapResponseError extends Error {
|
|
|
25
26
|
exports.JupSwapResponseError = JupSwapResponseError;
|
|
26
27
|
// Default implementation of JupiterUtils
|
|
27
28
|
class JupiterUtils {
|
|
29
|
+
constructor(apiKey) {
|
|
30
|
+
const defaultHeaders = {
|
|
31
|
+
"Content-Type": "application/json",
|
|
32
|
+
};
|
|
33
|
+
this.baseUrl = apiKey ? BASE_URL_PAID : BASE_URL_FREE;
|
|
34
|
+
this.headers = apiKey
|
|
35
|
+
? { ...defaultHeaders, "x-api-key": apiKey }
|
|
36
|
+
: defaultHeaders;
|
|
37
|
+
}
|
|
28
38
|
async getJupiterPrice(mint) {
|
|
29
39
|
const params = {
|
|
30
40
|
ids: mint.toString(),
|
|
31
41
|
};
|
|
32
|
-
const res = await axios_1.default.get(
|
|
42
|
+
const res = await axios_1.default.get(`${this.baseUrl}${PRICE_PATH}`, {
|
|
43
|
+
params,
|
|
44
|
+
headers: this.headers,
|
|
45
|
+
});
|
|
33
46
|
return res.data.data[mint.toString()]?.price || 0;
|
|
34
47
|
}
|
|
35
48
|
async getJupiterQuote(inputMint, outputMint, inputMintDecimals, outputMintDecimals, inputAmountLamports, slippageBps, swapMode = "ExactIn") {
|
|
36
|
-
const quoteResponse = await quote(inputMint, outputMint, inputAmountLamports, {
|
|
49
|
+
const quoteResponse = await this.quote(inputMint, outputMint, inputAmountLamports, {
|
|
37
50
|
slippageBps: slippageBps,
|
|
38
51
|
wrapAndUnwrapSol: false,
|
|
39
52
|
onlyDirectRoutes: true,
|
|
@@ -49,7 +62,7 @@ class JupiterUtils {
|
|
|
49
62
|
}
|
|
50
63
|
async getJupiterSwap(payer, inputs, quote) {
|
|
51
64
|
const scaledQuoteResponse = scaleJupQuoteResponse(quote.quoteResponse, new decimal_js_1.default(inputs.inputAmountLamports));
|
|
52
|
-
const { swapTxs, lookupTables } = await swapTxFromQuote(payer, scaledQuoteResponse, {
|
|
65
|
+
const { swapTxs, lookupTables } = await this.swapTxFromQuote(payer, scaledQuoteResponse, {
|
|
53
66
|
slippageBps: quote.quoteResponse.slippageBps,
|
|
54
67
|
wrapAndUnwrapSol: false,
|
|
55
68
|
onlyDirectRoutes: true,
|
|
@@ -61,73 +74,76 @@ class JupiterUtils {
|
|
|
61
74
|
lookupTables,
|
|
62
75
|
};
|
|
63
76
|
}
|
|
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
|
-
},
|
|
77
|
+
// Helper functions
|
|
78
|
+
async quote(inputMint, outputMint, amount, swapConfig) {
|
|
79
|
+
const quoteApi = (0, api_1.createJupiterApiClient)({
|
|
80
|
+
basePath: QUOTE_URL,
|
|
81
|
+
apiKey: this.headers["x-api-key"] ?? undefined,
|
|
82
|
+
});
|
|
83
|
+
const quoteRequest = {
|
|
84
|
+
inputMint: inputMint.toBase58(),
|
|
85
|
+
outputMint: outputMint.toBase58(),
|
|
86
|
+
amount: Number(amount),
|
|
87
|
+
slippageBps: Number(swapConfig.slippageBps),
|
|
88
|
+
swapMode: swapConfig.swapMode,
|
|
89
|
+
onlyDirectRoutes: swapConfig.onlyDirectRoutes,
|
|
121
90
|
};
|
|
91
|
+
try {
|
|
92
|
+
return await quoteApi.quoteGet(quoteRequest);
|
|
93
|
+
}
|
|
94
|
+
catch (e) {
|
|
95
|
+
console.log(JSON.stringify(e, null, 2));
|
|
96
|
+
if (e instanceof api_1.ResponseError) {
|
|
97
|
+
const body = (await e.response.json());
|
|
98
|
+
throw new JupSwapResponseError(e, body);
|
|
99
|
+
}
|
|
100
|
+
throw e;
|
|
101
|
+
}
|
|
122
102
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
103
|
+
async swapTxFromQuote(payer, quote, swapConfig) {
|
|
104
|
+
const quoteApi = (0, api_1.createJupiterApiClient)({
|
|
105
|
+
basePath: QUOTE_URL,
|
|
106
|
+
apiKey: this.headers["x-api-key"] ?? undefined,
|
|
107
|
+
});
|
|
108
|
+
try {
|
|
109
|
+
const swapParameters = {
|
|
110
|
+
swapRequest: {
|
|
111
|
+
userPublicKey: payer.toBase58(),
|
|
112
|
+
quoteResponse: quote,
|
|
113
|
+
computeUnitPriceMicroLamports: 1,
|
|
114
|
+
wrapAndUnwrapSol: swapConfig?.wrapAndUnwrapSol ?? false,
|
|
115
|
+
destinationTokenAccount: undefined,
|
|
116
|
+
useSharedAccounts: false,
|
|
117
|
+
feeAccount: undefined,
|
|
118
|
+
skipUserAccountsRpcCalls: true,
|
|
119
|
+
},
|
|
120
|
+
};
|
|
121
|
+
const swap = await quoteApi.swapInstructionsPost(swapParameters);
|
|
122
|
+
const swapIxs = [transformResponseIx(swap.swapInstruction)];
|
|
123
|
+
return {
|
|
124
|
+
swapTxs: {
|
|
125
|
+
setupIxs: transformResponseIxs(swap.setupInstructions),
|
|
126
|
+
swapIxs,
|
|
127
|
+
cleanupIxs: transformResponseIxs(swap.cleanupInstruction ? [swap.cleanupInstruction] : []),
|
|
128
|
+
},
|
|
129
|
+
lookupTables: swap.addressLookupTableAddresses.map((k) => new anchor_1.web3.PublicKey(k)),
|
|
130
|
+
swapResponse: {
|
|
131
|
+
swapInAmountLamports: new decimal_js_1.default(quote.inAmount),
|
|
132
|
+
swapOutAmountLamports: new decimal_js_1.default(quote.outAmount),
|
|
133
|
+
swapMinOutAmountLamports: new decimal_js_1.default(quote.otherAmountThreshold),
|
|
134
|
+
},
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
catch (e) {
|
|
138
|
+
if (e instanceof api_1.ResponseError) {
|
|
139
|
+
const body = (await e.response.json());
|
|
140
|
+
throw new JupSwapResponseError(e, body);
|
|
141
|
+
}
|
|
142
|
+
throw e;
|
|
127
143
|
}
|
|
128
|
-
throw e;
|
|
129
144
|
}
|
|
130
145
|
}
|
|
146
|
+
exports.JupiterUtils = JupiterUtils;
|
|
131
147
|
function scaleJupQuoteResponse(quoteResponse, newAmount) {
|
|
132
148
|
const oldAmount = new decimal_js_1.default(quoteResponse.inAmount);
|
|
133
149
|
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.ts"],"names":[],"mappings":";;;;;;AA6QA,sDAmBC;AAED,oDAIC;AAED,kDAYC;AApTD,8CAA6C;AAC7C,4DAAiC;AACjC,qCASqB;AACrB,kDAA0B;AAE1B,MAAM,aAAa,GAAG,yBAAyB,CAAC;AAChD,MAAM,aAAa,GAAG,oBAAoB,CAAC;AAC3C,MAAM,UAAU,GAAG,WAAW,CAAC;AAC/B,MAAM,UAAU,GAAG,gBAAgB,CAAC;AACpC,MAAM,SAAS,GAAG,6BAA6B,CAAC;AAiDhD,MAAa,oBAAqB,SAAQ,KAAK;IAC7C,YACS,KAAoB,EACpB,IAAe;QAEtB,KAAK,CAAC,yBAAyB,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QAH3D,UAAK,GAAL,KAAK,CAAe;QACpB,SAAI,GAAJ,IAAI,CAAW;IAGxB,CAAC;CACF;AAPD,oDAOC;AAuBD,yCAAyC;AACzC,MAAa,YAAY;IAIvB,YAAY,MAAe;QACzB,MAAM,cAAc,GAAG;YACrB,cAAc,EAAE,kBAAkB;SACnC,CAAC;QACF,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC;QACtD,IAAI,CAAC,OAAO,GAAG,MAAM;YACnB,CAAC,CAAC,EAAE,GAAG,cAAc,EAAE,WAAW,EAAE,MAAM,EAAE;YAC5C,CAAC,CAAC,cAAc,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,IAA6B;QACjD,MAAM,MAAM,GAAG;YACb,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE;SACrB,CAAC;QAEF,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,OAAO,GAAG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