@lavarage/sdk 8.0.16 → 8.0.17
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 +567 -1047
- package/dist/index.d.ts +567 -1047
- package/dist/index.js +531 -1010
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +531 -1010
- package/dist/index.mjs.map +1 -1
- package/idl/lavarageUSDC.json +594 -1074
- package/idl/lavarageUSDC.ts +594 -1074
- package/index.ts +4 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -414,41 +414,8 @@ var lavarageUSDC_default = {
|
|
|
414
414
|
account: "Pool"
|
|
415
415
|
},
|
|
416
416
|
{
|
|
417
|
-
kind: "
|
|
418
|
-
|
|
419
|
-
6,
|
|
420
|
-
221,
|
|
421
|
-
246,
|
|
422
|
-
225,
|
|
423
|
-
215,
|
|
424
|
-
101,
|
|
425
|
-
161,
|
|
426
|
-
147,
|
|
427
|
-
217,
|
|
428
|
-
203,
|
|
429
|
-
225,
|
|
430
|
-
70,
|
|
431
|
-
206,
|
|
432
|
-
235,
|
|
433
|
-
121,
|
|
434
|
-
172,
|
|
435
|
-
28,
|
|
436
|
-
180,
|
|
437
|
-
133,
|
|
438
|
-
237,
|
|
439
|
-
95,
|
|
440
|
-
91,
|
|
441
|
-
55,
|
|
442
|
-
145,
|
|
443
|
-
58,
|
|
444
|
-
140,
|
|
445
|
-
245,
|
|
446
|
-
133,
|
|
447
|
-
126,
|
|
448
|
-
255,
|
|
449
|
-
0,
|
|
450
|
-
169
|
|
451
|
-
]
|
|
417
|
+
kind: "account",
|
|
418
|
+
path: "token_program"
|
|
452
419
|
},
|
|
453
420
|
{
|
|
454
421
|
kind: "account",
|
|
@@ -505,41 +472,8 @@ var lavarageUSDC_default = {
|
|
|
505
472
|
path: "delegate_operator"
|
|
506
473
|
},
|
|
507
474
|
{
|
|
508
|
-
kind: "
|
|
509
|
-
|
|
510
|
-
6,
|
|
511
|
-
221,
|
|
512
|
-
246,
|
|
513
|
-
225,
|
|
514
|
-
215,
|
|
515
|
-
101,
|
|
516
|
-
161,
|
|
517
|
-
147,
|
|
518
|
-
217,
|
|
519
|
-
203,
|
|
520
|
-
225,
|
|
521
|
-
70,
|
|
522
|
-
206,
|
|
523
|
-
235,
|
|
524
|
-
121,
|
|
525
|
-
172,
|
|
526
|
-
28,
|
|
527
|
-
180,
|
|
528
|
-
133,
|
|
529
|
-
237,
|
|
530
|
-
95,
|
|
531
|
-
91,
|
|
532
|
-
55,
|
|
533
|
-
145,
|
|
534
|
-
58,
|
|
535
|
-
140,
|
|
536
|
-
245,
|
|
537
|
-
133,
|
|
538
|
-
126,
|
|
539
|
-
255,
|
|
540
|
-
0,
|
|
541
|
-
169
|
|
542
|
-
]
|
|
475
|
+
kind: "account",
|
|
476
|
+
path: "token_program"
|
|
543
477
|
},
|
|
544
478
|
{
|
|
545
479
|
kind: "account",
|
|
@@ -653,41 +587,8 @@ var lavarageUSDC_default = {
|
|
|
653
587
|
]
|
|
654
588
|
},
|
|
655
589
|
{
|
|
656
|
-
kind: "
|
|
657
|
-
|
|
658
|
-
6,
|
|
659
|
-
221,
|
|
660
|
-
246,
|
|
661
|
-
225,
|
|
662
|
-
215,
|
|
663
|
-
101,
|
|
664
|
-
161,
|
|
665
|
-
147,
|
|
666
|
-
217,
|
|
667
|
-
203,
|
|
668
|
-
225,
|
|
669
|
-
70,
|
|
670
|
-
206,
|
|
671
|
-
235,
|
|
672
|
-
121,
|
|
673
|
-
172,
|
|
674
|
-
28,
|
|
675
|
-
180,
|
|
676
|
-
133,
|
|
677
|
-
237,
|
|
678
|
-
95,
|
|
679
|
-
91,
|
|
680
|
-
55,
|
|
681
|
-
145,
|
|
682
|
-
58,
|
|
683
|
-
140,
|
|
684
|
-
245,
|
|
685
|
-
133,
|
|
686
|
-
126,
|
|
687
|
-
255,
|
|
688
|
-
0,
|
|
689
|
-
169
|
|
690
|
-
]
|
|
590
|
+
kind: "account",
|
|
591
|
+
path: "token_program"
|
|
691
592
|
},
|
|
692
593
|
{
|
|
693
594
|
kind: "account",
|
|
@@ -745,41 +646,8 @@ var lavarageUSDC_default = {
|
|
|
745
646
|
account: "Position"
|
|
746
647
|
},
|
|
747
648
|
{
|
|
748
|
-
kind: "
|
|
749
|
-
|
|
750
|
-
6,
|
|
751
|
-
221,
|
|
752
|
-
246,
|
|
753
|
-
225,
|
|
754
|
-
215,
|
|
755
|
-
101,
|
|
756
|
-
161,
|
|
757
|
-
147,
|
|
758
|
-
217,
|
|
759
|
-
203,
|
|
760
|
-
225,
|
|
761
|
-
70,
|
|
762
|
-
206,
|
|
763
|
-
235,
|
|
764
|
-
121,
|
|
765
|
-
172,
|
|
766
|
-
28,
|
|
767
|
-
180,
|
|
768
|
-
133,
|
|
769
|
-
237,
|
|
770
|
-
95,
|
|
771
|
-
91,
|
|
772
|
-
55,
|
|
773
|
-
145,
|
|
774
|
-
58,
|
|
775
|
-
140,
|
|
776
|
-
245,
|
|
777
|
-
133,
|
|
778
|
-
126,
|
|
779
|
-
255,
|
|
780
|
-
0,
|
|
781
|
-
169
|
|
782
|
-
]
|
|
649
|
+
kind: "account",
|
|
650
|
+
path: "token_program"
|
|
783
651
|
},
|
|
784
652
|
{
|
|
785
653
|
kind: "account",
|
|
@@ -886,41 +754,8 @@ var lavarageUSDC_default = {
|
|
|
886
754
|
path: "account"
|
|
887
755
|
},
|
|
888
756
|
{
|
|
889
|
-
kind: "
|
|
890
|
-
|
|
891
|
-
6,
|
|
892
|
-
221,
|
|
893
|
-
246,
|
|
894
|
-
225,
|
|
895
|
-
215,
|
|
896
|
-
101,
|
|
897
|
-
161,
|
|
898
|
-
147,
|
|
899
|
-
217,
|
|
900
|
-
203,
|
|
901
|
-
225,
|
|
902
|
-
70,
|
|
903
|
-
206,
|
|
904
|
-
235,
|
|
905
|
-
121,
|
|
906
|
-
172,
|
|
907
|
-
28,
|
|
908
|
-
180,
|
|
909
|
-
133,
|
|
910
|
-
237,
|
|
911
|
-
95,
|
|
912
|
-
91,
|
|
913
|
-
55,
|
|
914
|
-
145,
|
|
915
|
-
58,
|
|
916
|
-
140,
|
|
917
|
-
245,
|
|
918
|
-
133,
|
|
919
|
-
126,
|
|
920
|
-
255,
|
|
921
|
-
0,
|
|
922
|
-
169
|
|
923
|
-
]
|
|
757
|
+
kind: "account",
|
|
758
|
+
path: "token_program"
|
|
924
759
|
},
|
|
925
760
|
{
|
|
926
761
|
kind: "account",
|
|
@@ -977,41 +812,8 @@ var lavarageUSDC_default = {
|
|
|
977
812
|
path: "delegate_operator"
|
|
978
813
|
},
|
|
979
814
|
{
|
|
980
|
-
kind: "
|
|
981
|
-
|
|
982
|
-
6,
|
|
983
|
-
221,
|
|
984
|
-
246,
|
|
985
|
-
225,
|
|
986
|
-
215,
|
|
987
|
-
101,
|
|
988
|
-
161,
|
|
989
|
-
147,
|
|
990
|
-
217,
|
|
991
|
-
203,
|
|
992
|
-
225,
|
|
993
|
-
70,
|
|
994
|
-
206,
|
|
995
|
-
235,
|
|
996
|
-
121,
|
|
997
|
-
172,
|
|
998
|
-
28,
|
|
999
|
-
180,
|
|
1000
|
-
133,
|
|
1001
|
-
237,
|
|
1002
|
-
95,
|
|
1003
|
-
91,
|
|
1004
|
-
55,
|
|
1005
|
-
145,
|
|
1006
|
-
58,
|
|
1007
|
-
140,
|
|
1008
|
-
245,
|
|
1009
|
-
133,
|
|
1010
|
-
126,
|
|
1011
|
-
255,
|
|
1012
|
-
0,
|
|
1013
|
-
169
|
|
1014
|
-
]
|
|
815
|
+
kind: "account",
|
|
816
|
+
path: "token_program"
|
|
1015
817
|
},
|
|
1016
818
|
{
|
|
1017
819
|
kind: "account",
|
|
@@ -1200,41 +1002,8 @@ var lavarageUSDC_default = {
|
|
|
1200
1002
|
path: "position_account"
|
|
1201
1003
|
},
|
|
1202
1004
|
{
|
|
1203
|
-
kind: "
|
|
1204
|
-
|
|
1205
|
-
6,
|
|
1206
|
-
221,
|
|
1207
|
-
246,
|
|
1208
|
-
225,
|
|
1209
|
-
215,
|
|
1210
|
-
101,
|
|
1211
|
-
161,
|
|
1212
|
-
147,
|
|
1213
|
-
217,
|
|
1214
|
-
203,
|
|
1215
|
-
225,
|
|
1216
|
-
70,
|
|
1217
|
-
206,
|
|
1218
|
-
235,
|
|
1219
|
-
121,
|
|
1220
|
-
172,
|
|
1221
|
-
28,
|
|
1222
|
-
180,
|
|
1223
|
-
133,
|
|
1224
|
-
237,
|
|
1225
|
-
95,
|
|
1226
|
-
91,
|
|
1227
|
-
55,
|
|
1228
|
-
145,
|
|
1229
|
-
58,
|
|
1230
|
-
140,
|
|
1231
|
-
245,
|
|
1232
|
-
133,
|
|
1233
|
-
126,
|
|
1234
|
-
255,
|
|
1235
|
-
0,
|
|
1236
|
-
169
|
|
1237
|
-
]
|
|
1005
|
+
kind: "account",
|
|
1006
|
+
path: "token_program"
|
|
1238
1007
|
},
|
|
1239
1008
|
{
|
|
1240
1009
|
kind: "account",
|
|
@@ -1400,41 +1169,8 @@ var lavarageUSDC_default = {
|
|
|
1400
1169
|
path: "position_account"
|
|
1401
1170
|
},
|
|
1402
1171
|
{
|
|
1403
|
-
kind: "
|
|
1404
|
-
|
|
1405
|
-
6,
|
|
1406
|
-
221,
|
|
1407
|
-
246,
|
|
1408
|
-
225,
|
|
1409
|
-
215,
|
|
1410
|
-
101,
|
|
1411
|
-
161,
|
|
1412
|
-
147,
|
|
1413
|
-
217,
|
|
1414
|
-
203,
|
|
1415
|
-
225,
|
|
1416
|
-
70,
|
|
1417
|
-
206,
|
|
1418
|
-
235,
|
|
1419
|
-
121,
|
|
1420
|
-
172,
|
|
1421
|
-
28,
|
|
1422
|
-
180,
|
|
1423
|
-
133,
|
|
1424
|
-
237,
|
|
1425
|
-
95,
|
|
1426
|
-
91,
|
|
1427
|
-
55,
|
|
1428
|
-
145,
|
|
1429
|
-
58,
|
|
1430
|
-
140,
|
|
1431
|
-
245,
|
|
1432
|
-
133,
|
|
1433
|
-
126,
|
|
1434
|
-
255,
|
|
1435
|
-
0,
|
|
1436
|
-
169
|
|
1437
|
-
]
|
|
1172
|
+
kind: "account",
|
|
1173
|
+
path: "token_program"
|
|
1438
1174
|
},
|
|
1439
1175
|
{
|
|
1440
1176
|
kind: "account",
|
|
@@ -1843,41 +1579,8 @@ var lavarageUSDC_default = {
|
|
|
1843
1579
|
path: "node_wallet"
|
|
1844
1580
|
},
|
|
1845
1581
|
{
|
|
1846
|
-
kind: "
|
|
1847
|
-
|
|
1848
|
-
6,
|
|
1849
|
-
221,
|
|
1850
|
-
246,
|
|
1851
|
-
225,
|
|
1852
|
-
215,
|
|
1853
|
-
101,
|
|
1854
|
-
161,
|
|
1855
|
-
147,
|
|
1856
|
-
217,
|
|
1857
|
-
203,
|
|
1858
|
-
225,
|
|
1859
|
-
70,
|
|
1860
|
-
206,
|
|
1861
|
-
235,
|
|
1862
|
-
121,
|
|
1863
|
-
172,
|
|
1864
|
-
28,
|
|
1865
|
-
180,
|
|
1866
|
-
133,
|
|
1867
|
-
237,
|
|
1868
|
-
95,
|
|
1869
|
-
91,
|
|
1870
|
-
55,
|
|
1871
|
-
145,
|
|
1872
|
-
58,
|
|
1873
|
-
140,
|
|
1874
|
-
245,
|
|
1875
|
-
133,
|
|
1876
|
-
126,
|
|
1877
|
-
255,
|
|
1878
|
-
0,
|
|
1879
|
-
169
|
|
1880
|
-
]
|
|
1582
|
+
kind: "account",
|
|
1583
|
+
path: "token_program"
|
|
1881
1584
|
},
|
|
1882
1585
|
{
|
|
1883
1586
|
kind: "account",
|
|
@@ -1942,35 +1645,6 @@ var lavarageUSDC_default = {
|
|
|
1942
1645
|
}
|
|
1943
1646
|
]
|
|
1944
1647
|
},
|
|
1945
|
-
{
|
|
1946
|
-
name: "migrate_pool",
|
|
1947
|
-
discriminator: [
|
|
1948
|
-
55,
|
|
1949
|
-
170,
|
|
1950
|
-
171,
|
|
1951
|
-
123,
|
|
1952
|
-
210,
|
|
1953
|
-
69,
|
|
1954
|
-
39,
|
|
1955
|
-
172
|
|
1956
|
-
],
|
|
1957
|
-
accounts: [
|
|
1958
|
-
{
|
|
1959
|
-
name: "trading_pool",
|
|
1960
|
-
writable: true
|
|
1961
|
-
}
|
|
1962
|
-
],
|
|
1963
|
-
args: [
|
|
1964
|
-
{
|
|
1965
|
-
name: "args",
|
|
1966
|
-
type: {
|
|
1967
|
-
defined: {
|
|
1968
|
-
name: "MigratePoolArgs"
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
1971
|
-
}
|
|
1972
|
-
]
|
|
1973
|
-
},
|
|
1974
1648
|
{
|
|
1975
1649
|
name: "realloc_pool",
|
|
1976
1650
|
discriminator: [
|
|
@@ -2100,41 +1774,8 @@ var lavarageUSDC_default = {
|
|
|
2100
1774
|
account: "Position"
|
|
2101
1775
|
},
|
|
2102
1776
|
{
|
|
2103
|
-
kind: "
|
|
2104
|
-
|
|
2105
|
-
6,
|
|
2106
|
-
221,
|
|
2107
|
-
246,
|
|
2108
|
-
225,
|
|
2109
|
-
215,
|
|
2110
|
-
101,
|
|
2111
|
-
161,
|
|
2112
|
-
147,
|
|
2113
|
-
217,
|
|
2114
|
-
203,
|
|
2115
|
-
225,
|
|
2116
|
-
70,
|
|
2117
|
-
206,
|
|
2118
|
-
235,
|
|
2119
|
-
121,
|
|
2120
|
-
172,
|
|
2121
|
-
28,
|
|
2122
|
-
180,
|
|
2123
|
-
133,
|
|
2124
|
-
237,
|
|
2125
|
-
95,
|
|
2126
|
-
91,
|
|
2127
|
-
55,
|
|
2128
|
-
145,
|
|
2129
|
-
58,
|
|
2130
|
-
140,
|
|
2131
|
-
245,
|
|
2132
|
-
133,
|
|
2133
|
-
126,
|
|
2134
|
-
255,
|
|
2135
|
-
0,
|
|
2136
|
-
169
|
|
2137
|
-
]
|
|
1777
|
+
kind: "account",
|
|
1778
|
+
path: "token_program"
|
|
2138
1779
|
},
|
|
2139
1780
|
{
|
|
2140
1781
|
kind: "account",
|
|
@@ -2276,41 +1917,8 @@ var lavarageUSDC_default = {
|
|
|
2276
1917
|
path: "position_account"
|
|
2277
1918
|
},
|
|
2278
1919
|
{
|
|
2279
|
-
kind: "
|
|
2280
|
-
|
|
2281
|
-
6,
|
|
2282
|
-
221,
|
|
2283
|
-
246,
|
|
2284
|
-
225,
|
|
2285
|
-
215,
|
|
2286
|
-
101,
|
|
2287
|
-
161,
|
|
2288
|
-
147,
|
|
2289
|
-
217,
|
|
2290
|
-
203,
|
|
2291
|
-
225,
|
|
2292
|
-
70,
|
|
2293
|
-
206,
|
|
2294
|
-
235,
|
|
2295
|
-
121,
|
|
2296
|
-
172,
|
|
2297
|
-
28,
|
|
2298
|
-
180,
|
|
2299
|
-
133,
|
|
2300
|
-
237,
|
|
2301
|
-
95,
|
|
2302
|
-
91,
|
|
2303
|
-
55,
|
|
2304
|
-
145,
|
|
2305
|
-
58,
|
|
2306
|
-
140,
|
|
2307
|
-
245,
|
|
2308
|
-
133,
|
|
2309
|
-
126,
|
|
2310
|
-
255,
|
|
2311
|
-
0,
|
|
2312
|
-
169
|
|
2313
|
-
]
|
|
1920
|
+
kind: "account",
|
|
1921
|
+
path: "token_program"
|
|
2314
1922
|
},
|
|
2315
1923
|
{
|
|
2316
1924
|
kind: "account",
|
|
@@ -2513,41 +2121,8 @@ var lavarageUSDC_default = {
|
|
|
2513
2121
|
path: "trader"
|
|
2514
2122
|
},
|
|
2515
2123
|
{
|
|
2516
|
-
kind: "
|
|
2517
|
-
|
|
2518
|
-
6,
|
|
2519
|
-
221,
|
|
2520
|
-
246,
|
|
2521
|
-
225,
|
|
2522
|
-
215,
|
|
2523
|
-
101,
|
|
2524
|
-
161,
|
|
2525
|
-
147,
|
|
2526
|
-
217,
|
|
2527
|
-
203,
|
|
2528
|
-
225,
|
|
2529
|
-
70,
|
|
2530
|
-
206,
|
|
2531
|
-
235,
|
|
2532
|
-
121,
|
|
2533
|
-
172,
|
|
2534
|
-
28,
|
|
2535
|
-
180,
|
|
2536
|
-
133,
|
|
2537
|
-
237,
|
|
2538
|
-
95,
|
|
2539
|
-
91,
|
|
2540
|
-
55,
|
|
2541
|
-
145,
|
|
2542
|
-
58,
|
|
2543
|
-
140,
|
|
2544
|
-
245,
|
|
2545
|
-
133,
|
|
2546
|
-
126,
|
|
2547
|
-
255,
|
|
2548
|
-
0,
|
|
2549
|
-
169
|
|
2550
|
-
]
|
|
2124
|
+
kind: "account",
|
|
2125
|
+
path: "token_program"
|
|
2551
2126
|
},
|
|
2552
2127
|
{
|
|
2553
2128
|
kind: "account",
|
|
@@ -2604,41 +2179,8 @@ var lavarageUSDC_default = {
|
|
|
2604
2179
|
path: "node_wallet"
|
|
2605
2180
|
},
|
|
2606
2181
|
{
|
|
2607
|
-
kind: "
|
|
2608
|
-
|
|
2609
|
-
6,
|
|
2610
|
-
221,
|
|
2611
|
-
246,
|
|
2612
|
-
225,
|
|
2613
|
-
215,
|
|
2614
|
-
101,
|
|
2615
|
-
161,
|
|
2616
|
-
147,
|
|
2617
|
-
217,
|
|
2618
|
-
203,
|
|
2619
|
-
225,
|
|
2620
|
-
70,
|
|
2621
|
-
206,
|
|
2622
|
-
235,
|
|
2623
|
-
121,
|
|
2624
|
-
172,
|
|
2625
|
-
28,
|
|
2626
|
-
180,
|
|
2627
|
-
133,
|
|
2628
|
-
237,
|
|
2629
|
-
95,
|
|
2630
|
-
91,
|
|
2631
|
-
55,
|
|
2632
|
-
145,
|
|
2633
|
-
58,
|
|
2634
|
-
140,
|
|
2635
|
-
245,
|
|
2636
|
-
133,
|
|
2637
|
-
126,
|
|
2638
|
-
255,
|
|
2639
|
-
0,
|
|
2640
|
-
169
|
|
2641
|
-
]
|
|
2182
|
+
kind: "account",
|
|
2183
|
+
path: "token_program"
|
|
2642
2184
|
},
|
|
2643
2185
|
{
|
|
2644
2186
|
kind: "account",
|
|
@@ -2752,41 +2294,8 @@ var lavarageUSDC_default = {
|
|
|
2752
2294
|
]
|
|
2753
2295
|
},
|
|
2754
2296
|
{
|
|
2755
|
-
kind: "
|
|
2756
|
-
|
|
2757
|
-
6,
|
|
2758
|
-
221,
|
|
2759
|
-
246,
|
|
2760
|
-
225,
|
|
2761
|
-
215,
|
|
2762
|
-
101,
|
|
2763
|
-
161,
|
|
2764
|
-
147,
|
|
2765
|
-
217,
|
|
2766
|
-
203,
|
|
2767
|
-
225,
|
|
2768
|
-
70,
|
|
2769
|
-
206,
|
|
2770
|
-
235,
|
|
2771
|
-
121,
|
|
2772
|
-
172,
|
|
2773
|
-
28,
|
|
2774
|
-
180,
|
|
2775
|
-
133,
|
|
2776
|
-
237,
|
|
2777
|
-
95,
|
|
2778
|
-
91,
|
|
2779
|
-
55,
|
|
2780
|
-
145,
|
|
2781
|
-
58,
|
|
2782
|
-
140,
|
|
2783
|
-
245,
|
|
2784
|
-
133,
|
|
2785
|
-
126,
|
|
2786
|
-
255,
|
|
2787
|
-
0,
|
|
2788
|
-
169
|
|
2789
|
-
]
|
|
2297
|
+
kind: "account",
|
|
2298
|
+
path: "token_program"
|
|
2790
2299
|
},
|
|
2791
2300
|
{
|
|
2792
2301
|
kind: "account",
|
|
@@ -3013,41 +2522,8 @@ var lavarageUSDC_default = {
|
|
|
3013
2522
|
path: "trader"
|
|
3014
2523
|
},
|
|
3015
2524
|
{
|
|
3016
|
-
kind: "
|
|
3017
|
-
|
|
3018
|
-
6,
|
|
3019
|
-
221,
|
|
3020
|
-
246,
|
|
3021
|
-
225,
|
|
3022
|
-
215,
|
|
3023
|
-
101,
|
|
3024
|
-
161,
|
|
3025
|
-
147,
|
|
3026
|
-
217,
|
|
3027
|
-
203,
|
|
3028
|
-
225,
|
|
3029
|
-
70,
|
|
3030
|
-
206,
|
|
3031
|
-
235,
|
|
3032
|
-
121,
|
|
3033
|
-
172,
|
|
3034
|
-
28,
|
|
3035
|
-
180,
|
|
3036
|
-
133,
|
|
3037
|
-
237,
|
|
3038
|
-
95,
|
|
3039
|
-
91,
|
|
3040
|
-
55,
|
|
3041
|
-
145,
|
|
3042
|
-
58,
|
|
3043
|
-
140,
|
|
3044
|
-
245,
|
|
3045
|
-
133,
|
|
3046
|
-
126,
|
|
3047
|
-
255,
|
|
3048
|
-
0,
|
|
3049
|
-
169
|
|
3050
|
-
]
|
|
2525
|
+
kind: "account",
|
|
2526
|
+
path: "token_program"
|
|
3051
2527
|
},
|
|
3052
2528
|
{
|
|
3053
2529
|
kind: "account",
|
|
@@ -3104,41 +2580,8 @@ var lavarageUSDC_default = {
|
|
|
3104
2580
|
path: "node_wallet"
|
|
3105
2581
|
},
|
|
3106
2582
|
{
|
|
3107
|
-
kind: "
|
|
3108
|
-
|
|
3109
|
-
6,
|
|
3110
|
-
221,
|
|
3111
|
-
246,
|
|
3112
|
-
225,
|
|
3113
|
-
215,
|
|
3114
|
-
101,
|
|
3115
|
-
161,
|
|
3116
|
-
147,
|
|
3117
|
-
217,
|
|
3118
|
-
203,
|
|
3119
|
-
225,
|
|
3120
|
-
70,
|
|
3121
|
-
206,
|
|
3122
|
-
235,
|
|
3123
|
-
121,
|
|
3124
|
-
172,
|
|
3125
|
-
28,
|
|
3126
|
-
180,
|
|
3127
|
-
133,
|
|
3128
|
-
237,
|
|
3129
|
-
95,
|
|
3130
|
-
91,
|
|
3131
|
-
55,
|
|
3132
|
-
145,
|
|
3133
|
-
58,
|
|
3134
|
-
140,
|
|
3135
|
-
245,
|
|
3136
|
-
133,
|
|
3137
|
-
126,
|
|
3138
|
-
255,
|
|
3139
|
-
0,
|
|
3140
|
-
169
|
|
3141
|
-
]
|
|
2583
|
+
kind: "account",
|
|
2584
|
+
path: "token_program"
|
|
3142
2585
|
},
|
|
3143
2586
|
{
|
|
3144
2587
|
kind: "account",
|
|
@@ -3252,41 +2695,8 @@ var lavarageUSDC_default = {
|
|
|
3252
2695
|
]
|
|
3253
2696
|
},
|
|
3254
2697
|
{
|
|
3255
|
-
kind: "
|
|
3256
|
-
|
|
3257
|
-
6,
|
|
3258
|
-
221,
|
|
3259
|
-
246,
|
|
3260
|
-
225,
|
|
3261
|
-
215,
|
|
3262
|
-
101,
|
|
3263
|
-
161,
|
|
3264
|
-
147,
|
|
3265
|
-
217,
|
|
3266
|
-
203,
|
|
3267
|
-
225,
|
|
3268
|
-
70,
|
|
3269
|
-
206,
|
|
3270
|
-
235,
|
|
3271
|
-
121,
|
|
3272
|
-
172,
|
|
3273
|
-
28,
|
|
3274
|
-
180,
|
|
3275
|
-
133,
|
|
3276
|
-
237,
|
|
3277
|
-
95,
|
|
3278
|
-
91,
|
|
3279
|
-
55,
|
|
3280
|
-
145,
|
|
3281
|
-
58,
|
|
3282
|
-
140,
|
|
3283
|
-
245,
|
|
3284
|
-
133,
|
|
3285
|
-
126,
|
|
3286
|
-
255,
|
|
3287
|
-
0,
|
|
3288
|
-
169
|
|
3289
|
-
]
|
|
2698
|
+
kind: "account",
|
|
2699
|
+
path: "token_program"
|
|
3290
2700
|
},
|
|
3291
2701
|
{
|
|
3292
2702
|
kind: "account",
|
|
@@ -3787,41 +3197,8 @@ var lavarageUSDC_default = {
|
|
|
3787
3197
|
path: "original_position"
|
|
3788
3198
|
},
|
|
3789
3199
|
{
|
|
3790
|
-
kind: "
|
|
3791
|
-
|
|
3792
|
-
6,
|
|
3793
|
-
221,
|
|
3794
|
-
246,
|
|
3795
|
-
225,
|
|
3796
|
-
215,
|
|
3797
|
-
101,
|
|
3798
|
-
161,
|
|
3799
|
-
147,
|
|
3800
|
-
217,
|
|
3801
|
-
203,
|
|
3802
|
-
225,
|
|
3803
|
-
70,
|
|
3804
|
-
206,
|
|
3805
|
-
235,
|
|
3806
|
-
121,
|
|
3807
|
-
172,
|
|
3808
|
-
28,
|
|
3809
|
-
180,
|
|
3810
|
-
133,
|
|
3811
|
-
237,
|
|
3812
|
-
95,
|
|
3813
|
-
91,
|
|
3814
|
-
55,
|
|
3815
|
-
145,
|
|
3816
|
-
58,
|
|
3817
|
-
140,
|
|
3818
|
-
245,
|
|
3819
|
-
133,
|
|
3820
|
-
126,
|
|
3821
|
-
255,
|
|
3822
|
-
0,
|
|
3823
|
-
169
|
|
3824
|
-
]
|
|
3200
|
+
kind: "account",
|
|
3201
|
+
path: "token_program"
|
|
3825
3202
|
},
|
|
3826
3203
|
{
|
|
3827
3204
|
kind: "account",
|
|
@@ -3877,41 +3254,8 @@ var lavarageUSDC_default = {
|
|
|
3877
3254
|
path: "new_position_one"
|
|
3878
3255
|
},
|
|
3879
3256
|
{
|
|
3880
|
-
kind: "
|
|
3881
|
-
|
|
3882
|
-
6,
|
|
3883
|
-
221,
|
|
3884
|
-
246,
|
|
3885
|
-
225,
|
|
3886
|
-
215,
|
|
3887
|
-
101,
|
|
3888
|
-
161,
|
|
3889
|
-
147,
|
|
3890
|
-
217,
|
|
3891
|
-
203,
|
|
3892
|
-
225,
|
|
3893
|
-
70,
|
|
3894
|
-
206,
|
|
3895
|
-
235,
|
|
3896
|
-
121,
|
|
3897
|
-
172,
|
|
3898
|
-
28,
|
|
3899
|
-
180,
|
|
3900
|
-
133,
|
|
3901
|
-
237,
|
|
3902
|
-
95,
|
|
3903
|
-
91,
|
|
3904
|
-
55,
|
|
3905
|
-
145,
|
|
3906
|
-
58,
|
|
3907
|
-
140,
|
|
3908
|
-
245,
|
|
3909
|
-
133,
|
|
3910
|
-
126,
|
|
3911
|
-
255,
|
|
3912
|
-
0,
|
|
3913
|
-
169
|
|
3914
|
-
]
|
|
3257
|
+
kind: "account",
|
|
3258
|
+
path: "token_program"
|
|
3915
3259
|
},
|
|
3916
3260
|
{
|
|
3917
3261
|
kind: "account",
|
|
@@ -3967,41 +3311,8 @@ var lavarageUSDC_default = {
|
|
|
3967
3311
|
path: "new_position_two"
|
|
3968
3312
|
},
|
|
3969
3313
|
{
|
|
3970
|
-
kind: "
|
|
3971
|
-
|
|
3972
|
-
6,
|
|
3973
|
-
221,
|
|
3974
|
-
246,
|
|
3975
|
-
225,
|
|
3976
|
-
215,
|
|
3977
|
-
101,
|
|
3978
|
-
161,
|
|
3979
|
-
147,
|
|
3980
|
-
217,
|
|
3981
|
-
203,
|
|
3982
|
-
225,
|
|
3983
|
-
70,
|
|
3984
|
-
206,
|
|
3985
|
-
235,
|
|
3986
|
-
121,
|
|
3987
|
-
172,
|
|
3988
|
-
28,
|
|
3989
|
-
180,
|
|
3990
|
-
133,
|
|
3991
|
-
237,
|
|
3992
|
-
95,
|
|
3993
|
-
91,
|
|
3994
|
-
55,
|
|
3995
|
-
145,
|
|
3996
|
-
58,
|
|
3997
|
-
140,
|
|
3998
|
-
245,
|
|
3999
|
-
133,
|
|
4000
|
-
126,
|
|
4001
|
-
255,
|
|
4002
|
-
0,
|
|
4003
|
-
169
|
|
4004
|
-
]
|
|
3314
|
+
kind: "account",
|
|
3315
|
+
path: "token_program"
|
|
4005
3316
|
},
|
|
4006
3317
|
{
|
|
4007
3318
|
kind: "account",
|
|
@@ -4137,6 +3448,12 @@ var lavarageUSDC_default = {
|
|
|
4137
3448
|
{
|
|
4138
3449
|
name: "mint"
|
|
4139
3450
|
},
|
|
3451
|
+
{
|
|
3452
|
+
name: "quote_mint",
|
|
3453
|
+
docs: [
|
|
3454
|
+
"Quote token mint \u2014 validated against pool's qt_type"
|
|
3455
|
+
]
|
|
3456
|
+
},
|
|
4140
3457
|
{
|
|
4141
3458
|
name: "to_token_account",
|
|
4142
3459
|
writable: true,
|
|
@@ -4658,41 +3975,8 @@ var lavarageUSDC_default = {
|
|
|
4658
3975
|
path: "trader"
|
|
4659
3976
|
},
|
|
4660
3977
|
{
|
|
4661
|
-
kind: "
|
|
4662
|
-
|
|
4663
|
-
6,
|
|
4664
|
-
221,
|
|
4665
|
-
246,
|
|
4666
|
-
225,
|
|
4667
|
-
215,
|
|
4668
|
-
101,
|
|
4669
|
-
161,
|
|
4670
|
-
147,
|
|
4671
|
-
217,
|
|
4672
|
-
203,
|
|
4673
|
-
225,
|
|
4674
|
-
70,
|
|
4675
|
-
206,
|
|
4676
|
-
235,
|
|
4677
|
-
121,
|
|
4678
|
-
172,
|
|
4679
|
-
28,
|
|
4680
|
-
180,
|
|
4681
|
-
133,
|
|
4682
|
-
237,
|
|
4683
|
-
95,
|
|
4684
|
-
91,
|
|
4685
|
-
55,
|
|
4686
|
-
145,
|
|
4687
|
-
58,
|
|
4688
|
-
140,
|
|
4689
|
-
245,
|
|
4690
|
-
133,
|
|
4691
|
-
126,
|
|
4692
|
-
255,
|
|
4693
|
-
0,
|
|
4694
|
-
169
|
|
4695
|
-
]
|
|
3978
|
+
kind: "account",
|
|
3979
|
+
path: "token_program"
|
|
4696
3980
|
},
|
|
4697
3981
|
{
|
|
4698
3982
|
kind: "account",
|
|
@@ -4749,41 +4033,8 @@ var lavarageUSDC_default = {
|
|
|
4749
4033
|
path: "node_wallet"
|
|
4750
4034
|
},
|
|
4751
4035
|
{
|
|
4752
|
-
kind: "
|
|
4753
|
-
|
|
4754
|
-
6,
|
|
4755
|
-
221,
|
|
4756
|
-
246,
|
|
4757
|
-
225,
|
|
4758
|
-
215,
|
|
4759
|
-
101,
|
|
4760
|
-
161,
|
|
4761
|
-
147,
|
|
4762
|
-
217,
|
|
4763
|
-
203,
|
|
4764
|
-
225,
|
|
4765
|
-
70,
|
|
4766
|
-
206,
|
|
4767
|
-
235,
|
|
4768
|
-
121,
|
|
4769
|
-
172,
|
|
4770
|
-
28,
|
|
4771
|
-
180,
|
|
4772
|
-
133,
|
|
4773
|
-
237,
|
|
4774
|
-
95,
|
|
4775
|
-
91,
|
|
4776
|
-
55,
|
|
4777
|
-
145,
|
|
4778
|
-
58,
|
|
4779
|
-
140,
|
|
4780
|
-
245,
|
|
4781
|
-
133,
|
|
4782
|
-
126,
|
|
4783
|
-
255,
|
|
4784
|
-
0,
|
|
4785
|
-
169
|
|
4786
|
-
]
|
|
4036
|
+
kind: "account",
|
|
4037
|
+
path: "token_program"
|
|
4787
4038
|
},
|
|
4788
4039
|
{
|
|
4789
4040
|
kind: "account",
|
|
@@ -4896,47 +4147,406 @@ var lavarageUSDC_default = {
|
|
|
4896
4147
|
41
|
|
4897
4148
|
]
|
|
4898
4149
|
},
|
|
4150
|
+
{
|
|
4151
|
+
kind: "account",
|
|
4152
|
+
path: "token_program"
|
|
4153
|
+
},
|
|
4154
|
+
{
|
|
4155
|
+
kind: "account",
|
|
4156
|
+
path: "trading_pool.qt_type",
|
|
4157
|
+
account: "Pool"
|
|
4158
|
+
}
|
|
4159
|
+
],
|
|
4160
|
+
program: {
|
|
4161
|
+
kind: "const",
|
|
4162
|
+
value: [
|
|
4163
|
+
140,
|
|
4164
|
+
151,
|
|
4165
|
+
37,
|
|
4166
|
+
143,
|
|
4167
|
+
78,
|
|
4168
|
+
36,
|
|
4169
|
+
137,
|
|
4170
|
+
241,
|
|
4171
|
+
187,
|
|
4172
|
+
61,
|
|
4173
|
+
16,
|
|
4174
|
+
41,
|
|
4175
|
+
20,
|
|
4176
|
+
142,
|
|
4177
|
+
13,
|
|
4178
|
+
131,
|
|
4179
|
+
11,
|
|
4180
|
+
90,
|
|
4181
|
+
19,
|
|
4182
|
+
153,
|
|
4183
|
+
218,
|
|
4184
|
+
255,
|
|
4185
|
+
16,
|
|
4186
|
+
132,
|
|
4187
|
+
4,
|
|
4188
|
+
142,
|
|
4189
|
+
123,
|
|
4190
|
+
216,
|
|
4191
|
+
219,
|
|
4192
|
+
233,
|
|
4193
|
+
248,
|
|
4194
|
+
89
|
|
4195
|
+
]
|
|
4196
|
+
}
|
|
4197
|
+
}
|
|
4198
|
+
},
|
|
4199
|
+
{
|
|
4200
|
+
name: "token_program"
|
|
4201
|
+
}
|
|
4202
|
+
],
|
|
4203
|
+
args: [
|
|
4204
|
+
{
|
|
4205
|
+
name: "percentage",
|
|
4206
|
+
type: "u64"
|
|
4207
|
+
}
|
|
4208
|
+
]
|
|
4209
|
+
},
|
|
4210
|
+
{
|
|
4211
|
+
name: "trading_remove_tp_delegate",
|
|
4212
|
+
discriminator: [
|
|
4213
|
+
88,
|
|
4214
|
+
18,
|
|
4215
|
+
149,
|
|
4216
|
+
143,
|
|
4217
|
+
124,
|
|
4218
|
+
43,
|
|
4219
|
+
68,
|
|
4220
|
+
178
|
|
4221
|
+
],
|
|
4222
|
+
accounts: [
|
|
4223
|
+
{
|
|
4224
|
+
name: "delegate",
|
|
4225
|
+
writable: true,
|
|
4226
|
+
pda: {
|
|
4227
|
+
seeds: [
|
|
4899
4228
|
{
|
|
4900
4229
|
kind: "const",
|
|
4901
4230
|
value: [
|
|
4902
|
-
|
|
4903
|
-
221,
|
|
4904
|
-
246,
|
|
4905
|
-
225,
|
|
4906
|
-
215,
|
|
4231
|
+
100,
|
|
4907
4232
|
101,
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4233
|
+
108,
|
|
4234
|
+
101,
|
|
4235
|
+
103,
|
|
4236
|
+
97,
|
|
4237
|
+
116,
|
|
4238
|
+
101
|
|
4239
|
+
]
|
|
4240
|
+
},
|
|
4241
|
+
{
|
|
4242
|
+
kind: "account",
|
|
4243
|
+
path: "delegated_account"
|
|
4244
|
+
}
|
|
4245
|
+
]
|
|
4246
|
+
}
|
|
4247
|
+
},
|
|
4248
|
+
{
|
|
4249
|
+
name: "original_operator",
|
|
4250
|
+
writable: true,
|
|
4251
|
+
signer: true,
|
|
4252
|
+
relations: [
|
|
4253
|
+
"delegate"
|
|
4254
|
+
]
|
|
4255
|
+
},
|
|
4256
|
+
{
|
|
4257
|
+
name: "delegated_account"
|
|
4258
|
+
},
|
|
4259
|
+
{
|
|
4260
|
+
name: "system_program",
|
|
4261
|
+
address: "11111111111111111111111111111111"
|
|
4262
|
+
}
|
|
4263
|
+
],
|
|
4264
|
+
args: []
|
|
4265
|
+
},
|
|
4266
|
+
{
|
|
4267
|
+
name: "trading_short_borrow",
|
|
4268
|
+
docs: [
|
|
4269
|
+
"Open a SHORT position. User deposits collateral (USDC), protocol borrows",
|
|
4270
|
+
"volatile token (BTC) from pool. Jupiter swaps BTC \u2192 USDC in between.",
|
|
4271
|
+
"add_collateral validates total collateral vs debt."
|
|
4272
|
+
],
|
|
4273
|
+
discriminator: [
|
|
4274
|
+
198,
|
|
4275
|
+
193,
|
|
4276
|
+
253,
|
|
4277
|
+
172,
|
|
4278
|
+
152,
|
|
4279
|
+
176,
|
|
4280
|
+
184,
|
|
4281
|
+
149
|
|
4282
|
+
],
|
|
4283
|
+
accounts: [
|
|
4284
|
+
{
|
|
4285
|
+
name: "position_account",
|
|
4286
|
+
writable: true,
|
|
4287
|
+
pda: {
|
|
4288
|
+
seeds: [
|
|
4289
|
+
{
|
|
4290
|
+
kind: "const",
|
|
4291
|
+
value: [
|
|
4292
|
+
112,
|
|
4293
|
+
111,
|
|
4294
|
+
115,
|
|
4295
|
+
105,
|
|
4296
|
+
116,
|
|
4297
|
+
105,
|
|
4298
|
+
111,
|
|
4299
|
+
110
|
|
4934
4300
|
]
|
|
4935
4301
|
},
|
|
4936
4302
|
{
|
|
4937
4303
|
kind: "account",
|
|
4938
|
-
path: "
|
|
4939
|
-
|
|
4304
|
+
path: "trader"
|
|
4305
|
+
},
|
|
4306
|
+
{
|
|
4307
|
+
kind: "account",
|
|
4308
|
+
path: "trading_pool"
|
|
4309
|
+
},
|
|
4310
|
+
{
|
|
4311
|
+
kind: "account",
|
|
4312
|
+
path: "random_account_as_id"
|
|
4313
|
+
}
|
|
4314
|
+
]
|
|
4315
|
+
}
|
|
4316
|
+
},
|
|
4317
|
+
{
|
|
4318
|
+
name: "trader",
|
|
4319
|
+
writable: true,
|
|
4320
|
+
signer: true
|
|
4321
|
+
},
|
|
4322
|
+
{
|
|
4323
|
+
name: "trading_pool",
|
|
4324
|
+
writable: true
|
|
4325
|
+
},
|
|
4326
|
+
{
|
|
4327
|
+
name: "node_wallet",
|
|
4328
|
+
writable: true
|
|
4329
|
+
},
|
|
4330
|
+
{
|
|
4331
|
+
name: "instructions",
|
|
4332
|
+
address: "Sysvar1nstructions1111111111111111111111111"
|
|
4333
|
+
},
|
|
4334
|
+
{
|
|
4335
|
+
name: "system_program",
|
|
4336
|
+
address: "11111111111111111111111111111111"
|
|
4337
|
+
},
|
|
4338
|
+
{
|
|
4339
|
+
name: "clock",
|
|
4340
|
+
address: "SysvarC1ock11111111111111111111111111111111"
|
|
4341
|
+
},
|
|
4342
|
+
{
|
|
4343
|
+
name: "random_account_as_id"
|
|
4344
|
+
},
|
|
4345
|
+
{
|
|
4346
|
+
name: "fee_token_account",
|
|
4347
|
+
docs: [
|
|
4348
|
+
"Fee recipient's ATA for the quote (borrowed) token"
|
|
4349
|
+
],
|
|
4350
|
+
writable: true,
|
|
4351
|
+
pda: {
|
|
4352
|
+
seeds: [
|
|
4353
|
+
{
|
|
4354
|
+
kind: "account",
|
|
4355
|
+
path: "fee_recipient"
|
|
4356
|
+
},
|
|
4357
|
+
{
|
|
4358
|
+
kind: "account",
|
|
4359
|
+
path: "token_program"
|
|
4360
|
+
},
|
|
4361
|
+
{
|
|
4362
|
+
kind: "account",
|
|
4363
|
+
path: "quote_mint"
|
|
4364
|
+
}
|
|
4365
|
+
],
|
|
4366
|
+
program: {
|
|
4367
|
+
kind: "const",
|
|
4368
|
+
value: [
|
|
4369
|
+
140,
|
|
4370
|
+
151,
|
|
4371
|
+
37,
|
|
4372
|
+
143,
|
|
4373
|
+
78,
|
|
4374
|
+
36,
|
|
4375
|
+
137,
|
|
4376
|
+
241,
|
|
4377
|
+
187,
|
|
4378
|
+
61,
|
|
4379
|
+
16,
|
|
4380
|
+
41,
|
|
4381
|
+
20,
|
|
4382
|
+
142,
|
|
4383
|
+
13,
|
|
4384
|
+
131,
|
|
4385
|
+
11,
|
|
4386
|
+
90,
|
|
4387
|
+
19,
|
|
4388
|
+
153,
|
|
4389
|
+
218,
|
|
4390
|
+
255,
|
|
4391
|
+
16,
|
|
4392
|
+
132,
|
|
4393
|
+
4,
|
|
4394
|
+
142,
|
|
4395
|
+
123,
|
|
4396
|
+
216,
|
|
4397
|
+
219,
|
|
4398
|
+
233,
|
|
4399
|
+
248,
|
|
4400
|
+
89
|
|
4401
|
+
]
|
|
4402
|
+
}
|
|
4403
|
+
}
|
|
4404
|
+
},
|
|
4405
|
+
{
|
|
4406
|
+
name: "from_token_account",
|
|
4407
|
+
docs: [
|
|
4408
|
+
"Node wallet's ATA for qt_type (BTC) \u2014 source of borrowed funds"
|
|
4409
|
+
],
|
|
4410
|
+
writable: true,
|
|
4411
|
+
pda: {
|
|
4412
|
+
seeds: [
|
|
4413
|
+
{
|
|
4414
|
+
kind: "account",
|
|
4415
|
+
path: "node_wallet"
|
|
4416
|
+
},
|
|
4417
|
+
{
|
|
4418
|
+
kind: "account",
|
|
4419
|
+
path: "token_program"
|
|
4420
|
+
},
|
|
4421
|
+
{
|
|
4422
|
+
kind: "account",
|
|
4423
|
+
path: "quote_mint"
|
|
4424
|
+
}
|
|
4425
|
+
],
|
|
4426
|
+
program: {
|
|
4427
|
+
kind: "const",
|
|
4428
|
+
value: [
|
|
4429
|
+
140,
|
|
4430
|
+
151,
|
|
4431
|
+
37,
|
|
4432
|
+
143,
|
|
4433
|
+
78,
|
|
4434
|
+
36,
|
|
4435
|
+
137,
|
|
4436
|
+
241,
|
|
4437
|
+
187,
|
|
4438
|
+
61,
|
|
4439
|
+
16,
|
|
4440
|
+
41,
|
|
4441
|
+
20,
|
|
4442
|
+
142,
|
|
4443
|
+
13,
|
|
4444
|
+
131,
|
|
4445
|
+
11,
|
|
4446
|
+
90,
|
|
4447
|
+
19,
|
|
4448
|
+
153,
|
|
4449
|
+
218,
|
|
4450
|
+
255,
|
|
4451
|
+
16,
|
|
4452
|
+
132,
|
|
4453
|
+
4,
|
|
4454
|
+
142,
|
|
4455
|
+
123,
|
|
4456
|
+
216,
|
|
4457
|
+
219,
|
|
4458
|
+
233,
|
|
4459
|
+
248,
|
|
4460
|
+
89
|
|
4461
|
+
]
|
|
4462
|
+
}
|
|
4463
|
+
}
|
|
4464
|
+
},
|
|
4465
|
+
{
|
|
4466
|
+
name: "to_token_account",
|
|
4467
|
+
docs: [
|
|
4468
|
+
"User's ATA for qt_type (BTC) \u2014 receives borrowed tokens for Jupiter to swap"
|
|
4469
|
+
],
|
|
4470
|
+
writable: true,
|
|
4471
|
+
pda: {
|
|
4472
|
+
seeds: [
|
|
4473
|
+
{
|
|
4474
|
+
kind: "account",
|
|
4475
|
+
path: "trader"
|
|
4476
|
+
},
|
|
4477
|
+
{
|
|
4478
|
+
kind: "account",
|
|
4479
|
+
path: "token_program"
|
|
4480
|
+
},
|
|
4481
|
+
{
|
|
4482
|
+
kind: "account",
|
|
4483
|
+
path: "quote_mint"
|
|
4484
|
+
}
|
|
4485
|
+
],
|
|
4486
|
+
program: {
|
|
4487
|
+
kind: "const",
|
|
4488
|
+
value: [
|
|
4489
|
+
140,
|
|
4490
|
+
151,
|
|
4491
|
+
37,
|
|
4492
|
+
143,
|
|
4493
|
+
78,
|
|
4494
|
+
36,
|
|
4495
|
+
137,
|
|
4496
|
+
241,
|
|
4497
|
+
187,
|
|
4498
|
+
61,
|
|
4499
|
+
16,
|
|
4500
|
+
41,
|
|
4501
|
+
20,
|
|
4502
|
+
142,
|
|
4503
|
+
13,
|
|
4504
|
+
131,
|
|
4505
|
+
11,
|
|
4506
|
+
90,
|
|
4507
|
+
19,
|
|
4508
|
+
153,
|
|
4509
|
+
218,
|
|
4510
|
+
255,
|
|
4511
|
+
16,
|
|
4512
|
+
132,
|
|
4513
|
+
4,
|
|
4514
|
+
142,
|
|
4515
|
+
123,
|
|
4516
|
+
216,
|
|
4517
|
+
219,
|
|
4518
|
+
233,
|
|
4519
|
+
248,
|
|
4520
|
+
89
|
|
4521
|
+
]
|
|
4522
|
+
}
|
|
4523
|
+
}
|
|
4524
|
+
},
|
|
4525
|
+
{
|
|
4526
|
+
name: "token_program",
|
|
4527
|
+
docs: [
|
|
4528
|
+
"Token program for qt_type (BTC)"
|
|
4529
|
+
]
|
|
4530
|
+
},
|
|
4531
|
+
{
|
|
4532
|
+
name: "position_token_account",
|
|
4533
|
+
docs: [
|
|
4534
|
+
"Position's ATA for collateral_type (USDC) \u2014 receives user deposit + Jupiter swap output"
|
|
4535
|
+
],
|
|
4536
|
+
writable: true,
|
|
4537
|
+
pda: {
|
|
4538
|
+
seeds: [
|
|
4539
|
+
{
|
|
4540
|
+
kind: "account",
|
|
4541
|
+
path: "position_account"
|
|
4542
|
+
},
|
|
4543
|
+
{
|
|
4544
|
+
kind: "account",
|
|
4545
|
+
path: "collateral_token_program"
|
|
4546
|
+
},
|
|
4547
|
+
{
|
|
4548
|
+
kind: "account",
|
|
4549
|
+
path: "collateral_mint"
|
|
4940
4550
|
}
|
|
4941
4551
|
],
|
|
4942
4552
|
program: {
|
|
@@ -4979,71 +4589,107 @@ var lavarageUSDC_default = {
|
|
|
4979
4589
|
}
|
|
4980
4590
|
},
|
|
4981
4591
|
{
|
|
4982
|
-
name: "
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
{
|
|
4987
|
-
name: "percentage",
|
|
4988
|
-
type: "u64"
|
|
4989
|
-
}
|
|
4990
|
-
]
|
|
4991
|
-
},
|
|
4992
|
-
{
|
|
4993
|
-
name: "trading_remove_tp_delegate",
|
|
4994
|
-
discriminator: [
|
|
4995
|
-
88,
|
|
4996
|
-
18,
|
|
4997
|
-
149,
|
|
4998
|
-
143,
|
|
4999
|
-
124,
|
|
5000
|
-
43,
|
|
5001
|
-
68,
|
|
5002
|
-
178
|
|
5003
|
-
],
|
|
5004
|
-
accounts: [
|
|
5005
|
-
{
|
|
5006
|
-
name: "delegate",
|
|
4592
|
+
name: "user_collateral_account",
|
|
4593
|
+
docs: [
|
|
4594
|
+
"User's ATA for collateral_type (USDC) \u2014 source of user's deposit"
|
|
4595
|
+
],
|
|
5007
4596
|
writable: true,
|
|
5008
4597
|
pda: {
|
|
5009
4598
|
seeds: [
|
|
5010
4599
|
{
|
|
5011
|
-
kind: "
|
|
5012
|
-
|
|
5013
|
-
100,
|
|
5014
|
-
101,
|
|
5015
|
-
108,
|
|
5016
|
-
101,
|
|
5017
|
-
103,
|
|
5018
|
-
97,
|
|
5019
|
-
116,
|
|
5020
|
-
101
|
|
5021
|
-
]
|
|
4600
|
+
kind: "account",
|
|
4601
|
+
path: "trader"
|
|
5022
4602
|
},
|
|
5023
4603
|
{
|
|
5024
4604
|
kind: "account",
|
|
5025
|
-
path: "
|
|
4605
|
+
path: "collateral_token_program"
|
|
4606
|
+
},
|
|
4607
|
+
{
|
|
4608
|
+
kind: "account",
|
|
4609
|
+
path: "collateral_mint"
|
|
5026
4610
|
}
|
|
5027
|
-
]
|
|
4611
|
+
],
|
|
4612
|
+
program: {
|
|
4613
|
+
kind: "const",
|
|
4614
|
+
value: [
|
|
4615
|
+
140,
|
|
4616
|
+
151,
|
|
4617
|
+
37,
|
|
4618
|
+
143,
|
|
4619
|
+
78,
|
|
4620
|
+
36,
|
|
4621
|
+
137,
|
|
4622
|
+
241,
|
|
4623
|
+
187,
|
|
4624
|
+
61,
|
|
4625
|
+
16,
|
|
4626
|
+
41,
|
|
4627
|
+
20,
|
|
4628
|
+
142,
|
|
4629
|
+
13,
|
|
4630
|
+
131,
|
|
4631
|
+
11,
|
|
4632
|
+
90,
|
|
4633
|
+
19,
|
|
4634
|
+
153,
|
|
4635
|
+
218,
|
|
4636
|
+
255,
|
|
4637
|
+
16,
|
|
4638
|
+
132,
|
|
4639
|
+
4,
|
|
4640
|
+
142,
|
|
4641
|
+
123,
|
|
4642
|
+
216,
|
|
4643
|
+
219,
|
|
4644
|
+
233,
|
|
4645
|
+
248,
|
|
4646
|
+
89
|
|
4647
|
+
]
|
|
4648
|
+
}
|
|
5028
4649
|
}
|
|
5029
4650
|
},
|
|
5030
4651
|
{
|
|
5031
|
-
name: "
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
relations: [
|
|
5035
|
-
"delegate"
|
|
4652
|
+
name: "collateral_token_program",
|
|
4653
|
+
docs: [
|
|
4654
|
+
"Token program for collateral_type (USDC)"
|
|
5036
4655
|
]
|
|
5037
4656
|
},
|
|
5038
4657
|
{
|
|
5039
|
-
name: "
|
|
4658
|
+
name: "associated_token_program",
|
|
4659
|
+
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
5040
4660
|
},
|
|
5041
4661
|
{
|
|
5042
|
-
name: "
|
|
5043
|
-
|
|
4662
|
+
name: "collateral_mint"
|
|
4663
|
+
},
|
|
4664
|
+
{
|
|
4665
|
+
name: "quote_mint"
|
|
4666
|
+
},
|
|
4667
|
+
{
|
|
4668
|
+
name: "fee_recipient"
|
|
5044
4669
|
}
|
|
5045
4670
|
],
|
|
5046
|
-
args: [
|
|
4671
|
+
args: [
|
|
4672
|
+
{
|
|
4673
|
+
name: "borrow_amount",
|
|
4674
|
+
type: "u64"
|
|
4675
|
+
},
|
|
4676
|
+
{
|
|
4677
|
+
name: "user_deposit",
|
|
4678
|
+
type: "u64"
|
|
4679
|
+
},
|
|
4680
|
+
{
|
|
4681
|
+
name: "discount_bps",
|
|
4682
|
+
type: {
|
|
4683
|
+
option: "u64"
|
|
4684
|
+
}
|
|
4685
|
+
},
|
|
4686
|
+
{
|
|
4687
|
+
name: "referral_bps",
|
|
4688
|
+
type: {
|
|
4689
|
+
option: "u64"
|
|
4690
|
+
}
|
|
4691
|
+
}
|
|
4692
|
+
]
|
|
5047
4693
|
}
|
|
5048
4694
|
],
|
|
5049
4695
|
accounts: [
|
|
@@ -5144,118 +4790,13 @@ var lavarageUSDC_default = {
|
|
|
5144
4790
|
errors: [
|
|
5145
4791
|
{
|
|
5146
4792
|
code: 6e3,
|
|
5147
|
-
name: "AddressMismatch",
|
|
5148
|
-
msg: "Address Mismatch"
|
|
5149
|
-
},
|
|
5150
|
-
{
|
|
5151
|
-
code: 6001,
|
|
5152
|
-
name: "ProgramMismatch",
|
|
5153
|
-
msg: "Program Mismatch"
|
|
5154
|
-
},
|
|
5155
|
-
{
|
|
5156
|
-
code: 6002,
|
|
5157
|
-
name: "MissingRepay",
|
|
5158
|
-
msg: "Missing Repay"
|
|
5159
|
-
},
|
|
5160
|
-
{
|
|
5161
|
-
code: 6003,
|
|
5162
|
-
name: "IncorrectOwner",
|
|
5163
|
-
msg: "Incorrect Owner"
|
|
5164
|
-
},
|
|
5165
|
-
{
|
|
5166
|
-
code: 6004,
|
|
5167
|
-
name: "IncorrectProgramAuthority",
|
|
5168
|
-
msg: "Incorrect Program Authority"
|
|
5169
|
-
},
|
|
5170
|
-
{
|
|
5171
|
-
code: 6005,
|
|
5172
|
-
name: "CannotBorrowBeforeRepay",
|
|
5173
|
-
msg: "Cannot Borrow Before Repay"
|
|
5174
|
-
},
|
|
5175
|
-
{
|
|
5176
|
-
code: 6006,
|
|
5177
|
-
name: "UnknownInstruction",
|
|
5178
|
-
msg: "Unknown Instruction"
|
|
5179
|
-
},
|
|
5180
|
-
{
|
|
5181
|
-
code: 6007,
|
|
5182
|
-
name: "ExpectedCollateralNotEnough",
|
|
5183
|
-
msg: "Expected collateral not enough"
|
|
5184
|
-
},
|
|
5185
|
-
{
|
|
5186
|
-
code: 6008,
|
|
5187
|
-
name: "ForTesting",
|
|
5188
|
-
msg: "TestError"
|
|
5189
|
-
},
|
|
5190
|
-
{
|
|
5191
|
-
code: 6009,
|
|
5192
|
-
name: "BlacklistedAccount",
|
|
5193
|
-
msg: "Account is blacklisted"
|
|
5194
|
-
},
|
|
5195
|
-
{
|
|
5196
|
-
code: 6010,
|
|
5197
|
-
name: "AccessEntryAlreadyExists",
|
|
5198
|
-
msg: "Access entry already exists"
|
|
5199
|
-
},
|
|
5200
|
-
{
|
|
5201
|
-
code: 6011,
|
|
5202
|
-
name: "AccessEntryNotFound",
|
|
5203
|
-
msg: "Access entry not found"
|
|
5204
|
-
},
|
|
5205
|
-
{
|
|
5206
|
-
code: 6012,
|
|
5207
|
-
name: "UnauthorizedWithdrawal",
|
|
5208
|
-
msg: "Unauthorized Withdrawal"
|
|
5209
|
-
},
|
|
5210
|
-
{
|
|
5211
|
-
code: 6013,
|
|
5212
|
-
name: "AccountAlreadyInitialized",
|
|
5213
|
-
msg: "Account already initialized"
|
|
5214
|
-
},
|
|
5215
|
-
{
|
|
5216
|
-
code: 6014,
|
|
5217
|
-
name: "InvalidSignature",
|
|
5218
|
-
msg: "The provided signature is invalid."
|
|
5219
|
-
},
|
|
5220
|
-
{
|
|
5221
|
-
code: 6015,
|
|
5222
|
-
name: "InvalidOracle",
|
|
5223
|
-
msg: "The provided oracle is invalid."
|
|
5224
|
-
},
|
|
5225
|
-
{
|
|
5226
|
-
code: 6016,
|
|
5227
4793
|
name: "InvalidSplitRatio",
|
|
5228
4794
|
msg: "Invalid split ratio. Must be between 1 and 99"
|
|
5229
4795
|
},
|
|
5230
4796
|
{
|
|
5231
|
-
code:
|
|
4797
|
+
code: 6001,
|
|
5232
4798
|
name: "PositionsNotMergeable",
|
|
5233
4799
|
msg: "Positions cannot be merged - must have same pool, trader, and interest rate"
|
|
5234
|
-
},
|
|
5235
|
-
{
|
|
5236
|
-
code: 6018,
|
|
5237
|
-
name: "OnlyDelegateOperator",
|
|
5238
|
-
msg: "Only delegate operator can execute TP"
|
|
5239
|
-
},
|
|
5240
|
-
{
|
|
5241
|
-
code: 6019,
|
|
5242
|
-
name: "InvalidDelegateType",
|
|
5243
|
-
msg: "Invalid delegate type"
|
|
5244
|
-
},
|
|
5245
|
-
{
|
|
5246
|
-
code: 6020,
|
|
5247
|
-
name: "MissingRequiredPriceFeed",
|
|
5248
|
-
msg: "Missing required price feed"
|
|
5249
|
-
},
|
|
5250
|
-
{
|
|
5251
|
-
code: 6021,
|
|
5252
|
-
name: "InvalidPrice",
|
|
5253
|
-
msg: "Price must be greater than 0"
|
|
5254
|
-
},
|
|
5255
|
-
{
|
|
5256
|
-
code: 6022,
|
|
5257
|
-
name: "MathOverflow",
|
|
5258
|
-
msg: "Arithmetic operation overflow"
|
|
5259
4800
|
}
|
|
5260
4801
|
],
|
|
5261
4802
|
types: [
|
|
@@ -5332,27 +4873,6 @@ var lavarageUSDC_default = {
|
|
|
5332
4873
|
]
|
|
5333
4874
|
}
|
|
5334
4875
|
},
|
|
5335
|
-
{
|
|
5336
|
-
name: "MigratePoolArgs",
|
|
5337
|
-
type: {
|
|
5338
|
-
kind: "struct",
|
|
5339
|
-
fields: [
|
|
5340
|
-
{
|
|
5341
|
-
name: "feed_id",
|
|
5342
|
-
type: {
|
|
5343
|
-
array: [
|
|
5344
|
-
"u8",
|
|
5345
|
-
32
|
|
5346
|
-
]
|
|
5347
|
-
}
|
|
5348
|
-
},
|
|
5349
|
-
{
|
|
5350
|
-
name: "open_ltv",
|
|
5351
|
-
type: "u16"
|
|
5352
|
-
}
|
|
5353
|
-
]
|
|
5354
|
-
}
|
|
5355
|
-
},
|
|
5356
4876
|
{
|
|
5357
4877
|
name: "NodeWallet",
|
|
5358
4878
|
type: {
|
|
@@ -5401,7 +4921,7 @@ var lavarageUSDC_default = {
|
|
|
5401
4921
|
{
|
|
5402
4922
|
name: "max_borrow",
|
|
5403
4923
|
docs: [
|
|
5404
|
-
"
|
|
4924
|
+
"The Loan-to-Value (LTV) ratio used to determine how much SOL can be borrowed per token."
|
|
5405
4925
|
],
|
|
5406
4926
|
type: "u64"
|
|
5407
4927
|
},
|
|
@@ -9634,6 +9154,7 @@ var borrowV2 = (lavarageProgram, offer, marginSOL, leverage, randomSeed, quoteTo
|
|
|
9634
9154
|
tradingPool: offer.publicKey,
|
|
9635
9155
|
trader: lavarageProgram.provider.publicKey,
|
|
9636
9156
|
mint: offer.account.collateralType,
|
|
9157
|
+
quoteMint: quoteToken,
|
|
9637
9158
|
toTokenAccount: toTokenAccount.account.address,
|
|
9638
9159
|
systemProgram: SystemProgram2.programId,
|
|
9639
9160
|
positionAccount,
|
|
@@ -9856,13 +9377,12 @@ var openTradeV1 = (lavarageProgram, offer, jupInstruction, marginSOL, leverage,
|
|
|
9856
9377
|
const setUpInstructions = [
|
|
9857
9378
|
fromTokenAccount.instruction,
|
|
9858
9379
|
toTokenAccount.instruction,
|
|
9859
|
-
partnerFeeRecipientCreateIx
|
|
9860
|
-
...setupInstructions.map(deserializeInstruction)
|
|
9380
|
+
partnerFeeRecipientCreateIx
|
|
9861
9381
|
].filter(Boolean);
|
|
9862
9382
|
const allInstructions2 = [
|
|
9863
9383
|
tradingOpenBorrowInstruction,
|
|
9384
|
+
...setupInstructions.map(deserializeInstruction),
|
|
9864
9385
|
deserializeInstruction(swapInstructionPayload),
|
|
9865
|
-
,
|
|
9866
9386
|
openAddCollateralInstruction,
|
|
9867
9387
|
computeBudgetMicroLamports ? computeFeeIx : void 0
|
|
9868
9388
|
].filter(Boolean);
|
|
@@ -10166,6 +9686,7 @@ var openTradeV2 = (lavarageProgram, offer, jupInstruction, marginSOL, leverage,
|
|
|
10166
9686
|
tradingPool: offer.publicKey,
|
|
10167
9687
|
trader: program.provider.publicKey,
|
|
10168
9688
|
mint: offer.account.collateralType,
|
|
9689
|
+
quoteMint: quoteToken,
|
|
10169
9690
|
toTokenAccount: toTokenAccount.account.address,
|
|
10170
9691
|
systemProgram: SystemProgram2.programId,
|
|
10171
9692
|
positionAccount,
|