@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.js
CHANGED
|
@@ -482,41 +482,8 @@ var lavarageUSDC_default = {
|
|
|
482
482
|
account: "Pool"
|
|
483
483
|
},
|
|
484
484
|
{
|
|
485
|
-
kind: "
|
|
486
|
-
|
|
487
|
-
6,
|
|
488
|
-
221,
|
|
489
|
-
246,
|
|
490
|
-
225,
|
|
491
|
-
215,
|
|
492
|
-
101,
|
|
493
|
-
161,
|
|
494
|
-
147,
|
|
495
|
-
217,
|
|
496
|
-
203,
|
|
497
|
-
225,
|
|
498
|
-
70,
|
|
499
|
-
206,
|
|
500
|
-
235,
|
|
501
|
-
121,
|
|
502
|
-
172,
|
|
503
|
-
28,
|
|
504
|
-
180,
|
|
505
|
-
133,
|
|
506
|
-
237,
|
|
507
|
-
95,
|
|
508
|
-
91,
|
|
509
|
-
55,
|
|
510
|
-
145,
|
|
511
|
-
58,
|
|
512
|
-
140,
|
|
513
|
-
245,
|
|
514
|
-
133,
|
|
515
|
-
126,
|
|
516
|
-
255,
|
|
517
|
-
0,
|
|
518
|
-
169
|
|
519
|
-
]
|
|
485
|
+
kind: "account",
|
|
486
|
+
path: "token_program"
|
|
520
487
|
},
|
|
521
488
|
{
|
|
522
489
|
kind: "account",
|
|
@@ -573,41 +540,8 @@ var lavarageUSDC_default = {
|
|
|
573
540
|
path: "delegate_operator"
|
|
574
541
|
},
|
|
575
542
|
{
|
|
576
|
-
kind: "
|
|
577
|
-
|
|
578
|
-
6,
|
|
579
|
-
221,
|
|
580
|
-
246,
|
|
581
|
-
225,
|
|
582
|
-
215,
|
|
583
|
-
101,
|
|
584
|
-
161,
|
|
585
|
-
147,
|
|
586
|
-
217,
|
|
587
|
-
203,
|
|
588
|
-
225,
|
|
589
|
-
70,
|
|
590
|
-
206,
|
|
591
|
-
235,
|
|
592
|
-
121,
|
|
593
|
-
172,
|
|
594
|
-
28,
|
|
595
|
-
180,
|
|
596
|
-
133,
|
|
597
|
-
237,
|
|
598
|
-
95,
|
|
599
|
-
91,
|
|
600
|
-
55,
|
|
601
|
-
145,
|
|
602
|
-
58,
|
|
603
|
-
140,
|
|
604
|
-
245,
|
|
605
|
-
133,
|
|
606
|
-
126,
|
|
607
|
-
255,
|
|
608
|
-
0,
|
|
609
|
-
169
|
|
610
|
-
]
|
|
543
|
+
kind: "account",
|
|
544
|
+
path: "token_program"
|
|
611
545
|
},
|
|
612
546
|
{
|
|
613
547
|
kind: "account",
|
|
@@ -721,41 +655,8 @@ var lavarageUSDC_default = {
|
|
|
721
655
|
]
|
|
722
656
|
},
|
|
723
657
|
{
|
|
724
|
-
kind: "
|
|
725
|
-
|
|
726
|
-
6,
|
|
727
|
-
221,
|
|
728
|
-
246,
|
|
729
|
-
225,
|
|
730
|
-
215,
|
|
731
|
-
101,
|
|
732
|
-
161,
|
|
733
|
-
147,
|
|
734
|
-
217,
|
|
735
|
-
203,
|
|
736
|
-
225,
|
|
737
|
-
70,
|
|
738
|
-
206,
|
|
739
|
-
235,
|
|
740
|
-
121,
|
|
741
|
-
172,
|
|
742
|
-
28,
|
|
743
|
-
180,
|
|
744
|
-
133,
|
|
745
|
-
237,
|
|
746
|
-
95,
|
|
747
|
-
91,
|
|
748
|
-
55,
|
|
749
|
-
145,
|
|
750
|
-
58,
|
|
751
|
-
140,
|
|
752
|
-
245,
|
|
753
|
-
133,
|
|
754
|
-
126,
|
|
755
|
-
255,
|
|
756
|
-
0,
|
|
757
|
-
169
|
|
758
|
-
]
|
|
658
|
+
kind: "account",
|
|
659
|
+
path: "token_program"
|
|
759
660
|
},
|
|
760
661
|
{
|
|
761
662
|
kind: "account",
|
|
@@ -813,41 +714,8 @@ var lavarageUSDC_default = {
|
|
|
813
714
|
account: "Position"
|
|
814
715
|
},
|
|
815
716
|
{
|
|
816
|
-
kind: "
|
|
817
|
-
|
|
818
|
-
6,
|
|
819
|
-
221,
|
|
820
|
-
246,
|
|
821
|
-
225,
|
|
822
|
-
215,
|
|
823
|
-
101,
|
|
824
|
-
161,
|
|
825
|
-
147,
|
|
826
|
-
217,
|
|
827
|
-
203,
|
|
828
|
-
225,
|
|
829
|
-
70,
|
|
830
|
-
206,
|
|
831
|
-
235,
|
|
832
|
-
121,
|
|
833
|
-
172,
|
|
834
|
-
28,
|
|
835
|
-
180,
|
|
836
|
-
133,
|
|
837
|
-
237,
|
|
838
|
-
95,
|
|
839
|
-
91,
|
|
840
|
-
55,
|
|
841
|
-
145,
|
|
842
|
-
58,
|
|
843
|
-
140,
|
|
844
|
-
245,
|
|
845
|
-
133,
|
|
846
|
-
126,
|
|
847
|
-
255,
|
|
848
|
-
0,
|
|
849
|
-
169
|
|
850
|
-
]
|
|
717
|
+
kind: "account",
|
|
718
|
+
path: "token_program"
|
|
851
719
|
},
|
|
852
720
|
{
|
|
853
721
|
kind: "account",
|
|
@@ -954,41 +822,8 @@ var lavarageUSDC_default = {
|
|
|
954
822
|
path: "account"
|
|
955
823
|
},
|
|
956
824
|
{
|
|
957
|
-
kind: "
|
|
958
|
-
|
|
959
|
-
6,
|
|
960
|
-
221,
|
|
961
|
-
246,
|
|
962
|
-
225,
|
|
963
|
-
215,
|
|
964
|
-
101,
|
|
965
|
-
161,
|
|
966
|
-
147,
|
|
967
|
-
217,
|
|
968
|
-
203,
|
|
969
|
-
225,
|
|
970
|
-
70,
|
|
971
|
-
206,
|
|
972
|
-
235,
|
|
973
|
-
121,
|
|
974
|
-
172,
|
|
975
|
-
28,
|
|
976
|
-
180,
|
|
977
|
-
133,
|
|
978
|
-
237,
|
|
979
|
-
95,
|
|
980
|
-
91,
|
|
981
|
-
55,
|
|
982
|
-
145,
|
|
983
|
-
58,
|
|
984
|
-
140,
|
|
985
|
-
245,
|
|
986
|
-
133,
|
|
987
|
-
126,
|
|
988
|
-
255,
|
|
989
|
-
0,
|
|
990
|
-
169
|
|
991
|
-
]
|
|
825
|
+
kind: "account",
|
|
826
|
+
path: "token_program"
|
|
992
827
|
},
|
|
993
828
|
{
|
|
994
829
|
kind: "account",
|
|
@@ -1045,41 +880,8 @@ var lavarageUSDC_default = {
|
|
|
1045
880
|
path: "delegate_operator"
|
|
1046
881
|
},
|
|
1047
882
|
{
|
|
1048
|
-
kind: "
|
|
1049
|
-
|
|
1050
|
-
6,
|
|
1051
|
-
221,
|
|
1052
|
-
246,
|
|
1053
|
-
225,
|
|
1054
|
-
215,
|
|
1055
|
-
101,
|
|
1056
|
-
161,
|
|
1057
|
-
147,
|
|
1058
|
-
217,
|
|
1059
|
-
203,
|
|
1060
|
-
225,
|
|
1061
|
-
70,
|
|
1062
|
-
206,
|
|
1063
|
-
235,
|
|
1064
|
-
121,
|
|
1065
|
-
172,
|
|
1066
|
-
28,
|
|
1067
|
-
180,
|
|
1068
|
-
133,
|
|
1069
|
-
237,
|
|
1070
|
-
95,
|
|
1071
|
-
91,
|
|
1072
|
-
55,
|
|
1073
|
-
145,
|
|
1074
|
-
58,
|
|
1075
|
-
140,
|
|
1076
|
-
245,
|
|
1077
|
-
133,
|
|
1078
|
-
126,
|
|
1079
|
-
255,
|
|
1080
|
-
0,
|
|
1081
|
-
169
|
|
1082
|
-
]
|
|
883
|
+
kind: "account",
|
|
884
|
+
path: "token_program"
|
|
1083
885
|
},
|
|
1084
886
|
{
|
|
1085
887
|
kind: "account",
|
|
@@ -1268,41 +1070,8 @@ var lavarageUSDC_default = {
|
|
|
1268
1070
|
path: "position_account"
|
|
1269
1071
|
},
|
|
1270
1072
|
{
|
|
1271
|
-
kind: "
|
|
1272
|
-
|
|
1273
|
-
6,
|
|
1274
|
-
221,
|
|
1275
|
-
246,
|
|
1276
|
-
225,
|
|
1277
|
-
215,
|
|
1278
|
-
101,
|
|
1279
|
-
161,
|
|
1280
|
-
147,
|
|
1281
|
-
217,
|
|
1282
|
-
203,
|
|
1283
|
-
225,
|
|
1284
|
-
70,
|
|
1285
|
-
206,
|
|
1286
|
-
235,
|
|
1287
|
-
121,
|
|
1288
|
-
172,
|
|
1289
|
-
28,
|
|
1290
|
-
180,
|
|
1291
|
-
133,
|
|
1292
|
-
237,
|
|
1293
|
-
95,
|
|
1294
|
-
91,
|
|
1295
|
-
55,
|
|
1296
|
-
145,
|
|
1297
|
-
58,
|
|
1298
|
-
140,
|
|
1299
|
-
245,
|
|
1300
|
-
133,
|
|
1301
|
-
126,
|
|
1302
|
-
255,
|
|
1303
|
-
0,
|
|
1304
|
-
169
|
|
1305
|
-
]
|
|
1073
|
+
kind: "account",
|
|
1074
|
+
path: "token_program"
|
|
1306
1075
|
},
|
|
1307
1076
|
{
|
|
1308
1077
|
kind: "account",
|
|
@@ -1468,41 +1237,8 @@ var lavarageUSDC_default = {
|
|
|
1468
1237
|
path: "position_account"
|
|
1469
1238
|
},
|
|
1470
1239
|
{
|
|
1471
|
-
kind: "
|
|
1472
|
-
|
|
1473
|
-
6,
|
|
1474
|
-
221,
|
|
1475
|
-
246,
|
|
1476
|
-
225,
|
|
1477
|
-
215,
|
|
1478
|
-
101,
|
|
1479
|
-
161,
|
|
1480
|
-
147,
|
|
1481
|
-
217,
|
|
1482
|
-
203,
|
|
1483
|
-
225,
|
|
1484
|
-
70,
|
|
1485
|
-
206,
|
|
1486
|
-
235,
|
|
1487
|
-
121,
|
|
1488
|
-
172,
|
|
1489
|
-
28,
|
|
1490
|
-
180,
|
|
1491
|
-
133,
|
|
1492
|
-
237,
|
|
1493
|
-
95,
|
|
1494
|
-
91,
|
|
1495
|
-
55,
|
|
1496
|
-
145,
|
|
1497
|
-
58,
|
|
1498
|
-
140,
|
|
1499
|
-
245,
|
|
1500
|
-
133,
|
|
1501
|
-
126,
|
|
1502
|
-
255,
|
|
1503
|
-
0,
|
|
1504
|
-
169
|
|
1505
|
-
]
|
|
1240
|
+
kind: "account",
|
|
1241
|
+
path: "token_program"
|
|
1506
1242
|
},
|
|
1507
1243
|
{
|
|
1508
1244
|
kind: "account",
|
|
@@ -1911,41 +1647,8 @@ var lavarageUSDC_default = {
|
|
|
1911
1647
|
path: "node_wallet"
|
|
1912
1648
|
},
|
|
1913
1649
|
{
|
|
1914
|
-
kind: "
|
|
1915
|
-
|
|
1916
|
-
6,
|
|
1917
|
-
221,
|
|
1918
|
-
246,
|
|
1919
|
-
225,
|
|
1920
|
-
215,
|
|
1921
|
-
101,
|
|
1922
|
-
161,
|
|
1923
|
-
147,
|
|
1924
|
-
217,
|
|
1925
|
-
203,
|
|
1926
|
-
225,
|
|
1927
|
-
70,
|
|
1928
|
-
206,
|
|
1929
|
-
235,
|
|
1930
|
-
121,
|
|
1931
|
-
172,
|
|
1932
|
-
28,
|
|
1933
|
-
180,
|
|
1934
|
-
133,
|
|
1935
|
-
237,
|
|
1936
|
-
95,
|
|
1937
|
-
91,
|
|
1938
|
-
55,
|
|
1939
|
-
145,
|
|
1940
|
-
58,
|
|
1941
|
-
140,
|
|
1942
|
-
245,
|
|
1943
|
-
133,
|
|
1944
|
-
126,
|
|
1945
|
-
255,
|
|
1946
|
-
0,
|
|
1947
|
-
169
|
|
1948
|
-
]
|
|
1650
|
+
kind: "account",
|
|
1651
|
+
path: "token_program"
|
|
1949
1652
|
},
|
|
1950
1653
|
{
|
|
1951
1654
|
kind: "account",
|
|
@@ -2010,35 +1713,6 @@ var lavarageUSDC_default = {
|
|
|
2010
1713
|
}
|
|
2011
1714
|
]
|
|
2012
1715
|
},
|
|
2013
|
-
{
|
|
2014
|
-
name: "migrate_pool",
|
|
2015
|
-
discriminator: [
|
|
2016
|
-
55,
|
|
2017
|
-
170,
|
|
2018
|
-
171,
|
|
2019
|
-
123,
|
|
2020
|
-
210,
|
|
2021
|
-
69,
|
|
2022
|
-
39,
|
|
2023
|
-
172
|
|
2024
|
-
],
|
|
2025
|
-
accounts: [
|
|
2026
|
-
{
|
|
2027
|
-
name: "trading_pool",
|
|
2028
|
-
writable: true
|
|
2029
|
-
}
|
|
2030
|
-
],
|
|
2031
|
-
args: [
|
|
2032
|
-
{
|
|
2033
|
-
name: "args",
|
|
2034
|
-
type: {
|
|
2035
|
-
defined: {
|
|
2036
|
-
name: "MigratePoolArgs"
|
|
2037
|
-
}
|
|
2038
|
-
}
|
|
2039
|
-
}
|
|
2040
|
-
]
|
|
2041
|
-
},
|
|
2042
1716
|
{
|
|
2043
1717
|
name: "realloc_pool",
|
|
2044
1718
|
discriminator: [
|
|
@@ -2168,41 +1842,8 @@ var lavarageUSDC_default = {
|
|
|
2168
1842
|
account: "Position"
|
|
2169
1843
|
},
|
|
2170
1844
|
{
|
|
2171
|
-
kind: "
|
|
2172
|
-
|
|
2173
|
-
6,
|
|
2174
|
-
221,
|
|
2175
|
-
246,
|
|
2176
|
-
225,
|
|
2177
|
-
215,
|
|
2178
|
-
101,
|
|
2179
|
-
161,
|
|
2180
|
-
147,
|
|
2181
|
-
217,
|
|
2182
|
-
203,
|
|
2183
|
-
225,
|
|
2184
|
-
70,
|
|
2185
|
-
206,
|
|
2186
|
-
235,
|
|
2187
|
-
121,
|
|
2188
|
-
172,
|
|
2189
|
-
28,
|
|
2190
|
-
180,
|
|
2191
|
-
133,
|
|
2192
|
-
237,
|
|
2193
|
-
95,
|
|
2194
|
-
91,
|
|
2195
|
-
55,
|
|
2196
|
-
145,
|
|
2197
|
-
58,
|
|
2198
|
-
140,
|
|
2199
|
-
245,
|
|
2200
|
-
133,
|
|
2201
|
-
126,
|
|
2202
|
-
255,
|
|
2203
|
-
0,
|
|
2204
|
-
169
|
|
2205
|
-
]
|
|
1845
|
+
kind: "account",
|
|
1846
|
+
path: "token_program"
|
|
2206
1847
|
},
|
|
2207
1848
|
{
|
|
2208
1849
|
kind: "account",
|
|
@@ -2344,41 +1985,8 @@ var lavarageUSDC_default = {
|
|
|
2344
1985
|
path: "position_account"
|
|
2345
1986
|
},
|
|
2346
1987
|
{
|
|
2347
|
-
kind: "
|
|
2348
|
-
|
|
2349
|
-
6,
|
|
2350
|
-
221,
|
|
2351
|
-
246,
|
|
2352
|
-
225,
|
|
2353
|
-
215,
|
|
2354
|
-
101,
|
|
2355
|
-
161,
|
|
2356
|
-
147,
|
|
2357
|
-
217,
|
|
2358
|
-
203,
|
|
2359
|
-
225,
|
|
2360
|
-
70,
|
|
2361
|
-
206,
|
|
2362
|
-
235,
|
|
2363
|
-
121,
|
|
2364
|
-
172,
|
|
2365
|
-
28,
|
|
2366
|
-
180,
|
|
2367
|
-
133,
|
|
2368
|
-
237,
|
|
2369
|
-
95,
|
|
2370
|
-
91,
|
|
2371
|
-
55,
|
|
2372
|
-
145,
|
|
2373
|
-
58,
|
|
2374
|
-
140,
|
|
2375
|
-
245,
|
|
2376
|
-
133,
|
|
2377
|
-
126,
|
|
2378
|
-
255,
|
|
2379
|
-
0,
|
|
2380
|
-
169
|
|
2381
|
-
]
|
|
1988
|
+
kind: "account",
|
|
1989
|
+
path: "token_program"
|
|
2382
1990
|
},
|
|
2383
1991
|
{
|
|
2384
1992
|
kind: "account",
|
|
@@ -2581,41 +2189,8 @@ var lavarageUSDC_default = {
|
|
|
2581
2189
|
path: "trader"
|
|
2582
2190
|
},
|
|
2583
2191
|
{
|
|
2584
|
-
kind: "
|
|
2585
|
-
|
|
2586
|
-
6,
|
|
2587
|
-
221,
|
|
2588
|
-
246,
|
|
2589
|
-
225,
|
|
2590
|
-
215,
|
|
2591
|
-
101,
|
|
2592
|
-
161,
|
|
2593
|
-
147,
|
|
2594
|
-
217,
|
|
2595
|
-
203,
|
|
2596
|
-
225,
|
|
2597
|
-
70,
|
|
2598
|
-
206,
|
|
2599
|
-
235,
|
|
2600
|
-
121,
|
|
2601
|
-
172,
|
|
2602
|
-
28,
|
|
2603
|
-
180,
|
|
2604
|
-
133,
|
|
2605
|
-
237,
|
|
2606
|
-
95,
|
|
2607
|
-
91,
|
|
2608
|
-
55,
|
|
2609
|
-
145,
|
|
2610
|
-
58,
|
|
2611
|
-
140,
|
|
2612
|
-
245,
|
|
2613
|
-
133,
|
|
2614
|
-
126,
|
|
2615
|
-
255,
|
|
2616
|
-
0,
|
|
2617
|
-
169
|
|
2618
|
-
]
|
|
2192
|
+
kind: "account",
|
|
2193
|
+
path: "token_program"
|
|
2619
2194
|
},
|
|
2620
2195
|
{
|
|
2621
2196
|
kind: "account",
|
|
@@ -2672,41 +2247,8 @@ var lavarageUSDC_default = {
|
|
|
2672
2247
|
path: "node_wallet"
|
|
2673
2248
|
},
|
|
2674
2249
|
{
|
|
2675
|
-
kind: "
|
|
2676
|
-
|
|
2677
|
-
6,
|
|
2678
|
-
221,
|
|
2679
|
-
246,
|
|
2680
|
-
225,
|
|
2681
|
-
215,
|
|
2682
|
-
101,
|
|
2683
|
-
161,
|
|
2684
|
-
147,
|
|
2685
|
-
217,
|
|
2686
|
-
203,
|
|
2687
|
-
225,
|
|
2688
|
-
70,
|
|
2689
|
-
206,
|
|
2690
|
-
235,
|
|
2691
|
-
121,
|
|
2692
|
-
172,
|
|
2693
|
-
28,
|
|
2694
|
-
180,
|
|
2695
|
-
133,
|
|
2696
|
-
237,
|
|
2697
|
-
95,
|
|
2698
|
-
91,
|
|
2699
|
-
55,
|
|
2700
|
-
145,
|
|
2701
|
-
58,
|
|
2702
|
-
140,
|
|
2703
|
-
245,
|
|
2704
|
-
133,
|
|
2705
|
-
126,
|
|
2706
|
-
255,
|
|
2707
|
-
0,
|
|
2708
|
-
169
|
|
2709
|
-
]
|
|
2250
|
+
kind: "account",
|
|
2251
|
+
path: "token_program"
|
|
2710
2252
|
},
|
|
2711
2253
|
{
|
|
2712
2254
|
kind: "account",
|
|
@@ -2820,41 +2362,8 @@ var lavarageUSDC_default = {
|
|
|
2820
2362
|
]
|
|
2821
2363
|
},
|
|
2822
2364
|
{
|
|
2823
|
-
kind: "
|
|
2824
|
-
|
|
2825
|
-
6,
|
|
2826
|
-
221,
|
|
2827
|
-
246,
|
|
2828
|
-
225,
|
|
2829
|
-
215,
|
|
2830
|
-
101,
|
|
2831
|
-
161,
|
|
2832
|
-
147,
|
|
2833
|
-
217,
|
|
2834
|
-
203,
|
|
2835
|
-
225,
|
|
2836
|
-
70,
|
|
2837
|
-
206,
|
|
2838
|
-
235,
|
|
2839
|
-
121,
|
|
2840
|
-
172,
|
|
2841
|
-
28,
|
|
2842
|
-
180,
|
|
2843
|
-
133,
|
|
2844
|
-
237,
|
|
2845
|
-
95,
|
|
2846
|
-
91,
|
|
2847
|
-
55,
|
|
2848
|
-
145,
|
|
2849
|
-
58,
|
|
2850
|
-
140,
|
|
2851
|
-
245,
|
|
2852
|
-
133,
|
|
2853
|
-
126,
|
|
2854
|
-
255,
|
|
2855
|
-
0,
|
|
2856
|
-
169
|
|
2857
|
-
]
|
|
2365
|
+
kind: "account",
|
|
2366
|
+
path: "token_program"
|
|
2858
2367
|
},
|
|
2859
2368
|
{
|
|
2860
2369
|
kind: "account",
|
|
@@ -3081,41 +2590,8 @@ var lavarageUSDC_default = {
|
|
|
3081
2590
|
path: "trader"
|
|
3082
2591
|
},
|
|
3083
2592
|
{
|
|
3084
|
-
kind: "
|
|
3085
|
-
|
|
3086
|
-
6,
|
|
3087
|
-
221,
|
|
3088
|
-
246,
|
|
3089
|
-
225,
|
|
3090
|
-
215,
|
|
3091
|
-
101,
|
|
3092
|
-
161,
|
|
3093
|
-
147,
|
|
3094
|
-
217,
|
|
3095
|
-
203,
|
|
3096
|
-
225,
|
|
3097
|
-
70,
|
|
3098
|
-
206,
|
|
3099
|
-
235,
|
|
3100
|
-
121,
|
|
3101
|
-
172,
|
|
3102
|
-
28,
|
|
3103
|
-
180,
|
|
3104
|
-
133,
|
|
3105
|
-
237,
|
|
3106
|
-
95,
|
|
3107
|
-
91,
|
|
3108
|
-
55,
|
|
3109
|
-
145,
|
|
3110
|
-
58,
|
|
3111
|
-
140,
|
|
3112
|
-
245,
|
|
3113
|
-
133,
|
|
3114
|
-
126,
|
|
3115
|
-
255,
|
|
3116
|
-
0,
|
|
3117
|
-
169
|
|
3118
|
-
]
|
|
2593
|
+
kind: "account",
|
|
2594
|
+
path: "token_program"
|
|
3119
2595
|
},
|
|
3120
2596
|
{
|
|
3121
2597
|
kind: "account",
|
|
@@ -3172,41 +2648,8 @@ var lavarageUSDC_default = {
|
|
|
3172
2648
|
path: "node_wallet"
|
|
3173
2649
|
},
|
|
3174
2650
|
{
|
|
3175
|
-
kind: "
|
|
3176
|
-
|
|
3177
|
-
6,
|
|
3178
|
-
221,
|
|
3179
|
-
246,
|
|
3180
|
-
225,
|
|
3181
|
-
215,
|
|
3182
|
-
101,
|
|
3183
|
-
161,
|
|
3184
|
-
147,
|
|
3185
|
-
217,
|
|
3186
|
-
203,
|
|
3187
|
-
225,
|
|
3188
|
-
70,
|
|
3189
|
-
206,
|
|
3190
|
-
235,
|
|
3191
|
-
121,
|
|
3192
|
-
172,
|
|
3193
|
-
28,
|
|
3194
|
-
180,
|
|
3195
|
-
133,
|
|
3196
|
-
237,
|
|
3197
|
-
95,
|
|
3198
|
-
91,
|
|
3199
|
-
55,
|
|
3200
|
-
145,
|
|
3201
|
-
58,
|
|
3202
|
-
140,
|
|
3203
|
-
245,
|
|
3204
|
-
133,
|
|
3205
|
-
126,
|
|
3206
|
-
255,
|
|
3207
|
-
0,
|
|
3208
|
-
169
|
|
3209
|
-
]
|
|
2651
|
+
kind: "account",
|
|
2652
|
+
path: "token_program"
|
|
3210
2653
|
},
|
|
3211
2654
|
{
|
|
3212
2655
|
kind: "account",
|
|
@@ -3320,41 +2763,8 @@ var lavarageUSDC_default = {
|
|
|
3320
2763
|
]
|
|
3321
2764
|
},
|
|
3322
2765
|
{
|
|
3323
|
-
kind: "
|
|
3324
|
-
|
|
3325
|
-
6,
|
|
3326
|
-
221,
|
|
3327
|
-
246,
|
|
3328
|
-
225,
|
|
3329
|
-
215,
|
|
3330
|
-
101,
|
|
3331
|
-
161,
|
|
3332
|
-
147,
|
|
3333
|
-
217,
|
|
3334
|
-
203,
|
|
3335
|
-
225,
|
|
3336
|
-
70,
|
|
3337
|
-
206,
|
|
3338
|
-
235,
|
|
3339
|
-
121,
|
|
3340
|
-
172,
|
|
3341
|
-
28,
|
|
3342
|
-
180,
|
|
3343
|
-
133,
|
|
3344
|
-
237,
|
|
3345
|
-
95,
|
|
3346
|
-
91,
|
|
3347
|
-
55,
|
|
3348
|
-
145,
|
|
3349
|
-
58,
|
|
3350
|
-
140,
|
|
3351
|
-
245,
|
|
3352
|
-
133,
|
|
3353
|
-
126,
|
|
3354
|
-
255,
|
|
3355
|
-
0,
|
|
3356
|
-
169
|
|
3357
|
-
]
|
|
2766
|
+
kind: "account",
|
|
2767
|
+
path: "token_program"
|
|
3358
2768
|
},
|
|
3359
2769
|
{
|
|
3360
2770
|
kind: "account",
|
|
@@ -3855,41 +3265,8 @@ var lavarageUSDC_default = {
|
|
|
3855
3265
|
path: "original_position"
|
|
3856
3266
|
},
|
|
3857
3267
|
{
|
|
3858
|
-
kind: "
|
|
3859
|
-
|
|
3860
|
-
6,
|
|
3861
|
-
221,
|
|
3862
|
-
246,
|
|
3863
|
-
225,
|
|
3864
|
-
215,
|
|
3865
|
-
101,
|
|
3866
|
-
161,
|
|
3867
|
-
147,
|
|
3868
|
-
217,
|
|
3869
|
-
203,
|
|
3870
|
-
225,
|
|
3871
|
-
70,
|
|
3872
|
-
206,
|
|
3873
|
-
235,
|
|
3874
|
-
121,
|
|
3875
|
-
172,
|
|
3876
|
-
28,
|
|
3877
|
-
180,
|
|
3878
|
-
133,
|
|
3879
|
-
237,
|
|
3880
|
-
95,
|
|
3881
|
-
91,
|
|
3882
|
-
55,
|
|
3883
|
-
145,
|
|
3884
|
-
58,
|
|
3885
|
-
140,
|
|
3886
|
-
245,
|
|
3887
|
-
133,
|
|
3888
|
-
126,
|
|
3889
|
-
255,
|
|
3890
|
-
0,
|
|
3891
|
-
169
|
|
3892
|
-
]
|
|
3268
|
+
kind: "account",
|
|
3269
|
+
path: "token_program"
|
|
3893
3270
|
},
|
|
3894
3271
|
{
|
|
3895
3272
|
kind: "account",
|
|
@@ -3945,41 +3322,8 @@ var lavarageUSDC_default = {
|
|
|
3945
3322
|
path: "new_position_one"
|
|
3946
3323
|
},
|
|
3947
3324
|
{
|
|
3948
|
-
kind: "
|
|
3949
|
-
|
|
3950
|
-
6,
|
|
3951
|
-
221,
|
|
3952
|
-
246,
|
|
3953
|
-
225,
|
|
3954
|
-
215,
|
|
3955
|
-
101,
|
|
3956
|
-
161,
|
|
3957
|
-
147,
|
|
3958
|
-
217,
|
|
3959
|
-
203,
|
|
3960
|
-
225,
|
|
3961
|
-
70,
|
|
3962
|
-
206,
|
|
3963
|
-
235,
|
|
3964
|
-
121,
|
|
3965
|
-
172,
|
|
3966
|
-
28,
|
|
3967
|
-
180,
|
|
3968
|
-
133,
|
|
3969
|
-
237,
|
|
3970
|
-
95,
|
|
3971
|
-
91,
|
|
3972
|
-
55,
|
|
3973
|
-
145,
|
|
3974
|
-
58,
|
|
3975
|
-
140,
|
|
3976
|
-
245,
|
|
3977
|
-
133,
|
|
3978
|
-
126,
|
|
3979
|
-
255,
|
|
3980
|
-
0,
|
|
3981
|
-
169
|
|
3982
|
-
]
|
|
3325
|
+
kind: "account",
|
|
3326
|
+
path: "token_program"
|
|
3983
3327
|
},
|
|
3984
3328
|
{
|
|
3985
3329
|
kind: "account",
|
|
@@ -4035,41 +3379,8 @@ var lavarageUSDC_default = {
|
|
|
4035
3379
|
path: "new_position_two"
|
|
4036
3380
|
},
|
|
4037
3381
|
{
|
|
4038
|
-
kind: "
|
|
4039
|
-
|
|
4040
|
-
6,
|
|
4041
|
-
221,
|
|
4042
|
-
246,
|
|
4043
|
-
225,
|
|
4044
|
-
215,
|
|
4045
|
-
101,
|
|
4046
|
-
161,
|
|
4047
|
-
147,
|
|
4048
|
-
217,
|
|
4049
|
-
203,
|
|
4050
|
-
225,
|
|
4051
|
-
70,
|
|
4052
|
-
206,
|
|
4053
|
-
235,
|
|
4054
|
-
121,
|
|
4055
|
-
172,
|
|
4056
|
-
28,
|
|
4057
|
-
180,
|
|
4058
|
-
133,
|
|
4059
|
-
237,
|
|
4060
|
-
95,
|
|
4061
|
-
91,
|
|
4062
|
-
55,
|
|
4063
|
-
145,
|
|
4064
|
-
58,
|
|
4065
|
-
140,
|
|
4066
|
-
245,
|
|
4067
|
-
133,
|
|
4068
|
-
126,
|
|
4069
|
-
255,
|
|
4070
|
-
0,
|
|
4071
|
-
169
|
|
4072
|
-
]
|
|
3382
|
+
kind: "account",
|
|
3383
|
+
path: "token_program"
|
|
4073
3384
|
},
|
|
4074
3385
|
{
|
|
4075
3386
|
kind: "account",
|
|
@@ -4205,6 +3516,12 @@ var lavarageUSDC_default = {
|
|
|
4205
3516
|
{
|
|
4206
3517
|
name: "mint"
|
|
4207
3518
|
},
|
|
3519
|
+
{
|
|
3520
|
+
name: "quote_mint",
|
|
3521
|
+
docs: [
|
|
3522
|
+
"Quote token mint \u2014 validated against pool's qt_type"
|
|
3523
|
+
]
|
|
3524
|
+
},
|
|
4208
3525
|
{
|
|
4209
3526
|
name: "to_token_account",
|
|
4210
3527
|
writable: true,
|
|
@@ -4726,41 +4043,8 @@ var lavarageUSDC_default = {
|
|
|
4726
4043
|
path: "trader"
|
|
4727
4044
|
},
|
|
4728
4045
|
{
|
|
4729
|
-
kind: "
|
|
4730
|
-
|
|
4731
|
-
6,
|
|
4732
|
-
221,
|
|
4733
|
-
246,
|
|
4734
|
-
225,
|
|
4735
|
-
215,
|
|
4736
|
-
101,
|
|
4737
|
-
161,
|
|
4738
|
-
147,
|
|
4739
|
-
217,
|
|
4740
|
-
203,
|
|
4741
|
-
225,
|
|
4742
|
-
70,
|
|
4743
|
-
206,
|
|
4744
|
-
235,
|
|
4745
|
-
121,
|
|
4746
|
-
172,
|
|
4747
|
-
28,
|
|
4748
|
-
180,
|
|
4749
|
-
133,
|
|
4750
|
-
237,
|
|
4751
|
-
95,
|
|
4752
|
-
91,
|
|
4753
|
-
55,
|
|
4754
|
-
145,
|
|
4755
|
-
58,
|
|
4756
|
-
140,
|
|
4757
|
-
245,
|
|
4758
|
-
133,
|
|
4759
|
-
126,
|
|
4760
|
-
255,
|
|
4761
|
-
0,
|
|
4762
|
-
169
|
|
4763
|
-
]
|
|
4046
|
+
kind: "account",
|
|
4047
|
+
path: "token_program"
|
|
4764
4048
|
},
|
|
4765
4049
|
{
|
|
4766
4050
|
kind: "account",
|
|
@@ -4817,41 +4101,8 @@ var lavarageUSDC_default = {
|
|
|
4817
4101
|
path: "node_wallet"
|
|
4818
4102
|
},
|
|
4819
4103
|
{
|
|
4820
|
-
kind: "
|
|
4821
|
-
|
|
4822
|
-
6,
|
|
4823
|
-
221,
|
|
4824
|
-
246,
|
|
4825
|
-
225,
|
|
4826
|
-
215,
|
|
4827
|
-
101,
|
|
4828
|
-
161,
|
|
4829
|
-
147,
|
|
4830
|
-
217,
|
|
4831
|
-
203,
|
|
4832
|
-
225,
|
|
4833
|
-
70,
|
|
4834
|
-
206,
|
|
4835
|
-
235,
|
|
4836
|
-
121,
|
|
4837
|
-
172,
|
|
4838
|
-
28,
|
|
4839
|
-
180,
|
|
4840
|
-
133,
|
|
4841
|
-
237,
|
|
4842
|
-
95,
|
|
4843
|
-
91,
|
|
4844
|
-
55,
|
|
4845
|
-
145,
|
|
4846
|
-
58,
|
|
4847
|
-
140,
|
|
4848
|
-
245,
|
|
4849
|
-
133,
|
|
4850
|
-
126,
|
|
4851
|
-
255,
|
|
4852
|
-
0,
|
|
4853
|
-
169
|
|
4854
|
-
]
|
|
4104
|
+
kind: "account",
|
|
4105
|
+
path: "token_program"
|
|
4855
4106
|
},
|
|
4856
4107
|
{
|
|
4857
4108
|
kind: "account",
|
|
@@ -4964,47 +4215,406 @@ var lavarageUSDC_default = {
|
|
|
4964
4215
|
41
|
|
4965
4216
|
]
|
|
4966
4217
|
},
|
|
4218
|
+
{
|
|
4219
|
+
kind: "account",
|
|
4220
|
+
path: "token_program"
|
|
4221
|
+
},
|
|
4222
|
+
{
|
|
4223
|
+
kind: "account",
|
|
4224
|
+
path: "trading_pool.qt_type",
|
|
4225
|
+
account: "Pool"
|
|
4226
|
+
}
|
|
4227
|
+
],
|
|
4228
|
+
program: {
|
|
4229
|
+
kind: "const",
|
|
4230
|
+
value: [
|
|
4231
|
+
140,
|
|
4232
|
+
151,
|
|
4233
|
+
37,
|
|
4234
|
+
143,
|
|
4235
|
+
78,
|
|
4236
|
+
36,
|
|
4237
|
+
137,
|
|
4238
|
+
241,
|
|
4239
|
+
187,
|
|
4240
|
+
61,
|
|
4241
|
+
16,
|
|
4242
|
+
41,
|
|
4243
|
+
20,
|
|
4244
|
+
142,
|
|
4245
|
+
13,
|
|
4246
|
+
131,
|
|
4247
|
+
11,
|
|
4248
|
+
90,
|
|
4249
|
+
19,
|
|
4250
|
+
153,
|
|
4251
|
+
218,
|
|
4252
|
+
255,
|
|
4253
|
+
16,
|
|
4254
|
+
132,
|
|
4255
|
+
4,
|
|
4256
|
+
142,
|
|
4257
|
+
123,
|
|
4258
|
+
216,
|
|
4259
|
+
219,
|
|
4260
|
+
233,
|
|
4261
|
+
248,
|
|
4262
|
+
89
|
|
4263
|
+
]
|
|
4264
|
+
}
|
|
4265
|
+
}
|
|
4266
|
+
},
|
|
4267
|
+
{
|
|
4268
|
+
name: "token_program"
|
|
4269
|
+
}
|
|
4270
|
+
],
|
|
4271
|
+
args: [
|
|
4272
|
+
{
|
|
4273
|
+
name: "percentage",
|
|
4274
|
+
type: "u64"
|
|
4275
|
+
}
|
|
4276
|
+
]
|
|
4277
|
+
},
|
|
4278
|
+
{
|
|
4279
|
+
name: "trading_remove_tp_delegate",
|
|
4280
|
+
discriminator: [
|
|
4281
|
+
88,
|
|
4282
|
+
18,
|
|
4283
|
+
149,
|
|
4284
|
+
143,
|
|
4285
|
+
124,
|
|
4286
|
+
43,
|
|
4287
|
+
68,
|
|
4288
|
+
178
|
|
4289
|
+
],
|
|
4290
|
+
accounts: [
|
|
4291
|
+
{
|
|
4292
|
+
name: "delegate",
|
|
4293
|
+
writable: true,
|
|
4294
|
+
pda: {
|
|
4295
|
+
seeds: [
|
|
4967
4296
|
{
|
|
4968
4297
|
kind: "const",
|
|
4969
4298
|
value: [
|
|
4970
|
-
|
|
4971
|
-
221,
|
|
4972
|
-
246,
|
|
4973
|
-
225,
|
|
4974
|
-
215,
|
|
4299
|
+
100,
|
|
4975
4300
|
101,
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
4301
|
+
108,
|
|
4302
|
+
101,
|
|
4303
|
+
103,
|
|
4304
|
+
97,
|
|
4305
|
+
116,
|
|
4306
|
+
101
|
|
4307
|
+
]
|
|
4308
|
+
},
|
|
4309
|
+
{
|
|
4310
|
+
kind: "account",
|
|
4311
|
+
path: "delegated_account"
|
|
4312
|
+
}
|
|
4313
|
+
]
|
|
4314
|
+
}
|
|
4315
|
+
},
|
|
4316
|
+
{
|
|
4317
|
+
name: "original_operator",
|
|
4318
|
+
writable: true,
|
|
4319
|
+
signer: true,
|
|
4320
|
+
relations: [
|
|
4321
|
+
"delegate"
|
|
4322
|
+
]
|
|
4323
|
+
},
|
|
4324
|
+
{
|
|
4325
|
+
name: "delegated_account"
|
|
4326
|
+
},
|
|
4327
|
+
{
|
|
4328
|
+
name: "system_program",
|
|
4329
|
+
address: "11111111111111111111111111111111"
|
|
4330
|
+
}
|
|
4331
|
+
],
|
|
4332
|
+
args: []
|
|
4333
|
+
},
|
|
4334
|
+
{
|
|
4335
|
+
name: "trading_short_borrow",
|
|
4336
|
+
docs: [
|
|
4337
|
+
"Open a SHORT position. User deposits collateral (USDC), protocol borrows",
|
|
4338
|
+
"volatile token (BTC) from pool. Jupiter swaps BTC \u2192 USDC in between.",
|
|
4339
|
+
"add_collateral validates total collateral vs debt."
|
|
4340
|
+
],
|
|
4341
|
+
discriminator: [
|
|
4342
|
+
198,
|
|
4343
|
+
193,
|
|
4344
|
+
253,
|
|
4345
|
+
172,
|
|
4346
|
+
152,
|
|
4347
|
+
176,
|
|
4348
|
+
184,
|
|
4349
|
+
149
|
|
4350
|
+
],
|
|
4351
|
+
accounts: [
|
|
4352
|
+
{
|
|
4353
|
+
name: "position_account",
|
|
4354
|
+
writable: true,
|
|
4355
|
+
pda: {
|
|
4356
|
+
seeds: [
|
|
4357
|
+
{
|
|
4358
|
+
kind: "const",
|
|
4359
|
+
value: [
|
|
4360
|
+
112,
|
|
4361
|
+
111,
|
|
4362
|
+
115,
|
|
4363
|
+
105,
|
|
4364
|
+
116,
|
|
4365
|
+
105,
|
|
4366
|
+
111,
|
|
4367
|
+
110
|
|
5002
4368
|
]
|
|
5003
4369
|
},
|
|
5004
4370
|
{
|
|
5005
4371
|
kind: "account",
|
|
5006
|
-
path: "
|
|
5007
|
-
|
|
4372
|
+
path: "trader"
|
|
4373
|
+
},
|
|
4374
|
+
{
|
|
4375
|
+
kind: "account",
|
|
4376
|
+
path: "trading_pool"
|
|
4377
|
+
},
|
|
4378
|
+
{
|
|
4379
|
+
kind: "account",
|
|
4380
|
+
path: "random_account_as_id"
|
|
4381
|
+
}
|
|
4382
|
+
]
|
|
4383
|
+
}
|
|
4384
|
+
},
|
|
4385
|
+
{
|
|
4386
|
+
name: "trader",
|
|
4387
|
+
writable: true,
|
|
4388
|
+
signer: true
|
|
4389
|
+
},
|
|
4390
|
+
{
|
|
4391
|
+
name: "trading_pool",
|
|
4392
|
+
writable: true
|
|
4393
|
+
},
|
|
4394
|
+
{
|
|
4395
|
+
name: "node_wallet",
|
|
4396
|
+
writable: true
|
|
4397
|
+
},
|
|
4398
|
+
{
|
|
4399
|
+
name: "instructions",
|
|
4400
|
+
address: "Sysvar1nstructions1111111111111111111111111"
|
|
4401
|
+
},
|
|
4402
|
+
{
|
|
4403
|
+
name: "system_program",
|
|
4404
|
+
address: "11111111111111111111111111111111"
|
|
4405
|
+
},
|
|
4406
|
+
{
|
|
4407
|
+
name: "clock",
|
|
4408
|
+
address: "SysvarC1ock11111111111111111111111111111111"
|
|
4409
|
+
},
|
|
4410
|
+
{
|
|
4411
|
+
name: "random_account_as_id"
|
|
4412
|
+
},
|
|
4413
|
+
{
|
|
4414
|
+
name: "fee_token_account",
|
|
4415
|
+
docs: [
|
|
4416
|
+
"Fee recipient's ATA for the quote (borrowed) token"
|
|
4417
|
+
],
|
|
4418
|
+
writable: true,
|
|
4419
|
+
pda: {
|
|
4420
|
+
seeds: [
|
|
4421
|
+
{
|
|
4422
|
+
kind: "account",
|
|
4423
|
+
path: "fee_recipient"
|
|
4424
|
+
},
|
|
4425
|
+
{
|
|
4426
|
+
kind: "account",
|
|
4427
|
+
path: "token_program"
|
|
4428
|
+
},
|
|
4429
|
+
{
|
|
4430
|
+
kind: "account",
|
|
4431
|
+
path: "quote_mint"
|
|
4432
|
+
}
|
|
4433
|
+
],
|
|
4434
|
+
program: {
|
|
4435
|
+
kind: "const",
|
|
4436
|
+
value: [
|
|
4437
|
+
140,
|
|
4438
|
+
151,
|
|
4439
|
+
37,
|
|
4440
|
+
143,
|
|
4441
|
+
78,
|
|
4442
|
+
36,
|
|
4443
|
+
137,
|
|
4444
|
+
241,
|
|
4445
|
+
187,
|
|
4446
|
+
61,
|
|
4447
|
+
16,
|
|
4448
|
+
41,
|
|
4449
|
+
20,
|
|
4450
|
+
142,
|
|
4451
|
+
13,
|
|
4452
|
+
131,
|
|
4453
|
+
11,
|
|
4454
|
+
90,
|
|
4455
|
+
19,
|
|
4456
|
+
153,
|
|
4457
|
+
218,
|
|
4458
|
+
255,
|
|
4459
|
+
16,
|
|
4460
|
+
132,
|
|
4461
|
+
4,
|
|
4462
|
+
142,
|
|
4463
|
+
123,
|
|
4464
|
+
216,
|
|
4465
|
+
219,
|
|
4466
|
+
233,
|
|
4467
|
+
248,
|
|
4468
|
+
89
|
|
4469
|
+
]
|
|
4470
|
+
}
|
|
4471
|
+
}
|
|
4472
|
+
},
|
|
4473
|
+
{
|
|
4474
|
+
name: "from_token_account",
|
|
4475
|
+
docs: [
|
|
4476
|
+
"Node wallet's ATA for qt_type (BTC) \u2014 source of borrowed funds"
|
|
4477
|
+
],
|
|
4478
|
+
writable: true,
|
|
4479
|
+
pda: {
|
|
4480
|
+
seeds: [
|
|
4481
|
+
{
|
|
4482
|
+
kind: "account",
|
|
4483
|
+
path: "node_wallet"
|
|
4484
|
+
},
|
|
4485
|
+
{
|
|
4486
|
+
kind: "account",
|
|
4487
|
+
path: "token_program"
|
|
4488
|
+
},
|
|
4489
|
+
{
|
|
4490
|
+
kind: "account",
|
|
4491
|
+
path: "quote_mint"
|
|
4492
|
+
}
|
|
4493
|
+
],
|
|
4494
|
+
program: {
|
|
4495
|
+
kind: "const",
|
|
4496
|
+
value: [
|
|
4497
|
+
140,
|
|
4498
|
+
151,
|
|
4499
|
+
37,
|
|
4500
|
+
143,
|
|
4501
|
+
78,
|
|
4502
|
+
36,
|
|
4503
|
+
137,
|
|
4504
|
+
241,
|
|
4505
|
+
187,
|
|
4506
|
+
61,
|
|
4507
|
+
16,
|
|
4508
|
+
41,
|
|
4509
|
+
20,
|
|
4510
|
+
142,
|
|
4511
|
+
13,
|
|
4512
|
+
131,
|
|
4513
|
+
11,
|
|
4514
|
+
90,
|
|
4515
|
+
19,
|
|
4516
|
+
153,
|
|
4517
|
+
218,
|
|
4518
|
+
255,
|
|
4519
|
+
16,
|
|
4520
|
+
132,
|
|
4521
|
+
4,
|
|
4522
|
+
142,
|
|
4523
|
+
123,
|
|
4524
|
+
216,
|
|
4525
|
+
219,
|
|
4526
|
+
233,
|
|
4527
|
+
248,
|
|
4528
|
+
89
|
|
4529
|
+
]
|
|
4530
|
+
}
|
|
4531
|
+
}
|
|
4532
|
+
},
|
|
4533
|
+
{
|
|
4534
|
+
name: "to_token_account",
|
|
4535
|
+
docs: [
|
|
4536
|
+
"User's ATA for qt_type (BTC) \u2014 receives borrowed tokens for Jupiter to swap"
|
|
4537
|
+
],
|
|
4538
|
+
writable: true,
|
|
4539
|
+
pda: {
|
|
4540
|
+
seeds: [
|
|
4541
|
+
{
|
|
4542
|
+
kind: "account",
|
|
4543
|
+
path: "trader"
|
|
4544
|
+
},
|
|
4545
|
+
{
|
|
4546
|
+
kind: "account",
|
|
4547
|
+
path: "token_program"
|
|
4548
|
+
},
|
|
4549
|
+
{
|
|
4550
|
+
kind: "account",
|
|
4551
|
+
path: "quote_mint"
|
|
4552
|
+
}
|
|
4553
|
+
],
|
|
4554
|
+
program: {
|
|
4555
|
+
kind: "const",
|
|
4556
|
+
value: [
|
|
4557
|
+
140,
|
|
4558
|
+
151,
|
|
4559
|
+
37,
|
|
4560
|
+
143,
|
|
4561
|
+
78,
|
|
4562
|
+
36,
|
|
4563
|
+
137,
|
|
4564
|
+
241,
|
|
4565
|
+
187,
|
|
4566
|
+
61,
|
|
4567
|
+
16,
|
|
4568
|
+
41,
|
|
4569
|
+
20,
|
|
4570
|
+
142,
|
|
4571
|
+
13,
|
|
4572
|
+
131,
|
|
4573
|
+
11,
|
|
4574
|
+
90,
|
|
4575
|
+
19,
|
|
4576
|
+
153,
|
|
4577
|
+
218,
|
|
4578
|
+
255,
|
|
4579
|
+
16,
|
|
4580
|
+
132,
|
|
4581
|
+
4,
|
|
4582
|
+
142,
|
|
4583
|
+
123,
|
|
4584
|
+
216,
|
|
4585
|
+
219,
|
|
4586
|
+
233,
|
|
4587
|
+
248,
|
|
4588
|
+
89
|
|
4589
|
+
]
|
|
4590
|
+
}
|
|
4591
|
+
}
|
|
4592
|
+
},
|
|
4593
|
+
{
|
|
4594
|
+
name: "token_program",
|
|
4595
|
+
docs: [
|
|
4596
|
+
"Token program for qt_type (BTC)"
|
|
4597
|
+
]
|
|
4598
|
+
},
|
|
4599
|
+
{
|
|
4600
|
+
name: "position_token_account",
|
|
4601
|
+
docs: [
|
|
4602
|
+
"Position's ATA for collateral_type (USDC) \u2014 receives user deposit + Jupiter swap output"
|
|
4603
|
+
],
|
|
4604
|
+
writable: true,
|
|
4605
|
+
pda: {
|
|
4606
|
+
seeds: [
|
|
4607
|
+
{
|
|
4608
|
+
kind: "account",
|
|
4609
|
+
path: "position_account"
|
|
4610
|
+
},
|
|
4611
|
+
{
|
|
4612
|
+
kind: "account",
|
|
4613
|
+
path: "collateral_token_program"
|
|
4614
|
+
},
|
|
4615
|
+
{
|
|
4616
|
+
kind: "account",
|
|
4617
|
+
path: "collateral_mint"
|
|
5008
4618
|
}
|
|
5009
4619
|
],
|
|
5010
4620
|
program: {
|
|
@@ -5047,71 +4657,107 @@ var lavarageUSDC_default = {
|
|
|
5047
4657
|
}
|
|
5048
4658
|
},
|
|
5049
4659
|
{
|
|
5050
|
-
name: "
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
{
|
|
5055
|
-
name: "percentage",
|
|
5056
|
-
type: "u64"
|
|
5057
|
-
}
|
|
5058
|
-
]
|
|
5059
|
-
},
|
|
5060
|
-
{
|
|
5061
|
-
name: "trading_remove_tp_delegate",
|
|
5062
|
-
discriminator: [
|
|
5063
|
-
88,
|
|
5064
|
-
18,
|
|
5065
|
-
149,
|
|
5066
|
-
143,
|
|
5067
|
-
124,
|
|
5068
|
-
43,
|
|
5069
|
-
68,
|
|
5070
|
-
178
|
|
5071
|
-
],
|
|
5072
|
-
accounts: [
|
|
5073
|
-
{
|
|
5074
|
-
name: "delegate",
|
|
4660
|
+
name: "user_collateral_account",
|
|
4661
|
+
docs: [
|
|
4662
|
+
"User's ATA for collateral_type (USDC) \u2014 source of user's deposit"
|
|
4663
|
+
],
|
|
5075
4664
|
writable: true,
|
|
5076
4665
|
pda: {
|
|
5077
4666
|
seeds: [
|
|
5078
4667
|
{
|
|
5079
|
-
kind: "
|
|
5080
|
-
|
|
5081
|
-
100,
|
|
5082
|
-
101,
|
|
5083
|
-
108,
|
|
5084
|
-
101,
|
|
5085
|
-
103,
|
|
5086
|
-
97,
|
|
5087
|
-
116,
|
|
5088
|
-
101
|
|
5089
|
-
]
|
|
4668
|
+
kind: "account",
|
|
4669
|
+
path: "trader"
|
|
5090
4670
|
},
|
|
5091
4671
|
{
|
|
5092
4672
|
kind: "account",
|
|
5093
|
-
path: "
|
|
4673
|
+
path: "collateral_token_program"
|
|
4674
|
+
},
|
|
4675
|
+
{
|
|
4676
|
+
kind: "account",
|
|
4677
|
+
path: "collateral_mint"
|
|
5094
4678
|
}
|
|
5095
|
-
]
|
|
4679
|
+
],
|
|
4680
|
+
program: {
|
|
4681
|
+
kind: "const",
|
|
4682
|
+
value: [
|
|
4683
|
+
140,
|
|
4684
|
+
151,
|
|
4685
|
+
37,
|
|
4686
|
+
143,
|
|
4687
|
+
78,
|
|
4688
|
+
36,
|
|
4689
|
+
137,
|
|
4690
|
+
241,
|
|
4691
|
+
187,
|
|
4692
|
+
61,
|
|
4693
|
+
16,
|
|
4694
|
+
41,
|
|
4695
|
+
20,
|
|
4696
|
+
142,
|
|
4697
|
+
13,
|
|
4698
|
+
131,
|
|
4699
|
+
11,
|
|
4700
|
+
90,
|
|
4701
|
+
19,
|
|
4702
|
+
153,
|
|
4703
|
+
218,
|
|
4704
|
+
255,
|
|
4705
|
+
16,
|
|
4706
|
+
132,
|
|
4707
|
+
4,
|
|
4708
|
+
142,
|
|
4709
|
+
123,
|
|
4710
|
+
216,
|
|
4711
|
+
219,
|
|
4712
|
+
233,
|
|
4713
|
+
248,
|
|
4714
|
+
89
|
|
4715
|
+
]
|
|
4716
|
+
}
|
|
5096
4717
|
}
|
|
5097
4718
|
},
|
|
5098
4719
|
{
|
|
5099
|
-
name: "
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
relations: [
|
|
5103
|
-
"delegate"
|
|
4720
|
+
name: "collateral_token_program",
|
|
4721
|
+
docs: [
|
|
4722
|
+
"Token program for collateral_type (USDC)"
|
|
5104
4723
|
]
|
|
5105
4724
|
},
|
|
5106
4725
|
{
|
|
5107
|
-
name: "
|
|
4726
|
+
name: "associated_token_program",
|
|
4727
|
+
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
5108
4728
|
},
|
|
5109
4729
|
{
|
|
5110
|
-
name: "
|
|
5111
|
-
|
|
4730
|
+
name: "collateral_mint"
|
|
4731
|
+
},
|
|
4732
|
+
{
|
|
4733
|
+
name: "quote_mint"
|
|
4734
|
+
},
|
|
4735
|
+
{
|
|
4736
|
+
name: "fee_recipient"
|
|
5112
4737
|
}
|
|
5113
4738
|
],
|
|
5114
|
-
args: [
|
|
4739
|
+
args: [
|
|
4740
|
+
{
|
|
4741
|
+
name: "borrow_amount",
|
|
4742
|
+
type: "u64"
|
|
4743
|
+
},
|
|
4744
|
+
{
|
|
4745
|
+
name: "user_deposit",
|
|
4746
|
+
type: "u64"
|
|
4747
|
+
},
|
|
4748
|
+
{
|
|
4749
|
+
name: "discount_bps",
|
|
4750
|
+
type: {
|
|
4751
|
+
option: "u64"
|
|
4752
|
+
}
|
|
4753
|
+
},
|
|
4754
|
+
{
|
|
4755
|
+
name: "referral_bps",
|
|
4756
|
+
type: {
|
|
4757
|
+
option: "u64"
|
|
4758
|
+
}
|
|
4759
|
+
}
|
|
4760
|
+
]
|
|
5115
4761
|
}
|
|
5116
4762
|
],
|
|
5117
4763
|
accounts: [
|
|
@@ -5212,118 +4858,13 @@ var lavarageUSDC_default = {
|
|
|
5212
4858
|
errors: [
|
|
5213
4859
|
{
|
|
5214
4860
|
code: 6e3,
|
|
5215
|
-
name: "AddressMismatch",
|
|
5216
|
-
msg: "Address Mismatch"
|
|
5217
|
-
},
|
|
5218
|
-
{
|
|
5219
|
-
code: 6001,
|
|
5220
|
-
name: "ProgramMismatch",
|
|
5221
|
-
msg: "Program Mismatch"
|
|
5222
|
-
},
|
|
5223
|
-
{
|
|
5224
|
-
code: 6002,
|
|
5225
|
-
name: "MissingRepay",
|
|
5226
|
-
msg: "Missing Repay"
|
|
5227
|
-
},
|
|
5228
|
-
{
|
|
5229
|
-
code: 6003,
|
|
5230
|
-
name: "IncorrectOwner",
|
|
5231
|
-
msg: "Incorrect Owner"
|
|
5232
|
-
},
|
|
5233
|
-
{
|
|
5234
|
-
code: 6004,
|
|
5235
|
-
name: "IncorrectProgramAuthority",
|
|
5236
|
-
msg: "Incorrect Program Authority"
|
|
5237
|
-
},
|
|
5238
|
-
{
|
|
5239
|
-
code: 6005,
|
|
5240
|
-
name: "CannotBorrowBeforeRepay",
|
|
5241
|
-
msg: "Cannot Borrow Before Repay"
|
|
5242
|
-
},
|
|
5243
|
-
{
|
|
5244
|
-
code: 6006,
|
|
5245
|
-
name: "UnknownInstruction",
|
|
5246
|
-
msg: "Unknown Instruction"
|
|
5247
|
-
},
|
|
5248
|
-
{
|
|
5249
|
-
code: 6007,
|
|
5250
|
-
name: "ExpectedCollateralNotEnough",
|
|
5251
|
-
msg: "Expected collateral not enough"
|
|
5252
|
-
},
|
|
5253
|
-
{
|
|
5254
|
-
code: 6008,
|
|
5255
|
-
name: "ForTesting",
|
|
5256
|
-
msg: "TestError"
|
|
5257
|
-
},
|
|
5258
|
-
{
|
|
5259
|
-
code: 6009,
|
|
5260
|
-
name: "BlacklistedAccount",
|
|
5261
|
-
msg: "Account is blacklisted"
|
|
5262
|
-
},
|
|
5263
|
-
{
|
|
5264
|
-
code: 6010,
|
|
5265
|
-
name: "AccessEntryAlreadyExists",
|
|
5266
|
-
msg: "Access entry already exists"
|
|
5267
|
-
},
|
|
5268
|
-
{
|
|
5269
|
-
code: 6011,
|
|
5270
|
-
name: "AccessEntryNotFound",
|
|
5271
|
-
msg: "Access entry not found"
|
|
5272
|
-
},
|
|
5273
|
-
{
|
|
5274
|
-
code: 6012,
|
|
5275
|
-
name: "UnauthorizedWithdrawal",
|
|
5276
|
-
msg: "Unauthorized Withdrawal"
|
|
5277
|
-
},
|
|
5278
|
-
{
|
|
5279
|
-
code: 6013,
|
|
5280
|
-
name: "AccountAlreadyInitialized",
|
|
5281
|
-
msg: "Account already initialized"
|
|
5282
|
-
},
|
|
5283
|
-
{
|
|
5284
|
-
code: 6014,
|
|
5285
|
-
name: "InvalidSignature",
|
|
5286
|
-
msg: "The provided signature is invalid."
|
|
5287
|
-
},
|
|
5288
|
-
{
|
|
5289
|
-
code: 6015,
|
|
5290
|
-
name: "InvalidOracle",
|
|
5291
|
-
msg: "The provided oracle is invalid."
|
|
5292
|
-
},
|
|
5293
|
-
{
|
|
5294
|
-
code: 6016,
|
|
5295
4861
|
name: "InvalidSplitRatio",
|
|
5296
4862
|
msg: "Invalid split ratio. Must be between 1 and 99"
|
|
5297
4863
|
},
|
|
5298
4864
|
{
|
|
5299
|
-
code:
|
|
4865
|
+
code: 6001,
|
|
5300
4866
|
name: "PositionsNotMergeable",
|
|
5301
4867
|
msg: "Positions cannot be merged - must have same pool, trader, and interest rate"
|
|
5302
|
-
},
|
|
5303
|
-
{
|
|
5304
|
-
code: 6018,
|
|
5305
|
-
name: "OnlyDelegateOperator",
|
|
5306
|
-
msg: "Only delegate operator can execute TP"
|
|
5307
|
-
},
|
|
5308
|
-
{
|
|
5309
|
-
code: 6019,
|
|
5310
|
-
name: "InvalidDelegateType",
|
|
5311
|
-
msg: "Invalid delegate type"
|
|
5312
|
-
},
|
|
5313
|
-
{
|
|
5314
|
-
code: 6020,
|
|
5315
|
-
name: "MissingRequiredPriceFeed",
|
|
5316
|
-
msg: "Missing required price feed"
|
|
5317
|
-
},
|
|
5318
|
-
{
|
|
5319
|
-
code: 6021,
|
|
5320
|
-
name: "InvalidPrice",
|
|
5321
|
-
msg: "Price must be greater than 0"
|
|
5322
|
-
},
|
|
5323
|
-
{
|
|
5324
|
-
code: 6022,
|
|
5325
|
-
name: "MathOverflow",
|
|
5326
|
-
msg: "Arithmetic operation overflow"
|
|
5327
4868
|
}
|
|
5328
4869
|
],
|
|
5329
4870
|
types: [
|
|
@@ -5400,27 +4941,6 @@ var lavarageUSDC_default = {
|
|
|
5400
4941
|
]
|
|
5401
4942
|
}
|
|
5402
4943
|
},
|
|
5403
|
-
{
|
|
5404
|
-
name: "MigratePoolArgs",
|
|
5405
|
-
type: {
|
|
5406
|
-
kind: "struct",
|
|
5407
|
-
fields: [
|
|
5408
|
-
{
|
|
5409
|
-
name: "feed_id",
|
|
5410
|
-
type: {
|
|
5411
|
-
array: [
|
|
5412
|
-
"u8",
|
|
5413
|
-
32
|
|
5414
|
-
]
|
|
5415
|
-
}
|
|
5416
|
-
},
|
|
5417
|
-
{
|
|
5418
|
-
name: "open_ltv",
|
|
5419
|
-
type: "u16"
|
|
5420
|
-
}
|
|
5421
|
-
]
|
|
5422
|
-
}
|
|
5423
|
-
},
|
|
5424
4944
|
{
|
|
5425
4945
|
name: "NodeWallet",
|
|
5426
4946
|
type: {
|
|
@@ -5469,7 +4989,7 @@ var lavarageUSDC_default = {
|
|
|
5469
4989
|
{
|
|
5470
4990
|
name: "max_borrow",
|
|
5471
4991
|
docs: [
|
|
5472
|
-
"
|
|
4992
|
+
"The Loan-to-Value (LTV) ratio used to determine how much SOL can be borrowed per token."
|
|
5473
4993
|
],
|
|
5474
4994
|
type: "u64"
|
|
5475
4995
|
},
|
|
@@ -9666,6 +9186,7 @@ var borrowV2 = (lavarageProgram, offer, marginSOL, leverage, randomSeed, quoteTo
|
|
|
9666
9186
|
tradingPool: offer.publicKey,
|
|
9667
9187
|
trader: lavarageProgram.provider.publicKey,
|
|
9668
9188
|
mint: offer.account.collateralType,
|
|
9189
|
+
quoteMint: quoteToken,
|
|
9669
9190
|
toTokenAccount: toTokenAccount.account.address,
|
|
9670
9191
|
systemProgram: import_web33.SystemProgram.programId,
|
|
9671
9192
|
positionAccount,
|
|
@@ -9888,13 +9409,12 @@ var openTradeV1 = (lavarageProgram, offer, jupInstruction, marginSOL, leverage,
|
|
|
9888
9409
|
const setUpInstructions = [
|
|
9889
9410
|
fromTokenAccount.instruction,
|
|
9890
9411
|
toTokenAccount.instruction,
|
|
9891
|
-
partnerFeeRecipientCreateIx
|
|
9892
|
-
...setupInstructions.map(deserializeInstruction)
|
|
9412
|
+
partnerFeeRecipientCreateIx
|
|
9893
9413
|
].filter(Boolean);
|
|
9894
9414
|
const allInstructions2 = [
|
|
9895
9415
|
tradingOpenBorrowInstruction,
|
|
9416
|
+
...setupInstructions.map(deserializeInstruction),
|
|
9896
9417
|
deserializeInstruction(swapInstructionPayload),
|
|
9897
|
-
,
|
|
9898
9418
|
openAddCollateralInstruction,
|
|
9899
9419
|
computeBudgetMicroLamports ? computeFeeIx : void 0
|
|
9900
9420
|
].filter(Boolean);
|
|
@@ -10198,6 +9718,7 @@ var openTradeV2 = (lavarageProgram, offer, jupInstruction, marginSOL, leverage,
|
|
|
10198
9718
|
tradingPool: offer.publicKey,
|
|
10199
9719
|
trader: program.provider.publicKey,
|
|
10200
9720
|
mint: offer.account.collateralType,
|
|
9721
|
+
quoteMint: quoteToken,
|
|
10201
9722
|
toTokenAccount: toTokenAccount.account.address,
|
|
10202
9723
|
systemProgram: import_web33.SystemProgram.programId,
|
|
10203
9724
|
positionAccount,
|