flash-sdk 9.0.2 → 9.0.3-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 +303 -144
- package/dist/PerpetualsClient.js +718 -1076
- package/dist/PoolAccount.d.ts +3 -0
- package/dist/PoolConfig.d.ts +3 -1
- package/dist/PoolConfig.js +4 -2
- package/dist/PoolConfig.json +186 -3238
- package/dist/PositionAccount.d.ts +3 -2
- package/dist/TokenStakeAccount.d.ts +2 -2
- package/dist/TokenStakeAccount.js +2 -2
- package/dist/backupOracle.d.ts +0 -1
- package/dist/backupOracle.js +3 -3
- 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 +18 -4
- 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 -24
- package/dist/TradingAccount.js +0 -17
|
@@ -4,7 +4,7 @@ import { Program, AnchorProvider, BN } from "@coral-xyz/anchor";
|
|
|
4
4
|
import { PublicKey, TransactionInstruction, Commitment, Signer, AddressLookupTableAccount, VersionedTransaction } from "@solana/web3.js";
|
|
5
5
|
import { PoolAccount } from "./PoolAccount";
|
|
6
6
|
import { PositionAccount } from "./PositionAccount";
|
|
7
|
-
import { AddLiquidityAmountAndFee, InternalPrice, BorrowRateParams, ExitPriceAndFee, Fees, OracleParams, Permissions, PricingParams, RemoveCollateralData, RemoveLiquidityAmountAndFee, Side, TokenRatios, MinAndMaxPrice, 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";
|
|
8
8
|
import { OraclePrice } from "./OraclePrice";
|
|
9
9
|
import { CustodyAccount } from "./CustodyAccount";
|
|
10
10
|
import { Perpetuals } from "./idl/perpetuals";
|
|
@@ -111,7 +111,7 @@ export declare class PerpetualsClient {
|
|
|
111
111
|
maxUtilization: number;
|
|
112
112
|
degenPositionFactor: number;
|
|
113
113
|
degenExposureFactor: number;
|
|
114
|
-
|
|
114
|
+
maxPositionSizeUsd: BN;
|
|
115
115
|
maxExposureUsd: BN;
|
|
116
116
|
};
|
|
117
117
|
permissions: {
|
|
@@ -204,7 +204,7 @@ export declare class PerpetualsClient {
|
|
|
204
204
|
reservedAmount: BN;
|
|
205
205
|
minReserveUsd: BN;
|
|
206
206
|
limitPriceBufferBps: BN;
|
|
207
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
207
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
208
208
|
owner: PublicKey;
|
|
209
209
|
stakeStats: {
|
|
210
210
|
pendingActivation: BN;
|
|
@@ -238,7 +238,7 @@ export declare class PerpetualsClient {
|
|
|
238
238
|
lockedAmount: BN;
|
|
239
239
|
lockedUsd: BN;
|
|
240
240
|
collateralAmount: BN;
|
|
241
|
-
|
|
241
|
+
collateralLiabilityUsd: BN;
|
|
242
242
|
unsettledFeeUsd: BN;
|
|
243
243
|
cumulativeLockFeeSnapshot: BN;
|
|
244
244
|
sizeDecimals: number;
|
|
@@ -247,7 +247,7 @@ export declare class PerpetualsClient {
|
|
|
247
247
|
};
|
|
248
248
|
targetCustodyUid: number;
|
|
249
249
|
collateralCustodyUid: number;
|
|
250
|
-
padding2: number[] | BN[]
|
|
250
|
+
padding2: number[] | BN[];
|
|
251
251
|
numSigners: number;
|
|
252
252
|
numSigned: number;
|
|
253
253
|
minSignatures: number;
|
|
@@ -261,6 +261,7 @@ export declare class PerpetualsClient {
|
|
|
261
261
|
conf: BN;
|
|
262
262
|
ema: BN;
|
|
263
263
|
publishTime: BN;
|
|
264
|
+
extOracleAccount: PublicKey;
|
|
264
265
|
market: PublicKey;
|
|
265
266
|
limitOrders: unknown;
|
|
266
267
|
takeProfitOrders: unknown;
|
|
@@ -303,7 +304,7 @@ export declare class PerpetualsClient {
|
|
|
303
304
|
}[];
|
|
304
305
|
markets: PublicKey[];
|
|
305
306
|
maxAumUsd: BN;
|
|
306
|
-
buffer: BN;
|
|
307
|
+
buffer: number | BN;
|
|
307
308
|
rawAumUsd: BN;
|
|
308
309
|
equityUsd: BN;
|
|
309
310
|
totalStaked: {
|
|
@@ -334,6 +335,9 @@ export declare class PerpetualsClient {
|
|
|
334
335
|
lpPrice: BN;
|
|
335
336
|
compoundingLpPrice: BN;
|
|
336
337
|
lastUpdatedTimestamp: BN;
|
|
338
|
+
feesObligationUsd: BN;
|
|
339
|
+
rebateObligationUsd: BN;
|
|
340
|
+
thresholdUsd: BN;
|
|
337
341
|
delegate: PublicKey;
|
|
338
342
|
openTime: BN;
|
|
339
343
|
updateTime: BN;
|
|
@@ -347,15 +351,22 @@ export declare class PerpetualsClient {
|
|
|
347
351
|
lockedUsd: BN;
|
|
348
352
|
collateralAmount: BN;
|
|
349
353
|
collateralUsd: BN;
|
|
350
|
-
|
|
354
|
+
unsettledValueUsd: BN;
|
|
351
355
|
unsettledFeesUsd: BN;
|
|
352
356
|
cumulativeLockFeeSnapshot: BN;
|
|
353
357
|
degenSizeUsd: BN;
|
|
358
|
+
referencePrice: {
|
|
359
|
+
price: BN;
|
|
360
|
+
exponent: number;
|
|
361
|
+
};
|
|
354
362
|
sizeDecimals: number;
|
|
355
363
|
lockedDecimals: number;
|
|
356
364
|
collateralDecimals: number;
|
|
357
365
|
key: PublicKey;
|
|
358
366
|
feeAmount: BN;
|
|
367
|
+
allowPayout: boolean;
|
|
368
|
+
availableUsd: BN;
|
|
369
|
+
availableAmount: BN;
|
|
359
370
|
refererTokenStakeAccount: PublicKey;
|
|
360
371
|
refererBoosterAccount: PublicKey;
|
|
361
372
|
level: number;
|
|
@@ -369,6 +380,7 @@ export declare class PerpetualsClient {
|
|
|
369
380
|
rewardTokens: BN;
|
|
370
381
|
unclaimedRevenueAmount: BN;
|
|
371
382
|
revenueSnapshot: BN;
|
|
383
|
+
claimableRebateUsd: BN;
|
|
372
384
|
tokenMint: PublicKey;
|
|
373
385
|
tokenVaultTokenAccount: PublicKey;
|
|
374
386
|
tokenPermissions: {
|
|
@@ -452,7 +464,7 @@ export declare class PerpetualsClient {
|
|
|
452
464
|
maxUtilization: number;
|
|
453
465
|
degenPositionFactor: number;
|
|
454
466
|
degenExposureFactor: number;
|
|
455
|
-
|
|
467
|
+
maxPositionSizeUsd: BN;
|
|
456
468
|
maxExposureUsd: BN;
|
|
457
469
|
};
|
|
458
470
|
permissions: {
|
|
@@ -545,7 +557,7 @@ export declare class PerpetualsClient {
|
|
|
545
557
|
reservedAmount: BN;
|
|
546
558
|
minReserveUsd: BN;
|
|
547
559
|
limitPriceBufferBps: BN;
|
|
548
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
560
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
549
561
|
owner: PublicKey;
|
|
550
562
|
stakeStats: {
|
|
551
563
|
pendingActivation: BN;
|
|
@@ -579,7 +591,7 @@ export declare class PerpetualsClient {
|
|
|
579
591
|
lockedAmount: BN;
|
|
580
592
|
lockedUsd: BN;
|
|
581
593
|
collateralAmount: BN;
|
|
582
|
-
|
|
594
|
+
collateralLiabilityUsd: BN;
|
|
583
595
|
unsettledFeeUsd: BN;
|
|
584
596
|
cumulativeLockFeeSnapshot: BN;
|
|
585
597
|
sizeDecimals: number;
|
|
@@ -588,7 +600,7 @@ export declare class PerpetualsClient {
|
|
|
588
600
|
};
|
|
589
601
|
targetCustodyUid: number;
|
|
590
602
|
collateralCustodyUid: number;
|
|
591
|
-
padding2: number[] | BN[]
|
|
603
|
+
padding2: number[] | BN[];
|
|
592
604
|
numSigners: number;
|
|
593
605
|
numSigned: number;
|
|
594
606
|
minSignatures: number;
|
|
@@ -602,6 +614,7 @@ export declare class PerpetualsClient {
|
|
|
602
614
|
conf: BN;
|
|
603
615
|
ema: BN;
|
|
604
616
|
publishTime: BN;
|
|
617
|
+
extOracleAccount: PublicKey;
|
|
605
618
|
market: PublicKey;
|
|
606
619
|
limitOrders: unknown;
|
|
607
620
|
takeProfitOrders: unknown;
|
|
@@ -644,7 +657,7 @@ export declare class PerpetualsClient {
|
|
|
644
657
|
}[];
|
|
645
658
|
markets: PublicKey[];
|
|
646
659
|
maxAumUsd: BN;
|
|
647
|
-
buffer: BN;
|
|
660
|
+
buffer: number | BN;
|
|
648
661
|
rawAumUsd: BN;
|
|
649
662
|
equityUsd: BN;
|
|
650
663
|
totalStaked: {
|
|
@@ -675,6 +688,9 @@ export declare class PerpetualsClient {
|
|
|
675
688
|
lpPrice: BN;
|
|
676
689
|
compoundingLpPrice: BN;
|
|
677
690
|
lastUpdatedTimestamp: BN;
|
|
691
|
+
feesObligationUsd: BN;
|
|
692
|
+
rebateObligationUsd: BN;
|
|
693
|
+
thresholdUsd: BN;
|
|
678
694
|
delegate: PublicKey;
|
|
679
695
|
openTime: BN;
|
|
680
696
|
updateTime: BN;
|
|
@@ -688,15 +704,22 @@ export declare class PerpetualsClient {
|
|
|
688
704
|
lockedUsd: BN;
|
|
689
705
|
collateralAmount: BN;
|
|
690
706
|
collateralUsd: BN;
|
|
691
|
-
|
|
707
|
+
unsettledValueUsd: BN;
|
|
692
708
|
unsettledFeesUsd: BN;
|
|
693
709
|
cumulativeLockFeeSnapshot: BN;
|
|
694
710
|
degenSizeUsd: BN;
|
|
711
|
+
referencePrice: {
|
|
712
|
+
price: BN;
|
|
713
|
+
exponent: number;
|
|
714
|
+
};
|
|
695
715
|
sizeDecimals: number;
|
|
696
716
|
lockedDecimals: number;
|
|
697
717
|
collateralDecimals: number;
|
|
698
718
|
key: PublicKey;
|
|
699
719
|
feeAmount: BN;
|
|
720
|
+
allowPayout: boolean;
|
|
721
|
+
availableUsd: BN;
|
|
722
|
+
availableAmount: BN;
|
|
700
723
|
refererTokenStakeAccount: PublicKey;
|
|
701
724
|
refererBoosterAccount: PublicKey;
|
|
702
725
|
level: number;
|
|
@@ -710,6 +733,7 @@ export declare class PerpetualsClient {
|
|
|
710
733
|
rewardTokens: BN;
|
|
711
734
|
unclaimedRevenueAmount: BN;
|
|
712
735
|
revenueSnapshot: BN;
|
|
736
|
+
claimableRebateUsd: BN;
|
|
713
737
|
tokenMint: PublicKey;
|
|
714
738
|
tokenVaultTokenAccount: PublicKey;
|
|
715
739
|
tokenPermissions: {
|
|
@@ -792,7 +816,7 @@ export declare class PerpetualsClient {
|
|
|
792
816
|
maxUtilization: number;
|
|
793
817
|
degenPositionFactor: number;
|
|
794
818
|
degenExposureFactor: number;
|
|
795
|
-
|
|
819
|
+
maxPositionSizeUsd: BN;
|
|
796
820
|
maxExposureUsd: BN;
|
|
797
821
|
};
|
|
798
822
|
permissions: {
|
|
@@ -885,7 +909,7 @@ export declare class PerpetualsClient {
|
|
|
885
909
|
reservedAmount: BN;
|
|
886
910
|
minReserveUsd: BN;
|
|
887
911
|
limitPriceBufferBps: BN;
|
|
888
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
912
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
889
913
|
owner: PublicKey;
|
|
890
914
|
stakeStats: {
|
|
891
915
|
pendingActivation: BN;
|
|
@@ -919,7 +943,7 @@ export declare class PerpetualsClient {
|
|
|
919
943
|
lockedAmount: BN;
|
|
920
944
|
lockedUsd: BN;
|
|
921
945
|
collateralAmount: BN;
|
|
922
|
-
|
|
946
|
+
collateralLiabilityUsd: BN;
|
|
923
947
|
unsettledFeeUsd: BN;
|
|
924
948
|
cumulativeLockFeeSnapshot: BN;
|
|
925
949
|
sizeDecimals: number;
|
|
@@ -928,7 +952,7 @@ export declare class PerpetualsClient {
|
|
|
928
952
|
};
|
|
929
953
|
targetCustodyUid: number;
|
|
930
954
|
collateralCustodyUid: number;
|
|
931
|
-
padding2: number[] | BN[]
|
|
955
|
+
padding2: number[] | BN[];
|
|
932
956
|
numSigners: number;
|
|
933
957
|
numSigned: number;
|
|
934
958
|
minSignatures: number;
|
|
@@ -942,6 +966,7 @@ export declare class PerpetualsClient {
|
|
|
942
966
|
conf: BN;
|
|
943
967
|
ema: BN;
|
|
944
968
|
publishTime: BN;
|
|
969
|
+
extOracleAccount: PublicKey;
|
|
945
970
|
market: PublicKey;
|
|
946
971
|
limitOrders: unknown;
|
|
947
972
|
takeProfitOrders: unknown;
|
|
@@ -984,7 +1009,7 @@ export declare class PerpetualsClient {
|
|
|
984
1009
|
}[];
|
|
985
1010
|
markets: PublicKey[];
|
|
986
1011
|
maxAumUsd: BN;
|
|
987
|
-
buffer: BN;
|
|
1012
|
+
buffer: number | BN;
|
|
988
1013
|
rawAumUsd: BN;
|
|
989
1014
|
equityUsd: BN;
|
|
990
1015
|
totalStaked: {
|
|
@@ -1015,6 +1040,9 @@ export declare class PerpetualsClient {
|
|
|
1015
1040
|
lpPrice: BN;
|
|
1016
1041
|
compoundingLpPrice: BN;
|
|
1017
1042
|
lastUpdatedTimestamp: BN;
|
|
1043
|
+
feesObligationUsd: BN;
|
|
1044
|
+
rebateObligationUsd: BN;
|
|
1045
|
+
thresholdUsd: BN;
|
|
1018
1046
|
delegate: PublicKey;
|
|
1019
1047
|
openTime: BN;
|
|
1020
1048
|
updateTime: BN;
|
|
@@ -1028,15 +1056,22 @@ export declare class PerpetualsClient {
|
|
|
1028
1056
|
lockedUsd: BN;
|
|
1029
1057
|
collateralAmount: BN;
|
|
1030
1058
|
collateralUsd: BN;
|
|
1031
|
-
|
|
1059
|
+
unsettledValueUsd: BN;
|
|
1032
1060
|
unsettledFeesUsd: BN;
|
|
1033
1061
|
cumulativeLockFeeSnapshot: BN;
|
|
1034
1062
|
degenSizeUsd: BN;
|
|
1063
|
+
referencePrice: {
|
|
1064
|
+
price: BN;
|
|
1065
|
+
exponent: number;
|
|
1066
|
+
};
|
|
1035
1067
|
sizeDecimals: number;
|
|
1036
1068
|
lockedDecimals: number;
|
|
1037
1069
|
collateralDecimals: number;
|
|
1038
1070
|
key: PublicKey;
|
|
1039
1071
|
feeAmount: BN;
|
|
1072
|
+
allowPayout: boolean;
|
|
1073
|
+
availableUsd: BN;
|
|
1074
|
+
availableAmount: BN;
|
|
1040
1075
|
refererTokenStakeAccount: PublicKey;
|
|
1041
1076
|
refererBoosterAccount: PublicKey;
|
|
1042
1077
|
level: number;
|
|
@@ -1050,6 +1085,7 @@ export declare class PerpetualsClient {
|
|
|
1050
1085
|
rewardTokens: BN;
|
|
1051
1086
|
unclaimedRevenueAmount: BN;
|
|
1052
1087
|
revenueSnapshot: BN;
|
|
1088
|
+
claimableRebateUsd: BN;
|
|
1053
1089
|
tokenMint: PublicKey;
|
|
1054
1090
|
tokenVaultTokenAccount: PublicKey;
|
|
1055
1091
|
tokenPermissions: {
|
|
@@ -1136,7 +1172,7 @@ export declare class PerpetualsClient {
|
|
|
1136
1172
|
maxUtilization: number;
|
|
1137
1173
|
degenPositionFactor: number;
|
|
1138
1174
|
degenExposureFactor: number;
|
|
1139
|
-
|
|
1175
|
+
maxPositionSizeUsd: BN;
|
|
1140
1176
|
maxExposureUsd: BN;
|
|
1141
1177
|
};
|
|
1142
1178
|
permissions: {
|
|
@@ -1229,7 +1265,7 @@ export declare class PerpetualsClient {
|
|
|
1229
1265
|
reservedAmount: BN;
|
|
1230
1266
|
minReserveUsd: BN;
|
|
1231
1267
|
limitPriceBufferBps: BN;
|
|
1232
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1268
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1233
1269
|
owner: PublicKey;
|
|
1234
1270
|
stakeStats: {
|
|
1235
1271
|
pendingActivation: BN;
|
|
@@ -1263,7 +1299,7 @@ export declare class PerpetualsClient {
|
|
|
1263
1299
|
lockedAmount: BN;
|
|
1264
1300
|
lockedUsd: BN;
|
|
1265
1301
|
collateralAmount: BN;
|
|
1266
|
-
|
|
1302
|
+
collateralLiabilityUsd: BN;
|
|
1267
1303
|
unsettledFeeUsd: BN;
|
|
1268
1304
|
cumulativeLockFeeSnapshot: BN;
|
|
1269
1305
|
sizeDecimals: number;
|
|
@@ -1272,7 +1308,7 @@ export declare class PerpetualsClient {
|
|
|
1272
1308
|
};
|
|
1273
1309
|
targetCustodyUid: number;
|
|
1274
1310
|
collateralCustodyUid: number;
|
|
1275
|
-
padding2: number[] | BN[]
|
|
1311
|
+
padding2: number[] | BN[];
|
|
1276
1312
|
numSigners: number;
|
|
1277
1313
|
numSigned: number;
|
|
1278
1314
|
minSignatures: number;
|
|
@@ -1286,6 +1322,7 @@ export declare class PerpetualsClient {
|
|
|
1286
1322
|
conf: BN;
|
|
1287
1323
|
ema: BN;
|
|
1288
1324
|
publishTime: BN;
|
|
1325
|
+
extOracleAccount: PublicKey;
|
|
1289
1326
|
market: PublicKey;
|
|
1290
1327
|
limitOrders: unknown;
|
|
1291
1328
|
takeProfitOrders: unknown;
|
|
@@ -1328,7 +1365,7 @@ export declare class PerpetualsClient {
|
|
|
1328
1365
|
}[];
|
|
1329
1366
|
markets: PublicKey[];
|
|
1330
1367
|
maxAumUsd: BN;
|
|
1331
|
-
buffer: BN;
|
|
1368
|
+
buffer: number | BN;
|
|
1332
1369
|
rawAumUsd: BN;
|
|
1333
1370
|
equityUsd: BN;
|
|
1334
1371
|
totalStaked: {
|
|
@@ -1359,6 +1396,9 @@ export declare class PerpetualsClient {
|
|
|
1359
1396
|
lpPrice: BN;
|
|
1360
1397
|
compoundingLpPrice: BN;
|
|
1361
1398
|
lastUpdatedTimestamp: BN;
|
|
1399
|
+
feesObligationUsd: BN;
|
|
1400
|
+
rebateObligationUsd: BN;
|
|
1401
|
+
thresholdUsd: BN;
|
|
1362
1402
|
delegate: PublicKey;
|
|
1363
1403
|
openTime: BN;
|
|
1364
1404
|
updateTime: BN;
|
|
@@ -1372,15 +1412,22 @@ export declare class PerpetualsClient {
|
|
|
1372
1412
|
lockedUsd: BN;
|
|
1373
1413
|
collateralAmount: BN;
|
|
1374
1414
|
collateralUsd: BN;
|
|
1375
|
-
|
|
1415
|
+
unsettledValueUsd: BN;
|
|
1376
1416
|
unsettledFeesUsd: BN;
|
|
1377
1417
|
cumulativeLockFeeSnapshot: BN;
|
|
1378
1418
|
degenSizeUsd: BN;
|
|
1419
|
+
referencePrice: {
|
|
1420
|
+
price: BN;
|
|
1421
|
+
exponent: number;
|
|
1422
|
+
};
|
|
1379
1423
|
sizeDecimals: number;
|
|
1380
1424
|
lockedDecimals: number;
|
|
1381
1425
|
collateralDecimals: number;
|
|
1382
1426
|
key: PublicKey;
|
|
1383
1427
|
feeAmount: BN;
|
|
1428
|
+
allowPayout: boolean;
|
|
1429
|
+
availableUsd: BN;
|
|
1430
|
+
availableAmount: BN;
|
|
1384
1431
|
refererTokenStakeAccount: PublicKey;
|
|
1385
1432
|
refererBoosterAccount: PublicKey;
|
|
1386
1433
|
level: number;
|
|
@@ -1394,6 +1441,7 @@ export declare class PerpetualsClient {
|
|
|
1394
1441
|
rewardTokens: BN;
|
|
1395
1442
|
unclaimedRevenueAmount: BN;
|
|
1396
1443
|
revenueSnapshot: BN;
|
|
1444
|
+
claimableRebateUsd: BN;
|
|
1397
1445
|
tokenMint: PublicKey;
|
|
1398
1446
|
tokenVaultTokenAccount: PublicKey;
|
|
1399
1447
|
tokenPermissions: {
|
|
@@ -1479,7 +1527,7 @@ export declare class PerpetualsClient {
|
|
|
1479
1527
|
maxUtilization: number;
|
|
1480
1528
|
degenPositionFactor: number;
|
|
1481
1529
|
degenExposureFactor: number;
|
|
1482
|
-
|
|
1530
|
+
maxPositionSizeUsd: BN;
|
|
1483
1531
|
maxExposureUsd: BN;
|
|
1484
1532
|
};
|
|
1485
1533
|
permissions: {
|
|
@@ -1572,7 +1620,7 @@ export declare class PerpetualsClient {
|
|
|
1572
1620
|
reservedAmount: BN;
|
|
1573
1621
|
minReserveUsd: BN;
|
|
1574
1622
|
limitPriceBufferBps: BN;
|
|
1575
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1623
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1576
1624
|
owner: PublicKey;
|
|
1577
1625
|
stakeStats: {
|
|
1578
1626
|
pendingActivation: BN;
|
|
@@ -1606,7 +1654,7 @@ export declare class PerpetualsClient {
|
|
|
1606
1654
|
lockedAmount: BN;
|
|
1607
1655
|
lockedUsd: BN;
|
|
1608
1656
|
collateralAmount: BN;
|
|
1609
|
-
|
|
1657
|
+
collateralLiabilityUsd: BN;
|
|
1610
1658
|
unsettledFeeUsd: BN;
|
|
1611
1659
|
cumulativeLockFeeSnapshot: BN;
|
|
1612
1660
|
sizeDecimals: number;
|
|
@@ -1615,7 +1663,7 @@ export declare class PerpetualsClient {
|
|
|
1615
1663
|
};
|
|
1616
1664
|
targetCustodyUid: number;
|
|
1617
1665
|
collateralCustodyUid: number;
|
|
1618
|
-
padding2: number[] | BN[]
|
|
1666
|
+
padding2: number[] | BN[];
|
|
1619
1667
|
numSigners: number;
|
|
1620
1668
|
numSigned: number;
|
|
1621
1669
|
minSignatures: number;
|
|
@@ -1629,6 +1677,7 @@ export declare class PerpetualsClient {
|
|
|
1629
1677
|
conf: BN;
|
|
1630
1678
|
ema: BN;
|
|
1631
1679
|
publishTime: BN;
|
|
1680
|
+
extOracleAccount: PublicKey;
|
|
1632
1681
|
market: PublicKey;
|
|
1633
1682
|
limitOrders: unknown;
|
|
1634
1683
|
takeProfitOrders: unknown;
|
|
@@ -1671,7 +1720,7 @@ export declare class PerpetualsClient {
|
|
|
1671
1720
|
}[];
|
|
1672
1721
|
markets: PublicKey[];
|
|
1673
1722
|
maxAumUsd: BN;
|
|
1674
|
-
buffer: BN;
|
|
1723
|
+
buffer: number | BN;
|
|
1675
1724
|
rawAumUsd: BN;
|
|
1676
1725
|
equityUsd: BN;
|
|
1677
1726
|
totalStaked: {
|
|
@@ -1702,6 +1751,9 @@ export declare class PerpetualsClient {
|
|
|
1702
1751
|
lpPrice: BN;
|
|
1703
1752
|
compoundingLpPrice: BN;
|
|
1704
1753
|
lastUpdatedTimestamp: BN;
|
|
1754
|
+
feesObligationUsd: BN;
|
|
1755
|
+
rebateObligationUsd: BN;
|
|
1756
|
+
thresholdUsd: BN;
|
|
1705
1757
|
delegate: PublicKey;
|
|
1706
1758
|
openTime: BN;
|
|
1707
1759
|
updateTime: BN;
|
|
@@ -1715,15 +1767,22 @@ export declare class PerpetualsClient {
|
|
|
1715
1767
|
lockedUsd: BN;
|
|
1716
1768
|
collateralAmount: BN;
|
|
1717
1769
|
collateralUsd: BN;
|
|
1718
|
-
|
|
1770
|
+
unsettledValueUsd: BN;
|
|
1719
1771
|
unsettledFeesUsd: BN;
|
|
1720
1772
|
cumulativeLockFeeSnapshot: BN;
|
|
1721
1773
|
degenSizeUsd: BN;
|
|
1774
|
+
referencePrice: {
|
|
1775
|
+
price: BN;
|
|
1776
|
+
exponent: number;
|
|
1777
|
+
};
|
|
1722
1778
|
sizeDecimals: number;
|
|
1723
1779
|
lockedDecimals: number;
|
|
1724
1780
|
collateralDecimals: number;
|
|
1725
1781
|
key: PublicKey;
|
|
1726
1782
|
feeAmount: BN;
|
|
1783
|
+
allowPayout: boolean;
|
|
1784
|
+
availableUsd: BN;
|
|
1785
|
+
availableAmount: BN;
|
|
1727
1786
|
refererTokenStakeAccount: PublicKey;
|
|
1728
1787
|
refererBoosterAccount: PublicKey;
|
|
1729
1788
|
level: number;
|
|
@@ -1737,6 +1796,7 @@ export declare class PerpetualsClient {
|
|
|
1737
1796
|
rewardTokens: BN;
|
|
1738
1797
|
unclaimedRevenueAmount: BN;
|
|
1739
1798
|
revenueSnapshot: BN;
|
|
1799
|
+
claimableRebateUsd: BN;
|
|
1740
1800
|
tokenMint: PublicKey;
|
|
1741
1801
|
tokenVaultTokenAccount: PublicKey;
|
|
1742
1802
|
tokenPermissions: {
|
|
@@ -1820,7 +1880,7 @@ export declare class PerpetualsClient {
|
|
|
1820
1880
|
maxUtilization: number;
|
|
1821
1881
|
degenPositionFactor: number;
|
|
1822
1882
|
degenExposureFactor: number;
|
|
1823
|
-
|
|
1883
|
+
maxPositionSizeUsd: BN;
|
|
1824
1884
|
maxExposureUsd: BN;
|
|
1825
1885
|
};
|
|
1826
1886
|
permissions: {
|
|
@@ -1913,7 +1973,7 @@ export declare class PerpetualsClient {
|
|
|
1913
1973
|
reservedAmount: BN;
|
|
1914
1974
|
minReserveUsd: BN;
|
|
1915
1975
|
limitPriceBufferBps: BN;
|
|
1916
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1976
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1917
1977
|
owner: PublicKey;
|
|
1918
1978
|
stakeStats: {
|
|
1919
1979
|
pendingActivation: BN;
|
|
@@ -1947,7 +2007,7 @@ export declare class PerpetualsClient {
|
|
|
1947
2007
|
lockedAmount: BN;
|
|
1948
2008
|
lockedUsd: BN;
|
|
1949
2009
|
collateralAmount: BN;
|
|
1950
|
-
|
|
2010
|
+
collateralLiabilityUsd: BN;
|
|
1951
2011
|
unsettledFeeUsd: BN;
|
|
1952
2012
|
cumulativeLockFeeSnapshot: BN;
|
|
1953
2013
|
sizeDecimals: number;
|
|
@@ -1956,7 +2016,7 @@ export declare class PerpetualsClient {
|
|
|
1956
2016
|
};
|
|
1957
2017
|
targetCustodyUid: number;
|
|
1958
2018
|
collateralCustodyUid: number;
|
|
1959
|
-
padding2: number[] | BN[]
|
|
2019
|
+
padding2: number[] | BN[];
|
|
1960
2020
|
numSigners: number;
|
|
1961
2021
|
numSigned: number;
|
|
1962
2022
|
minSignatures: number;
|
|
@@ -1970,6 +2030,7 @@ export declare class PerpetualsClient {
|
|
|
1970
2030
|
conf: BN;
|
|
1971
2031
|
ema: BN;
|
|
1972
2032
|
publishTime: BN;
|
|
2033
|
+
extOracleAccount: PublicKey;
|
|
1973
2034
|
market: PublicKey;
|
|
1974
2035
|
limitOrders: unknown;
|
|
1975
2036
|
takeProfitOrders: unknown;
|
|
@@ -2012,7 +2073,7 @@ export declare class PerpetualsClient {
|
|
|
2012
2073
|
}[];
|
|
2013
2074
|
markets: PublicKey[];
|
|
2014
2075
|
maxAumUsd: BN;
|
|
2015
|
-
buffer: BN;
|
|
2076
|
+
buffer: number | BN;
|
|
2016
2077
|
rawAumUsd: BN;
|
|
2017
2078
|
equityUsd: BN;
|
|
2018
2079
|
totalStaked: {
|
|
@@ -2043,6 +2104,9 @@ export declare class PerpetualsClient {
|
|
|
2043
2104
|
lpPrice: BN;
|
|
2044
2105
|
compoundingLpPrice: BN;
|
|
2045
2106
|
lastUpdatedTimestamp: BN;
|
|
2107
|
+
feesObligationUsd: BN;
|
|
2108
|
+
rebateObligationUsd: BN;
|
|
2109
|
+
thresholdUsd: BN;
|
|
2046
2110
|
delegate: PublicKey;
|
|
2047
2111
|
openTime: BN;
|
|
2048
2112
|
updateTime: BN;
|
|
@@ -2056,15 +2120,22 @@ export declare class PerpetualsClient {
|
|
|
2056
2120
|
lockedUsd: BN;
|
|
2057
2121
|
collateralAmount: BN;
|
|
2058
2122
|
collateralUsd: BN;
|
|
2059
|
-
|
|
2123
|
+
unsettledValueUsd: BN;
|
|
2060
2124
|
unsettledFeesUsd: BN;
|
|
2061
2125
|
cumulativeLockFeeSnapshot: BN;
|
|
2062
2126
|
degenSizeUsd: BN;
|
|
2127
|
+
referencePrice: {
|
|
2128
|
+
price: BN;
|
|
2129
|
+
exponent: number;
|
|
2130
|
+
};
|
|
2063
2131
|
sizeDecimals: number;
|
|
2064
2132
|
lockedDecimals: number;
|
|
2065
2133
|
collateralDecimals: number;
|
|
2066
2134
|
key: PublicKey;
|
|
2067
2135
|
feeAmount: BN;
|
|
2136
|
+
allowPayout: boolean;
|
|
2137
|
+
availableUsd: BN;
|
|
2138
|
+
availableAmount: BN;
|
|
2068
2139
|
refererTokenStakeAccount: PublicKey;
|
|
2069
2140
|
refererBoosterAccount: PublicKey;
|
|
2070
2141
|
level: number;
|
|
@@ -2078,6 +2149,7 @@ export declare class PerpetualsClient {
|
|
|
2078
2149
|
rewardTokens: BN;
|
|
2079
2150
|
unclaimedRevenueAmount: BN;
|
|
2080
2151
|
revenueSnapshot: BN;
|
|
2152
|
+
claimableRebateUsd: BN;
|
|
2081
2153
|
tokenMint: PublicKey;
|
|
2082
2154
|
tokenVaultTokenAccount: PublicKey;
|
|
2083
2155
|
tokenPermissions: {
|
|
@@ -2160,7 +2232,7 @@ export declare class PerpetualsClient {
|
|
|
2160
2232
|
maxUtilization: number;
|
|
2161
2233
|
degenPositionFactor: number;
|
|
2162
2234
|
degenExposureFactor: number;
|
|
2163
|
-
|
|
2235
|
+
maxPositionSizeUsd: BN;
|
|
2164
2236
|
maxExposureUsd: BN;
|
|
2165
2237
|
};
|
|
2166
2238
|
permissions: {
|
|
@@ -2253,7 +2325,7 @@ export declare class PerpetualsClient {
|
|
|
2253
2325
|
reservedAmount: BN;
|
|
2254
2326
|
minReserveUsd: BN;
|
|
2255
2327
|
limitPriceBufferBps: BN;
|
|
2256
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
2328
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2257
2329
|
owner: PublicKey;
|
|
2258
2330
|
stakeStats: {
|
|
2259
2331
|
pendingActivation: BN;
|
|
@@ -2287,7 +2359,7 @@ export declare class PerpetualsClient {
|
|
|
2287
2359
|
lockedAmount: BN;
|
|
2288
2360
|
lockedUsd: BN;
|
|
2289
2361
|
collateralAmount: BN;
|
|
2290
|
-
|
|
2362
|
+
collateralLiabilityUsd: BN;
|
|
2291
2363
|
unsettledFeeUsd: BN;
|
|
2292
2364
|
cumulativeLockFeeSnapshot: BN;
|
|
2293
2365
|
sizeDecimals: number;
|
|
@@ -2296,7 +2368,7 @@ export declare class PerpetualsClient {
|
|
|
2296
2368
|
};
|
|
2297
2369
|
targetCustodyUid: number;
|
|
2298
2370
|
collateralCustodyUid: number;
|
|
2299
|
-
padding2: number[] | BN[]
|
|
2371
|
+
padding2: number[] | BN[];
|
|
2300
2372
|
numSigners: number;
|
|
2301
2373
|
numSigned: number;
|
|
2302
2374
|
minSignatures: number;
|
|
@@ -2310,6 +2382,7 @@ export declare class PerpetualsClient {
|
|
|
2310
2382
|
conf: BN;
|
|
2311
2383
|
ema: BN;
|
|
2312
2384
|
publishTime: BN;
|
|
2385
|
+
extOracleAccount: PublicKey;
|
|
2313
2386
|
market: PublicKey;
|
|
2314
2387
|
limitOrders: unknown;
|
|
2315
2388
|
takeProfitOrders: unknown;
|
|
@@ -2352,7 +2425,7 @@ export declare class PerpetualsClient {
|
|
|
2352
2425
|
}[];
|
|
2353
2426
|
markets: PublicKey[];
|
|
2354
2427
|
maxAumUsd: BN;
|
|
2355
|
-
buffer: BN;
|
|
2428
|
+
buffer: number | BN;
|
|
2356
2429
|
rawAumUsd: BN;
|
|
2357
2430
|
equityUsd: BN;
|
|
2358
2431
|
totalStaked: {
|
|
@@ -2383,6 +2456,9 @@ export declare class PerpetualsClient {
|
|
|
2383
2456
|
lpPrice: BN;
|
|
2384
2457
|
compoundingLpPrice: BN;
|
|
2385
2458
|
lastUpdatedTimestamp: BN;
|
|
2459
|
+
feesObligationUsd: BN;
|
|
2460
|
+
rebateObligationUsd: BN;
|
|
2461
|
+
thresholdUsd: BN;
|
|
2386
2462
|
delegate: PublicKey;
|
|
2387
2463
|
openTime: BN;
|
|
2388
2464
|
updateTime: BN;
|
|
@@ -2396,15 +2472,22 @@ export declare class PerpetualsClient {
|
|
|
2396
2472
|
lockedUsd: BN;
|
|
2397
2473
|
collateralAmount: BN;
|
|
2398
2474
|
collateralUsd: BN;
|
|
2399
|
-
|
|
2475
|
+
unsettledValueUsd: BN;
|
|
2400
2476
|
unsettledFeesUsd: BN;
|
|
2401
2477
|
cumulativeLockFeeSnapshot: BN;
|
|
2402
2478
|
degenSizeUsd: BN;
|
|
2479
|
+
referencePrice: {
|
|
2480
|
+
price: BN;
|
|
2481
|
+
exponent: number;
|
|
2482
|
+
};
|
|
2403
2483
|
sizeDecimals: number;
|
|
2404
2484
|
lockedDecimals: number;
|
|
2405
2485
|
collateralDecimals: number;
|
|
2406
2486
|
key: PublicKey;
|
|
2407
2487
|
feeAmount: BN;
|
|
2488
|
+
allowPayout: boolean;
|
|
2489
|
+
availableUsd: BN;
|
|
2490
|
+
availableAmount: BN;
|
|
2408
2491
|
refererTokenStakeAccount: PublicKey;
|
|
2409
2492
|
refererBoosterAccount: PublicKey;
|
|
2410
2493
|
level: number;
|
|
@@ -2418,6 +2501,7 @@ export declare class PerpetualsClient {
|
|
|
2418
2501
|
rewardTokens: BN;
|
|
2419
2502
|
unclaimedRevenueAmount: BN;
|
|
2420
2503
|
revenueSnapshot: BN;
|
|
2504
|
+
claimableRebateUsd: BN;
|
|
2421
2505
|
tokenMint: PublicKey;
|
|
2422
2506
|
tokenVaultTokenAccount: PublicKey;
|
|
2423
2507
|
tokenPermissions: {
|
|
@@ -2500,7 +2584,7 @@ export declare class PerpetualsClient {
|
|
|
2500
2584
|
maxUtilization: number;
|
|
2501
2585
|
degenPositionFactor: number;
|
|
2502
2586
|
degenExposureFactor: number;
|
|
2503
|
-
|
|
2587
|
+
maxPositionSizeUsd: BN;
|
|
2504
2588
|
maxExposureUsd: BN;
|
|
2505
2589
|
};
|
|
2506
2590
|
permissions: {
|
|
@@ -2593,7 +2677,7 @@ export declare class PerpetualsClient {
|
|
|
2593
2677
|
reservedAmount: BN;
|
|
2594
2678
|
minReserveUsd: BN;
|
|
2595
2679
|
limitPriceBufferBps: BN;
|
|
2596
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
2680
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2597
2681
|
owner: PublicKey;
|
|
2598
2682
|
stakeStats: {
|
|
2599
2683
|
pendingActivation: BN;
|
|
@@ -2627,7 +2711,7 @@ export declare class PerpetualsClient {
|
|
|
2627
2711
|
lockedAmount: BN;
|
|
2628
2712
|
lockedUsd: BN;
|
|
2629
2713
|
collateralAmount: BN;
|
|
2630
|
-
|
|
2714
|
+
collateralLiabilityUsd: BN;
|
|
2631
2715
|
unsettledFeeUsd: BN;
|
|
2632
2716
|
cumulativeLockFeeSnapshot: BN;
|
|
2633
2717
|
sizeDecimals: number;
|
|
@@ -2636,7 +2720,7 @@ export declare class PerpetualsClient {
|
|
|
2636
2720
|
};
|
|
2637
2721
|
targetCustodyUid: number;
|
|
2638
2722
|
collateralCustodyUid: number;
|
|
2639
|
-
padding2: number[] | BN[]
|
|
2723
|
+
padding2: number[] | BN[];
|
|
2640
2724
|
numSigners: number;
|
|
2641
2725
|
numSigned: number;
|
|
2642
2726
|
minSignatures: number;
|
|
@@ -2650,6 +2734,7 @@ export declare class PerpetualsClient {
|
|
|
2650
2734
|
conf: BN;
|
|
2651
2735
|
ema: BN;
|
|
2652
2736
|
publishTime: BN;
|
|
2737
|
+
extOracleAccount: PublicKey;
|
|
2653
2738
|
market: PublicKey;
|
|
2654
2739
|
limitOrders: unknown;
|
|
2655
2740
|
takeProfitOrders: unknown;
|
|
@@ -2692,7 +2777,7 @@ export declare class PerpetualsClient {
|
|
|
2692
2777
|
}[];
|
|
2693
2778
|
markets: PublicKey[];
|
|
2694
2779
|
maxAumUsd: BN;
|
|
2695
|
-
buffer: BN;
|
|
2780
|
+
buffer: number | BN;
|
|
2696
2781
|
rawAumUsd: BN;
|
|
2697
2782
|
equityUsd: BN;
|
|
2698
2783
|
totalStaked: {
|
|
@@ -2723,6 +2808,9 @@ export declare class PerpetualsClient {
|
|
|
2723
2808
|
lpPrice: BN;
|
|
2724
2809
|
compoundingLpPrice: BN;
|
|
2725
2810
|
lastUpdatedTimestamp: BN;
|
|
2811
|
+
feesObligationUsd: BN;
|
|
2812
|
+
rebateObligationUsd: BN;
|
|
2813
|
+
thresholdUsd: BN;
|
|
2726
2814
|
delegate: PublicKey;
|
|
2727
2815
|
openTime: BN;
|
|
2728
2816
|
updateTime: BN;
|
|
@@ -2736,15 +2824,22 @@ export declare class PerpetualsClient {
|
|
|
2736
2824
|
lockedUsd: BN;
|
|
2737
2825
|
collateralAmount: BN;
|
|
2738
2826
|
collateralUsd: BN;
|
|
2739
|
-
|
|
2827
|
+
unsettledValueUsd: BN;
|
|
2740
2828
|
unsettledFeesUsd: BN;
|
|
2741
2829
|
cumulativeLockFeeSnapshot: BN;
|
|
2742
2830
|
degenSizeUsd: BN;
|
|
2831
|
+
referencePrice: {
|
|
2832
|
+
price: BN;
|
|
2833
|
+
exponent: number;
|
|
2834
|
+
};
|
|
2743
2835
|
sizeDecimals: number;
|
|
2744
2836
|
lockedDecimals: number;
|
|
2745
2837
|
collateralDecimals: number;
|
|
2746
2838
|
key: PublicKey;
|
|
2747
2839
|
feeAmount: BN;
|
|
2840
|
+
allowPayout: boolean;
|
|
2841
|
+
availableUsd: BN;
|
|
2842
|
+
availableAmount: BN;
|
|
2748
2843
|
refererTokenStakeAccount: PublicKey;
|
|
2749
2844
|
refererBoosterAccount: PublicKey;
|
|
2750
2845
|
level: number;
|
|
@@ -2758,6 +2853,7 @@ export declare class PerpetualsClient {
|
|
|
2758
2853
|
rewardTokens: BN;
|
|
2759
2854
|
unclaimedRevenueAmount: BN;
|
|
2760
2855
|
revenueSnapshot: BN;
|
|
2856
|
+
claimableRebateUsd: BN;
|
|
2761
2857
|
tokenMint: PublicKey;
|
|
2762
2858
|
tokenVaultTokenAccount: PublicKey;
|
|
2763
2859
|
tokenPermissions: {
|
|
@@ -2818,11 +2914,15 @@ export declare class PerpetualsClient {
|
|
|
2818
2914
|
lockedUsd: BN;
|
|
2819
2915
|
collateralAmount: BN;
|
|
2820
2916
|
collateralUsd: BN;
|
|
2821
|
-
|
|
2917
|
+
unsettledValueUsd: BN;
|
|
2822
2918
|
unsettledFeesUsd: BN;
|
|
2823
2919
|
cumulativeLockFeeSnapshot: BN;
|
|
2824
2920
|
degenSizeUsd: BN;
|
|
2825
|
-
|
|
2921
|
+
referencePrice: {
|
|
2922
|
+
price: BN;
|
|
2923
|
+
exponent: number;
|
|
2924
|
+
};
|
|
2925
|
+
buffer: number;
|
|
2826
2926
|
sizeDecimals: number;
|
|
2827
2927
|
lockedDecimals: number;
|
|
2828
2928
|
collateralDecimals: number;
|
|
@@ -2887,7 +2987,7 @@ export declare class PerpetualsClient {
|
|
|
2887
2987
|
maxUtilization: number;
|
|
2888
2988
|
degenPositionFactor: number;
|
|
2889
2989
|
degenExposureFactor: number;
|
|
2890
|
-
|
|
2990
|
+
maxPositionSizeUsd: BN;
|
|
2891
2991
|
maxExposureUsd: BN;
|
|
2892
2992
|
};
|
|
2893
2993
|
permissions: {
|
|
@@ -2980,7 +3080,7 @@ export declare class PerpetualsClient {
|
|
|
2980
3080
|
reservedAmount: BN;
|
|
2981
3081
|
minReserveUsd: BN;
|
|
2982
3082
|
limitPriceBufferBps: BN;
|
|
2983
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3083
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2984
3084
|
owner: PublicKey;
|
|
2985
3085
|
stakeStats: {
|
|
2986
3086
|
pendingActivation: BN;
|
|
@@ -3014,7 +3114,7 @@ export declare class PerpetualsClient {
|
|
|
3014
3114
|
lockedAmount: BN;
|
|
3015
3115
|
lockedUsd: BN;
|
|
3016
3116
|
collateralAmount: BN;
|
|
3017
|
-
|
|
3117
|
+
collateralLiabilityUsd: BN;
|
|
3018
3118
|
unsettledFeeUsd: BN;
|
|
3019
3119
|
cumulativeLockFeeSnapshot: BN;
|
|
3020
3120
|
sizeDecimals: number;
|
|
@@ -3023,7 +3123,7 @@ export declare class PerpetualsClient {
|
|
|
3023
3123
|
};
|
|
3024
3124
|
targetCustodyUid: number;
|
|
3025
3125
|
collateralCustodyUid: number;
|
|
3026
|
-
padding2: number[] | BN[]
|
|
3126
|
+
padding2: number[] | BN[];
|
|
3027
3127
|
numSigners: number;
|
|
3028
3128
|
numSigned: number;
|
|
3029
3129
|
minSignatures: number;
|
|
@@ -3037,6 +3137,7 @@ export declare class PerpetualsClient {
|
|
|
3037
3137
|
conf: BN;
|
|
3038
3138
|
ema: BN;
|
|
3039
3139
|
publishTime: BN;
|
|
3140
|
+
extOracleAccount: PublicKey;
|
|
3040
3141
|
market: PublicKey;
|
|
3041
3142
|
limitOrders: unknown;
|
|
3042
3143
|
takeProfitOrders: unknown;
|
|
@@ -3079,7 +3180,7 @@ export declare class PerpetualsClient {
|
|
|
3079
3180
|
}[];
|
|
3080
3181
|
markets: PublicKey[];
|
|
3081
3182
|
maxAumUsd: BN;
|
|
3082
|
-
buffer: BN;
|
|
3183
|
+
buffer: number | BN;
|
|
3083
3184
|
rawAumUsd: BN;
|
|
3084
3185
|
equityUsd: BN;
|
|
3085
3186
|
totalStaked: {
|
|
@@ -3110,6 +3211,9 @@ export declare class PerpetualsClient {
|
|
|
3110
3211
|
lpPrice: BN;
|
|
3111
3212
|
compoundingLpPrice: BN;
|
|
3112
3213
|
lastUpdatedTimestamp: BN;
|
|
3214
|
+
feesObligationUsd: BN;
|
|
3215
|
+
rebateObligationUsd: BN;
|
|
3216
|
+
thresholdUsd: BN;
|
|
3113
3217
|
delegate: PublicKey;
|
|
3114
3218
|
openTime: BN;
|
|
3115
3219
|
updateTime: BN;
|
|
@@ -3123,15 +3227,22 @@ export declare class PerpetualsClient {
|
|
|
3123
3227
|
lockedUsd: BN;
|
|
3124
3228
|
collateralAmount: BN;
|
|
3125
3229
|
collateralUsd: BN;
|
|
3126
|
-
|
|
3230
|
+
unsettledValueUsd: BN;
|
|
3127
3231
|
unsettledFeesUsd: BN;
|
|
3128
3232
|
cumulativeLockFeeSnapshot: BN;
|
|
3129
3233
|
degenSizeUsd: BN;
|
|
3234
|
+
referencePrice: {
|
|
3235
|
+
price: BN;
|
|
3236
|
+
exponent: number;
|
|
3237
|
+
};
|
|
3130
3238
|
sizeDecimals: number;
|
|
3131
3239
|
lockedDecimals: number;
|
|
3132
3240
|
collateralDecimals: number;
|
|
3133
3241
|
key: PublicKey;
|
|
3134
3242
|
feeAmount: BN;
|
|
3243
|
+
allowPayout: boolean;
|
|
3244
|
+
availableUsd: BN;
|
|
3245
|
+
availableAmount: BN;
|
|
3135
3246
|
refererTokenStakeAccount: PublicKey;
|
|
3136
3247
|
refererBoosterAccount: PublicKey;
|
|
3137
3248
|
level: number;
|
|
@@ -3145,6 +3256,7 @@ export declare class PerpetualsClient {
|
|
|
3145
3256
|
rewardTokens: BN;
|
|
3146
3257
|
unclaimedRevenueAmount: BN;
|
|
3147
3258
|
revenueSnapshot: BN;
|
|
3259
|
+
claimableRebateUsd: BN;
|
|
3148
3260
|
tokenMint: PublicKey;
|
|
3149
3261
|
tokenVaultTokenAccount: PublicKey;
|
|
3150
3262
|
tokenPermissions: {
|
|
@@ -3227,7 +3339,7 @@ export declare class PerpetualsClient {
|
|
|
3227
3339
|
maxUtilization: number;
|
|
3228
3340
|
degenPositionFactor: number;
|
|
3229
3341
|
degenExposureFactor: number;
|
|
3230
|
-
|
|
3342
|
+
maxPositionSizeUsd: BN;
|
|
3231
3343
|
maxExposureUsd: BN;
|
|
3232
3344
|
};
|
|
3233
3345
|
permissions: {
|
|
@@ -3320,7 +3432,7 @@ export declare class PerpetualsClient {
|
|
|
3320
3432
|
reservedAmount: BN;
|
|
3321
3433
|
minReserveUsd: BN;
|
|
3322
3434
|
limitPriceBufferBps: BN;
|
|
3323
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3435
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3324
3436
|
owner: PublicKey;
|
|
3325
3437
|
stakeStats: {
|
|
3326
3438
|
pendingActivation: BN;
|
|
@@ -3354,7 +3466,7 @@ export declare class PerpetualsClient {
|
|
|
3354
3466
|
lockedAmount: BN;
|
|
3355
3467
|
lockedUsd: BN;
|
|
3356
3468
|
collateralAmount: BN;
|
|
3357
|
-
|
|
3469
|
+
collateralLiabilityUsd: BN;
|
|
3358
3470
|
unsettledFeeUsd: BN;
|
|
3359
3471
|
cumulativeLockFeeSnapshot: BN;
|
|
3360
3472
|
sizeDecimals: number;
|
|
@@ -3363,7 +3475,7 @@ export declare class PerpetualsClient {
|
|
|
3363
3475
|
};
|
|
3364
3476
|
targetCustodyUid: number;
|
|
3365
3477
|
collateralCustodyUid: number;
|
|
3366
|
-
padding2: number[] | BN[]
|
|
3478
|
+
padding2: number[] | BN[];
|
|
3367
3479
|
numSigners: number;
|
|
3368
3480
|
numSigned: number;
|
|
3369
3481
|
minSignatures: number;
|
|
@@ -3377,6 +3489,7 @@ export declare class PerpetualsClient {
|
|
|
3377
3489
|
conf: BN;
|
|
3378
3490
|
ema: BN;
|
|
3379
3491
|
publishTime: BN;
|
|
3492
|
+
extOracleAccount: PublicKey;
|
|
3380
3493
|
market: PublicKey;
|
|
3381
3494
|
limitOrders: unknown;
|
|
3382
3495
|
takeProfitOrders: unknown;
|
|
@@ -3419,7 +3532,7 @@ export declare class PerpetualsClient {
|
|
|
3419
3532
|
}[];
|
|
3420
3533
|
markets: PublicKey[];
|
|
3421
3534
|
maxAumUsd: BN;
|
|
3422
|
-
buffer: BN;
|
|
3535
|
+
buffer: number | BN;
|
|
3423
3536
|
rawAumUsd: BN;
|
|
3424
3537
|
equityUsd: BN;
|
|
3425
3538
|
totalStaked: {
|
|
@@ -3450,6 +3563,9 @@ export declare class PerpetualsClient {
|
|
|
3450
3563
|
lpPrice: BN;
|
|
3451
3564
|
compoundingLpPrice: BN;
|
|
3452
3565
|
lastUpdatedTimestamp: BN;
|
|
3566
|
+
feesObligationUsd: BN;
|
|
3567
|
+
rebateObligationUsd: BN;
|
|
3568
|
+
thresholdUsd: BN;
|
|
3453
3569
|
delegate: PublicKey;
|
|
3454
3570
|
openTime: BN;
|
|
3455
3571
|
updateTime: BN;
|
|
@@ -3463,15 +3579,22 @@ export declare class PerpetualsClient {
|
|
|
3463
3579
|
lockedUsd: BN;
|
|
3464
3580
|
collateralAmount: BN;
|
|
3465
3581
|
collateralUsd: BN;
|
|
3466
|
-
|
|
3582
|
+
unsettledValueUsd: BN;
|
|
3467
3583
|
unsettledFeesUsd: BN;
|
|
3468
3584
|
cumulativeLockFeeSnapshot: BN;
|
|
3469
3585
|
degenSizeUsd: BN;
|
|
3586
|
+
referencePrice: {
|
|
3587
|
+
price: BN;
|
|
3588
|
+
exponent: number;
|
|
3589
|
+
};
|
|
3470
3590
|
sizeDecimals: number;
|
|
3471
3591
|
lockedDecimals: number;
|
|
3472
3592
|
collateralDecimals: number;
|
|
3473
3593
|
key: PublicKey;
|
|
3474
3594
|
feeAmount: BN;
|
|
3595
|
+
allowPayout: boolean;
|
|
3596
|
+
availableUsd: BN;
|
|
3597
|
+
availableAmount: BN;
|
|
3475
3598
|
refererTokenStakeAccount: PublicKey;
|
|
3476
3599
|
refererBoosterAccount: PublicKey;
|
|
3477
3600
|
level: number;
|
|
@@ -3485,6 +3608,7 @@ export declare class PerpetualsClient {
|
|
|
3485
3608
|
rewardTokens: BN;
|
|
3486
3609
|
unclaimedRevenueAmount: BN;
|
|
3487
3610
|
revenueSnapshot: BN;
|
|
3611
|
+
claimableRebateUsd: BN;
|
|
3488
3612
|
tokenMint: PublicKey;
|
|
3489
3613
|
tokenVaultTokenAccount: PublicKey;
|
|
3490
3614
|
tokenPermissions: {
|
|
@@ -3567,7 +3691,7 @@ export declare class PerpetualsClient {
|
|
|
3567
3691
|
maxUtilization: number;
|
|
3568
3692
|
degenPositionFactor: number;
|
|
3569
3693
|
degenExposureFactor: number;
|
|
3570
|
-
|
|
3694
|
+
maxPositionSizeUsd: BN;
|
|
3571
3695
|
maxExposureUsd: BN;
|
|
3572
3696
|
};
|
|
3573
3697
|
permissions: {
|
|
@@ -3660,7 +3784,7 @@ export declare class PerpetualsClient {
|
|
|
3660
3784
|
reservedAmount: BN;
|
|
3661
3785
|
minReserveUsd: BN;
|
|
3662
3786
|
limitPriceBufferBps: BN;
|
|
3663
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3787
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3664
3788
|
owner: PublicKey;
|
|
3665
3789
|
stakeStats: {
|
|
3666
3790
|
pendingActivation: BN;
|
|
@@ -3694,7 +3818,7 @@ export declare class PerpetualsClient {
|
|
|
3694
3818
|
lockedAmount: BN;
|
|
3695
3819
|
lockedUsd: BN;
|
|
3696
3820
|
collateralAmount: BN;
|
|
3697
|
-
|
|
3821
|
+
collateralLiabilityUsd: BN;
|
|
3698
3822
|
unsettledFeeUsd: BN;
|
|
3699
3823
|
cumulativeLockFeeSnapshot: BN;
|
|
3700
3824
|
sizeDecimals: number;
|
|
@@ -3703,7 +3827,7 @@ export declare class PerpetualsClient {
|
|
|
3703
3827
|
};
|
|
3704
3828
|
targetCustodyUid: number;
|
|
3705
3829
|
collateralCustodyUid: number;
|
|
3706
|
-
padding2: number[] | BN[]
|
|
3830
|
+
padding2: number[] | BN[];
|
|
3707
3831
|
numSigners: number;
|
|
3708
3832
|
numSigned: number;
|
|
3709
3833
|
minSignatures: number;
|
|
@@ -3717,6 +3841,7 @@ export declare class PerpetualsClient {
|
|
|
3717
3841
|
conf: BN;
|
|
3718
3842
|
ema: BN;
|
|
3719
3843
|
publishTime: BN;
|
|
3844
|
+
extOracleAccount: PublicKey;
|
|
3720
3845
|
market: PublicKey;
|
|
3721
3846
|
limitOrders: unknown;
|
|
3722
3847
|
takeProfitOrders: unknown;
|
|
@@ -3759,7 +3884,7 @@ export declare class PerpetualsClient {
|
|
|
3759
3884
|
}[];
|
|
3760
3885
|
markets: PublicKey[];
|
|
3761
3886
|
maxAumUsd: BN;
|
|
3762
|
-
buffer: BN;
|
|
3887
|
+
buffer: number | BN;
|
|
3763
3888
|
rawAumUsd: BN;
|
|
3764
3889
|
equityUsd: BN;
|
|
3765
3890
|
totalStaked: {
|
|
@@ -3790,6 +3915,9 @@ export declare class PerpetualsClient {
|
|
|
3790
3915
|
lpPrice: BN;
|
|
3791
3916
|
compoundingLpPrice: BN;
|
|
3792
3917
|
lastUpdatedTimestamp: BN;
|
|
3918
|
+
feesObligationUsd: BN;
|
|
3919
|
+
rebateObligationUsd: BN;
|
|
3920
|
+
thresholdUsd: BN;
|
|
3793
3921
|
delegate: PublicKey;
|
|
3794
3922
|
openTime: BN;
|
|
3795
3923
|
updateTime: BN;
|
|
@@ -3803,15 +3931,22 @@ export declare class PerpetualsClient {
|
|
|
3803
3931
|
lockedUsd: BN;
|
|
3804
3932
|
collateralAmount: BN;
|
|
3805
3933
|
collateralUsd: BN;
|
|
3806
|
-
|
|
3934
|
+
unsettledValueUsd: BN;
|
|
3807
3935
|
unsettledFeesUsd: BN;
|
|
3808
3936
|
cumulativeLockFeeSnapshot: BN;
|
|
3809
3937
|
degenSizeUsd: BN;
|
|
3938
|
+
referencePrice: {
|
|
3939
|
+
price: BN;
|
|
3940
|
+
exponent: number;
|
|
3941
|
+
};
|
|
3810
3942
|
sizeDecimals: number;
|
|
3811
3943
|
lockedDecimals: number;
|
|
3812
3944
|
collateralDecimals: number;
|
|
3813
3945
|
key: PublicKey;
|
|
3814
3946
|
feeAmount: BN;
|
|
3947
|
+
allowPayout: boolean;
|
|
3948
|
+
availableUsd: BN;
|
|
3949
|
+
availableAmount: BN;
|
|
3815
3950
|
refererTokenStakeAccount: PublicKey;
|
|
3816
3951
|
refererBoosterAccount: PublicKey;
|
|
3817
3952
|
level: number;
|
|
@@ -3825,6 +3960,7 @@ export declare class PerpetualsClient {
|
|
|
3825
3960
|
rewardTokens: BN;
|
|
3826
3961
|
unclaimedRevenueAmount: BN;
|
|
3827
3962
|
revenueSnapshot: BN;
|
|
3963
|
+
claimableRebateUsd: BN;
|
|
3828
3964
|
tokenMint: PublicKey;
|
|
3829
3965
|
tokenVaultTokenAccount: PublicKey;
|
|
3830
3966
|
tokenPermissions: {
|
|
@@ -3907,7 +4043,7 @@ export declare class PerpetualsClient {
|
|
|
3907
4043
|
maxUtilization: number;
|
|
3908
4044
|
degenPositionFactor: number;
|
|
3909
4045
|
degenExposureFactor: number;
|
|
3910
|
-
|
|
4046
|
+
maxPositionSizeUsd: BN;
|
|
3911
4047
|
maxExposureUsd: BN;
|
|
3912
4048
|
};
|
|
3913
4049
|
permissions: {
|
|
@@ -4000,7 +4136,7 @@ export declare class PerpetualsClient {
|
|
|
4000
4136
|
reservedAmount: BN;
|
|
4001
4137
|
minReserveUsd: BN;
|
|
4002
4138
|
limitPriceBufferBps: BN;
|
|
4003
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
4139
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4004
4140
|
owner: PublicKey;
|
|
4005
4141
|
stakeStats: {
|
|
4006
4142
|
pendingActivation: BN;
|
|
@@ -4034,7 +4170,7 @@ export declare class PerpetualsClient {
|
|
|
4034
4170
|
lockedAmount: BN;
|
|
4035
4171
|
lockedUsd: BN;
|
|
4036
4172
|
collateralAmount: BN;
|
|
4037
|
-
|
|
4173
|
+
collateralLiabilityUsd: BN;
|
|
4038
4174
|
unsettledFeeUsd: BN;
|
|
4039
4175
|
cumulativeLockFeeSnapshot: BN;
|
|
4040
4176
|
sizeDecimals: number;
|
|
@@ -4043,7 +4179,7 @@ export declare class PerpetualsClient {
|
|
|
4043
4179
|
};
|
|
4044
4180
|
targetCustodyUid: number;
|
|
4045
4181
|
collateralCustodyUid: number;
|
|
4046
|
-
padding2: number[] | BN[]
|
|
4182
|
+
padding2: number[] | BN[];
|
|
4047
4183
|
numSigners: number;
|
|
4048
4184
|
numSigned: number;
|
|
4049
4185
|
minSignatures: number;
|
|
@@ -4057,6 +4193,7 @@ export declare class PerpetualsClient {
|
|
|
4057
4193
|
conf: BN;
|
|
4058
4194
|
ema: BN;
|
|
4059
4195
|
publishTime: BN;
|
|
4196
|
+
extOracleAccount: PublicKey;
|
|
4060
4197
|
market: PublicKey;
|
|
4061
4198
|
limitOrders: unknown;
|
|
4062
4199
|
takeProfitOrders: unknown;
|
|
@@ -4099,7 +4236,7 @@ export declare class PerpetualsClient {
|
|
|
4099
4236
|
}[];
|
|
4100
4237
|
markets: PublicKey[];
|
|
4101
4238
|
maxAumUsd: BN;
|
|
4102
|
-
buffer: BN;
|
|
4239
|
+
buffer: number | BN;
|
|
4103
4240
|
rawAumUsd: BN;
|
|
4104
4241
|
equityUsd: BN;
|
|
4105
4242
|
totalStaked: {
|
|
@@ -4130,6 +4267,9 @@ export declare class PerpetualsClient {
|
|
|
4130
4267
|
lpPrice: BN;
|
|
4131
4268
|
compoundingLpPrice: BN;
|
|
4132
4269
|
lastUpdatedTimestamp: BN;
|
|
4270
|
+
feesObligationUsd: BN;
|
|
4271
|
+
rebateObligationUsd: BN;
|
|
4272
|
+
thresholdUsd: BN;
|
|
4133
4273
|
delegate: PublicKey;
|
|
4134
4274
|
openTime: BN;
|
|
4135
4275
|
updateTime: BN;
|
|
@@ -4143,15 +4283,22 @@ export declare class PerpetualsClient {
|
|
|
4143
4283
|
lockedUsd: BN;
|
|
4144
4284
|
collateralAmount: BN;
|
|
4145
4285
|
collateralUsd: BN;
|
|
4146
|
-
|
|
4286
|
+
unsettledValueUsd: BN;
|
|
4147
4287
|
unsettledFeesUsd: BN;
|
|
4148
4288
|
cumulativeLockFeeSnapshot: BN;
|
|
4149
4289
|
degenSizeUsd: BN;
|
|
4290
|
+
referencePrice: {
|
|
4291
|
+
price: BN;
|
|
4292
|
+
exponent: number;
|
|
4293
|
+
};
|
|
4150
4294
|
sizeDecimals: number;
|
|
4151
4295
|
lockedDecimals: number;
|
|
4152
4296
|
collateralDecimals: number;
|
|
4153
4297
|
key: PublicKey;
|
|
4154
4298
|
feeAmount: BN;
|
|
4299
|
+
allowPayout: boolean;
|
|
4300
|
+
availableUsd: BN;
|
|
4301
|
+
availableAmount: BN;
|
|
4155
4302
|
refererTokenStakeAccount: PublicKey;
|
|
4156
4303
|
refererBoosterAccount: PublicKey;
|
|
4157
4304
|
level: number;
|
|
@@ -4165,6 +4312,7 @@ export declare class PerpetualsClient {
|
|
|
4165
4312
|
rewardTokens: BN;
|
|
4166
4313
|
unclaimedRevenueAmount: BN;
|
|
4167
4314
|
revenueSnapshot: BN;
|
|
4315
|
+
claimableRebateUsd: BN;
|
|
4168
4316
|
tokenMint: PublicKey;
|
|
4169
4317
|
tokenVaultTokenAccount: PublicKey;
|
|
4170
4318
|
tokenPermissions: {
|
|
@@ -4247,7 +4395,7 @@ export declare class PerpetualsClient {
|
|
|
4247
4395
|
maxUtilization: number;
|
|
4248
4396
|
degenPositionFactor: number;
|
|
4249
4397
|
degenExposureFactor: number;
|
|
4250
|
-
|
|
4398
|
+
maxPositionSizeUsd: BN;
|
|
4251
4399
|
maxExposureUsd: BN;
|
|
4252
4400
|
};
|
|
4253
4401
|
permissions: {
|
|
@@ -4340,7 +4488,7 @@ export declare class PerpetualsClient {
|
|
|
4340
4488
|
reservedAmount: BN;
|
|
4341
4489
|
minReserveUsd: BN;
|
|
4342
4490
|
limitPriceBufferBps: BN;
|
|
4343
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
4491
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4344
4492
|
owner: PublicKey;
|
|
4345
4493
|
stakeStats: {
|
|
4346
4494
|
pendingActivation: BN;
|
|
@@ -4374,7 +4522,7 @@ export declare class PerpetualsClient {
|
|
|
4374
4522
|
lockedAmount: BN;
|
|
4375
4523
|
lockedUsd: BN;
|
|
4376
4524
|
collateralAmount: BN;
|
|
4377
|
-
|
|
4525
|
+
collateralLiabilityUsd: BN;
|
|
4378
4526
|
unsettledFeeUsd: BN;
|
|
4379
4527
|
cumulativeLockFeeSnapshot: BN;
|
|
4380
4528
|
sizeDecimals: number;
|
|
@@ -4383,7 +4531,7 @@ export declare class PerpetualsClient {
|
|
|
4383
4531
|
};
|
|
4384
4532
|
targetCustodyUid: number;
|
|
4385
4533
|
collateralCustodyUid: number;
|
|
4386
|
-
padding2: number[] | BN[]
|
|
4534
|
+
padding2: number[] | BN[];
|
|
4387
4535
|
numSigners: number;
|
|
4388
4536
|
numSigned: number;
|
|
4389
4537
|
minSignatures: number;
|
|
@@ -4397,6 +4545,7 @@ export declare class PerpetualsClient {
|
|
|
4397
4545
|
conf: BN;
|
|
4398
4546
|
ema: BN;
|
|
4399
4547
|
publishTime: BN;
|
|
4548
|
+
extOracleAccount: PublicKey;
|
|
4400
4549
|
market: PublicKey;
|
|
4401
4550
|
limitOrders: unknown;
|
|
4402
4551
|
takeProfitOrders: unknown;
|
|
@@ -4439,7 +4588,7 @@ export declare class PerpetualsClient {
|
|
|
4439
4588
|
}[];
|
|
4440
4589
|
markets: PublicKey[];
|
|
4441
4590
|
maxAumUsd: BN;
|
|
4442
|
-
buffer: BN;
|
|
4591
|
+
buffer: number | BN;
|
|
4443
4592
|
rawAumUsd: BN;
|
|
4444
4593
|
equityUsd: BN;
|
|
4445
4594
|
totalStaked: {
|
|
@@ -4470,6 +4619,9 @@ export declare class PerpetualsClient {
|
|
|
4470
4619
|
lpPrice: BN;
|
|
4471
4620
|
compoundingLpPrice: BN;
|
|
4472
4621
|
lastUpdatedTimestamp: BN;
|
|
4622
|
+
feesObligationUsd: BN;
|
|
4623
|
+
rebateObligationUsd: BN;
|
|
4624
|
+
thresholdUsd: BN;
|
|
4473
4625
|
delegate: PublicKey;
|
|
4474
4626
|
openTime: BN;
|
|
4475
4627
|
updateTime: BN;
|
|
@@ -4483,15 +4635,22 @@ export declare class PerpetualsClient {
|
|
|
4483
4635
|
lockedUsd: BN;
|
|
4484
4636
|
collateralAmount: BN;
|
|
4485
4637
|
collateralUsd: BN;
|
|
4486
|
-
|
|
4638
|
+
unsettledValueUsd: BN;
|
|
4487
4639
|
unsettledFeesUsd: BN;
|
|
4488
4640
|
cumulativeLockFeeSnapshot: BN;
|
|
4489
4641
|
degenSizeUsd: BN;
|
|
4642
|
+
referencePrice: {
|
|
4643
|
+
price: BN;
|
|
4644
|
+
exponent: number;
|
|
4645
|
+
};
|
|
4490
4646
|
sizeDecimals: number;
|
|
4491
4647
|
lockedDecimals: number;
|
|
4492
4648
|
collateralDecimals: number;
|
|
4493
4649
|
key: PublicKey;
|
|
4494
4650
|
feeAmount: BN;
|
|
4651
|
+
allowPayout: boolean;
|
|
4652
|
+
availableUsd: BN;
|
|
4653
|
+
availableAmount: BN;
|
|
4495
4654
|
refererTokenStakeAccount: PublicKey;
|
|
4496
4655
|
refererBoosterAccount: PublicKey;
|
|
4497
4656
|
level: number;
|
|
@@ -4505,6 +4664,7 @@ export declare class PerpetualsClient {
|
|
|
4505
4664
|
rewardTokens: BN;
|
|
4506
4665
|
unclaimedRevenueAmount: BN;
|
|
4507
4666
|
revenueSnapshot: BN;
|
|
4667
|
+
claimableRebateUsd: BN;
|
|
4508
4668
|
tokenMint: PublicKey;
|
|
4509
4669
|
tokenVaultTokenAccount: PublicKey;
|
|
4510
4670
|
tokenPermissions: {
|
|
@@ -4568,9 +4728,9 @@ export declare class PerpetualsClient {
|
|
|
4568
4728
|
getMinAndMaxPriceSync: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount) => MinAndMaxPrice;
|
|
4569
4729
|
checkIfPriceStaleOrCustom: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount, timestampInSeconds: BN) => boolean;
|
|
4570
4730
|
getAveragePriceSync: (price1: BN, size1: BN, price2: BN, size2: BN) => BN;
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
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;
|
|
4574
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;
|
|
4575
4735
|
getEntryPriceUsdSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
|
4576
4736
|
getPriceAfterSlippage(isEntry: boolean, slippageBps: BN, targetPrice: OraclePrice, side: Side): ContractOraclePrice;
|
|
@@ -4581,29 +4741,33 @@ export declare class PerpetualsClient {
|
|
|
4581
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;
|
|
4582
4742
|
getTradeSpread: (targetCustodyAccount: CustodyAccount, sizeUsd: BN) => BN;
|
|
4583
4743
|
getExitOraclePriceSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
|
4584
|
-
getExitOraclePriceWithoutSpreadSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
|
4585
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;
|
|
4586
|
-
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;
|
|
4587
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;
|
|
4588
|
-
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,
|
|
4589
|
-
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;
|
|
4590
|
-
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) => {
|
|
4591
4750
|
maxWithdrawableAmount: BN;
|
|
4592
|
-
|
|
4751
|
+
maxWithdrawableAmountUsd: BN;
|
|
4752
|
+
diffUsd: BN;
|
|
4593
4753
|
};
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
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;
|
|
4757
|
+
};
|
|
4758
|
+
getMaxWithdrawableAmountSync: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => {
|
|
4759
|
+
maxWithdrawableAmount: BN;
|
|
4760
|
+
maxWithdrawableAmountUsd: BN;
|
|
4597
4761
|
};
|
|
4598
|
-
getMaxWithdrawableAmountSync: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => BN;
|
|
4599
4762
|
getCumulativeLockFeeSync: (custodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
|
4600
4763
|
getBorrowRateSync: (custodyAccount: CustodyAccount, currentUtilization: BN) => BN;
|
|
4601
4764
|
getLockFeeAndUnsettledUsdForPosition: (position: PositionAccount, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
|
4602
|
-
getLockedUsd: (
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4765
|
+
getLockedUsd: (sizeUsd: BN, collateralUsd: BN, side: Side, marketCorrelation: boolean, maxPayOffBps: BN) => BN;
|
|
4766
|
+
getLiquidationPriceContractHelper: (entryOraclePrice: OraclePrice, lockAndUnsettledFeeUsd: BN, side: Side, targetCustodyAccount: CustodyAccount, positionAccount: PositionAccount) => OraclePrice;
|
|
4767
|
+
getLiquidationPriceSync: (collateralUsd: BN, sizeAmount: BN, entryOraclePrice: OraclePrice, lockAndUnsettledFeeUsd: BN, side: Side, targetPrice: OraclePrice, targetCustodyAccount: CustodyAccount, positionAccount: PositionAccount) => OraclePrice;
|
|
4768
|
+
getLiquidationPriceWithOrder: (collateralUsd: BN, sizeAmount: BN, sizeUsd: BN, sizeDecimals: number, limitOraclePrice: OraclePrice, side: Side, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
|
4769
|
+
getMaxProfitPriceSync: (entryPrice: OraclePrice, marketCorrelation: boolean, side: Side, collateralPrice: OraclePrice, positionAccount: PositionAccount) => OraclePrice;
|
|
4770
|
+
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) => {
|
|
4607
4771
|
pnlUsd: BN;
|
|
4608
4772
|
pnlPercentage: BN;
|
|
4609
4773
|
};
|
|
@@ -4613,6 +4777,10 @@ export declare class PerpetualsClient {
|
|
|
4613
4777
|
profitUsd: BN;
|
|
4614
4778
|
lossUsd: BN;
|
|
4615
4779
|
};
|
|
4780
|
+
getPnlContractHelper: (positionAccount: PositionAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, delay: BN, poolConfig: PoolConfig) => {
|
|
4781
|
+
profitUsd: BN;
|
|
4782
|
+
lossUsd: BN;
|
|
4783
|
+
};
|
|
4616
4784
|
getSwapAmountAndFeesSync: (amountIn: BN, amountOut: BN, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, outputTokenPrice: OraclePrice, outputTokenEmaPrice: OraclePrice, outputTokenCustodyAccount: CustodyAccount, poolAumUsdMax: BN, poolConfig: PoolConfig) => {
|
|
4617
4785
|
minAmountOut: BN;
|
|
4618
4786
|
minAmountIn: BN;
|
|
@@ -4623,8 +4791,9 @@ export declare class PerpetualsClient {
|
|
|
4623
4791
|
poolAmountUsd: BN;
|
|
4624
4792
|
poolEquityUsd: BN;
|
|
4625
4793
|
};
|
|
4626
|
-
|
|
4627
|
-
|
|
4794
|
+
getAssetsUnderManagementUsdContractHelper: (poolAccount: PoolAccount, tokenPrices: OraclePrice[], tokenEmaPrices: OraclePrice[], custodies: CustodyAccount[], markets: MarketAccount[], aumCalcMode: "includePnl" | "excludePnl", currentTime: BN, poolConfig: PoolConfig) => {
|
|
4795
|
+
poolAmountUsd: BN;
|
|
4796
|
+
poolEquityUsd: BN;
|
|
4628
4797
|
};
|
|
4629
4798
|
getFeeDiscount: (perpetualsAccount: PerpetualsAccount, tokenStakeAccount: TokenStake, currentTime: BN) => {
|
|
4630
4799
|
discountBn: BN;
|
|
@@ -4634,12 +4803,14 @@ export declare class PerpetualsClient {
|
|
|
4634
4803
|
getStakedLpTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4635
4804
|
getAssetsUnderManagement: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4636
4805
|
getAddLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
4637
|
-
amount: BN;
|
|
4638
|
-
fee: BN;
|
|
4806
|
+
amount: BN | undefined;
|
|
4807
|
+
fee: BN | undefined;
|
|
4808
|
+
error?: string;
|
|
4639
4809
|
}>;
|
|
4640
4810
|
getRemoveLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, removeTokenCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
4641
4811
|
amount: BN;
|
|
4642
4812
|
fee: BN;
|
|
4813
|
+
error?: string;
|
|
4643
4814
|
}>;
|
|
4644
4815
|
getCompoundingLPTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4645
4816
|
getAddCompoundingLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
@@ -4654,19 +4825,19 @@ export declare class PerpetualsClient {
|
|
|
4654
4825
|
getLiquidationStateView: (positionAccount: PublicKey, poolName: string, tokenMint: PublicKey, collateralMint: PublicKey, poolConfig: PoolConfig) => Promise<any>;
|
|
4655
4826
|
getCompoundingTokenDataView: (poolConfig: PoolConfig) => Promise<any>;
|
|
4656
4827
|
getLpTokenPriceView: (poolConfig: PoolConfig) => Promise<any>;
|
|
4657
|
-
openPosition: (targetSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, collateralWithfee: BN, size: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey,
|
|
4828
|
+
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<{
|
|
4658
4829
|
instructions: TransactionInstruction[];
|
|
4659
4830
|
additionalSigners: Signer[];
|
|
4660
4831
|
}>;
|
|
4661
|
-
closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey,
|
|
4832
|
+
closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4662
4833
|
instructions: TransactionInstruction[];
|
|
4663
4834
|
additionalSigners: Signer[];
|
|
4664
4835
|
}>;
|
|
4665
|
-
swapAndOpen: (targetTokenSymbol: string, collateralTokenSymbol: string, userInputTokenSymbol: string, amountIn: BN,
|
|
4836
|
+
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<{
|
|
4666
4837
|
instructions: TransactionInstruction[];
|
|
4667
4838
|
additionalSigners: Signer[];
|
|
4668
4839
|
}>;
|
|
4669
|
-
closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string,
|
|
4840
|
+
closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, ephemeralSignerPubkey?: any) => Promise<{
|
|
4670
4841
|
instructions: TransactionInstruction[];
|
|
4671
4842
|
additionalSigners: Signer[];
|
|
4672
4843
|
}>;
|
|
@@ -4674,23 +4845,23 @@ export declare class PerpetualsClient {
|
|
|
4674
4845
|
instructions: TransactionInstruction[];
|
|
4675
4846
|
additionalSigners: Signer[];
|
|
4676
4847
|
}>;
|
|
4677
|
-
swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN,
|
|
4848
|
+
swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4678
4849
|
instructions: TransactionInstruction[];
|
|
4679
4850
|
additionalSigners: Signer[];
|
|
4680
4851
|
}>;
|
|
4681
|
-
removeCollateral: (
|
|
4852
|
+
removeCollateral: (collateralDeltaUsd: BN, marketSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4682
4853
|
instructions: TransactionInstruction[];
|
|
4683
4854
|
additionalSigners: Signer[];
|
|
4684
4855
|
}>;
|
|
4685
|
-
removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string,
|
|
4856
|
+
removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string, collateralDeltaUsd: BN, side: Side, poolConfig: PoolConfig, ephemeralSignerPubkey?: any) => Promise<{
|
|
4686
4857
|
instructions: TransactionInstruction[];
|
|
4687
4858
|
additionalSigners: Signer[];
|
|
4688
4859
|
}>;
|
|
4689
|
-
increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4860
|
+
increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4690
4861
|
instructions: TransactionInstruction[];
|
|
4691
4862
|
additionalSigners: Signer[];
|
|
4692
4863
|
}>;
|
|
4693
|
-
decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4864
|
+
decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4694
4865
|
instructions: TransactionInstruction[];
|
|
4695
4866
|
additionalSigners: Signer[];
|
|
4696
4867
|
}>;
|
|
@@ -4710,14 +4881,6 @@ export declare class PerpetualsClient {
|
|
|
4710
4881
|
instructions: TransactionInstruction[];
|
|
4711
4882
|
additionalSigners: Signer[];
|
|
4712
4883
|
}>;
|
|
4713
|
-
updateNftAccount: (nftMint: PublicKey, updateReferer: boolean, updateBooster: boolean, flpStakeAccounts: PublicKey[]) => Promise<{
|
|
4714
|
-
instructions: TransactionInstruction[];
|
|
4715
|
-
additionalSigners: Signer[];
|
|
4716
|
-
}>;
|
|
4717
|
-
levelUp: (poolConfig: PoolConfig, nftMint: PublicKey, authorizationRulesAccount: PublicKey) => Promise<{
|
|
4718
|
-
instructions: TransactionInstruction[];
|
|
4719
|
-
additionalSigners: Signer[];
|
|
4720
|
-
}>;
|
|
4721
4884
|
depositStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
4722
4885
|
instructions: TransactionInstruction[];
|
|
4723
4886
|
additionalSigners: Signer[];
|
|
@@ -4761,14 +4924,6 @@ export declare class PerpetualsClient {
|
|
|
4761
4924
|
instructions: TransactionInstruction[];
|
|
4762
4925
|
additionalSigners: Signer[];
|
|
4763
4926
|
}>;
|
|
4764
|
-
burnAndClaim: (owner: PublicKey, nftMint: PublicKey, poolConfig: PoolConfig, createAta: boolean) => Promise<{
|
|
4765
|
-
instructions: TransactionInstruction[];
|
|
4766
|
-
additionalSigners: Signer[];
|
|
4767
|
-
}>;
|
|
4768
|
-
burnAndStake: (owner: PublicKey, feePayer: PublicKey, nftMint: PublicKey, poolConfig: PoolConfig) => Promise<{
|
|
4769
|
-
instructions: TransactionInstruction[];
|
|
4770
|
-
additionalSigners: Signer[];
|
|
4771
|
-
}>;
|
|
4772
4927
|
depositTokenStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
4773
4928
|
instructions: TransactionInstruction[];
|
|
4774
4929
|
additionalSigners: Signer[];
|
|
@@ -4797,19 +4952,11 @@ export declare class PerpetualsClient {
|
|
|
4797
4952
|
instructions: TransactionInstruction[];
|
|
4798
4953
|
additionalSigners: Signer[];
|
|
4799
4954
|
}>;
|
|
4800
|
-
|
|
4801
|
-
instructions: TransactionInstruction[];
|
|
4802
|
-
additionalSigners: Signer[];
|
|
4803
|
-
}>;
|
|
4804
|
-
distributeReward: (rewardAmount: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4805
|
-
instructions: TransactionInstruction[];
|
|
4806
|
-
additionalSigners: Signer[];
|
|
4807
|
-
}>;
|
|
4808
|
-
collectNftReward: (rewardSymbol: string, poolConfig: PoolConfig, nftMint: PublicKey, createUserATA?: boolean) => Promise<{
|
|
4955
|
+
collectRebate: (owner: PublicKey, rebateSymbol: string, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
|
|
4809
4956
|
instructions: TransactionInstruction[];
|
|
4810
4957
|
additionalSigners: Signer[];
|
|
4811
4958
|
}>;
|
|
4812
|
-
|
|
4959
|
+
settleRebates: (rebateSymbol: string, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4813
4960
|
instructions: TransactionInstruction[];
|
|
4814
4961
|
additionalSigners: Signer[];
|
|
4815
4962
|
}>;
|
|
@@ -4821,11 +4968,11 @@ export declare class PerpetualsClient {
|
|
|
4821
4968
|
instructions: TransactionInstruction[];
|
|
4822
4969
|
additionalSigners: Signer[];
|
|
4823
4970
|
}>;
|
|
4824
|
-
executeLimitOrder: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4971
|
+
executeLimitOrder: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4825
4972
|
instructions: TransactionInstruction[];
|
|
4826
4973
|
additionalSigners: Signer[];
|
|
4827
4974
|
}>;
|
|
4828
|
-
executeLimitWithSwap: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4975
|
+
executeLimitWithSwap: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4829
4976
|
instructions: TransactionInstruction[];
|
|
4830
4977
|
additionalSigners: Signer[];
|
|
4831
4978
|
}>;
|
|
@@ -4845,11 +4992,11 @@ export declare class PerpetualsClient {
|
|
|
4845
4992
|
instructions: TransactionInstruction[];
|
|
4846
4993
|
additionalSigners: Signer[];
|
|
4847
4994
|
}>;
|
|
4848
|
-
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
|
|
4995
|
+
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<{
|
|
4849
4996
|
instructions: TransactionInstruction[];
|
|
4850
4997
|
additionalSigners: Signer[];
|
|
4851
4998
|
}>;
|
|
4852
|
-
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
|
|
4999
|
+
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<{
|
|
4853
5000
|
instructions: TransactionInstruction[];
|
|
4854
5001
|
additionalSigners: Signer[];
|
|
4855
5002
|
}>;
|
|
@@ -4894,11 +5041,11 @@ export declare class PerpetualsClient {
|
|
|
4894
5041
|
instructions: TransactionInstruction[];
|
|
4895
5042
|
additionalSigners: Signer[];
|
|
4896
5043
|
}>;
|
|
4897
|
-
setInternalOraclePrice: (tokenMint: PublicKey, price: BN, expo: number, conf: BN, ema: BN, publishTime: BN, poolConfig: PoolConfig) => Promise<{
|
|
5044
|
+
setInternalOraclePrice: (tokenMint: PublicKey, useCurrentTime: number, price: BN, expo: number, conf: BN, ema: BN, publishTime: BN, poolConfig: PoolConfig) => Promise<{
|
|
4898
5045
|
instructions: TransactionInstruction[];
|
|
4899
5046
|
additionalSigners: Signer[];
|
|
4900
5047
|
}>;
|
|
4901
|
-
setInternalOraclePriceBatch: (tokenMintList: PublicKey[], tokenInternalPrices: InternalPrice[], POOL_CONFIGS: PoolConfig[]) => Promise<{
|
|
5048
|
+
setInternalOraclePriceBatch: (useCurrentTime: number, tokenMintList: PublicKey[], tokenInternalPrices: InternalPrice[], POOL_CONFIGS: PoolConfig[]) => Promise<{
|
|
4902
5049
|
instructions: TransactionInstruction[];
|
|
4903
5050
|
additionalSigners: Signer[];
|
|
4904
5051
|
}>;
|
|
@@ -4930,10 +5077,18 @@ export declare class PerpetualsClient {
|
|
|
4930
5077
|
instructions: TransactionInstruction[];
|
|
4931
5078
|
additionalSigners: Signer[];
|
|
4932
5079
|
}>;
|
|
5080
|
+
withdrawUnclaimedTokens: (poolConfig: PoolConfig) => Promise<{
|
|
5081
|
+
instructions: TransactionInstruction[];
|
|
5082
|
+
additionalSigners: Signer[];
|
|
5083
|
+
}>;
|
|
4933
5084
|
initRevenueTokenAccount: (feeShareBps: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4934
5085
|
instructions: TransactionInstruction[];
|
|
4935
5086
|
additionalSigners: Signer[];
|
|
4936
5087
|
}>;
|
|
5088
|
+
initRebateVault: (allowRebatePayout: boolean, rebateSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
5089
|
+
instructions: TransactionInstruction[];
|
|
5090
|
+
additionalSigners: Signer[];
|
|
5091
|
+
}>;
|
|
4937
5092
|
distributeTokenReward: (amount: BN, epochCount: number, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4938
5093
|
instructions: TransactionInstruction[];
|
|
4939
5094
|
additionalSigners: Signer[];
|
|
@@ -4946,4 +5101,8 @@ export declare class PerpetualsClient {
|
|
|
4946
5101
|
instructions: TransactionInstruction[];
|
|
4947
5102
|
additionalSigners: Signer[];
|
|
4948
5103
|
}>;
|
|
5104
|
+
resizeInternalOracle: (extOracle: PublicKey, tokenMint: PublicKey, intOracleAccount: PublicKey) => Promise<{
|
|
5105
|
+
instructions: TransactionInstruction[];
|
|
5106
|
+
additionalSigners: Signer[];
|
|
5107
|
+
}>;
|
|
4949
5108
|
}
|