@elmntl/jlpd-sdk 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1043 -539
- package/dist/index.d.ts +1043 -539
- package/dist/index.js +1057 -417
- package/dist/index.mjs +1049 -416
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -99,66 +99,71 @@ type JlpDProgram = {
|
|
|
99
99
|
"args": [];
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
|
-
"name": "
|
|
102
|
+
"name": "claimWithdraw";
|
|
103
103
|
"docs": [
|
|
104
|
-
"
|
|
105
|
-
"Destructive operation - use only for cleanup/migration",
|
|
104
|
+
"Claim processed withdrawal (epoch-based delayed withdrawal)",
|
|
106
105
|
"",
|
|
107
|
-
"#
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
106
|
+
"# Flow",
|
|
107
|
+
"1. Verify request is processed (pps > 0) and claim period reached",
|
|
108
|
+
"2. Transfer base from STV to user",
|
|
109
|
+
"3. Close request's jvX ATA and WithdrawRequest PDA (rent to user)"
|
|
111
110
|
];
|
|
112
111
|
"discriminator": [
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
112
|
+
232,
|
|
113
|
+
89,
|
|
114
|
+
154,
|
|
115
|
+
117,
|
|
116
|
+
16,
|
|
117
|
+
204,
|
|
118
|
+
182,
|
|
119
|
+
224
|
|
121
120
|
];
|
|
122
121
|
"accounts": [
|
|
123
122
|
{
|
|
124
|
-
"name": "
|
|
123
|
+
"name": "user";
|
|
125
124
|
"docs": [
|
|
126
|
-
"
|
|
125
|
+
"User claiming their withdrawal"
|
|
127
126
|
];
|
|
128
127
|
"writable": true;
|
|
129
128
|
"signer": true;
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "stv";
|
|
132
|
+
"docs": [
|
|
133
|
+
"The STV PDA account (mut for reserved_base update)"
|
|
132
134
|
];
|
|
135
|
+
"writable": true;
|
|
133
136
|
},
|
|
134
137
|
{
|
|
135
|
-
"name": "
|
|
138
|
+
"name": "baseMint";
|
|
136
139
|
"docs": [
|
|
137
|
-
"
|
|
140
|
+
"Base asset mint (for transfer_checked)"
|
|
138
141
|
];
|
|
139
|
-
"pda": {
|
|
140
|
-
"seeds": [
|
|
141
|
-
{
|
|
142
|
-
"kind": "const";
|
|
143
|
-
"value": [
|
|
144
|
-
106,
|
|
145
|
-
108,
|
|
146
|
-
112,
|
|
147
|
-
95,
|
|
148
|
-
118,
|
|
149
|
-
97,
|
|
150
|
-
117,
|
|
151
|
-
108,
|
|
152
|
-
116
|
|
153
|
-
];
|
|
154
|
-
}
|
|
155
|
-
];
|
|
156
|
-
};
|
|
157
142
|
},
|
|
158
143
|
{
|
|
159
|
-
"name": "
|
|
144
|
+
"name": "jvMint";
|
|
145
|
+
"docs": [
|
|
146
|
+
"jvX mint (for ATA close verification)"
|
|
147
|
+
];
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"name": "userBaseAta";
|
|
151
|
+
"docs": [
|
|
152
|
+
"User's base token destination"
|
|
153
|
+
];
|
|
154
|
+
"writable": true;
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "stvBaseAta";
|
|
160
158
|
"docs": [
|
|
161
|
-
"STV
|
|
159
|
+
"STV's base ATA (source for base transfer)"
|
|
160
|
+
];
|
|
161
|
+
"writable": true;
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "withdrawRequest";
|
|
165
|
+
"docs": [
|
|
166
|
+
"WithdrawRequest PDA - closed after claim (rent to user)"
|
|
162
167
|
];
|
|
163
168
|
"writable": true;
|
|
164
169
|
"pda": {
|
|
@@ -166,33 +171,49 @@ type JlpDProgram = {
|
|
|
166
171
|
{
|
|
167
172
|
"kind": "const";
|
|
168
173
|
"value": [
|
|
169
|
-
|
|
174
|
+
119,
|
|
175
|
+
105,
|
|
170
176
|
116,
|
|
171
|
-
|
|
177
|
+
104,
|
|
178
|
+
100,
|
|
179
|
+
114,
|
|
180
|
+
97,
|
|
181
|
+
119,
|
|
182
|
+
95,
|
|
183
|
+
114,
|
|
184
|
+
101,
|
|
185
|
+
113,
|
|
186
|
+
117,
|
|
187
|
+
101,
|
|
188
|
+
115,
|
|
189
|
+
116
|
|
172
190
|
];
|
|
173
191
|
},
|
|
174
192
|
{
|
|
175
193
|
"kind": "account";
|
|
176
|
-
"path": "
|
|
194
|
+
"path": "stv";
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"kind": "account";
|
|
198
|
+
"path": "user";
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"kind": "account";
|
|
202
|
+
"path": "withdraw_request.epoch_id";
|
|
203
|
+
"account": "WithdrawRequest";
|
|
177
204
|
}
|
|
178
205
|
];
|
|
179
206
|
};
|
|
180
207
|
},
|
|
181
208
|
{
|
|
182
|
-
"name": "
|
|
183
|
-
"docs": [
|
|
184
|
-
"jvX mint for this STV - used to verify no active shares"
|
|
185
|
-
];
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"name": "baseMint";
|
|
209
|
+
"name": "requestJvxAta";
|
|
189
210
|
"docs": [
|
|
190
|
-
"
|
|
211
|
+
"Empty jvX ATA owned by WithdrawRequest PDA (to close, rent to user)"
|
|
191
212
|
];
|
|
213
|
+
"writable": true;
|
|
192
214
|
},
|
|
193
215
|
{
|
|
194
|
-
"name": "
|
|
195
|
-
"address": "11111111111111111111111111111111";
|
|
216
|
+
"name": "tokenProgram";
|
|
196
217
|
}
|
|
197
218
|
];
|
|
198
219
|
"args": [];
|
|
@@ -377,7 +398,7 @@ type JlpDProgram = {
|
|
|
377
398
|
"name": "params";
|
|
378
399
|
"type": {
|
|
379
400
|
"defined": {
|
|
380
|
-
"name": "
|
|
401
|
+
"name": "InitOrUpdateJlpVaultParams";
|
|
381
402
|
};
|
|
382
403
|
};
|
|
383
404
|
}
|
|
@@ -433,7 +454,7 @@ type JlpDProgram = {
|
|
|
433
454
|
},
|
|
434
455
|
{
|
|
435
456
|
"kind": "account";
|
|
436
|
-
"path": "
|
|
457
|
+
"path": "base_mint";
|
|
437
458
|
}
|
|
438
459
|
];
|
|
439
460
|
};
|
|
@@ -454,7 +475,7 @@ type JlpDProgram = {
|
|
|
454
475
|
"name": "jvMint";
|
|
455
476
|
"docs": [
|
|
456
477
|
"Vault share token mint (jvX) - STV is the mint authority",
|
|
457
|
-
"
|
|
478
|
+
"Uses init_if_needed in case mint exists from a previous STV initialization"
|
|
458
479
|
];
|
|
459
480
|
"writable": true;
|
|
460
481
|
"signer": true;
|
|
@@ -511,7 +532,7 @@ type JlpDProgram = {
|
|
|
511
532
|
},
|
|
512
533
|
{
|
|
513
534
|
"kind": "account";
|
|
514
|
-
"path": "
|
|
535
|
+
"path": "jl_mint";
|
|
515
536
|
}
|
|
516
537
|
];
|
|
517
538
|
"program": {
|
|
@@ -586,7 +607,7 @@ type JlpDProgram = {
|
|
|
586
607
|
"name": "params";
|
|
587
608
|
"type": {
|
|
588
609
|
"defined": {
|
|
589
|
-
"name": "
|
|
610
|
+
"name": "InitializeStvParams";
|
|
590
611
|
};
|
|
591
612
|
};
|
|
592
613
|
}
|
|
@@ -686,7 +707,7 @@ type JlpDProgram = {
|
|
|
686
707
|
"name": "params";
|
|
687
708
|
"type": {
|
|
688
709
|
"defined": {
|
|
689
|
-
"name": "
|
|
710
|
+
"name": "JupEarnParams";
|
|
690
711
|
};
|
|
691
712
|
};
|
|
692
713
|
}
|
|
@@ -780,215 +801,430 @@ type JlpDProgram = {
|
|
|
780
801
|
"name": "params";
|
|
781
802
|
"type": {
|
|
782
803
|
"defined": {
|
|
783
|
-
"name": "
|
|
804
|
+
"name": "MoveJlxParams";
|
|
784
805
|
};
|
|
785
806
|
};
|
|
786
807
|
}
|
|
787
808
|
];
|
|
788
809
|
},
|
|
789
810
|
{
|
|
790
|
-
"name": "
|
|
811
|
+
"name": "processEpoch";
|
|
791
812
|
"docs": [
|
|
792
|
-
"
|
|
793
|
-
"Called periodically (~8 hours) to update all STV values based on JLP performance",
|
|
794
|
-
"",
|
|
795
|
-
"# USD-Based Settlement",
|
|
796
|
-
"1. Values total vault holdings (JLP + staging jlX) in USD using oracles",
|
|
797
|
-
"2. Values total base_loaned across all STVs in USD",
|
|
798
|
-
"3. Distributes surplus (yield) or deficit (bad debt) proportionally",
|
|
799
|
-
"",
|
|
800
|
-
"# Parameters",
|
|
801
|
-
"- `jlp_rate`: Manager-provided JLP price (8 decimals), cross-checked against Pyth",
|
|
813
|
+
"Process epoch: burn jvX from withdraw requests, record PPS, earmark base",
|
|
802
814
|
"",
|
|
803
|
-
"
|
|
804
|
-
"
|
|
805
|
-
"
|
|
806
|
-
"- Exchange rates come from Jupiter Earn (audited, TWAP-based)",
|
|
807
|
-
"- Distribution is proportional to each STV's share of total loans",
|
|
815
|
+
"Permissionless (anyone can call after epoch ends).",
|
|
816
|
+
"Processes WithdrawRequest pairs from remaining_accounts.",
|
|
817
|
+
"Uses epoch_pps for multi-batch consistency.",
|
|
808
818
|
"",
|
|
809
|
-
"# Accounts",
|
|
810
|
-
"
|
|
811
|
-
""
|
|
812
|
-
"# Remaining Accounts (15 accounts)",
|
|
813
|
-
"For exchange rate calculation with time-accrued rewards:",
|
|
814
|
-
"- [0-4]: Jupiter Lend lending accounts (BTC, ETH, SOL, USDC, JupUSD)",
|
|
815
|
-
"- [5-9]: Jupiter Lend rewards rate model accounts (BTC, ETH, SOL, USDC, JupUSD)",
|
|
816
|
-
"- [10-14]: jlX mint accounts (jlBTC, jlETH, jlSOL, jlUSDC, jlJupUSD)"
|
|
819
|
+
"# Remaining Accounts",
|
|
820
|
+
"- [0-1]: Jupiter Lend accounts (if jl_mint != base_mint)",
|
|
821
|
+
"- [N..]: pairs of [WithdrawRequest (mut), request_jvx_ata (mut)]"
|
|
817
822
|
];
|
|
818
823
|
"discriminator": [
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
824
|
+
115,
|
|
825
|
+
194,
|
|
826
|
+
215,
|
|
827
|
+
160,
|
|
828
|
+
113,
|
|
829
|
+
154,
|
|
830
|
+
81,
|
|
831
|
+
5
|
|
827
832
|
];
|
|
828
833
|
"accounts": [
|
|
829
834
|
{
|
|
830
|
-
"name": "
|
|
835
|
+
"name": "payer";
|
|
836
|
+
"docs": [
|
|
837
|
+
"Payer/caller - permissionless (anyone can call after epoch ends)"
|
|
838
|
+
];
|
|
831
839
|
"writable": true;
|
|
840
|
+
"signer": true;
|
|
832
841
|
},
|
|
833
842
|
{
|
|
834
|
-
"name": "
|
|
843
|
+
"name": "jlpVault";
|
|
835
844
|
"docs": [
|
|
836
|
-
"JLP
|
|
845
|
+
"The JLP Vault PDA account (for pause checks)"
|
|
837
846
|
];
|
|
838
847
|
},
|
|
839
848
|
{
|
|
840
|
-
"name": "
|
|
841
|
-
"
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
"name": "stv1";
|
|
849
|
+
"name": "stv";
|
|
850
|
+
"docs": [
|
|
851
|
+
"The STV PDA account (mut for epoch state + fee crystallization)"
|
|
852
|
+
];
|
|
845
853
|
"writable": true;
|
|
846
854
|
},
|
|
847
855
|
{
|
|
848
|
-
"name": "
|
|
849
|
-
"
|
|
856
|
+
"name": "baseMint";
|
|
857
|
+
"docs": [
|
|
858
|
+
"Base asset mint (for NAV calc)"
|
|
859
|
+
];
|
|
850
860
|
},
|
|
851
861
|
{
|
|
852
|
-
"name": "
|
|
853
|
-
"
|
|
862
|
+
"name": "jlMint";
|
|
863
|
+
"docs": [
|
|
864
|
+
"jlX mint (for exchange rate)"
|
|
865
|
+
];
|
|
854
866
|
},
|
|
855
867
|
{
|
|
856
|
-
"name": "
|
|
868
|
+
"name": "jvMint";
|
|
869
|
+
"docs": [
|
|
870
|
+
"jvX mint (mut for burn - supply decreases)"
|
|
871
|
+
];
|
|
857
872
|
"writable": true;
|
|
858
873
|
},
|
|
859
874
|
{
|
|
860
|
-
"name": "
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
},
|
|
865
|
-
{
|
|
866
|
-
"name": "stagingJlx2";
|
|
867
|
-
},
|
|
868
|
-
{
|
|
869
|
-
"name": "stagingJlx3";
|
|
870
|
-
},
|
|
871
|
-
{
|
|
872
|
-
"name": "stagingJlx4";
|
|
873
|
-
},
|
|
874
|
-
{
|
|
875
|
-
"name": "dovesBtcUsd";
|
|
876
|
-
},
|
|
877
|
-
{
|
|
878
|
-
"name": "dovesEthUsd";
|
|
879
|
-
},
|
|
880
|
-
{
|
|
881
|
-
"name": "dovesSolUsd";
|
|
882
|
-
},
|
|
883
|
-
{
|
|
884
|
-
"name": "pythJlpUsd";
|
|
875
|
+
"name": "stvBaseAta";
|
|
876
|
+
"docs": [
|
|
877
|
+
"STV's base ATA (for NAV)"
|
|
878
|
+
];
|
|
885
879
|
},
|
|
886
880
|
{
|
|
887
|
-
"name": "
|
|
881
|
+
"name": "stvJlxAta";
|
|
888
882
|
"docs": [
|
|
889
|
-
"
|
|
883
|
+
"STV's jlX ATA (for NAV)"
|
|
890
884
|
];
|
|
891
|
-
|
|
892
|
-
}
|
|
893
|
-
];
|
|
894
|
-
"args": [
|
|
885
|
+
},
|
|
895
886
|
{
|
|
896
|
-
"name": "
|
|
897
|
-
"type": {
|
|
898
|
-
"defined": {
|
|
899
|
-
"name": "settleYieldParams";
|
|
900
|
-
};
|
|
901
|
-
};
|
|
887
|
+
"name": "tokenProgram";
|
|
902
888
|
}
|
|
903
889
|
];
|
|
890
|
+
"args": [];
|
|
904
891
|
},
|
|
905
892
|
{
|
|
906
|
-
"name": "
|
|
893
|
+
"name": "requestWithdraw";
|
|
907
894
|
"docs": [
|
|
908
|
-
"
|
|
909
|
-
"Manager-only operation for rebalancing vault composition",
|
|
895
|
+
"Request withdrawal of jvX shares (epoch-based delayed withdrawal)",
|
|
910
896
|
"",
|
|
911
|
-
"
|
|
897
|
+
"# Flow",
|
|
898
|
+
"1. Validate epoch is active and not ended",
|
|
899
|
+
"2. Create or accumulate into WithdrawRequest PDA for this epoch",
|
|
900
|
+
"3. Transfer jvX from user to request's escrow ATA",
|
|
901
|
+
"",
|
|
902
|
+
"User must wait for process_epoch + claim_withdraw to receive base."
|
|
912
903
|
];
|
|
913
904
|
"discriminator": [
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
107,
|
|
918
|
-
160,
|
|
905
|
+
137,
|
|
906
|
+
95,
|
|
907
|
+
187,
|
|
919
908
|
96,
|
|
920
|
-
|
|
921
|
-
|
|
909
|
+
250,
|
|
910
|
+
138,
|
|
911
|
+
31,
|
|
912
|
+
182
|
|
922
913
|
];
|
|
923
914
|
"accounts": [
|
|
924
915
|
{
|
|
925
|
-
"name": "
|
|
916
|
+
"name": "user";
|
|
926
917
|
"docs": [
|
|
927
|
-
"
|
|
918
|
+
"User requesting withdrawal"
|
|
928
919
|
];
|
|
920
|
+
"writable": true;
|
|
929
921
|
"signer": true;
|
|
930
922
|
},
|
|
931
923
|
{
|
|
932
924
|
"name": "jlpVault";
|
|
933
925
|
"docs": [
|
|
934
|
-
"The JLP Vault PDA account"
|
|
935
|
-
"Note: PDA and manager verified in handler via get_pda() to avoid multiple loads"
|
|
926
|
+
"The JLP Vault PDA account (for pause checks)"
|
|
936
927
|
];
|
|
937
928
|
},
|
|
938
929
|
{
|
|
939
|
-
"name": "
|
|
930
|
+
"name": "stv";
|
|
940
931
|
"docs": [
|
|
941
|
-
"
|
|
932
|
+
"The STV PDA account (for epoch validation)"
|
|
942
933
|
];
|
|
934
|
+
"writable": true;
|
|
943
935
|
},
|
|
944
936
|
{
|
|
945
|
-
"name": "
|
|
937
|
+
"name": "jvMint";
|
|
946
938
|
"docs": [
|
|
947
|
-
"
|
|
939
|
+
"jvX mint (vault share token)"
|
|
948
940
|
];
|
|
949
941
|
},
|
|
950
942
|
{
|
|
951
|
-
"name": "
|
|
943
|
+
"name": "userJvxAta";
|
|
952
944
|
"docs": [
|
|
953
|
-
"
|
|
945
|
+
"User's jvX token account (source of shares)"
|
|
954
946
|
];
|
|
955
947
|
"writable": true;
|
|
956
948
|
},
|
|
957
949
|
{
|
|
958
|
-
"name": "
|
|
950
|
+
"name": "withdrawRequest";
|
|
959
951
|
"docs": [
|
|
960
|
-
"
|
|
952
|
+
"WithdrawRequest PDA - created or accumulated into"
|
|
961
953
|
];
|
|
962
954
|
"writable": true;
|
|
955
|
+
"pda": {
|
|
956
|
+
"seeds": [
|
|
957
|
+
{
|
|
958
|
+
"kind": "const";
|
|
959
|
+
"value": [
|
|
960
|
+
119,
|
|
961
|
+
105,
|
|
962
|
+
116,
|
|
963
|
+
104,
|
|
964
|
+
100,
|
|
965
|
+
114,
|
|
966
|
+
97,
|
|
967
|
+
119,
|
|
968
|
+
95,
|
|
969
|
+
114,
|
|
970
|
+
101,
|
|
971
|
+
113,
|
|
972
|
+
117,
|
|
973
|
+
101,
|
|
974
|
+
115,
|
|
975
|
+
116
|
|
976
|
+
];
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"kind": "account";
|
|
980
|
+
"path": "stv";
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
"kind": "account";
|
|
984
|
+
"path": "user";
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"kind": "arg";
|
|
988
|
+
"path": "epoch_id";
|
|
989
|
+
}
|
|
990
|
+
];
|
|
991
|
+
};
|
|
963
992
|
},
|
|
964
993
|
{
|
|
965
|
-
"name": "
|
|
966
|
-
},
|
|
967
|
-
{
|
|
968
|
-
"name": "jupiterProgram";
|
|
994
|
+
"name": "requestJvxAta";
|
|
969
995
|
"docs": [
|
|
970
|
-
"
|
|
996
|
+
"jvX ATA owned by the WithdrawRequest PDA (escrow for shares)"
|
|
971
997
|
];
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
998
|
+
"writable": true;
|
|
999
|
+
"pda": {
|
|
1000
|
+
"seeds": [
|
|
1001
|
+
{
|
|
1002
|
+
"kind": "account";
|
|
1003
|
+
"path": "withdraw_request";
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
"kind": "const";
|
|
1007
|
+
"value": [
|
|
1008
|
+
6,
|
|
1009
|
+
221,
|
|
1010
|
+
246,
|
|
1011
|
+
225,
|
|
1012
|
+
215,
|
|
1013
|
+
101,
|
|
1014
|
+
161,
|
|
1015
|
+
147,
|
|
1016
|
+
217,
|
|
1017
|
+
203,
|
|
1018
|
+
225,
|
|
1019
|
+
70,
|
|
1020
|
+
206,
|
|
1021
|
+
235,
|
|
1022
|
+
121,
|
|
1023
|
+
172,
|
|
1024
|
+
28,
|
|
1025
|
+
180,
|
|
1026
|
+
133,
|
|
1027
|
+
237,
|
|
1028
|
+
95,
|
|
1029
|
+
91,
|
|
1030
|
+
55,
|
|
1031
|
+
145,
|
|
1032
|
+
58,
|
|
1033
|
+
140,
|
|
1034
|
+
245,
|
|
1035
|
+
133,
|
|
1036
|
+
126,
|
|
1037
|
+
255,
|
|
1038
|
+
0,
|
|
1039
|
+
169
|
|
1040
|
+
];
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
"kind": "account";
|
|
1044
|
+
"path": "jv_mint";
|
|
1045
|
+
}
|
|
1046
|
+
];
|
|
1047
|
+
"program": {
|
|
1048
|
+
"kind": "const";
|
|
1049
|
+
"value": [
|
|
1050
|
+
140,
|
|
1051
|
+
151,
|
|
1052
|
+
37,
|
|
1053
|
+
143,
|
|
1054
|
+
78,
|
|
1055
|
+
36,
|
|
1056
|
+
137,
|
|
1057
|
+
241,
|
|
1058
|
+
187,
|
|
1059
|
+
61,
|
|
1060
|
+
16,
|
|
1061
|
+
41,
|
|
1062
|
+
20,
|
|
1063
|
+
142,
|
|
1064
|
+
13,
|
|
1065
|
+
131,
|
|
1066
|
+
11,
|
|
1067
|
+
90,
|
|
1068
|
+
19,
|
|
1069
|
+
153,
|
|
1070
|
+
218,
|
|
1071
|
+
255,
|
|
1072
|
+
16,
|
|
1073
|
+
132,
|
|
1074
|
+
4,
|
|
1075
|
+
142,
|
|
1076
|
+
123,
|
|
1077
|
+
216,
|
|
1078
|
+
219,
|
|
1079
|
+
233,
|
|
1080
|
+
248,
|
|
1081
|
+
89
|
|
1082
|
+
];
|
|
1083
|
+
};
|
|
1084
|
+
};
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
"name": "tokenProgram";
|
|
1088
|
+
},
|
|
1089
|
+
{
|
|
1090
|
+
"name": "associatedTokenProgram";
|
|
1091
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
"name": "systemProgram";
|
|
1095
|
+
"address": "11111111111111111111111111111111";
|
|
1096
|
+
}
|
|
1097
|
+
];
|
|
1098
|
+
"args": [
|
|
1099
|
+
{
|
|
1100
|
+
"name": "shares";
|
|
1101
|
+
"type": "u64";
|
|
1102
|
+
},
|
|
1103
|
+
{
|
|
1104
|
+
"name": "epochId";
|
|
1105
|
+
"type": "u32";
|
|
1106
|
+
}
|
|
1107
|
+
];
|
|
1108
|
+
},
|
|
1109
|
+
{
|
|
1110
|
+
"name": "settleYield";
|
|
1111
|
+
"docs": [
|
|
1112
|
+
"Settle yield/loss from JLP positions across all STVs",
|
|
1113
|
+
"Called periodically (~8 hours) to update all STV values based on JLP performance",
|
|
1114
|
+
"",
|
|
1115
|
+
"# USD-Based Settlement",
|
|
1116
|
+
"1. Values total vault holdings (JLP + staging jlX) in USD using oracles",
|
|
1117
|
+
"2. Values total base_loaned across all STVs in USD",
|
|
1118
|
+
"3. Distributes surplus (yield) or deficit (bad debt) proportionally",
|
|
1119
|
+
"",
|
|
1120
|
+
"# Security",
|
|
1121
|
+
"- BTC/ETH/SOL prices come from Doves oracles (manipulation-resistant)",
|
|
1122
|
+
"- JLP price computed directly from Jupiter Perps Pool account (aumUsd / jlp_supply)",
|
|
1123
|
+
"- Exchange rates come from Jupiter Earn (audited, TWAP-based)",
|
|
1124
|
+
"- Distribution is proportional to each STV's share of total loans",
|
|
1125
|
+
"",
|
|
1126
|
+
"# Accounts",
|
|
1127
|
+
"Requires all 5 STVs, 5 staging jlX ATAs, 3 Doves oracles (BTC/ETH/SOL),",
|
|
1128
|
+
"Jupiter Perps Pool account, JLP mint account",
|
|
1129
|
+
"",
|
|
1130
|
+
"# Remaining Accounts (15 accounts)",
|
|
1131
|
+
"For exchange rate calculation with time-accrued rewards:",
|
|
1132
|
+
"- [0-4]: Jupiter Lend lending accounts (BTC, ETH, SOL, USDC, JupUSD)",
|
|
1133
|
+
"- [5-9]: Jupiter Lend rewards rate model accounts (BTC, ETH, SOL, USDC, JupUSD)",
|
|
1134
|
+
"- [10-14]: jlX mint accounts (jlBTC, jlETH, jlSOL, jlUSDC, jlJupUSD)"
|
|
1135
|
+
];
|
|
1136
|
+
"discriminator": [
|
|
1137
|
+
64,
|
|
1138
|
+
28,
|
|
1139
|
+
44,
|
|
1140
|
+
24,
|
|
1141
|
+
43,
|
|
1142
|
+
204,
|
|
1143
|
+
58,
|
|
1144
|
+
215
|
|
1145
|
+
];
|
|
1146
|
+
"accounts": [
|
|
1147
|
+
{
|
|
1148
|
+
"name": "jlpVault";
|
|
1149
|
+
"writable": true;
|
|
1150
|
+
},
|
|
1151
|
+
{
|
|
1152
|
+
"name": "vaultJlpAta";
|
|
1153
|
+
"docs": [
|
|
1154
|
+
"JLP token account owned by vault"
|
|
1155
|
+
];
|
|
1156
|
+
},
|
|
1157
|
+
{
|
|
1158
|
+
"name": "stv0";
|
|
1159
|
+
"writable": true;
|
|
1160
|
+
},
|
|
1161
|
+
{
|
|
1162
|
+
"name": "stv1";
|
|
1163
|
+
"writable": true;
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
"name": "stv2";
|
|
1167
|
+
"writable": true;
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"name": "stv3";
|
|
1171
|
+
"writable": true;
|
|
1172
|
+
},
|
|
1173
|
+
{
|
|
1174
|
+
"name": "stv4";
|
|
1175
|
+
"writable": true;
|
|
1176
|
+
},
|
|
1177
|
+
{
|
|
1178
|
+
"name": "stagingJlx0";
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
"name": "stagingJlx1";
|
|
1182
|
+
},
|
|
1183
|
+
{
|
|
1184
|
+
"name": "stagingJlx2";
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
"name": "stagingJlx3";
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
"name": "stagingJlx4";
|
|
1191
|
+
},
|
|
1192
|
+
{
|
|
1193
|
+
"name": "dovesBtcUsd";
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
"name": "dovesEthUsd";
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
"name": "dovesSolUsd";
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
"name": "jlpPool";
|
|
1203
|
+
},
|
|
1204
|
+
{
|
|
1205
|
+
"name": "jlpMintAccount";
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
"name": "manager";
|
|
1209
|
+
"docs": [
|
|
1210
|
+
"Manager who can perform rebalance operations (verified in handler)"
|
|
1211
|
+
];
|
|
1212
|
+
"signer": true;
|
|
1213
|
+
}
|
|
1214
|
+
];
|
|
1215
|
+
"args": [];
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
"name": "swapJlxToFromJlp";
|
|
1219
|
+
"docs": [
|
|
1220
|
+
"Swap between different jlX types (e.g., jlSOL -> jlUSDC) via Jupiter",
|
|
1221
|
+
"Manager-only operation for rebalancing vault composition",
|
|
1222
|
+
"",
|
|
1223
|
+
"Remaining accounts: Jupiter swap accounts from API (varies based on route)",
|
|
1224
|
+
"Swap between jlX and JLP tokens via Jupiter",
|
|
1225
|
+
"JlxToJlp: Swap jlX -> JLP (increase vault JLP balance)",
|
|
1226
|
+
"JlpToJlx: Swap JLP -> jlX (decrease vault JLP balance)",
|
|
1227
|
+
"Manager-only operation for JLP position management",
|
|
992
1228
|
"",
|
|
993
1229
|
"Note: JLP positions are tracked via STV.base_loaned and settled",
|
|
994
1230
|
"using settle_yield with Doves oracle prices (USD-based settlement).",
|
|
@@ -1059,7 +1295,7 @@ type JlpDProgram = {
|
|
|
1059
1295
|
"name": "params";
|
|
1060
1296
|
"type": {
|
|
1061
1297
|
"defined": {
|
|
1062
|
-
"name": "
|
|
1298
|
+
"name": "SwapJlxJlpParams";
|
|
1063
1299
|
};
|
|
1064
1300
|
};
|
|
1065
1301
|
}
|
|
@@ -1111,131 +1347,16 @@ type JlpDProgram = {
|
|
|
1111
1347
|
"name": "params";
|
|
1112
1348
|
"type": {
|
|
1113
1349
|
"defined": {
|
|
1114
|
-
"name": "
|
|
1350
|
+
"name": "UpdateStvParams";
|
|
1115
1351
|
};
|
|
1116
1352
|
};
|
|
1117
1353
|
}
|
|
1118
1354
|
];
|
|
1119
|
-
},
|
|
1120
|
-
{
|
|
1121
|
-
"name": "withdraw";
|
|
1122
|
-
"docs": [
|
|
1123
|
-
"Withdraw base asset by burning jvX shares",
|
|
1124
|
-
"",
|
|
1125
|
-
"# Flow",
|
|
1126
|
-
"1. Crystallize fees inline (ensures fair PPS)",
|
|
1127
|
-
"2. Calculate base amount from shares at post-fee PPS",
|
|
1128
|
-
"3. Burn jvX shares from user",
|
|
1129
|
-
"4. Transfer base from STV's base ATA to user",
|
|
1130
|
-
"",
|
|
1131
|
-
"# Note",
|
|
1132
|
-
"Requires sufficient base balance in STV's base ATA.",
|
|
1133
|
-
"Manager must ensure liquidity by converting jlX to base via",
|
|
1134
|
-
"jup_earn_deposit_withdraw instruction before user withdrawals.",
|
|
1135
|
-
"",
|
|
1136
|
-
"Remaining accounts (optional, for exchange rate):",
|
|
1137
|
-
"[0] = Jupiter Lend lending account",
|
|
1138
|
-
"[1] = Jupiter Lend rewards rate model"
|
|
1139
|
-
];
|
|
1140
|
-
"discriminator": [
|
|
1141
|
-
183,
|
|
1142
|
-
18,
|
|
1143
|
-
70,
|
|
1144
|
-
156,
|
|
1145
|
-
148,
|
|
1146
|
-
109,
|
|
1147
|
-
161,
|
|
1148
|
-
34
|
|
1149
|
-
];
|
|
1150
|
-
"accounts": [
|
|
1151
|
-
{
|
|
1152
|
-
"name": "user";
|
|
1153
|
-
"docs": [
|
|
1154
|
-
"User performing the withdrawal"
|
|
1155
|
-
];
|
|
1156
|
-
"writable": true;
|
|
1157
|
-
"signer": true;
|
|
1158
|
-
},
|
|
1159
|
-
{
|
|
1160
|
-
"name": "jlpVault";
|
|
1161
|
-
"docs": [
|
|
1162
|
-
"The JLP Vault PDA account",
|
|
1163
|
-
"Note: PDA verified in handler via get_pda() to avoid multiple loads"
|
|
1164
|
-
];
|
|
1165
|
-
},
|
|
1166
|
-
{
|
|
1167
|
-
"name": "stv";
|
|
1168
|
-
"docs": [
|
|
1169
|
-
"The STV PDA account",
|
|
1170
|
-
"Note: PDA verified in handler via get_pda() to avoid multiple loads"
|
|
1171
|
-
];
|
|
1172
|
-
"writable": true;
|
|
1173
|
-
},
|
|
1174
|
-
{
|
|
1175
|
-
"name": "baseMint";
|
|
1176
|
-
"docs": [
|
|
1177
|
-
"Base asset mint (underlying token: SOL, BTC, ETH, USDC)"
|
|
1178
|
-
];
|
|
1179
|
-
},
|
|
1180
|
-
{
|
|
1181
|
-
"name": "jlMint";
|
|
1182
|
-
"docs": [
|
|
1183
|
-
"jlX mint (Jupiter Lend token) - used for NAV calculation"
|
|
1184
|
-
];
|
|
1185
|
-
},
|
|
1186
|
-
{
|
|
1187
|
-
"name": "jvMint";
|
|
1188
|
-
"docs": [
|
|
1189
|
-
"jvX mint (vault share token) - STV is mint authority",
|
|
1190
|
-
"Verified against STV.jv_mint in handler"
|
|
1191
|
-
];
|
|
1192
|
-
"writable": true;
|
|
1193
|
-
},
|
|
1194
|
-
{
|
|
1195
|
-
"name": "userBaseAta";
|
|
1196
|
-
"docs": [
|
|
1197
|
-
"User's base asset token account (destination for withdrawal)"
|
|
1198
|
-
];
|
|
1199
|
-
"writable": true;
|
|
1200
|
-
},
|
|
1201
|
-
{
|
|
1202
|
-
"name": "userJvxAta";
|
|
1203
|
-
"docs": [
|
|
1204
|
-
"User's jvX token account (source - shares to burn)"
|
|
1205
|
-
];
|
|
1206
|
-
"writable": true;
|
|
1207
|
-
},
|
|
1208
|
-
{
|
|
1209
|
-
"name": "stvBaseAta";
|
|
1210
|
-
"docs": [
|
|
1211
|
-
"STV's base ATA (source for base tokens to user)"
|
|
1212
|
-
];
|
|
1213
|
-
"writable": true;
|
|
1214
|
-
},
|
|
1215
|
-
{
|
|
1216
|
-
"name": "stvJlxAta";
|
|
1217
|
-
"docs": [
|
|
1218
|
-
"STV's jlX ATA (used for NAV calculation)"
|
|
1219
|
-
];
|
|
1220
|
-
},
|
|
1221
|
-
{
|
|
1222
|
-
"name": "tokenProgram";
|
|
1223
|
-
"docs": [
|
|
1224
|
-
"Token program"
|
|
1225
|
-
];
|
|
1226
|
-
}
|
|
1227
|
-
];
|
|
1228
|
-
"args": [
|
|
1229
|
-
{
|
|
1230
|
-
"name": "sharesToBurn";
|
|
1231
|
-
"type": "u64";
|
|
1232
|
-
}
|
|
1233
|
-
];
|
|
1234
1355
|
}
|
|
1235
1356
|
];
|
|
1236
1357
|
"accounts": [
|
|
1237
1358
|
{
|
|
1238
|
-
"name": "
|
|
1359
|
+
"name": "JLPVault";
|
|
1239
1360
|
"discriminator": [
|
|
1240
1361
|
41,
|
|
1241
1362
|
108,
|
|
@@ -1248,7 +1369,7 @@ type JlpDProgram = {
|
|
|
1248
1369
|
];
|
|
1249
1370
|
},
|
|
1250
1371
|
{
|
|
1251
|
-
"name": "
|
|
1372
|
+
"name": "STV";
|
|
1252
1373
|
"discriminator": [
|
|
1253
1374
|
214,
|
|
1254
1375
|
2,
|
|
@@ -1259,11 +1380,24 @@ type JlpDProgram = {
|
|
|
1259
1380
|
17,
|
|
1260
1381
|
230
|
|
1261
1382
|
];
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
"name": "WithdrawRequest";
|
|
1386
|
+
"discriminator": [
|
|
1387
|
+
186,
|
|
1388
|
+
239,
|
|
1389
|
+
174,
|
|
1390
|
+
191,
|
|
1391
|
+
189,
|
|
1392
|
+
13,
|
|
1393
|
+
47,
|
|
1394
|
+
196
|
|
1395
|
+
];
|
|
1262
1396
|
}
|
|
1263
1397
|
];
|
|
1264
1398
|
"events": [
|
|
1265
1399
|
{
|
|
1266
|
-
"name": "
|
|
1400
|
+
"name": "Deposited";
|
|
1267
1401
|
"discriminator": [
|
|
1268
1402
|
111,
|
|
1269
1403
|
141,
|
|
@@ -1276,7 +1410,33 @@ type JlpDProgram = {
|
|
|
1276
1410
|
];
|
|
1277
1411
|
},
|
|
1278
1412
|
{
|
|
1279
|
-
"name": "
|
|
1413
|
+
"name": "EpochAdvanced";
|
|
1414
|
+
"discriminator": [
|
|
1415
|
+
41,
|
|
1416
|
+
220,
|
|
1417
|
+
14,
|
|
1418
|
+
123,
|
|
1419
|
+
117,
|
|
1420
|
+
70,
|
|
1421
|
+
117,
|
|
1422
|
+
157
|
|
1423
|
+
];
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
"name": "EpochProcessed";
|
|
1427
|
+
"discriminator": [
|
|
1428
|
+
18,
|
|
1429
|
+
238,
|
|
1430
|
+
2,
|
|
1431
|
+
247,
|
|
1432
|
+
238,
|
|
1433
|
+
178,
|
|
1434
|
+
94,
|
|
1435
|
+
138
|
|
1436
|
+
];
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
"name": "FeesClaimSkipped";
|
|
1280
1440
|
"discriminator": [
|
|
1281
1441
|
7,
|
|
1282
1442
|
214,
|
|
@@ -1289,7 +1449,7 @@ type JlpDProgram = {
|
|
|
1289
1449
|
];
|
|
1290
1450
|
},
|
|
1291
1451
|
{
|
|
1292
|
-
"name": "
|
|
1452
|
+
"name": "FeesClaimed";
|
|
1293
1453
|
"discriminator": [
|
|
1294
1454
|
22,
|
|
1295
1455
|
104,
|
|
@@ -1302,7 +1462,7 @@ type JlpDProgram = {
|
|
|
1302
1462
|
];
|
|
1303
1463
|
},
|
|
1304
1464
|
{
|
|
1305
|
-
"name": "
|
|
1465
|
+
"name": "JlpSwapped";
|
|
1306
1466
|
"discriminator": [
|
|
1307
1467
|
253,
|
|
1308
1468
|
47,
|
|
@@ -1315,7 +1475,7 @@ type JlpDProgram = {
|
|
|
1315
1475
|
];
|
|
1316
1476
|
},
|
|
1317
1477
|
{
|
|
1318
|
-
"name": "
|
|
1478
|
+
"name": "JlpVaultInitialized";
|
|
1319
1479
|
"discriminator": [
|
|
1320
1480
|
52,
|
|
1321
1481
|
94,
|
|
@@ -1328,7 +1488,7 @@ type JlpDProgram = {
|
|
|
1328
1488
|
];
|
|
1329
1489
|
},
|
|
1330
1490
|
{
|
|
1331
|
-
"name": "
|
|
1491
|
+
"name": "JlpVaultUpdated";
|
|
1332
1492
|
"discriminator": [
|
|
1333
1493
|
20,
|
|
1334
1494
|
204,
|
|
@@ -1341,7 +1501,7 @@ type JlpDProgram = {
|
|
|
1341
1501
|
];
|
|
1342
1502
|
},
|
|
1343
1503
|
{
|
|
1344
|
-
"name": "
|
|
1504
|
+
"name": "JlxMoved";
|
|
1345
1505
|
"discriminator": [
|
|
1346
1506
|
251,
|
|
1347
1507
|
80,
|
|
@@ -1354,7 +1514,7 @@ type JlpDProgram = {
|
|
|
1354
1514
|
];
|
|
1355
1515
|
},
|
|
1356
1516
|
{
|
|
1357
|
-
"name": "
|
|
1517
|
+
"name": "JlxSwapped";
|
|
1358
1518
|
"discriminator": [
|
|
1359
1519
|
200,
|
|
1360
1520
|
218,
|
|
@@ -1367,7 +1527,7 @@ type JlpDProgram = {
|
|
|
1367
1527
|
];
|
|
1368
1528
|
},
|
|
1369
1529
|
{
|
|
1370
|
-
"name": "
|
|
1530
|
+
"name": "JupEarnEvent";
|
|
1371
1531
|
"discriminator": [
|
|
1372
1532
|
138,
|
|
1373
1533
|
10,
|
|
@@ -1380,7 +1540,7 @@ type JlpDProgram = {
|
|
|
1380
1540
|
];
|
|
1381
1541
|
},
|
|
1382
1542
|
{
|
|
1383
|
-
"name": "
|
|
1543
|
+
"name": "SettleYieldEvent";
|
|
1384
1544
|
"discriminator": [
|
|
1385
1545
|
208,
|
|
1386
1546
|
142,
|
|
@@ -1393,7 +1553,7 @@ type JlpDProgram = {
|
|
|
1393
1553
|
];
|
|
1394
1554
|
},
|
|
1395
1555
|
{
|
|
1396
|
-
"name": "
|
|
1556
|
+
"name": "SettleYieldSkipped";
|
|
1397
1557
|
"discriminator": [
|
|
1398
1558
|
189,
|
|
1399
1559
|
221,
|
|
@@ -1406,7 +1566,7 @@ type JlpDProgram = {
|
|
|
1406
1566
|
];
|
|
1407
1567
|
},
|
|
1408
1568
|
{
|
|
1409
|
-
"name": "
|
|
1569
|
+
"name": "SettleYieldStvEvent";
|
|
1410
1570
|
"discriminator": [
|
|
1411
1571
|
12,
|
|
1412
1572
|
42,
|
|
@@ -1419,7 +1579,7 @@ type JlpDProgram = {
|
|
|
1419
1579
|
];
|
|
1420
1580
|
},
|
|
1421
1581
|
{
|
|
1422
|
-
"name": "
|
|
1582
|
+
"name": "StvInitialized";
|
|
1423
1583
|
"discriminator": [
|
|
1424
1584
|
41,
|
|
1425
1585
|
106,
|
|
@@ -1432,7 +1592,7 @@ type JlpDProgram = {
|
|
|
1432
1592
|
];
|
|
1433
1593
|
},
|
|
1434
1594
|
{
|
|
1435
|
-
"name": "
|
|
1595
|
+
"name": "StvUpdated";
|
|
1436
1596
|
"discriminator": [
|
|
1437
1597
|
108,
|
|
1438
1598
|
129,
|
|
@@ -1445,254 +1605,317 @@ type JlpDProgram = {
|
|
|
1445
1605
|
];
|
|
1446
1606
|
},
|
|
1447
1607
|
{
|
|
1448
|
-
"name": "
|
|
1608
|
+
"name": "WithdrawClaimed";
|
|
1449
1609
|
"discriminator": [
|
|
1450
|
-
|
|
1610
|
+
77,
|
|
1611
|
+
130,
|
|
1451
1612
|
89,
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1613
|
+
38,
|
|
1614
|
+
239,
|
|
1615
|
+
172,
|
|
1616
|
+
174,
|
|
1617
|
+
85
|
|
1618
|
+
];
|
|
1619
|
+
},
|
|
1620
|
+
{
|
|
1621
|
+
"name": "WithdrawRequested";
|
|
1622
|
+
"discriminator": [
|
|
1623
|
+
114,
|
|
1624
|
+
16,
|
|
1625
|
+
240,
|
|
1626
|
+
206,
|
|
1627
|
+
93,
|
|
1628
|
+
128,
|
|
1629
|
+
151,
|
|
1630
|
+
39
|
|
1458
1631
|
];
|
|
1459
1632
|
}
|
|
1460
1633
|
];
|
|
1461
1634
|
"errors": [
|
|
1462
1635
|
{
|
|
1463
1636
|
"code": 6000;
|
|
1464
|
-
"name": "
|
|
1637
|
+
"name": "Unauthorized";
|
|
1465
1638
|
"msg": "Unauthorized: not admin";
|
|
1466
1639
|
},
|
|
1467
1640
|
{
|
|
1468
1641
|
"code": 6001;
|
|
1469
|
-
"name": "
|
|
1642
|
+
"name": "NotManager";
|
|
1470
1643
|
"msg": "Unauthorized: not manager";
|
|
1471
1644
|
},
|
|
1472
1645
|
{
|
|
1473
1646
|
"code": 6002;
|
|
1474
|
-
"name": "
|
|
1647
|
+
"name": "VaultPaused";
|
|
1475
1648
|
"msg": "Vault is paused";
|
|
1476
1649
|
},
|
|
1477
1650
|
{
|
|
1478
1651
|
"code": 6003;
|
|
1479
|
-
"name": "
|
|
1652
|
+
"name": "DepositsDisabled";
|
|
1480
1653
|
"msg": "Deposits disabled";
|
|
1481
1654
|
},
|
|
1482
1655
|
{
|
|
1483
1656
|
"code": 6004;
|
|
1484
|
-
"name": "
|
|
1657
|
+
"name": "WithdrawalsDisabled";
|
|
1485
1658
|
"msg": "Withdrawals disabled";
|
|
1486
1659
|
},
|
|
1487
1660
|
{
|
|
1488
1661
|
"code": 6005;
|
|
1489
|
-
"name": "
|
|
1662
|
+
"name": "JlpDisabled";
|
|
1490
1663
|
"msg": "JLP operations disabled";
|
|
1491
1664
|
},
|
|
1492
1665
|
{
|
|
1493
1666
|
"code": 6006;
|
|
1494
|
-
"name": "
|
|
1667
|
+
"name": "RebalanceDisabled";
|
|
1495
1668
|
"msg": "Rebalance operations disabled";
|
|
1496
1669
|
},
|
|
1497
1670
|
{
|
|
1498
1671
|
"code": 6007;
|
|
1499
|
-
"name": "
|
|
1672
|
+
"name": "MathOverflow";
|
|
1500
1673
|
"msg": "Math overflow";
|
|
1501
1674
|
},
|
|
1502
1675
|
{
|
|
1503
1676
|
"code": 6008;
|
|
1504
|
-
"name": "
|
|
1677
|
+
"name": "InvalidTimestamp";
|
|
1505
1678
|
"msg": "Invalid timestamp";
|
|
1506
1679
|
},
|
|
1507
1680
|
{
|
|
1508
1681
|
"code": 6009;
|
|
1509
|
-
"name": "
|
|
1682
|
+
"name": "DivisionByZero";
|
|
1510
1683
|
"msg": "Division by zero";
|
|
1511
1684
|
},
|
|
1512
1685
|
{
|
|
1513
1686
|
"code": 6010;
|
|
1514
|
-
"name": "
|
|
1687
|
+
"name": "StagingNotZero";
|
|
1515
1688
|
"msg": "Staging ATAs must be zero";
|
|
1516
1689
|
},
|
|
1517
1690
|
{
|
|
1518
1691
|
"code": 6011;
|
|
1519
|
-
"name": "
|
|
1692
|
+
"name": "InsufficientLiquidity";
|
|
1520
1693
|
"msg": "Insufficient liquidity for withdrawal";
|
|
1521
1694
|
},
|
|
1522
1695
|
{
|
|
1523
1696
|
"code": 6012;
|
|
1524
|
-
"name": "
|
|
1697
|
+
"name": "InsufficientBalance";
|
|
1525
1698
|
"msg": "Insufficient balance";
|
|
1526
1699
|
},
|
|
1527
1700
|
{
|
|
1528
1701
|
"code": 6013;
|
|
1529
|
-
"name": "
|
|
1702
|
+
"name": "SlippageExceeded";
|
|
1530
1703
|
"msg": "Slippage exceeded";
|
|
1531
1704
|
},
|
|
1532
1705
|
{
|
|
1533
1706
|
"code": 6014;
|
|
1534
|
-
"name": "
|
|
1707
|
+
"name": "InvalidJlpVaultBump";
|
|
1535
1708
|
"msg": "Invalid JLP vault PDA bump";
|
|
1536
1709
|
},
|
|
1537
1710
|
{
|
|
1538
1711
|
"code": 6015;
|
|
1539
|
-
"name": "
|
|
1712
|
+
"name": "InvalidStvBump";
|
|
1540
1713
|
"msg": "Invalid STV PDA bump";
|
|
1541
1714
|
},
|
|
1542
1715
|
{
|
|
1543
1716
|
"code": 6016;
|
|
1544
|
-
"name": "
|
|
1717
|
+
"name": "InvalidJlMint";
|
|
1545
1718
|
"msg": "Invalid jlX mint (Jupiter Lend token)";
|
|
1546
1719
|
},
|
|
1547
1720
|
{
|
|
1548
1721
|
"code": 6017;
|
|
1549
|
-
"name": "
|
|
1722
|
+
"name": "InvalidJvMint";
|
|
1550
1723
|
"msg": "Invalid jvX mint (vault share token)";
|
|
1551
1724
|
},
|
|
1552
1725
|
{
|
|
1553
1726
|
"code": 6018;
|
|
1554
|
-
"name": "
|
|
1727
|
+
"name": "InvalidBaseMint";
|
|
1555
1728
|
"msg": "Invalid base asset mint";
|
|
1556
1729
|
},
|
|
1557
1730
|
{
|
|
1558
1731
|
"code": 6019;
|
|
1559
|
-
"name": "
|
|
1732
|
+
"name": "InvalidJlpMint";
|
|
1560
1733
|
"msg": "Invalid JLP mint";
|
|
1561
1734
|
},
|
|
1562
1735
|
{
|
|
1563
1736
|
"code": 6020;
|
|
1564
|
-
"name": "
|
|
1737
|
+
"name": "InvalidOwner";
|
|
1565
1738
|
"msg": "Invalid account owner";
|
|
1566
1739
|
},
|
|
1567
1740
|
{
|
|
1568
1741
|
"code": 6021;
|
|
1569
|
-
"name": "
|
|
1742
|
+
"name": "InvalidStvIndex";
|
|
1570
1743
|
"msg": "Invalid STV index";
|
|
1571
1744
|
},
|
|
1572
1745
|
{
|
|
1573
1746
|
"code": 6022;
|
|
1574
|
-
"name": "
|
|
1747
|
+
"name": "InvalidFeeParams";
|
|
1575
1748
|
"msg": "Invalid fee parameters";
|
|
1576
1749
|
},
|
|
1577
1750
|
{
|
|
1578
1751
|
"code": 6023;
|
|
1579
|
-
"name": "
|
|
1752
|
+
"name": "AmountTooSmall";
|
|
1580
1753
|
"msg": "Amount too small";
|
|
1581
1754
|
},
|
|
1582
1755
|
{
|
|
1583
1756
|
"code": 6024;
|
|
1584
|
-
"name": "
|
|
1757
|
+
"name": "ZeroAmount";
|
|
1585
1758
|
"msg": "Zero amount not allowed";
|
|
1586
1759
|
},
|
|
1587
1760
|
{
|
|
1588
1761
|
"code": 6025;
|
|
1589
|
-
"name": "
|
|
1762
|
+
"name": "FeeCapExceeded";
|
|
1590
1763
|
"msg": "Fee cap exceeded";
|
|
1591
1764
|
},
|
|
1592
1765
|
{
|
|
1593
1766
|
"code": 6026;
|
|
1594
|
-
"name": "
|
|
1767
|
+
"name": "MintMismatch";
|
|
1595
1768
|
"msg": "Mint mismatch";
|
|
1596
1769
|
},
|
|
1597
1770
|
{
|
|
1598
1771
|
"code": 6027;
|
|
1599
|
-
"name": "
|
|
1772
|
+
"name": "InsufficientAccounts";
|
|
1600
1773
|
"msg": "Insufficient accounts provided";
|
|
1601
1774
|
},
|
|
1602
1775
|
{
|
|
1603
1776
|
"code": 6028;
|
|
1604
|
-
"name": "
|
|
1777
|
+
"name": "InvalidProgram";
|
|
1605
1778
|
"msg": "Invalid program ID";
|
|
1606
1779
|
},
|
|
1607
1780
|
{
|
|
1608
1781
|
"code": 6029;
|
|
1609
|
-
"name": "
|
|
1782
|
+
"name": "InvalidSwapDiscriminator";
|
|
1610
1783
|
"msg": "Invalid swap discriminator";
|
|
1611
1784
|
},
|
|
1612
1785
|
{
|
|
1613
1786
|
"code": 6030;
|
|
1614
|
-
"name": "
|
|
1787
|
+
"name": "MaxDepositExceeded";
|
|
1615
1788
|
"msg": "Deposit exceeds maximum allowed";
|
|
1616
1789
|
},
|
|
1617
1790
|
{
|
|
1618
1791
|
"code": 6031;
|
|
1619
|
-
"name": "
|
|
1792
|
+
"name": "InvalidLendingAccount";
|
|
1620
1793
|
"msg": "Invalid Jupiter Lend lending account";
|
|
1621
1794
|
},
|
|
1622
1795
|
{
|
|
1623
1796
|
"code": 6032;
|
|
1624
|
-
"name": "
|
|
1797
|
+
"name": "MissingExchangeRateAccounts";
|
|
1625
1798
|
"msg": "Missing exchange rate accounts - lending and rewards_rate_model required for pools with Jupiter Earn";
|
|
1626
1799
|
},
|
|
1627
1800
|
{
|
|
1628
1801
|
"code": 6033;
|
|
1629
|
-
"name": "
|
|
1802
|
+
"name": "JupiterLendCpiFailed";
|
|
1630
1803
|
"msg": "Jupiter Lend CPI failed";
|
|
1631
1804
|
},
|
|
1632
1805
|
{
|
|
1633
1806
|
"code": 6034;
|
|
1634
|
-
"name": "
|
|
1807
|
+
"name": "JupiterSwapCpiFailed";
|
|
1635
1808
|
"msg": "Jupiter swap CPI failed";
|
|
1636
1809
|
},
|
|
1637
1810
|
{
|
|
1638
1811
|
"code": 6035;
|
|
1639
|
-
"name": "
|
|
1812
|
+
"name": "OracleStale";
|
|
1640
1813
|
"msg": "Oracle price is stale - older than staleness threshold";
|
|
1641
1814
|
},
|
|
1642
1815
|
{
|
|
1643
1816
|
"code": 6036;
|
|
1644
|
-
"name": "
|
|
1817
|
+
"name": "OraclePriceNegative";
|
|
1645
1818
|
"msg": "Oracle returned negative price";
|
|
1646
1819
|
},
|
|
1647
1820
|
{
|
|
1648
1821
|
"code": 6037;
|
|
1649
|
-
"name": "
|
|
1822
|
+
"name": "InvalidBaseAssetIndex";
|
|
1650
1823
|
"msg": "Invalid base asset index";
|
|
1651
1824
|
},
|
|
1652
1825
|
{
|
|
1653
1826
|
"code": 6038;
|
|
1654
|
-
"name": "
|
|
1827
|
+
"name": "PriceFeedMismatch";
|
|
1655
1828
|
"msg": "Price feed mismatch";
|
|
1656
1829
|
},
|
|
1657
1830
|
{
|
|
1658
1831
|
"code": 6039;
|
|
1659
|
-
"name": "
|
|
1832
|
+
"name": "OracleAccountInvalid";
|
|
1660
1833
|
"msg": "Oracle account invalid";
|
|
1661
1834
|
},
|
|
1662
1835
|
{
|
|
1663
1836
|
"code": 6040;
|
|
1664
|
-
"name": "
|
|
1837
|
+
"name": "InvalidAccountData";
|
|
1665
1838
|
"msg": "Invalid account data - could not parse account";
|
|
1666
1839
|
},
|
|
1667
1840
|
{
|
|
1668
1841
|
"code": 6041;
|
|
1669
|
-
"name": "
|
|
1842
|
+
"name": "InvalidExchangeRate";
|
|
1670
1843
|
"msg": "Invalid exchange rate from Jupiter Lend";
|
|
1671
1844
|
},
|
|
1672
1845
|
{
|
|
1673
1846
|
"code": 6042;
|
|
1674
|
-
"name": "
|
|
1847
|
+
"name": "InvalidOracleAccount";
|
|
1675
1848
|
"msg": "Invalid oracle account - not owned by expected program";
|
|
1676
1849
|
},
|
|
1677
1850
|
{
|
|
1678
1851
|
"code": 6043;
|
|
1679
|
-
"name": "
|
|
1680
|
-
"msg": "
|
|
1852
|
+
"name": "JlpPriceOutOfRange";
|
|
1853
|
+
"msg": "JLP price out of reasonable range ($0.50 - $50.00)";
|
|
1681
1854
|
},
|
|
1682
1855
|
{
|
|
1683
1856
|
"code": 6044;
|
|
1684
|
-
"name": "
|
|
1857
|
+
"name": "TestModeRequired";
|
|
1685
1858
|
"msg": "Test mode required: FLAG_TEST_MODE must be set for devnet/localnet builds";
|
|
1686
1859
|
},
|
|
1687
1860
|
{
|
|
1688
1861
|
"code": 6045;
|
|
1689
|
-
"name": "
|
|
1862
|
+
"name": "NotAdmin";
|
|
1690
1863
|
"msg": "Unauthorized: not admin";
|
|
1864
|
+
},
|
|
1865
|
+
{
|
|
1866
|
+
"code": 6046;
|
|
1867
|
+
"name": "TokenAccountNotEmpty";
|
|
1868
|
+
"msg": "Token account balance must be zero before closing";
|
|
1869
|
+
},
|
|
1870
|
+
{
|
|
1871
|
+
"code": 6047;
|
|
1872
|
+
"name": "TokenAccountOwnerMismatch";
|
|
1873
|
+
"msg": "Token account not owned by expected PDA";
|
|
1874
|
+
},
|
|
1875
|
+
{
|
|
1876
|
+
"code": 6048;
|
|
1877
|
+
"name": "EpochEnded";
|
|
1878
|
+
"msg": "Epoch has ended - call process_epoch first";
|
|
1879
|
+
},
|
|
1880
|
+
{
|
|
1881
|
+
"code": 6049;
|
|
1882
|
+
"name": "EpochNotEnded";
|
|
1883
|
+
"msg": "Epoch has not ended yet";
|
|
1884
|
+
},
|
|
1885
|
+
{
|
|
1886
|
+
"code": 6050;
|
|
1887
|
+
"name": "ClaimNotAvailableYet";
|
|
1888
|
+
"msg": "Claim not available yet - wait for next epoch";
|
|
1889
|
+
},
|
|
1890
|
+
{
|
|
1891
|
+
"code": 6051;
|
|
1892
|
+
"name": "InvalidEpochInterval";
|
|
1893
|
+
"msg": "Withdraw epoch interval must be > 0";
|
|
1894
|
+
},
|
|
1895
|
+
{
|
|
1896
|
+
"code": 6052;
|
|
1897
|
+
"name": "ActiveWithdrawReserves";
|
|
1898
|
+
"msg": "Cannot update epoch interval with active reserves";
|
|
1899
|
+
},
|
|
1900
|
+
{
|
|
1901
|
+
"code": 6053;
|
|
1902
|
+
"name": "EpochIdMismatch";
|
|
1903
|
+
"msg": "Epoch ID mismatch";
|
|
1904
|
+
},
|
|
1905
|
+
{
|
|
1906
|
+
"code": 6054;
|
|
1907
|
+
"name": "WithdrawRequestNotProcessed";
|
|
1908
|
+
"msg": "Withdraw request not processed yet";
|
|
1909
|
+
},
|
|
1910
|
+
{
|
|
1911
|
+
"code": 6055;
|
|
1912
|
+
"name": "WithdrawRequestAlreadyProcessed";
|
|
1913
|
+
"msg": "Withdraw request already processed";
|
|
1691
1914
|
}
|
|
1692
1915
|
];
|
|
1693
1916
|
"types": [
|
|
1694
1917
|
{
|
|
1695
|
-
"name": "
|
|
1918
|
+
"name": "Deposited";
|
|
1696
1919
|
"type": {
|
|
1697
1920
|
"kind": "struct";
|
|
1698
1921
|
"fields": [
|
|
@@ -1712,35 +1935,91 @@ type JlpDProgram = {
|
|
|
1712
1935
|
"type": "u64";
|
|
1713
1936
|
},
|
|
1714
1937
|
{
|
|
1715
|
-
"name": "sharesMinted";
|
|
1938
|
+
"name": "sharesMinted";
|
|
1939
|
+
"type": "u64";
|
|
1940
|
+
},
|
|
1941
|
+
{
|
|
1942
|
+
"name": "pps";
|
|
1943
|
+
"type": "u64";
|
|
1944
|
+
}
|
|
1945
|
+
];
|
|
1946
|
+
};
|
|
1947
|
+
},
|
|
1948
|
+
{
|
|
1949
|
+
"name": "Direction";
|
|
1950
|
+
"docs": [
|
|
1951
|
+
"Direction of jlX token movement between STV and Vault"
|
|
1952
|
+
];
|
|
1953
|
+
"type": {
|
|
1954
|
+
"kind": "enum";
|
|
1955
|
+
"variants": [
|
|
1956
|
+
{
|
|
1957
|
+
"name": "ToVault";
|
|
1958
|
+
},
|
|
1959
|
+
{
|
|
1960
|
+
"name": "FromVault";
|
|
1961
|
+
}
|
|
1962
|
+
];
|
|
1963
|
+
};
|
|
1964
|
+
},
|
|
1965
|
+
{
|
|
1966
|
+
"name": "EpochAdvanced";
|
|
1967
|
+
"type": {
|
|
1968
|
+
"kind": "struct";
|
|
1969
|
+
"fields": [
|
|
1970
|
+
{
|
|
1971
|
+
"name": "stv";
|
|
1972
|
+
"type": "pubkey";
|
|
1973
|
+
},
|
|
1974
|
+
{
|
|
1975
|
+
"name": "newEpochId";
|
|
1976
|
+
"type": "u32";
|
|
1977
|
+
},
|
|
1978
|
+
{
|
|
1979
|
+
"name": "newNextEpochTs";
|
|
1980
|
+
"type": "u32";
|
|
1981
|
+
}
|
|
1982
|
+
];
|
|
1983
|
+
};
|
|
1984
|
+
},
|
|
1985
|
+
{
|
|
1986
|
+
"name": "EpochProcessed";
|
|
1987
|
+
"type": {
|
|
1988
|
+
"kind": "struct";
|
|
1989
|
+
"fields": [
|
|
1990
|
+
{
|
|
1991
|
+
"name": "stv";
|
|
1992
|
+
"type": "pubkey";
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
"name": "epochId";
|
|
1996
|
+
"type": "u32";
|
|
1997
|
+
},
|
|
1998
|
+
{
|
|
1999
|
+
"name": "pps";
|
|
2000
|
+
"type": "u64";
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
"name": "totalShares";
|
|
1716
2004
|
"type": "u64";
|
|
1717
2005
|
},
|
|
1718
2006
|
{
|
|
1719
|
-
"name": "
|
|
2007
|
+
"name": "totalBase";
|
|
1720
2008
|
"type": "u64";
|
|
1721
|
-
}
|
|
1722
|
-
];
|
|
1723
|
-
};
|
|
1724
|
-
},
|
|
1725
|
-
{
|
|
1726
|
-
"name": "direction";
|
|
1727
|
-
"docs": [
|
|
1728
|
-
"Direction of jlX token movement between STV and Vault"
|
|
1729
|
-
];
|
|
1730
|
-
"type": {
|
|
1731
|
-
"kind": "enum";
|
|
1732
|
-
"variants": [
|
|
2009
|
+
},
|
|
1733
2010
|
{
|
|
1734
|
-
"name": "
|
|
2011
|
+
"name": "newEpochId";
|
|
2012
|
+
"type": "u32";
|
|
1735
2013
|
},
|
|
1736
2014
|
{
|
|
1737
|
-
"name": "
|
|
2015
|
+
"name": "newNextEpochTs";
|
|
2016
|
+
"type": "u32";
|
|
1738
2017
|
}
|
|
1739
2018
|
];
|
|
1740
2019
|
};
|
|
1741
2020
|
},
|
|
1742
2021
|
{
|
|
1743
|
-
"name": "
|
|
2022
|
+
"name": "FeesClaimSkipped";
|
|
1744
2023
|
"docs": [
|
|
1745
2024
|
"Event emitted when claim_fees returns early (no fees to claim)"
|
|
1746
2025
|
];
|
|
@@ -1765,7 +2044,7 @@ type JlpDProgram = {
|
|
|
1765
2044
|
};
|
|
1766
2045
|
},
|
|
1767
2046
|
{
|
|
1768
|
-
"name": "
|
|
2047
|
+
"name": "FeesClaimed";
|
|
1769
2048
|
"docs": [
|
|
1770
2049
|
"Fee claim event - when manager claims accrued fees"
|
|
1771
2050
|
];
|
|
@@ -1794,7 +2073,7 @@ type JlpDProgram = {
|
|
|
1794
2073
|
};
|
|
1795
2074
|
},
|
|
1796
2075
|
{
|
|
1797
|
-
"name": "
|
|
2076
|
+
"name": "InitOrUpdateJlpVaultParams";
|
|
1798
2077
|
"docs": [
|
|
1799
2078
|
"Parameters for initializing or updating the JLP Vault"
|
|
1800
2079
|
];
|
|
@@ -1890,7 +2169,7 @@ type JlpDProgram = {
|
|
|
1890
2169
|
};
|
|
1891
2170
|
},
|
|
1892
2171
|
{
|
|
1893
|
-
"name": "
|
|
2172
|
+
"name": "InitializeStvParams";
|
|
1894
2173
|
"docs": [
|
|
1895
2174
|
"Parameters for initializing an STV"
|
|
1896
2175
|
];
|
|
@@ -1924,12 +2203,19 @@ type JlpDProgram = {
|
|
|
1924
2203
|
"Minimum deposit amount in base asset (0 = no minimum)"
|
|
1925
2204
|
];
|
|
1926
2205
|
"type": "u64";
|
|
2206
|
+
},
|
|
2207
|
+
{
|
|
2208
|
+
"name": "epochSec";
|
|
2209
|
+
"docs": [
|
|
2210
|
+
"Epoch duration in seconds for delayed withdrawals"
|
|
2211
|
+
];
|
|
2212
|
+
"type": "u32";
|
|
1927
2213
|
}
|
|
1928
2214
|
];
|
|
1929
2215
|
};
|
|
1930
2216
|
},
|
|
1931
2217
|
{
|
|
1932
|
-
"name": "
|
|
2218
|
+
"name": "JLPVault";
|
|
1933
2219
|
"docs": [
|
|
1934
2220
|
"JLPVault - Global vault configuration account",
|
|
1935
2221
|
"Seeds: [\"jlp_vault\"]",
|
|
@@ -2052,7 +2338,7 @@ type JlpDProgram = {
|
|
|
2052
2338
|
};
|
|
2053
2339
|
},
|
|
2054
2340
|
{
|
|
2055
|
-
"name": "
|
|
2341
|
+
"name": "JlpSwapped";
|
|
2056
2342
|
"type": {
|
|
2057
2343
|
"kind": "struct";
|
|
2058
2344
|
"fields": [
|
|
@@ -2091,7 +2377,7 @@ type JlpDProgram = {
|
|
|
2091
2377
|
};
|
|
2092
2378
|
},
|
|
2093
2379
|
{
|
|
2094
|
-
"name": "
|
|
2380
|
+
"name": "JlpVaultInitialized";
|
|
2095
2381
|
"type": {
|
|
2096
2382
|
"kind": "struct";
|
|
2097
2383
|
"fields": [
|
|
@@ -2119,7 +2405,7 @@ type JlpDProgram = {
|
|
|
2119
2405
|
};
|
|
2120
2406
|
},
|
|
2121
2407
|
{
|
|
2122
|
-
"name": "
|
|
2408
|
+
"name": "JlpVaultUpdated";
|
|
2123
2409
|
"type": {
|
|
2124
2410
|
"kind": "struct";
|
|
2125
2411
|
"fields": [
|
|
@@ -2171,7 +2457,7 @@ type JlpDProgram = {
|
|
|
2171
2457
|
};
|
|
2172
2458
|
},
|
|
2173
2459
|
{
|
|
2174
|
-
"name": "
|
|
2460
|
+
"name": "JlxMoved";
|
|
2175
2461
|
"type": {
|
|
2176
2462
|
"kind": "struct";
|
|
2177
2463
|
"fields": [
|
|
@@ -2219,7 +2505,7 @@ type JlpDProgram = {
|
|
|
2219
2505
|
};
|
|
2220
2506
|
},
|
|
2221
2507
|
{
|
|
2222
|
-
"name": "
|
|
2508
|
+
"name": "JlxSwapped";
|
|
2223
2509
|
"type": {
|
|
2224
2510
|
"kind": "struct";
|
|
2225
2511
|
"fields": [
|
|
@@ -2251,7 +2537,7 @@ type JlpDProgram = {
|
|
|
2251
2537
|
};
|
|
2252
2538
|
},
|
|
2253
2539
|
{
|
|
2254
|
-
"name": "
|
|
2540
|
+
"name": "JupEarnDirection";
|
|
2255
2541
|
"docs": [
|
|
2256
2542
|
"Direction for Jupiter Earn operations"
|
|
2257
2543
|
];
|
|
@@ -2259,16 +2545,16 @@ type JlpDProgram = {
|
|
|
2259
2545
|
"kind": "enum";
|
|
2260
2546
|
"variants": [
|
|
2261
2547
|
{
|
|
2262
|
-
"name": "
|
|
2548
|
+
"name": "Deposit";
|
|
2263
2549
|
},
|
|
2264
2550
|
{
|
|
2265
|
-
"name": "
|
|
2551
|
+
"name": "Withdraw";
|
|
2266
2552
|
}
|
|
2267
2553
|
];
|
|
2268
2554
|
};
|
|
2269
2555
|
},
|
|
2270
2556
|
{
|
|
2271
|
-
"name": "
|
|
2557
|
+
"name": "JupEarnEvent";
|
|
2272
2558
|
"docs": [
|
|
2273
2559
|
"Event emitted for Jupiter Earn deposit/withdraw operations"
|
|
2274
2560
|
];
|
|
@@ -2307,7 +2593,7 @@ type JlpDProgram = {
|
|
|
2307
2593
|
};
|
|
2308
2594
|
},
|
|
2309
2595
|
{
|
|
2310
|
-
"name": "
|
|
2596
|
+
"name": "JupEarnParams";
|
|
2311
2597
|
"docs": [
|
|
2312
2598
|
"Parameters for Jupiter Earn deposit/withdraw"
|
|
2313
2599
|
];
|
|
@@ -2321,7 +2607,7 @@ type JlpDProgram = {
|
|
|
2321
2607
|
];
|
|
2322
2608
|
"type": {
|
|
2323
2609
|
"defined": {
|
|
2324
|
-
"name": "
|
|
2610
|
+
"name": "JupEarnDirection";
|
|
2325
2611
|
};
|
|
2326
2612
|
};
|
|
2327
2613
|
},
|
|
@@ -2336,7 +2622,7 @@ type JlpDProgram = {
|
|
|
2336
2622
|
};
|
|
2337
2623
|
},
|
|
2338
2624
|
{
|
|
2339
|
-
"name": "
|
|
2625
|
+
"name": "MoveJlxParams";
|
|
2340
2626
|
"docs": [
|
|
2341
2627
|
"Parameters for moving jlX tokens between STV and Vault"
|
|
2342
2628
|
];
|
|
@@ -2357,7 +2643,7 @@ type JlpDProgram = {
|
|
|
2357
2643
|
];
|
|
2358
2644
|
"type": {
|
|
2359
2645
|
"defined": {
|
|
2360
|
-
"name": "
|
|
2646
|
+
"name": "Direction";
|
|
2361
2647
|
};
|
|
2362
2648
|
};
|
|
2363
2649
|
}
|
|
@@ -2365,11 +2651,11 @@ type JlpDProgram = {
|
|
|
2365
2651
|
};
|
|
2366
2652
|
},
|
|
2367
2653
|
{
|
|
2368
|
-
"name": "
|
|
2654
|
+
"name": "STV";
|
|
2369
2655
|
"docs": [
|
|
2370
2656
|
"STV - Single Token Vault account",
|
|
2371
2657
|
"Seeds: [\"stv\", base_mint.key().as_ref()]",
|
|
2372
|
-
"Size: 8 (discriminator) +
|
|
2658
|
+
"Size: 8 (discriminator) + 200 (data) = 208 bytes"
|
|
2373
2659
|
];
|
|
2374
2660
|
"serialization": "bytemuck";
|
|
2375
2661
|
"repr": {
|
|
@@ -2451,6 +2737,50 @@ type JlpDProgram = {
|
|
|
2451
2737
|
];
|
|
2452
2738
|
"type": "u64";
|
|
2453
2739
|
},
|
|
2740
|
+
{
|
|
2741
|
+
"name": "requestedBase";
|
|
2742
|
+
"docs": [
|
|
2743
|
+
"Estimated base for current epoch's withdrawal requests (reset on process_epoch)",
|
|
2744
|
+
"Manager reads this to know how much to unwind before next epoch"
|
|
2745
|
+
];
|
|
2746
|
+
"type": "u64";
|
|
2747
|
+
},
|
|
2748
|
+
{
|
|
2749
|
+
"name": "reservedBase";
|
|
2750
|
+
"docs": [
|
|
2751
|
+
"Base earmarked for unclaimed withdrawals (+process_epoch, -claim_withdraw)",
|
|
2752
|
+
"Subtracted from NAV so reserved funds don't inflate PPS"
|
|
2753
|
+
];
|
|
2754
|
+
"type": "u64";
|
|
2755
|
+
},
|
|
2756
|
+
{
|
|
2757
|
+
"name": "epochPps";
|
|
2758
|
+
"docs": [
|
|
2759
|
+
"PPS locked at first process_epoch batch (0 = not set, reset on epoch advance)"
|
|
2760
|
+
];
|
|
2761
|
+
"type": "u64";
|
|
2762
|
+
},
|
|
2763
|
+
{
|
|
2764
|
+
"name": "nextEpochTs";
|
|
2765
|
+
"docs": [
|
|
2766
|
+
"Unix timestamp when current epoch ends"
|
|
2767
|
+
];
|
|
2768
|
+
"type": "u32";
|
|
2769
|
+
},
|
|
2770
|
+
{
|
|
2771
|
+
"name": "epochSec";
|
|
2772
|
+
"docs": [
|
|
2773
|
+
"Epoch duration in seconds"
|
|
2774
|
+
];
|
|
2775
|
+
"type": "u32";
|
|
2776
|
+
},
|
|
2777
|
+
{
|
|
2778
|
+
"name": "currentEpochId";
|
|
2779
|
+
"docs": [
|
|
2780
|
+
"Incrementing epoch counter"
|
|
2781
|
+
];
|
|
2782
|
+
"type": "u32";
|
|
2783
|
+
},
|
|
2454
2784
|
{
|
|
2455
2785
|
"name": "mgmtFeeBps";
|
|
2456
2786
|
"docs": [
|
|
@@ -2485,12 +2815,24 @@ type JlpDProgram = {
|
|
|
2485
2815
|
"PDA bump seed"
|
|
2486
2816
|
];
|
|
2487
2817
|
"type": "u8";
|
|
2818
|
+
},
|
|
2819
|
+
{
|
|
2820
|
+
"name": "Padding";
|
|
2821
|
+
"docs": [
|
|
2822
|
+
"Alignment padding"
|
|
2823
|
+
];
|
|
2824
|
+
"type": {
|
|
2825
|
+
"array": [
|
|
2826
|
+
"u8",
|
|
2827
|
+
4
|
|
2828
|
+
];
|
|
2829
|
+
};
|
|
2488
2830
|
}
|
|
2489
2831
|
];
|
|
2490
2832
|
};
|
|
2491
2833
|
},
|
|
2492
2834
|
{
|
|
2493
|
-
"name": "
|
|
2835
|
+
"name": "SettleYieldEvent";
|
|
2494
2836
|
"docs": [
|
|
2495
2837
|
"Aggregate yield settlement event - emitted once per settle_yield call"
|
|
2496
2838
|
];
|
|
@@ -2543,26 +2885,7 @@ type JlpDProgram = {
|
|
|
2543
2885
|
};
|
|
2544
2886
|
},
|
|
2545
2887
|
{
|
|
2546
|
-
"name": "
|
|
2547
|
-
"docs": [
|
|
2548
|
-
"Parameters for settle_yield instruction"
|
|
2549
|
-
];
|
|
2550
|
-
"type": {
|
|
2551
|
-
"kind": "struct";
|
|
2552
|
-
"fields": [
|
|
2553
|
-
{
|
|
2554
|
-
"name": "jlpRate";
|
|
2555
|
-
"docs": [
|
|
2556
|
-
"Manager-provided JLP rate (8 decimals, e.g., 450000000 = $4.50)",
|
|
2557
|
-
"Cross-checked against Pyth oracle, must be within 50 bps tolerance"
|
|
2558
|
-
];
|
|
2559
|
-
"type": "u64";
|
|
2560
|
-
}
|
|
2561
|
-
];
|
|
2562
|
-
};
|
|
2563
|
-
},
|
|
2564
|
-
{
|
|
2565
|
-
"name": "settleYieldSkipped";
|
|
2888
|
+
"name": "SettleYieldSkipped";
|
|
2566
2889
|
"docs": [
|
|
2567
2890
|
"Event emitted when settle_yield returns early (no loans outstanding)"
|
|
2568
2891
|
];
|
|
@@ -2587,7 +2910,7 @@ type JlpDProgram = {
|
|
|
2587
2910
|
};
|
|
2588
2911
|
},
|
|
2589
2912
|
{
|
|
2590
|
-
"name": "
|
|
2913
|
+
"name": "SettleYieldStvEvent";
|
|
2591
2914
|
"docs": [
|
|
2592
2915
|
"Per-STV yield settlement event - emitted for each STV with non-zero base_loaned"
|
|
2593
2916
|
];
|
|
@@ -2633,7 +2956,7 @@ type JlpDProgram = {
|
|
|
2633
2956
|
};
|
|
2634
2957
|
},
|
|
2635
2958
|
{
|
|
2636
|
-
"name": "
|
|
2959
|
+
"name": "StvInitialized";
|
|
2637
2960
|
"type": {
|
|
2638
2961
|
"kind": "struct";
|
|
2639
2962
|
"fields": [
|
|
@@ -2657,7 +2980,7 @@ type JlpDProgram = {
|
|
|
2657
2980
|
};
|
|
2658
2981
|
},
|
|
2659
2982
|
{
|
|
2660
|
-
"name": "
|
|
2983
|
+
"name": "StvUpdated";
|
|
2661
2984
|
"type": {
|
|
2662
2985
|
"kind": "struct";
|
|
2663
2986
|
"fields": [
|
|
@@ -2708,12 +3031,20 @@ type JlpDProgram = {
|
|
|
2708
3031
|
{
|
|
2709
3032
|
"name": "newMinDeposit";
|
|
2710
3033
|
"type": "u64";
|
|
3034
|
+
},
|
|
3035
|
+
{
|
|
3036
|
+
"name": "oldJlMint";
|
|
3037
|
+
"type": "pubkey";
|
|
3038
|
+
},
|
|
3039
|
+
{
|
|
3040
|
+
"name": "newJlMint";
|
|
3041
|
+
"type": "pubkey";
|
|
2711
3042
|
}
|
|
2712
3043
|
];
|
|
2713
3044
|
};
|
|
2714
3045
|
},
|
|
2715
3046
|
{
|
|
2716
|
-
"name": "
|
|
3047
|
+
"name": "SwapDirection";
|
|
2717
3048
|
"docs": [
|
|
2718
3049
|
"Direction of the swap operation"
|
|
2719
3050
|
];
|
|
@@ -2721,16 +3052,16 @@ type JlpDProgram = {
|
|
|
2721
3052
|
"kind": "enum";
|
|
2722
3053
|
"variants": [
|
|
2723
3054
|
{
|
|
2724
|
-
"name": "
|
|
3055
|
+
"name": "JlxToJlp";
|
|
2725
3056
|
},
|
|
2726
3057
|
{
|
|
2727
|
-
"name": "
|
|
3058
|
+
"name": "JlpToJlx";
|
|
2728
3059
|
}
|
|
2729
3060
|
];
|
|
2730
3061
|
};
|
|
2731
3062
|
},
|
|
2732
3063
|
{
|
|
2733
|
-
"name": "
|
|
3064
|
+
"name": "SwapJlxJlpParams";
|
|
2734
3065
|
"docs": [
|
|
2735
3066
|
"Parameters for the swap instruction"
|
|
2736
3067
|
];
|
|
@@ -2751,7 +3082,7 @@ type JlpDProgram = {
|
|
|
2751
3082
|
];
|
|
2752
3083
|
"type": {
|
|
2753
3084
|
"defined": {
|
|
2754
|
-
"name": "
|
|
3085
|
+
"name": "SwapDirection";
|
|
2755
3086
|
};
|
|
2756
3087
|
};
|
|
2757
3088
|
},
|
|
@@ -2782,101 +3113,195 @@ type JlpDProgram = {
|
|
|
2782
3113
|
};
|
|
2783
3114
|
},
|
|
2784
3115
|
{
|
|
2785
|
-
"name": "
|
|
3116
|
+
"name": "UpdateStvParams";
|
|
2786
3117
|
"docs": [
|
|
2787
|
-
"Parameters for
|
|
3118
|
+
"Parameters for updating an STV"
|
|
2788
3119
|
];
|
|
2789
3120
|
"type": {
|
|
2790
3121
|
"kind": "struct";
|
|
2791
3122
|
"fields": [
|
|
2792
3123
|
{
|
|
2793
|
-
"name": "
|
|
3124
|
+
"name": "mgmtFeeBps";
|
|
2794
3125
|
"docs": [
|
|
2795
|
-
"
|
|
3126
|
+
"Management fee in basis points (annual)"
|
|
2796
3127
|
];
|
|
2797
|
-
"type": "
|
|
3128
|
+
"type": "u16";
|
|
2798
3129
|
},
|
|
2799
3130
|
{
|
|
2800
|
-
"name": "
|
|
3131
|
+
"name": "perfFeeBps";
|
|
2801
3132
|
"docs": [
|
|
2802
|
-
"
|
|
3133
|
+
"Performance fee in basis points"
|
|
2803
3134
|
];
|
|
2804
|
-
"type": "
|
|
3135
|
+
"type": "u16";
|
|
2805
3136
|
},
|
|
2806
3137
|
{
|
|
2807
|
-
"name": "
|
|
3138
|
+
"name": "flags";
|
|
2808
3139
|
"docs": [
|
|
2809
|
-
"
|
|
3140
|
+
"STV state flags"
|
|
3141
|
+
];
|
|
3142
|
+
"type": "u16";
|
|
3143
|
+
},
|
|
3144
|
+
{
|
|
3145
|
+
"name": "maxDeposit";
|
|
3146
|
+
"docs": [
|
|
3147
|
+
"Maximum deposit amount in base asset (0 = unlimited)"
|
|
2810
3148
|
];
|
|
2811
3149
|
"type": "u64";
|
|
2812
3150
|
},
|
|
2813
3151
|
{
|
|
2814
|
-
"name": "
|
|
3152
|
+
"name": "minDeposit";
|
|
2815
3153
|
"docs": [
|
|
2816
|
-
"Minimum
|
|
3154
|
+
"Minimum deposit amount in base asset (0 = no minimum)"
|
|
2817
3155
|
];
|
|
2818
3156
|
"type": "u64";
|
|
2819
3157
|
},
|
|
2820
3158
|
{
|
|
2821
|
-
"name": "
|
|
3159
|
+
"name": "jlMint";
|
|
2822
3160
|
"docs": [
|
|
2823
|
-
"
|
|
2824
|
-
"This is obtained from Jupiter API off-chain",
|
|
2825
|
-
"On devnet/localnet (with feature flags), this can be empty"
|
|
3161
|
+
"Optional new jl_mint for migrating base-only pools to Jupiter Lend"
|
|
2826
3162
|
];
|
|
2827
|
-
"type":
|
|
3163
|
+
"type": {
|
|
3164
|
+
"option": "pubkey";
|
|
3165
|
+
};
|
|
3166
|
+
},
|
|
3167
|
+
{
|
|
3168
|
+
"name": "pps";
|
|
3169
|
+
"docs": [
|
|
3170
|
+
"Override price per share (9 decimals, e.g. 1_000_000_000 = 1.0)"
|
|
3171
|
+
];
|
|
3172
|
+
"type": {
|
|
3173
|
+
"option": "u64";
|
|
3174
|
+
};
|
|
3175
|
+
},
|
|
3176
|
+
{
|
|
3177
|
+
"name": "hwm";
|
|
3178
|
+
"docs": [
|
|
3179
|
+
"Override high water mark (9 decimals)"
|
|
3180
|
+
];
|
|
3181
|
+
"type": {
|
|
3182
|
+
"option": "u64";
|
|
3183
|
+
};
|
|
3184
|
+
},
|
|
3185
|
+
{
|
|
3186
|
+
"name": "baseLoaned";
|
|
3187
|
+
"docs": [
|
|
3188
|
+
"Override base_loaned accounting field"
|
|
3189
|
+
];
|
|
3190
|
+
"type": {
|
|
3191
|
+
"option": "u64";
|
|
3192
|
+
};
|
|
3193
|
+
},
|
|
3194
|
+
{
|
|
3195
|
+
"name": "epochSec";
|
|
3196
|
+
"docs": [
|
|
3197
|
+
"Optional new epoch duration in seconds"
|
|
3198
|
+
];
|
|
3199
|
+
"type": {
|
|
3200
|
+
"option": "u32";
|
|
3201
|
+
};
|
|
3202
|
+
}
|
|
3203
|
+
];
|
|
3204
|
+
};
|
|
3205
|
+
},
|
|
3206
|
+
{
|
|
3207
|
+
"name": "WithdrawClaimed";
|
|
3208
|
+
"type": {
|
|
3209
|
+
"kind": "struct";
|
|
3210
|
+
"fields": [
|
|
3211
|
+
{
|
|
3212
|
+
"name": "stv";
|
|
3213
|
+
"type": "pubkey";
|
|
3214
|
+
},
|
|
3215
|
+
{
|
|
3216
|
+
"name": "user";
|
|
3217
|
+
"type": "pubkey";
|
|
3218
|
+
},
|
|
3219
|
+
{
|
|
3220
|
+
"name": "shares";
|
|
3221
|
+
"type": "u64";
|
|
3222
|
+
},
|
|
3223
|
+
{
|
|
3224
|
+
"name": "baseAmount";
|
|
3225
|
+
"type": "u64";
|
|
3226
|
+
},
|
|
3227
|
+
{
|
|
3228
|
+
"name": "epochId";
|
|
3229
|
+
"type": "u32";
|
|
2828
3230
|
}
|
|
2829
3231
|
];
|
|
2830
3232
|
};
|
|
2831
3233
|
},
|
|
2832
3234
|
{
|
|
2833
|
-
"name": "
|
|
3235
|
+
"name": "WithdrawRequest";
|
|
2834
3236
|
"docs": [
|
|
2835
|
-
"
|
|
3237
|
+
"WithdrawRequest - Per-user per-epoch withdrawal request",
|
|
3238
|
+
"Seeds: [\"withdraw_request\", stv.key(), user.key(), &epoch_id.to_le_bytes()]",
|
|
3239
|
+
"",
|
|
3240
|
+
"One PDA per user per STV per epoch. Multiple request_withdraw calls",
|
|
3241
|
+
"in the same epoch accumulate into the same PDA.",
|
|
3242
|
+
"",
|
|
3243
|
+
"Lifecycle:",
|
|
3244
|
+
"1. Created by request_withdraw (user escrows jvX into request's ATA)",
|
|
3245
|
+
"2. Processed by process_epoch (jvX burned, pps + claim_available_after set)",
|
|
3246
|
+
"3. Closed by claim_withdraw (base transferred, PDA + ATA closed)"
|
|
2836
3247
|
];
|
|
2837
3248
|
"type": {
|
|
2838
3249
|
"kind": "struct";
|
|
2839
3250
|
"fields": [
|
|
2840
3251
|
{
|
|
2841
|
-
"name": "
|
|
3252
|
+
"name": "stv";
|
|
2842
3253
|
"docs": [
|
|
2843
|
-
"
|
|
3254
|
+
"Back-reference to the STV"
|
|
2844
3255
|
];
|
|
2845
|
-
"type": "
|
|
3256
|
+
"type": "pubkey";
|
|
2846
3257
|
},
|
|
2847
3258
|
{
|
|
2848
|
-
"name": "
|
|
3259
|
+
"name": "user";
|
|
2849
3260
|
"docs": [
|
|
2850
|
-
"
|
|
3261
|
+
"The user who requested the withdrawal"
|
|
2851
3262
|
];
|
|
2852
|
-
"type": "
|
|
3263
|
+
"type": "pubkey";
|
|
2853
3264
|
},
|
|
2854
3265
|
{
|
|
2855
|
-
"name": "
|
|
3266
|
+
"name": "shares";
|
|
2856
3267
|
"docs": [
|
|
2857
|
-
"
|
|
3268
|
+
"Total jvX shares escrowed (accumulated across multiple requests in same epoch)"
|
|
2858
3269
|
];
|
|
2859
|
-
"type": "
|
|
3270
|
+
"type": "u64";
|
|
2860
3271
|
},
|
|
2861
3272
|
{
|
|
2862
|
-
"name": "
|
|
3273
|
+
"name": "pps";
|
|
2863
3274
|
"docs": [
|
|
2864
|
-
"
|
|
3275
|
+
"PPS at process time (0 = unprocessed)"
|
|
2865
3276
|
];
|
|
2866
3277
|
"type": "u64";
|
|
2867
3278
|
},
|
|
2868
3279
|
{
|
|
2869
|
-
"name": "
|
|
3280
|
+
"name": "epochId";
|
|
2870
3281
|
"docs": [
|
|
2871
|
-
"
|
|
3282
|
+
"Epoch when request was made"
|
|
2872
3283
|
];
|
|
2873
|
-
"type": "
|
|
3284
|
+
"type": "u32";
|
|
3285
|
+
},
|
|
3286
|
+
{
|
|
3287
|
+
"name": "claimAvailableAfter";
|
|
3288
|
+
"docs": [
|
|
3289
|
+
"Unix timestamp after which claim is available (0 = unprocessed)"
|
|
3290
|
+
];
|
|
3291
|
+
"type": "u32";
|
|
3292
|
+
},
|
|
3293
|
+
{
|
|
3294
|
+
"name": "bump";
|
|
3295
|
+
"docs": [
|
|
3296
|
+
"PDA bump seed"
|
|
3297
|
+
];
|
|
3298
|
+
"type": "u8";
|
|
2874
3299
|
}
|
|
2875
3300
|
];
|
|
2876
3301
|
};
|
|
2877
3302
|
},
|
|
2878
3303
|
{
|
|
2879
|
-
"name": "
|
|
3304
|
+
"name": "WithdrawRequested";
|
|
2880
3305
|
"type": {
|
|
2881
3306
|
"kind": "struct";
|
|
2882
3307
|
"fields": [
|
|
@@ -2889,19 +3314,16 @@ type JlpDProgram = {
|
|
|
2889
3314
|
"type": "pubkey";
|
|
2890
3315
|
},
|
|
2891
3316
|
{
|
|
2892
|
-
"name": "
|
|
3317
|
+
"name": "shares";
|
|
2893
3318
|
"type": "u64";
|
|
2894
3319
|
},
|
|
2895
3320
|
{
|
|
2896
|
-
"name": "
|
|
2897
|
-
"docs": [
|
|
2898
|
-
"Amount of base asset withdrawn"
|
|
2899
|
-
];
|
|
3321
|
+
"name": "totalShares";
|
|
2900
3322
|
"type": "u64";
|
|
2901
3323
|
},
|
|
2902
3324
|
{
|
|
2903
|
-
"name": "
|
|
2904
|
-
"type": "
|
|
3325
|
+
"name": "epochId";
|
|
3326
|
+
"type": "u32";
|
|
2905
3327
|
}
|
|
2906
3328
|
];
|
|
2907
3329
|
};
|
|
@@ -2937,12 +3359,27 @@ interface STV {
|
|
|
2937
3359
|
accruedFeesJlx: BN;
|
|
2938
3360
|
maxDeposit: BN;
|
|
2939
3361
|
minDeposit: BN;
|
|
3362
|
+
requestedBase: BN;
|
|
3363
|
+
reservedBase: BN;
|
|
3364
|
+
epochPps: BN;
|
|
3365
|
+
nextEpochTs: number;
|
|
3366
|
+
epochSec: number;
|
|
3367
|
+
currentEpochId: number;
|
|
2940
3368
|
mgmtFeeBps: number;
|
|
2941
3369
|
perfFeeBps: number;
|
|
2942
3370
|
flags: number;
|
|
2943
3371
|
version: number;
|
|
2944
3372
|
bump: number;
|
|
2945
3373
|
}
|
|
3374
|
+
interface WithdrawRequest {
|
|
3375
|
+
stv: PublicKey;
|
|
3376
|
+
user: PublicKey;
|
|
3377
|
+
shares: BN;
|
|
3378
|
+
pps: BN;
|
|
3379
|
+
epochId: number;
|
|
3380
|
+
claimAvailableAfter: number;
|
|
3381
|
+
bump: number;
|
|
3382
|
+
}
|
|
2946
3383
|
interface ExchangeRateResult {
|
|
2947
3384
|
rate: number;
|
|
2948
3385
|
rawRate: bigint;
|
|
@@ -3028,6 +3465,7 @@ interface UpdateStvParams$1 {
|
|
|
3028
3465
|
pps?: BN;
|
|
3029
3466
|
hwm?: BN;
|
|
3030
3467
|
baseLoaned?: BN;
|
|
3468
|
+
epochSec?: number;
|
|
3031
3469
|
}
|
|
3032
3470
|
interface InitializeStvParams$1 {
|
|
3033
3471
|
poolName: PoolName;
|
|
@@ -3035,6 +3473,7 @@ interface InitializeStvParams$1 {
|
|
|
3035
3473
|
perfFeeBps: number;
|
|
3036
3474
|
maxDeposit: BN;
|
|
3037
3475
|
minDeposit: BN;
|
|
3476
|
+
withdrawEpochSec: number;
|
|
3038
3477
|
}
|
|
3039
3478
|
interface JupiterQuoteResponse {
|
|
3040
3479
|
inputMint: string;
|
|
@@ -3092,10 +3531,14 @@ interface DepositParams {
|
|
|
3092
3531
|
user: PublicKey;
|
|
3093
3532
|
amount: BN;
|
|
3094
3533
|
}
|
|
3095
|
-
interface
|
|
3534
|
+
interface RequestWithdrawParams {
|
|
3096
3535
|
user: PublicKey;
|
|
3097
3536
|
shares: BN;
|
|
3098
3537
|
}
|
|
3538
|
+
interface ClaimWithdrawParams {
|
|
3539
|
+
user: PublicKey;
|
|
3540
|
+
epochId: number;
|
|
3541
|
+
}
|
|
3099
3542
|
interface JupEarnParams$1 {
|
|
3100
3543
|
manager: PublicKey;
|
|
3101
3544
|
direction: JupEarnDirection;
|
|
@@ -3117,19 +3560,13 @@ interface SwapJlxJlpParams$1 {
|
|
|
3117
3560
|
expectedOut: BN;
|
|
3118
3561
|
quote: SwapQuote;
|
|
3119
3562
|
}
|
|
3120
|
-
interface SwapJlxJlxParams$1 {
|
|
3121
|
-
manager: PublicKey;
|
|
3122
|
-
fromPool: PoolName;
|
|
3123
|
-
toPool: PoolName;
|
|
3124
|
-
amountIn: BN;
|
|
3125
|
-
minOut: BN;
|
|
3126
|
-
quote: SwapQuote;
|
|
3127
|
-
}
|
|
3128
3563
|
interface SettleYieldParams {
|
|
3129
3564
|
manager: PublicKey;
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3565
|
+
}
|
|
3566
|
+
interface ProcessEpochParams {
|
|
3567
|
+
payer: PublicKey;
|
|
3568
|
+
poolName: PoolName;
|
|
3569
|
+
withdrawRequests: PublicKey[];
|
|
3133
3570
|
}
|
|
3134
3571
|
/**
|
|
3135
3572
|
* Main SDK client for JLP.D program
|
|
@@ -3201,7 +3638,8 @@ declare class PoolContext {
|
|
|
3201
3638
|
readonly stvJlxAta: PublicKey;
|
|
3202
3639
|
constructor(client: JlpdClient, pool: JupiterLendPool);
|
|
3203
3640
|
deposit(params: DepositParams): Promise<VersionedTransaction>;
|
|
3204
|
-
|
|
3641
|
+
requestWithdraw(params: RequestWithdrawParams): Promise<VersionedTransaction>;
|
|
3642
|
+
claimWithdraw(params: ClaimWithdrawParams): Promise<VersionedTransaction>;
|
|
3205
3643
|
jupEarn(params: JupEarnParams$1): Promise<VersionedTransaction>;
|
|
3206
3644
|
moveJlx(params: MoveJlxParams$1): Promise<VersionedTransaction>;
|
|
3207
3645
|
claimFees(params: ClaimFeesParams): Promise<VersionedTransaction>;
|
|
@@ -3222,13 +3660,6 @@ declare class SwapContext {
|
|
|
3222
3660
|
slippageBps?: number;
|
|
3223
3661
|
}): Promise<SwapQuote>;
|
|
3224
3662
|
swapJlxJlp(params: SwapJlxJlpParams$1): Promise<VersionedTransaction>;
|
|
3225
|
-
quoteJlxJlx(params: {
|
|
3226
|
-
fromPool: PoolName;
|
|
3227
|
-
toPool: PoolName;
|
|
3228
|
-
amountIn: BN;
|
|
3229
|
-
slippageBps?: number;
|
|
3230
|
-
}): Promise<SwapQuote>;
|
|
3231
|
-
swapJlxJlx(params: SwapJlxJlxParams$1): Promise<VersionedTransaction>;
|
|
3232
3663
|
}
|
|
3233
3664
|
/**
|
|
3234
3665
|
* Context for admin operations
|
|
@@ -3242,6 +3673,7 @@ declare class AdminContext {
|
|
|
3242
3673
|
initializeStv(params: {
|
|
3243
3674
|
admin: PublicKey;
|
|
3244
3675
|
} & InitializeStvParams$1, jvMintKeypair: PublicKey): Promise<VersionedTransaction>;
|
|
3676
|
+
processEpoch(params: ProcessEpochParams): Promise<VersionedTransaction>;
|
|
3245
3677
|
settleYield(params: SettleYieldParams): Promise<VersionedTransaction>;
|
|
3246
3678
|
}
|
|
3247
3679
|
|
|
@@ -3257,6 +3689,7 @@ declare const JUPITER_LEND_PROGRAM_ID$1: PublicKey;
|
|
|
3257
3689
|
declare const JUPITER_SWAP_PROGRAM_ID: PublicKey;
|
|
3258
3690
|
declare const SEED_JLP_VAULT = "jlp_vault";
|
|
3259
3691
|
declare const SEED_STV = "stv";
|
|
3692
|
+
declare const SEED_WITHDRAW_REQUEST = "withdraw_request";
|
|
3260
3693
|
declare const FLAG_PAUSED = 1;
|
|
3261
3694
|
declare const FLAG_DEPOSITS_DISABLED = 2;
|
|
3262
3695
|
declare const FLAG_WITHDRAWALS_DISABLED = 4;
|
|
@@ -3283,8 +3716,9 @@ declare const ORACLES: {
|
|
|
3283
3716
|
readonly DOVES_BTC_USD: PublicKey;
|
|
3284
3717
|
readonly DOVES_ETH_USD: PublicKey;
|
|
3285
3718
|
readonly DOVES_SOL_USD: PublicKey;
|
|
3286
|
-
readonly PYTH_JLP_USD: PublicKey;
|
|
3287
3719
|
};
|
|
3720
|
+
declare const JLP_POOL_PUBKEY: PublicKey;
|
|
3721
|
+
declare const JUPITER_PERPS_PROGRAM_ID: PublicKey;
|
|
3288
3722
|
|
|
3289
3723
|
/**
|
|
3290
3724
|
* Derive the JLP Vault PDA address (cached)
|
|
@@ -3296,6 +3730,11 @@ declare function deriveVaultPda(programId: PublicKey): [PublicKey, number];
|
|
|
3296
3730
|
* Seeds: ["stv", base_mint]
|
|
3297
3731
|
*/
|
|
3298
3732
|
declare function deriveStvPda(baseMint: PublicKey, programId: PublicKey): [PublicKey, number];
|
|
3733
|
+
/**
|
|
3734
|
+
* Derive WithdrawRequest PDA address (cached)
|
|
3735
|
+
* Seeds: ["withdraw_request", stv, user, epoch_id.to_le_bytes()]
|
|
3736
|
+
*/
|
|
3737
|
+
declare function deriveWithdrawRequestPda(stvPda: PublicKey, user: PublicKey, epochId: number, programId: PublicKey): [PublicKey, number];
|
|
3299
3738
|
/**
|
|
3300
3739
|
* Clear PDA cache (useful for testing)
|
|
3301
3740
|
*/
|
|
@@ -3313,9 +3752,33 @@ declare const JLP_VAULT_DISCRIMINATOR: Buffer<ArrayBuffer>;
|
|
|
3313
3752
|
declare function parseVault(data: Buffer): JLPVault;
|
|
3314
3753
|
|
|
3315
3754
|
/**
|
|
3316
|
-
* STV (Single Token Vault) account layout (
|
|
3755
|
+
* STV (Single Token Vault) account layout (200 bytes data + 8 byte discriminator = 208 bytes total)
|
|
3756
|
+
*
|
|
3757
|
+
* Layout (data starts after 8-byte discriminator):
|
|
3758
|
+
* Offset 0-31: baseMint (Pubkey)
|
|
3759
|
+
* Offset 32-63: jlMint (Pubkey)
|
|
3760
|
+
* Offset 64-95: jvMint (Pubkey)
|
|
3761
|
+
* Offset 96-103: pps (u64 LE)
|
|
3762
|
+
* Offset 104-111: hwm (u64 LE)
|
|
3763
|
+
* Offset 112-119: lastMgmtFeeTs (u64 LE)
|
|
3764
|
+
* Offset 120-127: baseLoaned (u64 LE)
|
|
3765
|
+
* Offset 128-135: accruedFeesJlx (u64 LE)
|
|
3766
|
+
* Offset 136-143: maxDeposit (u64 LE)
|
|
3767
|
+
* Offset 144-151: minDeposit (u64 LE)
|
|
3768
|
+
* Offset 152-159: requestedBase (u64 LE)
|
|
3769
|
+
* Offset 160-167: reservedBase (u64 LE)
|
|
3770
|
+
* Offset 168-175: epochPps (u64 LE)
|
|
3771
|
+
* Offset 176-179: nextEpochTs (u32 LE)
|
|
3772
|
+
* Offset 180-183: epochSec (u32 LE)
|
|
3773
|
+
* Offset 184-187: currentEpochId (u32 LE)
|
|
3774
|
+
* Offset 188-189: mgmtFeeBps (u16 LE)
|
|
3775
|
+
* Offset 190-191: perfFeeBps (u16 LE)
|
|
3776
|
+
* Offset 192-193: flags (u16 LE)
|
|
3777
|
+
* Offset 194: version (u8)
|
|
3778
|
+
* Offset 195: bump (u8)
|
|
3779
|
+
* Offset 196-199: _padding (4 bytes)
|
|
3317
3780
|
*/
|
|
3318
|
-
declare const STV_DATA_SIZE =
|
|
3781
|
+
declare const STV_DATA_SIZE = 200;
|
|
3319
3782
|
declare const STV_ACCOUNT_SIZE: number;
|
|
3320
3783
|
declare const STV_DISCRIMINATOR: Buffer<ArrayBuffer>;
|
|
3321
3784
|
/**
|
|
@@ -3323,6 +3786,27 @@ declare const STV_DISCRIMINATOR: Buffer<ArrayBuffer>;
|
|
|
3323
3786
|
*/
|
|
3324
3787
|
declare function parseStv(data: Buffer): STV;
|
|
3325
3788
|
|
|
3789
|
+
/**
|
|
3790
|
+
* WithdrawRequest account layout
|
|
3791
|
+
* Seeds: ["withdraw_request", stv, user, epoch_id.to_le_bytes()]
|
|
3792
|
+
*
|
|
3793
|
+
* Layout (data starts after 8-byte discriminator):
|
|
3794
|
+
* Offset 0-31: stv (Pubkey)
|
|
3795
|
+
* Offset 32-63: user (Pubkey)
|
|
3796
|
+
* Offset 64-71: shares (u64 LE)
|
|
3797
|
+
* Offset 72-79: pps (u64 LE) — 0 = unprocessed
|
|
3798
|
+
* Offset 80-83: epochId (u32 LE)
|
|
3799
|
+
* Offset 84-87: claimAvailableAfter (u32 LE) — 0 = unprocessed
|
|
3800
|
+
* Offset 88: bump (u8)
|
|
3801
|
+
*/
|
|
3802
|
+
declare const WITHDRAW_REQUEST_DATA_SIZE = 89;
|
|
3803
|
+
declare const WITHDRAW_REQUEST_ACCOUNT_SIZE: number;
|
|
3804
|
+
declare const WITHDRAW_REQUEST_DISCRIMINATOR: Buffer<ArrayBuffer>;
|
|
3805
|
+
/**
|
|
3806
|
+
* Parse a WithdrawRequest account from raw account data
|
|
3807
|
+
*/
|
|
3808
|
+
declare function parseWithdrawRequest(data: Buffer): WithdrawRequest;
|
|
3809
|
+
|
|
3326
3810
|
/**
|
|
3327
3811
|
* Derive ATA address (cached)
|
|
3328
3812
|
*/
|
|
@@ -3355,9 +3839,15 @@ declare function clearAtaCache(): void;
|
|
|
3355
3839
|
|
|
3356
3840
|
/**
|
|
3357
3841
|
* Calculate NAV for an STV
|
|
3358
|
-
* NAV = stv_base_ata.amount + (stv_jlx_ata.amount * exchange_rate / 1e12) + base_loaned
|
|
3842
|
+
* NAV = stv_base_ata.amount + (stv_jlx_ata.amount * exchange_rate / 1e12) + base_loaned - reserved_base
|
|
3843
|
+
*
|
|
3844
|
+
* @param stvBaseBalance - STV base token balance
|
|
3845
|
+
* @param stvJlxBalance - STV jlX token balance
|
|
3846
|
+
* @param exchangeRate - Jupiter Lend exchange rate (12 decimals)
|
|
3847
|
+
* @param baseLoaned - Base loaned to vault
|
|
3848
|
+
* @param reservedBase - Optional: base earmarked for unclaimed processed withdrawals (subtracted from NAV)
|
|
3359
3849
|
*/
|
|
3360
|
-
declare function calculateNav(stvBaseBalance: BN, stvJlxBalance: BN, exchangeRate: bigint, baseLoaned: BN): BN;
|
|
3850
|
+
declare function calculateNav(stvBaseBalance: BN, stvJlxBalance: BN, exchangeRate: bigint, baseLoaned: BN, reservedBase?: BN): BN;
|
|
3361
3851
|
/**
|
|
3362
3852
|
* Calculate PPS from NAV and total jvX supply
|
|
3363
3853
|
* PPS = NAV * PPS_DECIMALS / total_jvx_supply
|
|
@@ -3518,6 +4008,7 @@ interface InitializeStvParams {
|
|
|
3518
4008
|
perfFeeBps: number;
|
|
3519
4009
|
maxDeposit: BN;
|
|
3520
4010
|
minDeposit: BN;
|
|
4011
|
+
epochSec: number;
|
|
3521
4012
|
}
|
|
3522
4013
|
interface UpdateStvParams {
|
|
3523
4014
|
mgmtFeeBps: number;
|
|
@@ -3529,6 +4020,7 @@ interface UpdateStvParams {
|
|
|
3529
4020
|
pps: BN | null;
|
|
3530
4021
|
hwm: BN | null;
|
|
3531
4022
|
baseLoaned: BN | null;
|
|
4023
|
+
epochSec: number | null;
|
|
3532
4024
|
}
|
|
3533
4025
|
interface InitOrUpdateJlpVaultAccounts {
|
|
3534
4026
|
admin: PublicKey;
|
|
@@ -3563,17 +4055,27 @@ interface DepositAccounts {
|
|
|
3563
4055
|
stvJlxAta: PublicKey;
|
|
3564
4056
|
tokenProgram: PublicKey;
|
|
3565
4057
|
}
|
|
3566
|
-
interface
|
|
4058
|
+
interface RequestWithdrawAccounts {
|
|
3567
4059
|
user: PublicKey;
|
|
3568
4060
|
jlpVault: PublicKey;
|
|
3569
4061
|
stv: PublicKey;
|
|
4062
|
+
jvMint: PublicKey;
|
|
4063
|
+
userJvxAta: PublicKey;
|
|
4064
|
+
withdrawRequest: PublicKey;
|
|
4065
|
+
requestJvxAta: PublicKey;
|
|
4066
|
+
tokenProgram: PublicKey;
|
|
4067
|
+
associatedTokenProgram: PublicKey;
|
|
4068
|
+
systemProgram: PublicKey;
|
|
4069
|
+
}
|
|
4070
|
+
interface ClaimWithdrawAccounts {
|
|
4071
|
+
user: PublicKey;
|
|
4072
|
+
stv: PublicKey;
|
|
3570
4073
|
baseMint: PublicKey;
|
|
3571
|
-
jlMint: PublicKey;
|
|
3572
4074
|
jvMint: PublicKey;
|
|
3573
4075
|
userBaseAta: PublicKey;
|
|
3574
|
-
userJvxAta: PublicKey;
|
|
3575
4076
|
stvBaseAta: PublicKey;
|
|
3576
|
-
|
|
4077
|
+
withdrawRequest: PublicKey;
|
|
4078
|
+
requestJvxAta: PublicKey;
|
|
3577
4079
|
tokenProgram: PublicKey;
|
|
3578
4080
|
}
|
|
3579
4081
|
/**
|
|
@@ -3581,9 +4083,18 @@ interface WithdrawAccounts {
|
|
|
3581
4083
|
*/
|
|
3582
4084
|
declare function createDepositInstruction(program: Program<JlpDProgram>, amount: BN, accounts: DepositAccounts, remainingAccounts?: AccountMeta[]): Promise<TransactionInstruction>;
|
|
3583
4085
|
/**
|
|
3584
|
-
* Create a
|
|
4086
|
+
* Create a request_withdraw instruction.
|
|
4087
|
+
* Escrows the user's jvX shares into the WithdrawRequest PDA's ATA for the current epoch.
|
|
3585
4088
|
*/
|
|
3586
|
-
declare function
|
|
4089
|
+
declare function createRequestWithdrawInstruction(program: Program<JlpDProgram>, params: {
|
|
4090
|
+
shares: BN;
|
|
4091
|
+
epochId: number;
|
|
4092
|
+
}, accounts: RequestWithdrawAccounts): Promise<TransactionInstruction>;
|
|
4093
|
+
/**
|
|
4094
|
+
* Create a claim_withdraw instruction.
|
|
4095
|
+
* Claims base tokens for a processed WithdrawRequest, closing the PDA.
|
|
4096
|
+
*/
|
|
4097
|
+
declare function createClaimWithdrawInstruction(program: Program<JlpDProgram>, accounts: ClaimWithdrawAccounts): Promise<TransactionInstruction>;
|
|
3587
4098
|
|
|
3588
4099
|
interface JupEarnParams {
|
|
3589
4100
|
direction: JupEarnDirection;
|
|
@@ -3593,13 +4104,6 @@ interface MoveJlxParams {
|
|
|
3593
4104
|
amountJlx: BN;
|
|
3594
4105
|
direction: MoveDirection;
|
|
3595
4106
|
}
|
|
3596
|
-
interface SwapJlxJlxParams {
|
|
3597
|
-
fromIndex: number;
|
|
3598
|
-
toIndex: number;
|
|
3599
|
-
amountIn: BN;
|
|
3600
|
-
minOut: BN;
|
|
3601
|
-
jupiterData: Buffer;
|
|
3602
|
-
}
|
|
3603
4107
|
interface SwapJlxJlpParams {
|
|
3604
4108
|
stvIndex: number;
|
|
3605
4109
|
direction: SwapDirection;
|
|
@@ -3626,16 +4130,6 @@ interface MoveStvAccounts {
|
|
|
3626
4130
|
vaultStagingAta: PublicKey;
|
|
3627
4131
|
tokenProgram: PublicKey;
|
|
3628
4132
|
}
|
|
3629
|
-
interface SwapJlxJlxAccounts {
|
|
3630
|
-
manager: PublicKey;
|
|
3631
|
-
jlpVault: PublicKey;
|
|
3632
|
-
fromJlxMint: PublicKey;
|
|
3633
|
-
toJlxMint: PublicKey;
|
|
3634
|
-
fromJlxAta: PublicKey;
|
|
3635
|
-
toJlxAta: PublicKey;
|
|
3636
|
-
tokenProgram: PublicKey;
|
|
3637
|
-
jupiterProgram: PublicKey;
|
|
3638
|
-
}
|
|
3639
4133
|
interface SwapJlxJlpAccounts {
|
|
3640
4134
|
manager: PublicKey;
|
|
3641
4135
|
jlpVault: PublicKey;
|
|
@@ -3663,16 +4157,26 @@ interface SettleYieldAccounts {
|
|
|
3663
4157
|
oracleBtc: PublicKey;
|
|
3664
4158
|
oracleEth: PublicKey;
|
|
3665
4159
|
oracleSol: PublicKey;
|
|
3666
|
-
|
|
4160
|
+
jlpPool: PublicKey;
|
|
4161
|
+
jlpMintAccount: PublicKey;
|
|
3667
4162
|
}
|
|
3668
4163
|
interface SettleYieldInstructionParams {
|
|
3669
|
-
/** Manager-provided JLP rate (8 decimals, e.g., 460_000_000 = $4.60) */
|
|
3670
|
-
jlpRate: BN;
|
|
3671
4164
|
}
|
|
3672
4165
|
declare function createJupEarnInstruction(program: Program<JlpDProgram>, params: JupEarnParams, accounts: JupEarnAccounts, remainingAccounts?: AccountMeta[]): Promise<TransactionInstruction>;
|
|
3673
4166
|
declare function createMoveJlxInstruction(program: Program<JlpDProgram>, params: MoveJlxParams, accounts: MoveStvAccounts, remainingAccounts?: AccountMeta[]): Promise<TransactionInstruction>;
|
|
3674
|
-
declare function createSwapJlxJlxInstruction(program: Program<JlpDProgram>, params: SwapJlxJlxParams, accounts: SwapJlxJlxAccounts, remainingAccounts?: AccountMeta[]): Promise<TransactionInstruction>;
|
|
3675
4167
|
declare function createSwapJlxJlpInstruction(program: Program<JlpDProgram>, params: SwapJlxJlpParams, accounts: SwapJlxJlpAccounts, remainingAccounts?: AccountMeta[]): Promise<TransactionInstruction>;
|
|
4168
|
+
interface ProcessEpochAccounts {
|
|
4169
|
+
payer: PublicKey;
|
|
4170
|
+
jlpVault: PublicKey;
|
|
4171
|
+
stv: PublicKey;
|
|
4172
|
+
baseMint: PublicKey;
|
|
4173
|
+
jlMint: PublicKey;
|
|
4174
|
+
jvMint: PublicKey;
|
|
4175
|
+
stvBaseAta: PublicKey;
|
|
4176
|
+
stvJlxAta: PublicKey;
|
|
4177
|
+
tokenProgram: PublicKey;
|
|
4178
|
+
}
|
|
4179
|
+
declare function createProcessEpochInstruction(program: Program<JlpDProgram>, accounts: ProcessEpochAccounts, remainingAccounts?: AccountMeta[]): Promise<TransactionInstruction>;
|
|
3676
4180
|
declare function createSettleYieldInstruction(program: Program<JlpDProgram>, params: SettleYieldInstructionParams, accounts: SettleYieldAccounts, remainingAccounts?: AccountMeta[]): Promise<TransactionInstruction>;
|
|
3677
4181
|
|
|
3678
4182
|
interface ClaimFeesAccounts {
|
|
@@ -3692,4 +4196,4 @@ interface ClaimFeesAccounts {
|
|
|
3692
4196
|
*/
|
|
3693
4197
|
declare function createClaimFeesInstruction(program: Program<JlpDProgram>, accounts: ClaimFeesAccounts, remainingAccounts?: AccountMeta[]): Promise<TransactionInstruction>;
|
|
3694
4198
|
|
|
3695
|
-
export { type AccountMeta, AdminContext, type ClaimFeesAccounts, type ClaimFeesParams, type DepositAccounts, type DepositParams, EXCHANGE_RATE_PRECISION, type ExchangeRateResult, FLAG_DEPOSITS_DISABLED, FLAG_JLP_DISABLED, FLAG_PAUSED, FLAG_REBALANCE_DISABLED, FLAG_WITHDRAWALS_DISABLED, type InitOrUpdateJlpVaultAccounts, type InitOrUpdateJlpVaultParams, type InitializeStvAccounts, type InitializeStvParams$1 as InitializeStvParams, JLPD_PROGRAM_ID, type JLPVault, JLP_VAULT_ACCOUNT_SIZE, JLP_VAULT_DATA_SIZE, JLP_VAULT_DISCRIMINATOR, JUPITER_LEND_PROGRAM_ID$1 as JUPITER_LEND_PROGRAM_ID, JUPITER_SWAP_PROGRAM_ID, JUPUSD_POOL, JUPITER_LEND_PROGRAM_ID as JUP_LEND_PROGRAM_ID, type JlpDProgram, JlpdClient, JlpdClientError, type JupEarnAccounts, type JupEarnDirection, type JupEarnParams$1 as JupEarnParams, type JupiterLendPool, type JupiterPriceData, type JupiterPriceResponse, type JupiterQuoteResponse, type JupiterSwapInstructionsResponse, LENDING_ADMIN, LIQUIDITY_PROGRAM_ID, LIQUIDITY_SINGLETON, type LendingAccountData, MINTS, type MoveDirection, type MoveJlxParams$1 as MoveJlxParams, type MoveStvAccounts, ORACLES, POOLS, PPS_DECIMALS, PoolContext, type PoolName, type RewardsRateModelData, SEED_JLP_VAULT, SEED_STV, type STV, STV_ACCOUNT_SIZE, STV_DATA_SIZE, STV_DISCRIMINATOR, STV_INDEX, type SerializedInstruction, type SettleYieldAccounts, type SettleYieldInstructionParams, type SettleYieldParams, SwapContext, type SwapDirection, type SwapJlxJlpAccounts, type SwapJlxJlpParams$1 as SwapJlxJlpParams, type
|
|
4199
|
+
export { type AccountMeta, AdminContext, type ClaimFeesAccounts, type ClaimFeesParams, type ClaimWithdrawAccounts, type ClaimWithdrawParams, type DepositAccounts, type DepositParams, EXCHANGE_RATE_PRECISION, type ExchangeRateResult, FLAG_DEPOSITS_DISABLED, FLAG_JLP_DISABLED, FLAG_PAUSED, FLAG_REBALANCE_DISABLED, FLAG_WITHDRAWALS_DISABLED, type InitOrUpdateJlpVaultAccounts, type InitOrUpdateJlpVaultParams, type InitializeStvAccounts, type InitializeStvParams$1 as InitializeStvParams, JLPD_PROGRAM_ID, type JLPVault, JLP_POOL_PUBKEY, JLP_VAULT_ACCOUNT_SIZE, JLP_VAULT_DATA_SIZE, JLP_VAULT_DISCRIMINATOR, JUPITER_LEND_PROGRAM_ID$1 as JUPITER_LEND_PROGRAM_ID, JUPITER_PERPS_PROGRAM_ID, JUPITER_SWAP_PROGRAM_ID, JUPUSD_POOL, JUPITER_LEND_PROGRAM_ID as JUP_LEND_PROGRAM_ID, type JlpDProgram, JlpdClient, JlpdClientError, type JupEarnAccounts, type JupEarnDirection, type JupEarnParams$1 as JupEarnParams, type JupiterLendPool, type JupiterPriceData, type JupiterPriceResponse, type JupiterQuoteResponse, type JupiterSwapInstructionsResponse, LENDING_ADMIN, LIQUIDITY_PROGRAM_ID, LIQUIDITY_SINGLETON, type LendingAccountData, MINTS, type MoveDirection, type MoveJlxParams$1 as MoveJlxParams, type MoveStvAccounts, ORACLES, POOLS, PPS_DECIMALS, PoolContext, type PoolName, type ProcessEpochAccounts, type ProcessEpochParams, type RequestWithdrawAccounts, type RequestWithdrawParams, type RewardsRateModelData, SEED_JLP_VAULT, SEED_STV, SEED_WITHDRAW_REQUEST, type STV, STV_ACCOUNT_SIZE, STV_DATA_SIZE, STV_DISCRIMINATOR, STV_INDEX, type SerializedInstruction, type SettleYieldAccounts, type SettleYieldInstructionParams, type SettleYieldParams, SwapContext, type SwapDirection, type SwapJlxJlpAccounts, type SwapJlxJlpParams$1 as SwapJlxJlpParams, type SwapQuote, USDC_POOL, type UpdateStvAccounts, type UpdateStvParams$1 as UpdateStvParams, type UpdateVaultParams, WBTC_POOL, WETH_POOL, WITHDRAW_REQUEST_ACCOUNT_SIZE, WITHDRAW_REQUEST_DATA_SIZE, WITHDRAW_REQUEST_DISCRIMINATOR, WSOL_POOL, type WithdrawRequest, baseToJlx, baseToShares, buildExchangeRateAccounts, buildJupEarnDepositAccounts, buildJupEarnWithdrawAccounts, buildSwapData, calculateExchangeRate, calculateNav, calculatePps, clearAtaCache, clearPdaCache, createClaimFeesInstruction, createClaimWithdrawInstruction, createDepositInstruction, createInitOrUpdateVaultInstruction, createInitializeStvInstruction, createJupEarnInstruction, createMoveJlxInstruction, createProcessEpochInstruction, createProgram, createRequestWithdrawInstruction, createSettleYieldInstruction, createSwapJlxJlpInstruction, createUpdateStvInstruction, deriveAta, deriveStvAtas, deriveStvPda, deriveUserAtas, deriveVaultAtas, deriveVaultPda, deriveWithdrawRequestPda, fetchAddressLookupTables, fetchJlpRate, fetchJupiterPriceUsd, getJupiterQuote, getJupiterSwapInstructions, getPoolByMint, getPoolByName, jlxToBase, parseLendingAccount, parseRewardsRateModel, parseStv, parseSwapRemainingAccounts, parseVault, parseWithdrawRequest, sharesToBase };
|