@sonarwatch/portfolio-plugins 0.12.47 → 0.12.48
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/index.js +4 -0
- package/src/index.js.map +1 -1
- package/src/plugins/01/constants.js +2 -1
- package/src/plugins/01/constants.js.map +1 -1
- package/src/plugins/hedgehog/ammJob.js +5 -5
- package/src/plugins/hedgehog/ammJob.js.map +1 -1
- package/src/plugins/hedgehog/constants.d.ts +0 -2
- package/src/plugins/hedgehog/constants.js +1 -3
- package/src/plugins/hedgehog/constants.js.map +1 -1
- package/src/plugins/mango/redeemFetcher.js +1 -1
- package/src/plugins/mango/redeemFetcher.js.map +1 -1
- package/src/plugins/nxfinance/constants.d.ts +8 -0
- package/src/plugins/nxfinance/constants.js +22 -0
- package/src/plugins/nxfinance/constants.js.map +1 -0
- package/src/plugins/nxfinance/idl.d.ts +166 -0
- package/src/plugins/nxfinance/idl.js +2169 -0
- package/src/plugins/nxfinance/idl.js.map +1 -0
- package/src/plugins/nxfinance/index.d.ts +6 -0
- package/src/plugins/nxfinance/index.js +12 -0
- package/src/plugins/nxfinance/index.js.map +1 -0
- package/src/plugins/nxfinance/positionsFetcher.d.ts +3 -0
- package/src/plugins/nxfinance/positionsFetcher.js +92 -0
- package/src/plugins/nxfinance/positionsFetcher.js.map +1 -0
- package/src/plugins/nxfinance/structs.d.ts +19 -0
- package/src/plugins/nxfinance/structs.js +22 -0
- package/src/plugins/nxfinance/structs.js.map +1 -0
- package/src/plugins/nxfinance/types.d.ts +21 -0
- package/src/plugins/nxfinance/types.js +3 -0
- package/src/plugins/nxfinance/types.js.map +1 -0
- package/src/plugins/parcl/constants.d.ts +0 -2
- package/src/plugins/parcl/constants.js +1 -3
- package/src/plugins/parcl/constants.js.map +1 -1
- package/src/plugins/parcl/marginFetcher.js +2 -2
- package/src/plugins/parcl/marginFetcher.js.map +1 -1
- package/src/plugins/zeta/constants.d.ts +0 -1
- package/src/plugins/zeta/constants.js +1 -2
- package/src/plugins/zeta/constants.js.map +1 -1
- package/src/plugins/zeta/depositsFetcher.js +2 -2
- package/src/plugins/zeta/depositsFetcher.js.map +1 -1
- package/src/utils/misc/checkComputeAndStoreTokensPrices.js +2 -1
- package/src/utils/misc/checkComputeAndStoreTokensPrices.js.map +1 -1
- package/src/utils/misc/getLpUnderlyingTokenSource.js +2 -1
- package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
@@ -0,0 +1,2169 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.NxfinanceLeverageIDL = void 0;
|
4
|
+
exports.NxfinanceLeverageIDL = {
|
5
|
+
version: '0.1.0',
|
6
|
+
name: 'leverage_finance',
|
7
|
+
constants: [
|
8
|
+
{
|
9
|
+
name: 'AUTHORITY_SEED',
|
10
|
+
type: 'string',
|
11
|
+
value: '"authority"',
|
12
|
+
},
|
13
|
+
{
|
14
|
+
name: 'MARGIN_ACCOUNT_SEED',
|
15
|
+
type: 'string',
|
16
|
+
value: '"account"',
|
17
|
+
},
|
18
|
+
{
|
19
|
+
name: 'JUPITER_SEED',
|
20
|
+
type: 'string',
|
21
|
+
value: '"jupiter"',
|
22
|
+
},
|
23
|
+
{
|
24
|
+
name: 'JUPITER_ACCOUNT_SEED',
|
25
|
+
type: 'string',
|
26
|
+
value: '"jupiteraccount"',
|
27
|
+
},
|
28
|
+
{
|
29
|
+
name: 'MAX_LEVERAGE',
|
30
|
+
type: 'u64',
|
31
|
+
value: '1000',
|
32
|
+
},
|
33
|
+
{
|
34
|
+
name: 'STALENESS_THRESHOLD',
|
35
|
+
type: 'u64',
|
36
|
+
value: '60',
|
37
|
+
},
|
38
|
+
{
|
39
|
+
name: 'LIQUIDATE_THRESHOLD',
|
40
|
+
type: 'u64',
|
41
|
+
value: '95',
|
42
|
+
},
|
43
|
+
{
|
44
|
+
name: 'ADMIN',
|
45
|
+
type: 'publicKey',
|
46
|
+
value: 'solana_program :: pubkey ! ("DHyLVVYKPv1JJMQWxL3rA6RYF5MzUPdaCpBR2XSL8z2Q")',
|
47
|
+
},
|
48
|
+
{
|
49
|
+
name: 'JUPITER_SWAP',
|
50
|
+
type: 'publicKey',
|
51
|
+
value: 'solana_program :: pubkey ! ("JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4")',
|
52
|
+
},
|
53
|
+
{
|
54
|
+
name: 'JLP_MINT',
|
55
|
+
type: 'publicKey',
|
56
|
+
value: 'solana_program :: pubkey ! ("27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4")',
|
57
|
+
},
|
58
|
+
{
|
59
|
+
name: 'USDC_MINT',
|
60
|
+
type: 'publicKey',
|
61
|
+
value: 'solana_program :: pubkey ! ("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v")',
|
62
|
+
},
|
63
|
+
{
|
64
|
+
name: 'USDC_ORACLE',
|
65
|
+
type: 'publicKey',
|
66
|
+
value: 'solana_program :: pubkey ! ("Gnt27xtC473ZT2Mw5u8wZ68Z3gULkSTb5DuxJy7eJotD")',
|
67
|
+
},
|
68
|
+
{
|
69
|
+
name: 'JLP_ORACLE',
|
70
|
+
type: 'publicKey',
|
71
|
+
value: 'solana_program :: pubkey ! ("5BUwFW4nRbftYTDMbgxykoFWqWHPzahFSNAaaaJtVKsq")',
|
72
|
+
},
|
73
|
+
{
|
74
|
+
name: 'PUBKEY_DEFAULT',
|
75
|
+
type: 'publicKey',
|
76
|
+
value: 'solana_program :: pubkey ! ("11111111111111111111111111111111")',
|
77
|
+
},
|
78
|
+
{
|
79
|
+
name: '_SWAP_DISCRIMINATOR_EXACT_IN',
|
80
|
+
type: {
|
81
|
+
array: ['u8', 8],
|
82
|
+
},
|
83
|
+
value: '[193 , 32 , 155 , 51 , 65 , 214 , 156 , 129]',
|
84
|
+
},
|
85
|
+
{
|
86
|
+
name: '_SWAP_DISCRIMINATOR_EXACT_OUT',
|
87
|
+
type: {
|
88
|
+
array: ['u8', 8],
|
89
|
+
},
|
90
|
+
value: '[176 , 209 , 105 , 168 , 154 , 125 , 69 , 62]',
|
91
|
+
},
|
92
|
+
],
|
93
|
+
instructions: [
|
94
|
+
{
|
95
|
+
name: 'createLeveragefi',
|
96
|
+
accounts: [
|
97
|
+
{
|
98
|
+
name: 'leveragefi',
|
99
|
+
isMut: !0,
|
100
|
+
isSigner: !1,
|
101
|
+
},
|
102
|
+
{
|
103
|
+
name: 'admin',
|
104
|
+
isMut: !1,
|
105
|
+
isSigner: !1,
|
106
|
+
docs: ['The admin of the LeverageFi'],
|
107
|
+
},
|
108
|
+
{
|
109
|
+
name: 'payer',
|
110
|
+
isMut: !0,
|
111
|
+
isSigner: !0,
|
112
|
+
docs: ['The account paying for all rents'],
|
113
|
+
},
|
114
|
+
{
|
115
|
+
name: 'systemProgram',
|
116
|
+
isMut: !1,
|
117
|
+
isSigner: !1,
|
118
|
+
docs: ['Solana ecosystem accounts'],
|
119
|
+
},
|
120
|
+
],
|
121
|
+
args: [
|
122
|
+
{
|
123
|
+
name: 'id',
|
124
|
+
type: 'publicKey',
|
125
|
+
},
|
126
|
+
],
|
127
|
+
},
|
128
|
+
{
|
129
|
+
name: 'createPool',
|
130
|
+
accounts: [
|
131
|
+
{
|
132
|
+
name: 'leveragefi',
|
133
|
+
isMut: !1,
|
134
|
+
isSigner: !1,
|
135
|
+
docs: ['The LeverageFi platform'],
|
136
|
+
},
|
137
|
+
{
|
138
|
+
name: 'marginPool',
|
139
|
+
isMut: !0,
|
140
|
+
isSigner: !1,
|
141
|
+
docs: ['The pool to be created'],
|
142
|
+
},
|
143
|
+
{
|
144
|
+
name: 'tokenPriceOracle',
|
145
|
+
isMut: !0,
|
146
|
+
isSigner: !1,
|
147
|
+
},
|
148
|
+
{
|
149
|
+
name: 'poolAuthority',
|
150
|
+
isMut: !1,
|
151
|
+
isSigner: !1,
|
152
|
+
},
|
153
|
+
{
|
154
|
+
name: 'vault',
|
155
|
+
isMut: !0,
|
156
|
+
isSigner: !1,
|
157
|
+
docs: ["The token account holding the pool's deposited funds"],
|
158
|
+
},
|
159
|
+
{
|
160
|
+
name: 'tokenMint',
|
161
|
+
isMut: !1,
|
162
|
+
isSigner: !1,
|
163
|
+
docs: ['The mint for the token being custodied by the pool'],
|
164
|
+
},
|
165
|
+
{
|
166
|
+
name: 'payer',
|
167
|
+
isMut: !0,
|
168
|
+
isSigner: !0,
|
169
|
+
docs: ['The payer of rent for new accounts'],
|
170
|
+
},
|
171
|
+
{
|
172
|
+
name: 'tokenProgram',
|
173
|
+
isMut: !1,
|
174
|
+
isSigner: !1,
|
175
|
+
},
|
176
|
+
{
|
177
|
+
name: 'associatedTokenProgram',
|
178
|
+
isMut: !1,
|
179
|
+
isSigner: !1,
|
180
|
+
},
|
181
|
+
{
|
182
|
+
name: 'systemProgram',
|
183
|
+
isMut: !1,
|
184
|
+
isSigner: !1,
|
185
|
+
},
|
186
|
+
],
|
187
|
+
args: [
|
188
|
+
{
|
189
|
+
name: 'feeDestination',
|
190
|
+
type: 'publicKey',
|
191
|
+
},
|
192
|
+
],
|
193
|
+
},
|
194
|
+
{
|
195
|
+
name: 'registerJupiter',
|
196
|
+
accounts: [
|
197
|
+
{
|
198
|
+
name: 'leveragefi',
|
199
|
+
isMut: !1,
|
200
|
+
isSigner: !1,
|
201
|
+
docs: ['The LeverageFi platform'],
|
202
|
+
},
|
203
|
+
{
|
204
|
+
name: 'jupiterAccount',
|
205
|
+
isMut: !0,
|
206
|
+
isSigner: !1,
|
207
|
+
docs: ['The jupiter account to be created'],
|
208
|
+
},
|
209
|
+
{
|
210
|
+
name: 'jupiterAuthority',
|
211
|
+
isMut: !1,
|
212
|
+
isSigner: !1,
|
213
|
+
},
|
214
|
+
{
|
215
|
+
name: 'jlpMint',
|
216
|
+
isMut: !1,
|
217
|
+
isSigner: !1,
|
218
|
+
docs: ['The mint for JLP token'],
|
219
|
+
},
|
220
|
+
{
|
221
|
+
name: 'jlpAccount',
|
222
|
+
isMut: !0,
|
223
|
+
isSigner: !1,
|
224
|
+
docs: ['The token account holding JLP'],
|
225
|
+
},
|
226
|
+
{
|
227
|
+
name: 'payer',
|
228
|
+
isMut: !0,
|
229
|
+
isSigner: !0,
|
230
|
+
docs: ['The payer of rent for new accounts'],
|
231
|
+
},
|
232
|
+
{
|
233
|
+
name: 'tokenProgram',
|
234
|
+
isMut: !1,
|
235
|
+
isSigner: !1,
|
236
|
+
},
|
237
|
+
{
|
238
|
+
name: 'associatedTokenProgram',
|
239
|
+
isMut: !1,
|
240
|
+
isSigner: !1,
|
241
|
+
},
|
242
|
+
{
|
243
|
+
name: 'systemProgram',
|
244
|
+
isMut: !1,
|
245
|
+
isSigner: !1,
|
246
|
+
},
|
247
|
+
],
|
248
|
+
args: [],
|
249
|
+
},
|
250
|
+
{
|
251
|
+
name: 'deposit',
|
252
|
+
docs: ['* amount: token amount'],
|
253
|
+
accounts: [
|
254
|
+
{
|
255
|
+
name: 'leveragefi',
|
256
|
+
isMut: !1,
|
257
|
+
isSigner: !1,
|
258
|
+
docs: ['The LeverageFi platform'],
|
259
|
+
},
|
260
|
+
{
|
261
|
+
name: 'marginPool',
|
262
|
+
isMut: !0,
|
263
|
+
isSigner: !1,
|
264
|
+
docs: ['The pool to deposit into'],
|
265
|
+
},
|
266
|
+
{
|
267
|
+
name: 'usdcPriceOracle',
|
268
|
+
isMut: !0,
|
269
|
+
isSigner: !1,
|
270
|
+
},
|
271
|
+
{
|
272
|
+
name: 'jlpPriceOracle',
|
273
|
+
isMut: !0,
|
274
|
+
isSigner: !1,
|
275
|
+
},
|
276
|
+
{
|
277
|
+
name: 'poolAuthority',
|
278
|
+
isMut: !1,
|
279
|
+
isSigner: !1,
|
280
|
+
},
|
281
|
+
{
|
282
|
+
name: 'vault',
|
283
|
+
isMut: !0,
|
284
|
+
isSigner: !1,
|
285
|
+
docs: [
|
286
|
+
"Read-only, the token account holding the pool's deposited funds",
|
287
|
+
],
|
288
|
+
},
|
289
|
+
{
|
290
|
+
name: 'tokenMint',
|
291
|
+
isMut: !1,
|
292
|
+
isSigner: !1,
|
293
|
+
},
|
294
|
+
{
|
295
|
+
name: 'jlpMint',
|
296
|
+
isMut: !1,
|
297
|
+
isSigner: !1,
|
298
|
+
},
|
299
|
+
{
|
300
|
+
name: 'depositor',
|
301
|
+
isMut: !1,
|
302
|
+
isSigner: !0,
|
303
|
+
docs: ['The address with authority to deposit the tokens'],
|
304
|
+
},
|
305
|
+
{
|
306
|
+
name: 'depositorTokenMintAccount',
|
307
|
+
isMut: !0,
|
308
|
+
isSigner: !1,
|
309
|
+
docs: ['The source of the tokens to be deposited'],
|
310
|
+
},
|
311
|
+
{
|
312
|
+
name: 'marginAccount',
|
313
|
+
isMut: !0,
|
314
|
+
isSigner: !1,
|
315
|
+
docs: ['The margin account for depositor'],
|
316
|
+
},
|
317
|
+
{
|
318
|
+
name: 'payer',
|
319
|
+
isMut: !0,
|
320
|
+
isSigner: !0,
|
321
|
+
docs: ['The account paying for all rents'],
|
322
|
+
},
|
323
|
+
{
|
324
|
+
name: 'tokenProgram',
|
325
|
+
isMut: !1,
|
326
|
+
isSigner: !1,
|
327
|
+
docs: ['Solana ecosystem accounts'],
|
328
|
+
},
|
329
|
+
{
|
330
|
+
name: 'associatedTokenProgram',
|
331
|
+
isMut: !1,
|
332
|
+
isSigner: !1,
|
333
|
+
},
|
334
|
+
{
|
335
|
+
name: 'systemProgram',
|
336
|
+
isMut: !1,
|
337
|
+
isSigner: !1,
|
338
|
+
},
|
339
|
+
],
|
340
|
+
args: [
|
341
|
+
{
|
342
|
+
name: 'amount',
|
343
|
+
type: 'u64',
|
344
|
+
},
|
345
|
+
],
|
346
|
+
},
|
347
|
+
{
|
348
|
+
name: 'borrow',
|
349
|
+
docs: ['* amount: token amount'],
|
350
|
+
accounts: [
|
351
|
+
{
|
352
|
+
name: 'leveragefi',
|
353
|
+
isMut: !1,
|
354
|
+
isSigner: !1,
|
355
|
+
docs: ['The LeverageFi platform'],
|
356
|
+
},
|
357
|
+
{
|
358
|
+
name: 'marginPool',
|
359
|
+
isMut: !0,
|
360
|
+
isSigner: !1,
|
361
|
+
docs: ['The pool to borrow from'],
|
362
|
+
},
|
363
|
+
{
|
364
|
+
name: 'usdcPriceOracle',
|
365
|
+
isMut: !0,
|
366
|
+
isSigner: !1,
|
367
|
+
},
|
368
|
+
{
|
369
|
+
name: 'jlpPriceOracle',
|
370
|
+
isMut: !0,
|
371
|
+
isSigner: !1,
|
372
|
+
},
|
373
|
+
{
|
374
|
+
name: 'poolAuthority',
|
375
|
+
isMut: !1,
|
376
|
+
isSigner: !1,
|
377
|
+
},
|
378
|
+
{
|
379
|
+
name: 'vault',
|
380
|
+
isMut: !0,
|
381
|
+
isSigner: !1,
|
382
|
+
docs: [
|
383
|
+
"Read-only, the token account holding the pool's deposited funds",
|
384
|
+
],
|
385
|
+
},
|
386
|
+
{
|
387
|
+
name: 'tokenMint',
|
388
|
+
isMut: !1,
|
389
|
+
isSigner: !1,
|
390
|
+
},
|
391
|
+
{
|
392
|
+
name: 'jlpMint',
|
393
|
+
isMut: !1,
|
394
|
+
isSigner: !1,
|
395
|
+
docs: ['The mint for JLP token'],
|
396
|
+
},
|
397
|
+
{
|
398
|
+
name: 'borrower',
|
399
|
+
isMut: !1,
|
400
|
+
isSigner: !0,
|
401
|
+
docs: ['The address with authority to deposit the tokens'],
|
402
|
+
},
|
403
|
+
{
|
404
|
+
name: 'borrowerTokenMintAccount',
|
405
|
+
isMut: !0,
|
406
|
+
isSigner: !1,
|
407
|
+
},
|
408
|
+
{
|
409
|
+
name: 'marginAccount',
|
410
|
+
isMut: !0,
|
411
|
+
isSigner: !1,
|
412
|
+
docs: [
|
413
|
+
'The margin account for borrower, which was initialized at the first deposit',
|
414
|
+
],
|
415
|
+
},
|
416
|
+
{
|
417
|
+
name: 'payer',
|
418
|
+
isMut: !0,
|
419
|
+
isSigner: !0,
|
420
|
+
docs: ['The account paying for all rents'],
|
421
|
+
},
|
422
|
+
{
|
423
|
+
name: 'instructions',
|
424
|
+
isMut: !1,
|
425
|
+
isSigner: !1,
|
426
|
+
},
|
427
|
+
{
|
428
|
+
name: 'tokenProgram',
|
429
|
+
isMut: !1,
|
430
|
+
isSigner: !1,
|
431
|
+
docs: ['Solana ecosystem accounts'],
|
432
|
+
},
|
433
|
+
{
|
434
|
+
name: 'associatedTokenProgram',
|
435
|
+
isMut: !1,
|
436
|
+
isSigner: !1,
|
437
|
+
},
|
438
|
+
{
|
439
|
+
name: 'systemProgram',
|
440
|
+
isMut: !1,
|
441
|
+
isSigner: !1,
|
442
|
+
},
|
443
|
+
],
|
444
|
+
args: [
|
445
|
+
{
|
446
|
+
name: 'amount',
|
447
|
+
type: 'u64',
|
448
|
+
},
|
449
|
+
],
|
450
|
+
},
|
451
|
+
{
|
452
|
+
name: 'afterBorrow',
|
453
|
+
docs: ['* jlp_amount: jlp amount'],
|
454
|
+
accounts: [
|
455
|
+
{
|
456
|
+
name: 'leveragefi',
|
457
|
+
isMut: !1,
|
458
|
+
isSigner: !1,
|
459
|
+
docs: ['The LeverageFi platform'],
|
460
|
+
},
|
461
|
+
{
|
462
|
+
name: 'marginPool',
|
463
|
+
isMut: !0,
|
464
|
+
isSigner: !1,
|
465
|
+
docs: ['The pool to borrow from'],
|
466
|
+
},
|
467
|
+
{
|
468
|
+
name: 'marginAccount',
|
469
|
+
isMut: !0,
|
470
|
+
isSigner: !1,
|
471
|
+
docs: [
|
472
|
+
'The margin account for borrower, which was initialized at the first deposit',
|
473
|
+
],
|
474
|
+
},
|
475
|
+
{
|
476
|
+
name: 'jupiterAccount',
|
477
|
+
isMut: !0,
|
478
|
+
isSigner: !1,
|
479
|
+
docs: ['The jupiter account to receive the leveraged loan tokens'],
|
480
|
+
},
|
481
|
+
{
|
482
|
+
name: 'usdcPriceOracle',
|
483
|
+
isMut: !0,
|
484
|
+
isSigner: !1,
|
485
|
+
},
|
486
|
+
{
|
487
|
+
name: 'jlpPriceOracle',
|
488
|
+
isMut: !0,
|
489
|
+
isSigner: !1,
|
490
|
+
},
|
491
|
+
{
|
492
|
+
name: 'jlpMint',
|
493
|
+
isMut: !1,
|
494
|
+
isSigner: !1,
|
495
|
+
docs: ['The mint for JLP token'],
|
496
|
+
},
|
497
|
+
{
|
498
|
+
name: 'borrowerJlpMintAccount',
|
499
|
+
isMut: !0,
|
500
|
+
isSigner: !1,
|
501
|
+
docs: ['The jlp_mint account for borrower'],
|
502
|
+
},
|
503
|
+
{
|
504
|
+
name: 'jupiterJlpMintAccount',
|
505
|
+
isMut: !0,
|
506
|
+
isSigner: !1,
|
507
|
+
docs: ['The jlp_mint account for jupiter account'],
|
508
|
+
},
|
509
|
+
{
|
510
|
+
name: 'jupiterAuthority',
|
511
|
+
isMut: !1,
|
512
|
+
isSigner: !1,
|
513
|
+
},
|
514
|
+
{
|
515
|
+
name: 'borrower',
|
516
|
+
isMut: !1,
|
517
|
+
isSigner: !0,
|
518
|
+
docs: ['The address with authority to deposit the tokens'],
|
519
|
+
},
|
520
|
+
{
|
521
|
+
name: 'instructions',
|
522
|
+
isMut: !1,
|
523
|
+
isSigner: !1,
|
524
|
+
},
|
525
|
+
{
|
526
|
+
name: 'tokenProgram',
|
527
|
+
isMut: !1,
|
528
|
+
isSigner: !1,
|
529
|
+
docs: ['Solana ecosystem accounts'],
|
530
|
+
},
|
531
|
+
{
|
532
|
+
name: 'associatedTokenProgram',
|
533
|
+
isMut: !1,
|
534
|
+
isSigner: !1,
|
535
|
+
},
|
536
|
+
{
|
537
|
+
name: 'systemProgram',
|
538
|
+
isMut: !1,
|
539
|
+
isSigner: !1,
|
540
|
+
},
|
541
|
+
],
|
542
|
+
args: [
|
543
|
+
{
|
544
|
+
name: 'jlpAmount',
|
545
|
+
type: 'u64',
|
546
|
+
},
|
547
|
+
],
|
548
|
+
},
|
549
|
+
{
|
550
|
+
name: 'repay',
|
551
|
+
docs: ['* amount: token amount'],
|
552
|
+
accounts: [
|
553
|
+
{
|
554
|
+
name: 'leveragefi',
|
555
|
+
isMut: !1,
|
556
|
+
isSigner: !1,
|
557
|
+
docs: ['The LeverageFi platform'],
|
558
|
+
},
|
559
|
+
{
|
560
|
+
name: 'marginPool',
|
561
|
+
isMut: !0,
|
562
|
+
isSigner: !1,
|
563
|
+
docs: ['The pool to borrow from'],
|
564
|
+
},
|
565
|
+
{
|
566
|
+
name: 'jlpMarginPool',
|
567
|
+
isMut: !0,
|
568
|
+
isSigner: !1,
|
569
|
+
},
|
570
|
+
{
|
571
|
+
name: 'marginAccount',
|
572
|
+
isMut: !0,
|
573
|
+
isSigner: !1,
|
574
|
+
docs: [
|
575
|
+
'The margin account for borrower, which was initialized at the first deposit',
|
576
|
+
],
|
577
|
+
},
|
578
|
+
{
|
579
|
+
name: 'jupiterAccount',
|
580
|
+
isMut: !0,
|
581
|
+
isSigner: !1,
|
582
|
+
docs: ['The jupiter account to send the leveraged loan tokens'],
|
583
|
+
},
|
584
|
+
{
|
585
|
+
name: 'usdcPriceOracle',
|
586
|
+
isMut: !0,
|
587
|
+
isSigner: !1,
|
588
|
+
},
|
589
|
+
{
|
590
|
+
name: 'jlpPriceOracle',
|
591
|
+
isMut: !0,
|
592
|
+
isSigner: !1,
|
593
|
+
},
|
594
|
+
{
|
595
|
+
name: 'jlpMint',
|
596
|
+
isMut: !1,
|
597
|
+
isSigner: !1,
|
598
|
+
docs: ['The mint for JLP token'],
|
599
|
+
},
|
600
|
+
{
|
601
|
+
name: 'jlpPoolAuthority',
|
602
|
+
isMut: !1,
|
603
|
+
isSigner: !1,
|
604
|
+
},
|
605
|
+
{
|
606
|
+
name: 'jlpVault',
|
607
|
+
isMut: !0,
|
608
|
+
isSigner: !1,
|
609
|
+
docs: ['Token account holding JLP margin pool deposits'],
|
610
|
+
},
|
611
|
+
{
|
612
|
+
name: 'repayerJlpMintAccount',
|
613
|
+
isMut: !0,
|
614
|
+
isSigner: !1,
|
615
|
+
docs: ['The jlp_mint account for repayer'],
|
616
|
+
},
|
617
|
+
{
|
618
|
+
name: 'jupiterJlpMintAccount',
|
619
|
+
isMut: !0,
|
620
|
+
isSigner: !1,
|
621
|
+
docs: ['The jlp_mint account for jupiter account'],
|
622
|
+
},
|
623
|
+
{
|
624
|
+
name: 'jupiterAuthority',
|
625
|
+
isMut: !1,
|
626
|
+
isSigner: !1,
|
627
|
+
},
|
628
|
+
{
|
629
|
+
name: 'repayer',
|
630
|
+
isMut: !1,
|
631
|
+
isSigner: !0,
|
632
|
+
docs: ['The address with authority to deposit the tokens'],
|
633
|
+
},
|
634
|
+
{
|
635
|
+
name: 'payer',
|
636
|
+
isMut: !0,
|
637
|
+
isSigner: !0,
|
638
|
+
docs: ['The account paying for all rents'],
|
639
|
+
},
|
640
|
+
{
|
641
|
+
name: 'instructions',
|
642
|
+
isMut: !1,
|
643
|
+
isSigner: !1,
|
644
|
+
},
|
645
|
+
{
|
646
|
+
name: 'tokenProgram',
|
647
|
+
isMut: !1,
|
648
|
+
isSigner: !1,
|
649
|
+
docs: ['Solana ecosystem accounts'],
|
650
|
+
},
|
651
|
+
{
|
652
|
+
name: 'associatedTokenProgram',
|
653
|
+
isMut: !1,
|
654
|
+
isSigner: !1,
|
655
|
+
},
|
656
|
+
{
|
657
|
+
name: 'systemProgram',
|
658
|
+
isMut: !1,
|
659
|
+
isSigner: !1,
|
660
|
+
},
|
661
|
+
],
|
662
|
+
args: [
|
663
|
+
{
|
664
|
+
name: 'amount',
|
665
|
+
type: 'u64',
|
666
|
+
},
|
667
|
+
],
|
668
|
+
},
|
669
|
+
{
|
670
|
+
name: 'afterRepay',
|
671
|
+
docs: ['* amount: token amount'],
|
672
|
+
accounts: [
|
673
|
+
{
|
674
|
+
name: 'leveragefi',
|
675
|
+
isMut: !1,
|
676
|
+
isSigner: !1,
|
677
|
+
docs: ['The LeverageFi platform'],
|
678
|
+
},
|
679
|
+
{
|
680
|
+
name: 'marginPool',
|
681
|
+
isMut: !0,
|
682
|
+
isSigner: !1,
|
683
|
+
docs: ['The pool to borrow from'],
|
684
|
+
},
|
685
|
+
{
|
686
|
+
name: 'marginAccount',
|
687
|
+
isMut: !0,
|
688
|
+
isSigner: !1,
|
689
|
+
docs: [
|
690
|
+
'The margin account for borrower, which was initialized at the first deposit',
|
691
|
+
],
|
692
|
+
},
|
693
|
+
{
|
694
|
+
name: 'usdcPriceOracle',
|
695
|
+
isMut: !0,
|
696
|
+
isSigner: !1,
|
697
|
+
},
|
698
|
+
{
|
699
|
+
name: 'jlpPriceOracle',
|
700
|
+
isMut: !0,
|
701
|
+
isSigner: !1,
|
702
|
+
},
|
703
|
+
{
|
704
|
+
name: 'tokenMint',
|
705
|
+
isMut: !1,
|
706
|
+
isSigner: !1,
|
707
|
+
},
|
708
|
+
{
|
709
|
+
name: 'jlpMint',
|
710
|
+
isMut: !1,
|
711
|
+
isSigner: !1,
|
712
|
+
docs: ['The mint for JLP token'],
|
713
|
+
},
|
714
|
+
{
|
715
|
+
name: 'repayerTokenMintAccount',
|
716
|
+
isMut: !0,
|
717
|
+
isSigner: !1,
|
718
|
+
docs: ['The jlp_mint account for repayer'],
|
719
|
+
},
|
720
|
+
{
|
721
|
+
name: 'vault',
|
722
|
+
isMut: !0,
|
723
|
+
isSigner: !1,
|
724
|
+
docs: [
|
725
|
+
"Read-only, the token account holding the pool's deposited funds",
|
726
|
+
],
|
727
|
+
},
|
728
|
+
{
|
729
|
+
name: 'repayer',
|
730
|
+
isMut: !1,
|
731
|
+
isSigner: !0,
|
732
|
+
docs: ['The address with authority to deposit the tokens'],
|
733
|
+
},
|
734
|
+
{
|
735
|
+
name: 'instructions',
|
736
|
+
isMut: !1,
|
737
|
+
isSigner: !1,
|
738
|
+
},
|
739
|
+
{
|
740
|
+
name: 'tokenProgram',
|
741
|
+
isMut: !1,
|
742
|
+
isSigner: !1,
|
743
|
+
docs: ['Solana ecosystem accounts'],
|
744
|
+
},
|
745
|
+
{
|
746
|
+
name: 'associatedTokenProgram',
|
747
|
+
isMut: !1,
|
748
|
+
isSigner: !1,
|
749
|
+
},
|
750
|
+
{
|
751
|
+
name: 'systemProgram',
|
752
|
+
isMut: !1,
|
753
|
+
isSigner: !1,
|
754
|
+
},
|
755
|
+
],
|
756
|
+
args: [
|
757
|
+
{
|
758
|
+
name: 'amount',
|
759
|
+
type: 'u64',
|
760
|
+
},
|
761
|
+
],
|
762
|
+
},
|
763
|
+
{
|
764
|
+
name: 'withdraw',
|
765
|
+
docs: ['* amount: token amount'],
|
766
|
+
accounts: [
|
767
|
+
{
|
768
|
+
name: 'leveragefi',
|
769
|
+
isMut: !1,
|
770
|
+
isSigner: !1,
|
771
|
+
docs: ['The LeverageFi platform'],
|
772
|
+
},
|
773
|
+
{
|
774
|
+
name: 'usdcMarginPool',
|
775
|
+
isMut: !0,
|
776
|
+
isSigner: !1,
|
777
|
+
docs: ['The pool to borrow from'],
|
778
|
+
},
|
779
|
+
{
|
780
|
+
name: 'jlpMarginPool',
|
781
|
+
isMut: !0,
|
782
|
+
isSigner: !1,
|
783
|
+
},
|
784
|
+
{
|
785
|
+
name: 'usdcPriceOracle',
|
786
|
+
isMut: !0,
|
787
|
+
isSigner: !1,
|
788
|
+
},
|
789
|
+
{
|
790
|
+
name: 'jlpPriceOracle',
|
791
|
+
isMut: !0,
|
792
|
+
isSigner: !1,
|
793
|
+
},
|
794
|
+
{
|
795
|
+
name: 'poolAuthority',
|
796
|
+
isMut: !1,
|
797
|
+
isSigner: !1,
|
798
|
+
},
|
799
|
+
{
|
800
|
+
name: 'vault',
|
801
|
+
isMut: !0,
|
802
|
+
isSigner: !1,
|
803
|
+
docs: [
|
804
|
+
"Read-only, the token account holding the pool's deposited funds",
|
805
|
+
],
|
806
|
+
},
|
807
|
+
{
|
808
|
+
name: 'tokenMint',
|
809
|
+
isMut: !1,
|
810
|
+
isSigner: !1,
|
811
|
+
},
|
812
|
+
{
|
813
|
+
name: 'jlpMint',
|
814
|
+
isMut: !1,
|
815
|
+
isSigner: !1,
|
816
|
+
docs: ['The mint for JLP token'],
|
817
|
+
},
|
818
|
+
{
|
819
|
+
name: 'withdrawer',
|
820
|
+
isMut: !1,
|
821
|
+
isSigner: !0,
|
822
|
+
docs: ['The address with authority to deposit the tokens'],
|
823
|
+
},
|
824
|
+
{
|
825
|
+
name: 'depositorTokenMintAccount',
|
826
|
+
isMut: !0,
|
827
|
+
isSigner: !1,
|
828
|
+
docs: ['The destination of the tokens to be withdrawn'],
|
829
|
+
},
|
830
|
+
{
|
831
|
+
name: 'marginAccount',
|
832
|
+
isMut: !0,
|
833
|
+
isSigner: !1,
|
834
|
+
docs: [
|
835
|
+
'The margin account for borrower, which was initialized at the first deposit',
|
836
|
+
],
|
837
|
+
},
|
838
|
+
{
|
839
|
+
name: 'feeDestination',
|
840
|
+
isMut: !0,
|
841
|
+
isSigner: !1,
|
842
|
+
docs: ['Fee receiver'],
|
843
|
+
},
|
844
|
+
{
|
845
|
+
name: 'payer',
|
846
|
+
isMut: !0,
|
847
|
+
isSigner: !0,
|
848
|
+
docs: ['The account paying for all rents'],
|
849
|
+
},
|
850
|
+
{
|
851
|
+
name: 'tokenProgram',
|
852
|
+
isMut: !1,
|
853
|
+
isSigner: !1,
|
854
|
+
docs: ['Solana ecosystem accounts'],
|
855
|
+
},
|
856
|
+
{
|
857
|
+
name: 'associatedTokenProgram',
|
858
|
+
isMut: !1,
|
859
|
+
isSigner: !1,
|
860
|
+
},
|
861
|
+
{
|
862
|
+
name: 'systemProgram',
|
863
|
+
isMut: !1,
|
864
|
+
isSigner: !1,
|
865
|
+
},
|
866
|
+
],
|
867
|
+
args: [
|
868
|
+
{
|
869
|
+
name: 'amount',
|
870
|
+
type: 'u64',
|
871
|
+
},
|
872
|
+
],
|
873
|
+
},
|
874
|
+
{
|
875
|
+
name: 'withdrawAll',
|
876
|
+
accounts: [
|
877
|
+
{
|
878
|
+
name: 'leveragefi',
|
879
|
+
isMut: !1,
|
880
|
+
isSigner: !1,
|
881
|
+
docs: ['The LeverageFi platform'],
|
882
|
+
},
|
883
|
+
{
|
884
|
+
name: 'usdcMarginPool',
|
885
|
+
isMut: !0,
|
886
|
+
isSigner: !1,
|
887
|
+
docs: ['The pool to borrow from'],
|
888
|
+
},
|
889
|
+
{
|
890
|
+
name: 'jlpMarginPool',
|
891
|
+
isMut: !0,
|
892
|
+
isSigner: !1,
|
893
|
+
},
|
894
|
+
{
|
895
|
+
name: 'usdcPriceOracle',
|
896
|
+
isMut: !0,
|
897
|
+
isSigner: !1,
|
898
|
+
},
|
899
|
+
{
|
900
|
+
name: 'jlpPriceOracle',
|
901
|
+
isMut: !0,
|
902
|
+
isSigner: !1,
|
903
|
+
},
|
904
|
+
{
|
905
|
+
name: 'poolAuthority',
|
906
|
+
isMut: !1,
|
907
|
+
isSigner: !1,
|
908
|
+
},
|
909
|
+
{
|
910
|
+
name: 'vault',
|
911
|
+
isMut: !0,
|
912
|
+
isSigner: !1,
|
913
|
+
docs: [
|
914
|
+
"Read-only, the token account holding the pool's deposited funds",
|
915
|
+
],
|
916
|
+
},
|
917
|
+
{
|
918
|
+
name: 'tokenMint',
|
919
|
+
isMut: !1,
|
920
|
+
isSigner: !1,
|
921
|
+
},
|
922
|
+
{
|
923
|
+
name: 'jlpMint',
|
924
|
+
isMut: !1,
|
925
|
+
isSigner: !1,
|
926
|
+
docs: ['The mint for JLP token'],
|
927
|
+
},
|
928
|
+
{
|
929
|
+
name: 'withdrawer',
|
930
|
+
isMut: !1,
|
931
|
+
isSigner: !0,
|
932
|
+
docs: ['The address with authority to deposit the tokens'],
|
933
|
+
},
|
934
|
+
{
|
935
|
+
name: 'depositorTokenMintAccount',
|
936
|
+
isMut: !0,
|
937
|
+
isSigner: !1,
|
938
|
+
docs: ['The destination of the tokens to be withdrawn'],
|
939
|
+
},
|
940
|
+
{
|
941
|
+
name: 'marginAccount',
|
942
|
+
isMut: !0,
|
943
|
+
isSigner: !1,
|
944
|
+
docs: [
|
945
|
+
'The margin account for borrower, which was initialized at the first deposit',
|
946
|
+
],
|
947
|
+
},
|
948
|
+
{
|
949
|
+
name: 'feeDestination',
|
950
|
+
isMut: !0,
|
951
|
+
isSigner: !1,
|
952
|
+
docs: ['Fee receiver'],
|
953
|
+
},
|
954
|
+
{
|
955
|
+
name: 'payer',
|
956
|
+
isMut: !0,
|
957
|
+
isSigner: !0,
|
958
|
+
docs: ['The account paying for all rents'],
|
959
|
+
},
|
960
|
+
{
|
961
|
+
name: 'tokenProgram',
|
962
|
+
isMut: !1,
|
963
|
+
isSigner: !1,
|
964
|
+
docs: ['Solana ecosystem accounts'],
|
965
|
+
},
|
966
|
+
{
|
967
|
+
name: 'associatedTokenProgram',
|
968
|
+
isMut: !1,
|
969
|
+
isSigner: !1,
|
970
|
+
},
|
971
|
+
{
|
972
|
+
name: 'systemProgram',
|
973
|
+
isMut: !1,
|
974
|
+
isSigner: !1,
|
975
|
+
},
|
976
|
+
],
|
977
|
+
args: [],
|
978
|
+
},
|
979
|
+
{
|
980
|
+
name: 'liquidate',
|
981
|
+
docs: ['* amount: token amount'],
|
982
|
+
accounts: [
|
983
|
+
{
|
984
|
+
name: 'leveragefi',
|
985
|
+
isMut: !1,
|
986
|
+
isSigner: !1,
|
987
|
+
docs: ['The LeverageFi platform'],
|
988
|
+
},
|
989
|
+
{
|
990
|
+
name: 'usdcMarginPool',
|
991
|
+
isMut: !0,
|
992
|
+
isSigner: !1,
|
993
|
+
docs: ['Pool where USDC is borrowed from'],
|
994
|
+
},
|
995
|
+
{
|
996
|
+
name: 'jlpMarginPool',
|
997
|
+
isMut: !0,
|
998
|
+
isSigner: !1,
|
999
|
+
docs: ['Pool where JLP is deposited as collateral'],
|
1000
|
+
},
|
1001
|
+
{
|
1002
|
+
name: 'marginAccount',
|
1003
|
+
isMut: !0,
|
1004
|
+
isSigner: !1,
|
1005
|
+
docs: [
|
1006
|
+
'The margin account for borrower, which was initialized at the first deposit',
|
1007
|
+
],
|
1008
|
+
},
|
1009
|
+
{
|
1010
|
+
name: 'jupiterAccount',
|
1011
|
+
isMut: !0,
|
1012
|
+
isSigner: !1,
|
1013
|
+
docs: ['The jupiter account to send the leveraged loan tokens'],
|
1014
|
+
},
|
1015
|
+
{
|
1016
|
+
name: 'usdcPriceOracle',
|
1017
|
+
isMut: !0,
|
1018
|
+
isSigner: !1,
|
1019
|
+
},
|
1020
|
+
{
|
1021
|
+
name: 'jlpPriceOracle',
|
1022
|
+
isMut: !0,
|
1023
|
+
isSigner: !1,
|
1024
|
+
},
|
1025
|
+
{
|
1026
|
+
name: 'jlpPoolAuthority',
|
1027
|
+
isMut: !1,
|
1028
|
+
isSigner: !1,
|
1029
|
+
},
|
1030
|
+
{
|
1031
|
+
name: 'jlpVault',
|
1032
|
+
isMut: !0,
|
1033
|
+
isSigner: !1,
|
1034
|
+
docs: ['Token account holding JLP margin pool deposits'],
|
1035
|
+
},
|
1036
|
+
{
|
1037
|
+
name: 'jlpMint',
|
1038
|
+
isMut: !1,
|
1039
|
+
isSigner: !1,
|
1040
|
+
docs: ['The mint for JLP token'],
|
1041
|
+
},
|
1042
|
+
{
|
1043
|
+
name: 'usdcMint',
|
1044
|
+
isMut: !1,
|
1045
|
+
isSigner: !1,
|
1046
|
+
docs: ['Mint for USDC'],
|
1047
|
+
},
|
1048
|
+
{
|
1049
|
+
name: 'liquidatorJlpMintAccount',
|
1050
|
+
isMut: !0,
|
1051
|
+
isSigner: !1,
|
1052
|
+
docs: ['The jlp_mint account for jupiter account'],
|
1053
|
+
},
|
1054
|
+
{
|
1055
|
+
name: 'jupiterAuthority',
|
1056
|
+
isMut: !1,
|
1057
|
+
isSigner: !1,
|
1058
|
+
},
|
1059
|
+
{
|
1060
|
+
name: 'jupiterJlpMintAccount',
|
1061
|
+
isMut: !0,
|
1062
|
+
isSigner: !1,
|
1063
|
+
docs: ['The jlp_mint account for jupiter account'],
|
1064
|
+
},
|
1065
|
+
{
|
1066
|
+
name: 'liquidatee',
|
1067
|
+
isMut: !1,
|
1068
|
+
isSigner: !1,
|
1069
|
+
},
|
1070
|
+
{
|
1071
|
+
name: 'liquidator',
|
1072
|
+
isMut: !0,
|
1073
|
+
isSigner: !0,
|
1074
|
+
docs: ['The address with authority to the liquidator rewards'],
|
1075
|
+
},
|
1076
|
+
{
|
1077
|
+
name: 'instructions',
|
1078
|
+
isMut: !1,
|
1079
|
+
isSigner: !1,
|
1080
|
+
},
|
1081
|
+
{
|
1082
|
+
name: 'tokenProgram',
|
1083
|
+
isMut: !1,
|
1084
|
+
isSigner: !1,
|
1085
|
+
docs: ['Solana ecosystem accounts'],
|
1086
|
+
},
|
1087
|
+
{
|
1088
|
+
name: 'associatedTokenProgram',
|
1089
|
+
isMut: !1,
|
1090
|
+
isSigner: !1,
|
1091
|
+
},
|
1092
|
+
{
|
1093
|
+
name: 'systemProgram',
|
1094
|
+
isMut: !1,
|
1095
|
+
isSigner: !1,
|
1096
|
+
},
|
1097
|
+
],
|
1098
|
+
args: [],
|
1099
|
+
},
|
1100
|
+
{
|
1101
|
+
name: 'afterLiquidate',
|
1102
|
+
docs: ['* amount: token amount'],
|
1103
|
+
accounts: [
|
1104
|
+
{
|
1105
|
+
name: 'leveragefi',
|
1106
|
+
isMut: !1,
|
1107
|
+
isSigner: !1,
|
1108
|
+
docs: ['The LeverageFi platform'],
|
1109
|
+
},
|
1110
|
+
{
|
1111
|
+
name: 'usdcMarginPool',
|
1112
|
+
isMut: !0,
|
1113
|
+
isSigner: !1,
|
1114
|
+
docs: ['Pool where USDC is borrowed from'],
|
1115
|
+
},
|
1116
|
+
{
|
1117
|
+
name: 'marginAccount',
|
1118
|
+
isMut: !0,
|
1119
|
+
isSigner: !1,
|
1120
|
+
docs: [
|
1121
|
+
'The margin account for borrower, which was initialized at the first deposit',
|
1122
|
+
],
|
1123
|
+
},
|
1124
|
+
{
|
1125
|
+
name: 'usdcMint',
|
1126
|
+
isMut: !1,
|
1127
|
+
isSigner: !1,
|
1128
|
+
docs: ['Mint for USDC'],
|
1129
|
+
},
|
1130
|
+
{
|
1131
|
+
name: 'liquidatorUsdcMintAccount',
|
1132
|
+
isMut: !0,
|
1133
|
+
isSigner: !1,
|
1134
|
+
docs: ['The usdc_mint account for liquidator'],
|
1135
|
+
},
|
1136
|
+
{
|
1137
|
+
name: 'liquidateeUsdcMintAccount',
|
1138
|
+
isMut: !0,
|
1139
|
+
isSigner: !1,
|
1140
|
+
},
|
1141
|
+
{
|
1142
|
+
name: 'usdcVault',
|
1143
|
+
isMut: !0,
|
1144
|
+
isSigner: !1,
|
1145
|
+
docs: ['Token account holding the USDC margin pool deposits'],
|
1146
|
+
},
|
1147
|
+
{
|
1148
|
+
name: 'liquidatee',
|
1149
|
+
isMut: !1,
|
1150
|
+
isSigner: !1,
|
1151
|
+
},
|
1152
|
+
{
|
1153
|
+
name: 'liquidator',
|
1154
|
+
isMut: !1,
|
1155
|
+
isSigner: !0,
|
1156
|
+
docs: ['The address with authority to the liquidator rewards'],
|
1157
|
+
},
|
1158
|
+
{
|
1159
|
+
name: 'instructions',
|
1160
|
+
isMut: !1,
|
1161
|
+
isSigner: !1,
|
1162
|
+
},
|
1163
|
+
{
|
1164
|
+
name: 'tokenProgram',
|
1165
|
+
isMut: !1,
|
1166
|
+
isSigner: !1,
|
1167
|
+
docs: ['Solana ecosystem accounts'],
|
1168
|
+
},
|
1169
|
+
{
|
1170
|
+
name: 'associatedTokenProgram',
|
1171
|
+
isMut: !1,
|
1172
|
+
isSigner: !1,
|
1173
|
+
},
|
1174
|
+
{
|
1175
|
+
name: 'systemProgram',
|
1176
|
+
isMut: !1,
|
1177
|
+
isSigner: !1,
|
1178
|
+
},
|
1179
|
+
],
|
1180
|
+
args: [
|
1181
|
+
{
|
1182
|
+
name: 'swapAmount',
|
1183
|
+
type: 'u64',
|
1184
|
+
},
|
1185
|
+
],
|
1186
|
+
},
|
1187
|
+
{
|
1188
|
+
name: 'jlpWithdraw',
|
1189
|
+
accounts: [
|
1190
|
+
{
|
1191
|
+
name: 'leveragefi',
|
1192
|
+
isMut: !1,
|
1193
|
+
isSigner: !1,
|
1194
|
+
docs: ['The LeverageFi platform'],
|
1195
|
+
},
|
1196
|
+
{
|
1197
|
+
name: 'usdcMarginPool',
|
1198
|
+
isMut: !0,
|
1199
|
+
isSigner: !1,
|
1200
|
+
docs: ['Pool where USDC is borrowed from'],
|
1201
|
+
},
|
1202
|
+
{
|
1203
|
+
name: 'usdcPriceOracle',
|
1204
|
+
isMut: !0,
|
1205
|
+
isSigner: !1,
|
1206
|
+
},
|
1207
|
+
{
|
1208
|
+
name: 'jlpPriceOracle',
|
1209
|
+
isMut: !0,
|
1210
|
+
isSigner: !1,
|
1211
|
+
},
|
1212
|
+
{
|
1213
|
+
name: 'jupiterAccount',
|
1214
|
+
isMut: !0,
|
1215
|
+
isSigner: !1,
|
1216
|
+
docs: ['The jupiter account recording jlp notes and jupiter info'],
|
1217
|
+
},
|
1218
|
+
{
|
1219
|
+
name: 'jupiterAuthority',
|
1220
|
+
isMut: !1,
|
1221
|
+
isSigner: !1,
|
1222
|
+
},
|
1223
|
+
{
|
1224
|
+
name: 'jlpMint',
|
1225
|
+
isMut: !1,
|
1226
|
+
isSigner: !1,
|
1227
|
+
docs: ['The mint for JLP token'],
|
1228
|
+
},
|
1229
|
+
{
|
1230
|
+
name: 'jupiterJlpMintAccount',
|
1231
|
+
isMut: !0,
|
1232
|
+
isSigner: !1,
|
1233
|
+
docs: ['The jlp_mint account for jupiter account'],
|
1234
|
+
},
|
1235
|
+
{
|
1236
|
+
name: 'withdrawer',
|
1237
|
+
isMut: !1,
|
1238
|
+
isSigner: !0,
|
1239
|
+
docs: ['The address with authority to deposit the tokens'],
|
1240
|
+
},
|
1241
|
+
{
|
1242
|
+
name: 'withdrawerJlpMintAccount',
|
1243
|
+
isMut: !0,
|
1244
|
+
isSigner: !1,
|
1245
|
+
docs: ['The jlp_mint account for withdrawer'],
|
1246
|
+
},
|
1247
|
+
{
|
1248
|
+
name: 'feeDestination',
|
1249
|
+
isMut: !0,
|
1250
|
+
isSigner: !1,
|
1251
|
+
docs: ['token account for fees, ATA for JLP'],
|
1252
|
+
},
|
1253
|
+
{
|
1254
|
+
name: 'marginAccount',
|
1255
|
+
isMut: !0,
|
1256
|
+
isSigner: !1,
|
1257
|
+
docs: [
|
1258
|
+
'The margin account for borrower, which was initialized at the first deposit',
|
1259
|
+
],
|
1260
|
+
},
|
1261
|
+
{
|
1262
|
+
name: 'tokenProgram',
|
1263
|
+
isMut: !1,
|
1264
|
+
isSigner: !1,
|
1265
|
+
docs: ['Solana ecosystem accounts'],
|
1266
|
+
},
|
1267
|
+
{
|
1268
|
+
name: 'associatedTokenProgram',
|
1269
|
+
isMut: !1,
|
1270
|
+
isSigner: !1,
|
1271
|
+
},
|
1272
|
+
{
|
1273
|
+
name: 'systemProgram',
|
1274
|
+
isMut: !1,
|
1275
|
+
isSigner: !1,
|
1276
|
+
},
|
1277
|
+
],
|
1278
|
+
args: [
|
1279
|
+
{
|
1280
|
+
name: 'amount',
|
1281
|
+
type: 'u64',
|
1282
|
+
},
|
1283
|
+
],
|
1284
|
+
},
|
1285
|
+
{
|
1286
|
+
name: 'setPenaltyInterestRate',
|
1287
|
+
accounts: [
|
1288
|
+
{
|
1289
|
+
name: 'leveragefi',
|
1290
|
+
isMut: !0,
|
1291
|
+
isSigner: !1,
|
1292
|
+
},
|
1293
|
+
{
|
1294
|
+
name: 'user',
|
1295
|
+
isMut: !1,
|
1296
|
+
isSigner: !0,
|
1297
|
+
docs: ['The address with authority'],
|
1298
|
+
},
|
1299
|
+
{
|
1300
|
+
name: 'systemProgram',
|
1301
|
+
isMut: !1,
|
1302
|
+
isSigner: !1,
|
1303
|
+
docs: ['Solana ecosystem accounts'],
|
1304
|
+
},
|
1305
|
+
],
|
1306
|
+
args: [
|
1307
|
+
{
|
1308
|
+
name: 'penaltyInterestRate',
|
1309
|
+
type: 'u16',
|
1310
|
+
},
|
1311
|
+
],
|
1312
|
+
},
|
1313
|
+
{
|
1314
|
+
name: 'setWithdrawFeeRate',
|
1315
|
+
accounts: [
|
1316
|
+
{
|
1317
|
+
name: 'leveragefi',
|
1318
|
+
isMut: !0,
|
1319
|
+
isSigner: !1,
|
1320
|
+
},
|
1321
|
+
{
|
1322
|
+
name: 'user',
|
1323
|
+
isMut: !1,
|
1324
|
+
isSigner: !0,
|
1325
|
+
docs: ['The address with authority'],
|
1326
|
+
},
|
1327
|
+
{
|
1328
|
+
name: 'systemProgram',
|
1329
|
+
isMut: !1,
|
1330
|
+
isSigner: !1,
|
1331
|
+
docs: ['Solana ecosystem accounts'],
|
1332
|
+
},
|
1333
|
+
],
|
1334
|
+
args: [
|
1335
|
+
{
|
1336
|
+
name: 'withdrawFeeRate',
|
1337
|
+
type: 'u16',
|
1338
|
+
},
|
1339
|
+
],
|
1340
|
+
},
|
1341
|
+
{
|
1342
|
+
name: 'setProtocolFeeRate',
|
1343
|
+
accounts: [
|
1344
|
+
{
|
1345
|
+
name: 'leveragefi',
|
1346
|
+
isMut: !0,
|
1347
|
+
isSigner: !1,
|
1348
|
+
},
|
1349
|
+
{
|
1350
|
+
name: 'user',
|
1351
|
+
isMut: !1,
|
1352
|
+
isSigner: !0,
|
1353
|
+
docs: ['The address with authority'],
|
1354
|
+
},
|
1355
|
+
{
|
1356
|
+
name: 'systemProgram',
|
1357
|
+
isMut: !1,
|
1358
|
+
isSigner: !1,
|
1359
|
+
docs: ['Solana ecosystem accounts'],
|
1360
|
+
},
|
1361
|
+
],
|
1362
|
+
args: [
|
1363
|
+
{
|
1364
|
+
name: 'protocolFeeRate',
|
1365
|
+
type: 'u16',
|
1366
|
+
},
|
1367
|
+
],
|
1368
|
+
},
|
1369
|
+
{
|
1370
|
+
name: 'setPaused',
|
1371
|
+
accounts: [
|
1372
|
+
{
|
1373
|
+
name: 'leveragefi',
|
1374
|
+
isMut: !0,
|
1375
|
+
isSigner: !1,
|
1376
|
+
},
|
1377
|
+
{
|
1378
|
+
name: 'user',
|
1379
|
+
isMut: !1,
|
1380
|
+
isSigner: !0,
|
1381
|
+
docs: ['The address with authority'],
|
1382
|
+
},
|
1383
|
+
{
|
1384
|
+
name: 'systemProgram',
|
1385
|
+
isMut: !1,
|
1386
|
+
isSigner: !1,
|
1387
|
+
docs: ['Solana ecosystem accounts'],
|
1388
|
+
},
|
1389
|
+
],
|
1390
|
+
args: [
|
1391
|
+
{
|
1392
|
+
name: 'pause',
|
1393
|
+
type: 'bool',
|
1394
|
+
},
|
1395
|
+
],
|
1396
|
+
},
|
1397
|
+
{
|
1398
|
+
name: 'setSwapSlippage',
|
1399
|
+
accounts: [
|
1400
|
+
{
|
1401
|
+
name: 'leveragefi',
|
1402
|
+
isMut: !0,
|
1403
|
+
isSigner: !1,
|
1404
|
+
},
|
1405
|
+
{
|
1406
|
+
name: 'user',
|
1407
|
+
isMut: !1,
|
1408
|
+
isSigner: !0,
|
1409
|
+
docs: ['The address with authority'],
|
1410
|
+
},
|
1411
|
+
{
|
1412
|
+
name: 'systemProgram',
|
1413
|
+
isMut: !1,
|
1414
|
+
isSigner: !1,
|
1415
|
+
docs: ['Solana ecosystem accounts'],
|
1416
|
+
},
|
1417
|
+
],
|
1418
|
+
args: [
|
1419
|
+
{
|
1420
|
+
name: 'slippage',
|
1421
|
+
type: 'u16',
|
1422
|
+
},
|
1423
|
+
],
|
1424
|
+
},
|
1425
|
+
{
|
1426
|
+
name: 'claimProtocolFee',
|
1427
|
+
accounts: [
|
1428
|
+
{
|
1429
|
+
name: 'leveragefi',
|
1430
|
+
isMut: !0,
|
1431
|
+
isSigner: !1,
|
1432
|
+
},
|
1433
|
+
{
|
1434
|
+
name: 'usdcMarginPool',
|
1435
|
+
isMut: !0,
|
1436
|
+
isSigner: !1,
|
1437
|
+
},
|
1438
|
+
{
|
1439
|
+
name: 'poolAuthority',
|
1440
|
+
isMut: !1,
|
1441
|
+
isSigner: !1,
|
1442
|
+
},
|
1443
|
+
{
|
1444
|
+
name: 'vault',
|
1445
|
+
isMut: !0,
|
1446
|
+
isSigner: !1,
|
1447
|
+
docs: [
|
1448
|
+
"Read-only, the token account holding the pool's deposited funds",
|
1449
|
+
],
|
1450
|
+
},
|
1451
|
+
{
|
1452
|
+
name: 'admin',
|
1453
|
+
isMut: !1,
|
1454
|
+
isSigner: !0,
|
1455
|
+
docs: ['The address with authority'],
|
1456
|
+
},
|
1457
|
+
{
|
1458
|
+
name: 'usdcMint',
|
1459
|
+
isMut: !1,
|
1460
|
+
isSigner: !1,
|
1461
|
+
},
|
1462
|
+
{
|
1463
|
+
name: 'adminUsdcMintAccount',
|
1464
|
+
isMut: !1,
|
1465
|
+
isSigner: !1,
|
1466
|
+
},
|
1467
|
+
{
|
1468
|
+
name: 'tokenProgram',
|
1469
|
+
isMut: !1,
|
1470
|
+
isSigner: !1,
|
1471
|
+
docs: ['Solana ecosystem accounts'],
|
1472
|
+
},
|
1473
|
+
{
|
1474
|
+
name: 'associatedTokenProgram',
|
1475
|
+
isMut: !1,
|
1476
|
+
isSigner: !1,
|
1477
|
+
},
|
1478
|
+
{
|
1479
|
+
name: 'systemProgram',
|
1480
|
+
isMut: !1,
|
1481
|
+
isSigner: !1,
|
1482
|
+
},
|
1483
|
+
],
|
1484
|
+
args: [
|
1485
|
+
{
|
1486
|
+
name: 'amount',
|
1487
|
+
type: 'u64',
|
1488
|
+
},
|
1489
|
+
],
|
1490
|
+
},
|
1491
|
+
],
|
1492
|
+
accounts: [
|
1493
|
+
{
|
1494
|
+
name: 'leveragefi',
|
1495
|
+
type: {
|
1496
|
+
kind: 'struct',
|
1497
|
+
fields: [
|
1498
|
+
{
|
1499
|
+
name: 'id',
|
1500
|
+
docs: ['The primary key of the leverage finance'],
|
1501
|
+
type: 'publicKey',
|
1502
|
+
},
|
1503
|
+
{
|
1504
|
+
name: 'admin',
|
1505
|
+
docs: ['Account that has admin authority over the leveragefi'],
|
1506
|
+
type: 'publicKey',
|
1507
|
+
},
|
1508
|
+
{
|
1509
|
+
name: 'paused',
|
1510
|
+
docs: ['Disable all protocol operations'],
|
1511
|
+
type: 'bool',
|
1512
|
+
},
|
1513
|
+
{
|
1514
|
+
name: 'swapSlippage',
|
1515
|
+
type: 'u16',
|
1516
|
+
},
|
1517
|
+
{
|
1518
|
+
name: 'jlpInterestRate',
|
1519
|
+
docs: [
|
1520
|
+
'The jlp interest rate, basic unit for margin interest calculation',
|
1521
|
+
],
|
1522
|
+
type: 'u16',
|
1523
|
+
},
|
1524
|
+
{
|
1525
|
+
name: 'penaltyInterestRate',
|
1526
|
+
docs: ['Penalty interest point'],
|
1527
|
+
type: 'u16',
|
1528
|
+
},
|
1529
|
+
{
|
1530
|
+
name: 'liquidationReward',
|
1531
|
+
type: 'u16',
|
1532
|
+
},
|
1533
|
+
{
|
1534
|
+
name: 'withdrawFeeRate',
|
1535
|
+
docs: ['jlp withdraw fee rate for taking profit, 10000 as unit'],
|
1536
|
+
type: 'u16',
|
1537
|
+
},
|
1538
|
+
{
|
1539
|
+
name: 'protocolFeeRate',
|
1540
|
+
docs: ['interest fee rate, 10000 as unit'],
|
1541
|
+
type: 'u16',
|
1542
|
+
},
|
1543
|
+
],
|
1544
|
+
},
|
1545
|
+
},
|
1546
|
+
{
|
1547
|
+
name: 'jupiterAccount',
|
1548
|
+
type: {
|
1549
|
+
kind: 'struct',
|
1550
|
+
fields: [
|
1551
|
+
{
|
1552
|
+
name: 'leveragefi',
|
1553
|
+
docs: ['Primary key of the LeverageFi to create pool'],
|
1554
|
+
type: 'publicKey',
|
1555
|
+
},
|
1556
|
+
{
|
1557
|
+
name: 'admin',
|
1558
|
+
docs: ['Account that has admin authority over the account'],
|
1559
|
+
type: 'publicKey',
|
1560
|
+
},
|
1561
|
+
{
|
1562
|
+
name: 'jlpMint',
|
1563
|
+
docs: ['The JLP token mint'],
|
1564
|
+
type: 'publicKey',
|
1565
|
+
},
|
1566
|
+
{
|
1567
|
+
name: 'jlpAccount',
|
1568
|
+
docs: ['The JLP token account'],
|
1569
|
+
type: 'publicKey',
|
1570
|
+
},
|
1571
|
+
{
|
1572
|
+
name: 'jupiterNotes',
|
1573
|
+
docs: ['The total amount of notes issued to jupiter account users'],
|
1574
|
+
type: 'u64',
|
1575
|
+
},
|
1576
|
+
{
|
1577
|
+
name: 'jlpPosition',
|
1578
|
+
docs: [
|
1579
|
+
'The total amount of JLP position, currently unused, value: 0',
|
1580
|
+
],
|
1581
|
+
type: 'u64',
|
1582
|
+
},
|
1583
|
+
],
|
1584
|
+
},
|
1585
|
+
},
|
1586
|
+
{
|
1587
|
+
name: 'marginPool',
|
1588
|
+
type: {
|
1589
|
+
kind: 'struct',
|
1590
|
+
fields: [
|
1591
|
+
{
|
1592
|
+
name: 'leveragefi',
|
1593
|
+
docs: ['Primary key of the LeverageFi to create pool'],
|
1594
|
+
type: 'publicKey',
|
1595
|
+
},
|
1596
|
+
{
|
1597
|
+
name: 'vault',
|
1598
|
+
docs: [
|
1599
|
+
'The address of the vault account, which has custody of the',
|
1600
|
+
"pool's tokens",
|
1601
|
+
],
|
1602
|
+
type: 'publicKey',
|
1603
|
+
},
|
1604
|
+
{
|
1605
|
+
name: 'feeDestination',
|
1606
|
+
docs: [
|
1607
|
+
'The address of the account to deposit collected fees, represented as',
|
1608
|
+
'deposit notes',
|
1609
|
+
],
|
1610
|
+
type: 'publicKey',
|
1611
|
+
},
|
1612
|
+
{
|
1613
|
+
name: 'poolAuthority',
|
1614
|
+
docs: ['The pool authority to act'],
|
1615
|
+
type: 'publicKey',
|
1616
|
+
},
|
1617
|
+
{
|
1618
|
+
name: 'tokenMint',
|
1619
|
+
docs: ['The token the pool allows lending and borrowing on'],
|
1620
|
+
type: 'publicKey',
|
1621
|
+
},
|
1622
|
+
{
|
1623
|
+
name: 'tokenPriceOracle',
|
1624
|
+
docs: [
|
1625
|
+
'The address of the pyth oracle with price information for the token',
|
1626
|
+
],
|
1627
|
+
type: 'publicKey',
|
1628
|
+
},
|
1629
|
+
{
|
1630
|
+
name: 'borrowedTokens',
|
1631
|
+
docs: [
|
1632
|
+
'The total amount of tokens borrowed, that need to be repaid to',
|
1633
|
+
'the pool.',
|
1634
|
+
],
|
1635
|
+
type: 'u64',
|
1636
|
+
},
|
1637
|
+
{
|
1638
|
+
name: 'depositTokens',
|
1639
|
+
docs: ["The total amount of tokens available in the pool's vault"],
|
1640
|
+
type: 'u64',
|
1641
|
+
},
|
1642
|
+
{
|
1643
|
+
name: 'depositNotes',
|
1644
|
+
docs: ['The total amount of notes issued to depositors of tokens.'],
|
1645
|
+
type: 'u64',
|
1646
|
+
},
|
1647
|
+
{
|
1648
|
+
name: 'loanNotes',
|
1649
|
+
docs: ['The total amount of notes issued to borrowers of tokens'],
|
1650
|
+
type: 'u64',
|
1651
|
+
},
|
1652
|
+
{
|
1653
|
+
name: 'depositInterest',
|
1654
|
+
docs: [
|
1655
|
+
'Amount of unpaid interest to depositors, for deposit note exchange rate calculation',
|
1656
|
+
],
|
1657
|
+
type: 'u64',
|
1658
|
+
},
|
1659
|
+
{
|
1660
|
+
name: 'loanInterest',
|
1661
|
+
docs: [
|
1662
|
+
'Amount of unrepaid interest by borrowers, for loan note exchange rate calculation',
|
1663
|
+
],
|
1664
|
+
type: 'u64',
|
1665
|
+
},
|
1666
|
+
{
|
1667
|
+
name: 'protocolFee',
|
1668
|
+
docs: ['10% of interest goes to the protocol,'],
|
1669
|
+
type: 'u64',
|
1670
|
+
},
|
1671
|
+
{
|
1672
|
+
name: 'accruedUntil',
|
1673
|
+
docs: ['The time the interest was last accrued up to'],
|
1674
|
+
type: 'i64',
|
1675
|
+
},
|
1676
|
+
{
|
1677
|
+
name: 'utilizationFlag',
|
1678
|
+
docs: ['If the utilization rate is flagged as full'],
|
1679
|
+
type: 'u16',
|
1680
|
+
},
|
1681
|
+
],
|
1682
|
+
},
|
1683
|
+
},
|
1684
|
+
{
|
1685
|
+
name: 'marginAccount',
|
1686
|
+
docs: ['User margin state, with collateral & loan details'],
|
1687
|
+
type: {
|
1688
|
+
kind: 'struct',
|
1689
|
+
fields: [
|
1690
|
+
{
|
1691
|
+
name: 'leveragefi',
|
1692
|
+
docs: ['Primary key of the LeverageFi to create pool'],
|
1693
|
+
type: 'publicKey',
|
1694
|
+
},
|
1695
|
+
{
|
1696
|
+
name: 'owner',
|
1697
|
+
docs: ['Owner authority which can borrow liquidity'],
|
1698
|
+
type: 'publicKey',
|
1699
|
+
},
|
1700
|
+
{
|
1701
|
+
name: 'deposits',
|
1702
|
+
docs: ['Deposited collateral, unique by deposit reserve address'],
|
1703
|
+
type: {
|
1704
|
+
vec: {
|
1705
|
+
defined: 'CollateralDetail',
|
1706
|
+
},
|
1707
|
+
},
|
1708
|
+
},
|
1709
|
+
{
|
1710
|
+
name: 'loans',
|
1711
|
+
docs: ['Borrowed liquidity, unique by borrow reserve address'],
|
1712
|
+
type: {
|
1713
|
+
vec: {
|
1714
|
+
defined: 'LoanDetail',
|
1715
|
+
},
|
1716
|
+
},
|
1717
|
+
},
|
1718
|
+
{
|
1719
|
+
name: 'leverage',
|
1720
|
+
docs: ['Leverage info'],
|
1721
|
+
type: 'u64',
|
1722
|
+
},
|
1723
|
+
{
|
1724
|
+
name: 'jlpNotes',
|
1725
|
+
docs: [
|
1726
|
+
'Holding JLP quota, JLP obtained from swapping borrowed USDC',
|
1727
|
+
],
|
1728
|
+
type: 'u64',
|
1729
|
+
},
|
1730
|
+
{
|
1731
|
+
name: 'activeLoan',
|
1732
|
+
docs: [
|
1733
|
+
'Loan asset used for leverage, each account can only borrow one type of asset',
|
1734
|
+
'Resets to PUBKEY_DEFAULT upon repaying all loan with interest',
|
1735
|
+
],
|
1736
|
+
type: 'publicKey',
|
1737
|
+
},
|
1738
|
+
],
|
1739
|
+
},
|
1740
|
+
},
|
1741
|
+
{
|
1742
|
+
name: 'pool',
|
1743
|
+
type: {
|
1744
|
+
kind: 'struct',
|
1745
|
+
fields: [
|
1746
|
+
{
|
1747
|
+
name: 'name',
|
1748
|
+
type: 'string',
|
1749
|
+
},
|
1750
|
+
{
|
1751
|
+
name: 'custodies',
|
1752
|
+
type: {
|
1753
|
+
vec: 'publicKey',
|
1754
|
+
},
|
1755
|
+
},
|
1756
|
+
{
|
1757
|
+
name: 'aumUsd',
|
1758
|
+
docs: ['Pool value in usd scaled by 6 decimals'],
|
1759
|
+
type: 'u128',
|
1760
|
+
},
|
1761
|
+
{
|
1762
|
+
name: 'limit',
|
1763
|
+
type: {
|
1764
|
+
defined: 'Limit',
|
1765
|
+
},
|
1766
|
+
},
|
1767
|
+
{
|
1768
|
+
name: 'fees',
|
1769
|
+
type: {
|
1770
|
+
defined: 'Fees',
|
1771
|
+
},
|
1772
|
+
},
|
1773
|
+
{
|
1774
|
+
name: 'poolApr',
|
1775
|
+
type: {
|
1776
|
+
defined: 'PoolApr',
|
1777
|
+
},
|
1778
|
+
},
|
1779
|
+
{
|
1780
|
+
name: 'maxRequestExecutionSec',
|
1781
|
+
type: 'i64',
|
1782
|
+
},
|
1783
|
+
{
|
1784
|
+
name: 'bump',
|
1785
|
+
type: 'u8',
|
1786
|
+
},
|
1787
|
+
{
|
1788
|
+
name: 'lpTokenBump',
|
1789
|
+
type: 'u8',
|
1790
|
+
},
|
1791
|
+
{
|
1792
|
+
name: 'inceptionTime',
|
1793
|
+
type: 'i64',
|
1794
|
+
},
|
1795
|
+
],
|
1796
|
+
},
|
1797
|
+
},
|
1798
|
+
],
|
1799
|
+
types: [
|
1800
|
+
{
|
1801
|
+
name: 'CollateralDetail',
|
1802
|
+
docs: ['collateral detailed state'],
|
1803
|
+
type: {
|
1804
|
+
kind: 'struct',
|
1805
|
+
fields: [
|
1806
|
+
{
|
1807
|
+
name: 'tokenMint',
|
1808
|
+
docs: ['The deposited token'],
|
1809
|
+
type: 'publicKey',
|
1810
|
+
},
|
1811
|
+
{
|
1812
|
+
name: 'depositNote',
|
1813
|
+
docs: ['Amount of collateral deposited, deposit note'],
|
1814
|
+
type: 'u64',
|
1815
|
+
},
|
1816
|
+
{
|
1817
|
+
name: 'depositToken',
|
1818
|
+
docs: ['Amount of collateral deposited, token'],
|
1819
|
+
type: 'u64',
|
1820
|
+
},
|
1821
|
+
{
|
1822
|
+
name: 'marketValue',
|
1823
|
+
docs: ['Total value of deposits, front-end use only'],
|
1824
|
+
type: 'u64',
|
1825
|
+
},
|
1826
|
+
],
|
1827
|
+
},
|
1828
|
+
},
|
1829
|
+
{
|
1830
|
+
name: 'LoanDetail',
|
1831
|
+
docs: ['Obligation liquidity state'],
|
1832
|
+
type: {
|
1833
|
+
kind: 'struct',
|
1834
|
+
fields: [
|
1835
|
+
{
|
1836
|
+
name: 'tokenMint',
|
1837
|
+
docs: ['The borrowed token'],
|
1838
|
+
type: 'publicKey',
|
1839
|
+
},
|
1840
|
+
{
|
1841
|
+
name: 'loanNote',
|
1842
|
+
docs: ['Amount of asset loan, loan note'],
|
1843
|
+
type: 'u64',
|
1844
|
+
},
|
1845
|
+
{
|
1846
|
+
name: 'loanToken',
|
1847
|
+
docs: ['Amount of asset loan, token'],
|
1848
|
+
type: 'u64',
|
1849
|
+
},
|
1850
|
+
{
|
1851
|
+
name: 'loanValue',
|
1852
|
+
docs: ['Total value of loan, front-end use only'],
|
1853
|
+
type: 'u64',
|
1854
|
+
},
|
1855
|
+
],
|
1856
|
+
},
|
1857
|
+
},
|
1858
|
+
{
|
1859
|
+
name: 'Amount',
|
1860
|
+
docs: ['Represent an amount of some value (like tokens, or notes)'],
|
1861
|
+
type: {
|
1862
|
+
kind: 'struct',
|
1863
|
+
fields: [
|
1864
|
+
{
|
1865
|
+
name: 'kind',
|
1866
|
+
type: {
|
1867
|
+
defined: 'AmountKind',
|
1868
|
+
},
|
1869
|
+
},
|
1870
|
+
{
|
1871
|
+
name: 'value',
|
1872
|
+
type: 'u64',
|
1873
|
+
},
|
1874
|
+
],
|
1875
|
+
},
|
1876
|
+
},
|
1877
|
+
{
|
1878
|
+
name: 'Limit',
|
1879
|
+
type: {
|
1880
|
+
kind: 'struct',
|
1881
|
+
fields: [
|
1882
|
+
{
|
1883
|
+
name: 'maxAumUsd',
|
1884
|
+
type: 'u128',
|
1885
|
+
},
|
1886
|
+
{
|
1887
|
+
name: 'maxIndividualLpToken',
|
1888
|
+
type: 'u128',
|
1889
|
+
},
|
1890
|
+
{
|
1891
|
+
name: 'maxPositionUsd',
|
1892
|
+
type: 'u64',
|
1893
|
+
},
|
1894
|
+
],
|
1895
|
+
},
|
1896
|
+
},
|
1897
|
+
{
|
1898
|
+
name: 'Fees',
|
1899
|
+
type: {
|
1900
|
+
kind: 'struct',
|
1901
|
+
fields: [
|
1902
|
+
{
|
1903
|
+
name: 'increasePositionBps',
|
1904
|
+
type: 'u64',
|
1905
|
+
},
|
1906
|
+
{
|
1907
|
+
name: 'decreasePositionBps',
|
1908
|
+
type: 'u64',
|
1909
|
+
},
|
1910
|
+
{
|
1911
|
+
name: 'addRemoveLiquidityBps',
|
1912
|
+
type: 'u64',
|
1913
|
+
},
|
1914
|
+
{
|
1915
|
+
name: 'swapBps',
|
1916
|
+
type: 'u64',
|
1917
|
+
},
|
1918
|
+
{
|
1919
|
+
name: 'taxBps',
|
1920
|
+
type: 'u64',
|
1921
|
+
},
|
1922
|
+
{
|
1923
|
+
name: 'stableSwapBps',
|
1924
|
+
type: 'u64',
|
1925
|
+
},
|
1926
|
+
{
|
1927
|
+
name: 'stableSwapTaxBps',
|
1928
|
+
type: 'u64',
|
1929
|
+
},
|
1930
|
+
{
|
1931
|
+
name: 'liquidationRewardBps',
|
1932
|
+
type: 'u64',
|
1933
|
+
},
|
1934
|
+
{
|
1935
|
+
name: 'protocolShareBps',
|
1936
|
+
type: 'u64',
|
1937
|
+
},
|
1938
|
+
],
|
1939
|
+
},
|
1940
|
+
},
|
1941
|
+
{
|
1942
|
+
name: 'PoolApr',
|
1943
|
+
type: {
|
1944
|
+
kind: 'struct',
|
1945
|
+
fields: [
|
1946
|
+
{
|
1947
|
+
name: 'lastUpdated',
|
1948
|
+
type: 'i64',
|
1949
|
+
},
|
1950
|
+
{
|
1951
|
+
name: 'feeAprBps',
|
1952
|
+
type: 'u64',
|
1953
|
+
},
|
1954
|
+
{
|
1955
|
+
name: 'realizedFeeUsd',
|
1956
|
+
type: 'u64',
|
1957
|
+
},
|
1958
|
+
],
|
1959
|
+
},
|
1960
|
+
},
|
1961
|
+
{
|
1962
|
+
name: 'AmountKind',
|
1963
|
+
type: {
|
1964
|
+
kind: 'enum',
|
1965
|
+
variants: [
|
1966
|
+
{
|
1967
|
+
name: 'Tokens',
|
1968
|
+
},
|
1969
|
+
{
|
1970
|
+
name: 'Notes',
|
1971
|
+
},
|
1972
|
+
],
|
1973
|
+
},
|
1974
|
+
},
|
1975
|
+
{
|
1976
|
+
name: 'PoolAction',
|
1977
|
+
docs: [
|
1978
|
+
'Represents the primary pool actions, used in determining the',
|
1979
|
+
'rounding direction between tokens and notes.',
|
1980
|
+
],
|
1981
|
+
type: {
|
1982
|
+
kind: 'enum',
|
1983
|
+
variants: [
|
1984
|
+
{
|
1985
|
+
name: 'Borrow',
|
1986
|
+
},
|
1987
|
+
{
|
1988
|
+
name: 'Deposit',
|
1989
|
+
},
|
1990
|
+
{
|
1991
|
+
name: 'Repay',
|
1992
|
+
},
|
1993
|
+
{
|
1994
|
+
name: 'Withdraw',
|
1995
|
+
},
|
1996
|
+
{
|
1997
|
+
name: 'Liquidate',
|
1998
|
+
},
|
1999
|
+
],
|
2000
|
+
},
|
2001
|
+
},
|
2002
|
+
{
|
2003
|
+
name: 'RoundingDirection',
|
2004
|
+
docs: [
|
2005
|
+
'Represents the direction in which we should round when converting',
|
2006
|
+
'between tokens and notes.',
|
2007
|
+
],
|
2008
|
+
type: {
|
2009
|
+
kind: 'enum',
|
2010
|
+
variants: [
|
2011
|
+
{
|
2012
|
+
name: 'Down',
|
2013
|
+
},
|
2014
|
+
{
|
2015
|
+
name: 'Up',
|
2016
|
+
},
|
2017
|
+
],
|
2018
|
+
},
|
2019
|
+
},
|
2020
|
+
],
|
2021
|
+
errors: [
|
2022
|
+
{
|
2023
|
+
code: 6e3,
|
2024
|
+
name: 'NotAuthorized',
|
2025
|
+
msg: 'Not authorized user',
|
2026
|
+
},
|
2027
|
+
{
|
2028
|
+
code: 6001,
|
2029
|
+
name: 'NotEnoughTokens',
|
2030
|
+
msg: 'Pool is in full use',
|
2031
|
+
},
|
2032
|
+
{
|
2033
|
+
code: 6002,
|
2034
|
+
name: 'LeverageTooHigh',
|
2035
|
+
msg: 'Leverage too high',
|
2036
|
+
},
|
2037
|
+
{
|
2038
|
+
code: 6003,
|
2039
|
+
name: 'InvalidFee',
|
2040
|
+
msg: 'Invalid fee',
|
2041
|
+
},
|
2042
|
+
{
|
2043
|
+
code: 6004,
|
2044
|
+
name: 'InvalidLiquidation',
|
2045
|
+
msg: 'Invalid liquidation',
|
2046
|
+
},
|
2047
|
+
{
|
2048
|
+
code: 6005,
|
2049
|
+
name: 'LiquidateTooMuch',
|
2050
|
+
msg: 'Liquidate too much',
|
2051
|
+
},
|
2052
|
+
{
|
2053
|
+
code: 6006,
|
2054
|
+
name: 'InvalidOperation',
|
2055
|
+
msg: 'Operation leads to liquidation',
|
2056
|
+
},
|
2057
|
+
{
|
2058
|
+
code: 6007,
|
2059
|
+
name: 'InvalidAmount',
|
2060
|
+
msg: 'Invalid operation amount',
|
2061
|
+
},
|
2062
|
+
{
|
2063
|
+
code: 6008,
|
2064
|
+
name: 'InsufficientLiquidity',
|
2065
|
+
msg: 'Insufficient liquidity',
|
2066
|
+
},
|
2067
|
+
{
|
2068
|
+
code: 6009,
|
2069
|
+
name: 'NoCollateral',
|
2070
|
+
msg: 'No JLP collateral deposited',
|
2071
|
+
},
|
2072
|
+
{
|
2073
|
+
code: 6010,
|
2074
|
+
name: 'MathOverflow',
|
2075
|
+
msg: 'Math operation overflow',
|
2076
|
+
},
|
2077
|
+
{
|
2078
|
+
code: 6011,
|
2079
|
+
name: 'PythError',
|
2080
|
+
msg: 'Could not load price account',
|
2081
|
+
},
|
2082
|
+
{
|
2083
|
+
code: 6012,
|
2084
|
+
name: 'TryToSerializePriceAccount',
|
2085
|
+
msg: 'Failed to serialize price account',
|
2086
|
+
},
|
2087
|
+
{
|
2088
|
+
code: 6013,
|
2089
|
+
name: 'InvalidArgument',
|
2090
|
+
msg: 'Invalid argument provided',
|
2091
|
+
},
|
2092
|
+
{
|
2093
|
+
code: 6014,
|
2094
|
+
name: 'InvalidOracle',
|
2095
|
+
msg: 'Invalid pool oracle',
|
2096
|
+
},
|
2097
|
+
{
|
2098
|
+
code: 6015,
|
2099
|
+
name: 'InvalidLoanType',
|
2100
|
+
msg: 'Only one type of loan asset per account',
|
2101
|
+
},
|
2102
|
+
{
|
2103
|
+
code: 6016,
|
2104
|
+
name: 'AddressMismatch',
|
2105
|
+
msg: 'Address Mismatch',
|
2106
|
+
},
|
2107
|
+
{
|
2108
|
+
code: 6017,
|
2109
|
+
name: 'ProgramMismatch',
|
2110
|
+
msg: 'Program Mismatch',
|
2111
|
+
},
|
2112
|
+
{
|
2113
|
+
code: 6018,
|
2114
|
+
name: 'UnknownInstruction',
|
2115
|
+
msg: 'Unknown Instruction',
|
2116
|
+
},
|
2117
|
+
{
|
2118
|
+
code: 6019,
|
2119
|
+
name: 'MissingSwapInstruction',
|
2120
|
+
msg: 'Missing swap ix',
|
2121
|
+
},
|
2122
|
+
{
|
2123
|
+
code: 6020,
|
2124
|
+
name: 'MissingAfterInstruction',
|
2125
|
+
msg: 'Missing post-swap ix',
|
2126
|
+
},
|
2127
|
+
{
|
2128
|
+
code: 6021,
|
2129
|
+
name: 'IncorrectAccount',
|
2130
|
+
msg: 'Incorrect account',
|
2131
|
+
},
|
2132
|
+
{
|
2133
|
+
code: 6022,
|
2134
|
+
name: 'InvalidAfterAmount',
|
2135
|
+
msg: 'Invalid amount provided to post-swap ix',
|
2136
|
+
},
|
2137
|
+
{
|
2138
|
+
code: 6023,
|
2139
|
+
name: 'Paused',
|
2140
|
+
msg: 'Protocol paused',
|
2141
|
+
},
|
2142
|
+
{
|
2143
|
+
code: 6024,
|
2144
|
+
name: 'InvalidAccountDiscriminator',
|
2145
|
+
msg: 'Invalid account discriminator',
|
2146
|
+
},
|
2147
|
+
{
|
2148
|
+
code: 6025,
|
2149
|
+
name: 'UnableToDeserializeAccount',
|
2150
|
+
msg: 'Unable to deserialize account',
|
2151
|
+
},
|
2152
|
+
{
|
2153
|
+
code: 6026,
|
2154
|
+
name: 'StillHasLoans',
|
2155
|
+
msg: 'Still has loans',
|
2156
|
+
},
|
2157
|
+
{
|
2158
|
+
code: 6027,
|
2159
|
+
name: 'NotJLP',
|
2160
|
+
msg: 'Can only withdraw all for JLP',
|
2161
|
+
},
|
2162
|
+
{
|
2163
|
+
code: 6028,
|
2164
|
+
name: 'StalePrice',
|
2165
|
+
msg: 'Stale price',
|
2166
|
+
},
|
2167
|
+
],
|
2168
|
+
};
|
2169
|
+
//# sourceMappingURL=idl.js.map
|