flash-sdk 9.0.3 → 9.0.4-alpha.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/MarketAccount.js +1 -1
- package/dist/OraclePrice.d.ts +1 -0
- package/dist/OrderAccount.d.ts +1 -0
- package/dist/PerpetualsClient.d.ts +310 -143
- package/dist/PerpetualsClient.js +812 -1058
- package/dist/PoolAccount.d.ts +4 -0
- package/dist/PoolConfig.d.ts +3 -1
- package/dist/PoolConfig.js +4 -2
- package/dist/PoolConfig.json +186 -3238
- package/dist/PoolDataClient.d.ts +1 -0
- package/dist/PositionAccount.d.ts +4 -2
- package/dist/TokenStakeAccount.d.ts +3 -2
- package/dist/TokenStakeAccount.js +2 -2
- package/dist/TokenVaultAccount.d.ts +1 -0
- package/dist/ViewHelper.js +2 -2
- package/dist/backupOracle.d.ts +0 -1
- package/dist/backupOracle.js +6 -6
- package/dist/constants/index.d.ts +1 -0
- package/dist/idl/perpetuals.d.ts +3041 -1714
- package/dist/idl/perpetuals.js +3041 -1714
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/testSize.d.ts +0 -0
- package/dist/testSize.js +0 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +21 -4
- package/dist/types/index.js +6 -5
- package/dist/utils/IdlCoder.js +7 -17
- package/dist/utils/alt.js +6 -5
- package/dist/utils/anchorCpiEvents.d.ts +1 -0
- package/dist/utils/anchorCpiEvents.js +4 -4
- package/dist/utils/getReferralAccounts.d.ts +1 -1
- package/dist/utils/getReferralAccounts.js +3 -8
- package/dist/utils/index.js +6 -6
- package/dist/utils/rpc.js +9 -9
- package/package.json +1 -1
- package/dist/TradingAccount.d.ts +0 -23
- package/dist/TradingAccount.js +0 -17
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
/// <reference types="bn.js" />
|
|
2
|
+
/// <reference types="node" />
|
|
1
3
|
import { Program, AnchorProvider, BN } from "@coral-xyz/anchor";
|
|
2
4
|
import { PublicKey, TransactionInstruction, Commitment, Signer, AddressLookupTableAccount, VersionedTransaction } from "@solana/web3.js";
|
|
3
5
|
import { PoolAccount } from "./PoolAccount";
|
|
4
6
|
import { PositionAccount } from "./PositionAccount";
|
|
5
|
-
import { AddLiquidityAmountAndFee, InternalPrice, BorrowRateParams, ExitPriceAndFee, Fees, OracleParams, Permissions, PricingParams, RemoveCollateralData, RemoveLiquidityAmountAndFee, Side, TokenRatios, FeesAction, ContractOraclePrice, Privilege, PerpetualsAccount,
|
|
7
|
+
import { AddLiquidityAmountAndFee, InternalPrice, BorrowRateParams, ExitPriceAndFee, Fees, OracleParams, Permissions, PricingParams, RemoveCollateralData, RemoveLiquidityAmountAndFee, Side, TokenRatios, MinAndMaxPrice, FeesAction, ContractOraclePrice, Privilege, PerpetualsAccount, EntryPriceAndFeeV2, TokenPermissions, TokenStake, InternalEmaPrice } from "./types";
|
|
6
8
|
import { OraclePrice } from "./OraclePrice";
|
|
7
9
|
import { CustodyAccount } from "./CustodyAccount";
|
|
8
10
|
import { Perpetuals } from "./idl/perpetuals";
|
|
@@ -109,7 +111,7 @@ export declare class PerpetualsClient {
|
|
|
109
111
|
maxUtilization: number;
|
|
110
112
|
degenPositionFactor: number;
|
|
111
113
|
degenExposureFactor: number;
|
|
112
|
-
|
|
114
|
+
maxPositionSizeUsd: BN;
|
|
113
115
|
maxExposureUsd: BN;
|
|
114
116
|
};
|
|
115
117
|
permissions: {
|
|
@@ -202,7 +204,7 @@ export declare class PerpetualsClient {
|
|
|
202
204
|
reservedAmount: BN;
|
|
203
205
|
minReserveUsd: BN;
|
|
204
206
|
limitPriceBufferBps: BN;
|
|
205
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
207
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
206
208
|
owner: PublicKey;
|
|
207
209
|
stakeStats: {
|
|
208
210
|
pendingActivation: BN;
|
|
@@ -236,7 +238,7 @@ export declare class PerpetualsClient {
|
|
|
236
238
|
lockedAmount: BN;
|
|
237
239
|
lockedUsd: BN;
|
|
238
240
|
collateralAmount: BN;
|
|
239
|
-
|
|
241
|
+
collateralLiabilityUsd: BN;
|
|
240
242
|
unsettledFeeUsd: BN;
|
|
241
243
|
cumulativeLockFeeSnapshot: BN;
|
|
242
244
|
sizeDecimals: number;
|
|
@@ -245,7 +247,7 @@ export declare class PerpetualsClient {
|
|
|
245
247
|
};
|
|
246
248
|
targetCustodyUid: number;
|
|
247
249
|
collateralCustodyUid: number;
|
|
248
|
-
padding2: number[] | BN[]
|
|
250
|
+
padding2: number[] | BN[];
|
|
249
251
|
numSigners: number;
|
|
250
252
|
numSigned: number;
|
|
251
253
|
minSignatures: number;
|
|
@@ -259,6 +261,7 @@ export declare class PerpetualsClient {
|
|
|
259
261
|
conf: BN;
|
|
260
262
|
ema: BN;
|
|
261
263
|
publishTime: BN;
|
|
264
|
+
extOracleAccount: PublicKey;
|
|
262
265
|
market: PublicKey;
|
|
263
266
|
limitOrders: unknown;
|
|
264
267
|
takeProfitOrders: unknown;
|
|
@@ -301,7 +304,7 @@ export declare class PerpetualsClient {
|
|
|
301
304
|
}[];
|
|
302
305
|
markets: PublicKey[];
|
|
303
306
|
maxAumUsd: BN;
|
|
304
|
-
buffer: BN;
|
|
307
|
+
buffer: number | BN;
|
|
305
308
|
rawAumUsd: BN;
|
|
306
309
|
equityUsd: BN;
|
|
307
310
|
totalStaked: {
|
|
@@ -332,6 +335,9 @@ export declare class PerpetualsClient {
|
|
|
332
335
|
lpPrice: BN;
|
|
333
336
|
compoundingLpPrice: BN;
|
|
334
337
|
lastUpdatedTimestamp: BN;
|
|
338
|
+
feesObligationUsd: BN;
|
|
339
|
+
rebateObligationUsd: BN;
|
|
340
|
+
thresholdUsd: BN;
|
|
335
341
|
delegate: PublicKey;
|
|
336
342
|
openTime: BN;
|
|
337
343
|
updateTime: BN;
|
|
@@ -345,15 +351,22 @@ export declare class PerpetualsClient {
|
|
|
345
351
|
lockedUsd: BN;
|
|
346
352
|
collateralAmount: BN;
|
|
347
353
|
collateralUsd: BN;
|
|
348
|
-
|
|
354
|
+
unsettledValueUsd: BN;
|
|
349
355
|
unsettledFeesUsd: BN;
|
|
350
356
|
cumulativeLockFeeSnapshot: BN;
|
|
351
357
|
degenSizeUsd: BN;
|
|
358
|
+
referencePrice: {
|
|
359
|
+
price: BN;
|
|
360
|
+
exponent: number;
|
|
361
|
+
};
|
|
352
362
|
sizeDecimals: number;
|
|
353
363
|
lockedDecimals: number;
|
|
354
364
|
collateralDecimals: number;
|
|
355
365
|
key: PublicKey;
|
|
356
366
|
feeAmount: BN;
|
|
367
|
+
allowPayout: boolean;
|
|
368
|
+
availableUsd: BN;
|
|
369
|
+
availableAmount: BN;
|
|
357
370
|
refererTokenStakeAccount: PublicKey;
|
|
358
371
|
refererBoosterAccount: PublicKey;
|
|
359
372
|
level: number;
|
|
@@ -367,6 +380,7 @@ export declare class PerpetualsClient {
|
|
|
367
380
|
rewardTokens: BN;
|
|
368
381
|
unclaimedRevenueAmount: BN;
|
|
369
382
|
revenueSnapshot: BN;
|
|
383
|
+
claimableRebateUsd: BN;
|
|
370
384
|
tokenMint: PublicKey;
|
|
371
385
|
tokenVaultTokenAccount: PublicKey;
|
|
372
386
|
tokenPermissions: {
|
|
@@ -450,7 +464,7 @@ export declare class PerpetualsClient {
|
|
|
450
464
|
maxUtilization: number;
|
|
451
465
|
degenPositionFactor: number;
|
|
452
466
|
degenExposureFactor: number;
|
|
453
|
-
|
|
467
|
+
maxPositionSizeUsd: BN;
|
|
454
468
|
maxExposureUsd: BN;
|
|
455
469
|
};
|
|
456
470
|
permissions: {
|
|
@@ -543,7 +557,7 @@ export declare class PerpetualsClient {
|
|
|
543
557
|
reservedAmount: BN;
|
|
544
558
|
minReserveUsd: BN;
|
|
545
559
|
limitPriceBufferBps: BN;
|
|
546
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
560
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
547
561
|
owner: PublicKey;
|
|
548
562
|
stakeStats: {
|
|
549
563
|
pendingActivation: BN;
|
|
@@ -577,7 +591,7 @@ export declare class PerpetualsClient {
|
|
|
577
591
|
lockedAmount: BN;
|
|
578
592
|
lockedUsd: BN;
|
|
579
593
|
collateralAmount: BN;
|
|
580
|
-
|
|
594
|
+
collateralLiabilityUsd: BN;
|
|
581
595
|
unsettledFeeUsd: BN;
|
|
582
596
|
cumulativeLockFeeSnapshot: BN;
|
|
583
597
|
sizeDecimals: number;
|
|
@@ -586,7 +600,7 @@ export declare class PerpetualsClient {
|
|
|
586
600
|
};
|
|
587
601
|
targetCustodyUid: number;
|
|
588
602
|
collateralCustodyUid: number;
|
|
589
|
-
padding2: number[] | BN[]
|
|
603
|
+
padding2: number[] | BN[];
|
|
590
604
|
numSigners: number;
|
|
591
605
|
numSigned: number;
|
|
592
606
|
minSignatures: number;
|
|
@@ -600,6 +614,7 @@ export declare class PerpetualsClient {
|
|
|
600
614
|
conf: BN;
|
|
601
615
|
ema: BN;
|
|
602
616
|
publishTime: BN;
|
|
617
|
+
extOracleAccount: PublicKey;
|
|
603
618
|
market: PublicKey;
|
|
604
619
|
limitOrders: unknown;
|
|
605
620
|
takeProfitOrders: unknown;
|
|
@@ -642,7 +657,7 @@ export declare class PerpetualsClient {
|
|
|
642
657
|
}[];
|
|
643
658
|
markets: PublicKey[];
|
|
644
659
|
maxAumUsd: BN;
|
|
645
|
-
buffer: BN;
|
|
660
|
+
buffer: number | BN;
|
|
646
661
|
rawAumUsd: BN;
|
|
647
662
|
equityUsd: BN;
|
|
648
663
|
totalStaked: {
|
|
@@ -673,6 +688,9 @@ export declare class PerpetualsClient {
|
|
|
673
688
|
lpPrice: BN;
|
|
674
689
|
compoundingLpPrice: BN;
|
|
675
690
|
lastUpdatedTimestamp: BN;
|
|
691
|
+
feesObligationUsd: BN;
|
|
692
|
+
rebateObligationUsd: BN;
|
|
693
|
+
thresholdUsd: BN;
|
|
676
694
|
delegate: PublicKey;
|
|
677
695
|
openTime: BN;
|
|
678
696
|
updateTime: BN;
|
|
@@ -686,15 +704,22 @@ export declare class PerpetualsClient {
|
|
|
686
704
|
lockedUsd: BN;
|
|
687
705
|
collateralAmount: BN;
|
|
688
706
|
collateralUsd: BN;
|
|
689
|
-
|
|
707
|
+
unsettledValueUsd: BN;
|
|
690
708
|
unsettledFeesUsd: BN;
|
|
691
709
|
cumulativeLockFeeSnapshot: BN;
|
|
692
710
|
degenSizeUsd: BN;
|
|
711
|
+
referencePrice: {
|
|
712
|
+
price: BN;
|
|
713
|
+
exponent: number;
|
|
714
|
+
};
|
|
693
715
|
sizeDecimals: number;
|
|
694
716
|
lockedDecimals: number;
|
|
695
717
|
collateralDecimals: number;
|
|
696
718
|
key: PublicKey;
|
|
697
719
|
feeAmount: BN;
|
|
720
|
+
allowPayout: boolean;
|
|
721
|
+
availableUsd: BN;
|
|
722
|
+
availableAmount: BN;
|
|
698
723
|
refererTokenStakeAccount: PublicKey;
|
|
699
724
|
refererBoosterAccount: PublicKey;
|
|
700
725
|
level: number;
|
|
@@ -708,6 +733,7 @@ export declare class PerpetualsClient {
|
|
|
708
733
|
rewardTokens: BN;
|
|
709
734
|
unclaimedRevenueAmount: BN;
|
|
710
735
|
revenueSnapshot: BN;
|
|
736
|
+
claimableRebateUsd: BN;
|
|
711
737
|
tokenMint: PublicKey;
|
|
712
738
|
tokenVaultTokenAccount: PublicKey;
|
|
713
739
|
tokenPermissions: {
|
|
@@ -790,7 +816,7 @@ export declare class PerpetualsClient {
|
|
|
790
816
|
maxUtilization: number;
|
|
791
817
|
degenPositionFactor: number;
|
|
792
818
|
degenExposureFactor: number;
|
|
793
|
-
|
|
819
|
+
maxPositionSizeUsd: BN;
|
|
794
820
|
maxExposureUsd: BN;
|
|
795
821
|
};
|
|
796
822
|
permissions: {
|
|
@@ -883,7 +909,7 @@ export declare class PerpetualsClient {
|
|
|
883
909
|
reservedAmount: BN;
|
|
884
910
|
minReserveUsd: BN;
|
|
885
911
|
limitPriceBufferBps: BN;
|
|
886
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
912
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
887
913
|
owner: PublicKey;
|
|
888
914
|
stakeStats: {
|
|
889
915
|
pendingActivation: BN;
|
|
@@ -917,7 +943,7 @@ export declare class PerpetualsClient {
|
|
|
917
943
|
lockedAmount: BN;
|
|
918
944
|
lockedUsd: BN;
|
|
919
945
|
collateralAmount: BN;
|
|
920
|
-
|
|
946
|
+
collateralLiabilityUsd: BN;
|
|
921
947
|
unsettledFeeUsd: BN;
|
|
922
948
|
cumulativeLockFeeSnapshot: BN;
|
|
923
949
|
sizeDecimals: number;
|
|
@@ -926,7 +952,7 @@ export declare class PerpetualsClient {
|
|
|
926
952
|
};
|
|
927
953
|
targetCustodyUid: number;
|
|
928
954
|
collateralCustodyUid: number;
|
|
929
|
-
padding2: number[] | BN[]
|
|
955
|
+
padding2: number[] | BN[];
|
|
930
956
|
numSigners: number;
|
|
931
957
|
numSigned: number;
|
|
932
958
|
minSignatures: number;
|
|
@@ -940,6 +966,7 @@ export declare class PerpetualsClient {
|
|
|
940
966
|
conf: BN;
|
|
941
967
|
ema: BN;
|
|
942
968
|
publishTime: BN;
|
|
969
|
+
extOracleAccount: PublicKey;
|
|
943
970
|
market: PublicKey;
|
|
944
971
|
limitOrders: unknown;
|
|
945
972
|
takeProfitOrders: unknown;
|
|
@@ -982,7 +1009,7 @@ export declare class PerpetualsClient {
|
|
|
982
1009
|
}[];
|
|
983
1010
|
markets: PublicKey[];
|
|
984
1011
|
maxAumUsd: BN;
|
|
985
|
-
buffer: BN;
|
|
1012
|
+
buffer: number | BN;
|
|
986
1013
|
rawAumUsd: BN;
|
|
987
1014
|
equityUsd: BN;
|
|
988
1015
|
totalStaked: {
|
|
@@ -1013,6 +1040,9 @@ export declare class PerpetualsClient {
|
|
|
1013
1040
|
lpPrice: BN;
|
|
1014
1041
|
compoundingLpPrice: BN;
|
|
1015
1042
|
lastUpdatedTimestamp: BN;
|
|
1043
|
+
feesObligationUsd: BN;
|
|
1044
|
+
rebateObligationUsd: BN;
|
|
1045
|
+
thresholdUsd: BN;
|
|
1016
1046
|
delegate: PublicKey;
|
|
1017
1047
|
openTime: BN;
|
|
1018
1048
|
updateTime: BN;
|
|
@@ -1026,15 +1056,22 @@ export declare class PerpetualsClient {
|
|
|
1026
1056
|
lockedUsd: BN;
|
|
1027
1057
|
collateralAmount: BN;
|
|
1028
1058
|
collateralUsd: BN;
|
|
1029
|
-
|
|
1059
|
+
unsettledValueUsd: BN;
|
|
1030
1060
|
unsettledFeesUsd: BN;
|
|
1031
1061
|
cumulativeLockFeeSnapshot: BN;
|
|
1032
1062
|
degenSizeUsd: BN;
|
|
1063
|
+
referencePrice: {
|
|
1064
|
+
price: BN;
|
|
1065
|
+
exponent: number;
|
|
1066
|
+
};
|
|
1033
1067
|
sizeDecimals: number;
|
|
1034
1068
|
lockedDecimals: number;
|
|
1035
1069
|
collateralDecimals: number;
|
|
1036
1070
|
key: PublicKey;
|
|
1037
1071
|
feeAmount: BN;
|
|
1072
|
+
allowPayout: boolean;
|
|
1073
|
+
availableUsd: BN;
|
|
1074
|
+
availableAmount: BN;
|
|
1038
1075
|
refererTokenStakeAccount: PublicKey;
|
|
1039
1076
|
refererBoosterAccount: PublicKey;
|
|
1040
1077
|
level: number;
|
|
@@ -1048,6 +1085,7 @@ export declare class PerpetualsClient {
|
|
|
1048
1085
|
rewardTokens: BN;
|
|
1049
1086
|
unclaimedRevenueAmount: BN;
|
|
1050
1087
|
revenueSnapshot: BN;
|
|
1088
|
+
claimableRebateUsd: BN;
|
|
1051
1089
|
tokenMint: PublicKey;
|
|
1052
1090
|
tokenVaultTokenAccount: PublicKey;
|
|
1053
1091
|
tokenPermissions: {
|
|
@@ -1134,7 +1172,7 @@ export declare class PerpetualsClient {
|
|
|
1134
1172
|
maxUtilization: number;
|
|
1135
1173
|
degenPositionFactor: number;
|
|
1136
1174
|
degenExposureFactor: number;
|
|
1137
|
-
|
|
1175
|
+
maxPositionSizeUsd: BN;
|
|
1138
1176
|
maxExposureUsd: BN;
|
|
1139
1177
|
};
|
|
1140
1178
|
permissions: {
|
|
@@ -1227,7 +1265,7 @@ export declare class PerpetualsClient {
|
|
|
1227
1265
|
reservedAmount: BN;
|
|
1228
1266
|
minReserveUsd: BN;
|
|
1229
1267
|
limitPriceBufferBps: BN;
|
|
1230
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1268
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1231
1269
|
owner: PublicKey;
|
|
1232
1270
|
stakeStats: {
|
|
1233
1271
|
pendingActivation: BN;
|
|
@@ -1261,7 +1299,7 @@ export declare class PerpetualsClient {
|
|
|
1261
1299
|
lockedAmount: BN;
|
|
1262
1300
|
lockedUsd: BN;
|
|
1263
1301
|
collateralAmount: BN;
|
|
1264
|
-
|
|
1302
|
+
collateralLiabilityUsd: BN;
|
|
1265
1303
|
unsettledFeeUsd: BN;
|
|
1266
1304
|
cumulativeLockFeeSnapshot: BN;
|
|
1267
1305
|
sizeDecimals: number;
|
|
@@ -1270,7 +1308,7 @@ export declare class PerpetualsClient {
|
|
|
1270
1308
|
};
|
|
1271
1309
|
targetCustodyUid: number;
|
|
1272
1310
|
collateralCustodyUid: number;
|
|
1273
|
-
padding2: number[] | BN[]
|
|
1311
|
+
padding2: number[] | BN[];
|
|
1274
1312
|
numSigners: number;
|
|
1275
1313
|
numSigned: number;
|
|
1276
1314
|
minSignatures: number;
|
|
@@ -1284,6 +1322,7 @@ export declare class PerpetualsClient {
|
|
|
1284
1322
|
conf: BN;
|
|
1285
1323
|
ema: BN;
|
|
1286
1324
|
publishTime: BN;
|
|
1325
|
+
extOracleAccount: PublicKey;
|
|
1287
1326
|
market: PublicKey;
|
|
1288
1327
|
limitOrders: unknown;
|
|
1289
1328
|
takeProfitOrders: unknown;
|
|
@@ -1326,7 +1365,7 @@ export declare class PerpetualsClient {
|
|
|
1326
1365
|
}[];
|
|
1327
1366
|
markets: PublicKey[];
|
|
1328
1367
|
maxAumUsd: BN;
|
|
1329
|
-
buffer: BN;
|
|
1368
|
+
buffer: number | BN;
|
|
1330
1369
|
rawAumUsd: BN;
|
|
1331
1370
|
equityUsd: BN;
|
|
1332
1371
|
totalStaked: {
|
|
@@ -1357,6 +1396,9 @@ export declare class PerpetualsClient {
|
|
|
1357
1396
|
lpPrice: BN;
|
|
1358
1397
|
compoundingLpPrice: BN;
|
|
1359
1398
|
lastUpdatedTimestamp: BN;
|
|
1399
|
+
feesObligationUsd: BN;
|
|
1400
|
+
rebateObligationUsd: BN;
|
|
1401
|
+
thresholdUsd: BN;
|
|
1360
1402
|
delegate: PublicKey;
|
|
1361
1403
|
openTime: BN;
|
|
1362
1404
|
updateTime: BN;
|
|
@@ -1370,15 +1412,22 @@ export declare class PerpetualsClient {
|
|
|
1370
1412
|
lockedUsd: BN;
|
|
1371
1413
|
collateralAmount: BN;
|
|
1372
1414
|
collateralUsd: BN;
|
|
1373
|
-
|
|
1415
|
+
unsettledValueUsd: BN;
|
|
1374
1416
|
unsettledFeesUsd: BN;
|
|
1375
1417
|
cumulativeLockFeeSnapshot: BN;
|
|
1376
1418
|
degenSizeUsd: BN;
|
|
1419
|
+
referencePrice: {
|
|
1420
|
+
price: BN;
|
|
1421
|
+
exponent: number;
|
|
1422
|
+
};
|
|
1377
1423
|
sizeDecimals: number;
|
|
1378
1424
|
lockedDecimals: number;
|
|
1379
1425
|
collateralDecimals: number;
|
|
1380
1426
|
key: PublicKey;
|
|
1381
1427
|
feeAmount: BN;
|
|
1428
|
+
allowPayout: boolean;
|
|
1429
|
+
availableUsd: BN;
|
|
1430
|
+
availableAmount: BN;
|
|
1382
1431
|
refererTokenStakeAccount: PublicKey;
|
|
1383
1432
|
refererBoosterAccount: PublicKey;
|
|
1384
1433
|
level: number;
|
|
@@ -1392,6 +1441,7 @@ export declare class PerpetualsClient {
|
|
|
1392
1441
|
rewardTokens: BN;
|
|
1393
1442
|
unclaimedRevenueAmount: BN;
|
|
1394
1443
|
revenueSnapshot: BN;
|
|
1444
|
+
claimableRebateUsd: BN;
|
|
1395
1445
|
tokenMint: PublicKey;
|
|
1396
1446
|
tokenVaultTokenAccount: PublicKey;
|
|
1397
1447
|
tokenPermissions: {
|
|
@@ -1477,7 +1527,7 @@ export declare class PerpetualsClient {
|
|
|
1477
1527
|
maxUtilization: number;
|
|
1478
1528
|
degenPositionFactor: number;
|
|
1479
1529
|
degenExposureFactor: number;
|
|
1480
|
-
|
|
1530
|
+
maxPositionSizeUsd: BN;
|
|
1481
1531
|
maxExposureUsd: BN;
|
|
1482
1532
|
};
|
|
1483
1533
|
permissions: {
|
|
@@ -1570,7 +1620,7 @@ export declare class PerpetualsClient {
|
|
|
1570
1620
|
reservedAmount: BN;
|
|
1571
1621
|
minReserveUsd: BN;
|
|
1572
1622
|
limitPriceBufferBps: BN;
|
|
1573
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1623
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1574
1624
|
owner: PublicKey;
|
|
1575
1625
|
stakeStats: {
|
|
1576
1626
|
pendingActivation: BN;
|
|
@@ -1604,7 +1654,7 @@ export declare class PerpetualsClient {
|
|
|
1604
1654
|
lockedAmount: BN;
|
|
1605
1655
|
lockedUsd: BN;
|
|
1606
1656
|
collateralAmount: BN;
|
|
1607
|
-
|
|
1657
|
+
collateralLiabilityUsd: BN;
|
|
1608
1658
|
unsettledFeeUsd: BN;
|
|
1609
1659
|
cumulativeLockFeeSnapshot: BN;
|
|
1610
1660
|
sizeDecimals: number;
|
|
@@ -1613,7 +1663,7 @@ export declare class PerpetualsClient {
|
|
|
1613
1663
|
};
|
|
1614
1664
|
targetCustodyUid: number;
|
|
1615
1665
|
collateralCustodyUid: number;
|
|
1616
|
-
padding2: number[] | BN[]
|
|
1666
|
+
padding2: number[] | BN[];
|
|
1617
1667
|
numSigners: number;
|
|
1618
1668
|
numSigned: number;
|
|
1619
1669
|
minSignatures: number;
|
|
@@ -1627,6 +1677,7 @@ export declare class PerpetualsClient {
|
|
|
1627
1677
|
conf: BN;
|
|
1628
1678
|
ema: BN;
|
|
1629
1679
|
publishTime: BN;
|
|
1680
|
+
extOracleAccount: PublicKey;
|
|
1630
1681
|
market: PublicKey;
|
|
1631
1682
|
limitOrders: unknown;
|
|
1632
1683
|
takeProfitOrders: unknown;
|
|
@@ -1669,7 +1720,7 @@ export declare class PerpetualsClient {
|
|
|
1669
1720
|
}[];
|
|
1670
1721
|
markets: PublicKey[];
|
|
1671
1722
|
maxAumUsd: BN;
|
|
1672
|
-
buffer: BN;
|
|
1723
|
+
buffer: number | BN;
|
|
1673
1724
|
rawAumUsd: BN;
|
|
1674
1725
|
equityUsd: BN;
|
|
1675
1726
|
totalStaked: {
|
|
@@ -1700,6 +1751,9 @@ export declare class PerpetualsClient {
|
|
|
1700
1751
|
lpPrice: BN;
|
|
1701
1752
|
compoundingLpPrice: BN;
|
|
1702
1753
|
lastUpdatedTimestamp: BN;
|
|
1754
|
+
feesObligationUsd: BN;
|
|
1755
|
+
rebateObligationUsd: BN;
|
|
1756
|
+
thresholdUsd: BN;
|
|
1703
1757
|
delegate: PublicKey;
|
|
1704
1758
|
openTime: BN;
|
|
1705
1759
|
updateTime: BN;
|
|
@@ -1713,15 +1767,22 @@ export declare class PerpetualsClient {
|
|
|
1713
1767
|
lockedUsd: BN;
|
|
1714
1768
|
collateralAmount: BN;
|
|
1715
1769
|
collateralUsd: BN;
|
|
1716
|
-
|
|
1770
|
+
unsettledValueUsd: BN;
|
|
1717
1771
|
unsettledFeesUsd: BN;
|
|
1718
1772
|
cumulativeLockFeeSnapshot: BN;
|
|
1719
1773
|
degenSizeUsd: BN;
|
|
1774
|
+
referencePrice: {
|
|
1775
|
+
price: BN;
|
|
1776
|
+
exponent: number;
|
|
1777
|
+
};
|
|
1720
1778
|
sizeDecimals: number;
|
|
1721
1779
|
lockedDecimals: number;
|
|
1722
1780
|
collateralDecimals: number;
|
|
1723
1781
|
key: PublicKey;
|
|
1724
1782
|
feeAmount: BN;
|
|
1783
|
+
allowPayout: boolean;
|
|
1784
|
+
availableUsd: BN;
|
|
1785
|
+
availableAmount: BN;
|
|
1725
1786
|
refererTokenStakeAccount: PublicKey;
|
|
1726
1787
|
refererBoosterAccount: PublicKey;
|
|
1727
1788
|
level: number;
|
|
@@ -1735,6 +1796,7 @@ export declare class PerpetualsClient {
|
|
|
1735
1796
|
rewardTokens: BN;
|
|
1736
1797
|
unclaimedRevenueAmount: BN;
|
|
1737
1798
|
revenueSnapshot: BN;
|
|
1799
|
+
claimableRebateUsd: BN;
|
|
1738
1800
|
tokenMint: PublicKey;
|
|
1739
1801
|
tokenVaultTokenAccount: PublicKey;
|
|
1740
1802
|
tokenPermissions: {
|
|
@@ -1818,7 +1880,7 @@ export declare class PerpetualsClient {
|
|
|
1818
1880
|
maxUtilization: number;
|
|
1819
1881
|
degenPositionFactor: number;
|
|
1820
1882
|
degenExposureFactor: number;
|
|
1821
|
-
|
|
1883
|
+
maxPositionSizeUsd: BN;
|
|
1822
1884
|
maxExposureUsd: BN;
|
|
1823
1885
|
};
|
|
1824
1886
|
permissions: {
|
|
@@ -1911,7 +1973,7 @@ export declare class PerpetualsClient {
|
|
|
1911
1973
|
reservedAmount: BN;
|
|
1912
1974
|
minReserveUsd: BN;
|
|
1913
1975
|
limitPriceBufferBps: BN;
|
|
1914
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1976
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1915
1977
|
owner: PublicKey;
|
|
1916
1978
|
stakeStats: {
|
|
1917
1979
|
pendingActivation: BN;
|
|
@@ -1945,7 +2007,7 @@ export declare class PerpetualsClient {
|
|
|
1945
2007
|
lockedAmount: BN;
|
|
1946
2008
|
lockedUsd: BN;
|
|
1947
2009
|
collateralAmount: BN;
|
|
1948
|
-
|
|
2010
|
+
collateralLiabilityUsd: BN;
|
|
1949
2011
|
unsettledFeeUsd: BN;
|
|
1950
2012
|
cumulativeLockFeeSnapshot: BN;
|
|
1951
2013
|
sizeDecimals: number;
|
|
@@ -1954,7 +2016,7 @@ export declare class PerpetualsClient {
|
|
|
1954
2016
|
};
|
|
1955
2017
|
targetCustodyUid: number;
|
|
1956
2018
|
collateralCustodyUid: number;
|
|
1957
|
-
padding2: number[] | BN[]
|
|
2019
|
+
padding2: number[] | BN[];
|
|
1958
2020
|
numSigners: number;
|
|
1959
2021
|
numSigned: number;
|
|
1960
2022
|
minSignatures: number;
|
|
@@ -1968,6 +2030,7 @@ export declare class PerpetualsClient {
|
|
|
1968
2030
|
conf: BN;
|
|
1969
2031
|
ema: BN;
|
|
1970
2032
|
publishTime: BN;
|
|
2033
|
+
extOracleAccount: PublicKey;
|
|
1971
2034
|
market: PublicKey;
|
|
1972
2035
|
limitOrders: unknown;
|
|
1973
2036
|
takeProfitOrders: unknown;
|
|
@@ -2010,7 +2073,7 @@ export declare class PerpetualsClient {
|
|
|
2010
2073
|
}[];
|
|
2011
2074
|
markets: PublicKey[];
|
|
2012
2075
|
maxAumUsd: BN;
|
|
2013
|
-
buffer: BN;
|
|
2076
|
+
buffer: number | BN;
|
|
2014
2077
|
rawAumUsd: BN;
|
|
2015
2078
|
equityUsd: BN;
|
|
2016
2079
|
totalStaked: {
|
|
@@ -2041,6 +2104,9 @@ export declare class PerpetualsClient {
|
|
|
2041
2104
|
lpPrice: BN;
|
|
2042
2105
|
compoundingLpPrice: BN;
|
|
2043
2106
|
lastUpdatedTimestamp: BN;
|
|
2107
|
+
feesObligationUsd: BN;
|
|
2108
|
+
rebateObligationUsd: BN;
|
|
2109
|
+
thresholdUsd: BN;
|
|
2044
2110
|
delegate: PublicKey;
|
|
2045
2111
|
openTime: BN;
|
|
2046
2112
|
updateTime: BN;
|
|
@@ -2054,15 +2120,22 @@ export declare class PerpetualsClient {
|
|
|
2054
2120
|
lockedUsd: BN;
|
|
2055
2121
|
collateralAmount: BN;
|
|
2056
2122
|
collateralUsd: BN;
|
|
2057
|
-
|
|
2123
|
+
unsettledValueUsd: BN;
|
|
2058
2124
|
unsettledFeesUsd: BN;
|
|
2059
2125
|
cumulativeLockFeeSnapshot: BN;
|
|
2060
2126
|
degenSizeUsd: BN;
|
|
2127
|
+
referencePrice: {
|
|
2128
|
+
price: BN;
|
|
2129
|
+
exponent: number;
|
|
2130
|
+
};
|
|
2061
2131
|
sizeDecimals: number;
|
|
2062
2132
|
lockedDecimals: number;
|
|
2063
2133
|
collateralDecimals: number;
|
|
2064
2134
|
key: PublicKey;
|
|
2065
2135
|
feeAmount: BN;
|
|
2136
|
+
allowPayout: boolean;
|
|
2137
|
+
availableUsd: BN;
|
|
2138
|
+
availableAmount: BN;
|
|
2066
2139
|
refererTokenStakeAccount: PublicKey;
|
|
2067
2140
|
refererBoosterAccount: PublicKey;
|
|
2068
2141
|
level: number;
|
|
@@ -2076,6 +2149,7 @@ export declare class PerpetualsClient {
|
|
|
2076
2149
|
rewardTokens: BN;
|
|
2077
2150
|
unclaimedRevenueAmount: BN;
|
|
2078
2151
|
revenueSnapshot: BN;
|
|
2152
|
+
claimableRebateUsd: BN;
|
|
2079
2153
|
tokenMint: PublicKey;
|
|
2080
2154
|
tokenVaultTokenAccount: PublicKey;
|
|
2081
2155
|
tokenPermissions: {
|
|
@@ -2158,7 +2232,7 @@ export declare class PerpetualsClient {
|
|
|
2158
2232
|
maxUtilization: number;
|
|
2159
2233
|
degenPositionFactor: number;
|
|
2160
2234
|
degenExposureFactor: number;
|
|
2161
|
-
|
|
2235
|
+
maxPositionSizeUsd: BN;
|
|
2162
2236
|
maxExposureUsd: BN;
|
|
2163
2237
|
};
|
|
2164
2238
|
permissions: {
|
|
@@ -2251,7 +2325,7 @@ export declare class PerpetualsClient {
|
|
|
2251
2325
|
reservedAmount: BN;
|
|
2252
2326
|
minReserveUsd: BN;
|
|
2253
2327
|
limitPriceBufferBps: BN;
|
|
2254
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
2328
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2255
2329
|
owner: PublicKey;
|
|
2256
2330
|
stakeStats: {
|
|
2257
2331
|
pendingActivation: BN;
|
|
@@ -2285,7 +2359,7 @@ export declare class PerpetualsClient {
|
|
|
2285
2359
|
lockedAmount: BN;
|
|
2286
2360
|
lockedUsd: BN;
|
|
2287
2361
|
collateralAmount: BN;
|
|
2288
|
-
|
|
2362
|
+
collateralLiabilityUsd: BN;
|
|
2289
2363
|
unsettledFeeUsd: BN;
|
|
2290
2364
|
cumulativeLockFeeSnapshot: BN;
|
|
2291
2365
|
sizeDecimals: number;
|
|
@@ -2294,7 +2368,7 @@ export declare class PerpetualsClient {
|
|
|
2294
2368
|
};
|
|
2295
2369
|
targetCustodyUid: number;
|
|
2296
2370
|
collateralCustodyUid: number;
|
|
2297
|
-
padding2: number[] | BN[]
|
|
2371
|
+
padding2: number[] | BN[];
|
|
2298
2372
|
numSigners: number;
|
|
2299
2373
|
numSigned: number;
|
|
2300
2374
|
minSignatures: number;
|
|
@@ -2308,6 +2382,7 @@ export declare class PerpetualsClient {
|
|
|
2308
2382
|
conf: BN;
|
|
2309
2383
|
ema: BN;
|
|
2310
2384
|
publishTime: BN;
|
|
2385
|
+
extOracleAccount: PublicKey;
|
|
2311
2386
|
market: PublicKey;
|
|
2312
2387
|
limitOrders: unknown;
|
|
2313
2388
|
takeProfitOrders: unknown;
|
|
@@ -2350,7 +2425,7 @@ export declare class PerpetualsClient {
|
|
|
2350
2425
|
}[];
|
|
2351
2426
|
markets: PublicKey[];
|
|
2352
2427
|
maxAumUsd: BN;
|
|
2353
|
-
buffer: BN;
|
|
2428
|
+
buffer: number | BN;
|
|
2354
2429
|
rawAumUsd: BN;
|
|
2355
2430
|
equityUsd: BN;
|
|
2356
2431
|
totalStaked: {
|
|
@@ -2381,6 +2456,9 @@ export declare class PerpetualsClient {
|
|
|
2381
2456
|
lpPrice: BN;
|
|
2382
2457
|
compoundingLpPrice: BN;
|
|
2383
2458
|
lastUpdatedTimestamp: BN;
|
|
2459
|
+
feesObligationUsd: BN;
|
|
2460
|
+
rebateObligationUsd: BN;
|
|
2461
|
+
thresholdUsd: BN;
|
|
2384
2462
|
delegate: PublicKey;
|
|
2385
2463
|
openTime: BN;
|
|
2386
2464
|
updateTime: BN;
|
|
@@ -2394,15 +2472,22 @@ export declare class PerpetualsClient {
|
|
|
2394
2472
|
lockedUsd: BN;
|
|
2395
2473
|
collateralAmount: BN;
|
|
2396
2474
|
collateralUsd: BN;
|
|
2397
|
-
|
|
2475
|
+
unsettledValueUsd: BN;
|
|
2398
2476
|
unsettledFeesUsd: BN;
|
|
2399
2477
|
cumulativeLockFeeSnapshot: BN;
|
|
2400
2478
|
degenSizeUsd: BN;
|
|
2479
|
+
referencePrice: {
|
|
2480
|
+
price: BN;
|
|
2481
|
+
exponent: number;
|
|
2482
|
+
};
|
|
2401
2483
|
sizeDecimals: number;
|
|
2402
2484
|
lockedDecimals: number;
|
|
2403
2485
|
collateralDecimals: number;
|
|
2404
2486
|
key: PublicKey;
|
|
2405
2487
|
feeAmount: BN;
|
|
2488
|
+
allowPayout: boolean;
|
|
2489
|
+
availableUsd: BN;
|
|
2490
|
+
availableAmount: BN;
|
|
2406
2491
|
refererTokenStakeAccount: PublicKey;
|
|
2407
2492
|
refererBoosterAccount: PublicKey;
|
|
2408
2493
|
level: number;
|
|
@@ -2416,6 +2501,7 @@ export declare class PerpetualsClient {
|
|
|
2416
2501
|
rewardTokens: BN;
|
|
2417
2502
|
unclaimedRevenueAmount: BN;
|
|
2418
2503
|
revenueSnapshot: BN;
|
|
2504
|
+
claimableRebateUsd: BN;
|
|
2419
2505
|
tokenMint: PublicKey;
|
|
2420
2506
|
tokenVaultTokenAccount: PublicKey;
|
|
2421
2507
|
tokenPermissions: {
|
|
@@ -2498,7 +2584,7 @@ export declare class PerpetualsClient {
|
|
|
2498
2584
|
maxUtilization: number;
|
|
2499
2585
|
degenPositionFactor: number;
|
|
2500
2586
|
degenExposureFactor: number;
|
|
2501
|
-
|
|
2587
|
+
maxPositionSizeUsd: BN;
|
|
2502
2588
|
maxExposureUsd: BN;
|
|
2503
2589
|
};
|
|
2504
2590
|
permissions: {
|
|
@@ -2591,7 +2677,7 @@ export declare class PerpetualsClient {
|
|
|
2591
2677
|
reservedAmount: BN;
|
|
2592
2678
|
minReserveUsd: BN;
|
|
2593
2679
|
limitPriceBufferBps: BN;
|
|
2594
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
2680
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2595
2681
|
owner: PublicKey;
|
|
2596
2682
|
stakeStats: {
|
|
2597
2683
|
pendingActivation: BN;
|
|
@@ -2625,7 +2711,7 @@ export declare class PerpetualsClient {
|
|
|
2625
2711
|
lockedAmount: BN;
|
|
2626
2712
|
lockedUsd: BN;
|
|
2627
2713
|
collateralAmount: BN;
|
|
2628
|
-
|
|
2714
|
+
collateralLiabilityUsd: BN;
|
|
2629
2715
|
unsettledFeeUsd: BN;
|
|
2630
2716
|
cumulativeLockFeeSnapshot: BN;
|
|
2631
2717
|
sizeDecimals: number;
|
|
@@ -2634,7 +2720,7 @@ export declare class PerpetualsClient {
|
|
|
2634
2720
|
};
|
|
2635
2721
|
targetCustodyUid: number;
|
|
2636
2722
|
collateralCustodyUid: number;
|
|
2637
|
-
padding2: number[] | BN[]
|
|
2723
|
+
padding2: number[] | BN[];
|
|
2638
2724
|
numSigners: number;
|
|
2639
2725
|
numSigned: number;
|
|
2640
2726
|
minSignatures: number;
|
|
@@ -2648,6 +2734,7 @@ export declare class PerpetualsClient {
|
|
|
2648
2734
|
conf: BN;
|
|
2649
2735
|
ema: BN;
|
|
2650
2736
|
publishTime: BN;
|
|
2737
|
+
extOracleAccount: PublicKey;
|
|
2651
2738
|
market: PublicKey;
|
|
2652
2739
|
limitOrders: unknown;
|
|
2653
2740
|
takeProfitOrders: unknown;
|
|
@@ -2690,7 +2777,7 @@ export declare class PerpetualsClient {
|
|
|
2690
2777
|
}[];
|
|
2691
2778
|
markets: PublicKey[];
|
|
2692
2779
|
maxAumUsd: BN;
|
|
2693
|
-
buffer: BN;
|
|
2780
|
+
buffer: number | BN;
|
|
2694
2781
|
rawAumUsd: BN;
|
|
2695
2782
|
equityUsd: BN;
|
|
2696
2783
|
totalStaked: {
|
|
@@ -2721,6 +2808,9 @@ export declare class PerpetualsClient {
|
|
|
2721
2808
|
lpPrice: BN;
|
|
2722
2809
|
compoundingLpPrice: BN;
|
|
2723
2810
|
lastUpdatedTimestamp: BN;
|
|
2811
|
+
feesObligationUsd: BN;
|
|
2812
|
+
rebateObligationUsd: BN;
|
|
2813
|
+
thresholdUsd: BN;
|
|
2724
2814
|
delegate: PublicKey;
|
|
2725
2815
|
openTime: BN;
|
|
2726
2816
|
updateTime: BN;
|
|
@@ -2734,15 +2824,22 @@ export declare class PerpetualsClient {
|
|
|
2734
2824
|
lockedUsd: BN;
|
|
2735
2825
|
collateralAmount: BN;
|
|
2736
2826
|
collateralUsd: BN;
|
|
2737
|
-
|
|
2827
|
+
unsettledValueUsd: BN;
|
|
2738
2828
|
unsettledFeesUsd: BN;
|
|
2739
2829
|
cumulativeLockFeeSnapshot: BN;
|
|
2740
2830
|
degenSizeUsd: BN;
|
|
2831
|
+
referencePrice: {
|
|
2832
|
+
price: BN;
|
|
2833
|
+
exponent: number;
|
|
2834
|
+
};
|
|
2741
2835
|
sizeDecimals: number;
|
|
2742
2836
|
lockedDecimals: number;
|
|
2743
2837
|
collateralDecimals: number;
|
|
2744
2838
|
key: PublicKey;
|
|
2745
2839
|
feeAmount: BN;
|
|
2840
|
+
allowPayout: boolean;
|
|
2841
|
+
availableUsd: BN;
|
|
2842
|
+
availableAmount: BN;
|
|
2746
2843
|
refererTokenStakeAccount: PublicKey;
|
|
2747
2844
|
refererBoosterAccount: PublicKey;
|
|
2748
2845
|
level: number;
|
|
@@ -2756,6 +2853,7 @@ export declare class PerpetualsClient {
|
|
|
2756
2853
|
rewardTokens: BN;
|
|
2757
2854
|
unclaimedRevenueAmount: BN;
|
|
2758
2855
|
revenueSnapshot: BN;
|
|
2856
|
+
claimableRebateUsd: BN;
|
|
2759
2857
|
tokenMint: PublicKey;
|
|
2760
2858
|
tokenVaultTokenAccount: PublicKey;
|
|
2761
2859
|
tokenPermissions: {
|
|
@@ -2816,11 +2914,15 @@ export declare class PerpetualsClient {
|
|
|
2816
2914
|
lockedUsd: BN;
|
|
2817
2915
|
collateralAmount: BN;
|
|
2818
2916
|
collateralUsd: BN;
|
|
2819
|
-
|
|
2917
|
+
unsettledValueUsd: BN;
|
|
2820
2918
|
unsettledFeesUsd: BN;
|
|
2821
2919
|
cumulativeLockFeeSnapshot: BN;
|
|
2822
2920
|
degenSizeUsd: BN;
|
|
2823
|
-
|
|
2921
|
+
referencePrice: {
|
|
2922
|
+
price: BN;
|
|
2923
|
+
exponent: number;
|
|
2924
|
+
};
|
|
2925
|
+
buffer: number;
|
|
2824
2926
|
sizeDecimals: number;
|
|
2825
2927
|
lockedDecimals: number;
|
|
2826
2928
|
collateralDecimals: number;
|
|
@@ -2885,7 +2987,7 @@ export declare class PerpetualsClient {
|
|
|
2885
2987
|
maxUtilization: number;
|
|
2886
2988
|
degenPositionFactor: number;
|
|
2887
2989
|
degenExposureFactor: number;
|
|
2888
|
-
|
|
2990
|
+
maxPositionSizeUsd: BN;
|
|
2889
2991
|
maxExposureUsd: BN;
|
|
2890
2992
|
};
|
|
2891
2993
|
permissions: {
|
|
@@ -2978,7 +3080,7 @@ export declare class PerpetualsClient {
|
|
|
2978
3080
|
reservedAmount: BN;
|
|
2979
3081
|
minReserveUsd: BN;
|
|
2980
3082
|
limitPriceBufferBps: BN;
|
|
2981
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3083
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2982
3084
|
owner: PublicKey;
|
|
2983
3085
|
stakeStats: {
|
|
2984
3086
|
pendingActivation: BN;
|
|
@@ -3012,7 +3114,7 @@ export declare class PerpetualsClient {
|
|
|
3012
3114
|
lockedAmount: BN;
|
|
3013
3115
|
lockedUsd: BN;
|
|
3014
3116
|
collateralAmount: BN;
|
|
3015
|
-
|
|
3117
|
+
collateralLiabilityUsd: BN;
|
|
3016
3118
|
unsettledFeeUsd: BN;
|
|
3017
3119
|
cumulativeLockFeeSnapshot: BN;
|
|
3018
3120
|
sizeDecimals: number;
|
|
@@ -3021,7 +3123,7 @@ export declare class PerpetualsClient {
|
|
|
3021
3123
|
};
|
|
3022
3124
|
targetCustodyUid: number;
|
|
3023
3125
|
collateralCustodyUid: number;
|
|
3024
|
-
padding2: number[] | BN[]
|
|
3126
|
+
padding2: number[] | BN[];
|
|
3025
3127
|
numSigners: number;
|
|
3026
3128
|
numSigned: number;
|
|
3027
3129
|
minSignatures: number;
|
|
@@ -3035,6 +3137,7 @@ export declare class PerpetualsClient {
|
|
|
3035
3137
|
conf: BN;
|
|
3036
3138
|
ema: BN;
|
|
3037
3139
|
publishTime: BN;
|
|
3140
|
+
extOracleAccount: PublicKey;
|
|
3038
3141
|
market: PublicKey;
|
|
3039
3142
|
limitOrders: unknown;
|
|
3040
3143
|
takeProfitOrders: unknown;
|
|
@@ -3077,7 +3180,7 @@ export declare class PerpetualsClient {
|
|
|
3077
3180
|
}[];
|
|
3078
3181
|
markets: PublicKey[];
|
|
3079
3182
|
maxAumUsd: BN;
|
|
3080
|
-
buffer: BN;
|
|
3183
|
+
buffer: number | BN;
|
|
3081
3184
|
rawAumUsd: BN;
|
|
3082
3185
|
equityUsd: BN;
|
|
3083
3186
|
totalStaked: {
|
|
@@ -3108,6 +3211,9 @@ export declare class PerpetualsClient {
|
|
|
3108
3211
|
lpPrice: BN;
|
|
3109
3212
|
compoundingLpPrice: BN;
|
|
3110
3213
|
lastUpdatedTimestamp: BN;
|
|
3214
|
+
feesObligationUsd: BN;
|
|
3215
|
+
rebateObligationUsd: BN;
|
|
3216
|
+
thresholdUsd: BN;
|
|
3111
3217
|
delegate: PublicKey;
|
|
3112
3218
|
openTime: BN;
|
|
3113
3219
|
updateTime: BN;
|
|
@@ -3121,15 +3227,22 @@ export declare class PerpetualsClient {
|
|
|
3121
3227
|
lockedUsd: BN;
|
|
3122
3228
|
collateralAmount: BN;
|
|
3123
3229
|
collateralUsd: BN;
|
|
3124
|
-
|
|
3230
|
+
unsettledValueUsd: BN;
|
|
3125
3231
|
unsettledFeesUsd: BN;
|
|
3126
3232
|
cumulativeLockFeeSnapshot: BN;
|
|
3127
3233
|
degenSizeUsd: BN;
|
|
3234
|
+
referencePrice: {
|
|
3235
|
+
price: BN;
|
|
3236
|
+
exponent: number;
|
|
3237
|
+
};
|
|
3128
3238
|
sizeDecimals: number;
|
|
3129
3239
|
lockedDecimals: number;
|
|
3130
3240
|
collateralDecimals: number;
|
|
3131
3241
|
key: PublicKey;
|
|
3132
3242
|
feeAmount: BN;
|
|
3243
|
+
allowPayout: boolean;
|
|
3244
|
+
availableUsd: BN;
|
|
3245
|
+
availableAmount: BN;
|
|
3133
3246
|
refererTokenStakeAccount: PublicKey;
|
|
3134
3247
|
refererBoosterAccount: PublicKey;
|
|
3135
3248
|
level: number;
|
|
@@ -3143,6 +3256,7 @@ export declare class PerpetualsClient {
|
|
|
3143
3256
|
rewardTokens: BN;
|
|
3144
3257
|
unclaimedRevenueAmount: BN;
|
|
3145
3258
|
revenueSnapshot: BN;
|
|
3259
|
+
claimableRebateUsd: BN;
|
|
3146
3260
|
tokenMint: PublicKey;
|
|
3147
3261
|
tokenVaultTokenAccount: PublicKey;
|
|
3148
3262
|
tokenPermissions: {
|
|
@@ -3225,7 +3339,7 @@ export declare class PerpetualsClient {
|
|
|
3225
3339
|
maxUtilization: number;
|
|
3226
3340
|
degenPositionFactor: number;
|
|
3227
3341
|
degenExposureFactor: number;
|
|
3228
|
-
|
|
3342
|
+
maxPositionSizeUsd: BN;
|
|
3229
3343
|
maxExposureUsd: BN;
|
|
3230
3344
|
};
|
|
3231
3345
|
permissions: {
|
|
@@ -3318,7 +3432,7 @@ export declare class PerpetualsClient {
|
|
|
3318
3432
|
reservedAmount: BN;
|
|
3319
3433
|
minReserveUsd: BN;
|
|
3320
3434
|
limitPriceBufferBps: BN;
|
|
3321
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3435
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3322
3436
|
owner: PublicKey;
|
|
3323
3437
|
stakeStats: {
|
|
3324
3438
|
pendingActivation: BN;
|
|
@@ -3352,7 +3466,7 @@ export declare class PerpetualsClient {
|
|
|
3352
3466
|
lockedAmount: BN;
|
|
3353
3467
|
lockedUsd: BN;
|
|
3354
3468
|
collateralAmount: BN;
|
|
3355
|
-
|
|
3469
|
+
collateralLiabilityUsd: BN;
|
|
3356
3470
|
unsettledFeeUsd: BN;
|
|
3357
3471
|
cumulativeLockFeeSnapshot: BN;
|
|
3358
3472
|
sizeDecimals: number;
|
|
@@ -3361,7 +3475,7 @@ export declare class PerpetualsClient {
|
|
|
3361
3475
|
};
|
|
3362
3476
|
targetCustodyUid: number;
|
|
3363
3477
|
collateralCustodyUid: number;
|
|
3364
|
-
padding2: number[] | BN[]
|
|
3478
|
+
padding2: number[] | BN[];
|
|
3365
3479
|
numSigners: number;
|
|
3366
3480
|
numSigned: number;
|
|
3367
3481
|
minSignatures: number;
|
|
@@ -3375,6 +3489,7 @@ export declare class PerpetualsClient {
|
|
|
3375
3489
|
conf: BN;
|
|
3376
3490
|
ema: BN;
|
|
3377
3491
|
publishTime: BN;
|
|
3492
|
+
extOracleAccount: PublicKey;
|
|
3378
3493
|
market: PublicKey;
|
|
3379
3494
|
limitOrders: unknown;
|
|
3380
3495
|
takeProfitOrders: unknown;
|
|
@@ -3417,7 +3532,7 @@ export declare class PerpetualsClient {
|
|
|
3417
3532
|
}[];
|
|
3418
3533
|
markets: PublicKey[];
|
|
3419
3534
|
maxAumUsd: BN;
|
|
3420
|
-
buffer: BN;
|
|
3535
|
+
buffer: number | BN;
|
|
3421
3536
|
rawAumUsd: BN;
|
|
3422
3537
|
equityUsd: BN;
|
|
3423
3538
|
totalStaked: {
|
|
@@ -3448,6 +3563,9 @@ export declare class PerpetualsClient {
|
|
|
3448
3563
|
lpPrice: BN;
|
|
3449
3564
|
compoundingLpPrice: BN;
|
|
3450
3565
|
lastUpdatedTimestamp: BN;
|
|
3566
|
+
feesObligationUsd: BN;
|
|
3567
|
+
rebateObligationUsd: BN;
|
|
3568
|
+
thresholdUsd: BN;
|
|
3451
3569
|
delegate: PublicKey;
|
|
3452
3570
|
openTime: BN;
|
|
3453
3571
|
updateTime: BN;
|
|
@@ -3461,15 +3579,22 @@ export declare class PerpetualsClient {
|
|
|
3461
3579
|
lockedUsd: BN;
|
|
3462
3580
|
collateralAmount: BN;
|
|
3463
3581
|
collateralUsd: BN;
|
|
3464
|
-
|
|
3582
|
+
unsettledValueUsd: BN;
|
|
3465
3583
|
unsettledFeesUsd: BN;
|
|
3466
3584
|
cumulativeLockFeeSnapshot: BN;
|
|
3467
3585
|
degenSizeUsd: BN;
|
|
3586
|
+
referencePrice: {
|
|
3587
|
+
price: BN;
|
|
3588
|
+
exponent: number;
|
|
3589
|
+
};
|
|
3468
3590
|
sizeDecimals: number;
|
|
3469
3591
|
lockedDecimals: number;
|
|
3470
3592
|
collateralDecimals: number;
|
|
3471
3593
|
key: PublicKey;
|
|
3472
3594
|
feeAmount: BN;
|
|
3595
|
+
allowPayout: boolean;
|
|
3596
|
+
availableUsd: BN;
|
|
3597
|
+
availableAmount: BN;
|
|
3473
3598
|
refererTokenStakeAccount: PublicKey;
|
|
3474
3599
|
refererBoosterAccount: PublicKey;
|
|
3475
3600
|
level: number;
|
|
@@ -3483,6 +3608,7 @@ export declare class PerpetualsClient {
|
|
|
3483
3608
|
rewardTokens: BN;
|
|
3484
3609
|
unclaimedRevenueAmount: BN;
|
|
3485
3610
|
revenueSnapshot: BN;
|
|
3611
|
+
claimableRebateUsd: BN;
|
|
3486
3612
|
tokenMint: PublicKey;
|
|
3487
3613
|
tokenVaultTokenAccount: PublicKey;
|
|
3488
3614
|
tokenPermissions: {
|
|
@@ -3565,7 +3691,7 @@ export declare class PerpetualsClient {
|
|
|
3565
3691
|
maxUtilization: number;
|
|
3566
3692
|
degenPositionFactor: number;
|
|
3567
3693
|
degenExposureFactor: number;
|
|
3568
|
-
|
|
3694
|
+
maxPositionSizeUsd: BN;
|
|
3569
3695
|
maxExposureUsd: BN;
|
|
3570
3696
|
};
|
|
3571
3697
|
permissions: {
|
|
@@ -3658,7 +3784,7 @@ export declare class PerpetualsClient {
|
|
|
3658
3784
|
reservedAmount: BN;
|
|
3659
3785
|
minReserveUsd: BN;
|
|
3660
3786
|
limitPriceBufferBps: BN;
|
|
3661
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3787
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3662
3788
|
owner: PublicKey;
|
|
3663
3789
|
stakeStats: {
|
|
3664
3790
|
pendingActivation: BN;
|
|
@@ -3692,7 +3818,7 @@ export declare class PerpetualsClient {
|
|
|
3692
3818
|
lockedAmount: BN;
|
|
3693
3819
|
lockedUsd: BN;
|
|
3694
3820
|
collateralAmount: BN;
|
|
3695
|
-
|
|
3821
|
+
collateralLiabilityUsd: BN;
|
|
3696
3822
|
unsettledFeeUsd: BN;
|
|
3697
3823
|
cumulativeLockFeeSnapshot: BN;
|
|
3698
3824
|
sizeDecimals: number;
|
|
@@ -3701,7 +3827,7 @@ export declare class PerpetualsClient {
|
|
|
3701
3827
|
};
|
|
3702
3828
|
targetCustodyUid: number;
|
|
3703
3829
|
collateralCustodyUid: number;
|
|
3704
|
-
padding2: number[] | BN[]
|
|
3830
|
+
padding2: number[] | BN[];
|
|
3705
3831
|
numSigners: number;
|
|
3706
3832
|
numSigned: number;
|
|
3707
3833
|
minSignatures: number;
|
|
@@ -3715,6 +3841,7 @@ export declare class PerpetualsClient {
|
|
|
3715
3841
|
conf: BN;
|
|
3716
3842
|
ema: BN;
|
|
3717
3843
|
publishTime: BN;
|
|
3844
|
+
extOracleAccount: PublicKey;
|
|
3718
3845
|
market: PublicKey;
|
|
3719
3846
|
limitOrders: unknown;
|
|
3720
3847
|
takeProfitOrders: unknown;
|
|
@@ -3757,7 +3884,7 @@ export declare class PerpetualsClient {
|
|
|
3757
3884
|
}[];
|
|
3758
3885
|
markets: PublicKey[];
|
|
3759
3886
|
maxAumUsd: BN;
|
|
3760
|
-
buffer: BN;
|
|
3887
|
+
buffer: number | BN;
|
|
3761
3888
|
rawAumUsd: BN;
|
|
3762
3889
|
equityUsd: BN;
|
|
3763
3890
|
totalStaked: {
|
|
@@ -3788,6 +3915,9 @@ export declare class PerpetualsClient {
|
|
|
3788
3915
|
lpPrice: BN;
|
|
3789
3916
|
compoundingLpPrice: BN;
|
|
3790
3917
|
lastUpdatedTimestamp: BN;
|
|
3918
|
+
feesObligationUsd: BN;
|
|
3919
|
+
rebateObligationUsd: BN;
|
|
3920
|
+
thresholdUsd: BN;
|
|
3791
3921
|
delegate: PublicKey;
|
|
3792
3922
|
openTime: BN;
|
|
3793
3923
|
updateTime: BN;
|
|
@@ -3801,15 +3931,22 @@ export declare class PerpetualsClient {
|
|
|
3801
3931
|
lockedUsd: BN;
|
|
3802
3932
|
collateralAmount: BN;
|
|
3803
3933
|
collateralUsd: BN;
|
|
3804
|
-
|
|
3934
|
+
unsettledValueUsd: BN;
|
|
3805
3935
|
unsettledFeesUsd: BN;
|
|
3806
3936
|
cumulativeLockFeeSnapshot: BN;
|
|
3807
3937
|
degenSizeUsd: BN;
|
|
3938
|
+
referencePrice: {
|
|
3939
|
+
price: BN;
|
|
3940
|
+
exponent: number;
|
|
3941
|
+
};
|
|
3808
3942
|
sizeDecimals: number;
|
|
3809
3943
|
lockedDecimals: number;
|
|
3810
3944
|
collateralDecimals: number;
|
|
3811
3945
|
key: PublicKey;
|
|
3812
3946
|
feeAmount: BN;
|
|
3947
|
+
allowPayout: boolean;
|
|
3948
|
+
availableUsd: BN;
|
|
3949
|
+
availableAmount: BN;
|
|
3813
3950
|
refererTokenStakeAccount: PublicKey;
|
|
3814
3951
|
refererBoosterAccount: PublicKey;
|
|
3815
3952
|
level: number;
|
|
@@ -3823,6 +3960,7 @@ export declare class PerpetualsClient {
|
|
|
3823
3960
|
rewardTokens: BN;
|
|
3824
3961
|
unclaimedRevenueAmount: BN;
|
|
3825
3962
|
revenueSnapshot: BN;
|
|
3963
|
+
claimableRebateUsd: BN;
|
|
3826
3964
|
tokenMint: PublicKey;
|
|
3827
3965
|
tokenVaultTokenAccount: PublicKey;
|
|
3828
3966
|
tokenPermissions: {
|
|
@@ -3905,7 +4043,7 @@ export declare class PerpetualsClient {
|
|
|
3905
4043
|
maxUtilization: number;
|
|
3906
4044
|
degenPositionFactor: number;
|
|
3907
4045
|
degenExposureFactor: number;
|
|
3908
|
-
|
|
4046
|
+
maxPositionSizeUsd: BN;
|
|
3909
4047
|
maxExposureUsd: BN;
|
|
3910
4048
|
};
|
|
3911
4049
|
permissions: {
|
|
@@ -3998,7 +4136,7 @@ export declare class PerpetualsClient {
|
|
|
3998
4136
|
reservedAmount: BN;
|
|
3999
4137
|
minReserveUsd: BN;
|
|
4000
4138
|
limitPriceBufferBps: BN;
|
|
4001
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
4139
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4002
4140
|
owner: PublicKey;
|
|
4003
4141
|
stakeStats: {
|
|
4004
4142
|
pendingActivation: BN;
|
|
@@ -4032,7 +4170,7 @@ export declare class PerpetualsClient {
|
|
|
4032
4170
|
lockedAmount: BN;
|
|
4033
4171
|
lockedUsd: BN;
|
|
4034
4172
|
collateralAmount: BN;
|
|
4035
|
-
|
|
4173
|
+
collateralLiabilityUsd: BN;
|
|
4036
4174
|
unsettledFeeUsd: BN;
|
|
4037
4175
|
cumulativeLockFeeSnapshot: BN;
|
|
4038
4176
|
sizeDecimals: number;
|
|
@@ -4041,7 +4179,7 @@ export declare class PerpetualsClient {
|
|
|
4041
4179
|
};
|
|
4042
4180
|
targetCustodyUid: number;
|
|
4043
4181
|
collateralCustodyUid: number;
|
|
4044
|
-
padding2: number[] | BN[]
|
|
4182
|
+
padding2: number[] | BN[];
|
|
4045
4183
|
numSigners: number;
|
|
4046
4184
|
numSigned: number;
|
|
4047
4185
|
minSignatures: number;
|
|
@@ -4055,6 +4193,7 @@ export declare class PerpetualsClient {
|
|
|
4055
4193
|
conf: BN;
|
|
4056
4194
|
ema: BN;
|
|
4057
4195
|
publishTime: BN;
|
|
4196
|
+
extOracleAccount: PublicKey;
|
|
4058
4197
|
market: PublicKey;
|
|
4059
4198
|
limitOrders: unknown;
|
|
4060
4199
|
takeProfitOrders: unknown;
|
|
@@ -4097,7 +4236,7 @@ export declare class PerpetualsClient {
|
|
|
4097
4236
|
}[];
|
|
4098
4237
|
markets: PublicKey[];
|
|
4099
4238
|
maxAumUsd: BN;
|
|
4100
|
-
buffer: BN;
|
|
4239
|
+
buffer: number | BN;
|
|
4101
4240
|
rawAumUsd: BN;
|
|
4102
4241
|
equityUsd: BN;
|
|
4103
4242
|
totalStaked: {
|
|
@@ -4128,6 +4267,9 @@ export declare class PerpetualsClient {
|
|
|
4128
4267
|
lpPrice: BN;
|
|
4129
4268
|
compoundingLpPrice: BN;
|
|
4130
4269
|
lastUpdatedTimestamp: BN;
|
|
4270
|
+
feesObligationUsd: BN;
|
|
4271
|
+
rebateObligationUsd: BN;
|
|
4272
|
+
thresholdUsd: BN;
|
|
4131
4273
|
delegate: PublicKey;
|
|
4132
4274
|
openTime: BN;
|
|
4133
4275
|
updateTime: BN;
|
|
@@ -4141,15 +4283,22 @@ export declare class PerpetualsClient {
|
|
|
4141
4283
|
lockedUsd: BN;
|
|
4142
4284
|
collateralAmount: BN;
|
|
4143
4285
|
collateralUsd: BN;
|
|
4144
|
-
|
|
4286
|
+
unsettledValueUsd: BN;
|
|
4145
4287
|
unsettledFeesUsd: BN;
|
|
4146
4288
|
cumulativeLockFeeSnapshot: BN;
|
|
4147
4289
|
degenSizeUsd: BN;
|
|
4290
|
+
referencePrice: {
|
|
4291
|
+
price: BN;
|
|
4292
|
+
exponent: number;
|
|
4293
|
+
};
|
|
4148
4294
|
sizeDecimals: number;
|
|
4149
4295
|
lockedDecimals: number;
|
|
4150
4296
|
collateralDecimals: number;
|
|
4151
4297
|
key: PublicKey;
|
|
4152
4298
|
feeAmount: BN;
|
|
4299
|
+
allowPayout: boolean;
|
|
4300
|
+
availableUsd: BN;
|
|
4301
|
+
availableAmount: BN;
|
|
4153
4302
|
refererTokenStakeAccount: PublicKey;
|
|
4154
4303
|
refererBoosterAccount: PublicKey;
|
|
4155
4304
|
level: number;
|
|
@@ -4163,6 +4312,7 @@ export declare class PerpetualsClient {
|
|
|
4163
4312
|
rewardTokens: BN;
|
|
4164
4313
|
unclaimedRevenueAmount: BN;
|
|
4165
4314
|
revenueSnapshot: BN;
|
|
4315
|
+
claimableRebateUsd: BN;
|
|
4166
4316
|
tokenMint: PublicKey;
|
|
4167
4317
|
tokenVaultTokenAccount: PublicKey;
|
|
4168
4318
|
tokenPermissions: {
|
|
@@ -4245,7 +4395,7 @@ export declare class PerpetualsClient {
|
|
|
4245
4395
|
maxUtilization: number;
|
|
4246
4396
|
degenPositionFactor: number;
|
|
4247
4397
|
degenExposureFactor: number;
|
|
4248
|
-
|
|
4398
|
+
maxPositionSizeUsd: BN;
|
|
4249
4399
|
maxExposureUsd: BN;
|
|
4250
4400
|
};
|
|
4251
4401
|
permissions: {
|
|
@@ -4338,7 +4488,7 @@ export declare class PerpetualsClient {
|
|
|
4338
4488
|
reservedAmount: BN;
|
|
4339
4489
|
minReserveUsd: BN;
|
|
4340
4490
|
limitPriceBufferBps: BN;
|
|
4341
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
4491
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4342
4492
|
owner: PublicKey;
|
|
4343
4493
|
stakeStats: {
|
|
4344
4494
|
pendingActivation: BN;
|
|
@@ -4372,7 +4522,7 @@ export declare class PerpetualsClient {
|
|
|
4372
4522
|
lockedAmount: BN;
|
|
4373
4523
|
lockedUsd: BN;
|
|
4374
4524
|
collateralAmount: BN;
|
|
4375
|
-
|
|
4525
|
+
collateralLiabilityUsd: BN;
|
|
4376
4526
|
unsettledFeeUsd: BN;
|
|
4377
4527
|
cumulativeLockFeeSnapshot: BN;
|
|
4378
4528
|
sizeDecimals: number;
|
|
@@ -4381,7 +4531,7 @@ export declare class PerpetualsClient {
|
|
|
4381
4531
|
};
|
|
4382
4532
|
targetCustodyUid: number;
|
|
4383
4533
|
collateralCustodyUid: number;
|
|
4384
|
-
padding2: number[] | BN[]
|
|
4534
|
+
padding2: number[] | BN[];
|
|
4385
4535
|
numSigners: number;
|
|
4386
4536
|
numSigned: number;
|
|
4387
4537
|
minSignatures: number;
|
|
@@ -4395,6 +4545,7 @@ export declare class PerpetualsClient {
|
|
|
4395
4545
|
conf: BN;
|
|
4396
4546
|
ema: BN;
|
|
4397
4547
|
publishTime: BN;
|
|
4548
|
+
extOracleAccount: PublicKey;
|
|
4398
4549
|
market: PublicKey;
|
|
4399
4550
|
limitOrders: unknown;
|
|
4400
4551
|
takeProfitOrders: unknown;
|
|
@@ -4437,7 +4588,7 @@ export declare class PerpetualsClient {
|
|
|
4437
4588
|
}[];
|
|
4438
4589
|
markets: PublicKey[];
|
|
4439
4590
|
maxAumUsd: BN;
|
|
4440
|
-
buffer: BN;
|
|
4591
|
+
buffer: number | BN;
|
|
4441
4592
|
rawAumUsd: BN;
|
|
4442
4593
|
equityUsd: BN;
|
|
4443
4594
|
totalStaked: {
|
|
@@ -4468,6 +4619,9 @@ export declare class PerpetualsClient {
|
|
|
4468
4619
|
lpPrice: BN;
|
|
4469
4620
|
compoundingLpPrice: BN;
|
|
4470
4621
|
lastUpdatedTimestamp: BN;
|
|
4622
|
+
feesObligationUsd: BN;
|
|
4623
|
+
rebateObligationUsd: BN;
|
|
4624
|
+
thresholdUsd: BN;
|
|
4471
4625
|
delegate: PublicKey;
|
|
4472
4626
|
openTime: BN;
|
|
4473
4627
|
updateTime: BN;
|
|
@@ -4481,15 +4635,22 @@ export declare class PerpetualsClient {
|
|
|
4481
4635
|
lockedUsd: BN;
|
|
4482
4636
|
collateralAmount: BN;
|
|
4483
4637
|
collateralUsd: BN;
|
|
4484
|
-
|
|
4638
|
+
unsettledValueUsd: BN;
|
|
4485
4639
|
unsettledFeesUsd: BN;
|
|
4486
4640
|
cumulativeLockFeeSnapshot: BN;
|
|
4487
4641
|
degenSizeUsd: BN;
|
|
4642
|
+
referencePrice: {
|
|
4643
|
+
price: BN;
|
|
4644
|
+
exponent: number;
|
|
4645
|
+
};
|
|
4488
4646
|
sizeDecimals: number;
|
|
4489
4647
|
lockedDecimals: number;
|
|
4490
4648
|
collateralDecimals: number;
|
|
4491
4649
|
key: PublicKey;
|
|
4492
4650
|
feeAmount: BN;
|
|
4651
|
+
allowPayout: boolean;
|
|
4652
|
+
availableUsd: BN;
|
|
4653
|
+
availableAmount: BN;
|
|
4493
4654
|
refererTokenStakeAccount: PublicKey;
|
|
4494
4655
|
refererBoosterAccount: PublicKey;
|
|
4495
4656
|
level: number;
|
|
@@ -4503,6 +4664,7 @@ export declare class PerpetualsClient {
|
|
|
4503
4664
|
rewardTokens: BN;
|
|
4504
4665
|
unclaimedRevenueAmount: BN;
|
|
4505
4666
|
revenueSnapshot: BN;
|
|
4667
|
+
claimableRebateUsd: BN;
|
|
4506
4668
|
tokenMint: PublicKey;
|
|
4507
4669
|
tokenVaultTokenAccount: PublicKey;
|
|
4508
4670
|
tokenPermissions: {
|
|
@@ -4563,10 +4725,12 @@ export declare class PerpetualsClient {
|
|
|
4563
4725
|
min: OraclePrice;
|
|
4564
4726
|
max: OraclePrice;
|
|
4565
4727
|
};
|
|
4728
|
+
getMinAndMaxPriceSync: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount) => MinAndMaxPrice;
|
|
4566
4729
|
checkIfPriceStaleOrCustom: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount, timestampInSeconds: BN) => boolean;
|
|
4567
4730
|
getAveragePriceSync: (price1: BN, size1: BN, price2: BN, size2: BN) => BN;
|
|
4568
|
-
|
|
4569
|
-
|
|
4731
|
+
getLeverageContractHelper: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, isInitial: boolean, poolConfig: PoolConfig) => BN;
|
|
4732
|
+
getLeverageSync: (positionAccount: PositionAccount, finalCollateralUsd: BN, finalSizeUsd: BN, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, isInitial: boolean, poolConfig: PoolConfig) => BN;
|
|
4733
|
+
getLeverageAtAmountEntryWithSwapSync: (positionAccount: PositionAccount | null, inputDeltaAmount: BN, sizeDeltaAmount: BN, side: Side, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, swapOutTokenPrice: OraclePrice, swapOutTokenEmaPrice: OraclePrice, swapOutTokenCustodyAccount: CustodyAccount, collateralTokenPrice: OraclePrice, collateralTokenEmaPrice: OraclePrice, collateralTokenCustodyAccount: CustodyAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetTokenCustodyAccount: CustodyAccount, swapPoolAumUsdMax: BN, poolConfig: PoolConfig, pnlUsd: BN) => BN;
|
|
4570
4734
|
getEntryPriceAndFeeSyncV2: (positionAccount: PositionAccount | null, marketCorrelation: boolean, collateralDeltaAmount: BN, sizeDeltaAmount: BN, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, discountBps?: BN, enableLogs?: boolean) => EntryPriceAndFeeV2;
|
|
4571
4735
|
getEntryPriceUsdSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
|
4572
4736
|
getPriceAfterSlippage(isEntry: boolean, slippageBps: BN, targetPrice: OraclePrice, side: Side): ContractOraclePrice;
|
|
@@ -4577,29 +4741,37 @@ export declare class PerpetualsClient {
|
|
|
4577
4741
|
getExitPriceAndFeeSync: (positionAccount: PositionAccount, marketCorrelation: boolean, collateralDeltaAmount: BN, sizeDeltaAmount: BN, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, discountBps?: BN) => ExitPriceAndFee;
|
|
4578
4742
|
getTradeSpread: (targetCustodyAccount: CustodyAccount, sizeUsd: BN) => BN;
|
|
4579
4743
|
getExitOraclePriceSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
|
4580
|
-
getExitOraclePriceWithoutSpreadSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
|
4581
4744
|
getSizeAmountFromLeverageAndCollateral: (collateralAmtWithFee: BN, leverage: string, marketToken: Token, collateralToken: Token, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, discountBps?: BN) => BN;
|
|
4582
|
-
getSizeAmountWithSwapSync: (amountIn: BN, leverage: string, side: Side, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, collateralTokenPrice: OraclePrice, collateralTokenEmaPrice: OraclePrice, collateralTokenCustodyAccount: CustodyAccount, swapOutTokenPrice: OraclePrice, swapOutTokenEmaPrice: OraclePrice, swapOutTokenCustodyAccount: CustodyAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetTokenCustodyAccount: CustodyAccount, swapPoolAumUsdMax: BN,
|
|
4745
|
+
getSizeAmountWithSwapSync: (amountIn: BN, leverage: string, side: Side, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, collateralTokenPrice: OraclePrice, collateralTokenEmaPrice: OraclePrice, collateralTokenCustodyAccount: CustodyAccount, swapOutTokenPrice: OraclePrice, swapOutTokenEmaPrice: OraclePrice, swapOutTokenCustodyAccount: CustodyAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetTokenCustodyAccount: CustodyAccount, swapPoolAumUsdMax: BN, poolConfig: PoolConfig, discountBps?: BN) => BN;
|
|
4583
4746
|
getCollateralAmountWithFeeFromLeverageAndSize: (sizeAmount: BN, leverage: string, marketToken: Token, collateralToken: Token, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, discountBps?: BN) => BN;
|
|
4584
|
-
getCollateralAmountWithSwapSync: (sizeAmount: BN, leverage: string, side: Side, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, swapOutTokenPrice: OraclePrice, swapOutTokenEmaPrice: OraclePrice, swapOutTokenCustodyAccount: CustodyAccount, collateralTokenPrice: OraclePrice, collateralTokenEmaPrice: OraclePrice, collateralTokenCustodyAccount: CustodyAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetTokenCustodyAccount: CustodyAccount, swapPoolAumUsdMax: BN,
|
|
4585
|
-
getDecreaseSizeCollateralAndFeeSync: (positionAccount: PositionAccount, marketCorrelation: boolean, sizeDeltaUsd: BN, keepLevSame: boolean, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, marketConfig: MarketConfig, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, side: Side, poolConfig: PoolConfig, discountBps?: BN, debugLogs?: boolean) => RemoveCollateralData;
|
|
4586
|
-
getMaxWithdrawableAmountSyncInternal: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig,
|
|
4747
|
+
getCollateralAmountWithSwapSync: (sizeAmount: BN, leverage: string, side: Side, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, swapOutTokenPrice: OraclePrice, swapOutTokenEmaPrice: OraclePrice, swapOutTokenCustodyAccount: CustodyAccount, collateralTokenPrice: OraclePrice, collateralTokenEmaPrice: OraclePrice, collateralTokenCustodyAccount: CustodyAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetTokenCustodyAccount: CustodyAccount, swapPoolAumUsdMax: BN, poolConfig: PoolConfig) => BN;
|
|
4748
|
+
getDecreaseSizeCollateralAndFeeSync: (positionAccount: PositionAccount, marketCorrelation: boolean, maxPayOffBps: BN, sizeDeltaUsd: BN, keepLevSame: boolean, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, marketConfig: MarketConfig, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, side: Side, poolConfig: PoolConfig, discountBps?: BN, debugLogs?: boolean) => RemoveCollateralData;
|
|
4749
|
+
getMaxWithdrawableAmountSyncInternal: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => {
|
|
4587
4750
|
maxWithdrawableAmount: BN;
|
|
4588
|
-
|
|
4751
|
+
maxWithdrawableAmountUsd: BN;
|
|
4752
|
+
diffUsd: BN;
|
|
4753
|
+
};
|
|
4754
|
+
getFinalCloseAmountUsdSync: (positionAccount: PositionAccount, marketCorrelation: boolean, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig) => {
|
|
4755
|
+
closeAmountUsd: BN;
|
|
4756
|
+
feesAmountUsd: BN;
|
|
4589
4757
|
};
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4758
|
+
getMaxAddableCollateralSync: (positionAccount: PositionAccount, targetCustodyAccount: CustodyAccount, collateralCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, errorBandwidthPercentageUi?: number) => {
|
|
4759
|
+
maxAddableAmount: BN;
|
|
4760
|
+
maxAddableAmountUsd: BN;
|
|
4761
|
+
};
|
|
4762
|
+
getMaxWithdrawableAmountSync: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => {
|
|
4763
|
+
maxWithdrawableAmount: BN;
|
|
4764
|
+
maxWithdrawableAmountUsd: BN;
|
|
4593
4765
|
};
|
|
4594
|
-
getMaxWithdrawableAmountSync: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => BN;
|
|
4595
4766
|
getCumulativeLockFeeSync: (custodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
|
4596
4767
|
getBorrowRateSync: (custodyAccount: CustodyAccount, currentUtilization: BN) => BN;
|
|
4597
4768
|
getLockFeeAndUnsettledUsdForPosition: (position: PositionAccount, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
|
4598
|
-
getLockedUsd: (
|
|
4599
|
-
|
|
4600
|
-
|
|
4601
|
-
|
|
4602
|
-
|
|
4769
|
+
getLockedUsd: (sizeUsd: BN, collateralUsd: BN, side: Side, marketCorrelation: boolean, maxPayOffBps: BN) => BN;
|
|
4770
|
+
getLiquidationPriceContractHelper: (entryOraclePrice: OraclePrice, lockAndUnsettledFeeUsd: BN, side: Side, targetCustodyAccount: CustodyAccount, positionAccount: PositionAccount) => OraclePrice;
|
|
4771
|
+
getLiquidationPriceSync: (collateralUsd: BN, sizeAmount: BN, entryOraclePrice: OraclePrice, lockAndUnsettledFeeUsd: BN, side: Side, targetPrice: OraclePrice, targetCustodyAccount: CustodyAccount, positionAccount: PositionAccount) => OraclePrice;
|
|
4772
|
+
getLiquidationPriceWithOrder: (collateralUsd: BN, sizeAmount: BN, sizeUsd: BN, sizeDecimals: number, limitOraclePrice: OraclePrice, side: Side, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
|
4773
|
+
getMaxProfitPriceSync: (entryPrice: OraclePrice, marketCorrelation: boolean, side: Side, collateralPrice: OraclePrice, positionAccount: PositionAccount) => OraclePrice;
|
|
4774
|
+
getEstimateProfitLossforTpSlEntry: (positionAccount: PositionAccount | null, isTakeProfit: boolean, userEntrytpSlOraclePrice: OraclePrice, collateralDeltaAmount: BN, sizeDeltaAmount: BN, side: Side, marketCorrelation: boolean, maxPayOffBps: BN, marketAccountPk: PublicKey, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, poolConfig: PoolConfig) => {
|
|
4603
4775
|
pnlUsd: BN;
|
|
4604
4776
|
pnlPercentage: BN;
|
|
4605
4777
|
};
|
|
@@ -4609,6 +4781,10 @@ export declare class PerpetualsClient {
|
|
|
4609
4781
|
profitUsd: BN;
|
|
4610
4782
|
lossUsd: BN;
|
|
4611
4783
|
};
|
|
4784
|
+
getPnlContractHelper: (positionAccount: PositionAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, delay: BN, poolConfig: PoolConfig) => {
|
|
4785
|
+
profitUsd: BN;
|
|
4786
|
+
lossUsd: BN;
|
|
4787
|
+
};
|
|
4612
4788
|
getSwapAmountAndFeesSync: (amountIn: BN, amountOut: BN, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, outputTokenPrice: OraclePrice, outputTokenEmaPrice: OraclePrice, outputTokenCustodyAccount: CustodyAccount, poolAumUsdMax: BN, poolConfig: PoolConfig) => {
|
|
4613
4789
|
minAmountOut: BN;
|
|
4614
4790
|
minAmountIn: BN;
|
|
@@ -4619,8 +4795,9 @@ export declare class PerpetualsClient {
|
|
|
4619
4795
|
poolAmountUsd: BN;
|
|
4620
4796
|
poolEquityUsd: BN;
|
|
4621
4797
|
};
|
|
4622
|
-
|
|
4623
|
-
|
|
4798
|
+
getAssetsUnderManagementUsdContractHelper: (poolAccount: PoolAccount, tokenPrices: OraclePrice[], tokenEmaPrices: OraclePrice[], custodies: CustodyAccount[], markets: MarketAccount[], aumCalcMode: "includePnl" | "excludePnl", currentTime: BN, poolConfig: PoolConfig) => {
|
|
4799
|
+
poolAmountUsd: BN;
|
|
4800
|
+
poolEquityUsd: BN;
|
|
4624
4801
|
};
|
|
4625
4802
|
getFeeDiscount: (perpetualsAccount: PerpetualsAccount, tokenStakeAccount: TokenStake, currentTime: BN) => {
|
|
4626
4803
|
discountBn: BN;
|
|
@@ -4630,12 +4807,14 @@ export declare class PerpetualsClient {
|
|
|
4630
4807
|
getStakedLpTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4631
4808
|
getAssetsUnderManagement: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4632
4809
|
getAddLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
4633
|
-
amount: BN;
|
|
4634
|
-
fee: BN;
|
|
4810
|
+
amount: BN | undefined;
|
|
4811
|
+
fee: BN | undefined;
|
|
4812
|
+
error?: string;
|
|
4635
4813
|
}>;
|
|
4636
4814
|
getRemoveLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, removeTokenCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
4637
4815
|
amount: BN;
|
|
4638
4816
|
fee: BN;
|
|
4817
|
+
error?: string;
|
|
4639
4818
|
}>;
|
|
4640
4819
|
getCompoundingLPTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4641
4820
|
getAddCompoundingLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
@@ -4650,19 +4829,19 @@ export declare class PerpetualsClient {
|
|
|
4650
4829
|
getLiquidationStateView: (positionAccount: PublicKey, poolName: string, tokenMint: PublicKey, collateralMint: PublicKey, poolConfig: PoolConfig) => Promise<any>;
|
|
4651
4830
|
getCompoundingTokenDataView: (poolConfig: PoolConfig) => Promise<any>;
|
|
4652
4831
|
getLpTokenPriceView: (poolConfig: PoolConfig) => Promise<any>;
|
|
4653
|
-
openPosition: (targetSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, collateralWithfee: BN, size: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey,
|
|
4832
|
+
openPosition: (targetSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, collateralWithfee: BN, size: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4654
4833
|
instructions: TransactionInstruction[];
|
|
4655
4834
|
additionalSigners: Signer[];
|
|
4656
4835
|
}>;
|
|
4657
|
-
closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey,
|
|
4836
|
+
closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4658
4837
|
instructions: TransactionInstruction[];
|
|
4659
4838
|
additionalSigners: Signer[];
|
|
4660
4839
|
}>;
|
|
4661
|
-
swapAndOpen: (targetTokenSymbol: string, collateralTokenSymbol: string, userInputTokenSymbol: string, amountIn: BN,
|
|
4840
|
+
swapAndOpen: (targetTokenSymbol: string, collateralTokenSymbol: string, userInputTokenSymbol: string, amountIn: BN, priceWithSlippage: ContractOraclePrice, sizeAmount: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4662
4841
|
instructions: TransactionInstruction[];
|
|
4663
4842
|
additionalSigners: Signer[];
|
|
4664
4843
|
}>;
|
|
4665
|
-
closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string,
|
|
4844
|
+
closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, ephemeralSignerPubkey?: any) => Promise<{
|
|
4666
4845
|
instructions: TransactionInstruction[];
|
|
4667
4846
|
additionalSigners: Signer[];
|
|
4668
4847
|
}>;
|
|
@@ -4670,23 +4849,23 @@ export declare class PerpetualsClient {
|
|
|
4670
4849
|
instructions: TransactionInstruction[];
|
|
4671
4850
|
additionalSigners: Signer[];
|
|
4672
4851
|
}>;
|
|
4673
|
-
swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN,
|
|
4852
|
+
swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4674
4853
|
instructions: TransactionInstruction[];
|
|
4675
4854
|
additionalSigners: Signer[];
|
|
4676
4855
|
}>;
|
|
4677
|
-
removeCollateral: (
|
|
4856
|
+
removeCollateral: (collateralDeltaUsd: BN, marketSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4678
4857
|
instructions: TransactionInstruction[];
|
|
4679
4858
|
additionalSigners: Signer[];
|
|
4680
4859
|
}>;
|
|
4681
|
-
removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string,
|
|
4860
|
+
removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string, collateralDeltaUsd: BN, side: Side, poolConfig: PoolConfig, ephemeralSignerPubkey?: any) => Promise<{
|
|
4682
4861
|
instructions: TransactionInstruction[];
|
|
4683
4862
|
additionalSigners: Signer[];
|
|
4684
4863
|
}>;
|
|
4685
|
-
increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4864
|
+
increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4686
4865
|
instructions: TransactionInstruction[];
|
|
4687
4866
|
additionalSigners: Signer[];
|
|
4688
4867
|
}>;
|
|
4689
|
-
decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4868
|
+
decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4690
4869
|
instructions: TransactionInstruction[];
|
|
4691
4870
|
additionalSigners: Signer[];
|
|
4692
4871
|
}>;
|
|
@@ -4706,14 +4885,6 @@ export declare class PerpetualsClient {
|
|
|
4706
4885
|
instructions: TransactionInstruction[];
|
|
4707
4886
|
additionalSigners: Signer[];
|
|
4708
4887
|
}>;
|
|
4709
|
-
updateNftAccount: (nftMint: PublicKey, updateReferer: boolean, updateBooster: boolean, flpStakeAccounts: PublicKey[]) => Promise<{
|
|
4710
|
-
instructions: TransactionInstruction[];
|
|
4711
|
-
additionalSigners: Signer[];
|
|
4712
|
-
}>;
|
|
4713
|
-
levelUp: (poolConfig: PoolConfig, nftMint: PublicKey, authorizationRulesAccount: PublicKey) => Promise<{
|
|
4714
|
-
instructions: TransactionInstruction[];
|
|
4715
|
-
additionalSigners: Signer[];
|
|
4716
|
-
}>;
|
|
4717
4888
|
depositStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
4718
4889
|
instructions: TransactionInstruction[];
|
|
4719
4890
|
additionalSigners: Signer[];
|
|
@@ -4757,14 +4928,6 @@ export declare class PerpetualsClient {
|
|
|
4757
4928
|
instructions: TransactionInstruction[];
|
|
4758
4929
|
additionalSigners: Signer[];
|
|
4759
4930
|
}>;
|
|
4760
|
-
burnAndClaim: (owner: PublicKey, nftMint: PublicKey, poolConfig: PoolConfig, createAta: boolean) => Promise<{
|
|
4761
|
-
instructions: TransactionInstruction[];
|
|
4762
|
-
additionalSigners: Signer[];
|
|
4763
|
-
}>;
|
|
4764
|
-
burnAndStake: (owner: PublicKey, feePayer: PublicKey, nftMint: PublicKey, poolConfig: PoolConfig) => Promise<{
|
|
4765
|
-
instructions: TransactionInstruction[];
|
|
4766
|
-
additionalSigners: Signer[];
|
|
4767
|
-
}>;
|
|
4768
4931
|
depositTokenStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
4769
4932
|
instructions: TransactionInstruction[];
|
|
4770
4933
|
additionalSigners: Signer[];
|
|
@@ -4793,19 +4956,11 @@ export declare class PerpetualsClient {
|
|
|
4793
4956
|
instructions: TransactionInstruction[];
|
|
4794
4957
|
additionalSigners: Signer[];
|
|
4795
4958
|
}>;
|
|
4796
|
-
|
|
4797
|
-
instructions: TransactionInstruction[];
|
|
4798
|
-
additionalSigners: Signer[];
|
|
4799
|
-
}>;
|
|
4800
|
-
distributeReward: (rewardAmount: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4801
|
-
instructions: TransactionInstruction[];
|
|
4802
|
-
additionalSigners: Signer[];
|
|
4803
|
-
}>;
|
|
4804
|
-
collectNftReward: (rewardSymbol: string, poolConfig: PoolConfig, nftMint: PublicKey, createUserATA?: boolean) => Promise<{
|
|
4959
|
+
collectRebate: (owner: PublicKey, rebateSymbol: string, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
|
|
4805
4960
|
instructions: TransactionInstruction[];
|
|
4806
4961
|
additionalSigners: Signer[];
|
|
4807
4962
|
}>;
|
|
4808
|
-
|
|
4963
|
+
settleRebates: (rebateSymbol: string, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4809
4964
|
instructions: TransactionInstruction[];
|
|
4810
4965
|
additionalSigners: Signer[];
|
|
4811
4966
|
}>;
|
|
@@ -4817,11 +4972,11 @@ export declare class PerpetualsClient {
|
|
|
4817
4972
|
instructions: TransactionInstruction[];
|
|
4818
4973
|
additionalSigners: Signer[];
|
|
4819
4974
|
}>;
|
|
4820
|
-
executeLimitOrder: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4975
|
+
executeLimitOrder: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4821
4976
|
instructions: TransactionInstruction[];
|
|
4822
4977
|
additionalSigners: Signer[];
|
|
4823
4978
|
}>;
|
|
4824
|
-
executeLimitWithSwap: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4979
|
+
executeLimitWithSwap: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4825
4980
|
instructions: TransactionInstruction[];
|
|
4826
4981
|
additionalSigners: Signer[];
|
|
4827
4982
|
}>;
|
|
@@ -4841,11 +4996,11 @@ export declare class PerpetualsClient {
|
|
|
4841
4996
|
instructions: TransactionInstruction[];
|
|
4842
4997
|
additionalSigners: Signer[];
|
|
4843
4998
|
}>;
|
|
4844
|
-
executeTriggerWithSwap: (owner: PublicKey, targetSymbol: string, collateralSymbol: string, receivingSymbol: string, side: Side, orderId: number, isStopLoss: boolean, privilege: Privilege, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4999
|
+
executeTriggerWithSwap: (owner: PublicKey, targetSymbol: string, collateralSymbol: string, receivingSymbol: string, side: Side, orderId: number, isStopLoss: boolean, privilege: Privilege, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4845
5000
|
instructions: TransactionInstruction[];
|
|
4846
5001
|
additionalSigners: Signer[];
|
|
4847
5002
|
}>;
|
|
4848
|
-
executeTriggerOrder: (owner: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, isStopLoss: boolean, privilege: Privilege, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
5003
|
+
executeTriggerOrder: (owner: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, isStopLoss: boolean, privilege: Privilege, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4849
5004
|
instructions: TransactionInstruction[];
|
|
4850
5005
|
additionalSigners: Signer[];
|
|
4851
5006
|
}>;
|
|
@@ -4890,11 +5045,11 @@ export declare class PerpetualsClient {
|
|
|
4890
5045
|
instructions: TransactionInstruction[];
|
|
4891
5046
|
additionalSigners: Signer[];
|
|
4892
5047
|
}>;
|
|
4893
|
-
setInternalOraclePrice: (tokenMint: PublicKey, price: BN, expo: number, conf: BN, ema: BN, publishTime: BN, poolConfig: PoolConfig) => Promise<{
|
|
5048
|
+
setInternalOraclePrice: (tokenMint: PublicKey, useCurrentTime: number, price: BN, expo: number, conf: BN, ema: BN, publishTime: BN, poolConfig: PoolConfig) => Promise<{
|
|
4894
5049
|
instructions: TransactionInstruction[];
|
|
4895
5050
|
additionalSigners: Signer[];
|
|
4896
5051
|
}>;
|
|
4897
|
-
setInternalOraclePriceBatch: (tokenMintList: PublicKey[], tokenInternalPrices: InternalPrice[], POOL_CONFIGS: PoolConfig[]) => Promise<{
|
|
5052
|
+
setInternalOraclePriceBatch: (useCurrentTime: number, tokenMintList: PublicKey[], tokenInternalPrices: InternalPrice[], POOL_CONFIGS: PoolConfig[]) => Promise<{
|
|
4898
5053
|
instructions: TransactionInstruction[];
|
|
4899
5054
|
additionalSigners: Signer[];
|
|
4900
5055
|
}>;
|
|
@@ -4926,10 +5081,18 @@ export declare class PerpetualsClient {
|
|
|
4926
5081
|
instructions: TransactionInstruction[];
|
|
4927
5082
|
additionalSigners: Signer[];
|
|
4928
5083
|
}>;
|
|
5084
|
+
withdrawUnclaimedTokens: (poolConfig: PoolConfig) => Promise<{
|
|
5085
|
+
instructions: TransactionInstruction[];
|
|
5086
|
+
additionalSigners: Signer[];
|
|
5087
|
+
}>;
|
|
4929
5088
|
initRevenueTokenAccount: (feeShareBps: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4930
5089
|
instructions: TransactionInstruction[];
|
|
4931
5090
|
additionalSigners: Signer[];
|
|
4932
5091
|
}>;
|
|
5092
|
+
initRebateVault: (allowRebatePayout: boolean, rebateSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
5093
|
+
instructions: TransactionInstruction[];
|
|
5094
|
+
additionalSigners: Signer[];
|
|
5095
|
+
}>;
|
|
4933
5096
|
distributeTokenReward: (amount: BN, epochCount: number, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4934
5097
|
instructions: TransactionInstruction[];
|
|
4935
5098
|
additionalSigners: Signer[];
|
|
@@ -4942,4 +5105,8 @@ export declare class PerpetualsClient {
|
|
|
4942
5105
|
instructions: TransactionInstruction[];
|
|
4943
5106
|
additionalSigners: Signer[];
|
|
4944
5107
|
}>;
|
|
5108
|
+
resizeInternalOracle: (extOracle: PublicKey, tokenMint: PublicKey, intOracleAccount: PublicKey) => Promise<{
|
|
5109
|
+
instructions: TransactionInstruction[];
|
|
5110
|
+
additionalSigners: Signer[];
|
|
5111
|
+
}>;
|
|
4945
5112
|
}
|