flash-sdk 9.0.0 → 9.0.1-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/PerpetualsClient.d.ts +294 -139
- package/dist/PerpetualsClient.js +635 -1023
- package/dist/PoolAccount.d.ts +3 -0
- package/dist/PoolConfig.d.ts +3 -1
- package/dist/PoolConfig.js +4 -2
- package/dist/PoolConfig.json +85 -3261
- package/dist/PositionAccount.d.ts +3 -2
- package/dist/TokenStakeAccount.d.ts +2 -2
- package/dist/TokenStakeAccount.js +2 -2
- package/dist/idl/perpetuals.d.ts +3040 -1712
- package/dist/idl/perpetuals.js +3040 -1712
- 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 +1 -2
- package/dist/types/index.js +3 -2
- package/dist/utils/getReferralAccounts.d.ts +1 -1
- package/dist/utils/getReferralAccounts.js +3 -8
- package/package.json +1 -1
- package/dist/TradingAccount.d.ts +0 -23
- package/dist/TradingAccount.js +0 -17
|
@@ -2,7 +2,7 @@ import { Program, AnchorProvider, BN } from "@coral-xyz/anchor";
|
|
|
2
2
|
import { PublicKey, TransactionInstruction, Commitment, Signer, AddressLookupTableAccount, VersionedTransaction } from "@solana/web3.js";
|
|
3
3
|
import { PoolAccount } from "./PoolAccount";
|
|
4
4
|
import { PositionAccount } from "./PositionAccount";
|
|
5
|
-
import { AddLiquidityAmountAndFee, InternalPrice, BorrowRateParams, ExitPriceAndFee, Fees, OracleParams, Permissions, PricingParams, RemoveCollateralData, RemoveLiquidityAmountAndFee, Side, TokenRatios, MinAndMaxPrice, FeesAction, ContractOraclePrice, Privilege, PerpetualsAccount,
|
|
5
|
+
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
6
|
import { OraclePrice } from "./OraclePrice";
|
|
7
7
|
import { CustodyAccount } from "./CustodyAccount";
|
|
8
8
|
import { Perpetuals } from "./idl/perpetuals";
|
|
@@ -109,7 +109,7 @@ export declare class PerpetualsClient {
|
|
|
109
109
|
maxUtilization: number;
|
|
110
110
|
degenPositionFactor: number;
|
|
111
111
|
degenExposureFactor: number;
|
|
112
|
-
|
|
112
|
+
maxPositionSizeUsd: BN;
|
|
113
113
|
maxExposureUsd: BN;
|
|
114
114
|
};
|
|
115
115
|
permissions: {
|
|
@@ -202,7 +202,7 @@ export declare class PerpetualsClient {
|
|
|
202
202
|
reservedAmount: BN;
|
|
203
203
|
minReserveUsd: BN;
|
|
204
204
|
limitPriceBufferBps: BN;
|
|
205
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
205
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
206
206
|
owner: PublicKey;
|
|
207
207
|
stakeStats: {
|
|
208
208
|
pendingActivation: BN;
|
|
@@ -236,7 +236,7 @@ export declare class PerpetualsClient {
|
|
|
236
236
|
lockedAmount: BN;
|
|
237
237
|
lockedUsd: BN;
|
|
238
238
|
collateralAmount: BN;
|
|
239
|
-
|
|
239
|
+
collateralLiabilityUsd: BN;
|
|
240
240
|
unsettledFeeUsd: BN;
|
|
241
241
|
cumulativeLockFeeSnapshot: BN;
|
|
242
242
|
sizeDecimals: number;
|
|
@@ -245,7 +245,7 @@ export declare class PerpetualsClient {
|
|
|
245
245
|
};
|
|
246
246
|
targetCustodyUid: number;
|
|
247
247
|
collateralCustodyUid: number;
|
|
248
|
-
padding2: number[] | BN[]
|
|
248
|
+
padding2: number[] | BN[];
|
|
249
249
|
numSigners: number;
|
|
250
250
|
numSigned: number;
|
|
251
251
|
minSignatures: number;
|
|
@@ -259,6 +259,7 @@ export declare class PerpetualsClient {
|
|
|
259
259
|
conf: BN;
|
|
260
260
|
ema: BN;
|
|
261
261
|
publishTime: BN;
|
|
262
|
+
extOracleAccount: PublicKey;
|
|
262
263
|
market: PublicKey;
|
|
263
264
|
limitOrders: unknown;
|
|
264
265
|
takeProfitOrders: unknown;
|
|
@@ -301,7 +302,7 @@ export declare class PerpetualsClient {
|
|
|
301
302
|
}[];
|
|
302
303
|
markets: PublicKey[];
|
|
303
304
|
maxAumUsd: BN;
|
|
304
|
-
buffer: BN;
|
|
305
|
+
buffer: number | BN;
|
|
305
306
|
rawAumUsd: BN;
|
|
306
307
|
equityUsd: BN;
|
|
307
308
|
totalStaked: {
|
|
@@ -332,6 +333,9 @@ export declare class PerpetualsClient {
|
|
|
332
333
|
lpPrice: BN;
|
|
333
334
|
compoundingLpPrice: BN;
|
|
334
335
|
lastUpdatedTimestamp: BN;
|
|
336
|
+
feesObligationUsd: BN;
|
|
337
|
+
rebateObligationUsd: BN;
|
|
338
|
+
thresholdUsd: BN;
|
|
335
339
|
delegate: PublicKey;
|
|
336
340
|
openTime: BN;
|
|
337
341
|
updateTime: BN;
|
|
@@ -345,15 +349,22 @@ export declare class PerpetualsClient {
|
|
|
345
349
|
lockedUsd: BN;
|
|
346
350
|
collateralAmount: BN;
|
|
347
351
|
collateralUsd: BN;
|
|
348
|
-
|
|
352
|
+
unsettledValueUsd: BN;
|
|
349
353
|
unsettledFeesUsd: BN;
|
|
350
354
|
cumulativeLockFeeSnapshot: BN;
|
|
351
355
|
degenSizeUsd: BN;
|
|
356
|
+
referencePrice: {
|
|
357
|
+
price: BN;
|
|
358
|
+
exponent: number;
|
|
359
|
+
};
|
|
352
360
|
sizeDecimals: number;
|
|
353
361
|
lockedDecimals: number;
|
|
354
362
|
collateralDecimals: number;
|
|
355
363
|
key: PublicKey;
|
|
356
364
|
feeAmount: BN;
|
|
365
|
+
allowPayout: boolean;
|
|
366
|
+
availableUsd: BN;
|
|
367
|
+
availableAmount: BN;
|
|
357
368
|
refererTokenStakeAccount: PublicKey;
|
|
358
369
|
refererBoosterAccount: PublicKey;
|
|
359
370
|
level: number;
|
|
@@ -367,6 +378,7 @@ export declare class PerpetualsClient {
|
|
|
367
378
|
rewardTokens: BN;
|
|
368
379
|
unclaimedRevenueAmount: BN;
|
|
369
380
|
revenueSnapshot: BN;
|
|
381
|
+
claimableRebateUsd: BN;
|
|
370
382
|
tokenMint: PublicKey;
|
|
371
383
|
tokenVaultTokenAccount: PublicKey;
|
|
372
384
|
tokenPermissions: {
|
|
@@ -450,7 +462,7 @@ export declare class PerpetualsClient {
|
|
|
450
462
|
maxUtilization: number;
|
|
451
463
|
degenPositionFactor: number;
|
|
452
464
|
degenExposureFactor: number;
|
|
453
|
-
|
|
465
|
+
maxPositionSizeUsd: BN;
|
|
454
466
|
maxExposureUsd: BN;
|
|
455
467
|
};
|
|
456
468
|
permissions: {
|
|
@@ -543,7 +555,7 @@ export declare class PerpetualsClient {
|
|
|
543
555
|
reservedAmount: BN;
|
|
544
556
|
minReserveUsd: BN;
|
|
545
557
|
limitPriceBufferBps: BN;
|
|
546
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
558
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
547
559
|
owner: PublicKey;
|
|
548
560
|
stakeStats: {
|
|
549
561
|
pendingActivation: BN;
|
|
@@ -577,7 +589,7 @@ export declare class PerpetualsClient {
|
|
|
577
589
|
lockedAmount: BN;
|
|
578
590
|
lockedUsd: BN;
|
|
579
591
|
collateralAmount: BN;
|
|
580
|
-
|
|
592
|
+
collateralLiabilityUsd: BN;
|
|
581
593
|
unsettledFeeUsd: BN;
|
|
582
594
|
cumulativeLockFeeSnapshot: BN;
|
|
583
595
|
sizeDecimals: number;
|
|
@@ -586,7 +598,7 @@ export declare class PerpetualsClient {
|
|
|
586
598
|
};
|
|
587
599
|
targetCustodyUid: number;
|
|
588
600
|
collateralCustodyUid: number;
|
|
589
|
-
padding2: number[] | BN[]
|
|
601
|
+
padding2: number[] | BN[];
|
|
590
602
|
numSigners: number;
|
|
591
603
|
numSigned: number;
|
|
592
604
|
minSignatures: number;
|
|
@@ -600,6 +612,7 @@ export declare class PerpetualsClient {
|
|
|
600
612
|
conf: BN;
|
|
601
613
|
ema: BN;
|
|
602
614
|
publishTime: BN;
|
|
615
|
+
extOracleAccount: PublicKey;
|
|
603
616
|
market: PublicKey;
|
|
604
617
|
limitOrders: unknown;
|
|
605
618
|
takeProfitOrders: unknown;
|
|
@@ -642,7 +655,7 @@ export declare class PerpetualsClient {
|
|
|
642
655
|
}[];
|
|
643
656
|
markets: PublicKey[];
|
|
644
657
|
maxAumUsd: BN;
|
|
645
|
-
buffer: BN;
|
|
658
|
+
buffer: number | BN;
|
|
646
659
|
rawAumUsd: BN;
|
|
647
660
|
equityUsd: BN;
|
|
648
661
|
totalStaked: {
|
|
@@ -673,6 +686,9 @@ export declare class PerpetualsClient {
|
|
|
673
686
|
lpPrice: BN;
|
|
674
687
|
compoundingLpPrice: BN;
|
|
675
688
|
lastUpdatedTimestamp: BN;
|
|
689
|
+
feesObligationUsd: BN;
|
|
690
|
+
rebateObligationUsd: BN;
|
|
691
|
+
thresholdUsd: BN;
|
|
676
692
|
delegate: PublicKey;
|
|
677
693
|
openTime: BN;
|
|
678
694
|
updateTime: BN;
|
|
@@ -686,15 +702,22 @@ export declare class PerpetualsClient {
|
|
|
686
702
|
lockedUsd: BN;
|
|
687
703
|
collateralAmount: BN;
|
|
688
704
|
collateralUsd: BN;
|
|
689
|
-
|
|
705
|
+
unsettledValueUsd: BN;
|
|
690
706
|
unsettledFeesUsd: BN;
|
|
691
707
|
cumulativeLockFeeSnapshot: BN;
|
|
692
708
|
degenSizeUsd: BN;
|
|
709
|
+
referencePrice: {
|
|
710
|
+
price: BN;
|
|
711
|
+
exponent: number;
|
|
712
|
+
};
|
|
693
713
|
sizeDecimals: number;
|
|
694
714
|
lockedDecimals: number;
|
|
695
715
|
collateralDecimals: number;
|
|
696
716
|
key: PublicKey;
|
|
697
717
|
feeAmount: BN;
|
|
718
|
+
allowPayout: boolean;
|
|
719
|
+
availableUsd: BN;
|
|
720
|
+
availableAmount: BN;
|
|
698
721
|
refererTokenStakeAccount: PublicKey;
|
|
699
722
|
refererBoosterAccount: PublicKey;
|
|
700
723
|
level: number;
|
|
@@ -708,6 +731,7 @@ export declare class PerpetualsClient {
|
|
|
708
731
|
rewardTokens: BN;
|
|
709
732
|
unclaimedRevenueAmount: BN;
|
|
710
733
|
revenueSnapshot: BN;
|
|
734
|
+
claimableRebateUsd: BN;
|
|
711
735
|
tokenMint: PublicKey;
|
|
712
736
|
tokenVaultTokenAccount: PublicKey;
|
|
713
737
|
tokenPermissions: {
|
|
@@ -790,7 +814,7 @@ export declare class PerpetualsClient {
|
|
|
790
814
|
maxUtilization: number;
|
|
791
815
|
degenPositionFactor: number;
|
|
792
816
|
degenExposureFactor: number;
|
|
793
|
-
|
|
817
|
+
maxPositionSizeUsd: BN;
|
|
794
818
|
maxExposureUsd: BN;
|
|
795
819
|
};
|
|
796
820
|
permissions: {
|
|
@@ -883,7 +907,7 @@ export declare class PerpetualsClient {
|
|
|
883
907
|
reservedAmount: BN;
|
|
884
908
|
minReserveUsd: BN;
|
|
885
909
|
limitPriceBufferBps: BN;
|
|
886
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
910
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
887
911
|
owner: PublicKey;
|
|
888
912
|
stakeStats: {
|
|
889
913
|
pendingActivation: BN;
|
|
@@ -917,7 +941,7 @@ export declare class PerpetualsClient {
|
|
|
917
941
|
lockedAmount: BN;
|
|
918
942
|
lockedUsd: BN;
|
|
919
943
|
collateralAmount: BN;
|
|
920
|
-
|
|
944
|
+
collateralLiabilityUsd: BN;
|
|
921
945
|
unsettledFeeUsd: BN;
|
|
922
946
|
cumulativeLockFeeSnapshot: BN;
|
|
923
947
|
sizeDecimals: number;
|
|
@@ -926,7 +950,7 @@ export declare class PerpetualsClient {
|
|
|
926
950
|
};
|
|
927
951
|
targetCustodyUid: number;
|
|
928
952
|
collateralCustodyUid: number;
|
|
929
|
-
padding2: number[] | BN[]
|
|
953
|
+
padding2: number[] | BN[];
|
|
930
954
|
numSigners: number;
|
|
931
955
|
numSigned: number;
|
|
932
956
|
minSignatures: number;
|
|
@@ -940,6 +964,7 @@ export declare class PerpetualsClient {
|
|
|
940
964
|
conf: BN;
|
|
941
965
|
ema: BN;
|
|
942
966
|
publishTime: BN;
|
|
967
|
+
extOracleAccount: PublicKey;
|
|
943
968
|
market: PublicKey;
|
|
944
969
|
limitOrders: unknown;
|
|
945
970
|
takeProfitOrders: unknown;
|
|
@@ -982,7 +1007,7 @@ export declare class PerpetualsClient {
|
|
|
982
1007
|
}[];
|
|
983
1008
|
markets: PublicKey[];
|
|
984
1009
|
maxAumUsd: BN;
|
|
985
|
-
buffer: BN;
|
|
1010
|
+
buffer: number | BN;
|
|
986
1011
|
rawAumUsd: BN;
|
|
987
1012
|
equityUsd: BN;
|
|
988
1013
|
totalStaked: {
|
|
@@ -1013,6 +1038,9 @@ export declare class PerpetualsClient {
|
|
|
1013
1038
|
lpPrice: BN;
|
|
1014
1039
|
compoundingLpPrice: BN;
|
|
1015
1040
|
lastUpdatedTimestamp: BN;
|
|
1041
|
+
feesObligationUsd: BN;
|
|
1042
|
+
rebateObligationUsd: BN;
|
|
1043
|
+
thresholdUsd: BN;
|
|
1016
1044
|
delegate: PublicKey;
|
|
1017
1045
|
openTime: BN;
|
|
1018
1046
|
updateTime: BN;
|
|
@@ -1026,15 +1054,22 @@ export declare class PerpetualsClient {
|
|
|
1026
1054
|
lockedUsd: BN;
|
|
1027
1055
|
collateralAmount: BN;
|
|
1028
1056
|
collateralUsd: BN;
|
|
1029
|
-
|
|
1057
|
+
unsettledValueUsd: BN;
|
|
1030
1058
|
unsettledFeesUsd: BN;
|
|
1031
1059
|
cumulativeLockFeeSnapshot: BN;
|
|
1032
1060
|
degenSizeUsd: BN;
|
|
1061
|
+
referencePrice: {
|
|
1062
|
+
price: BN;
|
|
1063
|
+
exponent: number;
|
|
1064
|
+
};
|
|
1033
1065
|
sizeDecimals: number;
|
|
1034
1066
|
lockedDecimals: number;
|
|
1035
1067
|
collateralDecimals: number;
|
|
1036
1068
|
key: PublicKey;
|
|
1037
1069
|
feeAmount: BN;
|
|
1070
|
+
allowPayout: boolean;
|
|
1071
|
+
availableUsd: BN;
|
|
1072
|
+
availableAmount: BN;
|
|
1038
1073
|
refererTokenStakeAccount: PublicKey;
|
|
1039
1074
|
refererBoosterAccount: PublicKey;
|
|
1040
1075
|
level: number;
|
|
@@ -1048,6 +1083,7 @@ export declare class PerpetualsClient {
|
|
|
1048
1083
|
rewardTokens: BN;
|
|
1049
1084
|
unclaimedRevenueAmount: BN;
|
|
1050
1085
|
revenueSnapshot: BN;
|
|
1086
|
+
claimableRebateUsd: BN;
|
|
1051
1087
|
tokenMint: PublicKey;
|
|
1052
1088
|
tokenVaultTokenAccount: PublicKey;
|
|
1053
1089
|
tokenPermissions: {
|
|
@@ -1134,7 +1170,7 @@ export declare class PerpetualsClient {
|
|
|
1134
1170
|
maxUtilization: number;
|
|
1135
1171
|
degenPositionFactor: number;
|
|
1136
1172
|
degenExposureFactor: number;
|
|
1137
|
-
|
|
1173
|
+
maxPositionSizeUsd: BN;
|
|
1138
1174
|
maxExposureUsd: BN;
|
|
1139
1175
|
};
|
|
1140
1176
|
permissions: {
|
|
@@ -1227,7 +1263,7 @@ export declare class PerpetualsClient {
|
|
|
1227
1263
|
reservedAmount: BN;
|
|
1228
1264
|
minReserveUsd: BN;
|
|
1229
1265
|
limitPriceBufferBps: BN;
|
|
1230
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1266
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1231
1267
|
owner: PublicKey;
|
|
1232
1268
|
stakeStats: {
|
|
1233
1269
|
pendingActivation: BN;
|
|
@@ -1261,7 +1297,7 @@ export declare class PerpetualsClient {
|
|
|
1261
1297
|
lockedAmount: BN;
|
|
1262
1298
|
lockedUsd: BN;
|
|
1263
1299
|
collateralAmount: BN;
|
|
1264
|
-
|
|
1300
|
+
collateralLiabilityUsd: BN;
|
|
1265
1301
|
unsettledFeeUsd: BN;
|
|
1266
1302
|
cumulativeLockFeeSnapshot: BN;
|
|
1267
1303
|
sizeDecimals: number;
|
|
@@ -1270,7 +1306,7 @@ export declare class PerpetualsClient {
|
|
|
1270
1306
|
};
|
|
1271
1307
|
targetCustodyUid: number;
|
|
1272
1308
|
collateralCustodyUid: number;
|
|
1273
|
-
padding2: number[] | BN[]
|
|
1309
|
+
padding2: number[] | BN[];
|
|
1274
1310
|
numSigners: number;
|
|
1275
1311
|
numSigned: number;
|
|
1276
1312
|
minSignatures: number;
|
|
@@ -1284,6 +1320,7 @@ export declare class PerpetualsClient {
|
|
|
1284
1320
|
conf: BN;
|
|
1285
1321
|
ema: BN;
|
|
1286
1322
|
publishTime: BN;
|
|
1323
|
+
extOracleAccount: PublicKey;
|
|
1287
1324
|
market: PublicKey;
|
|
1288
1325
|
limitOrders: unknown;
|
|
1289
1326
|
takeProfitOrders: unknown;
|
|
@@ -1326,7 +1363,7 @@ export declare class PerpetualsClient {
|
|
|
1326
1363
|
}[];
|
|
1327
1364
|
markets: PublicKey[];
|
|
1328
1365
|
maxAumUsd: BN;
|
|
1329
|
-
buffer: BN;
|
|
1366
|
+
buffer: number | BN;
|
|
1330
1367
|
rawAumUsd: BN;
|
|
1331
1368
|
equityUsd: BN;
|
|
1332
1369
|
totalStaked: {
|
|
@@ -1357,6 +1394,9 @@ export declare class PerpetualsClient {
|
|
|
1357
1394
|
lpPrice: BN;
|
|
1358
1395
|
compoundingLpPrice: BN;
|
|
1359
1396
|
lastUpdatedTimestamp: BN;
|
|
1397
|
+
feesObligationUsd: BN;
|
|
1398
|
+
rebateObligationUsd: BN;
|
|
1399
|
+
thresholdUsd: BN;
|
|
1360
1400
|
delegate: PublicKey;
|
|
1361
1401
|
openTime: BN;
|
|
1362
1402
|
updateTime: BN;
|
|
@@ -1370,15 +1410,22 @@ export declare class PerpetualsClient {
|
|
|
1370
1410
|
lockedUsd: BN;
|
|
1371
1411
|
collateralAmount: BN;
|
|
1372
1412
|
collateralUsd: BN;
|
|
1373
|
-
|
|
1413
|
+
unsettledValueUsd: BN;
|
|
1374
1414
|
unsettledFeesUsd: BN;
|
|
1375
1415
|
cumulativeLockFeeSnapshot: BN;
|
|
1376
1416
|
degenSizeUsd: BN;
|
|
1417
|
+
referencePrice: {
|
|
1418
|
+
price: BN;
|
|
1419
|
+
exponent: number;
|
|
1420
|
+
};
|
|
1377
1421
|
sizeDecimals: number;
|
|
1378
1422
|
lockedDecimals: number;
|
|
1379
1423
|
collateralDecimals: number;
|
|
1380
1424
|
key: PublicKey;
|
|
1381
1425
|
feeAmount: BN;
|
|
1426
|
+
allowPayout: boolean;
|
|
1427
|
+
availableUsd: BN;
|
|
1428
|
+
availableAmount: BN;
|
|
1382
1429
|
refererTokenStakeAccount: PublicKey;
|
|
1383
1430
|
refererBoosterAccount: PublicKey;
|
|
1384
1431
|
level: number;
|
|
@@ -1392,6 +1439,7 @@ export declare class PerpetualsClient {
|
|
|
1392
1439
|
rewardTokens: BN;
|
|
1393
1440
|
unclaimedRevenueAmount: BN;
|
|
1394
1441
|
revenueSnapshot: BN;
|
|
1442
|
+
claimableRebateUsd: BN;
|
|
1395
1443
|
tokenMint: PublicKey;
|
|
1396
1444
|
tokenVaultTokenAccount: PublicKey;
|
|
1397
1445
|
tokenPermissions: {
|
|
@@ -1477,7 +1525,7 @@ export declare class PerpetualsClient {
|
|
|
1477
1525
|
maxUtilization: number;
|
|
1478
1526
|
degenPositionFactor: number;
|
|
1479
1527
|
degenExposureFactor: number;
|
|
1480
|
-
|
|
1528
|
+
maxPositionSizeUsd: BN;
|
|
1481
1529
|
maxExposureUsd: BN;
|
|
1482
1530
|
};
|
|
1483
1531
|
permissions: {
|
|
@@ -1570,7 +1618,7 @@ export declare class PerpetualsClient {
|
|
|
1570
1618
|
reservedAmount: BN;
|
|
1571
1619
|
minReserveUsd: BN;
|
|
1572
1620
|
limitPriceBufferBps: BN;
|
|
1573
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1621
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1574
1622
|
owner: PublicKey;
|
|
1575
1623
|
stakeStats: {
|
|
1576
1624
|
pendingActivation: BN;
|
|
@@ -1604,7 +1652,7 @@ export declare class PerpetualsClient {
|
|
|
1604
1652
|
lockedAmount: BN;
|
|
1605
1653
|
lockedUsd: BN;
|
|
1606
1654
|
collateralAmount: BN;
|
|
1607
|
-
|
|
1655
|
+
collateralLiabilityUsd: BN;
|
|
1608
1656
|
unsettledFeeUsd: BN;
|
|
1609
1657
|
cumulativeLockFeeSnapshot: BN;
|
|
1610
1658
|
sizeDecimals: number;
|
|
@@ -1613,7 +1661,7 @@ export declare class PerpetualsClient {
|
|
|
1613
1661
|
};
|
|
1614
1662
|
targetCustodyUid: number;
|
|
1615
1663
|
collateralCustodyUid: number;
|
|
1616
|
-
padding2: number[] | BN[]
|
|
1664
|
+
padding2: number[] | BN[];
|
|
1617
1665
|
numSigners: number;
|
|
1618
1666
|
numSigned: number;
|
|
1619
1667
|
minSignatures: number;
|
|
@@ -1627,6 +1675,7 @@ export declare class PerpetualsClient {
|
|
|
1627
1675
|
conf: BN;
|
|
1628
1676
|
ema: BN;
|
|
1629
1677
|
publishTime: BN;
|
|
1678
|
+
extOracleAccount: PublicKey;
|
|
1630
1679
|
market: PublicKey;
|
|
1631
1680
|
limitOrders: unknown;
|
|
1632
1681
|
takeProfitOrders: unknown;
|
|
@@ -1669,7 +1718,7 @@ export declare class PerpetualsClient {
|
|
|
1669
1718
|
}[];
|
|
1670
1719
|
markets: PublicKey[];
|
|
1671
1720
|
maxAumUsd: BN;
|
|
1672
|
-
buffer: BN;
|
|
1721
|
+
buffer: number | BN;
|
|
1673
1722
|
rawAumUsd: BN;
|
|
1674
1723
|
equityUsd: BN;
|
|
1675
1724
|
totalStaked: {
|
|
@@ -1700,6 +1749,9 @@ export declare class PerpetualsClient {
|
|
|
1700
1749
|
lpPrice: BN;
|
|
1701
1750
|
compoundingLpPrice: BN;
|
|
1702
1751
|
lastUpdatedTimestamp: BN;
|
|
1752
|
+
feesObligationUsd: BN;
|
|
1753
|
+
rebateObligationUsd: BN;
|
|
1754
|
+
thresholdUsd: BN;
|
|
1703
1755
|
delegate: PublicKey;
|
|
1704
1756
|
openTime: BN;
|
|
1705
1757
|
updateTime: BN;
|
|
@@ -1713,15 +1765,22 @@ export declare class PerpetualsClient {
|
|
|
1713
1765
|
lockedUsd: BN;
|
|
1714
1766
|
collateralAmount: BN;
|
|
1715
1767
|
collateralUsd: BN;
|
|
1716
|
-
|
|
1768
|
+
unsettledValueUsd: BN;
|
|
1717
1769
|
unsettledFeesUsd: BN;
|
|
1718
1770
|
cumulativeLockFeeSnapshot: BN;
|
|
1719
1771
|
degenSizeUsd: BN;
|
|
1772
|
+
referencePrice: {
|
|
1773
|
+
price: BN;
|
|
1774
|
+
exponent: number;
|
|
1775
|
+
};
|
|
1720
1776
|
sizeDecimals: number;
|
|
1721
1777
|
lockedDecimals: number;
|
|
1722
1778
|
collateralDecimals: number;
|
|
1723
1779
|
key: PublicKey;
|
|
1724
1780
|
feeAmount: BN;
|
|
1781
|
+
allowPayout: boolean;
|
|
1782
|
+
availableUsd: BN;
|
|
1783
|
+
availableAmount: BN;
|
|
1725
1784
|
refererTokenStakeAccount: PublicKey;
|
|
1726
1785
|
refererBoosterAccount: PublicKey;
|
|
1727
1786
|
level: number;
|
|
@@ -1735,6 +1794,7 @@ export declare class PerpetualsClient {
|
|
|
1735
1794
|
rewardTokens: BN;
|
|
1736
1795
|
unclaimedRevenueAmount: BN;
|
|
1737
1796
|
revenueSnapshot: BN;
|
|
1797
|
+
claimableRebateUsd: BN;
|
|
1738
1798
|
tokenMint: PublicKey;
|
|
1739
1799
|
tokenVaultTokenAccount: PublicKey;
|
|
1740
1800
|
tokenPermissions: {
|
|
@@ -1818,7 +1878,7 @@ export declare class PerpetualsClient {
|
|
|
1818
1878
|
maxUtilization: number;
|
|
1819
1879
|
degenPositionFactor: number;
|
|
1820
1880
|
degenExposureFactor: number;
|
|
1821
|
-
|
|
1881
|
+
maxPositionSizeUsd: BN;
|
|
1822
1882
|
maxExposureUsd: BN;
|
|
1823
1883
|
};
|
|
1824
1884
|
permissions: {
|
|
@@ -1911,7 +1971,7 @@ export declare class PerpetualsClient {
|
|
|
1911
1971
|
reservedAmount: BN;
|
|
1912
1972
|
minReserveUsd: BN;
|
|
1913
1973
|
limitPriceBufferBps: BN;
|
|
1914
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1974
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1915
1975
|
owner: PublicKey;
|
|
1916
1976
|
stakeStats: {
|
|
1917
1977
|
pendingActivation: BN;
|
|
@@ -1945,7 +2005,7 @@ export declare class PerpetualsClient {
|
|
|
1945
2005
|
lockedAmount: BN;
|
|
1946
2006
|
lockedUsd: BN;
|
|
1947
2007
|
collateralAmount: BN;
|
|
1948
|
-
|
|
2008
|
+
collateralLiabilityUsd: BN;
|
|
1949
2009
|
unsettledFeeUsd: BN;
|
|
1950
2010
|
cumulativeLockFeeSnapshot: BN;
|
|
1951
2011
|
sizeDecimals: number;
|
|
@@ -1954,7 +2014,7 @@ export declare class PerpetualsClient {
|
|
|
1954
2014
|
};
|
|
1955
2015
|
targetCustodyUid: number;
|
|
1956
2016
|
collateralCustodyUid: number;
|
|
1957
|
-
padding2: number[] | BN[]
|
|
2017
|
+
padding2: number[] | BN[];
|
|
1958
2018
|
numSigners: number;
|
|
1959
2019
|
numSigned: number;
|
|
1960
2020
|
minSignatures: number;
|
|
@@ -1968,6 +2028,7 @@ export declare class PerpetualsClient {
|
|
|
1968
2028
|
conf: BN;
|
|
1969
2029
|
ema: BN;
|
|
1970
2030
|
publishTime: BN;
|
|
2031
|
+
extOracleAccount: PublicKey;
|
|
1971
2032
|
market: PublicKey;
|
|
1972
2033
|
limitOrders: unknown;
|
|
1973
2034
|
takeProfitOrders: unknown;
|
|
@@ -2010,7 +2071,7 @@ export declare class PerpetualsClient {
|
|
|
2010
2071
|
}[];
|
|
2011
2072
|
markets: PublicKey[];
|
|
2012
2073
|
maxAumUsd: BN;
|
|
2013
|
-
buffer: BN;
|
|
2074
|
+
buffer: number | BN;
|
|
2014
2075
|
rawAumUsd: BN;
|
|
2015
2076
|
equityUsd: BN;
|
|
2016
2077
|
totalStaked: {
|
|
@@ -2041,6 +2102,9 @@ export declare class PerpetualsClient {
|
|
|
2041
2102
|
lpPrice: BN;
|
|
2042
2103
|
compoundingLpPrice: BN;
|
|
2043
2104
|
lastUpdatedTimestamp: BN;
|
|
2105
|
+
feesObligationUsd: BN;
|
|
2106
|
+
rebateObligationUsd: BN;
|
|
2107
|
+
thresholdUsd: BN;
|
|
2044
2108
|
delegate: PublicKey;
|
|
2045
2109
|
openTime: BN;
|
|
2046
2110
|
updateTime: BN;
|
|
@@ -2054,15 +2118,22 @@ export declare class PerpetualsClient {
|
|
|
2054
2118
|
lockedUsd: BN;
|
|
2055
2119
|
collateralAmount: BN;
|
|
2056
2120
|
collateralUsd: BN;
|
|
2057
|
-
|
|
2121
|
+
unsettledValueUsd: BN;
|
|
2058
2122
|
unsettledFeesUsd: BN;
|
|
2059
2123
|
cumulativeLockFeeSnapshot: BN;
|
|
2060
2124
|
degenSizeUsd: BN;
|
|
2125
|
+
referencePrice: {
|
|
2126
|
+
price: BN;
|
|
2127
|
+
exponent: number;
|
|
2128
|
+
};
|
|
2061
2129
|
sizeDecimals: number;
|
|
2062
2130
|
lockedDecimals: number;
|
|
2063
2131
|
collateralDecimals: number;
|
|
2064
2132
|
key: PublicKey;
|
|
2065
2133
|
feeAmount: BN;
|
|
2134
|
+
allowPayout: boolean;
|
|
2135
|
+
availableUsd: BN;
|
|
2136
|
+
availableAmount: BN;
|
|
2066
2137
|
refererTokenStakeAccount: PublicKey;
|
|
2067
2138
|
refererBoosterAccount: PublicKey;
|
|
2068
2139
|
level: number;
|
|
@@ -2076,6 +2147,7 @@ export declare class PerpetualsClient {
|
|
|
2076
2147
|
rewardTokens: BN;
|
|
2077
2148
|
unclaimedRevenueAmount: BN;
|
|
2078
2149
|
revenueSnapshot: BN;
|
|
2150
|
+
claimableRebateUsd: BN;
|
|
2079
2151
|
tokenMint: PublicKey;
|
|
2080
2152
|
tokenVaultTokenAccount: PublicKey;
|
|
2081
2153
|
tokenPermissions: {
|
|
@@ -2158,7 +2230,7 @@ export declare class PerpetualsClient {
|
|
|
2158
2230
|
maxUtilization: number;
|
|
2159
2231
|
degenPositionFactor: number;
|
|
2160
2232
|
degenExposureFactor: number;
|
|
2161
|
-
|
|
2233
|
+
maxPositionSizeUsd: BN;
|
|
2162
2234
|
maxExposureUsd: BN;
|
|
2163
2235
|
};
|
|
2164
2236
|
permissions: {
|
|
@@ -2251,7 +2323,7 @@ export declare class PerpetualsClient {
|
|
|
2251
2323
|
reservedAmount: BN;
|
|
2252
2324
|
minReserveUsd: BN;
|
|
2253
2325
|
limitPriceBufferBps: BN;
|
|
2254
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
2326
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2255
2327
|
owner: PublicKey;
|
|
2256
2328
|
stakeStats: {
|
|
2257
2329
|
pendingActivation: BN;
|
|
@@ -2285,7 +2357,7 @@ export declare class PerpetualsClient {
|
|
|
2285
2357
|
lockedAmount: BN;
|
|
2286
2358
|
lockedUsd: BN;
|
|
2287
2359
|
collateralAmount: BN;
|
|
2288
|
-
|
|
2360
|
+
collateralLiabilityUsd: BN;
|
|
2289
2361
|
unsettledFeeUsd: BN;
|
|
2290
2362
|
cumulativeLockFeeSnapshot: BN;
|
|
2291
2363
|
sizeDecimals: number;
|
|
@@ -2294,7 +2366,7 @@ export declare class PerpetualsClient {
|
|
|
2294
2366
|
};
|
|
2295
2367
|
targetCustodyUid: number;
|
|
2296
2368
|
collateralCustodyUid: number;
|
|
2297
|
-
padding2: number[] | BN[]
|
|
2369
|
+
padding2: number[] | BN[];
|
|
2298
2370
|
numSigners: number;
|
|
2299
2371
|
numSigned: number;
|
|
2300
2372
|
minSignatures: number;
|
|
@@ -2308,6 +2380,7 @@ export declare class PerpetualsClient {
|
|
|
2308
2380
|
conf: BN;
|
|
2309
2381
|
ema: BN;
|
|
2310
2382
|
publishTime: BN;
|
|
2383
|
+
extOracleAccount: PublicKey;
|
|
2311
2384
|
market: PublicKey;
|
|
2312
2385
|
limitOrders: unknown;
|
|
2313
2386
|
takeProfitOrders: unknown;
|
|
@@ -2350,7 +2423,7 @@ export declare class PerpetualsClient {
|
|
|
2350
2423
|
}[];
|
|
2351
2424
|
markets: PublicKey[];
|
|
2352
2425
|
maxAumUsd: BN;
|
|
2353
|
-
buffer: BN;
|
|
2426
|
+
buffer: number | BN;
|
|
2354
2427
|
rawAumUsd: BN;
|
|
2355
2428
|
equityUsd: BN;
|
|
2356
2429
|
totalStaked: {
|
|
@@ -2381,6 +2454,9 @@ export declare class PerpetualsClient {
|
|
|
2381
2454
|
lpPrice: BN;
|
|
2382
2455
|
compoundingLpPrice: BN;
|
|
2383
2456
|
lastUpdatedTimestamp: BN;
|
|
2457
|
+
feesObligationUsd: BN;
|
|
2458
|
+
rebateObligationUsd: BN;
|
|
2459
|
+
thresholdUsd: BN;
|
|
2384
2460
|
delegate: PublicKey;
|
|
2385
2461
|
openTime: BN;
|
|
2386
2462
|
updateTime: BN;
|
|
@@ -2394,15 +2470,22 @@ export declare class PerpetualsClient {
|
|
|
2394
2470
|
lockedUsd: BN;
|
|
2395
2471
|
collateralAmount: BN;
|
|
2396
2472
|
collateralUsd: BN;
|
|
2397
|
-
|
|
2473
|
+
unsettledValueUsd: BN;
|
|
2398
2474
|
unsettledFeesUsd: BN;
|
|
2399
2475
|
cumulativeLockFeeSnapshot: BN;
|
|
2400
2476
|
degenSizeUsd: BN;
|
|
2477
|
+
referencePrice: {
|
|
2478
|
+
price: BN;
|
|
2479
|
+
exponent: number;
|
|
2480
|
+
};
|
|
2401
2481
|
sizeDecimals: number;
|
|
2402
2482
|
lockedDecimals: number;
|
|
2403
2483
|
collateralDecimals: number;
|
|
2404
2484
|
key: PublicKey;
|
|
2405
2485
|
feeAmount: BN;
|
|
2486
|
+
allowPayout: boolean;
|
|
2487
|
+
availableUsd: BN;
|
|
2488
|
+
availableAmount: BN;
|
|
2406
2489
|
refererTokenStakeAccount: PublicKey;
|
|
2407
2490
|
refererBoosterAccount: PublicKey;
|
|
2408
2491
|
level: number;
|
|
@@ -2416,6 +2499,7 @@ export declare class PerpetualsClient {
|
|
|
2416
2499
|
rewardTokens: BN;
|
|
2417
2500
|
unclaimedRevenueAmount: BN;
|
|
2418
2501
|
revenueSnapshot: BN;
|
|
2502
|
+
claimableRebateUsd: BN;
|
|
2419
2503
|
tokenMint: PublicKey;
|
|
2420
2504
|
tokenVaultTokenAccount: PublicKey;
|
|
2421
2505
|
tokenPermissions: {
|
|
@@ -2498,7 +2582,7 @@ export declare class PerpetualsClient {
|
|
|
2498
2582
|
maxUtilization: number;
|
|
2499
2583
|
degenPositionFactor: number;
|
|
2500
2584
|
degenExposureFactor: number;
|
|
2501
|
-
|
|
2585
|
+
maxPositionSizeUsd: BN;
|
|
2502
2586
|
maxExposureUsd: BN;
|
|
2503
2587
|
};
|
|
2504
2588
|
permissions: {
|
|
@@ -2591,7 +2675,7 @@ export declare class PerpetualsClient {
|
|
|
2591
2675
|
reservedAmount: BN;
|
|
2592
2676
|
minReserveUsd: BN;
|
|
2593
2677
|
limitPriceBufferBps: BN;
|
|
2594
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
2678
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2595
2679
|
owner: PublicKey;
|
|
2596
2680
|
stakeStats: {
|
|
2597
2681
|
pendingActivation: BN;
|
|
@@ -2625,7 +2709,7 @@ export declare class PerpetualsClient {
|
|
|
2625
2709
|
lockedAmount: BN;
|
|
2626
2710
|
lockedUsd: BN;
|
|
2627
2711
|
collateralAmount: BN;
|
|
2628
|
-
|
|
2712
|
+
collateralLiabilityUsd: BN;
|
|
2629
2713
|
unsettledFeeUsd: BN;
|
|
2630
2714
|
cumulativeLockFeeSnapshot: BN;
|
|
2631
2715
|
sizeDecimals: number;
|
|
@@ -2634,7 +2718,7 @@ export declare class PerpetualsClient {
|
|
|
2634
2718
|
};
|
|
2635
2719
|
targetCustodyUid: number;
|
|
2636
2720
|
collateralCustodyUid: number;
|
|
2637
|
-
padding2: number[] | BN[]
|
|
2721
|
+
padding2: number[] | BN[];
|
|
2638
2722
|
numSigners: number;
|
|
2639
2723
|
numSigned: number;
|
|
2640
2724
|
minSignatures: number;
|
|
@@ -2648,6 +2732,7 @@ export declare class PerpetualsClient {
|
|
|
2648
2732
|
conf: BN;
|
|
2649
2733
|
ema: BN;
|
|
2650
2734
|
publishTime: BN;
|
|
2735
|
+
extOracleAccount: PublicKey;
|
|
2651
2736
|
market: PublicKey;
|
|
2652
2737
|
limitOrders: unknown;
|
|
2653
2738
|
takeProfitOrders: unknown;
|
|
@@ -2690,7 +2775,7 @@ export declare class PerpetualsClient {
|
|
|
2690
2775
|
}[];
|
|
2691
2776
|
markets: PublicKey[];
|
|
2692
2777
|
maxAumUsd: BN;
|
|
2693
|
-
buffer: BN;
|
|
2778
|
+
buffer: number | BN;
|
|
2694
2779
|
rawAumUsd: BN;
|
|
2695
2780
|
equityUsd: BN;
|
|
2696
2781
|
totalStaked: {
|
|
@@ -2721,6 +2806,9 @@ export declare class PerpetualsClient {
|
|
|
2721
2806
|
lpPrice: BN;
|
|
2722
2807
|
compoundingLpPrice: BN;
|
|
2723
2808
|
lastUpdatedTimestamp: BN;
|
|
2809
|
+
feesObligationUsd: BN;
|
|
2810
|
+
rebateObligationUsd: BN;
|
|
2811
|
+
thresholdUsd: BN;
|
|
2724
2812
|
delegate: PublicKey;
|
|
2725
2813
|
openTime: BN;
|
|
2726
2814
|
updateTime: BN;
|
|
@@ -2734,15 +2822,22 @@ export declare class PerpetualsClient {
|
|
|
2734
2822
|
lockedUsd: BN;
|
|
2735
2823
|
collateralAmount: BN;
|
|
2736
2824
|
collateralUsd: BN;
|
|
2737
|
-
|
|
2825
|
+
unsettledValueUsd: BN;
|
|
2738
2826
|
unsettledFeesUsd: BN;
|
|
2739
2827
|
cumulativeLockFeeSnapshot: BN;
|
|
2740
2828
|
degenSizeUsd: BN;
|
|
2829
|
+
referencePrice: {
|
|
2830
|
+
price: BN;
|
|
2831
|
+
exponent: number;
|
|
2832
|
+
};
|
|
2741
2833
|
sizeDecimals: number;
|
|
2742
2834
|
lockedDecimals: number;
|
|
2743
2835
|
collateralDecimals: number;
|
|
2744
2836
|
key: PublicKey;
|
|
2745
2837
|
feeAmount: BN;
|
|
2838
|
+
allowPayout: boolean;
|
|
2839
|
+
availableUsd: BN;
|
|
2840
|
+
availableAmount: BN;
|
|
2746
2841
|
refererTokenStakeAccount: PublicKey;
|
|
2747
2842
|
refererBoosterAccount: PublicKey;
|
|
2748
2843
|
level: number;
|
|
@@ -2756,6 +2851,7 @@ export declare class PerpetualsClient {
|
|
|
2756
2851
|
rewardTokens: BN;
|
|
2757
2852
|
unclaimedRevenueAmount: BN;
|
|
2758
2853
|
revenueSnapshot: BN;
|
|
2854
|
+
claimableRebateUsd: BN;
|
|
2759
2855
|
tokenMint: PublicKey;
|
|
2760
2856
|
tokenVaultTokenAccount: PublicKey;
|
|
2761
2857
|
tokenPermissions: {
|
|
@@ -2816,11 +2912,15 @@ export declare class PerpetualsClient {
|
|
|
2816
2912
|
lockedUsd: BN;
|
|
2817
2913
|
collateralAmount: BN;
|
|
2818
2914
|
collateralUsd: BN;
|
|
2819
|
-
|
|
2915
|
+
unsettledValueUsd: BN;
|
|
2820
2916
|
unsettledFeesUsd: BN;
|
|
2821
2917
|
cumulativeLockFeeSnapshot: BN;
|
|
2822
2918
|
degenSizeUsd: BN;
|
|
2823
|
-
|
|
2919
|
+
referencePrice: {
|
|
2920
|
+
price: BN;
|
|
2921
|
+
exponent: number;
|
|
2922
|
+
};
|
|
2923
|
+
buffer: number;
|
|
2824
2924
|
sizeDecimals: number;
|
|
2825
2925
|
lockedDecimals: number;
|
|
2826
2926
|
collateralDecimals: number;
|
|
@@ -2885,7 +2985,7 @@ export declare class PerpetualsClient {
|
|
|
2885
2985
|
maxUtilization: number;
|
|
2886
2986
|
degenPositionFactor: number;
|
|
2887
2987
|
degenExposureFactor: number;
|
|
2888
|
-
|
|
2988
|
+
maxPositionSizeUsd: BN;
|
|
2889
2989
|
maxExposureUsd: BN;
|
|
2890
2990
|
};
|
|
2891
2991
|
permissions: {
|
|
@@ -2978,7 +3078,7 @@ export declare class PerpetualsClient {
|
|
|
2978
3078
|
reservedAmount: BN;
|
|
2979
3079
|
minReserveUsd: BN;
|
|
2980
3080
|
limitPriceBufferBps: BN;
|
|
2981
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3081
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2982
3082
|
owner: PublicKey;
|
|
2983
3083
|
stakeStats: {
|
|
2984
3084
|
pendingActivation: BN;
|
|
@@ -3012,7 +3112,7 @@ export declare class PerpetualsClient {
|
|
|
3012
3112
|
lockedAmount: BN;
|
|
3013
3113
|
lockedUsd: BN;
|
|
3014
3114
|
collateralAmount: BN;
|
|
3015
|
-
|
|
3115
|
+
collateralLiabilityUsd: BN;
|
|
3016
3116
|
unsettledFeeUsd: BN;
|
|
3017
3117
|
cumulativeLockFeeSnapshot: BN;
|
|
3018
3118
|
sizeDecimals: number;
|
|
@@ -3021,7 +3121,7 @@ export declare class PerpetualsClient {
|
|
|
3021
3121
|
};
|
|
3022
3122
|
targetCustodyUid: number;
|
|
3023
3123
|
collateralCustodyUid: number;
|
|
3024
|
-
padding2: number[] | BN[]
|
|
3124
|
+
padding2: number[] | BN[];
|
|
3025
3125
|
numSigners: number;
|
|
3026
3126
|
numSigned: number;
|
|
3027
3127
|
minSignatures: number;
|
|
@@ -3035,6 +3135,7 @@ export declare class PerpetualsClient {
|
|
|
3035
3135
|
conf: BN;
|
|
3036
3136
|
ema: BN;
|
|
3037
3137
|
publishTime: BN;
|
|
3138
|
+
extOracleAccount: PublicKey;
|
|
3038
3139
|
market: PublicKey;
|
|
3039
3140
|
limitOrders: unknown;
|
|
3040
3141
|
takeProfitOrders: unknown;
|
|
@@ -3077,7 +3178,7 @@ export declare class PerpetualsClient {
|
|
|
3077
3178
|
}[];
|
|
3078
3179
|
markets: PublicKey[];
|
|
3079
3180
|
maxAumUsd: BN;
|
|
3080
|
-
buffer: BN;
|
|
3181
|
+
buffer: number | BN;
|
|
3081
3182
|
rawAumUsd: BN;
|
|
3082
3183
|
equityUsd: BN;
|
|
3083
3184
|
totalStaked: {
|
|
@@ -3108,6 +3209,9 @@ export declare class PerpetualsClient {
|
|
|
3108
3209
|
lpPrice: BN;
|
|
3109
3210
|
compoundingLpPrice: BN;
|
|
3110
3211
|
lastUpdatedTimestamp: BN;
|
|
3212
|
+
feesObligationUsd: BN;
|
|
3213
|
+
rebateObligationUsd: BN;
|
|
3214
|
+
thresholdUsd: BN;
|
|
3111
3215
|
delegate: PublicKey;
|
|
3112
3216
|
openTime: BN;
|
|
3113
3217
|
updateTime: BN;
|
|
@@ -3121,15 +3225,22 @@ export declare class PerpetualsClient {
|
|
|
3121
3225
|
lockedUsd: BN;
|
|
3122
3226
|
collateralAmount: BN;
|
|
3123
3227
|
collateralUsd: BN;
|
|
3124
|
-
|
|
3228
|
+
unsettledValueUsd: BN;
|
|
3125
3229
|
unsettledFeesUsd: BN;
|
|
3126
3230
|
cumulativeLockFeeSnapshot: BN;
|
|
3127
3231
|
degenSizeUsd: BN;
|
|
3232
|
+
referencePrice: {
|
|
3233
|
+
price: BN;
|
|
3234
|
+
exponent: number;
|
|
3235
|
+
};
|
|
3128
3236
|
sizeDecimals: number;
|
|
3129
3237
|
lockedDecimals: number;
|
|
3130
3238
|
collateralDecimals: number;
|
|
3131
3239
|
key: PublicKey;
|
|
3132
3240
|
feeAmount: BN;
|
|
3241
|
+
allowPayout: boolean;
|
|
3242
|
+
availableUsd: BN;
|
|
3243
|
+
availableAmount: BN;
|
|
3133
3244
|
refererTokenStakeAccount: PublicKey;
|
|
3134
3245
|
refererBoosterAccount: PublicKey;
|
|
3135
3246
|
level: number;
|
|
@@ -3143,6 +3254,7 @@ export declare class PerpetualsClient {
|
|
|
3143
3254
|
rewardTokens: BN;
|
|
3144
3255
|
unclaimedRevenueAmount: BN;
|
|
3145
3256
|
revenueSnapshot: BN;
|
|
3257
|
+
claimableRebateUsd: BN;
|
|
3146
3258
|
tokenMint: PublicKey;
|
|
3147
3259
|
tokenVaultTokenAccount: PublicKey;
|
|
3148
3260
|
tokenPermissions: {
|
|
@@ -3225,7 +3337,7 @@ export declare class PerpetualsClient {
|
|
|
3225
3337
|
maxUtilization: number;
|
|
3226
3338
|
degenPositionFactor: number;
|
|
3227
3339
|
degenExposureFactor: number;
|
|
3228
|
-
|
|
3340
|
+
maxPositionSizeUsd: BN;
|
|
3229
3341
|
maxExposureUsd: BN;
|
|
3230
3342
|
};
|
|
3231
3343
|
permissions: {
|
|
@@ -3318,7 +3430,7 @@ export declare class PerpetualsClient {
|
|
|
3318
3430
|
reservedAmount: BN;
|
|
3319
3431
|
minReserveUsd: BN;
|
|
3320
3432
|
limitPriceBufferBps: BN;
|
|
3321
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3433
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3322
3434
|
owner: PublicKey;
|
|
3323
3435
|
stakeStats: {
|
|
3324
3436
|
pendingActivation: BN;
|
|
@@ -3352,7 +3464,7 @@ export declare class PerpetualsClient {
|
|
|
3352
3464
|
lockedAmount: BN;
|
|
3353
3465
|
lockedUsd: BN;
|
|
3354
3466
|
collateralAmount: BN;
|
|
3355
|
-
|
|
3467
|
+
collateralLiabilityUsd: BN;
|
|
3356
3468
|
unsettledFeeUsd: BN;
|
|
3357
3469
|
cumulativeLockFeeSnapshot: BN;
|
|
3358
3470
|
sizeDecimals: number;
|
|
@@ -3361,7 +3473,7 @@ export declare class PerpetualsClient {
|
|
|
3361
3473
|
};
|
|
3362
3474
|
targetCustodyUid: number;
|
|
3363
3475
|
collateralCustodyUid: number;
|
|
3364
|
-
padding2: number[] | BN[]
|
|
3476
|
+
padding2: number[] | BN[];
|
|
3365
3477
|
numSigners: number;
|
|
3366
3478
|
numSigned: number;
|
|
3367
3479
|
minSignatures: number;
|
|
@@ -3375,6 +3487,7 @@ export declare class PerpetualsClient {
|
|
|
3375
3487
|
conf: BN;
|
|
3376
3488
|
ema: BN;
|
|
3377
3489
|
publishTime: BN;
|
|
3490
|
+
extOracleAccount: PublicKey;
|
|
3378
3491
|
market: PublicKey;
|
|
3379
3492
|
limitOrders: unknown;
|
|
3380
3493
|
takeProfitOrders: unknown;
|
|
@@ -3417,7 +3530,7 @@ export declare class PerpetualsClient {
|
|
|
3417
3530
|
}[];
|
|
3418
3531
|
markets: PublicKey[];
|
|
3419
3532
|
maxAumUsd: BN;
|
|
3420
|
-
buffer: BN;
|
|
3533
|
+
buffer: number | BN;
|
|
3421
3534
|
rawAumUsd: BN;
|
|
3422
3535
|
equityUsd: BN;
|
|
3423
3536
|
totalStaked: {
|
|
@@ -3448,6 +3561,9 @@ export declare class PerpetualsClient {
|
|
|
3448
3561
|
lpPrice: BN;
|
|
3449
3562
|
compoundingLpPrice: BN;
|
|
3450
3563
|
lastUpdatedTimestamp: BN;
|
|
3564
|
+
feesObligationUsd: BN;
|
|
3565
|
+
rebateObligationUsd: BN;
|
|
3566
|
+
thresholdUsd: BN;
|
|
3451
3567
|
delegate: PublicKey;
|
|
3452
3568
|
openTime: BN;
|
|
3453
3569
|
updateTime: BN;
|
|
@@ -3461,15 +3577,22 @@ export declare class PerpetualsClient {
|
|
|
3461
3577
|
lockedUsd: BN;
|
|
3462
3578
|
collateralAmount: BN;
|
|
3463
3579
|
collateralUsd: BN;
|
|
3464
|
-
|
|
3580
|
+
unsettledValueUsd: BN;
|
|
3465
3581
|
unsettledFeesUsd: BN;
|
|
3466
3582
|
cumulativeLockFeeSnapshot: BN;
|
|
3467
3583
|
degenSizeUsd: BN;
|
|
3584
|
+
referencePrice: {
|
|
3585
|
+
price: BN;
|
|
3586
|
+
exponent: number;
|
|
3587
|
+
};
|
|
3468
3588
|
sizeDecimals: number;
|
|
3469
3589
|
lockedDecimals: number;
|
|
3470
3590
|
collateralDecimals: number;
|
|
3471
3591
|
key: PublicKey;
|
|
3472
3592
|
feeAmount: BN;
|
|
3593
|
+
allowPayout: boolean;
|
|
3594
|
+
availableUsd: BN;
|
|
3595
|
+
availableAmount: BN;
|
|
3473
3596
|
refererTokenStakeAccount: PublicKey;
|
|
3474
3597
|
refererBoosterAccount: PublicKey;
|
|
3475
3598
|
level: number;
|
|
@@ -3483,6 +3606,7 @@ export declare class PerpetualsClient {
|
|
|
3483
3606
|
rewardTokens: BN;
|
|
3484
3607
|
unclaimedRevenueAmount: BN;
|
|
3485
3608
|
revenueSnapshot: BN;
|
|
3609
|
+
claimableRebateUsd: BN;
|
|
3486
3610
|
tokenMint: PublicKey;
|
|
3487
3611
|
tokenVaultTokenAccount: PublicKey;
|
|
3488
3612
|
tokenPermissions: {
|
|
@@ -3565,7 +3689,7 @@ export declare class PerpetualsClient {
|
|
|
3565
3689
|
maxUtilization: number;
|
|
3566
3690
|
degenPositionFactor: number;
|
|
3567
3691
|
degenExposureFactor: number;
|
|
3568
|
-
|
|
3692
|
+
maxPositionSizeUsd: BN;
|
|
3569
3693
|
maxExposureUsd: BN;
|
|
3570
3694
|
};
|
|
3571
3695
|
permissions: {
|
|
@@ -3658,7 +3782,7 @@ export declare class PerpetualsClient {
|
|
|
3658
3782
|
reservedAmount: BN;
|
|
3659
3783
|
minReserveUsd: BN;
|
|
3660
3784
|
limitPriceBufferBps: BN;
|
|
3661
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3785
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3662
3786
|
owner: PublicKey;
|
|
3663
3787
|
stakeStats: {
|
|
3664
3788
|
pendingActivation: BN;
|
|
@@ -3692,7 +3816,7 @@ export declare class PerpetualsClient {
|
|
|
3692
3816
|
lockedAmount: BN;
|
|
3693
3817
|
lockedUsd: BN;
|
|
3694
3818
|
collateralAmount: BN;
|
|
3695
|
-
|
|
3819
|
+
collateralLiabilityUsd: BN;
|
|
3696
3820
|
unsettledFeeUsd: BN;
|
|
3697
3821
|
cumulativeLockFeeSnapshot: BN;
|
|
3698
3822
|
sizeDecimals: number;
|
|
@@ -3701,7 +3825,7 @@ export declare class PerpetualsClient {
|
|
|
3701
3825
|
};
|
|
3702
3826
|
targetCustodyUid: number;
|
|
3703
3827
|
collateralCustodyUid: number;
|
|
3704
|
-
padding2: number[] | BN[]
|
|
3828
|
+
padding2: number[] | BN[];
|
|
3705
3829
|
numSigners: number;
|
|
3706
3830
|
numSigned: number;
|
|
3707
3831
|
minSignatures: number;
|
|
@@ -3715,6 +3839,7 @@ export declare class PerpetualsClient {
|
|
|
3715
3839
|
conf: BN;
|
|
3716
3840
|
ema: BN;
|
|
3717
3841
|
publishTime: BN;
|
|
3842
|
+
extOracleAccount: PublicKey;
|
|
3718
3843
|
market: PublicKey;
|
|
3719
3844
|
limitOrders: unknown;
|
|
3720
3845
|
takeProfitOrders: unknown;
|
|
@@ -3757,7 +3882,7 @@ export declare class PerpetualsClient {
|
|
|
3757
3882
|
}[];
|
|
3758
3883
|
markets: PublicKey[];
|
|
3759
3884
|
maxAumUsd: BN;
|
|
3760
|
-
buffer: BN;
|
|
3885
|
+
buffer: number | BN;
|
|
3761
3886
|
rawAumUsd: BN;
|
|
3762
3887
|
equityUsd: BN;
|
|
3763
3888
|
totalStaked: {
|
|
@@ -3788,6 +3913,9 @@ export declare class PerpetualsClient {
|
|
|
3788
3913
|
lpPrice: BN;
|
|
3789
3914
|
compoundingLpPrice: BN;
|
|
3790
3915
|
lastUpdatedTimestamp: BN;
|
|
3916
|
+
feesObligationUsd: BN;
|
|
3917
|
+
rebateObligationUsd: BN;
|
|
3918
|
+
thresholdUsd: BN;
|
|
3791
3919
|
delegate: PublicKey;
|
|
3792
3920
|
openTime: BN;
|
|
3793
3921
|
updateTime: BN;
|
|
@@ -3801,15 +3929,22 @@ export declare class PerpetualsClient {
|
|
|
3801
3929
|
lockedUsd: BN;
|
|
3802
3930
|
collateralAmount: BN;
|
|
3803
3931
|
collateralUsd: BN;
|
|
3804
|
-
|
|
3932
|
+
unsettledValueUsd: BN;
|
|
3805
3933
|
unsettledFeesUsd: BN;
|
|
3806
3934
|
cumulativeLockFeeSnapshot: BN;
|
|
3807
3935
|
degenSizeUsd: BN;
|
|
3936
|
+
referencePrice: {
|
|
3937
|
+
price: BN;
|
|
3938
|
+
exponent: number;
|
|
3939
|
+
};
|
|
3808
3940
|
sizeDecimals: number;
|
|
3809
3941
|
lockedDecimals: number;
|
|
3810
3942
|
collateralDecimals: number;
|
|
3811
3943
|
key: PublicKey;
|
|
3812
3944
|
feeAmount: BN;
|
|
3945
|
+
allowPayout: boolean;
|
|
3946
|
+
availableUsd: BN;
|
|
3947
|
+
availableAmount: BN;
|
|
3813
3948
|
refererTokenStakeAccount: PublicKey;
|
|
3814
3949
|
refererBoosterAccount: PublicKey;
|
|
3815
3950
|
level: number;
|
|
@@ -3823,6 +3958,7 @@ export declare class PerpetualsClient {
|
|
|
3823
3958
|
rewardTokens: BN;
|
|
3824
3959
|
unclaimedRevenueAmount: BN;
|
|
3825
3960
|
revenueSnapshot: BN;
|
|
3961
|
+
claimableRebateUsd: BN;
|
|
3826
3962
|
tokenMint: PublicKey;
|
|
3827
3963
|
tokenVaultTokenAccount: PublicKey;
|
|
3828
3964
|
tokenPermissions: {
|
|
@@ -3905,7 +4041,7 @@ export declare class PerpetualsClient {
|
|
|
3905
4041
|
maxUtilization: number;
|
|
3906
4042
|
degenPositionFactor: number;
|
|
3907
4043
|
degenExposureFactor: number;
|
|
3908
|
-
|
|
4044
|
+
maxPositionSizeUsd: BN;
|
|
3909
4045
|
maxExposureUsd: BN;
|
|
3910
4046
|
};
|
|
3911
4047
|
permissions: {
|
|
@@ -3998,7 +4134,7 @@ export declare class PerpetualsClient {
|
|
|
3998
4134
|
reservedAmount: BN;
|
|
3999
4135
|
minReserveUsd: BN;
|
|
4000
4136
|
limitPriceBufferBps: BN;
|
|
4001
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
4137
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4002
4138
|
owner: PublicKey;
|
|
4003
4139
|
stakeStats: {
|
|
4004
4140
|
pendingActivation: BN;
|
|
@@ -4032,7 +4168,7 @@ export declare class PerpetualsClient {
|
|
|
4032
4168
|
lockedAmount: BN;
|
|
4033
4169
|
lockedUsd: BN;
|
|
4034
4170
|
collateralAmount: BN;
|
|
4035
|
-
|
|
4171
|
+
collateralLiabilityUsd: BN;
|
|
4036
4172
|
unsettledFeeUsd: BN;
|
|
4037
4173
|
cumulativeLockFeeSnapshot: BN;
|
|
4038
4174
|
sizeDecimals: number;
|
|
@@ -4041,7 +4177,7 @@ export declare class PerpetualsClient {
|
|
|
4041
4177
|
};
|
|
4042
4178
|
targetCustodyUid: number;
|
|
4043
4179
|
collateralCustodyUid: number;
|
|
4044
|
-
padding2: number[] | BN[]
|
|
4180
|
+
padding2: number[] | BN[];
|
|
4045
4181
|
numSigners: number;
|
|
4046
4182
|
numSigned: number;
|
|
4047
4183
|
minSignatures: number;
|
|
@@ -4055,6 +4191,7 @@ export declare class PerpetualsClient {
|
|
|
4055
4191
|
conf: BN;
|
|
4056
4192
|
ema: BN;
|
|
4057
4193
|
publishTime: BN;
|
|
4194
|
+
extOracleAccount: PublicKey;
|
|
4058
4195
|
market: PublicKey;
|
|
4059
4196
|
limitOrders: unknown;
|
|
4060
4197
|
takeProfitOrders: unknown;
|
|
@@ -4097,7 +4234,7 @@ export declare class PerpetualsClient {
|
|
|
4097
4234
|
}[];
|
|
4098
4235
|
markets: PublicKey[];
|
|
4099
4236
|
maxAumUsd: BN;
|
|
4100
|
-
buffer: BN;
|
|
4237
|
+
buffer: number | BN;
|
|
4101
4238
|
rawAumUsd: BN;
|
|
4102
4239
|
equityUsd: BN;
|
|
4103
4240
|
totalStaked: {
|
|
@@ -4128,6 +4265,9 @@ export declare class PerpetualsClient {
|
|
|
4128
4265
|
lpPrice: BN;
|
|
4129
4266
|
compoundingLpPrice: BN;
|
|
4130
4267
|
lastUpdatedTimestamp: BN;
|
|
4268
|
+
feesObligationUsd: BN;
|
|
4269
|
+
rebateObligationUsd: BN;
|
|
4270
|
+
thresholdUsd: BN;
|
|
4131
4271
|
delegate: PublicKey;
|
|
4132
4272
|
openTime: BN;
|
|
4133
4273
|
updateTime: BN;
|
|
@@ -4141,15 +4281,22 @@ export declare class PerpetualsClient {
|
|
|
4141
4281
|
lockedUsd: BN;
|
|
4142
4282
|
collateralAmount: BN;
|
|
4143
4283
|
collateralUsd: BN;
|
|
4144
|
-
|
|
4284
|
+
unsettledValueUsd: BN;
|
|
4145
4285
|
unsettledFeesUsd: BN;
|
|
4146
4286
|
cumulativeLockFeeSnapshot: BN;
|
|
4147
4287
|
degenSizeUsd: BN;
|
|
4288
|
+
referencePrice: {
|
|
4289
|
+
price: BN;
|
|
4290
|
+
exponent: number;
|
|
4291
|
+
};
|
|
4148
4292
|
sizeDecimals: number;
|
|
4149
4293
|
lockedDecimals: number;
|
|
4150
4294
|
collateralDecimals: number;
|
|
4151
4295
|
key: PublicKey;
|
|
4152
4296
|
feeAmount: BN;
|
|
4297
|
+
allowPayout: boolean;
|
|
4298
|
+
availableUsd: BN;
|
|
4299
|
+
availableAmount: BN;
|
|
4153
4300
|
refererTokenStakeAccount: PublicKey;
|
|
4154
4301
|
refererBoosterAccount: PublicKey;
|
|
4155
4302
|
level: number;
|
|
@@ -4163,6 +4310,7 @@ export declare class PerpetualsClient {
|
|
|
4163
4310
|
rewardTokens: BN;
|
|
4164
4311
|
unclaimedRevenueAmount: BN;
|
|
4165
4312
|
revenueSnapshot: BN;
|
|
4313
|
+
claimableRebateUsd: BN;
|
|
4166
4314
|
tokenMint: PublicKey;
|
|
4167
4315
|
tokenVaultTokenAccount: PublicKey;
|
|
4168
4316
|
tokenPermissions: {
|
|
@@ -4245,7 +4393,7 @@ export declare class PerpetualsClient {
|
|
|
4245
4393
|
maxUtilization: number;
|
|
4246
4394
|
degenPositionFactor: number;
|
|
4247
4395
|
degenExposureFactor: number;
|
|
4248
|
-
|
|
4396
|
+
maxPositionSizeUsd: BN;
|
|
4249
4397
|
maxExposureUsd: BN;
|
|
4250
4398
|
};
|
|
4251
4399
|
permissions: {
|
|
@@ -4338,7 +4486,7 @@ export declare class PerpetualsClient {
|
|
|
4338
4486
|
reservedAmount: BN;
|
|
4339
4487
|
minReserveUsd: BN;
|
|
4340
4488
|
limitPriceBufferBps: BN;
|
|
4341
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
4489
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4342
4490
|
owner: PublicKey;
|
|
4343
4491
|
stakeStats: {
|
|
4344
4492
|
pendingActivation: BN;
|
|
@@ -4372,7 +4520,7 @@ export declare class PerpetualsClient {
|
|
|
4372
4520
|
lockedAmount: BN;
|
|
4373
4521
|
lockedUsd: BN;
|
|
4374
4522
|
collateralAmount: BN;
|
|
4375
|
-
|
|
4523
|
+
collateralLiabilityUsd: BN;
|
|
4376
4524
|
unsettledFeeUsd: BN;
|
|
4377
4525
|
cumulativeLockFeeSnapshot: BN;
|
|
4378
4526
|
sizeDecimals: number;
|
|
@@ -4381,7 +4529,7 @@ export declare class PerpetualsClient {
|
|
|
4381
4529
|
};
|
|
4382
4530
|
targetCustodyUid: number;
|
|
4383
4531
|
collateralCustodyUid: number;
|
|
4384
|
-
padding2: number[] | BN[]
|
|
4532
|
+
padding2: number[] | BN[];
|
|
4385
4533
|
numSigners: number;
|
|
4386
4534
|
numSigned: number;
|
|
4387
4535
|
minSignatures: number;
|
|
@@ -4395,6 +4543,7 @@ export declare class PerpetualsClient {
|
|
|
4395
4543
|
conf: BN;
|
|
4396
4544
|
ema: BN;
|
|
4397
4545
|
publishTime: BN;
|
|
4546
|
+
extOracleAccount: PublicKey;
|
|
4398
4547
|
market: PublicKey;
|
|
4399
4548
|
limitOrders: unknown;
|
|
4400
4549
|
takeProfitOrders: unknown;
|
|
@@ -4437,7 +4586,7 @@ export declare class PerpetualsClient {
|
|
|
4437
4586
|
}[];
|
|
4438
4587
|
markets: PublicKey[];
|
|
4439
4588
|
maxAumUsd: BN;
|
|
4440
|
-
buffer: BN;
|
|
4589
|
+
buffer: number | BN;
|
|
4441
4590
|
rawAumUsd: BN;
|
|
4442
4591
|
equityUsd: BN;
|
|
4443
4592
|
totalStaked: {
|
|
@@ -4468,6 +4617,9 @@ export declare class PerpetualsClient {
|
|
|
4468
4617
|
lpPrice: BN;
|
|
4469
4618
|
compoundingLpPrice: BN;
|
|
4470
4619
|
lastUpdatedTimestamp: BN;
|
|
4620
|
+
feesObligationUsd: BN;
|
|
4621
|
+
rebateObligationUsd: BN;
|
|
4622
|
+
thresholdUsd: BN;
|
|
4471
4623
|
delegate: PublicKey;
|
|
4472
4624
|
openTime: BN;
|
|
4473
4625
|
updateTime: BN;
|
|
@@ -4481,15 +4633,22 @@ export declare class PerpetualsClient {
|
|
|
4481
4633
|
lockedUsd: BN;
|
|
4482
4634
|
collateralAmount: BN;
|
|
4483
4635
|
collateralUsd: BN;
|
|
4484
|
-
|
|
4636
|
+
unsettledValueUsd: BN;
|
|
4485
4637
|
unsettledFeesUsd: BN;
|
|
4486
4638
|
cumulativeLockFeeSnapshot: BN;
|
|
4487
4639
|
degenSizeUsd: BN;
|
|
4640
|
+
referencePrice: {
|
|
4641
|
+
price: BN;
|
|
4642
|
+
exponent: number;
|
|
4643
|
+
};
|
|
4488
4644
|
sizeDecimals: number;
|
|
4489
4645
|
lockedDecimals: number;
|
|
4490
4646
|
collateralDecimals: number;
|
|
4491
4647
|
key: PublicKey;
|
|
4492
4648
|
feeAmount: BN;
|
|
4649
|
+
allowPayout: boolean;
|
|
4650
|
+
availableUsd: BN;
|
|
4651
|
+
availableAmount: BN;
|
|
4493
4652
|
refererTokenStakeAccount: PublicKey;
|
|
4494
4653
|
refererBoosterAccount: PublicKey;
|
|
4495
4654
|
level: number;
|
|
@@ -4503,6 +4662,7 @@ export declare class PerpetualsClient {
|
|
|
4503
4662
|
rewardTokens: BN;
|
|
4504
4663
|
unclaimedRevenueAmount: BN;
|
|
4505
4664
|
revenueSnapshot: BN;
|
|
4665
|
+
claimableRebateUsd: BN;
|
|
4506
4666
|
tokenMint: PublicKey;
|
|
4507
4667
|
tokenVaultTokenAccount: PublicKey;
|
|
4508
4668
|
tokenPermissions: {
|
|
@@ -4566,9 +4726,9 @@ export declare class PerpetualsClient {
|
|
|
4566
4726
|
getMinAndMaxPriceSync: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount) => MinAndMaxPrice;
|
|
4567
4727
|
checkIfPriceStaleOrCustom: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount, timestampInSeconds: BN) => boolean;
|
|
4568
4728
|
getAveragePriceSync: (price1: BN, size1: BN, price2: BN, size2: BN) => BN;
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4729
|
+
getLeverageContractHelper: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, isInitial: boolean, poolConfig: PoolConfig) => BN;
|
|
4730
|
+
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;
|
|
4731
|
+
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;
|
|
4572
4732
|
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;
|
|
4573
4733
|
getEntryPriceUsdSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
|
4574
4734
|
getPriceAfterSlippage(isEntry: boolean, slippageBps: BN, targetPrice: OraclePrice, side: Side): ContractOraclePrice;
|
|
@@ -4579,27 +4739,31 @@ export declare class PerpetualsClient {
|
|
|
4579
4739
|
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;
|
|
4580
4740
|
getTradeSpread: (targetCustodyAccount: CustodyAccount, sizeUsd: BN) => BN;
|
|
4581
4741
|
getExitOraclePriceSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
|
4582
|
-
getExitOraclePriceWithoutSpreadSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
|
4583
4742
|
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;
|
|
4584
|
-
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,
|
|
4743
|
+
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;
|
|
4585
4744
|
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;
|
|
4586
|
-
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,
|
|
4745
|
+
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;
|
|
4587
4746
|
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;
|
|
4588
|
-
getMaxWithdrawableAmountSyncInternal: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig,
|
|
4747
|
+
getMaxWithdrawableAmountSyncInternal: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, closeAmountUsd?: BN, errorBandwidthPercentageUi?: number) => {
|
|
4589
4748
|
maxWithdrawableAmount: BN;
|
|
4749
|
+
maxWithdrawableAmountUsd: BN;
|
|
4590
4750
|
diff: BN;
|
|
4591
4751
|
};
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4752
|
+
getFinalCloseAmountUsdSync: (positionAccount: PositionAccount, marketCorrelation: boolean, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig) => {
|
|
4753
|
+
closeAmountUsd: BN;
|
|
4754
|
+
feesAmountUsd: BN;
|
|
4755
|
+
};
|
|
4756
|
+
getMaxWithdrawableAmountSync: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => {
|
|
4757
|
+
maxWithdrawableAmount: BN;
|
|
4758
|
+
maxWithdrawableAmountUsd: BN;
|
|
4595
4759
|
};
|
|
4596
|
-
getMaxWithdrawableAmountSync: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => BN;
|
|
4597
4760
|
getCumulativeLockFeeSync: (custodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
|
4598
4761
|
getBorrowRateSync: (custodyAccount: CustodyAccount, currentUtilization: BN) => BN;
|
|
4599
4762
|
getLockFeeAndUnsettledUsdForPosition: (position: PositionAccount, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
|
4600
4763
|
getLockedUsd: (sideUsd: BN, side: Side, marketCorrelation: boolean, maxPayOffBps: BN) => BN;
|
|
4601
|
-
|
|
4602
|
-
|
|
4764
|
+
getLiquidationPriceContractHelper: (entryOraclePrice: OraclePrice, lockAndUnsettledFeeUsd: BN, side: Side, targetCustodyAccount: CustodyAccount, positionAccount: PositionAccount) => OraclePrice;
|
|
4765
|
+
getLiquidationPriceSync: (collateralUsd: BN, sizeAmount: BN, entryOraclePrice: OraclePrice, lockAndUnsettledFeeUsd: BN, side: Side, targetPrice: OraclePrice, targetCustodyAccount: CustodyAccount, positionAccount: PositionAccount) => OraclePrice;
|
|
4766
|
+
getLiquidationPriceWithOrder: (collateralUsd: BN, sizeAmount: BN, sizeUsd: BN, sizeDecimals: number, limitOraclePrice: OraclePrice, side: Side, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
|
4603
4767
|
getMaxProfitPriceSync: (entryPrice: OraclePrice, marketCorrelation: boolean, side: Side, positionAccount: PositionAccount) => OraclePrice;
|
|
4604
4768
|
getEstimateProfitLossforTpSlEntry: (positionAccount: PositionAccount | null, isTakeProfit: boolean, userEntrytpSlOraclePrice: OraclePrice, collateralDeltaAmount: BN, sizeDeltaAmount: BN, side: Side, marketAccountPk: PublicKey, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, poolConfig: PoolConfig) => {
|
|
4605
4769
|
pnlUsd: BN;
|
|
@@ -4611,6 +4775,10 @@ export declare class PerpetualsClient {
|
|
|
4611
4775
|
profitUsd: BN;
|
|
4612
4776
|
lossUsd: BN;
|
|
4613
4777
|
};
|
|
4778
|
+
getPnlContractHelper: (positionAccount: PositionAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, delay: BN, poolConfig: PoolConfig) => {
|
|
4779
|
+
profitUsd: BN;
|
|
4780
|
+
lossUsd: BN;
|
|
4781
|
+
};
|
|
4614
4782
|
getSwapAmountAndFeesSync: (amountIn: BN, amountOut: BN, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, outputTokenPrice: OraclePrice, outputTokenEmaPrice: OraclePrice, outputTokenCustodyAccount: CustodyAccount, poolAumUsdMax: BN, poolConfig: PoolConfig) => {
|
|
4615
4783
|
minAmountOut: BN;
|
|
4616
4784
|
minAmountIn: BN;
|
|
@@ -4621,8 +4789,9 @@ export declare class PerpetualsClient {
|
|
|
4621
4789
|
poolAmountUsd: BN;
|
|
4622
4790
|
poolEquityUsd: BN;
|
|
4623
4791
|
};
|
|
4624
|
-
|
|
4625
|
-
|
|
4792
|
+
getAssetsUnderManagementUsdContractHelper: (poolAccount: PoolAccount, tokenPrices: OraclePrice[], tokenEmaPrices: OraclePrice[], custodies: CustodyAccount[], markets: MarketAccount[], aumCalcMode: "includePnl" | "excludePnl", currentTime: BN, poolConfig: PoolConfig) => {
|
|
4793
|
+
poolAmountUsd: BN;
|
|
4794
|
+
poolEquityUsd: BN;
|
|
4626
4795
|
};
|
|
4627
4796
|
getFeeDiscount: (perpetualsAccount: PerpetualsAccount, tokenStakeAccount: TokenStake, currentTime: BN) => {
|
|
4628
4797
|
discountBn: BN;
|
|
@@ -4632,12 +4801,14 @@ export declare class PerpetualsClient {
|
|
|
4632
4801
|
getStakedLpTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4633
4802
|
getAssetsUnderManagement: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4634
4803
|
getAddLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
4635
|
-
amount: BN;
|
|
4636
|
-
fee: BN;
|
|
4804
|
+
amount: BN | undefined;
|
|
4805
|
+
fee: BN | undefined;
|
|
4806
|
+
error?: string;
|
|
4637
4807
|
}>;
|
|
4638
4808
|
getRemoveLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, removeTokenCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
4639
4809
|
amount: BN;
|
|
4640
4810
|
fee: BN;
|
|
4811
|
+
error?: string;
|
|
4641
4812
|
}>;
|
|
4642
4813
|
getCompoundingLPTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4643
4814
|
getAddCompoundingLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
@@ -4652,19 +4823,19 @@ export declare class PerpetualsClient {
|
|
|
4652
4823
|
getLiquidationStateView: (positionAccount: PublicKey, poolName: string, tokenMint: PublicKey, collateralMint: PublicKey, poolConfig: PoolConfig) => Promise<any>;
|
|
4653
4824
|
getCompoundingTokenDataView: (poolConfig: PoolConfig) => Promise<any>;
|
|
4654
4825
|
getLpTokenPriceView: (poolConfig: PoolConfig) => Promise<any>;
|
|
4655
|
-
openPosition: (targetSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, collateralWithfee: BN, size: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey,
|
|
4826
|
+
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<{
|
|
4656
4827
|
instructions: TransactionInstruction[];
|
|
4657
4828
|
additionalSigners: Signer[];
|
|
4658
4829
|
}>;
|
|
4659
|
-
closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey,
|
|
4830
|
+
closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4660
4831
|
instructions: TransactionInstruction[];
|
|
4661
4832
|
additionalSigners: Signer[];
|
|
4662
4833
|
}>;
|
|
4663
|
-
swapAndOpen: (targetTokenSymbol: string, collateralTokenSymbol: string, userInputTokenSymbol: string, amountIn: BN,
|
|
4834
|
+
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<{
|
|
4664
4835
|
instructions: TransactionInstruction[];
|
|
4665
4836
|
additionalSigners: Signer[];
|
|
4666
4837
|
}>;
|
|
4667
|
-
closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string,
|
|
4838
|
+
closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, ephemeralSignerPubkey?: any) => Promise<{
|
|
4668
4839
|
instructions: TransactionInstruction[];
|
|
4669
4840
|
additionalSigners: Signer[];
|
|
4670
4841
|
}>;
|
|
@@ -4672,23 +4843,23 @@ export declare class PerpetualsClient {
|
|
|
4672
4843
|
instructions: TransactionInstruction[];
|
|
4673
4844
|
additionalSigners: Signer[];
|
|
4674
4845
|
}>;
|
|
4675
|
-
swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN,
|
|
4846
|
+
swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4676
4847
|
instructions: TransactionInstruction[];
|
|
4677
4848
|
additionalSigners: Signer[];
|
|
4678
4849
|
}>;
|
|
4679
|
-
removeCollateral: (
|
|
4850
|
+
removeCollateral: (collateralDeltaUsd: BN, marketSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4680
4851
|
instructions: TransactionInstruction[];
|
|
4681
4852
|
additionalSigners: Signer[];
|
|
4682
4853
|
}>;
|
|
4683
|
-
removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string,
|
|
4854
|
+
removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string, collateralDeltaUsd: BN, side: Side, poolConfig: PoolConfig, ephemeralSignerPubkey?: any) => Promise<{
|
|
4684
4855
|
instructions: TransactionInstruction[];
|
|
4685
4856
|
additionalSigners: Signer[];
|
|
4686
4857
|
}>;
|
|
4687
|
-
increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4858
|
+
increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4688
4859
|
instructions: TransactionInstruction[];
|
|
4689
4860
|
additionalSigners: Signer[];
|
|
4690
4861
|
}>;
|
|
4691
|
-
decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4862
|
+
decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4692
4863
|
instructions: TransactionInstruction[];
|
|
4693
4864
|
additionalSigners: Signer[];
|
|
4694
4865
|
}>;
|
|
@@ -4708,14 +4879,6 @@ export declare class PerpetualsClient {
|
|
|
4708
4879
|
instructions: TransactionInstruction[];
|
|
4709
4880
|
additionalSigners: Signer[];
|
|
4710
4881
|
}>;
|
|
4711
|
-
updateNftAccount: (nftMint: PublicKey, updateReferer: boolean, updateBooster: boolean, flpStakeAccounts: PublicKey[]) => Promise<{
|
|
4712
|
-
instructions: TransactionInstruction[];
|
|
4713
|
-
additionalSigners: Signer[];
|
|
4714
|
-
}>;
|
|
4715
|
-
levelUp: (poolConfig: PoolConfig, nftMint: PublicKey, authorizationRulesAccount: PublicKey) => Promise<{
|
|
4716
|
-
instructions: TransactionInstruction[];
|
|
4717
|
-
additionalSigners: Signer[];
|
|
4718
|
-
}>;
|
|
4719
4882
|
depositStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
4720
4883
|
instructions: TransactionInstruction[];
|
|
4721
4884
|
additionalSigners: Signer[];
|
|
@@ -4759,14 +4922,6 @@ export declare class PerpetualsClient {
|
|
|
4759
4922
|
instructions: TransactionInstruction[];
|
|
4760
4923
|
additionalSigners: Signer[];
|
|
4761
4924
|
}>;
|
|
4762
|
-
burnAndClaim: (owner: PublicKey, nftMint: PublicKey, poolConfig: PoolConfig, createAta: boolean) => Promise<{
|
|
4763
|
-
instructions: TransactionInstruction[];
|
|
4764
|
-
additionalSigners: Signer[];
|
|
4765
|
-
}>;
|
|
4766
|
-
burnAndStake: (owner: PublicKey, feePayer: PublicKey, nftMint: PublicKey, poolConfig: PoolConfig) => Promise<{
|
|
4767
|
-
instructions: TransactionInstruction[];
|
|
4768
|
-
additionalSigners: Signer[];
|
|
4769
|
-
}>;
|
|
4770
4925
|
depositTokenStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
4771
4926
|
instructions: TransactionInstruction[];
|
|
4772
4927
|
additionalSigners: Signer[];
|
|
@@ -4795,19 +4950,11 @@ export declare class PerpetualsClient {
|
|
|
4795
4950
|
instructions: TransactionInstruction[];
|
|
4796
4951
|
additionalSigners: Signer[];
|
|
4797
4952
|
}>;
|
|
4798
|
-
|
|
4799
|
-
instructions: TransactionInstruction[];
|
|
4800
|
-
additionalSigners: Signer[];
|
|
4801
|
-
}>;
|
|
4802
|
-
distributeReward: (rewardAmount: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4953
|
+
collectRebate: (owner: PublicKey, rebateSymbol: string, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
|
|
4803
4954
|
instructions: TransactionInstruction[];
|
|
4804
4955
|
additionalSigners: Signer[];
|
|
4805
4956
|
}>;
|
|
4806
|
-
|
|
4807
|
-
instructions: TransactionInstruction[];
|
|
4808
|
-
additionalSigners: Signer[];
|
|
4809
|
-
}>;
|
|
4810
|
-
collectAndDistributeFee: (rewardSymbol: string, poolConfig: PoolConfig, createUserATA?: boolean, nftTradingAccount?: PublicKey) => Promise<{
|
|
4957
|
+
settleRebates: (owner: PublicKey, rebateSymbol: string, rewardSymbol: string, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
|
|
4811
4958
|
instructions: TransactionInstruction[];
|
|
4812
4959
|
additionalSigners: Signer[];
|
|
4813
4960
|
}>;
|
|
@@ -4819,11 +4966,11 @@ export declare class PerpetualsClient {
|
|
|
4819
4966
|
instructions: TransactionInstruction[];
|
|
4820
4967
|
additionalSigners: Signer[];
|
|
4821
4968
|
}>;
|
|
4822
|
-
executeLimitOrder: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4969
|
+
executeLimitOrder: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4823
4970
|
instructions: TransactionInstruction[];
|
|
4824
4971
|
additionalSigners: Signer[];
|
|
4825
4972
|
}>;
|
|
4826
|
-
executeLimitWithSwap: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4973
|
+
executeLimitWithSwap: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4827
4974
|
instructions: TransactionInstruction[];
|
|
4828
4975
|
additionalSigners: Signer[];
|
|
4829
4976
|
}>;
|
|
@@ -4843,11 +4990,11 @@ export declare class PerpetualsClient {
|
|
|
4843
4990
|
instructions: TransactionInstruction[];
|
|
4844
4991
|
additionalSigners: Signer[];
|
|
4845
4992
|
}>;
|
|
4846
|
-
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
|
|
4993
|
+
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<{
|
|
4847
4994
|
instructions: TransactionInstruction[];
|
|
4848
4995
|
additionalSigners: Signer[];
|
|
4849
4996
|
}>;
|
|
4850
|
-
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
|
|
4997
|
+
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<{
|
|
4851
4998
|
instructions: TransactionInstruction[];
|
|
4852
4999
|
additionalSigners: Signer[];
|
|
4853
5000
|
}>;
|
|
@@ -4892,11 +5039,11 @@ export declare class PerpetualsClient {
|
|
|
4892
5039
|
instructions: TransactionInstruction[];
|
|
4893
5040
|
additionalSigners: Signer[];
|
|
4894
5041
|
}>;
|
|
4895
|
-
setInternalOraclePrice: (tokenMint: PublicKey, price: BN, expo: number, conf: BN, ema: BN, publishTime: BN, poolConfig: PoolConfig) => Promise<{
|
|
5042
|
+
setInternalOraclePrice: (tokenMint: PublicKey, useCurrentTime: number, price: BN, expo: number, conf: BN, ema: BN, publishTime: BN, poolConfig: PoolConfig) => Promise<{
|
|
4896
5043
|
instructions: TransactionInstruction[];
|
|
4897
5044
|
additionalSigners: Signer[];
|
|
4898
5045
|
}>;
|
|
4899
|
-
setInternalOraclePriceBatch: (tokenMintList: PublicKey[], tokenInternalPrices: InternalPrice[], POOL_CONFIGS: PoolConfig[]) => Promise<{
|
|
5046
|
+
setInternalOraclePriceBatch: (useCurrentTime: number, tokenMintList: PublicKey[], tokenInternalPrices: InternalPrice[], POOL_CONFIGS: PoolConfig[]) => Promise<{
|
|
4900
5047
|
instructions: TransactionInstruction[];
|
|
4901
5048
|
additionalSigners: Signer[];
|
|
4902
5049
|
}>;
|
|
@@ -4928,6 +5075,10 @@ export declare class PerpetualsClient {
|
|
|
4928
5075
|
instructions: TransactionInstruction[];
|
|
4929
5076
|
additionalSigners: Signer[];
|
|
4930
5077
|
}>;
|
|
5078
|
+
withdrawUnclaimedTokens: (poolConfig: PoolConfig) => Promise<{
|
|
5079
|
+
instructions: TransactionInstruction[];
|
|
5080
|
+
additionalSigners: Signer[];
|
|
5081
|
+
}>;
|
|
4931
5082
|
initRevenueTokenAccount: (feeShareBps: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4932
5083
|
instructions: TransactionInstruction[];
|
|
4933
5084
|
additionalSigners: Signer[];
|
|
@@ -4944,4 +5095,8 @@ export declare class PerpetualsClient {
|
|
|
4944
5095
|
instructions: TransactionInstruction[];
|
|
4945
5096
|
additionalSigners: Signer[];
|
|
4946
5097
|
}>;
|
|
5098
|
+
resizeInternalOracle: (extOracle: PublicKey, tokenMint: PublicKey, intOracleAccount: PublicKey) => Promise<{
|
|
5099
|
+
instructions: TransactionInstruction[];
|
|
5100
|
+
additionalSigners: Signer[];
|
|
5101
|
+
}>;
|
|
4947
5102
|
}
|