@glamsystems/glam-sdk 0.1.6 → 0.1.7
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/index.cjs.js +1606 -2013
- package/index.esm.js +1607 -2013
- package/package.json +3 -3
- package/src/client/base.d.ts +3 -12
- package/src/client/drift.d.ts +6 -6
- package/src/client/jupiter.d.ts +5 -2
- package/src/constants.d.ts +1 -5
- package/src/react/glam.d.ts +1 -0
- package/target/idl/glam.json +1469 -1795
- package/target/types/glam.d.ts +1461 -1787
- package/target/types/glam.ts +1469 -1795
package/index.cjs.js
CHANGED
|
@@ -33,7 +33,7 @@ var borsh__namespace = /*#__PURE__*/_interopNamespaceDefault(borsh);
|
|
|
33
33
|
var address = "GLAMbTqav9N9witRjswJ8enwp9vv5G8bsSJ2kPJ4rcyc";
|
|
34
34
|
var metadata = {
|
|
35
35
|
name: "glam",
|
|
36
|
-
version: "0.4.
|
|
36
|
+
version: "0.4.3",
|
|
37
37
|
spec: "0.1.0",
|
|
38
38
|
description: "Glam Protocol"
|
|
39
39
|
};
|
|
@@ -45,7 +45,7 @@ var instructions = [
|
|
|
45
45
|
"Adds a new mint.",
|
|
46
46
|
"",
|
|
47
47
|
"# Parameters",
|
|
48
|
-
"- `ctx`: The context for the
|
|
48
|
+
"- `ctx`: The context for the instruction.",
|
|
49
49
|
"- `mint_model`: An instance of `MintModel` containing the metadata for the new mint.",
|
|
50
50
|
"",
|
|
51
51
|
"# Permission required",
|
|
@@ -163,7 +163,7 @@ var instructions = [
|
|
|
163
163
|
"Burns a specified amount of tokens for the given mint.",
|
|
164
164
|
"",
|
|
165
165
|
"# Parameters",
|
|
166
|
-
"- `ctx`: The context for the
|
|
166
|
+
"- `ctx`: The context for the instruction.",
|
|
167
167
|
"- `mint_id`: The id of the mint to burn tokens for.",
|
|
168
168
|
"- `amount`: The amount of tokens to burn.",
|
|
169
169
|
"",
|
|
@@ -272,103 +272,13 @@ var instructions = [
|
|
|
272
272
|
}
|
|
273
273
|
]
|
|
274
274
|
},
|
|
275
|
-
{
|
|
276
|
-
name: "cast_vote",
|
|
277
|
-
docs: [
|
|
278
|
-
"Casts a vote.",
|
|
279
|
-
"",
|
|
280
|
-
"# Parameters",
|
|
281
|
-
"- `ctx`: The context for the transaction.",
|
|
282
|
-
"- `side`: The side to vote for.",
|
|
283
|
-
"",
|
|
284
|
-
"# Permission required",
|
|
285
|
-
"- Permission::VoteOnProposal",
|
|
286
|
-
"",
|
|
287
|
-
"# Integration required",
|
|
288
|
-
"- Integration::JupiterVote"
|
|
289
|
-
],
|
|
290
|
-
discriminator: [
|
|
291
|
-
20,
|
|
292
|
-
212,
|
|
293
|
-
15,
|
|
294
|
-
189,
|
|
295
|
-
69,
|
|
296
|
-
180,
|
|
297
|
-
69,
|
|
298
|
-
151
|
|
299
|
-
],
|
|
300
|
-
accounts: [
|
|
301
|
-
{
|
|
302
|
-
name: "state",
|
|
303
|
-
writable: true
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
name: "vault",
|
|
307
|
-
writable: true,
|
|
308
|
-
pda: {
|
|
309
|
-
seeds: [
|
|
310
|
-
{
|
|
311
|
-
kind: "const",
|
|
312
|
-
value: [
|
|
313
|
-
118,
|
|
314
|
-
97,
|
|
315
|
-
117,
|
|
316
|
-
108,
|
|
317
|
-
116
|
|
318
|
-
]
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
kind: "account",
|
|
322
|
-
path: "state"
|
|
323
|
-
}
|
|
324
|
-
]
|
|
325
|
-
}
|
|
326
|
-
},
|
|
327
|
-
{
|
|
328
|
-
name: "signer",
|
|
329
|
-
writable: true,
|
|
330
|
-
signer: true
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
name: "locker"
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
name: "escrow"
|
|
337
|
-
},
|
|
338
|
-
{
|
|
339
|
-
name: "proposal",
|
|
340
|
-
writable: true
|
|
341
|
-
},
|
|
342
|
-
{
|
|
343
|
-
name: "vote",
|
|
344
|
-
writable: true
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
name: "governor"
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
name: "locked_voter_program",
|
|
351
|
-
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
352
|
-
},
|
|
353
|
-
{
|
|
354
|
-
name: "governance_program",
|
|
355
|
-
address: "GovaE4iu227srtG2s3tZzB4RmWBzw8sTwrCLZz7kN7rY"
|
|
356
|
-
}
|
|
357
|
-
],
|
|
358
|
-
args: [
|
|
359
|
-
{
|
|
360
|
-
name: "side",
|
|
361
|
-
type: "u8"
|
|
362
|
-
}
|
|
363
|
-
]
|
|
364
|
-
},
|
|
365
275
|
{
|
|
366
276
|
name: "close_mint",
|
|
367
277
|
docs: [
|
|
368
278
|
"Closes a mint and releases its resources.",
|
|
369
279
|
"",
|
|
370
280
|
"# Parameters",
|
|
371
|
-
"- `ctx`: The context for the
|
|
281
|
+
"- `ctx`: The context for the instruction.",
|
|
372
282
|
"- `mint_id`: The id of the mint to be closed.",
|
|
373
283
|
"",
|
|
374
284
|
"# Permission required",
|
|
@@ -499,7 +409,7 @@ var instructions = [
|
|
|
499
409
|
"Closes a state account and releases its resources.",
|
|
500
410
|
"",
|
|
501
411
|
"# Parameters",
|
|
502
|
-
"- `ctx`: The context for the
|
|
412
|
+
"- `ctx`: The context for the instruction.",
|
|
503
413
|
"",
|
|
504
414
|
"# Permission required",
|
|
505
415
|
"- Owner only, delegates not allowed"
|
|
@@ -584,7 +494,7 @@ var instructions = [
|
|
|
584
494
|
"Closes token accounts owned by the vault.",
|
|
585
495
|
"",
|
|
586
496
|
"# Parameters",
|
|
587
|
-
"- `ctx`: The context for the
|
|
497
|
+
"- `ctx`: The context for the instruction.",
|
|
588
498
|
"",
|
|
589
499
|
"# Permission required",
|
|
590
500
|
"- Owner only, delegates not allowed"
|
|
@@ -648,7 +558,7 @@ var instructions = [
|
|
|
648
558
|
"Deactivates stake accounts.",
|
|
649
559
|
"",
|
|
650
560
|
"# Parameters",
|
|
651
|
-
"- `ctx`: The context for the
|
|
561
|
+
"- `ctx`: The context for the instruction.",
|
|
652
562
|
"",
|
|
653
563
|
"# Permission required",
|
|
654
564
|
"- Permission::Unstake",
|
|
@@ -714,7 +624,7 @@ var instructions = [
|
|
|
714
624
|
"Cancels drift orders.",
|
|
715
625
|
"",
|
|
716
626
|
"# Parameters",
|
|
717
|
-
"- `ctx`: The context for the
|
|
627
|
+
"- `ctx`: The context for the instruction.",
|
|
718
628
|
"- `market_type`: The type of market (spot or perp) to cancel orders for.",
|
|
719
629
|
"- `market_index`: The index of the market to cancel orders for.",
|
|
720
630
|
"- `direction`: The direction of orders to cancel (long or short).",
|
|
@@ -775,9 +685,6 @@ var instructions = [
|
|
|
775
685
|
{
|
|
776
686
|
name: "user",
|
|
777
687
|
writable: true
|
|
778
|
-
},
|
|
779
|
-
{
|
|
780
|
-
name: "authority"
|
|
781
688
|
}
|
|
782
689
|
],
|
|
783
690
|
args: [
|
|
@@ -815,7 +722,7 @@ var instructions = [
|
|
|
815
722
|
"Cancels drift orders by order IDs.",
|
|
816
723
|
"",
|
|
817
724
|
"# Parameters",
|
|
818
|
-
"- `ctx`: The context for the
|
|
725
|
+
"- `ctx`: The context for the instruction.",
|
|
819
726
|
"- `order_ids`: A list of order IDs.",
|
|
820
727
|
"",
|
|
821
728
|
"# Permission required",
|
|
@@ -874,9 +781,6 @@ var instructions = [
|
|
|
874
781
|
{
|
|
875
782
|
name: "user",
|
|
876
783
|
writable: true
|
|
877
|
-
},
|
|
878
|
-
{
|
|
879
|
-
name: "authority"
|
|
880
784
|
}
|
|
881
785
|
],
|
|
882
786
|
args: [
|
|
@@ -894,7 +798,7 @@ var instructions = [
|
|
|
894
798
|
"Deletes a drift user (sub account).",
|
|
895
799
|
"",
|
|
896
800
|
"# Parameters",
|
|
897
|
-
"- `ctx`: The context for the
|
|
801
|
+
"- `ctx`: The context for the instruction.",
|
|
898
802
|
"",
|
|
899
803
|
"# Permission required",
|
|
900
804
|
"- Permission::DriftDeleteUser",
|
|
@@ -914,22 +818,10 @@ var instructions = [
|
|
|
914
818
|
],
|
|
915
819
|
accounts: [
|
|
916
820
|
{
|
|
917
|
-
name: "
|
|
918
|
-
},
|
|
919
|
-
{
|
|
920
|
-
name: "user",
|
|
921
|
-
writable: true
|
|
922
|
-
},
|
|
923
|
-
{
|
|
924
|
-
name: "user_stats",
|
|
925
|
-
writable: true
|
|
926
|
-
},
|
|
927
|
-
{
|
|
928
|
-
name: "drift_state",
|
|
929
|
-
writable: true
|
|
821
|
+
name: "glam_state"
|
|
930
822
|
},
|
|
931
823
|
{
|
|
932
|
-
name: "
|
|
824
|
+
name: "glam_vault",
|
|
933
825
|
writable: true,
|
|
934
826
|
pda: {
|
|
935
827
|
seeds: [
|
|
@@ -945,23 +837,31 @@ var instructions = [
|
|
|
945
837
|
},
|
|
946
838
|
{
|
|
947
839
|
kind: "account",
|
|
948
|
-
path: "
|
|
840
|
+
path: "glam_state"
|
|
949
841
|
}
|
|
950
842
|
]
|
|
951
843
|
}
|
|
952
844
|
},
|
|
953
845
|
{
|
|
954
|
-
name: "
|
|
846
|
+
name: "glam_signer",
|
|
955
847
|
writable: true,
|
|
956
848
|
signer: true
|
|
957
849
|
},
|
|
958
850
|
{
|
|
959
|
-
name: "
|
|
851
|
+
name: "cpi_program",
|
|
960
852
|
address: "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
|
|
961
853
|
},
|
|
962
854
|
{
|
|
963
|
-
name: "
|
|
964
|
-
|
|
855
|
+
name: "user",
|
|
856
|
+
writable: true
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
name: "user_stats",
|
|
860
|
+
writable: true
|
|
861
|
+
},
|
|
862
|
+
{
|
|
863
|
+
name: "state",
|
|
864
|
+
writable: true
|
|
965
865
|
}
|
|
966
866
|
],
|
|
967
867
|
args: []
|
|
@@ -972,7 +872,7 @@ var instructions = [
|
|
|
972
872
|
"Deposits to drift.",
|
|
973
873
|
"",
|
|
974
874
|
"# Parameters",
|
|
975
|
-
"- `ctx`: The context for the
|
|
875
|
+
"- `ctx`: The context for the instruction.",
|
|
976
876
|
"- `market_index`: Index of the drift spot market.",
|
|
977
877
|
"- `amount`: Amount of asset to deposit.",
|
|
978
878
|
"",
|
|
@@ -994,22 +894,11 @@ var instructions = [
|
|
|
994
894
|
],
|
|
995
895
|
accounts: [
|
|
996
896
|
{
|
|
997
|
-
name: "
|
|
998
|
-
},
|
|
999
|
-
{
|
|
1000
|
-
name: "user",
|
|
1001
|
-
writable: true
|
|
1002
|
-
},
|
|
1003
|
-
{
|
|
1004
|
-
name: "user_stats",
|
|
1005
|
-
writable: true
|
|
1006
|
-
},
|
|
1007
|
-
{
|
|
1008
|
-
name: "drift_state",
|
|
1009
|
-
writable: true
|
|
897
|
+
name: "glam_state"
|
|
1010
898
|
},
|
|
1011
899
|
{
|
|
1012
|
-
name: "
|
|
900
|
+
name: "glam_vault",
|
|
901
|
+
writable: true,
|
|
1013
902
|
pda: {
|
|
1014
903
|
seeds: [
|
|
1015
904
|
{
|
|
@@ -1024,31 +913,41 @@ var instructions = [
|
|
|
1024
913
|
},
|
|
1025
914
|
{
|
|
1026
915
|
kind: "account",
|
|
1027
|
-
path: "
|
|
916
|
+
path: "glam_state"
|
|
1028
917
|
}
|
|
1029
918
|
]
|
|
1030
919
|
}
|
|
1031
920
|
},
|
|
1032
921
|
{
|
|
1033
|
-
name: "
|
|
922
|
+
name: "glam_signer",
|
|
923
|
+
writable: true,
|
|
924
|
+
signer: true
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
name: "cpi_program",
|
|
928
|
+
address: "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
name: "state"
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
name: "user",
|
|
1034
935
|
writable: true
|
|
1035
936
|
},
|
|
1036
937
|
{
|
|
1037
|
-
name: "
|
|
938
|
+
name: "user_stats",
|
|
1038
939
|
writable: true
|
|
1039
940
|
},
|
|
1040
941
|
{
|
|
1041
|
-
name: "
|
|
1042
|
-
writable: true
|
|
1043
|
-
signer: true
|
|
942
|
+
name: "spot_market_vault",
|
|
943
|
+
writable: true
|
|
1044
944
|
},
|
|
1045
945
|
{
|
|
1046
|
-
name: "
|
|
1047
|
-
|
|
946
|
+
name: "user_token_account",
|
|
947
|
+
writable: true
|
|
1048
948
|
},
|
|
1049
949
|
{
|
|
1050
|
-
name: "token_program"
|
|
1051
|
-
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
950
|
+
name: "token_program"
|
|
1052
951
|
}
|
|
1053
952
|
],
|
|
1054
953
|
args: [
|
|
@@ -1059,52 +958,31 @@ var instructions = [
|
|
|
1059
958
|
{
|
|
1060
959
|
name: "amount",
|
|
1061
960
|
type: "u64"
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
name: "reduce_only",
|
|
964
|
+
type: "bool"
|
|
1062
965
|
}
|
|
1063
966
|
]
|
|
1064
967
|
},
|
|
1065
968
|
{
|
|
1066
|
-
name: "
|
|
1067
|
-
docs: [
|
|
1068
|
-
"Drift",
|
|
1069
|
-
"Initializes a drift account owned by vault and creates a subaccount.",
|
|
1070
|
-
"",
|
|
1071
|
-
"# Parameters",
|
|
1072
|
-
"- `ctx`: The context for the transaction.",
|
|
1073
|
-
"",
|
|
1074
|
-
"# Permission required",
|
|
1075
|
-
"- Permission::DriftInitialize",
|
|
1076
|
-
"",
|
|
1077
|
-
"# Integration required",
|
|
1078
|
-
"- Integration::Drift"
|
|
1079
|
-
],
|
|
969
|
+
name: "drift_initialize_user",
|
|
1080
970
|
discriminator: [
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
971
|
+
107,
|
|
972
|
+
244,
|
|
973
|
+
158,
|
|
974
|
+
15,
|
|
975
|
+
225,
|
|
976
|
+
239,
|
|
977
|
+
98,
|
|
978
|
+
245
|
|
1089
979
|
],
|
|
1090
980
|
accounts: [
|
|
1091
981
|
{
|
|
1092
|
-
name: "
|
|
1093
|
-
},
|
|
1094
|
-
{
|
|
1095
|
-
name: "user",
|
|
1096
|
-
writable: true
|
|
1097
|
-
},
|
|
1098
|
-
{
|
|
1099
|
-
name: "user_stats",
|
|
1100
|
-
writable: true
|
|
1101
|
-
},
|
|
1102
|
-
{
|
|
1103
|
-
name: "drift_state",
|
|
1104
|
-
writable: true
|
|
982
|
+
name: "glam_state"
|
|
1105
983
|
},
|
|
1106
984
|
{
|
|
1107
|
-
name: "
|
|
985
|
+
name: "glam_vault",
|
|
1108
986
|
pda: {
|
|
1109
987
|
seeds: [
|
|
1110
988
|
{
|
|
@@ -1119,20 +997,37 @@ var instructions = [
|
|
|
1119
997
|
},
|
|
1120
998
|
{
|
|
1121
999
|
kind: "account",
|
|
1122
|
-
path: "
|
|
1000
|
+
path: "glam_state"
|
|
1123
1001
|
}
|
|
1124
1002
|
]
|
|
1125
1003
|
}
|
|
1126
1004
|
},
|
|
1127
1005
|
{
|
|
1128
|
-
name: "
|
|
1006
|
+
name: "glam_signer",
|
|
1129
1007
|
writable: true,
|
|
1130
1008
|
signer: true
|
|
1131
1009
|
},
|
|
1132
1010
|
{
|
|
1133
|
-
name: "
|
|
1011
|
+
name: "cpi_program",
|
|
1134
1012
|
address: "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
|
|
1135
1013
|
},
|
|
1014
|
+
{
|
|
1015
|
+
name: "user",
|
|
1016
|
+
writable: true
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
name: "user_stats",
|
|
1020
|
+
writable: true
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
name: "state",
|
|
1024
|
+
writable: true
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
name: "payer",
|
|
1028
|
+
writable: true,
|
|
1029
|
+
signer: true
|
|
1030
|
+
},
|
|
1136
1031
|
{
|
|
1137
1032
|
name: "rent",
|
|
1138
1033
|
address: "SysvarRent111111111111111111111111111111111"
|
|
@@ -1142,35 +1037,48 @@ var instructions = [
|
|
|
1142
1037
|
address: "11111111111111111111111111111111"
|
|
1143
1038
|
}
|
|
1144
1039
|
],
|
|
1145
|
-
args: [
|
|
1040
|
+
args: [
|
|
1041
|
+
{
|
|
1042
|
+
name: "sub_account_id",
|
|
1043
|
+
type: "u16"
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
name: "name",
|
|
1047
|
+
type: {
|
|
1048
|
+
array: [
|
|
1049
|
+
"u8",
|
|
1050
|
+
32
|
|
1051
|
+
]
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
]
|
|
1146
1055
|
},
|
|
1147
1056
|
{
|
|
1148
|
-
name: "
|
|
1057
|
+
name: "drift_initialize_user_stats",
|
|
1149
1058
|
docs: [
|
|
1150
|
-
"
|
|
1059
|
+
"Drift",
|
|
1060
|
+
"Initializes a drift account owned by vault and creates a subaccount.",
|
|
1151
1061
|
"",
|
|
1152
1062
|
"# Parameters",
|
|
1153
|
-
"- `ctx`: The context for the
|
|
1154
|
-
"- `order_id`: The ID of the order to modify.",
|
|
1155
|
-
"- `modify_order_params`: The parameters to modify the order with.",
|
|
1063
|
+
"- `ctx`: The context for the instruction.",
|
|
1156
1064
|
"",
|
|
1157
1065
|
"# Permission required",
|
|
1158
|
-
"- Permission::
|
|
1066
|
+
"- Permission::DriftInitialize",
|
|
1159
1067
|
"",
|
|
1160
1068
|
"# Integration required",
|
|
1161
1069
|
"- Integration::Drift"
|
|
1162
1070
|
],
|
|
1163
1071
|
discriminator: [
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
],
|
|
1173
|
-
accounts: [
|
|
1072
|
+
133,
|
|
1073
|
+
185,
|
|
1074
|
+
103,
|
|
1075
|
+
162,
|
|
1076
|
+
90,
|
|
1077
|
+
161,
|
|
1078
|
+
78,
|
|
1079
|
+
143
|
|
1080
|
+
],
|
|
1081
|
+
accounts: [
|
|
1174
1082
|
{
|
|
1175
1083
|
name: "glam_state"
|
|
1176
1084
|
},
|
|
@@ -1205,14 +1113,95 @@ var instructions = [
|
|
|
1205
1113
|
address: "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
|
|
1206
1114
|
},
|
|
1207
1115
|
{
|
|
1208
|
-
name: "
|
|
1116
|
+
name: "user_stats",
|
|
1117
|
+
writable: true
|
|
1209
1118
|
},
|
|
1210
1119
|
{
|
|
1211
|
-
name: "
|
|
1120
|
+
name: "state",
|
|
1212
1121
|
writable: true
|
|
1213
1122
|
},
|
|
1214
1123
|
{
|
|
1215
|
-
name: "
|
|
1124
|
+
name: "payer",
|
|
1125
|
+
writable: true,
|
|
1126
|
+
signer: true
|
|
1127
|
+
},
|
|
1128
|
+
{
|
|
1129
|
+
name: "rent",
|
|
1130
|
+
address: "SysvarRent111111111111111111111111111111111"
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
name: "system_program",
|
|
1134
|
+
address: "11111111111111111111111111111111"
|
|
1135
|
+
}
|
|
1136
|
+
],
|
|
1137
|
+
args: []
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
name: "drift_modify_order",
|
|
1141
|
+
docs: [
|
|
1142
|
+
"Modifies an existing drift order.",
|
|
1143
|
+
"",
|
|
1144
|
+
"# Parameters",
|
|
1145
|
+
"- `ctx`: The context for the instruction.",
|
|
1146
|
+
"- `order_id`: The ID of the order to modify.",
|
|
1147
|
+
"- `modify_order_params`: The parameters to modify the order with.",
|
|
1148
|
+
"",
|
|
1149
|
+
"# Permission required",
|
|
1150
|
+
"- Permission::DriftModifyOrder",
|
|
1151
|
+
"",
|
|
1152
|
+
"# Integration required",
|
|
1153
|
+
"- Integration::Drift"
|
|
1154
|
+
],
|
|
1155
|
+
discriminator: [
|
|
1156
|
+
235,
|
|
1157
|
+
245,
|
|
1158
|
+
222,
|
|
1159
|
+
58,
|
|
1160
|
+
245,
|
|
1161
|
+
128,
|
|
1162
|
+
19,
|
|
1163
|
+
202
|
|
1164
|
+
],
|
|
1165
|
+
accounts: [
|
|
1166
|
+
{
|
|
1167
|
+
name: "glam_state"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
name: "glam_vault",
|
|
1171
|
+
pda: {
|
|
1172
|
+
seeds: [
|
|
1173
|
+
{
|
|
1174
|
+
kind: "const",
|
|
1175
|
+
value: [
|
|
1176
|
+
118,
|
|
1177
|
+
97,
|
|
1178
|
+
117,
|
|
1179
|
+
108,
|
|
1180
|
+
116
|
|
1181
|
+
]
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
kind: "account",
|
|
1185
|
+
path: "glam_state"
|
|
1186
|
+
}
|
|
1187
|
+
]
|
|
1188
|
+
}
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
name: "glam_signer",
|
|
1192
|
+
writable: true,
|
|
1193
|
+
signer: true
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
name: "cpi_program",
|
|
1197
|
+
address: "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
|
|
1198
|
+
},
|
|
1199
|
+
{
|
|
1200
|
+
name: "state"
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
name: "user",
|
|
1204
|
+
writable: true
|
|
1216
1205
|
}
|
|
1217
1206
|
],
|
|
1218
1207
|
args: [
|
|
@@ -1238,8 +1227,8 @@ var instructions = [
|
|
|
1238
1227
|
"Places orders on drift.",
|
|
1239
1228
|
"",
|
|
1240
1229
|
"# Parameters",
|
|
1241
|
-
"- `ctx`: The context for the
|
|
1242
|
-
"- `
|
|
1230
|
+
"- `ctx`: The context for the instruction.",
|
|
1231
|
+
"- `params`: A list of orders.",
|
|
1243
1232
|
"",
|
|
1244
1233
|
"# Permissions required",
|
|
1245
1234
|
"- Permission::DriftPlaceOrders",
|
|
@@ -1260,18 +1249,11 @@ var instructions = [
|
|
|
1260
1249
|
],
|
|
1261
1250
|
accounts: [
|
|
1262
1251
|
{
|
|
1263
|
-
name: "
|
|
1264
|
-
},
|
|
1265
|
-
{
|
|
1266
|
-
name: "user",
|
|
1267
|
-
writable: true
|
|
1268
|
-
},
|
|
1269
|
-
{
|
|
1270
|
-
name: "drift_state",
|
|
1271
|
-
writable: true
|
|
1252
|
+
name: "glam_state"
|
|
1272
1253
|
},
|
|
1273
1254
|
{
|
|
1274
|
-
name: "
|
|
1255
|
+
name: "glam_vault",
|
|
1256
|
+
writable: true,
|
|
1275
1257
|
pda: {
|
|
1276
1258
|
seeds: [
|
|
1277
1259
|
{
|
|
@@ -1286,24 +1268,31 @@ var instructions = [
|
|
|
1286
1268
|
},
|
|
1287
1269
|
{
|
|
1288
1270
|
kind: "account",
|
|
1289
|
-
path: "
|
|
1271
|
+
path: "glam_state"
|
|
1290
1272
|
}
|
|
1291
1273
|
]
|
|
1292
1274
|
}
|
|
1293
1275
|
},
|
|
1294
1276
|
{
|
|
1295
|
-
name: "
|
|
1277
|
+
name: "glam_signer",
|
|
1296
1278
|
writable: true,
|
|
1297
1279
|
signer: true
|
|
1298
1280
|
},
|
|
1299
1281
|
{
|
|
1300
|
-
name: "
|
|
1282
|
+
name: "cpi_program",
|
|
1301
1283
|
address: "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
name: "state"
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
name: "user",
|
|
1290
|
+
writable: true
|
|
1302
1291
|
}
|
|
1303
1292
|
],
|
|
1304
1293
|
args: [
|
|
1305
1294
|
{
|
|
1306
|
-
name: "
|
|
1295
|
+
name: "params",
|
|
1307
1296
|
type: {
|
|
1308
1297
|
vec: {
|
|
1309
1298
|
defined: {
|
|
@@ -1320,7 +1309,7 @@ var instructions = [
|
|
|
1320
1309
|
"Updates custom margin ratio.",
|
|
1321
1310
|
"",
|
|
1322
1311
|
"# Parameters",
|
|
1323
|
-
"- `ctx`: The context for the
|
|
1312
|
+
"- `ctx`: The context for the instruction.",
|
|
1324
1313
|
"- `sub_account_id`: Sub account.",
|
|
1325
1314
|
"- `margin_ratio`: Margin ratio.",
|
|
1326
1315
|
"",
|
|
@@ -1342,14 +1331,10 @@ var instructions = [
|
|
|
1342
1331
|
],
|
|
1343
1332
|
accounts: [
|
|
1344
1333
|
{
|
|
1345
|
-
name: "
|
|
1346
|
-
},
|
|
1347
|
-
{
|
|
1348
|
-
name: "user",
|
|
1349
|
-
writable: true
|
|
1334
|
+
name: "glam_state"
|
|
1350
1335
|
},
|
|
1351
1336
|
{
|
|
1352
|
-
name: "
|
|
1337
|
+
name: "glam_vault",
|
|
1353
1338
|
pda: {
|
|
1354
1339
|
seeds: [
|
|
1355
1340
|
{
|
|
@@ -1364,19 +1349,23 @@ var instructions = [
|
|
|
1364
1349
|
},
|
|
1365
1350
|
{
|
|
1366
1351
|
kind: "account",
|
|
1367
|
-
path: "
|
|
1352
|
+
path: "glam_state"
|
|
1368
1353
|
}
|
|
1369
1354
|
]
|
|
1370
1355
|
}
|
|
1371
1356
|
},
|
|
1372
1357
|
{
|
|
1373
|
-
name: "
|
|
1358
|
+
name: "glam_signer",
|
|
1374
1359
|
writable: true,
|
|
1375
1360
|
signer: true
|
|
1376
1361
|
},
|
|
1377
1362
|
{
|
|
1378
|
-
name: "
|
|
1363
|
+
name: "cpi_program",
|
|
1379
1364
|
address: "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
name: "user",
|
|
1368
|
+
writable: true
|
|
1380
1369
|
}
|
|
1381
1370
|
],
|
|
1382
1371
|
args: [
|
|
@@ -1396,7 +1385,7 @@ var instructions = [
|
|
|
1396
1385
|
"Sets a delegate on the specified sub account.",
|
|
1397
1386
|
"",
|
|
1398
1387
|
"# Parameters",
|
|
1399
|
-
"- `ctx`: The context for the
|
|
1388
|
+
"- `ctx`: The context for the instruction.",
|
|
1400
1389
|
"- `sub_account_id`: Sub account.",
|
|
1401
1390
|
"- `delegate`: Delegate's wallet address.",
|
|
1402
1391
|
"",
|
|
@@ -1418,14 +1407,10 @@ var instructions = [
|
|
|
1418
1407
|
],
|
|
1419
1408
|
accounts: [
|
|
1420
1409
|
{
|
|
1421
|
-
name: "
|
|
1422
|
-
},
|
|
1423
|
-
{
|
|
1424
|
-
name: "user",
|
|
1425
|
-
writable: true
|
|
1410
|
+
name: "glam_state"
|
|
1426
1411
|
},
|
|
1427
1412
|
{
|
|
1428
|
-
name: "
|
|
1413
|
+
name: "glam_vault",
|
|
1429
1414
|
pda: {
|
|
1430
1415
|
seeds: [
|
|
1431
1416
|
{
|
|
@@ -1440,19 +1425,23 @@ var instructions = [
|
|
|
1440
1425
|
},
|
|
1441
1426
|
{
|
|
1442
1427
|
kind: "account",
|
|
1443
|
-
path: "
|
|
1428
|
+
path: "glam_state"
|
|
1444
1429
|
}
|
|
1445
1430
|
]
|
|
1446
1431
|
}
|
|
1447
1432
|
},
|
|
1448
1433
|
{
|
|
1449
|
-
name: "
|
|
1434
|
+
name: "glam_signer",
|
|
1450
1435
|
writable: true,
|
|
1451
1436
|
signer: true
|
|
1452
1437
|
},
|
|
1453
1438
|
{
|
|
1454
|
-
name: "
|
|
1439
|
+
name: "cpi_program",
|
|
1455
1440
|
address: "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
name: "user",
|
|
1444
|
+
writable: true
|
|
1456
1445
|
}
|
|
1457
1446
|
],
|
|
1458
1447
|
args: [
|
|
@@ -1472,7 +1461,7 @@ var instructions = [
|
|
|
1472
1461
|
"Enables/Disables margin trading.",
|
|
1473
1462
|
"",
|
|
1474
1463
|
"# Parameters",
|
|
1475
|
-
"- `ctx`: The context for the
|
|
1464
|
+
"- `ctx`: The context for the instruction.",
|
|
1476
1465
|
"- `sub_account_id`: Sub account.",
|
|
1477
1466
|
"- `margin_trading_enabled`: Whether to enable or disable margin trading.",
|
|
1478
1467
|
"",
|
|
@@ -1494,14 +1483,10 @@ var instructions = [
|
|
|
1494
1483
|
],
|
|
1495
1484
|
accounts: [
|
|
1496
1485
|
{
|
|
1497
|
-
name: "
|
|
1498
|
-
},
|
|
1499
|
-
{
|
|
1500
|
-
name: "user",
|
|
1501
|
-
writable: true
|
|
1486
|
+
name: "glam_state"
|
|
1502
1487
|
},
|
|
1503
1488
|
{
|
|
1504
|
-
name: "
|
|
1489
|
+
name: "glam_vault",
|
|
1505
1490
|
pda: {
|
|
1506
1491
|
seeds: [
|
|
1507
1492
|
{
|
|
@@ -1516,19 +1501,23 @@ var instructions = [
|
|
|
1516
1501
|
},
|
|
1517
1502
|
{
|
|
1518
1503
|
kind: "account",
|
|
1519
|
-
path: "
|
|
1504
|
+
path: "glam_state"
|
|
1520
1505
|
}
|
|
1521
1506
|
]
|
|
1522
1507
|
}
|
|
1523
1508
|
},
|
|
1524
1509
|
{
|
|
1525
|
-
name: "
|
|
1510
|
+
name: "glam_signer",
|
|
1526
1511
|
writable: true,
|
|
1527
1512
|
signer: true
|
|
1528
1513
|
},
|
|
1529
1514
|
{
|
|
1530
|
-
name: "
|
|
1515
|
+
name: "cpi_program",
|
|
1531
1516
|
address: "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
name: "user",
|
|
1520
|
+
writable: true
|
|
1532
1521
|
}
|
|
1533
1522
|
],
|
|
1534
1523
|
args: [
|
|
@@ -1548,7 +1537,7 @@ var instructions = [
|
|
|
1548
1537
|
"Withdraws from drift.",
|
|
1549
1538
|
"",
|
|
1550
1539
|
"# Parameters",
|
|
1551
|
-
"- `ctx`: The context for the
|
|
1540
|
+
"- `ctx`: The context for the instruction.",
|
|
1552
1541
|
"- `market_index`: Index of the drift spot market.",
|
|
1553
1542
|
"- `amount`: Amount to withdraw.",
|
|
1554
1543
|
"",
|
|
@@ -1570,25 +1559,11 @@ var instructions = [
|
|
|
1570
1559
|
],
|
|
1571
1560
|
accounts: [
|
|
1572
1561
|
{
|
|
1573
|
-
name: "
|
|
1574
|
-
},
|
|
1575
|
-
{
|
|
1576
|
-
name: "user",
|
|
1577
|
-
writable: true
|
|
1578
|
-
},
|
|
1579
|
-
{
|
|
1580
|
-
name: "user_stats",
|
|
1581
|
-
writable: true
|
|
1582
|
-
},
|
|
1583
|
-
{
|
|
1584
|
-
name: "drift_state",
|
|
1585
|
-
writable: true
|
|
1586
|
-
},
|
|
1587
|
-
{
|
|
1588
|
-
name: "drift_signer"
|
|
1562
|
+
name: "glam_state"
|
|
1589
1563
|
},
|
|
1590
1564
|
{
|
|
1591
|
-
name: "
|
|
1565
|
+
name: "glam_vault",
|
|
1566
|
+
writable: true,
|
|
1592
1567
|
pda: {
|
|
1593
1568
|
seeds: [
|
|
1594
1569
|
{
|
|
@@ -1603,31 +1578,44 @@ var instructions = [
|
|
|
1603
1578
|
},
|
|
1604
1579
|
{
|
|
1605
1580
|
kind: "account",
|
|
1606
|
-
path: "
|
|
1581
|
+
path: "glam_state"
|
|
1607
1582
|
}
|
|
1608
1583
|
]
|
|
1609
1584
|
}
|
|
1610
1585
|
},
|
|
1611
1586
|
{
|
|
1612
|
-
name: "
|
|
1587
|
+
name: "glam_signer",
|
|
1588
|
+
writable: true,
|
|
1589
|
+
signer: true
|
|
1590
|
+
},
|
|
1591
|
+
{
|
|
1592
|
+
name: "cpi_program",
|
|
1593
|
+
address: "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
name: "state"
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
name: "user",
|
|
1613
1600
|
writable: true
|
|
1614
1601
|
},
|
|
1615
1602
|
{
|
|
1616
|
-
name: "
|
|
1603
|
+
name: "user_stats",
|
|
1617
1604
|
writable: true
|
|
1618
1605
|
},
|
|
1619
1606
|
{
|
|
1620
|
-
name: "
|
|
1621
|
-
writable: true
|
|
1622
|
-
signer: true
|
|
1607
|
+
name: "spot_market_vault",
|
|
1608
|
+
writable: true
|
|
1623
1609
|
},
|
|
1624
1610
|
{
|
|
1625
|
-
name: "
|
|
1626
|
-
address: "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
|
|
1611
|
+
name: "drift_signer"
|
|
1627
1612
|
},
|
|
1628
1613
|
{
|
|
1629
|
-
name: "
|
|
1630
|
-
|
|
1614
|
+
name: "user_token_account",
|
|
1615
|
+
writable: true
|
|
1616
|
+
},
|
|
1617
|
+
{
|
|
1618
|
+
name: "token_program"
|
|
1631
1619
|
}
|
|
1632
1620
|
],
|
|
1633
1621
|
args: [
|
|
@@ -1638,6 +1626,10 @@ var instructions = [
|
|
|
1638
1626
|
{
|
|
1639
1627
|
name: "amount",
|
|
1640
1628
|
type: "u64"
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
name: "reduce_only",
|
|
1632
|
+
type: "bool"
|
|
1641
1633
|
}
|
|
1642
1634
|
]
|
|
1643
1635
|
},
|
|
@@ -1647,7 +1639,7 @@ var instructions = [
|
|
|
1647
1639
|
"Forcefully transfers a specified amount of tokens from one account to another.",
|
|
1648
1640
|
"",
|
|
1649
1641
|
"# Parameters",
|
|
1650
|
-
"- `ctx`: The context for the
|
|
1642
|
+
"- `ctx`: The context for the instruction.",
|
|
1651
1643
|
"- `mint_id`: The id of the mint to transfer tokens for.",
|
|
1652
1644
|
"- `amount`: The amount of tokens to transfer.",
|
|
1653
1645
|
"",
|
|
@@ -1818,33 +1810,39 @@ var instructions = [
|
|
|
1818
1810
|
]
|
|
1819
1811
|
},
|
|
1820
1812
|
{
|
|
1821
|
-
name: "
|
|
1813
|
+
name: "initialize_and_delegate_stake",
|
|
1822
1814
|
docs: [
|
|
1823
|
-
"
|
|
1815
|
+
"Initializes a stake account and delegates it to a validator.",
|
|
1824
1816
|
"",
|
|
1825
1817
|
"# Parameters",
|
|
1826
|
-
"- `ctx`: The context for the
|
|
1827
|
-
"- `
|
|
1818
|
+
"- `ctx`: The context for the instruction.",
|
|
1819
|
+
"- `lamports`: The amount of SOL to initialize the stake account with.",
|
|
1828
1820
|
"",
|
|
1829
1821
|
"# Permission required",
|
|
1830
|
-
"- Permission::
|
|
1822
|
+
"- Permission::Stake",
|
|
1831
1823
|
"",
|
|
1832
1824
|
"# Integration required",
|
|
1833
|
-
"- Integration::
|
|
1825
|
+
"- Integration::NativeStaking"
|
|
1834
1826
|
],
|
|
1835
1827
|
discriminator: [
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1828
|
+
71,
|
|
1829
|
+
101,
|
|
1830
|
+
230,
|
|
1831
|
+
157,
|
|
1832
|
+
50,
|
|
1833
|
+
23,
|
|
1834
|
+
47,
|
|
1835
|
+
1
|
|
1844
1836
|
],
|
|
1845
1837
|
accounts: [
|
|
1846
1838
|
{
|
|
1847
|
-
name: "
|
|
1839
|
+
name: "signer",
|
|
1840
|
+
writable: true,
|
|
1841
|
+
signer: true
|
|
1842
|
+
},
|
|
1843
|
+
{
|
|
1844
|
+
name: "state",
|
|
1845
|
+
writable: true
|
|
1848
1846
|
},
|
|
1849
1847
|
{
|
|
1850
1848
|
name: "vault",
|
|
@@ -1869,176 +1867,8 @@ var instructions = [
|
|
|
1869
1867
|
}
|
|
1870
1868
|
},
|
|
1871
1869
|
{
|
|
1872
|
-
name: "
|
|
1873
|
-
writable: true
|
|
1874
|
-
signer: true
|
|
1875
|
-
},
|
|
1876
|
-
{
|
|
1877
|
-
name: "locker",
|
|
1878
|
-
writable: true
|
|
1879
|
-
},
|
|
1880
|
-
{
|
|
1881
|
-
name: "escrow_jup_ata",
|
|
1882
|
-
writable: true
|
|
1883
|
-
},
|
|
1884
|
-
{
|
|
1885
|
-
name: "vault_jup_ata",
|
|
1886
|
-
writable: true
|
|
1887
|
-
},
|
|
1888
|
-
{
|
|
1889
|
-
name: "escrow",
|
|
1890
|
-
writable: true
|
|
1891
|
-
},
|
|
1892
|
-
{
|
|
1893
|
-
name: "locked_voter_program",
|
|
1894
|
-
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
1895
|
-
},
|
|
1896
|
-
{
|
|
1897
|
-
name: "token_program",
|
|
1898
|
-
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
1899
|
-
}
|
|
1900
|
-
],
|
|
1901
|
-
args: [
|
|
1902
|
-
{
|
|
1903
|
-
name: "amount",
|
|
1904
|
-
type: "u64"
|
|
1905
|
-
}
|
|
1906
|
-
]
|
|
1907
|
-
},
|
|
1908
|
-
{
|
|
1909
|
-
name: "init_locked_voter_escrow",
|
|
1910
|
-
docs: [
|
|
1911
|
-
"Initializes a locked voter escrow.",
|
|
1912
|
-
"",
|
|
1913
|
-
"# Parameters",
|
|
1914
|
-
"- `ctx`: The context for the transaction.",
|
|
1915
|
-
"",
|
|
1916
|
-
"# Permission required",
|
|
1917
|
-
"- Permission::StakeJup",
|
|
1918
|
-
"",
|
|
1919
|
-
"# Integration required",
|
|
1920
|
-
"- Integration::JupiterVote"
|
|
1921
|
-
],
|
|
1922
|
-
discriminator: [
|
|
1923
|
-
148,
|
|
1924
|
-
74,
|
|
1925
|
-
247,
|
|
1926
|
-
66,
|
|
1927
|
-
206,
|
|
1928
|
-
51,
|
|
1929
|
-
119,
|
|
1930
|
-
243
|
|
1931
|
-
],
|
|
1932
|
-
accounts: [
|
|
1933
|
-
{
|
|
1934
|
-
name: "state"
|
|
1935
|
-
},
|
|
1936
|
-
{
|
|
1937
|
-
name: "vault",
|
|
1938
|
-
writable: true,
|
|
1939
|
-
pda: {
|
|
1940
|
-
seeds: [
|
|
1941
|
-
{
|
|
1942
|
-
kind: "const",
|
|
1943
|
-
value: [
|
|
1944
|
-
118,
|
|
1945
|
-
97,
|
|
1946
|
-
117,
|
|
1947
|
-
108,
|
|
1948
|
-
116
|
|
1949
|
-
]
|
|
1950
|
-
},
|
|
1951
|
-
{
|
|
1952
|
-
kind: "account",
|
|
1953
|
-
path: "state"
|
|
1954
|
-
}
|
|
1955
|
-
]
|
|
1956
|
-
}
|
|
1957
|
-
},
|
|
1958
|
-
{
|
|
1959
|
-
name: "signer",
|
|
1960
|
-
writable: true,
|
|
1961
|
-
signer: true
|
|
1962
|
-
},
|
|
1963
|
-
{
|
|
1964
|
-
name: "locker",
|
|
1965
|
-
writable: true
|
|
1966
|
-
},
|
|
1967
|
-
{
|
|
1968
|
-
name: "escrow",
|
|
1969
|
-
writable: true
|
|
1970
|
-
},
|
|
1971
|
-
{
|
|
1972
|
-
name: "locked_voter_program",
|
|
1973
|
-
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
1974
|
-
},
|
|
1975
|
-
{
|
|
1976
|
-
name: "system_program",
|
|
1977
|
-
address: "11111111111111111111111111111111"
|
|
1978
|
-
}
|
|
1979
|
-
],
|
|
1980
|
-
args: []
|
|
1981
|
-
},
|
|
1982
|
-
{
|
|
1983
|
-
name: "initialize_and_delegate_stake",
|
|
1984
|
-
docs: [
|
|
1985
|
-
"Initializes a stake account and delegates it to a validator.",
|
|
1986
|
-
"",
|
|
1987
|
-
"# Parameters",
|
|
1988
|
-
"- `ctx`: The context for the transaction.",
|
|
1989
|
-
"- `lamports`: The amount of SOL to initialize the stake account with.",
|
|
1990
|
-
"",
|
|
1991
|
-
"# Permission required",
|
|
1992
|
-
"- Permission::Stake",
|
|
1993
|
-
"",
|
|
1994
|
-
"# Integration required",
|
|
1995
|
-
"- Integration::NativeStaking"
|
|
1996
|
-
],
|
|
1997
|
-
discriminator: [
|
|
1998
|
-
71,
|
|
1999
|
-
101,
|
|
2000
|
-
230,
|
|
2001
|
-
157,
|
|
2002
|
-
50,
|
|
2003
|
-
23,
|
|
2004
|
-
47,
|
|
2005
|
-
1
|
|
2006
|
-
],
|
|
2007
|
-
accounts: [
|
|
2008
|
-
{
|
|
2009
|
-
name: "signer",
|
|
2010
|
-
writable: true,
|
|
2011
|
-
signer: true
|
|
2012
|
-
},
|
|
2013
|
-
{
|
|
2014
|
-
name: "state",
|
|
2015
|
-
writable: true
|
|
2016
|
-
},
|
|
2017
|
-
{
|
|
2018
|
-
name: "vault",
|
|
2019
|
-
writable: true,
|
|
2020
|
-
pda: {
|
|
2021
|
-
seeds: [
|
|
2022
|
-
{
|
|
2023
|
-
kind: "const",
|
|
2024
|
-
value: [
|
|
2025
|
-
118,
|
|
2026
|
-
97,
|
|
2027
|
-
117,
|
|
2028
|
-
108,
|
|
2029
|
-
116
|
|
2030
|
-
]
|
|
2031
|
-
},
|
|
2032
|
-
{
|
|
2033
|
-
kind: "account",
|
|
2034
|
-
path: "state"
|
|
2035
|
-
}
|
|
2036
|
-
]
|
|
2037
|
-
}
|
|
2038
|
-
},
|
|
2039
|
-
{
|
|
2040
|
-
name: "vault_stake_account",
|
|
2041
|
-
writable: true
|
|
1870
|
+
name: "vault_stake_account",
|
|
1871
|
+
writable: true
|
|
2042
1872
|
},
|
|
2043
1873
|
{
|
|
2044
1874
|
name: "vote"
|
|
@@ -2081,7 +1911,7 @@ var instructions = [
|
|
|
2081
1911
|
"Initializes a state account from the provided StateModel instance.",
|
|
2082
1912
|
"",
|
|
2083
1913
|
"# Parameters",
|
|
2084
|
-
"- `ctx`: The context for the
|
|
1914
|
+
"- `ctx`: The context for the instruction.",
|
|
2085
1915
|
"- `state`: An instance of `StateModel` containing the details of the state to be initialized.",
|
|
2086
1916
|
"",
|
|
2087
1917
|
"# Permission required",
|
|
@@ -2194,42 +2024,35 @@ var instructions = [
|
|
|
2194
2024
|
]
|
|
2195
2025
|
},
|
|
2196
2026
|
{
|
|
2197
|
-
name: "
|
|
2027
|
+
name: "jupiter_gov_new_vote",
|
|
2198
2028
|
docs: [
|
|
2199
|
-
"
|
|
2029
|
+
"Creates a new vote.",
|
|
2200
2030
|
"",
|
|
2201
2031
|
"# Parameters",
|
|
2202
|
-
"- `ctx`: The context for the
|
|
2203
|
-
"- `amount`: The amount of input asset to swap.",
|
|
2204
|
-
"- `data`: The serialized Jupiter route data containing swap instructions and parameters.",
|
|
2032
|
+
"- `ctx`: The context for the instruction.",
|
|
2205
2033
|
"",
|
|
2206
2034
|
"# Permission required",
|
|
2207
|
-
"-
|
|
2208
|
-
"- Permission::JupiterSwapAny: no restrictions.",
|
|
2209
|
-
"- Permission::JupiterSwapAllowlisted: input and output are in the assets allowlist.",
|
|
2210
|
-
"- Permission::JupiterSwapLst: input and output assets are both LST.",
|
|
2035
|
+
"- Permission::VoteOnProposal",
|
|
2211
2036
|
"",
|
|
2212
2037
|
"# Integration required",
|
|
2213
|
-
"- Integration::
|
|
2038
|
+
"- Integration::JupiterVote"
|
|
2214
2039
|
],
|
|
2215
2040
|
discriminator: [
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2041
|
+
235,
|
|
2042
|
+
179,
|
|
2043
|
+
170,
|
|
2044
|
+
64,
|
|
2045
|
+
64,
|
|
2046
|
+
57,
|
|
2047
|
+
17,
|
|
2048
|
+
69
|
|
2224
2049
|
],
|
|
2225
2050
|
accounts: [
|
|
2226
2051
|
{
|
|
2227
|
-
name: "
|
|
2228
|
-
writable: true
|
|
2052
|
+
name: "glam_state"
|
|
2229
2053
|
},
|
|
2230
2054
|
{
|
|
2231
|
-
name: "
|
|
2232
|
-
writable: true,
|
|
2055
|
+
name: "glam_vault",
|
|
2233
2056
|
pda: {
|
|
2234
2057
|
seeds: [
|
|
2235
2058
|
{
|
|
@@ -2244,75 +2067,204 @@ var instructions = [
|
|
|
2244
2067
|
},
|
|
2245
2068
|
{
|
|
2246
2069
|
kind: "account",
|
|
2247
|
-
path: "
|
|
2070
|
+
path: "glam_state"
|
|
2248
2071
|
}
|
|
2249
2072
|
]
|
|
2250
2073
|
}
|
|
2251
2074
|
},
|
|
2252
2075
|
{
|
|
2253
|
-
name: "
|
|
2076
|
+
name: "glam_signer",
|
|
2254
2077
|
writable: true,
|
|
2255
|
-
|
|
2256
|
-
seeds: [
|
|
2257
|
-
{
|
|
2258
|
-
kind: "account",
|
|
2259
|
-
path: "vault"
|
|
2260
|
-
},
|
|
2261
|
-
{
|
|
2262
|
-
kind: "account",
|
|
2263
|
-
path: "input_token_program"
|
|
2264
|
-
},
|
|
2265
|
-
{
|
|
2266
|
-
kind: "account",
|
|
2267
|
-
path: "input_mint"
|
|
2268
|
-
}
|
|
2269
|
-
],
|
|
2270
|
-
program: {
|
|
2271
|
-
kind: "const",
|
|
2272
|
-
value: [
|
|
2273
|
-
140,
|
|
2274
|
-
151,
|
|
2275
|
-
37,
|
|
2276
|
-
143,
|
|
2277
|
-
78,
|
|
2278
|
-
36,
|
|
2279
|
-
137,
|
|
2280
|
-
241,
|
|
2281
|
-
187,
|
|
2282
|
-
61,
|
|
2283
|
-
16,
|
|
2284
|
-
41,
|
|
2285
|
-
20,
|
|
2286
|
-
142,
|
|
2287
|
-
13,
|
|
2288
|
-
131,
|
|
2289
|
-
11,
|
|
2290
|
-
90,
|
|
2291
|
-
19,
|
|
2292
|
-
153,
|
|
2293
|
-
218,
|
|
2294
|
-
255,
|
|
2295
|
-
16,
|
|
2296
|
-
132,
|
|
2297
|
-
4,
|
|
2298
|
-
142,
|
|
2299
|
-
123,
|
|
2300
|
-
216,
|
|
2301
|
-
219,
|
|
2302
|
-
233,
|
|
2303
|
-
248,
|
|
2304
|
-
89
|
|
2305
|
-
]
|
|
2306
|
-
}
|
|
2307
|
-
}
|
|
2078
|
+
signer: true
|
|
2308
2079
|
},
|
|
2309
2080
|
{
|
|
2310
|
-
name: "
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2081
|
+
name: "cpi_program",
|
|
2082
|
+
address: "GovaE4iu227srtG2s3tZzB4RmWBzw8sTwrCLZz7kN7rY"
|
|
2083
|
+
},
|
|
2084
|
+
{
|
|
2085
|
+
name: "proposal"
|
|
2086
|
+
},
|
|
2087
|
+
{
|
|
2088
|
+
name: "vote",
|
|
2089
|
+
writable: true
|
|
2090
|
+
},
|
|
2091
|
+
{
|
|
2092
|
+
name: "payer",
|
|
2093
|
+
writable: true,
|
|
2094
|
+
signer: true
|
|
2095
|
+
},
|
|
2096
|
+
{
|
|
2097
|
+
name: "system_program",
|
|
2098
|
+
address: "11111111111111111111111111111111"
|
|
2099
|
+
}
|
|
2100
|
+
],
|
|
2101
|
+
args: [
|
|
2102
|
+
{
|
|
2103
|
+
name: "voter",
|
|
2104
|
+
type: "pubkey"
|
|
2105
|
+
}
|
|
2106
|
+
]
|
|
2107
|
+
},
|
|
2108
|
+
{
|
|
2109
|
+
name: "jupiter_set_max_swap_slippage",
|
|
2110
|
+
docs: [
|
|
2111
|
+
"Sets the max swap slippage.",
|
|
2112
|
+
"",
|
|
2113
|
+
"# Parameters",
|
|
2114
|
+
"- `ctx`: The context for the instruction.",
|
|
2115
|
+
"- `slippage`: The maximum allowed slippage in basis points.",
|
|
2116
|
+
"",
|
|
2117
|
+
"# Permission required",
|
|
2118
|
+
"- Owner only, delegates not allowed"
|
|
2119
|
+
],
|
|
2120
|
+
discriminator: [
|
|
2121
|
+
110,
|
|
2122
|
+
79,
|
|
2123
|
+
13,
|
|
2124
|
+
71,
|
|
2125
|
+
208,
|
|
2126
|
+
111,
|
|
2127
|
+
56,
|
|
2128
|
+
66
|
|
2129
|
+
],
|
|
2130
|
+
accounts: [
|
|
2131
|
+
{
|
|
2132
|
+
name: "state",
|
|
2133
|
+
writable: true
|
|
2134
|
+
},
|
|
2135
|
+
{
|
|
2136
|
+
name: "signer",
|
|
2137
|
+
writable: true,
|
|
2138
|
+
signer: true
|
|
2139
|
+
}
|
|
2140
|
+
],
|
|
2141
|
+
args: [
|
|
2142
|
+
{
|
|
2143
|
+
name: "slippage",
|
|
2144
|
+
type: "u64"
|
|
2145
|
+
}
|
|
2146
|
+
]
|
|
2147
|
+
},
|
|
2148
|
+
{
|
|
2149
|
+
name: "jupiter_swap",
|
|
2150
|
+
docs: [
|
|
2151
|
+
"Swaps assets using Jupiter.",
|
|
2152
|
+
"",
|
|
2153
|
+
"# Parameters",
|
|
2154
|
+
"- `ctx`: The context for the instruction.",
|
|
2155
|
+
"- `amount`: The amount of input asset to swap.",
|
|
2156
|
+
"- `data`: The serialized Jupiter route data containing swap instructions and parameters.",
|
|
2157
|
+
"",
|
|
2158
|
+
"# Permission required",
|
|
2159
|
+
"- Any of",
|
|
2160
|
+
"- Permission::JupiterSwapAny: no restrictions.",
|
|
2161
|
+
"- Permission::JupiterSwapAllowlisted: input and output are in the assets allowlist.",
|
|
2162
|
+
"- Permission::JupiterSwapLst: input and output assets are both LST.",
|
|
2163
|
+
"",
|
|
2164
|
+
"# Integration required",
|
|
2165
|
+
"- Integration::JupiterSwap"
|
|
2166
|
+
],
|
|
2167
|
+
discriminator: [
|
|
2168
|
+
116,
|
|
2169
|
+
207,
|
|
2170
|
+
0,
|
|
2171
|
+
196,
|
|
2172
|
+
252,
|
|
2173
|
+
120,
|
|
2174
|
+
243,
|
|
2175
|
+
18
|
|
2176
|
+
],
|
|
2177
|
+
accounts: [
|
|
2178
|
+
{
|
|
2179
|
+
name: "state",
|
|
2180
|
+
writable: true
|
|
2181
|
+
},
|
|
2182
|
+
{
|
|
2183
|
+
name: "vault",
|
|
2184
|
+
writable: true,
|
|
2185
|
+
pda: {
|
|
2186
|
+
seeds: [
|
|
2187
|
+
{
|
|
2188
|
+
kind: "const",
|
|
2189
|
+
value: [
|
|
2190
|
+
118,
|
|
2191
|
+
97,
|
|
2192
|
+
117,
|
|
2193
|
+
108,
|
|
2194
|
+
116
|
|
2195
|
+
]
|
|
2196
|
+
},
|
|
2197
|
+
{
|
|
2198
|
+
kind: "account",
|
|
2199
|
+
path: "state"
|
|
2200
|
+
}
|
|
2201
|
+
]
|
|
2202
|
+
}
|
|
2203
|
+
},
|
|
2204
|
+
{
|
|
2205
|
+
name: "input_vault_ata",
|
|
2206
|
+
writable: true,
|
|
2207
|
+
pda: {
|
|
2208
|
+
seeds: [
|
|
2209
|
+
{
|
|
2210
|
+
kind: "account",
|
|
2211
|
+
path: "vault"
|
|
2212
|
+
},
|
|
2213
|
+
{
|
|
2214
|
+
kind: "account",
|
|
2215
|
+
path: "input_token_program"
|
|
2216
|
+
},
|
|
2217
|
+
{
|
|
2218
|
+
kind: "account",
|
|
2219
|
+
path: "input_mint"
|
|
2220
|
+
}
|
|
2221
|
+
],
|
|
2222
|
+
program: {
|
|
2223
|
+
kind: "const",
|
|
2224
|
+
value: [
|
|
2225
|
+
140,
|
|
2226
|
+
151,
|
|
2227
|
+
37,
|
|
2228
|
+
143,
|
|
2229
|
+
78,
|
|
2230
|
+
36,
|
|
2231
|
+
137,
|
|
2232
|
+
241,
|
|
2233
|
+
187,
|
|
2234
|
+
61,
|
|
2235
|
+
16,
|
|
2236
|
+
41,
|
|
2237
|
+
20,
|
|
2238
|
+
142,
|
|
2239
|
+
13,
|
|
2240
|
+
131,
|
|
2241
|
+
11,
|
|
2242
|
+
90,
|
|
2243
|
+
19,
|
|
2244
|
+
153,
|
|
2245
|
+
218,
|
|
2246
|
+
255,
|
|
2247
|
+
16,
|
|
2248
|
+
132,
|
|
2249
|
+
4,
|
|
2250
|
+
142,
|
|
2251
|
+
123,
|
|
2252
|
+
216,
|
|
2253
|
+
219,
|
|
2254
|
+
233,
|
|
2255
|
+
248,
|
|
2256
|
+
89
|
|
2257
|
+
]
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
},
|
|
2261
|
+
{
|
|
2262
|
+
name: "output_vault_ata",
|
|
2263
|
+
writable: true,
|
|
2264
|
+
pda: {
|
|
2265
|
+
seeds: [
|
|
2266
|
+
{
|
|
2267
|
+
kind: "account",
|
|
2316
2268
|
path: "vault"
|
|
2317
2269
|
},
|
|
2318
2270
|
{
|
|
@@ -2391,22 +2343,769 @@ var instructions = [
|
|
|
2391
2343
|
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
2392
2344
|
},
|
|
2393
2345
|
{
|
|
2394
|
-
name: "input_token_program"
|
|
2346
|
+
name: "input_token_program"
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
name: "output_token_program"
|
|
2350
|
+
}
|
|
2351
|
+
],
|
|
2352
|
+
args: [
|
|
2353
|
+
{
|
|
2354
|
+
name: "amount",
|
|
2355
|
+
type: "u64"
|
|
2356
|
+
},
|
|
2357
|
+
{
|
|
2358
|
+
name: "data",
|
|
2359
|
+
type: "bytes"
|
|
2360
|
+
}
|
|
2361
|
+
]
|
|
2362
|
+
},
|
|
2363
|
+
{
|
|
2364
|
+
name: "jupiter_vote_cast_vote",
|
|
2365
|
+
docs: [
|
|
2366
|
+
"Casts a vote.",
|
|
2367
|
+
"",
|
|
2368
|
+
"# Parameters",
|
|
2369
|
+
"- `ctx`: The context for the instruction.",
|
|
2370
|
+
"- `side`: The side to vote for.",
|
|
2371
|
+
"",
|
|
2372
|
+
"# Permission required",
|
|
2373
|
+
"- Permission::VoteOnProposal",
|
|
2374
|
+
"",
|
|
2375
|
+
"# Integration required",
|
|
2376
|
+
"- Integration::JupiterVote"
|
|
2377
|
+
],
|
|
2378
|
+
discriminator: [
|
|
2379
|
+
11,
|
|
2380
|
+
197,
|
|
2381
|
+
234,
|
|
2382
|
+
57,
|
|
2383
|
+
164,
|
|
2384
|
+
74,
|
|
2385
|
+
181,
|
|
2386
|
+
239
|
|
2387
|
+
],
|
|
2388
|
+
accounts: [
|
|
2389
|
+
{
|
|
2390
|
+
name: "glam_state"
|
|
2391
|
+
},
|
|
2392
|
+
{
|
|
2393
|
+
name: "glam_vault",
|
|
2394
|
+
pda: {
|
|
2395
|
+
seeds: [
|
|
2396
|
+
{
|
|
2397
|
+
kind: "const",
|
|
2398
|
+
value: [
|
|
2399
|
+
118,
|
|
2400
|
+
97,
|
|
2401
|
+
117,
|
|
2402
|
+
108,
|
|
2403
|
+
116
|
|
2404
|
+
]
|
|
2405
|
+
},
|
|
2406
|
+
{
|
|
2407
|
+
kind: "account",
|
|
2408
|
+
path: "glam_state"
|
|
2409
|
+
}
|
|
2410
|
+
]
|
|
2411
|
+
}
|
|
2412
|
+
},
|
|
2413
|
+
{
|
|
2414
|
+
name: "glam_signer",
|
|
2415
|
+
writable: true,
|
|
2416
|
+
signer: true
|
|
2417
|
+
},
|
|
2418
|
+
{
|
|
2419
|
+
name: "cpi_program",
|
|
2420
|
+
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
name: "locker"
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
name: "escrow"
|
|
2427
|
+
},
|
|
2428
|
+
{
|
|
2429
|
+
name: "proposal",
|
|
2430
|
+
writable: true
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
name: "vote",
|
|
2434
|
+
writable: true
|
|
2435
|
+
},
|
|
2436
|
+
{
|
|
2437
|
+
name: "governor"
|
|
2438
|
+
},
|
|
2439
|
+
{
|
|
2440
|
+
name: "govern_program"
|
|
2441
|
+
}
|
|
2442
|
+
],
|
|
2443
|
+
args: [
|
|
2444
|
+
{
|
|
2445
|
+
name: "side",
|
|
2446
|
+
type: "u8"
|
|
2447
|
+
}
|
|
2448
|
+
]
|
|
2449
|
+
},
|
|
2450
|
+
{
|
|
2451
|
+
name: "jupiter_vote_cast_vote_checked",
|
|
2452
|
+
docs: [
|
|
2453
|
+
"Casts a vote, only if expected_side is already recorded.",
|
|
2454
|
+
"",
|
|
2455
|
+
"# Parameters",
|
|
2456
|
+
"- `ctx`: The context for the instruction.",
|
|
2457
|
+
"- `side`: The side to vote for.",
|
|
2458
|
+
"- `expected_side`: The expected side to check in the Vote account.",
|
|
2459
|
+
"",
|
|
2460
|
+
"# Permission required",
|
|
2461
|
+
"- Permission::VoteOnProposal",
|
|
2462
|
+
"",
|
|
2463
|
+
"# Integration required",
|
|
2464
|
+
"- Integration::JupiterVote"
|
|
2465
|
+
],
|
|
2466
|
+
discriminator: [
|
|
2467
|
+
247,
|
|
2468
|
+
3,
|
|
2469
|
+
146,
|
|
2470
|
+
233,
|
|
2471
|
+
35,
|
|
2472
|
+
189,
|
|
2473
|
+
192,
|
|
2474
|
+
187
|
|
2475
|
+
],
|
|
2476
|
+
accounts: [
|
|
2477
|
+
{
|
|
2478
|
+
name: "glam_state"
|
|
2479
|
+
},
|
|
2480
|
+
{
|
|
2481
|
+
name: "glam_vault",
|
|
2482
|
+
pda: {
|
|
2483
|
+
seeds: [
|
|
2484
|
+
{
|
|
2485
|
+
kind: "const",
|
|
2486
|
+
value: [
|
|
2487
|
+
118,
|
|
2488
|
+
97,
|
|
2489
|
+
117,
|
|
2490
|
+
108,
|
|
2491
|
+
116
|
|
2492
|
+
]
|
|
2493
|
+
},
|
|
2494
|
+
{
|
|
2495
|
+
kind: "account",
|
|
2496
|
+
path: "glam_state"
|
|
2497
|
+
}
|
|
2498
|
+
]
|
|
2499
|
+
}
|
|
2500
|
+
},
|
|
2501
|
+
{
|
|
2502
|
+
name: "glam_signer",
|
|
2503
|
+
writable: true,
|
|
2504
|
+
signer: true
|
|
2505
|
+
},
|
|
2506
|
+
{
|
|
2507
|
+
name: "cpi_program",
|
|
2508
|
+
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
name: "locker"
|
|
2512
|
+
},
|
|
2513
|
+
{
|
|
2514
|
+
name: "escrow"
|
|
2515
|
+
},
|
|
2516
|
+
{
|
|
2517
|
+
name: "proposal",
|
|
2518
|
+
writable: true
|
|
2519
|
+
},
|
|
2520
|
+
{
|
|
2521
|
+
name: "vote",
|
|
2522
|
+
writable: true
|
|
2523
|
+
},
|
|
2524
|
+
{
|
|
2525
|
+
name: "governor"
|
|
2526
|
+
},
|
|
2527
|
+
{
|
|
2528
|
+
name: "govern_program"
|
|
2529
|
+
}
|
|
2530
|
+
],
|
|
2531
|
+
args: [
|
|
2532
|
+
{
|
|
2533
|
+
name: "side",
|
|
2534
|
+
type: "u8"
|
|
2535
|
+
},
|
|
2536
|
+
{
|
|
2537
|
+
name: "expected_side",
|
|
2538
|
+
type: "u8"
|
|
2539
|
+
}
|
|
2540
|
+
]
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
name: "jupiter_vote_increase_locked_amount",
|
|
2544
|
+
docs: [
|
|
2545
|
+
"Increases the locked amount (aka stakes JUP).",
|
|
2546
|
+
"",
|
|
2547
|
+
"# Parameters",
|
|
2548
|
+
"- `ctx`: The context for the instruction.",
|
|
2549
|
+
"- `amount`: The amount of JUP to stake.",
|
|
2550
|
+
"",
|
|
2551
|
+
"# Permission required",
|
|
2552
|
+
"- Permission::StakeJup",
|
|
2553
|
+
"",
|
|
2554
|
+
"# Integration required",
|
|
2555
|
+
"- Integration::JupiterVote"
|
|
2556
|
+
],
|
|
2557
|
+
discriminator: [
|
|
2558
|
+
225,
|
|
2559
|
+
38,
|
|
2560
|
+
201,
|
|
2561
|
+
123,
|
|
2562
|
+
148,
|
|
2563
|
+
23,
|
|
2564
|
+
47,
|
|
2565
|
+
128
|
|
2566
|
+
],
|
|
2567
|
+
accounts: [
|
|
2568
|
+
{
|
|
2569
|
+
name: "glam_state"
|
|
2570
|
+
},
|
|
2571
|
+
{
|
|
2572
|
+
name: "glam_vault",
|
|
2573
|
+
writable: true,
|
|
2574
|
+
pda: {
|
|
2575
|
+
seeds: [
|
|
2576
|
+
{
|
|
2577
|
+
kind: "const",
|
|
2578
|
+
value: [
|
|
2579
|
+
118,
|
|
2580
|
+
97,
|
|
2581
|
+
117,
|
|
2582
|
+
108,
|
|
2583
|
+
116
|
|
2584
|
+
]
|
|
2585
|
+
},
|
|
2586
|
+
{
|
|
2587
|
+
kind: "account",
|
|
2588
|
+
path: "glam_state"
|
|
2589
|
+
}
|
|
2590
|
+
]
|
|
2591
|
+
}
|
|
2592
|
+
},
|
|
2593
|
+
{
|
|
2594
|
+
name: "glam_signer",
|
|
2595
|
+
writable: true,
|
|
2596
|
+
signer: true
|
|
2597
|
+
},
|
|
2598
|
+
{
|
|
2599
|
+
name: "cpi_program",
|
|
2600
|
+
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
2601
|
+
},
|
|
2602
|
+
{
|
|
2603
|
+
name: "locker",
|
|
2604
|
+
writable: true
|
|
2605
|
+
},
|
|
2606
|
+
{
|
|
2607
|
+
name: "escrow",
|
|
2608
|
+
writable: true
|
|
2609
|
+
},
|
|
2610
|
+
{
|
|
2611
|
+
name: "escrow_tokens",
|
|
2612
|
+
writable: true
|
|
2613
|
+
},
|
|
2614
|
+
{
|
|
2615
|
+
name: "source_tokens",
|
|
2616
|
+
writable: true
|
|
2617
|
+
},
|
|
2618
|
+
{
|
|
2619
|
+
name: "token_program"
|
|
2620
|
+
}
|
|
2621
|
+
],
|
|
2622
|
+
args: [
|
|
2623
|
+
{
|
|
2624
|
+
name: "amount",
|
|
2625
|
+
type: "u64"
|
|
2626
|
+
}
|
|
2627
|
+
]
|
|
2628
|
+
},
|
|
2629
|
+
{
|
|
2630
|
+
name: "jupiter_vote_merge_partial_unstaking",
|
|
2631
|
+
docs: [
|
|
2632
|
+
"Merges partial unstaking.",
|
|
2633
|
+
"",
|
|
2634
|
+
"# Parameters",
|
|
2635
|
+
"- `ctx`: The context for the instruction.",
|
|
2636
|
+
"",
|
|
2637
|
+
"# Permission required",
|
|
2638
|
+
"- Permission::UnstakeJup",
|
|
2639
|
+
"",
|
|
2640
|
+
"# Integration required",
|
|
2641
|
+
"- Integration::JupiterVote"
|
|
2642
|
+
],
|
|
2643
|
+
discriminator: [
|
|
2644
|
+
93,
|
|
2645
|
+
226,
|
|
2646
|
+
122,
|
|
2647
|
+
120,
|
|
2648
|
+
130,
|
|
2649
|
+
35,
|
|
2650
|
+
189,
|
|
2651
|
+
208
|
|
2652
|
+
],
|
|
2653
|
+
accounts: [
|
|
2654
|
+
{
|
|
2655
|
+
name: "glam_state"
|
|
2656
|
+
},
|
|
2657
|
+
{
|
|
2658
|
+
name: "glam_vault",
|
|
2659
|
+
pda: {
|
|
2660
|
+
seeds: [
|
|
2661
|
+
{
|
|
2662
|
+
kind: "const",
|
|
2663
|
+
value: [
|
|
2664
|
+
118,
|
|
2665
|
+
97,
|
|
2666
|
+
117,
|
|
2667
|
+
108,
|
|
2668
|
+
116
|
|
2669
|
+
]
|
|
2670
|
+
},
|
|
2671
|
+
{
|
|
2672
|
+
kind: "account",
|
|
2673
|
+
path: "glam_state"
|
|
2674
|
+
}
|
|
2675
|
+
]
|
|
2676
|
+
}
|
|
2677
|
+
},
|
|
2678
|
+
{
|
|
2679
|
+
name: "glam_signer",
|
|
2680
|
+
writable: true,
|
|
2681
|
+
signer: true
|
|
2682
|
+
},
|
|
2683
|
+
{
|
|
2684
|
+
name: "cpi_program",
|
|
2685
|
+
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
2686
|
+
},
|
|
2687
|
+
{
|
|
2688
|
+
name: "locker",
|
|
2689
|
+
writable: true
|
|
2690
|
+
},
|
|
2691
|
+
{
|
|
2692
|
+
name: "escrow",
|
|
2693
|
+
writable: true
|
|
2694
|
+
},
|
|
2695
|
+
{
|
|
2696
|
+
name: "partial_unstake",
|
|
2697
|
+
writable: true
|
|
2698
|
+
}
|
|
2699
|
+
],
|
|
2700
|
+
args: []
|
|
2701
|
+
},
|
|
2702
|
+
{
|
|
2703
|
+
name: "jupiter_vote_new_escrow",
|
|
2704
|
+
docs: [
|
|
2705
|
+
"Initializes a locked voter escrow.",
|
|
2706
|
+
"",
|
|
2707
|
+
"# Parameters",
|
|
2708
|
+
"- `ctx`: The context for the instruction.",
|
|
2709
|
+
"",
|
|
2710
|
+
"# Permission required",
|
|
2711
|
+
"- Permission::StakeJup",
|
|
2712
|
+
"",
|
|
2713
|
+
"# Integration required",
|
|
2714
|
+
"- Integration::JupiterVote"
|
|
2715
|
+
],
|
|
2716
|
+
discriminator: [
|
|
2717
|
+
255,
|
|
2718
|
+
87,
|
|
2719
|
+
157,
|
|
2720
|
+
219,
|
|
2721
|
+
61,
|
|
2722
|
+
178,
|
|
2723
|
+
144,
|
|
2724
|
+
159
|
|
2725
|
+
],
|
|
2726
|
+
accounts: [
|
|
2727
|
+
{
|
|
2728
|
+
name: "glam_state"
|
|
2729
|
+
},
|
|
2730
|
+
{
|
|
2731
|
+
name: "glam_vault",
|
|
2732
|
+
pda: {
|
|
2733
|
+
seeds: [
|
|
2734
|
+
{
|
|
2735
|
+
kind: "const",
|
|
2736
|
+
value: [
|
|
2737
|
+
118,
|
|
2738
|
+
97,
|
|
2739
|
+
117,
|
|
2740
|
+
108,
|
|
2741
|
+
116
|
|
2742
|
+
]
|
|
2743
|
+
},
|
|
2744
|
+
{
|
|
2745
|
+
kind: "account",
|
|
2746
|
+
path: "glam_state"
|
|
2747
|
+
}
|
|
2748
|
+
]
|
|
2749
|
+
}
|
|
2750
|
+
},
|
|
2751
|
+
{
|
|
2752
|
+
name: "glam_signer",
|
|
2753
|
+
writable: true,
|
|
2754
|
+
signer: true
|
|
2755
|
+
},
|
|
2756
|
+
{
|
|
2757
|
+
name: "cpi_program",
|
|
2758
|
+
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
2759
|
+
},
|
|
2760
|
+
{
|
|
2761
|
+
name: "locker",
|
|
2762
|
+
writable: true
|
|
2763
|
+
},
|
|
2764
|
+
{
|
|
2765
|
+
name: "escrow",
|
|
2766
|
+
writable: true
|
|
2767
|
+
},
|
|
2768
|
+
{
|
|
2769
|
+
name: "payer",
|
|
2770
|
+
writable: true,
|
|
2771
|
+
signer: true
|
|
2772
|
+
},
|
|
2773
|
+
{
|
|
2774
|
+
name: "system_program",
|
|
2775
|
+
address: "11111111111111111111111111111111"
|
|
2776
|
+
}
|
|
2777
|
+
],
|
|
2778
|
+
args: []
|
|
2779
|
+
},
|
|
2780
|
+
{
|
|
2781
|
+
name: "jupiter_vote_open_partial_unstaking",
|
|
2782
|
+
docs: [
|
|
2783
|
+
"Partially unstakes JUP.",
|
|
2784
|
+
"",
|
|
2785
|
+
"# Parameters",
|
|
2786
|
+
"- `ctx`: The context for the instruction.",
|
|
2787
|
+
"- `amount`: The amount of JUP to partially unstake.",
|
|
2788
|
+
"- `memo`: The memo for the partial unstaking.",
|
|
2789
|
+
"",
|
|
2790
|
+
"# Permission required",
|
|
2791
|
+
"- Permission::UnstakeJup",
|
|
2792
|
+
"",
|
|
2793
|
+
"# Integration required",
|
|
2794
|
+
"- Integration::JupiterVote"
|
|
2795
|
+
],
|
|
2796
|
+
discriminator: [
|
|
2797
|
+
84,
|
|
2798
|
+
7,
|
|
2799
|
+
113,
|
|
2800
|
+
220,
|
|
2801
|
+
212,
|
|
2802
|
+
63,
|
|
2803
|
+
237,
|
|
2804
|
+
218
|
|
2805
|
+
],
|
|
2806
|
+
accounts: [
|
|
2807
|
+
{
|
|
2808
|
+
name: "glam_state"
|
|
2809
|
+
},
|
|
2810
|
+
{
|
|
2811
|
+
name: "glam_vault",
|
|
2812
|
+
pda: {
|
|
2813
|
+
seeds: [
|
|
2814
|
+
{
|
|
2815
|
+
kind: "const",
|
|
2816
|
+
value: [
|
|
2817
|
+
118,
|
|
2818
|
+
97,
|
|
2819
|
+
117,
|
|
2820
|
+
108,
|
|
2821
|
+
116
|
|
2822
|
+
]
|
|
2823
|
+
},
|
|
2824
|
+
{
|
|
2825
|
+
kind: "account",
|
|
2826
|
+
path: "glam_state"
|
|
2827
|
+
}
|
|
2828
|
+
]
|
|
2829
|
+
}
|
|
2830
|
+
},
|
|
2831
|
+
{
|
|
2832
|
+
name: "glam_signer",
|
|
2833
|
+
writable: true,
|
|
2834
|
+
signer: true
|
|
2835
|
+
},
|
|
2836
|
+
{
|
|
2837
|
+
name: "cpi_program",
|
|
2838
|
+
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
2839
|
+
},
|
|
2840
|
+
{
|
|
2841
|
+
name: "locker",
|
|
2842
|
+
writable: true
|
|
2843
|
+
},
|
|
2844
|
+
{
|
|
2845
|
+
name: "escrow",
|
|
2846
|
+
writable: true
|
|
2847
|
+
},
|
|
2848
|
+
{
|
|
2849
|
+
name: "partial_unstake",
|
|
2850
|
+
writable: true,
|
|
2851
|
+
signer: true
|
|
2852
|
+
},
|
|
2853
|
+
{
|
|
2854
|
+
name: "system_program",
|
|
2855
|
+
address: "11111111111111111111111111111111"
|
|
2856
|
+
}
|
|
2857
|
+
],
|
|
2858
|
+
args: [
|
|
2859
|
+
{
|
|
2860
|
+
name: "amount",
|
|
2861
|
+
type: "u64"
|
|
2862
|
+
},
|
|
2863
|
+
{
|
|
2864
|
+
name: "memo",
|
|
2865
|
+
type: "string"
|
|
2866
|
+
}
|
|
2867
|
+
]
|
|
2868
|
+
},
|
|
2869
|
+
{
|
|
2870
|
+
name: "jupiter_vote_toggle_max_lock",
|
|
2871
|
+
docs: [
|
|
2872
|
+
"Toggles max lock.",
|
|
2873
|
+
"",
|
|
2874
|
+
"# Parameters",
|
|
2875
|
+
"- `ctx`: The context for the instruction.",
|
|
2876
|
+
"- `is_max_lock`: true to allow staking, false to initiate full unstaking.",
|
|
2877
|
+
"",
|
|
2878
|
+
"# Permission required",
|
|
2879
|
+
"- Permission::StakeJup (if is_max_lock == true)",
|
|
2880
|
+
"- Permission::UnstakeJup (if is_max_lock == false)",
|
|
2881
|
+
"",
|
|
2882
|
+
"# Integration required",
|
|
2883
|
+
"- Integration::JupiterVote"
|
|
2884
|
+
],
|
|
2885
|
+
discriminator: [
|
|
2886
|
+
204,
|
|
2887
|
+
158,
|
|
2888
|
+
192,
|
|
2889
|
+
21,
|
|
2890
|
+
219,
|
|
2891
|
+
25,
|
|
2892
|
+
154,
|
|
2893
|
+
87
|
|
2894
|
+
],
|
|
2895
|
+
accounts: [
|
|
2896
|
+
{
|
|
2897
|
+
name: "glam_state"
|
|
2898
|
+
},
|
|
2899
|
+
{
|
|
2900
|
+
name: "glam_vault",
|
|
2901
|
+
pda: {
|
|
2902
|
+
seeds: [
|
|
2903
|
+
{
|
|
2904
|
+
kind: "const",
|
|
2905
|
+
value: [
|
|
2906
|
+
118,
|
|
2907
|
+
97,
|
|
2908
|
+
117,
|
|
2909
|
+
108,
|
|
2910
|
+
116
|
|
2911
|
+
]
|
|
2912
|
+
},
|
|
2913
|
+
{
|
|
2914
|
+
kind: "account",
|
|
2915
|
+
path: "glam_state"
|
|
2916
|
+
}
|
|
2917
|
+
]
|
|
2918
|
+
}
|
|
2919
|
+
},
|
|
2920
|
+
{
|
|
2921
|
+
name: "glam_signer",
|
|
2922
|
+
writable: true,
|
|
2923
|
+
signer: true
|
|
2924
|
+
},
|
|
2925
|
+
{
|
|
2926
|
+
name: "cpi_program",
|
|
2927
|
+
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
2928
|
+
},
|
|
2929
|
+
{
|
|
2930
|
+
name: "locker"
|
|
2931
|
+
},
|
|
2932
|
+
{
|
|
2933
|
+
name: "escrow",
|
|
2934
|
+
writable: true
|
|
2935
|
+
}
|
|
2936
|
+
],
|
|
2937
|
+
args: [
|
|
2938
|
+
{
|
|
2939
|
+
name: "is_max_lock",
|
|
2940
|
+
type: "bool"
|
|
2941
|
+
}
|
|
2942
|
+
]
|
|
2943
|
+
},
|
|
2944
|
+
{
|
|
2945
|
+
name: "jupiter_vote_withdraw",
|
|
2946
|
+
docs: [
|
|
2947
|
+
"Withdraws all unstaked JUP.",
|
|
2948
|
+
"",
|
|
2949
|
+
"# Parameters",
|
|
2950
|
+
"- `ctx`: The context for the instruction.",
|
|
2951
|
+
"",
|
|
2952
|
+
"# Permission required",
|
|
2953
|
+
"- Permission::UnstakeJup",
|
|
2954
|
+
"",
|
|
2955
|
+
"# Integration required",
|
|
2956
|
+
"- Integration::JupiterVote"
|
|
2957
|
+
],
|
|
2958
|
+
discriminator: [
|
|
2959
|
+
195,
|
|
2960
|
+
172,
|
|
2961
|
+
184,
|
|
2962
|
+
195,
|
|
2963
|
+
23,
|
|
2964
|
+
178,
|
|
2965
|
+
145,
|
|
2966
|
+
191
|
|
2967
|
+
],
|
|
2968
|
+
accounts: [
|
|
2969
|
+
{
|
|
2970
|
+
name: "glam_state"
|
|
2971
|
+
},
|
|
2972
|
+
{
|
|
2973
|
+
name: "glam_vault",
|
|
2974
|
+
writable: true,
|
|
2975
|
+
pda: {
|
|
2976
|
+
seeds: [
|
|
2977
|
+
{
|
|
2978
|
+
kind: "const",
|
|
2979
|
+
value: [
|
|
2980
|
+
118,
|
|
2981
|
+
97,
|
|
2982
|
+
117,
|
|
2983
|
+
108,
|
|
2984
|
+
116
|
|
2985
|
+
]
|
|
2986
|
+
},
|
|
2987
|
+
{
|
|
2988
|
+
kind: "account",
|
|
2989
|
+
path: "glam_state"
|
|
2990
|
+
}
|
|
2991
|
+
]
|
|
2992
|
+
}
|
|
2993
|
+
},
|
|
2994
|
+
{
|
|
2995
|
+
name: "glam_signer",
|
|
2996
|
+
writable: true,
|
|
2997
|
+
signer: true
|
|
2998
|
+
},
|
|
2999
|
+
{
|
|
3000
|
+
name: "cpi_program",
|
|
3001
|
+
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
3002
|
+
},
|
|
3003
|
+
{
|
|
3004
|
+
name: "locker",
|
|
3005
|
+
writable: true
|
|
3006
|
+
},
|
|
3007
|
+
{
|
|
3008
|
+
name: "escrow",
|
|
3009
|
+
writable: true
|
|
3010
|
+
},
|
|
3011
|
+
{
|
|
3012
|
+
name: "escrow_tokens",
|
|
3013
|
+
writable: true
|
|
3014
|
+
},
|
|
3015
|
+
{
|
|
3016
|
+
name: "destination_tokens",
|
|
3017
|
+
writable: true
|
|
3018
|
+
},
|
|
3019
|
+
{
|
|
3020
|
+
name: "token_program"
|
|
3021
|
+
}
|
|
3022
|
+
],
|
|
3023
|
+
args: []
|
|
3024
|
+
},
|
|
3025
|
+
{
|
|
3026
|
+
name: "jupiter_vote_withdraw_partial_unstaking",
|
|
3027
|
+
docs: [
|
|
3028
|
+
"Withdraws JUP from partial unstaking.",
|
|
3029
|
+
"",
|
|
3030
|
+
"# Parameters",
|
|
3031
|
+
"- `ctx`: The context for the instruction.",
|
|
3032
|
+
"",
|
|
3033
|
+
"# Permission required",
|
|
3034
|
+
"- Permission::UnstakeJup",
|
|
3035
|
+
"",
|
|
3036
|
+
"# Integration required",
|
|
3037
|
+
"- Integration::JupiterVote"
|
|
3038
|
+
],
|
|
3039
|
+
discriminator: [
|
|
3040
|
+
109,
|
|
3041
|
+
98,
|
|
3042
|
+
65,
|
|
3043
|
+
252,
|
|
3044
|
+
184,
|
|
3045
|
+
0,
|
|
3046
|
+
216,
|
|
3047
|
+
240
|
|
3048
|
+
],
|
|
3049
|
+
accounts: [
|
|
3050
|
+
{
|
|
3051
|
+
name: "glam_state"
|
|
3052
|
+
},
|
|
3053
|
+
{
|
|
3054
|
+
name: "glam_vault",
|
|
3055
|
+
writable: true,
|
|
3056
|
+
pda: {
|
|
3057
|
+
seeds: [
|
|
3058
|
+
{
|
|
3059
|
+
kind: "const",
|
|
3060
|
+
value: [
|
|
3061
|
+
118,
|
|
3062
|
+
97,
|
|
3063
|
+
117,
|
|
3064
|
+
108,
|
|
3065
|
+
116
|
|
3066
|
+
]
|
|
3067
|
+
},
|
|
3068
|
+
{
|
|
3069
|
+
kind: "account",
|
|
3070
|
+
path: "glam_state"
|
|
3071
|
+
}
|
|
3072
|
+
]
|
|
3073
|
+
}
|
|
3074
|
+
},
|
|
3075
|
+
{
|
|
3076
|
+
name: "glam_signer",
|
|
3077
|
+
writable: true,
|
|
3078
|
+
signer: true
|
|
3079
|
+
},
|
|
3080
|
+
{
|
|
3081
|
+
name: "cpi_program",
|
|
3082
|
+
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
3083
|
+
},
|
|
3084
|
+
{
|
|
3085
|
+
name: "locker",
|
|
3086
|
+
writable: true
|
|
3087
|
+
},
|
|
3088
|
+
{
|
|
3089
|
+
name: "escrow",
|
|
3090
|
+
writable: true
|
|
3091
|
+
},
|
|
3092
|
+
{
|
|
3093
|
+
name: "partial_unstake",
|
|
3094
|
+
writable: true
|
|
2395
3095
|
},
|
|
2396
3096
|
{
|
|
2397
|
-
name: "
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
args: [
|
|
3097
|
+
name: "escrow_tokens",
|
|
3098
|
+
writable: true
|
|
3099
|
+
},
|
|
2401
3100
|
{
|
|
2402
|
-
name: "
|
|
2403
|
-
|
|
3101
|
+
name: "destination_tokens",
|
|
3102
|
+
writable: true
|
|
2404
3103
|
},
|
|
2405
3104
|
{
|
|
2406
|
-
name: "
|
|
2407
|
-
type: "bytes"
|
|
3105
|
+
name: "token_program"
|
|
2408
3106
|
}
|
|
2409
|
-
]
|
|
3107
|
+
],
|
|
3108
|
+
args: []
|
|
2410
3109
|
},
|
|
2411
3110
|
{
|
|
2412
3111
|
name: "kamino_lending_deposit_reserve_liquidity_and_obligation_collateral",
|
|
@@ -2777,7 +3476,7 @@ var instructions = [
|
|
|
2777
3476
|
"Claims tickets that were unstaked in the previous epoch to get SOL.",
|
|
2778
3477
|
"",
|
|
2779
3478
|
"# Parameters",
|
|
2780
|
-
"- `ctx`: The context for the
|
|
3479
|
+
"- `ctx`: The context for the instruction.",
|
|
2781
3480
|
"",
|
|
2782
3481
|
"# Permission required",
|
|
2783
3482
|
"- Permission::Unstake",
|
|
@@ -2864,7 +3563,7 @@ var instructions = [
|
|
|
2864
3563
|
"Unstakes mSOL to get a ticket that can be claimed at the next epoch.",
|
|
2865
3564
|
"",
|
|
2866
3565
|
"# Parameters",
|
|
2867
|
-
"- `ctx`: The context for the
|
|
3566
|
+
"- `ctx`: The context for the instruction.",
|
|
2868
3567
|
"- `msol_amount`: Amount of mSOL to unstake.",
|
|
2869
3568
|
"",
|
|
2870
3569
|
"# Permission required",
|
|
@@ -2970,7 +3669,7 @@ var instructions = [
|
|
|
2970
3669
|
"Deposits SOL to get mSOL.",
|
|
2971
3670
|
"",
|
|
2972
3671
|
"# Parameters",
|
|
2973
|
-
"- `ctx`: The context for the
|
|
3672
|
+
"- `ctx`: The context for the instruction.",
|
|
2974
3673
|
"- `lamports`: The amount of SOL to deposit.",
|
|
2975
3674
|
"",
|
|
2976
3675
|
"# Permission required",
|
|
@@ -3168,7 +3867,7 @@ var instructions = [
|
|
|
3168
3867
|
"Deposits a stake account to get mSOL.",
|
|
3169
3868
|
"",
|
|
3170
3869
|
"# Parameters",
|
|
3171
|
-
"- `ctx`: The context for the
|
|
3870
|
+
"- `ctx`: The context for the instruction.",
|
|
3172
3871
|
"- `validator_idx`: Validator index.",
|
|
3173
3872
|
"",
|
|
3174
3873
|
"# Permission required",
|
|
@@ -3377,7 +4076,7 @@ var instructions = [
|
|
|
3377
4076
|
"Unstakes mSOL to get SOL immediately.",
|
|
3378
4077
|
"",
|
|
3379
4078
|
"# Parameters",
|
|
3380
|
-
"- `ctx`: The context for the
|
|
4079
|
+
"- `ctx`: The context for the instruction.",
|
|
3381
4080
|
"- `msol_amount`: Amount of mSOL to unstake.",
|
|
3382
4081
|
"",
|
|
3383
4082
|
"# Permission required",
|
|
@@ -3475,91 +4174,13 @@ var instructions = [
|
|
|
3475
4174
|
}
|
|
3476
4175
|
]
|
|
3477
4176
|
},
|
|
3478
|
-
{
|
|
3479
|
-
name: "merge_partial_unstaking",
|
|
3480
|
-
docs: [
|
|
3481
|
-
"Merges partial unstaking.",
|
|
3482
|
-
"",
|
|
3483
|
-
"# Parameters",
|
|
3484
|
-
"- `ctx`: The context for the transaction.",
|
|
3485
|
-
"",
|
|
3486
|
-
"# Permission required",
|
|
3487
|
-
"- Permission::UnstakeJup",
|
|
3488
|
-
"",
|
|
3489
|
-
"# Integration required",
|
|
3490
|
-
"- Integration::JupiterVote"
|
|
3491
|
-
],
|
|
3492
|
-
discriminator: [
|
|
3493
|
-
190,
|
|
3494
|
-
154,
|
|
3495
|
-
163,
|
|
3496
|
-
153,
|
|
3497
|
-
168,
|
|
3498
|
-
115,
|
|
3499
|
-
40,
|
|
3500
|
-
173
|
|
3501
|
-
],
|
|
3502
|
-
accounts: [
|
|
3503
|
-
{
|
|
3504
|
-
name: "state"
|
|
3505
|
-
},
|
|
3506
|
-
{
|
|
3507
|
-
name: "vault",
|
|
3508
|
-
writable: true,
|
|
3509
|
-
pda: {
|
|
3510
|
-
seeds: [
|
|
3511
|
-
{
|
|
3512
|
-
kind: "const",
|
|
3513
|
-
value: [
|
|
3514
|
-
118,
|
|
3515
|
-
97,
|
|
3516
|
-
117,
|
|
3517
|
-
108,
|
|
3518
|
-
116
|
|
3519
|
-
]
|
|
3520
|
-
},
|
|
3521
|
-
{
|
|
3522
|
-
kind: "account",
|
|
3523
|
-
path: "state"
|
|
3524
|
-
}
|
|
3525
|
-
]
|
|
3526
|
-
}
|
|
3527
|
-
},
|
|
3528
|
-
{
|
|
3529
|
-
name: "signer",
|
|
3530
|
-
writable: true,
|
|
3531
|
-
signer: true
|
|
3532
|
-
},
|
|
3533
|
-
{
|
|
3534
|
-
name: "partial_unstake",
|
|
3535
|
-
writable: true
|
|
3536
|
-
},
|
|
3537
|
-
{
|
|
3538
|
-
name: "locker",
|
|
3539
|
-
writable: true
|
|
3540
|
-
},
|
|
3541
|
-
{
|
|
3542
|
-
name: "escrow",
|
|
3543
|
-
writable: true
|
|
3544
|
-
},
|
|
3545
|
-
{
|
|
3546
|
-
name: "locked_voter_program",
|
|
3547
|
-
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
3548
|
-
},
|
|
3549
|
-
{
|
|
3550
|
-
name: "system_program",
|
|
3551
|
-
address: "11111111111111111111111111111111"
|
|
3552
|
-
}
|
|
3553
|
-
],
|
|
3554
|
-
args: []
|
|
3555
|
-
},
|
|
3556
4177
|
{
|
|
3557
4178
|
name: "merge_stake_accounts",
|
|
3558
4179
|
docs: [
|
|
3559
4180
|
"Merges two stake accounts.",
|
|
3560
4181
|
"",
|
|
3561
4182
|
"# Parameters",
|
|
3562
|
-
"- `ctx`: The context for the
|
|
4183
|
+
"- `ctx`: The context for the instruction.",
|
|
3563
4184
|
"",
|
|
3564
4185
|
"# Permission required",
|
|
3565
4186
|
"- Permission::Stake",
|
|
@@ -3642,7 +4263,7 @@ var instructions = [
|
|
|
3642
4263
|
"Mints a specified amount of tokens for the given mint.",
|
|
3643
4264
|
"",
|
|
3644
4265
|
"# Parameters",
|
|
3645
|
-
"- `ctx`: The context for the
|
|
4266
|
+
"- `ctx`: The context for the instruction.",
|
|
3646
4267
|
"- `mint_id`: The id of the mint to mint tokens for.",
|
|
3647
4268
|
"- `amount`: The amount of tokens to mint.",
|
|
3648
4269
|
"",
|
|
@@ -3719,199 +4340,36 @@ var instructions = [
|
|
|
3719
4340
|
153,
|
|
3720
4341
|
218,
|
|
3721
4342
|
255,
|
|
3722
|
-
16,
|
|
3723
|
-
132,
|
|
3724
|
-
4,
|
|
3725
|
-
142,
|
|
3726
|
-
123,
|
|
3727
|
-
216,
|
|
3728
|
-
219,
|
|
3729
|
-
233,
|
|
3730
|
-
248,
|
|
3731
|
-
89
|
|
3732
|
-
]
|
|
3733
|
-
}
|
|
3734
|
-
}
|
|
3735
|
-
},
|
|
3736
|
-
{
|
|
3737
|
-
name: "recipient"
|
|
3738
|
-
},
|
|
3739
|
-
{
|
|
3740
|
-
name: "token_2022_program",
|
|
3741
|
-
address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
|
|
3742
|
-
}
|
|
3743
|
-
],
|
|
3744
|
-
args: [
|
|
3745
|
-
{
|
|
3746
|
-
name: "mint_id",
|
|
3747
|
-
type: "u8"
|
|
3748
|
-
},
|
|
3749
|
-
{
|
|
3750
|
-
name: "amount",
|
|
3751
|
-
type: "u64"
|
|
3752
|
-
}
|
|
3753
|
-
]
|
|
3754
|
-
},
|
|
3755
|
-
{
|
|
3756
|
-
name: "new_vote",
|
|
3757
|
-
docs: [
|
|
3758
|
-
"Creates a new vote.",
|
|
3759
|
-
"",
|
|
3760
|
-
"# Parameters",
|
|
3761
|
-
"- `ctx`: The context for the transaction.",
|
|
3762
|
-
"",
|
|
3763
|
-
"# Permission required",
|
|
3764
|
-
"- Permission::VoteOnProposal",
|
|
3765
|
-
"",
|
|
3766
|
-
"# Integration required",
|
|
3767
|
-
"- Integration::JupiterVote"
|
|
3768
|
-
],
|
|
3769
|
-
discriminator: [
|
|
3770
|
-
163,
|
|
3771
|
-
108,
|
|
3772
|
-
157,
|
|
3773
|
-
189,
|
|
3774
|
-
140,
|
|
3775
|
-
80,
|
|
3776
|
-
13,
|
|
3777
|
-
143
|
|
3778
|
-
],
|
|
3779
|
-
accounts: [
|
|
3780
|
-
{
|
|
3781
|
-
name: "state"
|
|
3782
|
-
},
|
|
3783
|
-
{
|
|
3784
|
-
name: "vault",
|
|
3785
|
-
writable: true,
|
|
3786
|
-
pda: {
|
|
3787
|
-
seeds: [
|
|
3788
|
-
{
|
|
3789
|
-
kind: "const",
|
|
3790
|
-
value: [
|
|
3791
|
-
118,
|
|
3792
|
-
97,
|
|
3793
|
-
117,
|
|
3794
|
-
108,
|
|
3795
|
-
116
|
|
3796
|
-
]
|
|
3797
|
-
},
|
|
3798
|
-
{
|
|
3799
|
-
kind: "account",
|
|
3800
|
-
path: "state"
|
|
3801
|
-
}
|
|
3802
|
-
]
|
|
3803
|
-
}
|
|
3804
|
-
},
|
|
3805
|
-
{
|
|
3806
|
-
name: "signer",
|
|
3807
|
-
writable: true,
|
|
3808
|
-
signer: true
|
|
3809
|
-
},
|
|
3810
|
-
{
|
|
3811
|
-
name: "proposal",
|
|
3812
|
-
writable: true
|
|
3813
|
-
},
|
|
3814
|
-
{
|
|
3815
|
-
name: "vote",
|
|
3816
|
-
writable: true
|
|
3817
|
-
},
|
|
3818
|
-
{
|
|
3819
|
-
name: "governance_program",
|
|
3820
|
-
address: "GovaE4iu227srtG2s3tZzB4RmWBzw8sTwrCLZz7kN7rY"
|
|
3821
|
-
},
|
|
3822
|
-
{
|
|
3823
|
-
name: "system_program",
|
|
3824
|
-
address: "11111111111111111111111111111111"
|
|
3825
|
-
}
|
|
3826
|
-
],
|
|
3827
|
-
args: []
|
|
3828
|
-
},
|
|
3829
|
-
{
|
|
3830
|
-
name: "open_partial_unstaking",
|
|
3831
|
-
docs: [
|
|
3832
|
-
"Partially unstakes JUP.",
|
|
3833
|
-
"",
|
|
3834
|
-
"# Parameters",
|
|
3835
|
-
"- `ctx`: The context for the transaction.",
|
|
3836
|
-
"- `amount`: The amount of JUP to partially unstake.",
|
|
3837
|
-
"- `memo`: The memo for the partial unstaking.",
|
|
3838
|
-
"",
|
|
3839
|
-
"# Permission required",
|
|
3840
|
-
"- Permission::UnstakeJup",
|
|
3841
|
-
"",
|
|
3842
|
-
"# Integration required",
|
|
3843
|
-
"- Integration::JupiterVote"
|
|
3844
|
-
],
|
|
3845
|
-
discriminator: [
|
|
3846
|
-
201,
|
|
3847
|
-
137,
|
|
3848
|
-
207,
|
|
3849
|
-
175,
|
|
3850
|
-
79,
|
|
3851
|
-
95,
|
|
3852
|
-
220,
|
|
3853
|
-
27
|
|
3854
|
-
],
|
|
3855
|
-
accounts: [
|
|
3856
|
-
{
|
|
3857
|
-
name: "state"
|
|
3858
|
-
},
|
|
3859
|
-
{
|
|
3860
|
-
name: "vault",
|
|
3861
|
-
writable: true,
|
|
3862
|
-
pda: {
|
|
3863
|
-
seeds: [
|
|
3864
|
-
{
|
|
3865
|
-
kind: "const",
|
|
3866
|
-
value: [
|
|
3867
|
-
118,
|
|
3868
|
-
97,
|
|
3869
|
-
117,
|
|
3870
|
-
108,
|
|
3871
|
-
116
|
|
3872
|
-
]
|
|
3873
|
-
},
|
|
3874
|
-
{
|
|
3875
|
-
kind: "account",
|
|
3876
|
-
path: "state"
|
|
3877
|
-
}
|
|
3878
|
-
]
|
|
3879
|
-
}
|
|
3880
|
-
},
|
|
3881
|
-
{
|
|
3882
|
-
name: "signer",
|
|
3883
|
-
writable: true,
|
|
3884
|
-
signer: true
|
|
3885
|
-
},
|
|
3886
|
-
{
|
|
3887
|
-
name: "partial_unstake",
|
|
3888
|
-
writable: true
|
|
3889
|
-
},
|
|
3890
|
-
{
|
|
3891
|
-
name: "locker",
|
|
3892
|
-
writable: true
|
|
3893
|
-
},
|
|
3894
|
-
{
|
|
3895
|
-
name: "escrow",
|
|
3896
|
-
writable: true
|
|
4343
|
+
16,
|
|
4344
|
+
132,
|
|
4345
|
+
4,
|
|
4346
|
+
142,
|
|
4347
|
+
123,
|
|
4348
|
+
216,
|
|
4349
|
+
219,
|
|
4350
|
+
233,
|
|
4351
|
+
248,
|
|
4352
|
+
89
|
|
4353
|
+
]
|
|
4354
|
+
}
|
|
4355
|
+
}
|
|
3897
4356
|
},
|
|
3898
4357
|
{
|
|
3899
|
-
name: "
|
|
3900
|
-
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
4358
|
+
name: "recipient"
|
|
3901
4359
|
},
|
|
3902
4360
|
{
|
|
3903
|
-
name: "
|
|
3904
|
-
address: "
|
|
4361
|
+
name: "token_2022_program",
|
|
4362
|
+
address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
|
|
3905
4363
|
}
|
|
3906
4364
|
],
|
|
3907
4365
|
args: [
|
|
3908
4366
|
{
|
|
3909
|
-
name: "
|
|
3910
|
-
type: "
|
|
4367
|
+
name: "mint_id",
|
|
4368
|
+
type: "u8"
|
|
3911
4369
|
},
|
|
3912
4370
|
{
|
|
3913
|
-
name: "
|
|
3914
|
-
type: "
|
|
4371
|
+
name: "amount",
|
|
4372
|
+
type: "u64"
|
|
3915
4373
|
}
|
|
3916
4374
|
]
|
|
3917
4375
|
},
|
|
@@ -3921,7 +4379,7 @@ var instructions = [
|
|
|
3921
4379
|
"Redeems a specified amount of shares.",
|
|
3922
4380
|
"",
|
|
3923
4381
|
"# Parameters",
|
|
3924
|
-
"- `ctx`: The context for the
|
|
4382
|
+
"- `ctx`: The context for the instruction.",
|
|
3925
4383
|
"- `amount`: The amount of shares to redeem.",
|
|
3926
4384
|
"- `in_kind`: Whether to redeem in kind.",
|
|
3927
4385
|
"- `skip_state`: Should always be true (state check to be implemented)."
|
|
@@ -4041,7 +4499,7 @@ var instructions = [
|
|
|
4041
4499
|
"Redelegates an existing stake account to a new validator (a new stake account will be created).",
|
|
4042
4500
|
"",
|
|
4043
4501
|
"# Parameters",
|
|
4044
|
-
"- `ctx`: The context for the
|
|
4502
|
+
"- `ctx`: The context for the instruction.",
|
|
4045
4503
|
"",
|
|
4046
4504
|
"# Permission required",
|
|
4047
4505
|
"- Permission::Unstake",
|
|
@@ -4128,7 +4586,7 @@ var instructions = [
|
|
|
4128
4586
|
"This allows the owner to pause/unpause subscription and redemption of a fund.",
|
|
4129
4587
|
"",
|
|
4130
4588
|
"# Parameters",
|
|
4131
|
-
"- `ctx`: The context for the
|
|
4589
|
+
"- `ctx`: The context for the instruction.",
|
|
4132
4590
|
"- `enabled`: A boolean indicating whether to enable or disable the subscribe and redeem functionality.",
|
|
4133
4591
|
"",
|
|
4134
4592
|
"# Permission required",
|
|
@@ -4168,7 +4626,7 @@ var instructions = [
|
|
|
4168
4626
|
"Sets the frozen state of the token accounts for the specified mint.",
|
|
4169
4627
|
"",
|
|
4170
4628
|
"# Parameters",
|
|
4171
|
-
"- `ctx`: The context for the
|
|
4629
|
+
"- `ctx`: The context for the instruction.",
|
|
4172
4630
|
"- `mint_id`: The id of the mint to set the frozen state for.",
|
|
4173
4631
|
"- `frozen`: The new frozen state.",
|
|
4174
4632
|
"",
|
|
@@ -4223,7 +4681,7 @@ var instructions = [
|
|
|
4223
4681
|
"Splits from an existing stake account to get a new stake account.",
|
|
4224
4682
|
"",
|
|
4225
4683
|
"# Parameters",
|
|
4226
|
-
"- `ctx`: The context for the
|
|
4684
|
+
"- `ctx`: The context for the instruction.",
|
|
4227
4685
|
"- `lamports`: The amount of SOL to split.",
|
|
4228
4686
|
"",
|
|
4229
4687
|
"# Permission required",
|
|
@@ -4308,7 +4766,7 @@ var instructions = [
|
|
|
4308
4766
|
"Deposits SOL to a stake pool to get pool token.",
|
|
4309
4767
|
"",
|
|
4310
4768
|
"# Parameters",
|
|
4311
|
-
"- `ctx`: The context for the
|
|
4769
|
+
"- `ctx`: The context for the instruction.",
|
|
4312
4770
|
"- `lamports`: The amount of SOL to deposit.",
|
|
4313
4771
|
"",
|
|
4314
4772
|
"# Permission required",
|
|
@@ -4495,7 +4953,7 @@ var instructions = [
|
|
|
4495
4953
|
"Deposits a stake account to a stake pool to get pool token.",
|
|
4496
4954
|
"",
|
|
4497
4955
|
"# Parameters",
|
|
4498
|
-
"- `ctx`: The context for the
|
|
4956
|
+
"- `ctx`: The context for the instruction.",
|
|
4499
4957
|
"",
|
|
4500
4958
|
"# Permission required",
|
|
4501
4959
|
"- Permission::Stake",
|
|
@@ -4704,7 +5162,7 @@ var instructions = [
|
|
|
4704
5162
|
"Unstakes from pool token to get SOL immediately.",
|
|
4705
5163
|
"",
|
|
4706
5164
|
"# Parameters",
|
|
4707
|
-
"- `ctx`: The context for the
|
|
5165
|
+
"- `ctx`: The context for the instruction.",
|
|
4708
5166
|
"- `pool_token_amount`: Amount of pool token to unstake.",
|
|
4709
5167
|
"",
|
|
4710
5168
|
"# Permission required",
|
|
@@ -4813,7 +5271,7 @@ var instructions = [
|
|
|
4813
5271
|
"Unstakes from pool token into a stake account.",
|
|
4814
5272
|
"",
|
|
4815
5273
|
"# Parameters",
|
|
4816
|
-
"- `ctx`: The context for the
|
|
5274
|
+
"- `ctx`: The context for the instruction.",
|
|
4817
5275
|
"- `pool_token_amount`: Amount of pool token to unstake.",
|
|
4818
5276
|
"",
|
|
4819
5277
|
"# Permission required",
|
|
@@ -4928,7 +5386,7 @@ var instructions = [
|
|
|
4928
5386
|
"Subscribes to a specified amount of shares.",
|
|
4929
5387
|
"",
|
|
4930
5388
|
"# Parameters",
|
|
4931
|
-
"- `ctx`: The context for the
|
|
5389
|
+
"- `ctx`: The context for the instruction.",
|
|
4932
5390
|
"- `amount`: The amount of shares to subscribe.",
|
|
4933
5391
|
"- `skip_state`: Should always be true (state check to be implemented)."
|
|
4934
5392
|
],
|
|
@@ -5109,86 +5567,6 @@ var instructions = [
|
|
|
5109
5567
|
}
|
|
5110
5568
|
]
|
|
5111
5569
|
},
|
|
5112
|
-
{
|
|
5113
|
-
name: "toggle_max_lock",
|
|
5114
|
-
docs: [
|
|
5115
|
-
"Toggles max lock.",
|
|
5116
|
-
"",
|
|
5117
|
-
"# Parameters",
|
|
5118
|
-
"- `ctx`: The context for the transaction.",
|
|
5119
|
-
"- `value`: The value to toggle.",
|
|
5120
|
-
"",
|
|
5121
|
-
"# Permission required",
|
|
5122
|
-
"- Permission::UnstakeJup",
|
|
5123
|
-
"",
|
|
5124
|
-
"# Integration required",
|
|
5125
|
-
"- Integration::JupiterVote"
|
|
5126
|
-
],
|
|
5127
|
-
discriminator: [
|
|
5128
|
-
163,
|
|
5129
|
-
157,
|
|
5130
|
-
161,
|
|
5131
|
-
132,
|
|
5132
|
-
179,
|
|
5133
|
-
107,
|
|
5134
|
-
127,
|
|
5135
|
-
143
|
|
5136
|
-
],
|
|
5137
|
-
accounts: [
|
|
5138
|
-
{
|
|
5139
|
-
name: "state"
|
|
5140
|
-
},
|
|
5141
|
-
{
|
|
5142
|
-
name: "vault",
|
|
5143
|
-
writable: true,
|
|
5144
|
-
pda: {
|
|
5145
|
-
seeds: [
|
|
5146
|
-
{
|
|
5147
|
-
kind: "const",
|
|
5148
|
-
value: [
|
|
5149
|
-
118,
|
|
5150
|
-
97,
|
|
5151
|
-
117,
|
|
5152
|
-
108,
|
|
5153
|
-
116
|
|
5154
|
-
]
|
|
5155
|
-
},
|
|
5156
|
-
{
|
|
5157
|
-
kind: "account",
|
|
5158
|
-
path: "state"
|
|
5159
|
-
}
|
|
5160
|
-
]
|
|
5161
|
-
}
|
|
5162
|
-
},
|
|
5163
|
-
{
|
|
5164
|
-
name: "signer",
|
|
5165
|
-
writable: true,
|
|
5166
|
-
signer: true
|
|
5167
|
-
},
|
|
5168
|
-
{
|
|
5169
|
-
name: "locker",
|
|
5170
|
-
writable: true
|
|
5171
|
-
},
|
|
5172
|
-
{
|
|
5173
|
-
name: "escrow",
|
|
5174
|
-
writable: true
|
|
5175
|
-
},
|
|
5176
|
-
{
|
|
5177
|
-
name: "locked_voter_program",
|
|
5178
|
-
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
5179
|
-
},
|
|
5180
|
-
{
|
|
5181
|
-
name: "token_program",
|
|
5182
|
-
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
5183
|
-
}
|
|
5184
|
-
],
|
|
5185
|
-
args: [
|
|
5186
|
-
{
|
|
5187
|
-
name: "value",
|
|
5188
|
-
type: "bool"
|
|
5189
|
-
}
|
|
5190
|
-
]
|
|
5191
|
-
},
|
|
5192
5570
|
{
|
|
5193
5571
|
name: "transfer_hook",
|
|
5194
5572
|
discriminator: [
|
|
@@ -5326,7 +5704,7 @@ var instructions = [
|
|
|
5326
5704
|
"Updates an existing mint with new metadata.",
|
|
5327
5705
|
"",
|
|
5328
5706
|
"# Parameters",
|
|
5329
|
-
"- `ctx`: The context for the
|
|
5707
|
+
"- `ctx`: The context for the instruction.",
|
|
5330
5708
|
"- `mint_id`: The id of the mint to be updated.",
|
|
5331
5709
|
"- `mint_model`: An instance of `MintModel` containing the updated metadata for the new mint.",
|
|
5332
5710
|
"",
|
|
@@ -5383,7 +5761,7 @@ var instructions = [
|
|
|
5383
5761
|
"Updates an existing state account with new parameters.",
|
|
5384
5762
|
"",
|
|
5385
5763
|
"# Parameters",
|
|
5386
|
-
"- `ctx`: The context for the
|
|
5764
|
+
"- `ctx`: The context for the instruction.",
|
|
5387
5765
|
"- `state`: An instance of `StateModel` containing the updated details of the state.",
|
|
5388
5766
|
"",
|
|
5389
5767
|
"# Permission required",
|
|
@@ -5427,7 +5805,7 @@ var instructions = [
|
|
|
5427
5805
|
"Withdraw asset from vault into owner's wallet.",
|
|
5428
5806
|
"",
|
|
5429
5807
|
"# Parameters",
|
|
5430
|
-
"- `ctx`: The context for the
|
|
5808
|
+
"- `ctx`: The context for the instruction.",
|
|
5431
5809
|
"- `amount`: The amount to withdraw.",
|
|
5432
5810
|
"",
|
|
5433
5811
|
"# Permission required",
|
|
@@ -5587,202 +5965,55 @@ var instructions = [
|
|
|
5587
5965
|
}
|
|
5588
5966
|
}
|
|
5589
5967
|
},
|
|
5590
|
-
{
|
|
5591
|
-
name: "signer",
|
|
5592
|
-
writable: true,
|
|
5593
|
-
signer: true
|
|
5594
|
-
},
|
|
5595
|
-
{
|
|
5596
|
-
name: "token_program"
|
|
5597
|
-
}
|
|
5598
|
-
],
|
|
5599
|
-
args: [
|
|
5600
|
-
{
|
|
5601
|
-
name: "amount",
|
|
5602
|
-
type: "u64"
|
|
5603
|
-
}
|
|
5604
|
-
]
|
|
5605
|
-
},
|
|
5606
|
-
{
|
|
5607
|
-
name: "withdraw_all_unstaked_jup",
|
|
5608
|
-
docs: [
|
|
5609
|
-
"Withdraws all unstaked JUP.",
|
|
5610
|
-
"",
|
|
5611
|
-
"# Parameters",
|
|
5612
|
-
"- `ctx`: The context for the transaction.",
|
|
5613
|
-
"",
|
|
5614
|
-
"# Permission required",
|
|
5615
|
-
"- Permission::UnstakeJup",
|
|
5616
|
-
"",
|
|
5617
|
-
"# Integration required",
|
|
5618
|
-
"- Integration::JupiterVote"
|
|
5619
|
-
],
|
|
5620
|
-
discriminator: [
|
|
5621
|
-
7,
|
|
5622
|
-
192,
|
|
5623
|
-
129,
|
|
5624
|
-
123,
|
|
5625
|
-
174,
|
|
5626
|
-
255,
|
|
5627
|
-
252,
|
|
5628
|
-
219
|
|
5629
|
-
],
|
|
5630
|
-
accounts: [
|
|
5631
|
-
{
|
|
5632
|
-
name: "state"
|
|
5633
|
-
},
|
|
5634
|
-
{
|
|
5635
|
-
name: "vault",
|
|
5636
|
-
writable: true,
|
|
5637
|
-
pda: {
|
|
5638
|
-
seeds: [
|
|
5639
|
-
{
|
|
5640
|
-
kind: "const",
|
|
5641
|
-
value: [
|
|
5642
|
-
118,
|
|
5643
|
-
97,
|
|
5644
|
-
117,
|
|
5645
|
-
108,
|
|
5646
|
-
116
|
|
5647
|
-
]
|
|
5648
|
-
},
|
|
5649
|
-
{
|
|
5650
|
-
kind: "account",
|
|
5651
|
-
path: "state"
|
|
5652
|
-
}
|
|
5653
|
-
]
|
|
5654
|
-
}
|
|
5655
|
-
},
|
|
5656
|
-
{
|
|
5657
|
-
name: "signer",
|
|
5658
|
-
writable: true,
|
|
5659
|
-
signer: true
|
|
5660
|
-
},
|
|
5661
|
-
{
|
|
5662
|
-
name: "locker",
|
|
5663
|
-
writable: true
|
|
5664
|
-
},
|
|
5665
|
-
{
|
|
5666
|
-
name: "escrow",
|
|
5667
|
-
writable: true
|
|
5668
|
-
},
|
|
5669
|
-
{
|
|
5670
|
-
name: "escrow_jup_ata",
|
|
5671
|
-
writable: true
|
|
5672
|
-
},
|
|
5673
|
-
{
|
|
5674
|
-
name: "vault_jup_ata",
|
|
5675
|
-
writable: true
|
|
5676
|
-
},
|
|
5677
|
-
{
|
|
5678
|
-
name: "locked_voter_program",
|
|
5679
|
-
address: "voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj"
|
|
5680
|
-
},
|
|
5681
|
-
{
|
|
5682
|
-
name: "token_program",
|
|
5683
|
-
address: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
5684
|
-
}
|
|
5685
|
-
],
|
|
5686
|
-
args: []
|
|
5687
|
-
},
|
|
5688
|
-
{
|
|
5689
|
-
name: "withdraw_from_stake_accounts",
|
|
5690
|
-
docs: [
|
|
5691
|
-
"Withdraws SOL from stake accounts.",
|
|
5692
|
-
"",
|
|
5693
|
-
"# Parameters",
|
|
5694
|
-
"- `ctx`: The context for the transaction.",
|
|
5695
|
-
"",
|
|
5696
|
-
"# Permission required",
|
|
5697
|
-
"- Permission::Unstake",
|
|
5698
|
-
"",
|
|
5699
|
-
"# Integration required",
|
|
5700
|
-
"- Integration::NativeStaking"
|
|
5701
|
-
],
|
|
5702
|
-
discriminator: [
|
|
5703
|
-
93,
|
|
5704
|
-
209,
|
|
5705
|
-
100,
|
|
5706
|
-
231,
|
|
5707
|
-
169,
|
|
5708
|
-
160,
|
|
5709
|
-
192,
|
|
5710
|
-
197
|
|
5711
|
-
],
|
|
5712
|
-
accounts: [
|
|
5713
|
-
{
|
|
5714
|
-
name: "signer",
|
|
5715
|
-
writable: true,
|
|
5716
|
-
signer: true
|
|
5717
|
-
},
|
|
5718
|
-
{
|
|
5719
|
-
name: "state",
|
|
5720
|
-
writable: true
|
|
5721
|
-
},
|
|
5722
|
-
{
|
|
5723
|
-
name: "vault",
|
|
5724
|
-
writable: true,
|
|
5725
|
-
pda: {
|
|
5726
|
-
seeds: [
|
|
5727
|
-
{
|
|
5728
|
-
kind: "const",
|
|
5729
|
-
value: [
|
|
5730
|
-
118,
|
|
5731
|
-
97,
|
|
5732
|
-
117,
|
|
5733
|
-
108,
|
|
5734
|
-
116
|
|
5735
|
-
]
|
|
5736
|
-
},
|
|
5737
|
-
{
|
|
5738
|
-
kind: "account",
|
|
5739
|
-
path: "state"
|
|
5740
|
-
}
|
|
5741
|
-
]
|
|
5742
|
-
}
|
|
5743
|
-
},
|
|
5744
|
-
{
|
|
5745
|
-
name: "clock",
|
|
5746
|
-
address: "SysvarC1ock11111111111111111111111111111111"
|
|
5747
|
-
},
|
|
5748
|
-
{
|
|
5749
|
-
name: "stake_history",
|
|
5750
|
-
address: "SysvarStakeHistory1111111111111111111111111"
|
|
5968
|
+
{
|
|
5969
|
+
name: "signer",
|
|
5970
|
+
writable: true,
|
|
5971
|
+
signer: true
|
|
5751
5972
|
},
|
|
5752
5973
|
{
|
|
5753
|
-
name: "
|
|
5754
|
-
address: "Stake11111111111111111111111111111111111111"
|
|
5974
|
+
name: "token_program"
|
|
5755
5975
|
}
|
|
5756
5976
|
],
|
|
5757
|
-
args: [
|
|
5977
|
+
args: [
|
|
5978
|
+
{
|
|
5979
|
+
name: "amount",
|
|
5980
|
+
type: "u64"
|
|
5981
|
+
}
|
|
5982
|
+
]
|
|
5758
5983
|
},
|
|
5759
5984
|
{
|
|
5760
|
-
name: "
|
|
5985
|
+
name: "withdraw_from_stake_accounts",
|
|
5761
5986
|
docs: [
|
|
5762
|
-
"Withdraws
|
|
5987
|
+
"Withdraws SOL from stake accounts.",
|
|
5763
5988
|
"",
|
|
5764
5989
|
"# Parameters",
|
|
5765
|
-
"- `ctx`: The context for the
|
|
5990
|
+
"- `ctx`: The context for the instruction.",
|
|
5766
5991
|
"",
|
|
5767
5992
|
"# Permission required",
|
|
5768
|
-
"- Permission::
|
|
5993
|
+
"- Permission::Unstake",
|
|
5769
5994
|
"",
|
|
5770
5995
|
"# Integration required",
|
|
5771
|
-
"- Integration::
|
|
5996
|
+
"- Integration::NativeStaking"
|
|
5772
5997
|
],
|
|
5773
5998
|
discriminator: [
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5999
|
+
93,
|
|
6000
|
+
209,
|
|
6001
|
+
100,
|
|
6002
|
+
231,
|
|
6003
|
+
169,
|
|
6004
|
+
160,
|
|
6005
|
+
192,
|
|
6006
|
+
197
|
|
5782
6007
|
],
|
|
5783
6008
|
accounts: [
|
|
5784
6009
|
{
|
|
5785
|
-
name: "
|
|
6010
|
+
name: "signer",
|
|
6011
|
+
writable: true,
|
|
6012
|
+
signer: true
|
|
6013
|
+
},
|
|
6014
|
+
{
|
|
6015
|
+
name: "state",
|
|
6016
|
+
writable: true
|
|
5786
6017
|
},
|
|
5787
6018
|
{
|
|
5788
6019
|
name: "vault",
|
|
@@ -5807,37 +6038,16 @@ var instructions = [
|
|
|
5807
6038
|
}
|
|
5808
6039
|
},
|
|
5809
6040
|
{
|
|
5810
|
-
name: "
|
|
5811
|
-
|
|
5812
|
-
signer: true
|
|
5813
|
-
},
|
|
5814
|
-
{
|
|
5815
|
-
name: "partial_unstake",
|
|
5816
|
-
writable: true
|
|
5817
|
-
},
|
|
5818
|
-
{
|
|
5819
|
-
name: "locker",
|
|
5820
|
-
writable: true
|
|
5821
|
-
},
|
|
5822
|
-
{
|
|
5823
|
-
name: "escrow",
|
|
5824
|
-
writable: true
|
|
5825
|
-
},
|
|
5826
|
-
{
|
|
5827
|
-
name: "escrow_jup_ata",
|
|
5828
|
-
writable: true
|
|
5829
|
-
},
|
|
5830
|
-
{
|
|
5831
|
-
name: "vault_jup_ata",
|
|
5832
|
-
writable: true
|
|
6041
|
+
name: "clock",
|
|
6042
|
+
address: "SysvarC1ock11111111111111111111111111111111"
|
|
5833
6043
|
},
|
|
5834
6044
|
{
|
|
5835
|
-
name: "
|
|
5836
|
-
address: "
|
|
6045
|
+
name: "stake_history",
|
|
6046
|
+
address: "SysvarStakeHistory1111111111111111111111111"
|
|
5837
6047
|
},
|
|
5838
6048
|
{
|
|
5839
|
-
name: "
|
|
5840
|
-
address: "
|
|
6049
|
+
name: "stake_program",
|
|
6050
|
+
address: "Stake11111111111111111111111111111111111111"
|
|
5841
6051
|
}
|
|
5842
6052
|
],
|
|
5843
6053
|
args: []
|
|
@@ -5848,7 +6058,7 @@ var instructions = [
|
|
|
5848
6058
|
"Unwraps all wSOL to get SOL.",
|
|
5849
6059
|
"",
|
|
5850
6060
|
"# Parameters",
|
|
5851
|
-
"- `ctx`: The context for the
|
|
6061
|
+
"- `ctx`: The context for the instruction.",
|
|
5852
6062
|
"",
|
|
5853
6063
|
"# Permission required",
|
|
5854
6064
|
"- Permission::WSolUnwrap"
|
|
@@ -6001,7 +6211,7 @@ var instructions = [
|
|
|
6001
6211
|
"Wraps SOL to get wSOL.",
|
|
6002
6212
|
"",
|
|
6003
6213
|
"# Parameters",
|
|
6004
|
-
"- `ctx`: The context for the
|
|
6214
|
+
"- `ctx`: The context for the instruction.",
|
|
6005
6215
|
"- `lamports`: The amount of SOL to wrap.",
|
|
6006
6216
|
"",
|
|
6007
6217
|
"# Permission required",
|
|
@@ -6164,45 +6374,6 @@ var instructions = [
|
|
|
6164
6374
|
}
|
|
6165
6375
|
];
|
|
6166
6376
|
var accounts = [
|
|
6167
|
-
{
|
|
6168
|
-
name: "Escrow",
|
|
6169
|
-
discriminator: [
|
|
6170
|
-
31,
|
|
6171
|
-
213,
|
|
6172
|
-
123,
|
|
6173
|
-
187,
|
|
6174
|
-
186,
|
|
6175
|
-
22,
|
|
6176
|
-
218,
|
|
6177
|
-
155
|
|
6178
|
-
]
|
|
6179
|
-
},
|
|
6180
|
-
{
|
|
6181
|
-
name: "Governor",
|
|
6182
|
-
discriminator: [
|
|
6183
|
-
37,
|
|
6184
|
-
136,
|
|
6185
|
-
44,
|
|
6186
|
-
80,
|
|
6187
|
-
68,
|
|
6188
|
-
85,
|
|
6189
|
-
213,
|
|
6190
|
-
178
|
|
6191
|
-
]
|
|
6192
|
-
},
|
|
6193
|
-
{
|
|
6194
|
-
name: "Locker",
|
|
6195
|
-
discriminator: [
|
|
6196
|
-
74,
|
|
6197
|
-
246,
|
|
6198
|
-
6,
|
|
6199
|
-
113,
|
|
6200
|
-
249,
|
|
6201
|
-
228,
|
|
6202
|
-
75,
|
|
6203
|
-
169
|
|
6204
|
-
]
|
|
6205
|
-
},
|
|
6206
6377
|
{
|
|
6207
6378
|
name: "OpenfundsMetadataAccount",
|
|
6208
6379
|
discriminator: [
|
|
@@ -6216,19 +6387,6 @@ var accounts = [
|
|
|
6216
6387
|
219
|
|
6217
6388
|
]
|
|
6218
6389
|
},
|
|
6219
|
-
{
|
|
6220
|
-
name: "PartialUnstaking",
|
|
6221
|
-
discriminator: [
|
|
6222
|
-
172,
|
|
6223
|
-
146,
|
|
6224
|
-
58,
|
|
6225
|
-
213,
|
|
6226
|
-
40,
|
|
6227
|
-
250,
|
|
6228
|
-
107,
|
|
6229
|
-
63
|
|
6230
|
-
]
|
|
6231
|
-
},
|
|
6232
6390
|
{
|
|
6233
6391
|
name: "PolicyAccount",
|
|
6234
6392
|
discriminator: [
|
|
@@ -6242,19 +6400,6 @@ var accounts = [
|
|
|
6242
6400
|
175
|
|
6243
6401
|
]
|
|
6244
6402
|
},
|
|
6245
|
-
{
|
|
6246
|
-
name: "Proposal",
|
|
6247
|
-
discriminator: [
|
|
6248
|
-
26,
|
|
6249
|
-
94,
|
|
6250
|
-
189,
|
|
6251
|
-
187,
|
|
6252
|
-
116,
|
|
6253
|
-
136,
|
|
6254
|
-
53,
|
|
6255
|
-
33
|
|
6256
|
-
]
|
|
6257
|
-
},
|
|
6258
6403
|
{
|
|
6259
6404
|
name: "StateAccount",
|
|
6260
6405
|
discriminator: [
|
|
@@ -6267,19 +6412,6 @@ var accounts = [
|
|
|
6267
6412
|
249,
|
|
6268
6413
|
103
|
|
6269
6414
|
]
|
|
6270
|
-
},
|
|
6271
|
-
{
|
|
6272
|
-
name: "Vote",
|
|
6273
|
-
discriminator: [
|
|
6274
|
-
96,
|
|
6275
|
-
91,
|
|
6276
|
-
104,
|
|
6277
|
-
57,
|
|
6278
|
-
145,
|
|
6279
|
-
35,
|
|
6280
|
-
172,
|
|
6281
|
-
155
|
|
6282
|
-
]
|
|
6283
6415
|
}
|
|
6284
6416
|
];
|
|
6285
6417
|
var errors = [
|
|
@@ -6393,6 +6525,11 @@ var errors = [
|
|
|
6393
6525
|
name: "InvalidTokenAccount",
|
|
6394
6526
|
msg: "Invalid token account"
|
|
6395
6527
|
},
|
|
6528
|
+
{
|
|
6529
|
+
code: 50004,
|
|
6530
|
+
name: "InvalidVoteSide",
|
|
6531
|
+
msg: "Invalid vote side"
|
|
6532
|
+
},
|
|
6396
6533
|
{
|
|
6397
6534
|
code: 51000,
|
|
6398
6535
|
name: "InvalidAssetPrice",
|
|
@@ -6711,6 +6848,9 @@ var types = [
|
|
|
6711
6848
|
},
|
|
6712
6849
|
{
|
|
6713
6850
|
name: "DriftOrderTypes"
|
|
6851
|
+
},
|
|
6852
|
+
{
|
|
6853
|
+
name: "MaxSwapSlippageBps"
|
|
6714
6854
|
}
|
|
6715
6855
|
]
|
|
6716
6856
|
}
|
|
@@ -6853,70 +6993,6 @@ var types = [
|
|
|
6853
6993
|
]
|
|
6854
6994
|
}
|
|
6855
6995
|
},
|
|
6856
|
-
{
|
|
6857
|
-
name: "Escrow",
|
|
6858
|
-
docs: [
|
|
6859
|
-
"Account: Escrow"
|
|
6860
|
-
],
|
|
6861
|
-
type: {
|
|
6862
|
-
kind: "struct",
|
|
6863
|
-
fields: [
|
|
6864
|
-
{
|
|
6865
|
-
name: "locker",
|
|
6866
|
-
type: "pubkey"
|
|
6867
|
-
},
|
|
6868
|
-
{
|
|
6869
|
-
name: "owner",
|
|
6870
|
-
type: "pubkey"
|
|
6871
|
-
},
|
|
6872
|
-
{
|
|
6873
|
-
name: "bump",
|
|
6874
|
-
type: "u8"
|
|
6875
|
-
},
|
|
6876
|
-
{
|
|
6877
|
-
name: "tokens",
|
|
6878
|
-
type: "pubkey"
|
|
6879
|
-
},
|
|
6880
|
-
{
|
|
6881
|
-
name: "amount",
|
|
6882
|
-
type: "u64"
|
|
6883
|
-
},
|
|
6884
|
-
{
|
|
6885
|
-
name: "escrow_started_at",
|
|
6886
|
-
type: "i64"
|
|
6887
|
-
},
|
|
6888
|
-
{
|
|
6889
|
-
name: "escrow_ends_at",
|
|
6890
|
-
type: "i64"
|
|
6891
|
-
},
|
|
6892
|
-
{
|
|
6893
|
-
name: "vote_delegate",
|
|
6894
|
-
type: "pubkey"
|
|
6895
|
-
},
|
|
6896
|
-
{
|
|
6897
|
-
name: "is_max_lock",
|
|
6898
|
-
type: "bool"
|
|
6899
|
-
},
|
|
6900
|
-
{
|
|
6901
|
-
name: "partial_unstaking_amount",
|
|
6902
|
-
type: "u64"
|
|
6903
|
-
},
|
|
6904
|
-
{
|
|
6905
|
-
name: "padding",
|
|
6906
|
-
type: "u64"
|
|
6907
|
-
},
|
|
6908
|
-
{
|
|
6909
|
-
name: "buffers",
|
|
6910
|
-
type: {
|
|
6911
|
-
array: [
|
|
6912
|
-
"u128",
|
|
6913
|
-
9
|
|
6914
|
-
]
|
|
6915
|
-
}
|
|
6916
|
-
}
|
|
6917
|
-
]
|
|
6918
|
-
}
|
|
6919
|
-
},
|
|
6920
6996
|
{
|
|
6921
6997
|
name: "FundField",
|
|
6922
6998
|
type: {
|
|
@@ -7162,143 +7238,63 @@ var types = [
|
|
|
7162
7238
|
}
|
|
7163
7239
|
},
|
|
7164
7240
|
{
|
|
7165
|
-
name: "is_etc",
|
|
7166
|
-
type: {
|
|
7167
|
-
option: "bool"
|
|
7168
|
-
}
|
|
7169
|
-
},
|
|
7170
|
-
{
|
|
7171
|
-
name: "is_eu_directive_relevant",
|
|
7172
|
-
type: {
|
|
7173
|
-
option: "bool"
|
|
7174
|
-
}
|
|
7175
|
-
},
|
|
7176
|
-
{
|
|
7177
|
-
name: "is_fund_of_funds",
|
|
7178
|
-
type: {
|
|
7179
|
-
option: "bool"
|
|
7180
|
-
}
|
|
7181
|
-
},
|
|
7182
|
-
{
|
|
7183
|
-
name: "is_passive_fund",
|
|
7184
|
-
type: {
|
|
7185
|
-
option: "bool"
|
|
7186
|
-
}
|
|
7187
|
-
},
|
|
7188
|
-
{
|
|
7189
|
-
name: "is_reit",
|
|
7190
|
-
type: {
|
|
7191
|
-
option: "bool"
|
|
7192
|
-
}
|
|
7193
|
-
},
|
|
7194
|
-
{
|
|
7195
|
-
name: "legal_form",
|
|
7196
|
-
type: {
|
|
7197
|
-
option: "string"
|
|
7198
|
-
}
|
|
7199
|
-
},
|
|
7200
|
-
{
|
|
7201
|
-
name: "legal_fund_name_only",
|
|
7202
|
-
type: {
|
|
7203
|
-
option: "string"
|
|
7204
|
-
}
|
|
7205
|
-
},
|
|
7206
|
-
{
|
|
7207
|
-
name: "open_ended_or_closed_ended_fund_structure",
|
|
7208
|
-
type: {
|
|
7209
|
-
option: "string"
|
|
7210
|
-
}
|
|
7211
|
-
},
|
|
7212
|
-
{
|
|
7213
|
-
name: "type_of_eu_directive",
|
|
7214
|
-
type: {
|
|
7215
|
-
option: "string"
|
|
7216
|
-
}
|
|
7217
|
-
},
|
|
7218
|
-
{
|
|
7219
|
-
name: "ucits_version",
|
|
7220
|
-
type: {
|
|
7221
|
-
option: "string"
|
|
7222
|
-
}
|
|
7223
|
-
}
|
|
7224
|
-
]
|
|
7225
|
-
}
|
|
7226
|
-
},
|
|
7227
|
-
{
|
|
7228
|
-
name: "GovernanceParameters",
|
|
7229
|
-
type: {
|
|
7230
|
-
kind: "struct",
|
|
7231
|
-
fields: [
|
|
7232
|
-
{
|
|
7233
|
-
name: "voting_delay",
|
|
7234
|
-
type: "u64"
|
|
7235
|
-
},
|
|
7236
|
-
{
|
|
7237
|
-
name: "voting_period",
|
|
7238
|
-
type: "u64"
|
|
7241
|
+
name: "is_etc",
|
|
7242
|
+
type: {
|
|
7243
|
+
option: "bool"
|
|
7244
|
+
}
|
|
7239
7245
|
},
|
|
7240
7246
|
{
|
|
7241
|
-
name: "
|
|
7242
|
-
type:
|
|
7247
|
+
name: "is_eu_directive_relevant",
|
|
7248
|
+
type: {
|
|
7249
|
+
option: "bool"
|
|
7250
|
+
}
|
|
7243
7251
|
},
|
|
7244
7252
|
{
|
|
7245
|
-
name: "
|
|
7246
|
-
type:
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
}
|
|
7250
|
-
},
|
|
7251
|
-
{
|
|
7252
|
-
name: "Governor",
|
|
7253
|
-
docs: [
|
|
7254
|
-
"Account: Governor"
|
|
7255
|
-
],
|
|
7256
|
-
type: {
|
|
7257
|
-
kind: "struct",
|
|
7258
|
-
fields: [
|
|
7259
|
-
{
|
|
7260
|
-
name: "base",
|
|
7261
|
-
type: "pubkey"
|
|
7253
|
+
name: "is_fund_of_funds",
|
|
7254
|
+
type: {
|
|
7255
|
+
option: "bool"
|
|
7256
|
+
}
|
|
7262
7257
|
},
|
|
7263
7258
|
{
|
|
7264
|
-
name: "
|
|
7265
|
-
type:
|
|
7259
|
+
name: "is_passive_fund",
|
|
7260
|
+
type: {
|
|
7261
|
+
option: "bool"
|
|
7262
|
+
}
|
|
7266
7263
|
},
|
|
7267
7264
|
{
|
|
7268
|
-
name: "
|
|
7269
|
-
type:
|
|
7265
|
+
name: "is_reit",
|
|
7266
|
+
type: {
|
|
7267
|
+
option: "bool"
|
|
7268
|
+
}
|
|
7270
7269
|
},
|
|
7271
7270
|
{
|
|
7272
|
-
name: "
|
|
7273
|
-
type:
|
|
7271
|
+
name: "legal_form",
|
|
7272
|
+
type: {
|
|
7273
|
+
option: "string"
|
|
7274
|
+
}
|
|
7274
7275
|
},
|
|
7275
7276
|
{
|
|
7276
|
-
name: "
|
|
7277
|
-
type:
|
|
7277
|
+
name: "legal_fund_name_only",
|
|
7278
|
+
type: {
|
|
7279
|
+
option: "string"
|
|
7280
|
+
}
|
|
7278
7281
|
},
|
|
7279
7282
|
{
|
|
7280
|
-
name: "
|
|
7283
|
+
name: "open_ended_or_closed_ended_fund_structure",
|
|
7281
7284
|
type: {
|
|
7282
|
-
|
|
7283
|
-
name: "GovernanceParameters"
|
|
7284
|
-
}
|
|
7285
|
+
option: "string"
|
|
7285
7286
|
}
|
|
7286
7287
|
},
|
|
7287
7288
|
{
|
|
7288
|
-
name: "
|
|
7289
|
+
name: "type_of_eu_directive",
|
|
7289
7290
|
type: {
|
|
7290
|
-
|
|
7291
|
-
name: "VotingReward"
|
|
7292
|
-
}
|
|
7291
|
+
option: "string"
|
|
7293
7292
|
}
|
|
7294
7293
|
},
|
|
7295
7294
|
{
|
|
7296
|
-
name: "
|
|
7295
|
+
name: "ucits_version",
|
|
7297
7296
|
type: {
|
|
7298
|
-
|
|
7299
|
-
"u128",
|
|
7300
|
-
32
|
|
7301
|
-
]
|
|
7297
|
+
option: "string"
|
|
7302
7298
|
}
|
|
7303
7299
|
}
|
|
7304
7300
|
]
|
|
@@ -7352,82 +7348,6 @@ var types = [
|
|
|
7352
7348
|
]
|
|
7353
7349
|
}
|
|
7354
7350
|
},
|
|
7355
|
-
{
|
|
7356
|
-
name: "Locker",
|
|
7357
|
-
docs: [
|
|
7358
|
-
"Account: Locker"
|
|
7359
|
-
],
|
|
7360
|
-
type: {
|
|
7361
|
-
kind: "struct",
|
|
7362
|
-
fields: [
|
|
7363
|
-
{
|
|
7364
|
-
name: "base",
|
|
7365
|
-
type: "pubkey"
|
|
7366
|
-
},
|
|
7367
|
-
{
|
|
7368
|
-
name: "bump",
|
|
7369
|
-
type: "u8"
|
|
7370
|
-
},
|
|
7371
|
-
{
|
|
7372
|
-
name: "token_mint",
|
|
7373
|
-
type: "pubkey"
|
|
7374
|
-
},
|
|
7375
|
-
{
|
|
7376
|
-
name: "locked_supply",
|
|
7377
|
-
type: "u64"
|
|
7378
|
-
},
|
|
7379
|
-
{
|
|
7380
|
-
name: "total_escrow",
|
|
7381
|
-
type: "u64"
|
|
7382
|
-
},
|
|
7383
|
-
{
|
|
7384
|
-
name: "governor",
|
|
7385
|
-
type: "pubkey"
|
|
7386
|
-
},
|
|
7387
|
-
{
|
|
7388
|
-
name: "params",
|
|
7389
|
-
type: {
|
|
7390
|
-
defined: {
|
|
7391
|
-
name: "LockerParams"
|
|
7392
|
-
}
|
|
7393
|
-
}
|
|
7394
|
-
},
|
|
7395
|
-
{
|
|
7396
|
-
name: "buffers",
|
|
7397
|
-
type: {
|
|
7398
|
-
array: [
|
|
7399
|
-
"u128",
|
|
7400
|
-
32
|
|
7401
|
-
]
|
|
7402
|
-
}
|
|
7403
|
-
}
|
|
7404
|
-
]
|
|
7405
|
-
}
|
|
7406
|
-
},
|
|
7407
|
-
{
|
|
7408
|
-
name: "LockerParams",
|
|
7409
|
-
type: {
|
|
7410
|
-
kind: "struct",
|
|
7411
|
-
fields: [
|
|
7412
|
-
{
|
|
7413
|
-
name: "max_stake_vote_multiplier",
|
|
7414
|
-
type: "u8"
|
|
7415
|
-
},
|
|
7416
|
-
{
|
|
7417
|
-
name: "min_stake_duration",
|
|
7418
|
-
type: "u64"
|
|
7419
|
-
},
|
|
7420
|
-
{
|
|
7421
|
-
name: "max_stake_duration",
|
|
7422
|
-
type: "u64"
|
|
7423
|
-
},
|
|
7424
|
-
{
|
|
7425
|
-
name: "proposal_activation_min_votes",
|
|
7426
|
-
type: "u64"
|
|
7427
|
-
}
|
|
7428
|
-
]
|
|
7429
|
-
}
|
|
7430
|
-
},
|
|
7431
7351
|
{
|
|
7432
7352
|
name: "ManagerKind",
|
|
7433
7353
|
type: {
|
|
@@ -8102,42 +8022,6 @@ var types = [
|
|
|
8102
8022
|
]
|
|
8103
8023
|
}
|
|
8104
8024
|
},
|
|
8105
|
-
{
|
|
8106
|
-
name: "PartialUnstaking",
|
|
8107
|
-
docs: [
|
|
8108
|
-
"Account: PartialUnstaking"
|
|
8109
|
-
],
|
|
8110
|
-
type: {
|
|
8111
|
-
kind: "struct",
|
|
8112
|
-
fields: [
|
|
8113
|
-
{
|
|
8114
|
-
name: "escrow",
|
|
8115
|
-
type: "pubkey"
|
|
8116
|
-
},
|
|
8117
|
-
{
|
|
8118
|
-
name: "amount",
|
|
8119
|
-
type: "u64"
|
|
8120
|
-
},
|
|
8121
|
-
{
|
|
8122
|
-
name: "expiration",
|
|
8123
|
-
type: "i64"
|
|
8124
|
-
},
|
|
8125
|
-
{
|
|
8126
|
-
name: "buffers",
|
|
8127
|
-
type: {
|
|
8128
|
-
array: [
|
|
8129
|
-
"u128",
|
|
8130
|
-
6
|
|
8131
|
-
]
|
|
8132
|
-
}
|
|
8133
|
-
},
|
|
8134
|
-
{
|
|
8135
|
-
name: "memo",
|
|
8136
|
-
type: "string"
|
|
8137
|
-
}
|
|
8138
|
-
]
|
|
8139
|
-
}
|
|
8140
|
-
},
|
|
8141
8025
|
{
|
|
8142
8026
|
name: "Permission",
|
|
8143
8027
|
docs: [
|
|
@@ -8263,161 +8147,15 @@ var types = [
|
|
|
8263
8147
|
variants: [
|
|
8264
8148
|
{
|
|
8265
8149
|
name: "None"
|
|
8266
|
-
},
|
|
8267
|
-
{
|
|
8268
|
-
name: "MustPostOnly"
|
|
8269
|
-
},
|
|
8270
|
-
{
|
|
8271
|
-
name: "TryPostOnly"
|
|
8272
|
-
},
|
|
8273
|
-
{
|
|
8274
|
-
name: "Slide"
|
|
8275
|
-
}
|
|
8276
|
-
]
|
|
8277
|
-
}
|
|
8278
|
-
},
|
|
8279
|
-
{
|
|
8280
|
-
name: "Proposal",
|
|
8281
|
-
docs: [
|
|
8282
|
-
"Account: Proposal"
|
|
8283
|
-
],
|
|
8284
|
-
type: {
|
|
8285
|
-
kind: "struct",
|
|
8286
|
-
fields: [
|
|
8287
|
-
{
|
|
8288
|
-
name: "governor",
|
|
8289
|
-
type: "pubkey"
|
|
8290
|
-
},
|
|
8291
|
-
{
|
|
8292
|
-
name: "index",
|
|
8293
|
-
type: "u64"
|
|
8294
|
-
},
|
|
8295
|
-
{
|
|
8296
|
-
name: "bump",
|
|
8297
|
-
type: "u8"
|
|
8298
|
-
},
|
|
8299
|
-
{
|
|
8300
|
-
name: "proposer",
|
|
8301
|
-
type: "pubkey"
|
|
8302
|
-
},
|
|
8303
|
-
{
|
|
8304
|
-
name: "quorum_votes",
|
|
8305
|
-
type: "u64"
|
|
8306
|
-
},
|
|
8307
|
-
{
|
|
8308
|
-
name: "max_option",
|
|
8309
|
-
type: "u8"
|
|
8310
|
-
},
|
|
8311
|
-
{
|
|
8312
|
-
name: "option_votes",
|
|
8313
|
-
type: {
|
|
8314
|
-
vec: "u64"
|
|
8315
|
-
}
|
|
8316
|
-
},
|
|
8317
|
-
{
|
|
8318
|
-
name: "canceled_at",
|
|
8319
|
-
type: "i64"
|
|
8320
|
-
},
|
|
8321
|
-
{
|
|
8322
|
-
name: "created_at",
|
|
8323
|
-
type: "i64"
|
|
8324
|
-
},
|
|
8325
|
-
{
|
|
8326
|
-
name: "activated_at",
|
|
8327
|
-
type: "i64"
|
|
8328
|
-
},
|
|
8329
|
-
{
|
|
8330
|
-
name: "voting_ends_at",
|
|
8331
|
-
type: "i64"
|
|
8332
|
-
},
|
|
8333
|
-
{
|
|
8334
|
-
name: "queued_at",
|
|
8335
|
-
type: "i64"
|
|
8336
|
-
},
|
|
8337
|
-
{
|
|
8338
|
-
name: "queued_transaction",
|
|
8339
|
-
type: "pubkey"
|
|
8340
|
-
},
|
|
8341
|
-
{
|
|
8342
|
-
name: "voting_reward",
|
|
8343
|
-
type: {
|
|
8344
|
-
defined: {
|
|
8345
|
-
name: "VotingReward"
|
|
8346
|
-
}
|
|
8347
|
-
}
|
|
8348
|
-
},
|
|
8349
|
-
{
|
|
8350
|
-
name: "total_claimed_reward",
|
|
8351
|
-
type: "u64"
|
|
8352
|
-
},
|
|
8353
|
-
{
|
|
8354
|
-
name: "proposal_type",
|
|
8355
|
-
type: "u8"
|
|
8356
|
-
},
|
|
8357
|
-
{
|
|
8358
|
-
name: "buffers",
|
|
8359
|
-
type: {
|
|
8360
|
-
array: [
|
|
8361
|
-
"u128",
|
|
8362
|
-
10
|
|
8363
|
-
]
|
|
8364
|
-
}
|
|
8365
|
-
},
|
|
8366
|
-
{
|
|
8367
|
-
name: "instructions",
|
|
8368
|
-
type: {
|
|
8369
|
-
vec: {
|
|
8370
|
-
defined: {
|
|
8371
|
-
name: "ProposalInstruction"
|
|
8372
|
-
}
|
|
8373
|
-
}
|
|
8374
|
-
}
|
|
8375
|
-
}
|
|
8376
|
-
]
|
|
8377
|
-
}
|
|
8378
|
-
},
|
|
8379
|
-
{
|
|
8380
|
-
name: "ProposalAccountMeta",
|
|
8381
|
-
type: {
|
|
8382
|
-
kind: "struct",
|
|
8383
|
-
fields: [
|
|
8384
|
-
{
|
|
8385
|
-
name: "pubkey",
|
|
8386
|
-
type: "pubkey"
|
|
8387
|
-
},
|
|
8388
|
-
{
|
|
8389
|
-
name: "is_signer",
|
|
8390
|
-
type: "bool"
|
|
8391
|
-
},
|
|
8392
|
-
{
|
|
8393
|
-
name: "is_writable",
|
|
8394
|
-
type: "bool"
|
|
8395
|
-
}
|
|
8396
|
-
]
|
|
8397
|
-
}
|
|
8398
|
-
},
|
|
8399
|
-
{
|
|
8400
|
-
name: "ProposalInstruction",
|
|
8401
|
-
type: {
|
|
8402
|
-
kind: "struct",
|
|
8403
|
-
fields: [
|
|
8150
|
+
},
|
|
8404
8151
|
{
|
|
8405
|
-
name: "
|
|
8406
|
-
type: "pubkey"
|
|
8152
|
+
name: "MustPostOnly"
|
|
8407
8153
|
},
|
|
8408
8154
|
{
|
|
8409
|
-
name: "
|
|
8410
|
-
type: {
|
|
8411
|
-
vec: {
|
|
8412
|
-
defined: {
|
|
8413
|
-
name: "ProposalAccountMeta"
|
|
8414
|
-
}
|
|
8415
|
-
}
|
|
8416
|
-
}
|
|
8155
|
+
name: "TryPostOnly"
|
|
8417
8156
|
},
|
|
8418
8157
|
{
|
|
8419
|
-
name: "
|
|
8420
|
-
type: "bytes"
|
|
8158
|
+
name: "Slide"
|
|
8421
8159
|
}
|
|
8422
8160
|
]
|
|
8423
8161
|
}
|
|
@@ -8947,70 +8685,6 @@ var types = [
|
|
|
8947
8685
|
}
|
|
8948
8686
|
]
|
|
8949
8687
|
}
|
|
8950
|
-
},
|
|
8951
|
-
{
|
|
8952
|
-
name: "Vote",
|
|
8953
|
-
docs: [
|
|
8954
|
-
"Account: Vote"
|
|
8955
|
-
],
|
|
8956
|
-
type: {
|
|
8957
|
-
kind: "struct",
|
|
8958
|
-
fields: [
|
|
8959
|
-
{
|
|
8960
|
-
name: "proposal",
|
|
8961
|
-
type: "pubkey"
|
|
8962
|
-
},
|
|
8963
|
-
{
|
|
8964
|
-
name: "voter",
|
|
8965
|
-
type: "pubkey"
|
|
8966
|
-
},
|
|
8967
|
-
{
|
|
8968
|
-
name: "bump",
|
|
8969
|
-
type: "u8"
|
|
8970
|
-
},
|
|
8971
|
-
{
|
|
8972
|
-
name: "side",
|
|
8973
|
-
type: "u8"
|
|
8974
|
-
},
|
|
8975
|
-
{
|
|
8976
|
-
name: "voting_power",
|
|
8977
|
-
type: "u64"
|
|
8978
|
-
},
|
|
8979
|
-
{
|
|
8980
|
-
name: "claimed",
|
|
8981
|
-
type: "bool"
|
|
8982
|
-
},
|
|
8983
|
-
{
|
|
8984
|
-
name: "buffers",
|
|
8985
|
-
type: {
|
|
8986
|
-
array: [
|
|
8987
|
-
"u8",
|
|
8988
|
-
32
|
|
8989
|
-
]
|
|
8990
|
-
}
|
|
8991
|
-
}
|
|
8992
|
-
]
|
|
8993
|
-
}
|
|
8994
|
-
},
|
|
8995
|
-
{
|
|
8996
|
-
name: "VotingReward",
|
|
8997
|
-
type: {
|
|
8998
|
-
kind: "struct",
|
|
8999
|
-
fields: [
|
|
9000
|
-
{
|
|
9001
|
-
name: "reward_mint",
|
|
9002
|
-
type: "pubkey"
|
|
9003
|
-
},
|
|
9004
|
-
{
|
|
9005
|
-
name: "reward_vault",
|
|
9006
|
-
type: "pubkey"
|
|
9007
|
-
},
|
|
9008
|
-
{
|
|
9009
|
-
name: "reward_per_proposal",
|
|
9010
|
-
type: "u64"
|
|
9011
|
-
}
|
|
9012
|
-
]
|
|
9013
|
-
}
|
|
9014
8688
|
}
|
|
9015
8689
|
];
|
|
9016
8690
|
var constants = [
|
|
@@ -9093,14 +8767,11 @@ const DRIFT_PROGRAM_ID = new web3_js.PublicKey("dRiftyHA39MWEi3m9aunc5MzRF1JYuBs
|
|
|
9093
8767
|
const JUPITER_PROGRAM_ID = new web3_js.PublicKey("JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4");
|
|
9094
8768
|
const SANCTUM_STAKE_POOL_PROGRAM_ID = new web3_js.PublicKey("SP12tWFxD9oJsVWNavTTBZvMbA6gkAmxtVgxdqvyvhY");
|
|
9095
8769
|
const GOVERNANCE_PROGRAM_ID = new web3_js.PublicKey("GovaE4iu227srtG2s3tZzB4RmWBzw8sTwrCLZz7kN7rY");
|
|
8770
|
+
const JUP_VOTE_PROGRAM = new web3_js.PublicKey("voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj");
|
|
9096
8771
|
/**
|
|
9097
8772
|
* Stake pools
|
|
9098
8773
|
*/ const JITO_STAKE_POOL = new web3_js.PublicKey("Jito4APyf642JPZPx3hGc6WWJ8zPKtRbRs4P815Awbb");
|
|
9099
8774
|
const JUPSOL_STAKE_POOL = new web3_js.PublicKey("8VpRhuxa7sUUepdY3kQiTmX9rS5vx4WgaXiAnXq4KCtr");
|
|
9100
|
-
/**
|
|
9101
|
-
* JUP staking & voting
|
|
9102
|
-
*/ const JUP_STAKE_LOCKER = new web3_js.PublicKey("CVMdMd79no569tjc5Sq7kzz8isbfCcFyBS5TLGsrZ5dN");
|
|
9103
|
-
const JUP_VOTE_PROGRAM = new web3_js.PublicKey("voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj");
|
|
9104
8775
|
|
|
9105
8776
|
const GlamIntegrations = GlamIDLJson?.types?.find((t)=>t.name === "Integration")?.type?.variants?.map((v)=>v.name) ?? [];
|
|
9106
8777
|
const GlamPermissions = GlamIDLJson?.types?.find((t)=>t.name === "Permission")?.type?.variants?.map((v)=>v.name) ?? [];
|
|
@@ -10124,7 +9795,7 @@ class BaseClient {
|
|
|
10124
9795
|
})
|
|
10125
9796
|
];
|
|
10126
9797
|
}
|
|
10127
|
-
async intoVersionedTransaction(
|
|
9798
|
+
async intoVersionedTransaction(tx, { lookupTables, signer, computeUnitLimit, getPriorityFeeMicroLamports, maxFeeLamports, useMaxFee = false, jitoTipLamports, simulate = false }) {
|
|
10128
9799
|
signer = signer || this.getSigner();
|
|
10129
9800
|
const instructions = tx.instructions;
|
|
10130
9801
|
// Set Jito tip if provided
|
|
@@ -10135,14 +9806,15 @@ class BaseClient {
|
|
|
10135
9806
|
lamports: jitoTipLamports
|
|
10136
9807
|
}));
|
|
10137
9808
|
}
|
|
10138
|
-
const recentBlockhash = (
|
|
9809
|
+
const recentBlockhash = (await this.blockhashWithCache.get()).blockhash;
|
|
10139
9810
|
try {
|
|
10140
9811
|
computeUnitLimit = await getSimulationComputeUnits(this.provider.connection, instructions, signer, lookupTables);
|
|
10141
9812
|
} catch (e) {
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10145
|
-
|
|
9813
|
+
// by default, a simulation error doesn't prevent the tx from being sent
|
|
9814
|
+
// - when we run tests with failure cases, this RPC call fails with an incorrect error message so we should ignore it by default
|
|
9815
|
+
// - gui: wallet apps usually do the simulation themselves, we should ignore the simulation error here by default
|
|
9816
|
+
// - cli: we should set simulate=true
|
|
9817
|
+
if (simulate) throw e;
|
|
10146
9818
|
}
|
|
10147
9819
|
if (computeUnitLimit) {
|
|
10148
9820
|
const vTx = new web3_js.VersionedTransaction(new web3_js.TransactionMessage({
|
|
@@ -10192,6 +9864,7 @@ class BaseClient {
|
|
|
10192
9864
|
skipPreflight: true
|
|
10193
9865
|
});
|
|
10194
9866
|
// await confirmation
|
|
9867
|
+
console.log("Confirming tx:", txSig);
|
|
10195
9868
|
const latestBlockhash = await this.blockhashWithCache.get();
|
|
10196
9869
|
const res = await connection.confirmTransaction({
|
|
10197
9870
|
...latestBlockhash,
|
|
@@ -10600,99 +10273,97 @@ class DriftClient {
|
|
|
10600
10273
|
}
|
|
10601
10274
|
/*
|
|
10602
10275
|
* API methods
|
|
10603
|
-
*/ async initializeTx(
|
|
10604
|
-
const
|
|
10605
|
-
|
|
10606
|
-
const
|
|
10607
|
-
const
|
|
10608
|
-
|
|
10276
|
+
*/ async initializeTx(glamState, txOptions = {}) {
|
|
10277
|
+
const glamSigner = txOptions.signer || this.base.getSigner();
|
|
10278
|
+
this.base.getVaultPda(glamState);
|
|
10279
|
+
const [user, userStats] = this.getUser(glamState);
|
|
10280
|
+
const state = await sdk.getDriftStateAccountPublicKey(this.DRIFT_PROGRAM);
|
|
10281
|
+
const GLAM_NAME = "GLAM *.+".split("").concat(Array(24).fill(0));
|
|
10282
|
+
const initializeUserIx = await this.base.program.methods//@ts-ignore
|
|
10283
|
+
.driftInitializeUser(0, GLAM_NAME).accounts({
|
|
10284
|
+
glamState,
|
|
10609
10285
|
user,
|
|
10610
10286
|
userStats,
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
}).
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10287
|
+
state,
|
|
10288
|
+
glamSigner
|
|
10289
|
+
}).instruction();
|
|
10290
|
+
const tx = await this.base.program.methods.driftInitializeUserStats().accounts({
|
|
10291
|
+
glamState,
|
|
10292
|
+
state,
|
|
10293
|
+
userStats,
|
|
10294
|
+
glamSigner
|
|
10295
|
+
}).postInstructions([
|
|
10296
|
+
initializeUserIx
|
|
10297
|
+
]).transaction();
|
|
10298
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
10618
10299
|
}
|
|
10619
|
-
async updateUserCustomMarginRatioTx(
|
|
10620
|
-
const
|
|
10621
|
-
|
|
10300
|
+
async updateUserCustomMarginRatioTx(glamState, maxLeverage, subAccountId = 0, txOptions = {}) {
|
|
10301
|
+
const glamSigner = txOptions.signer || this.base.getSigner();
|
|
10302
|
+
this.base.getVaultPda(glamState);
|
|
10303
|
+
const [user] = this.getUser(glamState, subAccountId);
|
|
10622
10304
|
// https://github.com/drift-labs/protocol-v2/blob/babed162b08b1fe34e49a81c5aa3e4ec0a88ecdf/programs/drift/src/math/constants.rs#L183-L184
|
|
10623
10305
|
const marginRatio = DRIFT_MARGIN_PRECISION / maxLeverage;
|
|
10624
|
-
const tx = await this.base.program.methods.driftUpdateUserCustomMarginRatio(subAccountId, marginRatio).
|
|
10625
|
-
|
|
10626
|
-
|
|
10627
|
-
|
|
10306
|
+
const tx = await this.base.program.methods.driftUpdateUserCustomMarginRatio(subAccountId, marginRatio).accounts({
|
|
10307
|
+
glamState,
|
|
10308
|
+
glamSigner,
|
|
10309
|
+
user
|
|
10628
10310
|
}).transaction();
|
|
10629
|
-
return await this.base.intoVersionedTransaction(
|
|
10630
|
-
tx,
|
|
10631
|
-
...txOptions
|
|
10632
|
-
});
|
|
10311
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
10633
10312
|
}
|
|
10634
|
-
async updateUserMarginTradingEnabledTx(
|
|
10635
|
-
const
|
|
10636
|
-
const [user] = this.getUser(
|
|
10637
|
-
const tx = await this.base.program.methods.driftUpdateUserMarginTradingEnabled(subAccountId, marginTradingEnabled).
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10313
|
+
async updateUserMarginTradingEnabledTx(glamState, marginTradingEnabled, subAccountId = 0, txOptions = {}) {
|
|
10314
|
+
const glamSigner = txOptions.signer || this.base.getSigner();
|
|
10315
|
+
const [user] = this.getUser(glamState, subAccountId);
|
|
10316
|
+
const tx = await this.base.program.methods.driftUpdateUserMarginTradingEnabled(subAccountId, marginTradingEnabled).accounts({
|
|
10317
|
+
glamState,
|
|
10318
|
+
glamSigner,
|
|
10319
|
+
user
|
|
10641
10320
|
}).transaction();
|
|
10642
|
-
return await this.base.intoVersionedTransaction(
|
|
10643
|
-
tx,
|
|
10644
|
-
...txOptions
|
|
10645
|
-
});
|
|
10321
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
10646
10322
|
}
|
|
10647
|
-
async updateUserDelegateTx(
|
|
10648
|
-
const
|
|
10649
|
-
const [user] = this.getUser(
|
|
10650
|
-
const tx = await this.base.program.methods.driftUpdateUserDelegate(subAccountId, delegate).
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10323
|
+
async updateUserDelegateTx(glamState, delegate, subAccountId = 0, txOptions = {}) {
|
|
10324
|
+
const glamSigner = txOptions.signer || this.base.getSigner();
|
|
10325
|
+
const [user] = this.getUser(glamState, subAccountId);
|
|
10326
|
+
const tx = await this.base.program.methods.driftUpdateUserDelegate(subAccountId, delegate).accounts({
|
|
10327
|
+
glamState,
|
|
10328
|
+
glamSigner,
|
|
10329
|
+
user
|
|
10654
10330
|
}).transaction();
|
|
10655
|
-
return await this.base.intoVersionedTransaction(
|
|
10656
|
-
tx,
|
|
10657
|
-
...txOptions
|
|
10658
|
-
});
|
|
10331
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
10659
10332
|
}
|
|
10660
|
-
async deleteUserTx(
|
|
10661
|
-
const
|
|
10662
|
-
const [user, userStats] = this.getUser(
|
|
10663
|
-
const
|
|
10333
|
+
async deleteUserTx(glamState, subAccountId = 0, txOptions = {}) {
|
|
10334
|
+
const glamSigner = txOptions.signer || this.base.getSigner();
|
|
10335
|
+
const [user, userStats] = this.getUser(glamState, subAccountId);
|
|
10336
|
+
const state = await sdk.getDriftStateAccountPublicKey(this.DRIFT_PROGRAM);
|
|
10664
10337
|
const tx = await this.base.program.methods.driftDeleteUser().accounts({
|
|
10665
|
-
|
|
10338
|
+
glamState,
|
|
10339
|
+
state,
|
|
10666
10340
|
user,
|
|
10667
10341
|
userStats,
|
|
10668
|
-
|
|
10669
|
-
signer
|
|
10342
|
+
glamSigner
|
|
10670
10343
|
}).transaction();
|
|
10671
|
-
return await this.base.intoVersionedTransaction(
|
|
10672
|
-
tx,
|
|
10673
|
-
...txOptions
|
|
10674
|
-
});
|
|
10344
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
10675
10345
|
}
|
|
10676
10346
|
async depositTx(statePda, amount, marketIndex = 1, subAccountId = 0, marketConfigs, txOptions = {}) {
|
|
10677
|
-
const
|
|
10347
|
+
const glamSigner = txOptions.signer || this.base.getSigner();
|
|
10678
10348
|
const [user, userStats] = this.getUser(statePda, subAccountId);
|
|
10679
|
-
const
|
|
10349
|
+
const state = await sdk.getDriftStateAccountPublicKey(this.DRIFT_PROGRAM);
|
|
10680
10350
|
const { mint, oracle, marketPDA, vaultPDA } = marketConfigs.spot[marketIndex];
|
|
10681
10351
|
const preInstructions = [];
|
|
10682
10352
|
if (mint === WSOL.toBase58()) {
|
|
10683
|
-
const wrapSolIx = await this.base.maybeWrapSol(statePda, amount,
|
|
10353
|
+
const wrapSolIx = await this.base.maybeWrapSol(statePda, amount, glamSigner);
|
|
10684
10354
|
if (wrapSolIx) {
|
|
10685
10355
|
preInstructions.push(wrapSolIx);
|
|
10686
10356
|
}
|
|
10687
10357
|
}
|
|
10688
|
-
const tx = await this.base.program.methods.driftDeposit(marketIndex, amount).
|
|
10689
|
-
|
|
10690
|
-
|
|
10691
|
-
driftAta: new web3_js.PublicKey(vaultPDA),
|
|
10358
|
+
const tx = await this.base.program.methods.driftDeposit(marketIndex, amount, false).accounts({
|
|
10359
|
+
glamState: statePda,
|
|
10360
|
+
state,
|
|
10692
10361
|
user,
|
|
10693
10362
|
userStats,
|
|
10694
|
-
|
|
10695
|
-
|
|
10363
|
+
spotMarketVault: new web3_js.PublicKey(vaultPDA),
|
|
10364
|
+
userTokenAccount: this.base.getVaultAta(statePda, new web3_js.PublicKey(mint)),
|
|
10365
|
+
glamSigner,
|
|
10366
|
+
tokenProgram: splToken.TOKEN_PROGRAM_ID
|
|
10696
10367
|
}).remainingAccounts([
|
|
10697
10368
|
{
|
|
10698
10369
|
pubkey: new web3_js.PublicKey(oracle),
|
|
@@ -10705,15 +10376,12 @@ class DriftClient {
|
|
|
10705
10376
|
isWritable: true
|
|
10706
10377
|
}
|
|
10707
10378
|
]).preInstructions(preInstructions).transaction();
|
|
10708
|
-
return await this.base.intoVersionedTransaction(
|
|
10709
|
-
tx,
|
|
10710
|
-
...txOptions
|
|
10711
|
-
});
|
|
10379
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
10712
10380
|
}
|
|
10713
10381
|
async withdrawTx(statePda, amount, marketIndex = 1, subAccountId = 0, marketConfigs, txOptions = {}) {
|
|
10714
|
-
const
|
|
10382
|
+
const glamSigner = txOptions.signer || this.base.getSigner();
|
|
10715
10383
|
const [user, userStats] = this.getUser(statePda, subAccountId);
|
|
10716
|
-
const
|
|
10384
|
+
const state = await sdk.getDriftStateAccountPublicKey(this.DRIFT_PROGRAM);
|
|
10717
10385
|
const { mint: m, vaultPDA: d } = marketConfigs.spot[marketIndex];
|
|
10718
10386
|
const mint = new web3_js.PublicKey(m);
|
|
10719
10387
|
const driftAta = new web3_js.PublicKey(d); // drift vault ata
|
|
@@ -10723,42 +10391,37 @@ class DriftClient {
|
|
|
10723
10391
|
const { tokenProgram } = await this.base.fetchMintWithOwner(mint);
|
|
10724
10392
|
// Create vault ata in case it doesn't exist
|
|
10725
10393
|
const preInstructions = [
|
|
10726
|
-
splToken.createAssociatedTokenAccountIdempotentInstruction(
|
|
10394
|
+
splToken.createAssociatedTokenAccountIdempotentInstruction(glamSigner, vaultAta, vault, mint, tokenProgram)
|
|
10727
10395
|
];
|
|
10728
|
-
const tx = await this.base.program.methods.driftWithdraw(marketIndex, amount).
|
|
10729
|
-
|
|
10730
|
-
|
|
10731
|
-
driftAta,
|
|
10396
|
+
const tx = await this.base.program.methods.driftWithdraw(marketIndex, amount, false).accounts({
|
|
10397
|
+
glamState: statePda,
|
|
10398
|
+
state,
|
|
10732
10399
|
user,
|
|
10733
10400
|
userStats,
|
|
10734
|
-
|
|
10735
|
-
|
|
10736
|
-
|
|
10401
|
+
glamSigner,
|
|
10402
|
+
spotMarketVault: driftAta,
|
|
10403
|
+
userTokenAccount: vaultAta,
|
|
10404
|
+
driftSigner: DRIFT_VAULT,
|
|
10405
|
+
tokenProgram: splToken.TOKEN_PROGRAM_ID
|
|
10737
10406
|
}).remainingAccounts(remainingAccounts).preInstructions(preInstructions).transaction();
|
|
10738
|
-
return await this.base.intoVersionedTransaction(
|
|
10739
|
-
tx,
|
|
10740
|
-
...txOptions
|
|
10741
|
-
});
|
|
10407
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
10742
10408
|
}
|
|
10743
|
-
async placeOrderTx(
|
|
10409
|
+
async placeOrderTx(glamState, orderParams, subAccountId = 0, marketConfigs, txOptions = {}) {
|
|
10744
10410
|
const { marketIndex, marketType } = orderParams;
|
|
10745
|
-
const remainingAccounts = await this.composeRemainingAccounts(
|
|
10746
|
-
const
|
|
10747
|
-
const [user] = this.getUser(
|
|
10748
|
-
const
|
|
10411
|
+
const remainingAccounts = await this.composeRemainingAccounts(glamState, subAccountId, marketConfigs, marketType, marketIndex);
|
|
10412
|
+
const glamSigner = txOptions.signer || this.base.getSigner();
|
|
10413
|
+
const [user] = this.getUser(glamState, subAccountId);
|
|
10414
|
+
const state = await sdk.getDriftStateAccountPublicKey(this.DRIFT_PROGRAM);
|
|
10749
10415
|
const tx = await this.base.program.methods// @ts-ignore
|
|
10750
10416
|
.driftPlaceOrders([
|
|
10751
10417
|
orderParams
|
|
10752
|
-
]).
|
|
10753
|
-
|
|
10418
|
+
]).accounts({
|
|
10419
|
+
glamState,
|
|
10754
10420
|
user,
|
|
10755
|
-
|
|
10756
|
-
|
|
10421
|
+
state,
|
|
10422
|
+
glamSigner
|
|
10757
10423
|
}).remainingAccounts(remainingAccounts).transaction();
|
|
10758
|
-
return await this.base.intoVersionedTransaction(
|
|
10759
|
-
tx,
|
|
10760
|
-
...txOptions
|
|
10761
|
-
});
|
|
10424
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
10762
10425
|
}
|
|
10763
10426
|
async modifyOrderTx(statePda, modifyOrderParams, subAccountId = 0, marketConfigs, txOptions = {}) {
|
|
10764
10427
|
// const { marketIndex, marketType } = orderParams;
|
|
@@ -10773,22 +10436,18 @@ class DriftClient {
|
|
|
10773
10436
|
const [user] = this.getUser(statePda, subAccountId);
|
|
10774
10437
|
const driftState = await sdk.getDriftStateAccountPublicKey(this.DRIFT_PROGRAM);
|
|
10775
10438
|
const tx = await this.base.program.methods// @ts-ignore
|
|
10776
|
-
.driftModifyOrder(1, modifyOrderParams).
|
|
10439
|
+
.driftModifyOrder(1, modifyOrderParams).accounts({
|
|
10777
10440
|
glamState: statePda,
|
|
10778
10441
|
glamSigner: signer,
|
|
10779
10442
|
user,
|
|
10780
|
-
state: driftState
|
|
10781
|
-
authority: this.base.getVaultPda(statePda)
|
|
10443
|
+
state: driftState
|
|
10782
10444
|
})// .remainingAccounts(remainingAccounts)
|
|
10783
10445
|
.transaction();
|
|
10784
|
-
return await this.base.intoVersionedTransaction(
|
|
10785
|
-
tx,
|
|
10786
|
-
...txOptions
|
|
10787
|
-
});
|
|
10446
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
10788
10447
|
}
|
|
10789
10448
|
async cancelOrdersTx(glamState, marketType, marketIndex, direction, subAccountId = 0, marketConfigs, txOptions = {}) {
|
|
10790
10449
|
const glamSigner = txOptions.signer || this.base.getSigner();
|
|
10791
|
-
|
|
10450
|
+
this.base.getVaultPda(glamState);
|
|
10792
10451
|
const [user] = this.getUser(glamState, subAccountId);
|
|
10793
10452
|
const driftState = await sdk.getDriftStateAccountPublicKey(this.DRIFT_PROGRAM);
|
|
10794
10453
|
const remainingAccounts = await this.composeRemainingAccounts(glamState, subAccountId, marketConfigs, marketType, marketIndex);
|
|
@@ -10797,17 +10456,12 @@ class DriftClient {
|
|
|
10797
10456
|
glamState,
|
|
10798
10457
|
glamSigner,
|
|
10799
10458
|
user,
|
|
10800
|
-
state: driftState
|
|
10801
|
-
authority: glamVault
|
|
10459
|
+
state: driftState
|
|
10802
10460
|
}).remainingAccounts(remainingAccounts).transaction();
|
|
10803
|
-
return await this.base.intoVersionedTransaction(
|
|
10804
|
-
tx,
|
|
10805
|
-
...txOptions
|
|
10806
|
-
});
|
|
10461
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
10807
10462
|
}
|
|
10808
10463
|
async cancelOrdersByIdsTx(glamState, orderIds, subAccountId = 0, marketConfigs, txOptions = {}) {
|
|
10809
10464
|
const glamSigner = txOptions.signer || this.base.getSigner();
|
|
10810
|
-
const glamVault = this.base.getVaultPda(glamState);
|
|
10811
10465
|
const [user] = this.getUser(glamState, subAccountId);
|
|
10812
10466
|
const driftState = await sdk.getDriftStateAccountPublicKey(this.DRIFT_PROGRAM);
|
|
10813
10467
|
const remainingAccounts = await this.composeRemainingAccounts(glamState, subAccountId, marketConfigs);
|
|
@@ -10815,13 +10469,9 @@ class DriftClient {
|
|
|
10815
10469
|
glamState,
|
|
10816
10470
|
glamSigner,
|
|
10817
10471
|
user,
|
|
10818
|
-
state: driftState
|
|
10819
|
-
authority: glamVault
|
|
10472
|
+
state: driftState
|
|
10820
10473
|
}).remainingAccounts(remainingAccounts).transaction();
|
|
10821
|
-
return await this.base.intoVersionedTransaction(
|
|
10822
|
-
tx,
|
|
10823
|
-
...txOptions
|
|
10824
|
-
});
|
|
10474
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
10825
10475
|
}
|
|
10826
10476
|
constructor(base){
|
|
10827
10477
|
this.base = base;
|
|
@@ -10921,10 +10571,7 @@ class InvestorClient {
|
|
|
10921
10571
|
// signerAccountPolicy: null,
|
|
10922
10572
|
signer
|
|
10923
10573
|
}).remainingAccounts(remainingAccounts).preInstructions(preInstructions).transaction();
|
|
10924
|
-
return await this.base.intoVersionedTransaction(
|
|
10925
|
-
tx,
|
|
10926
|
-
...txOptions
|
|
10927
|
-
});
|
|
10574
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
10928
10575
|
}
|
|
10929
10576
|
async redeemTx(statePda, amount, inKind = false, stateModel, mintId = 0, skipState = true, txOptions = {}) {
|
|
10930
10577
|
const signer = txOptions.signer || this.base.getSigner();
|
|
@@ -10986,16 +10633,14 @@ class InvestorClient {
|
|
|
10986
10633
|
// signerAccountPolicy: null,
|
|
10987
10634
|
signer
|
|
10988
10635
|
}).remainingAccounts(remainingAccounts).preInstructions(preInstructions).transaction();
|
|
10989
|
-
return await this.base.intoVersionedTransaction(
|
|
10990
|
-
tx,
|
|
10991
|
-
...txOptions
|
|
10992
|
-
});
|
|
10636
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
10993
10637
|
}
|
|
10994
10638
|
constructor(base){
|
|
10995
10639
|
this.base = base;
|
|
10996
10640
|
}
|
|
10997
10641
|
}
|
|
10998
10642
|
|
|
10643
|
+
const BASE = new web3_js.PublicKey("bJ1TRoFo2P6UHVwqdiipp6Qhp2HaaHpLowZ5LHet8Gm");
|
|
10999
10644
|
class JupiterSwapClient {
|
|
11000
10645
|
/*
|
|
11001
10646
|
* Client methods
|
|
@@ -11003,6 +10648,10 @@ class JupiterSwapClient {
|
|
|
11003
10648
|
const tx = await this.swapTx(statePda, quoteParams, quoteResponse, swapInstructions, txOptions);
|
|
11004
10649
|
return await this.base.sendAndConfirm(tx);
|
|
11005
10650
|
}
|
|
10651
|
+
async setMaxSwapSlippage(statePda, slippageBps, txOptions = {}) {
|
|
10652
|
+
const tx = await this.setMaxSwapSlippageTx(statePda, slippageBps, txOptions);
|
|
10653
|
+
return await this.base.sendAndConfirm(tx);
|
|
10654
|
+
}
|
|
11006
10655
|
/*
|
|
11007
10656
|
* API methods
|
|
11008
10657
|
*/ async swapTx(statePda, quoteParams, quoteResponse, swapInstructions, txOptions = {}) {
|
|
@@ -11030,32 +10679,38 @@ class JupiterSwapClient {
|
|
|
11030
10679
|
}
|
|
11031
10680
|
const lookupTables = await this.base.getAdressLookupTableAccounts(addressLookupTableAddresses);
|
|
11032
10681
|
const swapIx = this.toTransactionInstruction(swapInstruction, vault.toBase58());
|
|
11033
|
-
const inputTokenProgram = await
|
|
11034
|
-
|
|
10682
|
+
const [inputTokenProgram, outputTokenProgram] = await Promise.all([
|
|
10683
|
+
this.getTokenProgram(inputMint),
|
|
10684
|
+
this.getTokenProgram(outputMint)
|
|
10685
|
+
]);
|
|
11035
10686
|
const inputStakePool = ASSETS_MAINNET.get(inputMint.toBase58())?.stateAccount || null;
|
|
11036
10687
|
const outputStakePool = ASSETS_MAINNET.get(outputMint.toBase58())?.stateAccount || null;
|
|
11037
10688
|
const preInstructions = await this.getPreInstructions(statePda, signer, inputMint, outputMint, amount, inputTokenProgram, outputTokenProgram);
|
|
11038
|
-
|
|
11039
|
-
const tx = await this.base.program.methods.jupiterSwap(amount, swapIx.data).accountsPartial({
|
|
10689
|
+
const tx = await this.base.program.methods.jupiterSwap(amount, swapIx.data).accounts({
|
|
11040
10690
|
state: statePda,
|
|
11041
10691
|
signer,
|
|
11042
|
-
vault,
|
|
11043
|
-
inputVaultAta: this.base.getVaultAta(statePda, inputMint, inputTokenProgram),
|
|
11044
|
-
outputVaultAta: this.base.getVaultAta(statePda, outputMint, outputTokenProgram),
|
|
11045
10692
|
inputMint,
|
|
11046
10693
|
outputMint,
|
|
11047
10694
|
inputTokenProgram,
|
|
11048
10695
|
outputTokenProgram,
|
|
11049
10696
|
inputStakePool,
|
|
11050
|
-
outputStakePool
|
|
11051
|
-
jupiterProgram: JUPITER_PROGRAM_ID
|
|
10697
|
+
outputStakePool
|
|
11052
10698
|
}).remainingAccounts(swapIx.keys).preInstructions(preInstructions).transaction();
|
|
11053
|
-
return this.base.intoVersionedTransaction({
|
|
11054
|
-
tx,
|
|
10699
|
+
return this.base.intoVersionedTransaction(tx, {
|
|
11055
10700
|
lookupTables,
|
|
11056
10701
|
...txOptions
|
|
11057
10702
|
});
|
|
11058
10703
|
}
|
|
10704
|
+
async setMaxSwapSlippageTx(statePda, slippageBps, txOptions = {}) {
|
|
10705
|
+
const signer = txOptions.signer || this.base.getSigner();
|
|
10706
|
+
const tx = await this.base.program.methods.jupiterSetMaxSwapSlippage(new anchor.BN(slippageBps)).accounts({
|
|
10707
|
+
state: statePda,
|
|
10708
|
+
signer
|
|
10709
|
+
}).transaction();
|
|
10710
|
+
return this.base.intoVersionedTransaction(tx, {
|
|
10711
|
+
...txOptions
|
|
10712
|
+
});
|
|
10713
|
+
}
|
|
11059
10714
|
async getQuoteResponse(quoteParams) {
|
|
11060
10715
|
const res = await fetch(`${this.base.jupiterApi}/quote?` + new URLSearchParams(Object.entries(quoteParams).map(([key, val])=>[
|
|
11061
10716
|
key,
|
|
@@ -11086,25 +10741,11 @@ class JupiterSwapClient {
|
|
|
11086
10741
|
this./*
|
|
11087
10742
|
* Utils
|
|
11088
10743
|
*/ getPreInstructions = async (statePda, signer, inputMint, outputMint, amount, inputTokenProgram = splToken.TOKEN_PROGRAM_ID, outputTokenProgram = splToken.TOKEN_PROGRAM_ID)=>{
|
|
11089
|
-
|
|
11090
|
-
const
|
|
11091
|
-
|
|
11092
|
-
|
|
11093
|
-
ata: this.base.getVaultAta(statePda, outputMint, outputTokenProgram),
|
|
11094
|
-
owner: this.base.getVaultPda(statePda),
|
|
11095
|
-
mint: outputMint,
|
|
11096
|
-
tokenProgram: outputTokenProgram
|
|
11097
|
-
}
|
|
10744
|
+
const vault = this.base.getVaultPda(statePda);
|
|
10745
|
+
const ata = this.base.getAta(outputMint, vault, outputTokenProgram);
|
|
10746
|
+
const preInstructions = [
|
|
10747
|
+
splToken.createAssociatedTokenAccountIdempotentInstruction(signer, ata, vault, outputMint, outputTokenProgram)
|
|
11098
10748
|
];
|
|
11099
|
-
for (const { payer, ata, owner, mint, tokenProgram } of ataParams){
|
|
11100
|
-
// const ataAccountInfo = await this.base.provider.connection.getAccountInfo(
|
|
11101
|
-
// ata
|
|
11102
|
-
// );
|
|
11103
|
-
// if (ataAccountInfo) {
|
|
11104
|
-
// continue;
|
|
11105
|
-
// }
|
|
11106
|
-
preInstructions.push(splToken.createAssociatedTokenAccountIdempotentInstruction(payer, ata, owner, mint, tokenProgram));
|
|
11107
|
-
}
|
|
11108
10749
|
// Transfer SOL to wSOL ATA if needed for the vault
|
|
11109
10750
|
if (inputMint.equals(WSOL)) {
|
|
11110
10751
|
const wrapSolIx = await this.base.maybeWrapSol(statePda, amount, signer);
|
|
@@ -11163,27 +10804,27 @@ class JupiterVoteClient {
|
|
|
11163
10804
|
const preInstructions = txOptions.preInstructions || [];
|
|
11164
10805
|
if (!escrowCreated) {
|
|
11165
10806
|
console.log("Will create escrow account:", escrow.toBase58());
|
|
11166
|
-
preInstructions.push(await this.base.program.methods.
|
|
11167
|
-
|
|
11168
|
-
locker:
|
|
10807
|
+
preInstructions.push(await this.base.program.methods.jupiterVoteNewEscrow().accounts({
|
|
10808
|
+
glamState: statePda,
|
|
10809
|
+
locker: this.stakeLocker,
|
|
11169
10810
|
escrow
|
|
11170
10811
|
}).instruction());
|
|
11171
|
-
preInstructions.push(await this.base.program.methods.
|
|
11172
|
-
|
|
11173
|
-
locker:
|
|
10812
|
+
preInstructions.push(await this.base.program.methods.jupiterVoteToggleMaxLock(true).accounts({
|
|
10813
|
+
glamState: statePda,
|
|
10814
|
+
locker: this.stakeLocker,
|
|
11174
10815
|
escrow
|
|
11175
10816
|
}).instruction());
|
|
11176
10817
|
}
|
|
11177
10818
|
preInstructions.push(splToken.createAssociatedTokenAccountIdempotentInstruction(this.base.getSigner(), escrowJupAta, escrow, JUP));
|
|
11178
|
-
const tx = await this.base.program.methods.
|
|
11179
|
-
|
|
11180
|
-
locker:
|
|
10819
|
+
const tx = await this.base.program.methods.jupiterVoteIncreaseLockedAmount(amount).accounts({
|
|
10820
|
+
glamState: statePda,
|
|
10821
|
+
locker: this.stakeLocker,
|
|
11181
10822
|
escrow,
|
|
11182
|
-
escrowJupAta,
|
|
11183
|
-
vaultJupAta
|
|
10823
|
+
escrowTokens: escrowJupAta,
|
|
10824
|
+
sourceTokens: vaultJupAta,
|
|
10825
|
+
tokenProgram: splToken.TOKEN_PROGRAM_ID
|
|
11184
10826
|
}).preInstructions(preInstructions).transaction();
|
|
11185
|
-
const vTx = await this.base.intoVersionedTransaction({
|
|
11186
|
-
tx,
|
|
10827
|
+
const vTx = await this.base.intoVersionedTransaction(tx, {
|
|
11187
10828
|
...txOptions
|
|
11188
10829
|
});
|
|
11189
10830
|
return await this.base.sendAndConfirm(vTx);
|
|
@@ -11198,13 +10839,12 @@ class JupiterVoteClient {
|
|
|
11198
10839
|
async unstakeJup(statePda, txOptions = {}) {
|
|
11199
10840
|
const vault = this.base.getVaultPda(statePda);
|
|
11200
10841
|
const escrow = this.getEscrowPda(vault);
|
|
11201
|
-
const tx = await this.base.program.methods.
|
|
11202
|
-
|
|
11203
|
-
locker:
|
|
10842
|
+
const tx = await this.base.program.methods.jupiterVoteToggleMaxLock(false).accounts({
|
|
10843
|
+
glamState: statePda,
|
|
10844
|
+
locker: this.stakeLocker,
|
|
11204
10845
|
escrow
|
|
11205
10846
|
}).transaction();
|
|
11206
|
-
const vTx = await this.base.intoVersionedTransaction({
|
|
11207
|
-
tx,
|
|
10847
|
+
const vTx = await this.base.intoVersionedTransaction(tx, {
|
|
11208
10848
|
...txOptions
|
|
11209
10849
|
});
|
|
11210
10850
|
return await this.base.sendAndConfirm(vTx);
|
|
@@ -11214,17 +10854,30 @@ class JupiterVoteClient {
|
|
|
11214
10854
|
const escrow = this.getEscrowPda(vault);
|
|
11215
10855
|
const escrowJupAta = this.base.getAta(JUP, escrow);
|
|
11216
10856
|
const vaultJupAta = this.base.getAta(JUP, vault);
|
|
11217
|
-
const tx = await this.base.program.methods.
|
|
11218
|
-
|
|
11219
|
-
locker:
|
|
10857
|
+
const tx = await this.base.program.methods.jupiterVoteWithdraw().accounts({
|
|
10858
|
+
glamState: statePda,
|
|
10859
|
+
locker: this.stakeLocker,
|
|
11220
10860
|
escrow,
|
|
11221
|
-
escrowJupAta,
|
|
11222
|
-
vaultJupAta
|
|
10861
|
+
escrowTokens: escrowJupAta,
|
|
10862
|
+
destinationTokens: vaultJupAta,
|
|
10863
|
+
tokenProgram: splToken.TOKEN_PROGRAM_ID
|
|
11223
10864
|
}).preInstructions([
|
|
11224
10865
|
splToken.createAssociatedTokenAccountIdempotentInstruction(this.base.getSigner(), vaultJupAta, vault, JUP)
|
|
11225
10866
|
]).transaction();
|
|
11226
|
-
const vTx = await this.base.intoVersionedTransaction({
|
|
11227
|
-
|
|
10867
|
+
const vTx = await this.base.intoVersionedTransaction(tx, {
|
|
10868
|
+
...txOptions
|
|
10869
|
+
});
|
|
10870
|
+
return await this.base.sendAndConfirm(vTx);
|
|
10871
|
+
}
|
|
10872
|
+
async cancelUnstake(statePda, txOptions = {}) {
|
|
10873
|
+
const vault = this.base.getVaultPda(statePda);
|
|
10874
|
+
const escrow = this.getEscrowPda(vault);
|
|
10875
|
+
const tx = await this.base.program.methods.jupiterVoteToggleMaxLock(true).accounts({
|
|
10876
|
+
glamState: statePda,
|
|
10877
|
+
locker: this.stakeLocker,
|
|
10878
|
+
escrow
|
|
10879
|
+
}).transaction();
|
|
10880
|
+
const vTx = await this.base.intoVersionedTransaction(tx, {
|
|
11228
10881
|
...txOptions
|
|
11229
10882
|
});
|
|
11230
10883
|
return await this.base.sendAndConfirm(vTx);
|
|
@@ -11234,49 +10887,59 @@ class JupiterVoteClient {
|
|
|
11234
10887
|
*
|
|
11235
10888
|
* @param statePda
|
|
11236
10889
|
* @param proposal
|
|
11237
|
-
* @param governor
|
|
11238
10890
|
* @param side
|
|
11239
10891
|
* @param txOptions
|
|
11240
10892
|
* @returns
|
|
11241
|
-
*/ async voteOnProposal(
|
|
11242
|
-
const
|
|
10893
|
+
*/ async voteOnProposal(glamState, proposal, side, txOptions = {}) {
|
|
10894
|
+
const glamVault = this.base.getVaultPda(glamState);
|
|
11243
10895
|
const [vote] = web3_js.PublicKey.findProgramAddressSync([
|
|
11244
10896
|
Buffer.from("Vote"),
|
|
11245
10897
|
proposal.toBuffer(),
|
|
11246
|
-
|
|
10898
|
+
glamVault.toBuffer()
|
|
10899
|
+
], GOVERNANCE_PROGRAM_ID);
|
|
10900
|
+
const [governor] = web3_js.PublicKey.findProgramAddressSync([
|
|
10901
|
+
Buffer.from("Governor"),
|
|
10902
|
+
BASE.toBuffer()
|
|
11247
10903
|
], GOVERNANCE_PROGRAM_ID);
|
|
11248
10904
|
const voteAccountInfo = await this.base.provider.connection.getAccountInfo(vote);
|
|
11249
10905
|
const voteCreated = voteAccountInfo ? true : false;
|
|
11250
10906
|
const preInstructions = [];
|
|
11251
10907
|
if (!voteCreated) {
|
|
11252
10908
|
console.log("Will create vote account:", vote.toBase58());
|
|
11253
|
-
preInstructions.push(await this.base.program.methods.
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
10909
|
+
preInstructions.push(await this.base.program.methods.jupiterGovNewVote(glamVault).accountsPartial({
|
|
10910
|
+
glamState,
|
|
10911
|
+
proposal,
|
|
10912
|
+
vote
|
|
11257
10913
|
}).instruction());
|
|
11258
10914
|
}
|
|
11259
|
-
const escrow = this.getEscrowPda(
|
|
11260
|
-
const tx = await this.base.program.methods.
|
|
11261
|
-
|
|
10915
|
+
const escrow = this.getEscrowPda(glamVault);
|
|
10916
|
+
const tx = await this.base.program.methods.jupiterVoteCastVote(side).accounts({
|
|
10917
|
+
glamState,
|
|
11262
10918
|
escrow,
|
|
11263
10919
|
proposal,
|
|
11264
10920
|
vote,
|
|
11265
|
-
locker:
|
|
11266
|
-
governor
|
|
10921
|
+
locker: this.stakeLocker,
|
|
10922
|
+
governor,
|
|
10923
|
+
governProgram: GOVERNANCE_PROGRAM_ID
|
|
11267
10924
|
}).transaction();
|
|
11268
|
-
const vTx = await this.base.intoVersionedTransaction({
|
|
11269
|
-
tx,
|
|
10925
|
+
const vTx = await this.base.intoVersionedTransaction(tx, {
|
|
11270
10926
|
...txOptions
|
|
11271
10927
|
});
|
|
11272
10928
|
return await this.base.sendAndConfirm(vTx);
|
|
11273
10929
|
}
|
|
11274
10930
|
/*
|
|
11275
10931
|
* Utils
|
|
11276
|
-
*/
|
|
10932
|
+
*/ get stakeLocker() {
|
|
10933
|
+
const [locker] = web3_js.PublicKey.findProgramAddressSync([
|
|
10934
|
+
Buffer.from("Locker"),
|
|
10935
|
+
BASE.toBuffer()
|
|
10936
|
+
], JUP_VOTE_PROGRAM);
|
|
10937
|
+
return locker;
|
|
10938
|
+
}
|
|
10939
|
+
getEscrowPda(owner) {
|
|
11277
10940
|
const [escrow] = web3_js.PublicKey.findProgramAddressSync([
|
|
11278
10941
|
Buffer.from("Escrow"),
|
|
11279
|
-
|
|
10942
|
+
this.stakeLocker.toBuffer(),
|
|
11280
10943
|
owner.toBuffer()
|
|
11281
10944
|
], JUP_VOTE_PROGRAM);
|
|
11282
10945
|
return escrow;
|
|
@@ -11416,10 +11079,7 @@ class MarinadeClient {
|
|
|
11416
11079
|
mintTo: vaultMsolAta,
|
|
11417
11080
|
marinadeProgram: MARINADE_PROGRAM_ID
|
|
11418
11081
|
}).transaction();
|
|
11419
|
-
return await this.base.intoVersionedTransaction(
|
|
11420
|
-
tx,
|
|
11421
|
-
...txOptions
|
|
11422
|
-
});
|
|
11082
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
11423
11083
|
}
|
|
11424
11084
|
async depositStakeTx(statePda, stakeAccount, txOptions) {
|
|
11425
11085
|
const signer = txOptions.signer || this.base.getSigner();
|
|
@@ -11449,10 +11109,7 @@ class MarinadeClient {
|
|
|
11449
11109
|
tokenProgram: splToken.TOKEN_PROGRAM_ID,
|
|
11450
11110
|
stakeProgram: web3_js.StakeProgram.programId
|
|
11451
11111
|
}).transaction();
|
|
11452
|
-
return await this.base.intoVersionedTransaction(
|
|
11453
|
-
tx,
|
|
11454
|
-
...txOptions
|
|
11455
|
-
});
|
|
11112
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
11456
11113
|
}
|
|
11457
11114
|
async delayedUnstakeTx(state, amount, txOptions) {
|
|
11458
11115
|
const signer = txOptions.signer || this.base.getSigner();
|
|
@@ -11484,10 +11141,7 @@ class MarinadeClient {
|
|
|
11484
11141
|
}).preInstructions([
|
|
11485
11142
|
createTicketIx
|
|
11486
11143
|
]).transaction();
|
|
11487
|
-
return await this.base.intoVersionedTransaction(
|
|
11488
|
-
tx,
|
|
11489
|
-
...txOptions
|
|
11490
|
-
});
|
|
11144
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
11491
11145
|
}
|
|
11492
11146
|
async claimTicketsTx(state, tickets, txOptions) {
|
|
11493
11147
|
const signer = txOptions.signer || this.base.getSigner();
|
|
@@ -11505,10 +11159,7 @@ class MarinadeClient {
|
|
|
11505
11159
|
isSigner: false,
|
|
11506
11160
|
isWritable: true
|
|
11507
11161
|
}))).transaction();
|
|
11508
|
-
return await this.base.intoVersionedTransaction(
|
|
11509
|
-
tx,
|
|
11510
|
-
...txOptions
|
|
11511
|
-
});
|
|
11162
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
11512
11163
|
}
|
|
11513
11164
|
async liquidUnstakeTx(statePda, amount, txOptions) {
|
|
11514
11165
|
const signer = txOptions.signer || this.base.getSigner();
|
|
@@ -11528,10 +11179,7 @@ class MarinadeClient {
|
|
|
11528
11179
|
treasuryMsolAccount: marinadeState.treasuryMsolAccount,
|
|
11529
11180
|
marinadeProgram: MARINADE_PROGRAM_ID
|
|
11530
11181
|
}).transaction();
|
|
11531
|
-
return await this.base.intoVersionedTransaction(
|
|
11532
|
-
tx,
|
|
11533
|
-
...txOptions
|
|
11534
|
-
});
|
|
11182
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
11535
11183
|
}
|
|
11536
11184
|
constructor(base){
|
|
11537
11185
|
this.base = base;
|
|
@@ -11563,10 +11211,7 @@ class WSolClient {
|
|
|
11563
11211
|
wsolMint: WSOL,
|
|
11564
11212
|
signer
|
|
11565
11213
|
}).transaction();
|
|
11566
|
-
return await this.base.intoVersionedTransaction(
|
|
11567
|
-
tx,
|
|
11568
|
-
...txOptions
|
|
11569
|
-
});
|
|
11214
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
11570
11215
|
}
|
|
11571
11216
|
async unwrapTx(statePda, txOptions) {
|
|
11572
11217
|
const signer = txOptions.signer || this.base.getSigner();
|
|
@@ -11579,10 +11224,7 @@ class WSolClient {
|
|
|
11579
11224
|
wsolMint: WSOL,
|
|
11580
11225
|
signer
|
|
11581
11226
|
}).transaction();
|
|
11582
|
-
return await this.base.intoVersionedTransaction(
|
|
11583
|
-
tx,
|
|
11584
|
-
...txOptions
|
|
11585
|
-
});
|
|
11227
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
11586
11228
|
}
|
|
11587
11229
|
constructor(base){
|
|
11588
11230
|
this.base = base;
|
|
@@ -11812,10 +11454,7 @@ class StakingClient {
|
|
|
11812
11454
|
feeAccount,
|
|
11813
11455
|
tokenProgram
|
|
11814
11456
|
}).transaction();
|
|
11815
|
-
return await this.base.intoVersionedTransaction(
|
|
11816
|
-
tx,
|
|
11817
|
-
...txOptions
|
|
11818
|
-
});
|
|
11457
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
11819
11458
|
}
|
|
11820
11459
|
async stakePoolDepositStakeTx(statePda, stakePool, stakeAccount, txOptions = {}) {
|
|
11821
11460
|
const signer = txOptions.signer || this.base.getSigner();
|
|
@@ -11853,10 +11492,7 @@ class StakingClient {
|
|
|
11853
11492
|
tokenProgram,
|
|
11854
11493
|
stakeProgram: web3_js.StakeProgram.programId
|
|
11855
11494
|
}).transaction();
|
|
11856
|
-
return await this.base.intoVersionedTransaction(
|
|
11857
|
-
tx,
|
|
11858
|
-
...txOptions
|
|
11859
|
-
});
|
|
11495
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
11860
11496
|
}
|
|
11861
11497
|
async stakePoolWithdrawStakeTx(statePda, stakePool, amount, deactivate = false, txOptions = {}) {
|
|
11862
11498
|
const signer = txOptions.signer || this.base.getSigner();
|
|
@@ -11901,10 +11537,7 @@ class StakingClient {
|
|
|
11901
11537
|
}).preInstructions([
|
|
11902
11538
|
createStakeAccountIx
|
|
11903
11539
|
]).postInstructions(postInstructions).transaction();
|
|
11904
|
-
return await this.base.intoVersionedTransaction(
|
|
11905
|
-
tx,
|
|
11906
|
-
...txOptions
|
|
11907
|
-
});
|
|
11540
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
11908
11541
|
}
|
|
11909
11542
|
async initializeAndDelegateStakeTx(statePda, vote, amount, txOptions = {}) {
|
|
11910
11543
|
const signer = txOptions.signer || this.base.getSigner();
|
|
@@ -11922,10 +11555,7 @@ class StakingClient {
|
|
|
11922
11555
|
}).preInstructions([
|
|
11923
11556
|
createStakeAccountIx
|
|
11924
11557
|
]).transaction();
|
|
11925
|
-
return await this.base.intoVersionedTransaction(
|
|
11926
|
-
tx,
|
|
11927
|
-
...txOptions
|
|
11928
|
-
});
|
|
11558
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
11929
11559
|
}
|
|
11930
11560
|
async deactivateStakeAccountsTx(statePda, stakeAccounts, txOptions = {}) {
|
|
11931
11561
|
const signer = txOptions.signer || this.base.getSigner();
|
|
@@ -11941,10 +11571,7 @@ class StakingClient {
|
|
|
11941
11571
|
isSigner: false,
|
|
11942
11572
|
isWritable: true
|
|
11943
11573
|
}))).transaction();
|
|
11944
|
-
return await this.base.intoVersionedTransaction(
|
|
11945
|
-
tx,
|
|
11946
|
-
...txOptions
|
|
11947
|
-
});
|
|
11574
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
11948
11575
|
}
|
|
11949
11576
|
async withdrawFromStakeAccountsTx(statePda, stakeAccounts, txOptions = {}) {
|
|
11950
11577
|
const signer = txOptions.signer || this.base.getSigner();
|
|
@@ -11961,10 +11588,7 @@ class StakingClient {
|
|
|
11961
11588
|
isSigner: false,
|
|
11962
11589
|
isWritable: true
|
|
11963
11590
|
}))).transaction();
|
|
11964
|
-
return await this.base.intoVersionedTransaction(
|
|
11965
|
-
tx,
|
|
11966
|
-
...txOptions
|
|
11967
|
-
});
|
|
11591
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
11968
11592
|
}
|
|
11969
11593
|
async mergeStakeAccountsTx(statePda, toStake, fromStake, txOptions = {}) {
|
|
11970
11594
|
const signer = txOptions.signer || this.base.getSigner();
|
|
@@ -11978,10 +11602,7 @@ class StakingClient {
|
|
|
11978
11602
|
stakeProgram: web3_js.StakeProgram.programId,
|
|
11979
11603
|
stakeHistory: web3_js.SYSVAR_STAKE_HISTORY_PUBKEY
|
|
11980
11604
|
}).transaction();
|
|
11981
|
-
return await this.base.intoVersionedTransaction(
|
|
11982
|
-
tx,
|
|
11983
|
-
...txOptions
|
|
11984
|
-
});
|
|
11605
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
11985
11606
|
}
|
|
11986
11607
|
async splitStakeAccountTx(state, existingStake, lamports, txOptions = {}) {
|
|
11987
11608
|
const signer = txOptions.signer || this.base.getSigner();
|
|
@@ -11997,10 +11618,7 @@ class StakingClient {
|
|
|
11997
11618
|
}).preInstructions([
|
|
11998
11619
|
createStakeAccountIx
|
|
11999
11620
|
]).transaction();
|
|
12000
|
-
const vTx = await this.base.intoVersionedTransaction(
|
|
12001
|
-
tx,
|
|
12002
|
-
...txOptions
|
|
12003
|
-
});
|
|
11621
|
+
const vTx = await this.base.intoVersionedTransaction(tx, txOptions);
|
|
12004
11622
|
return {
|
|
12005
11623
|
tx: vTx,
|
|
12006
11624
|
newStake
|
|
@@ -12022,10 +11640,7 @@ class StakingClient {
|
|
|
12022
11640
|
}).preInstructions([
|
|
12023
11641
|
createStakeAccountIx
|
|
12024
11642
|
]).transaction();
|
|
12025
|
-
const vTx = await this.base.intoVersionedTransaction(
|
|
12026
|
-
tx,
|
|
12027
|
-
...txOptions
|
|
12028
|
-
});
|
|
11643
|
+
const vTx = await this.base.intoVersionedTransaction(tx, txOptions);
|
|
12029
11644
|
return {
|
|
12030
11645
|
tx: vTx,
|
|
12031
11646
|
newStake
|
|
@@ -12119,20 +11734,14 @@ class StateClient {
|
|
|
12119
11734
|
const tx = await this.base.program.methods.updateState(new StateModel(updated)).accounts({
|
|
12120
11735
|
state: statePda
|
|
12121
11736
|
}).transaction();
|
|
12122
|
-
return await this.base.intoVersionedTransaction(
|
|
12123
|
-
tx,
|
|
12124
|
-
...txOptions
|
|
12125
|
-
});
|
|
11737
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
12126
11738
|
}
|
|
12127
11739
|
async closeState(statePda, txOptions = {}) {
|
|
12128
11740
|
this.base.getOpenfundsPda(statePda);
|
|
12129
11741
|
const tx = await this.base.program.methods.closeState().accounts({
|
|
12130
11742
|
state: statePda
|
|
12131
11743
|
}).preInstructions(txOptions.preInstructions || []).transaction();
|
|
12132
|
-
const vTx = await this.base.intoVersionedTransaction(
|
|
12133
|
-
tx,
|
|
12134
|
-
...txOptions
|
|
12135
|
-
});
|
|
11744
|
+
const vTx = await this.base.intoVersionedTransaction(tx, txOptions);
|
|
12136
11745
|
return await this.base.sendAndConfirm(vTx);
|
|
12137
11746
|
}
|
|
12138
11747
|
/**
|
|
@@ -12249,10 +11858,7 @@ class StateClient {
|
|
|
12249
11858
|
isSigner: false,
|
|
12250
11859
|
isWritable: true
|
|
12251
11860
|
}))).transaction();
|
|
12252
|
-
return await this.base.intoVersionedTransaction(
|
|
12253
|
-
tx,
|
|
12254
|
-
...txOptions
|
|
12255
|
-
});
|
|
11861
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
12256
11862
|
}
|
|
12257
11863
|
/* Deposit & Withdraw */ async deposit(statePda, asset, amount, txOptions = {}) {
|
|
12258
11864
|
const tx = await this.depositTx(statePda, asset, amount, txOptions);
|
|
@@ -12269,10 +11875,7 @@ class StateClient {
|
|
|
12269
11875
|
const signerAta = this.base.getAta(asset, signer, tokenProgram);
|
|
12270
11876
|
const vaultAta = this.base.getVaultAta(statePda, asset, tokenProgram);
|
|
12271
11877
|
const tx = new web3_js.Transaction().add(splToken.createAssociatedTokenAccountIdempotentInstruction(signer, vaultAta, vault, asset, tokenProgram), splToken.createTransferCheckedInstruction(signerAta, asset, vaultAta, signer, new anchor.BN(amount).toNumber(), mint.decimals, [], tokenProgram));
|
|
12272
|
-
return await this.base.intoVersionedTransaction(
|
|
12273
|
-
tx,
|
|
12274
|
-
...txOptions
|
|
12275
|
-
});
|
|
11878
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
12276
11879
|
}
|
|
12277
11880
|
async withdrawIxs(statePda, asset, amount, txOptions) {
|
|
12278
11881
|
const signer = txOptions.signer || this.base.getSigner();
|
|
@@ -12311,10 +11914,7 @@ class StateClient {
|
|
|
12311
11914
|
asset,
|
|
12312
11915
|
tokenProgram
|
|
12313
11916
|
}).preInstructions(preInstructions).postInstructions(postInstructions).transaction();
|
|
12314
|
-
return await this.base.intoVersionedTransaction(
|
|
12315
|
-
tx,
|
|
12316
|
-
...txOptions
|
|
12317
|
-
});
|
|
11917
|
+
return await this.base.intoVersionedTransaction(tx, txOptions);
|
|
12318
11918
|
}
|
|
12319
11919
|
constructor(base){
|
|
12320
11920
|
this.base = base;
|
|
@@ -12789,10 +12389,7 @@ class KaminoLendingClient {
|
|
|
12789
12389
|
initObligationIx,
|
|
12790
12390
|
initObligationFarmIx
|
|
12791
12391
|
]).transaction();
|
|
12792
|
-
const vTx = await this.base.intoVersionedTransaction(
|
|
12793
|
-
tx,
|
|
12794
|
-
...txOptions
|
|
12795
|
-
});
|
|
12392
|
+
const vTx = await this.base.intoVersionedTransaction(tx, txOptions);
|
|
12796
12393
|
return vTx;
|
|
12797
12394
|
}
|
|
12798
12395
|
async depositTx(statePda, asset, amount, txOptions) {
|
|
@@ -12860,10 +12457,7 @@ class KaminoLendingClient {
|
|
|
12860
12457
|
refreshIxs[2]
|
|
12861
12458
|
]) // 1 refresh ix
|
|
12862
12459
|
.transaction();
|
|
12863
|
-
const vTx = await this.base.intoVersionedTransaction(
|
|
12864
|
-
tx,
|
|
12865
|
-
...txOptions
|
|
12866
|
-
});
|
|
12460
|
+
const vTx = await this.base.intoVersionedTransaction(tx, txOptions);
|
|
12867
12461
|
return vTx;
|
|
12868
12462
|
}
|
|
12869
12463
|
constructor(base){
|
|
@@ -12996,7 +12590,6 @@ exports.JUP = JUP;
|
|
|
12996
12590
|
exports.JUPITER_API_DEFAULT = JUPITER_API_DEFAULT;
|
|
12997
12591
|
exports.JUPITER_PROGRAM_ID = JUPITER_PROGRAM_ID;
|
|
12998
12592
|
exports.JUPSOL_STAKE_POOL = JUPSOL_STAKE_POOL;
|
|
12999
|
-
exports.JUP_STAKE_LOCKER = JUP_STAKE_LOCKER;
|
|
13000
12593
|
exports.JUP_VOTE_PROGRAM = JUP_VOTE_PROGRAM;
|
|
13001
12594
|
exports.JupiterSwapClient = JupiterSwapClient;
|
|
13002
12595
|
exports.JupiterVoteClient = JupiterVoteClient;
|