flash-sdk 10.5.0 → 10.5.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 +292 -146
- package/dist/PerpetualsClient.js +734 -1068
- package/dist/PoolAccount.d.ts +3 -0
- package/dist/PoolConfig.d.ts +3 -1
- package/dist/PoolConfig.js +4 -2
- package/dist/PoolConfig.json +1040 -525
- 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 +3868 -2448
- package/dist/idl/perpetuals.js +3979 -2559
- 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 +23 -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;
|
|
@@ -304,7 +304,7 @@ export declare class PerpetualsClient {
|
|
|
304
304
|
}[];
|
|
305
305
|
markets: PublicKey[];
|
|
306
306
|
maxAumUsd: BN;
|
|
307
|
-
buffer: BN;
|
|
307
|
+
buffer: number | BN;
|
|
308
308
|
rawAumUsd: BN;
|
|
309
309
|
equityUsd: BN;
|
|
310
310
|
totalStaked: {
|
|
@@ -335,6 +335,9 @@ export declare class PerpetualsClient {
|
|
|
335
335
|
lpPrice: BN;
|
|
336
336
|
compoundingLpPrice: BN;
|
|
337
337
|
lastUpdatedTimestamp: BN;
|
|
338
|
+
feesObligationUsd: BN;
|
|
339
|
+
rebateObligationUsd: BN;
|
|
340
|
+
thresholdUsd: BN;
|
|
338
341
|
delegate: PublicKey;
|
|
339
342
|
openTime: BN;
|
|
340
343
|
updateTime: BN;
|
|
@@ -348,15 +351,22 @@ export declare class PerpetualsClient {
|
|
|
348
351
|
lockedUsd: BN;
|
|
349
352
|
collateralAmount: BN;
|
|
350
353
|
collateralUsd: BN;
|
|
351
|
-
|
|
354
|
+
unsettledValueUsd: BN;
|
|
352
355
|
unsettledFeesUsd: BN;
|
|
353
356
|
cumulativeLockFeeSnapshot: BN;
|
|
354
357
|
degenSizeUsd: BN;
|
|
358
|
+
referencePrice: {
|
|
359
|
+
price: BN;
|
|
360
|
+
exponent: number;
|
|
361
|
+
};
|
|
355
362
|
sizeDecimals: number;
|
|
356
363
|
lockedDecimals: number;
|
|
357
364
|
collateralDecimals: number;
|
|
358
365
|
key: PublicKey;
|
|
359
366
|
feeAmount: BN;
|
|
367
|
+
allowPayout: boolean;
|
|
368
|
+
availableUsd: BN;
|
|
369
|
+
availableAmount: BN;
|
|
360
370
|
refererTokenStakeAccount: PublicKey;
|
|
361
371
|
refererBoosterAccount: PublicKey;
|
|
362
372
|
level: number;
|
|
@@ -370,6 +380,7 @@ export declare class PerpetualsClient {
|
|
|
370
380
|
rewardTokens: BN;
|
|
371
381
|
unclaimedRevenueAmount: BN;
|
|
372
382
|
revenueSnapshot: BN;
|
|
383
|
+
claimableRebateUsd: BN;
|
|
373
384
|
tokenMint: PublicKey;
|
|
374
385
|
tokenVaultTokenAccount: PublicKey;
|
|
375
386
|
tokenPermissions: {
|
|
@@ -453,7 +464,7 @@ export declare class PerpetualsClient {
|
|
|
453
464
|
maxUtilization: number;
|
|
454
465
|
degenPositionFactor: number;
|
|
455
466
|
degenExposureFactor: number;
|
|
456
|
-
|
|
467
|
+
maxPositionSizeUsd: BN;
|
|
457
468
|
maxExposureUsd: BN;
|
|
458
469
|
};
|
|
459
470
|
permissions: {
|
|
@@ -546,7 +557,7 @@ export declare class PerpetualsClient {
|
|
|
546
557
|
reservedAmount: BN;
|
|
547
558
|
minReserveUsd: BN;
|
|
548
559
|
limitPriceBufferBps: BN;
|
|
549
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
560
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
550
561
|
owner: PublicKey;
|
|
551
562
|
stakeStats: {
|
|
552
563
|
pendingActivation: BN;
|
|
@@ -580,7 +591,7 @@ export declare class PerpetualsClient {
|
|
|
580
591
|
lockedAmount: BN;
|
|
581
592
|
lockedUsd: BN;
|
|
582
593
|
collateralAmount: BN;
|
|
583
|
-
|
|
594
|
+
collateralLiabilityUsd: BN;
|
|
584
595
|
unsettledFeeUsd: BN;
|
|
585
596
|
cumulativeLockFeeSnapshot: BN;
|
|
586
597
|
sizeDecimals: number;
|
|
@@ -589,7 +600,7 @@ export declare class PerpetualsClient {
|
|
|
589
600
|
};
|
|
590
601
|
targetCustodyUid: number;
|
|
591
602
|
collateralCustodyUid: number;
|
|
592
|
-
padding2: number[] | BN[]
|
|
603
|
+
padding2: number[] | BN[];
|
|
593
604
|
numSigners: number;
|
|
594
605
|
numSigned: number;
|
|
595
606
|
minSignatures: number;
|
|
@@ -646,7 +657,7 @@ export declare class PerpetualsClient {
|
|
|
646
657
|
}[];
|
|
647
658
|
markets: PublicKey[];
|
|
648
659
|
maxAumUsd: BN;
|
|
649
|
-
buffer: BN;
|
|
660
|
+
buffer: number | BN;
|
|
650
661
|
rawAumUsd: BN;
|
|
651
662
|
equityUsd: BN;
|
|
652
663
|
totalStaked: {
|
|
@@ -677,6 +688,9 @@ export declare class PerpetualsClient {
|
|
|
677
688
|
lpPrice: BN;
|
|
678
689
|
compoundingLpPrice: BN;
|
|
679
690
|
lastUpdatedTimestamp: BN;
|
|
691
|
+
feesObligationUsd: BN;
|
|
692
|
+
rebateObligationUsd: BN;
|
|
693
|
+
thresholdUsd: BN;
|
|
680
694
|
delegate: PublicKey;
|
|
681
695
|
openTime: BN;
|
|
682
696
|
updateTime: BN;
|
|
@@ -690,15 +704,22 @@ export declare class PerpetualsClient {
|
|
|
690
704
|
lockedUsd: BN;
|
|
691
705
|
collateralAmount: BN;
|
|
692
706
|
collateralUsd: BN;
|
|
693
|
-
|
|
707
|
+
unsettledValueUsd: BN;
|
|
694
708
|
unsettledFeesUsd: BN;
|
|
695
709
|
cumulativeLockFeeSnapshot: BN;
|
|
696
710
|
degenSizeUsd: BN;
|
|
711
|
+
referencePrice: {
|
|
712
|
+
price: BN;
|
|
713
|
+
exponent: number;
|
|
714
|
+
};
|
|
697
715
|
sizeDecimals: number;
|
|
698
716
|
lockedDecimals: number;
|
|
699
717
|
collateralDecimals: number;
|
|
700
718
|
key: PublicKey;
|
|
701
719
|
feeAmount: BN;
|
|
720
|
+
allowPayout: boolean;
|
|
721
|
+
availableUsd: BN;
|
|
722
|
+
availableAmount: BN;
|
|
702
723
|
refererTokenStakeAccount: PublicKey;
|
|
703
724
|
refererBoosterAccount: PublicKey;
|
|
704
725
|
level: number;
|
|
@@ -712,6 +733,7 @@ export declare class PerpetualsClient {
|
|
|
712
733
|
rewardTokens: BN;
|
|
713
734
|
unclaimedRevenueAmount: BN;
|
|
714
735
|
revenueSnapshot: BN;
|
|
736
|
+
claimableRebateUsd: BN;
|
|
715
737
|
tokenMint: PublicKey;
|
|
716
738
|
tokenVaultTokenAccount: PublicKey;
|
|
717
739
|
tokenPermissions: {
|
|
@@ -794,7 +816,7 @@ export declare class PerpetualsClient {
|
|
|
794
816
|
maxUtilization: number;
|
|
795
817
|
degenPositionFactor: number;
|
|
796
818
|
degenExposureFactor: number;
|
|
797
|
-
|
|
819
|
+
maxPositionSizeUsd: BN;
|
|
798
820
|
maxExposureUsd: BN;
|
|
799
821
|
};
|
|
800
822
|
permissions: {
|
|
@@ -887,7 +909,7 @@ export declare class PerpetualsClient {
|
|
|
887
909
|
reservedAmount: BN;
|
|
888
910
|
minReserveUsd: BN;
|
|
889
911
|
limitPriceBufferBps: BN;
|
|
890
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
912
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
891
913
|
owner: PublicKey;
|
|
892
914
|
stakeStats: {
|
|
893
915
|
pendingActivation: BN;
|
|
@@ -921,7 +943,7 @@ export declare class PerpetualsClient {
|
|
|
921
943
|
lockedAmount: BN;
|
|
922
944
|
lockedUsd: BN;
|
|
923
945
|
collateralAmount: BN;
|
|
924
|
-
|
|
946
|
+
collateralLiabilityUsd: BN;
|
|
925
947
|
unsettledFeeUsd: BN;
|
|
926
948
|
cumulativeLockFeeSnapshot: BN;
|
|
927
949
|
sizeDecimals: number;
|
|
@@ -930,7 +952,7 @@ export declare class PerpetualsClient {
|
|
|
930
952
|
};
|
|
931
953
|
targetCustodyUid: number;
|
|
932
954
|
collateralCustodyUid: number;
|
|
933
|
-
padding2: number[] | BN[]
|
|
955
|
+
padding2: number[] | BN[];
|
|
934
956
|
numSigners: number;
|
|
935
957
|
numSigned: number;
|
|
936
958
|
minSignatures: number;
|
|
@@ -987,7 +1009,7 @@ export declare class PerpetualsClient {
|
|
|
987
1009
|
}[];
|
|
988
1010
|
markets: PublicKey[];
|
|
989
1011
|
maxAumUsd: BN;
|
|
990
|
-
buffer: BN;
|
|
1012
|
+
buffer: number | BN;
|
|
991
1013
|
rawAumUsd: BN;
|
|
992
1014
|
equityUsd: BN;
|
|
993
1015
|
totalStaked: {
|
|
@@ -1018,6 +1040,9 @@ export declare class PerpetualsClient {
|
|
|
1018
1040
|
lpPrice: BN;
|
|
1019
1041
|
compoundingLpPrice: BN;
|
|
1020
1042
|
lastUpdatedTimestamp: BN;
|
|
1043
|
+
feesObligationUsd: BN;
|
|
1044
|
+
rebateObligationUsd: BN;
|
|
1045
|
+
thresholdUsd: BN;
|
|
1021
1046
|
delegate: PublicKey;
|
|
1022
1047
|
openTime: BN;
|
|
1023
1048
|
updateTime: BN;
|
|
@@ -1031,15 +1056,22 @@ export declare class PerpetualsClient {
|
|
|
1031
1056
|
lockedUsd: BN;
|
|
1032
1057
|
collateralAmount: BN;
|
|
1033
1058
|
collateralUsd: BN;
|
|
1034
|
-
|
|
1059
|
+
unsettledValueUsd: BN;
|
|
1035
1060
|
unsettledFeesUsd: BN;
|
|
1036
1061
|
cumulativeLockFeeSnapshot: BN;
|
|
1037
1062
|
degenSizeUsd: BN;
|
|
1063
|
+
referencePrice: {
|
|
1064
|
+
price: BN;
|
|
1065
|
+
exponent: number;
|
|
1066
|
+
};
|
|
1038
1067
|
sizeDecimals: number;
|
|
1039
1068
|
lockedDecimals: number;
|
|
1040
1069
|
collateralDecimals: number;
|
|
1041
1070
|
key: PublicKey;
|
|
1042
1071
|
feeAmount: BN;
|
|
1072
|
+
allowPayout: boolean;
|
|
1073
|
+
availableUsd: BN;
|
|
1074
|
+
availableAmount: BN;
|
|
1043
1075
|
refererTokenStakeAccount: PublicKey;
|
|
1044
1076
|
refererBoosterAccount: PublicKey;
|
|
1045
1077
|
level: number;
|
|
@@ -1053,6 +1085,7 @@ export declare class PerpetualsClient {
|
|
|
1053
1085
|
rewardTokens: BN;
|
|
1054
1086
|
unclaimedRevenueAmount: BN;
|
|
1055
1087
|
revenueSnapshot: BN;
|
|
1088
|
+
claimableRebateUsd: BN;
|
|
1056
1089
|
tokenMint: PublicKey;
|
|
1057
1090
|
tokenVaultTokenAccount: PublicKey;
|
|
1058
1091
|
tokenPermissions: {
|
|
@@ -1139,7 +1172,7 @@ export declare class PerpetualsClient {
|
|
|
1139
1172
|
maxUtilization: number;
|
|
1140
1173
|
degenPositionFactor: number;
|
|
1141
1174
|
degenExposureFactor: number;
|
|
1142
|
-
|
|
1175
|
+
maxPositionSizeUsd: BN;
|
|
1143
1176
|
maxExposureUsd: BN;
|
|
1144
1177
|
};
|
|
1145
1178
|
permissions: {
|
|
@@ -1232,7 +1265,7 @@ export declare class PerpetualsClient {
|
|
|
1232
1265
|
reservedAmount: BN;
|
|
1233
1266
|
minReserveUsd: BN;
|
|
1234
1267
|
limitPriceBufferBps: BN;
|
|
1235
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1268
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1236
1269
|
owner: PublicKey;
|
|
1237
1270
|
stakeStats: {
|
|
1238
1271
|
pendingActivation: BN;
|
|
@@ -1266,7 +1299,7 @@ export declare class PerpetualsClient {
|
|
|
1266
1299
|
lockedAmount: BN;
|
|
1267
1300
|
lockedUsd: BN;
|
|
1268
1301
|
collateralAmount: BN;
|
|
1269
|
-
|
|
1302
|
+
collateralLiabilityUsd: BN;
|
|
1270
1303
|
unsettledFeeUsd: BN;
|
|
1271
1304
|
cumulativeLockFeeSnapshot: BN;
|
|
1272
1305
|
sizeDecimals: number;
|
|
@@ -1275,7 +1308,7 @@ export declare class PerpetualsClient {
|
|
|
1275
1308
|
};
|
|
1276
1309
|
targetCustodyUid: number;
|
|
1277
1310
|
collateralCustodyUid: number;
|
|
1278
|
-
padding2: number[] | BN[]
|
|
1311
|
+
padding2: number[] | BN[];
|
|
1279
1312
|
numSigners: number;
|
|
1280
1313
|
numSigned: number;
|
|
1281
1314
|
minSignatures: number;
|
|
@@ -1332,7 +1365,7 @@ export declare class PerpetualsClient {
|
|
|
1332
1365
|
}[];
|
|
1333
1366
|
markets: PublicKey[];
|
|
1334
1367
|
maxAumUsd: BN;
|
|
1335
|
-
buffer: BN;
|
|
1368
|
+
buffer: number | BN;
|
|
1336
1369
|
rawAumUsd: BN;
|
|
1337
1370
|
equityUsd: BN;
|
|
1338
1371
|
totalStaked: {
|
|
@@ -1363,6 +1396,9 @@ export declare class PerpetualsClient {
|
|
|
1363
1396
|
lpPrice: BN;
|
|
1364
1397
|
compoundingLpPrice: BN;
|
|
1365
1398
|
lastUpdatedTimestamp: BN;
|
|
1399
|
+
feesObligationUsd: BN;
|
|
1400
|
+
rebateObligationUsd: BN;
|
|
1401
|
+
thresholdUsd: BN;
|
|
1366
1402
|
delegate: PublicKey;
|
|
1367
1403
|
openTime: BN;
|
|
1368
1404
|
updateTime: BN;
|
|
@@ -1376,15 +1412,22 @@ export declare class PerpetualsClient {
|
|
|
1376
1412
|
lockedUsd: BN;
|
|
1377
1413
|
collateralAmount: BN;
|
|
1378
1414
|
collateralUsd: BN;
|
|
1379
|
-
|
|
1415
|
+
unsettledValueUsd: BN;
|
|
1380
1416
|
unsettledFeesUsd: BN;
|
|
1381
1417
|
cumulativeLockFeeSnapshot: BN;
|
|
1382
1418
|
degenSizeUsd: BN;
|
|
1419
|
+
referencePrice: {
|
|
1420
|
+
price: BN;
|
|
1421
|
+
exponent: number;
|
|
1422
|
+
};
|
|
1383
1423
|
sizeDecimals: number;
|
|
1384
1424
|
lockedDecimals: number;
|
|
1385
1425
|
collateralDecimals: number;
|
|
1386
1426
|
key: PublicKey;
|
|
1387
1427
|
feeAmount: BN;
|
|
1428
|
+
allowPayout: boolean;
|
|
1429
|
+
availableUsd: BN;
|
|
1430
|
+
availableAmount: BN;
|
|
1388
1431
|
refererTokenStakeAccount: PublicKey;
|
|
1389
1432
|
refererBoosterAccount: PublicKey;
|
|
1390
1433
|
level: number;
|
|
@@ -1398,6 +1441,7 @@ export declare class PerpetualsClient {
|
|
|
1398
1441
|
rewardTokens: BN;
|
|
1399
1442
|
unclaimedRevenueAmount: BN;
|
|
1400
1443
|
revenueSnapshot: BN;
|
|
1444
|
+
claimableRebateUsd: BN;
|
|
1401
1445
|
tokenMint: PublicKey;
|
|
1402
1446
|
tokenVaultTokenAccount: PublicKey;
|
|
1403
1447
|
tokenPermissions: {
|
|
@@ -1483,7 +1527,7 @@ export declare class PerpetualsClient {
|
|
|
1483
1527
|
maxUtilization: number;
|
|
1484
1528
|
degenPositionFactor: number;
|
|
1485
1529
|
degenExposureFactor: number;
|
|
1486
|
-
|
|
1530
|
+
maxPositionSizeUsd: BN;
|
|
1487
1531
|
maxExposureUsd: BN;
|
|
1488
1532
|
};
|
|
1489
1533
|
permissions: {
|
|
@@ -1576,7 +1620,7 @@ export declare class PerpetualsClient {
|
|
|
1576
1620
|
reservedAmount: BN;
|
|
1577
1621
|
minReserveUsd: BN;
|
|
1578
1622
|
limitPriceBufferBps: BN;
|
|
1579
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1623
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1580
1624
|
owner: PublicKey;
|
|
1581
1625
|
stakeStats: {
|
|
1582
1626
|
pendingActivation: BN;
|
|
@@ -1610,7 +1654,7 @@ export declare class PerpetualsClient {
|
|
|
1610
1654
|
lockedAmount: BN;
|
|
1611
1655
|
lockedUsd: BN;
|
|
1612
1656
|
collateralAmount: BN;
|
|
1613
|
-
|
|
1657
|
+
collateralLiabilityUsd: BN;
|
|
1614
1658
|
unsettledFeeUsd: BN;
|
|
1615
1659
|
cumulativeLockFeeSnapshot: BN;
|
|
1616
1660
|
sizeDecimals: number;
|
|
@@ -1619,7 +1663,7 @@ export declare class PerpetualsClient {
|
|
|
1619
1663
|
};
|
|
1620
1664
|
targetCustodyUid: number;
|
|
1621
1665
|
collateralCustodyUid: number;
|
|
1622
|
-
padding2: number[] | BN[]
|
|
1666
|
+
padding2: number[] | BN[];
|
|
1623
1667
|
numSigners: number;
|
|
1624
1668
|
numSigned: number;
|
|
1625
1669
|
minSignatures: number;
|
|
@@ -1676,7 +1720,7 @@ export declare class PerpetualsClient {
|
|
|
1676
1720
|
}[];
|
|
1677
1721
|
markets: PublicKey[];
|
|
1678
1722
|
maxAumUsd: BN;
|
|
1679
|
-
buffer: BN;
|
|
1723
|
+
buffer: number | BN;
|
|
1680
1724
|
rawAumUsd: BN;
|
|
1681
1725
|
equityUsd: BN;
|
|
1682
1726
|
totalStaked: {
|
|
@@ -1707,6 +1751,9 @@ export declare class PerpetualsClient {
|
|
|
1707
1751
|
lpPrice: BN;
|
|
1708
1752
|
compoundingLpPrice: BN;
|
|
1709
1753
|
lastUpdatedTimestamp: BN;
|
|
1754
|
+
feesObligationUsd: BN;
|
|
1755
|
+
rebateObligationUsd: BN;
|
|
1756
|
+
thresholdUsd: BN;
|
|
1710
1757
|
delegate: PublicKey;
|
|
1711
1758
|
openTime: BN;
|
|
1712
1759
|
updateTime: BN;
|
|
@@ -1720,15 +1767,22 @@ export declare class PerpetualsClient {
|
|
|
1720
1767
|
lockedUsd: BN;
|
|
1721
1768
|
collateralAmount: BN;
|
|
1722
1769
|
collateralUsd: BN;
|
|
1723
|
-
|
|
1770
|
+
unsettledValueUsd: BN;
|
|
1724
1771
|
unsettledFeesUsd: BN;
|
|
1725
1772
|
cumulativeLockFeeSnapshot: BN;
|
|
1726
1773
|
degenSizeUsd: BN;
|
|
1774
|
+
referencePrice: {
|
|
1775
|
+
price: BN;
|
|
1776
|
+
exponent: number;
|
|
1777
|
+
};
|
|
1727
1778
|
sizeDecimals: number;
|
|
1728
1779
|
lockedDecimals: number;
|
|
1729
1780
|
collateralDecimals: number;
|
|
1730
1781
|
key: PublicKey;
|
|
1731
1782
|
feeAmount: BN;
|
|
1783
|
+
allowPayout: boolean;
|
|
1784
|
+
availableUsd: BN;
|
|
1785
|
+
availableAmount: BN;
|
|
1732
1786
|
refererTokenStakeAccount: PublicKey;
|
|
1733
1787
|
refererBoosterAccount: PublicKey;
|
|
1734
1788
|
level: number;
|
|
@@ -1742,6 +1796,7 @@ export declare class PerpetualsClient {
|
|
|
1742
1796
|
rewardTokens: BN;
|
|
1743
1797
|
unclaimedRevenueAmount: BN;
|
|
1744
1798
|
revenueSnapshot: BN;
|
|
1799
|
+
claimableRebateUsd: BN;
|
|
1745
1800
|
tokenMint: PublicKey;
|
|
1746
1801
|
tokenVaultTokenAccount: PublicKey;
|
|
1747
1802
|
tokenPermissions: {
|
|
@@ -1825,7 +1880,7 @@ export declare class PerpetualsClient {
|
|
|
1825
1880
|
maxUtilization: number;
|
|
1826
1881
|
degenPositionFactor: number;
|
|
1827
1882
|
degenExposureFactor: number;
|
|
1828
|
-
|
|
1883
|
+
maxPositionSizeUsd: BN;
|
|
1829
1884
|
maxExposureUsd: BN;
|
|
1830
1885
|
};
|
|
1831
1886
|
permissions: {
|
|
@@ -1918,7 +1973,7 @@ export declare class PerpetualsClient {
|
|
|
1918
1973
|
reservedAmount: BN;
|
|
1919
1974
|
minReserveUsd: BN;
|
|
1920
1975
|
limitPriceBufferBps: BN;
|
|
1921
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1976
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1922
1977
|
owner: PublicKey;
|
|
1923
1978
|
stakeStats: {
|
|
1924
1979
|
pendingActivation: BN;
|
|
@@ -1952,7 +2007,7 @@ export declare class PerpetualsClient {
|
|
|
1952
2007
|
lockedAmount: BN;
|
|
1953
2008
|
lockedUsd: BN;
|
|
1954
2009
|
collateralAmount: BN;
|
|
1955
|
-
|
|
2010
|
+
collateralLiabilityUsd: BN;
|
|
1956
2011
|
unsettledFeeUsd: BN;
|
|
1957
2012
|
cumulativeLockFeeSnapshot: BN;
|
|
1958
2013
|
sizeDecimals: number;
|
|
@@ -1961,7 +2016,7 @@ export declare class PerpetualsClient {
|
|
|
1961
2016
|
};
|
|
1962
2017
|
targetCustodyUid: number;
|
|
1963
2018
|
collateralCustodyUid: number;
|
|
1964
|
-
padding2: number[] | BN[]
|
|
2019
|
+
padding2: number[] | BN[];
|
|
1965
2020
|
numSigners: number;
|
|
1966
2021
|
numSigned: number;
|
|
1967
2022
|
minSignatures: number;
|
|
@@ -2018,7 +2073,7 @@ export declare class PerpetualsClient {
|
|
|
2018
2073
|
}[];
|
|
2019
2074
|
markets: PublicKey[];
|
|
2020
2075
|
maxAumUsd: BN;
|
|
2021
|
-
buffer: BN;
|
|
2076
|
+
buffer: number | BN;
|
|
2022
2077
|
rawAumUsd: BN;
|
|
2023
2078
|
equityUsd: BN;
|
|
2024
2079
|
totalStaked: {
|
|
@@ -2049,6 +2104,9 @@ export declare class PerpetualsClient {
|
|
|
2049
2104
|
lpPrice: BN;
|
|
2050
2105
|
compoundingLpPrice: BN;
|
|
2051
2106
|
lastUpdatedTimestamp: BN;
|
|
2107
|
+
feesObligationUsd: BN;
|
|
2108
|
+
rebateObligationUsd: BN;
|
|
2109
|
+
thresholdUsd: BN;
|
|
2052
2110
|
delegate: PublicKey;
|
|
2053
2111
|
openTime: BN;
|
|
2054
2112
|
updateTime: BN;
|
|
@@ -2062,15 +2120,22 @@ export declare class PerpetualsClient {
|
|
|
2062
2120
|
lockedUsd: BN;
|
|
2063
2121
|
collateralAmount: BN;
|
|
2064
2122
|
collateralUsd: BN;
|
|
2065
|
-
|
|
2123
|
+
unsettledValueUsd: BN;
|
|
2066
2124
|
unsettledFeesUsd: BN;
|
|
2067
2125
|
cumulativeLockFeeSnapshot: BN;
|
|
2068
2126
|
degenSizeUsd: BN;
|
|
2127
|
+
referencePrice: {
|
|
2128
|
+
price: BN;
|
|
2129
|
+
exponent: number;
|
|
2130
|
+
};
|
|
2069
2131
|
sizeDecimals: number;
|
|
2070
2132
|
lockedDecimals: number;
|
|
2071
2133
|
collateralDecimals: number;
|
|
2072
2134
|
key: PublicKey;
|
|
2073
2135
|
feeAmount: BN;
|
|
2136
|
+
allowPayout: boolean;
|
|
2137
|
+
availableUsd: BN;
|
|
2138
|
+
availableAmount: BN;
|
|
2074
2139
|
refererTokenStakeAccount: PublicKey;
|
|
2075
2140
|
refererBoosterAccount: PublicKey;
|
|
2076
2141
|
level: number;
|
|
@@ -2084,6 +2149,7 @@ export declare class PerpetualsClient {
|
|
|
2084
2149
|
rewardTokens: BN;
|
|
2085
2150
|
unclaimedRevenueAmount: BN;
|
|
2086
2151
|
revenueSnapshot: BN;
|
|
2152
|
+
claimableRebateUsd: BN;
|
|
2087
2153
|
tokenMint: PublicKey;
|
|
2088
2154
|
tokenVaultTokenAccount: PublicKey;
|
|
2089
2155
|
tokenPermissions: {
|
|
@@ -2166,7 +2232,7 @@ export declare class PerpetualsClient {
|
|
|
2166
2232
|
maxUtilization: number;
|
|
2167
2233
|
degenPositionFactor: number;
|
|
2168
2234
|
degenExposureFactor: number;
|
|
2169
|
-
|
|
2235
|
+
maxPositionSizeUsd: BN;
|
|
2170
2236
|
maxExposureUsd: BN;
|
|
2171
2237
|
};
|
|
2172
2238
|
permissions: {
|
|
@@ -2259,7 +2325,7 @@ export declare class PerpetualsClient {
|
|
|
2259
2325
|
reservedAmount: BN;
|
|
2260
2326
|
minReserveUsd: BN;
|
|
2261
2327
|
limitPriceBufferBps: BN;
|
|
2262
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
2328
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2263
2329
|
owner: PublicKey;
|
|
2264
2330
|
stakeStats: {
|
|
2265
2331
|
pendingActivation: BN;
|
|
@@ -2293,7 +2359,7 @@ export declare class PerpetualsClient {
|
|
|
2293
2359
|
lockedAmount: BN;
|
|
2294
2360
|
lockedUsd: BN;
|
|
2295
2361
|
collateralAmount: BN;
|
|
2296
|
-
|
|
2362
|
+
collateralLiabilityUsd: BN;
|
|
2297
2363
|
unsettledFeeUsd: BN;
|
|
2298
2364
|
cumulativeLockFeeSnapshot: BN;
|
|
2299
2365
|
sizeDecimals: number;
|
|
@@ -2302,7 +2368,7 @@ export declare class PerpetualsClient {
|
|
|
2302
2368
|
};
|
|
2303
2369
|
targetCustodyUid: number;
|
|
2304
2370
|
collateralCustodyUid: number;
|
|
2305
|
-
padding2: number[] | BN[]
|
|
2371
|
+
padding2: number[] | BN[];
|
|
2306
2372
|
numSigners: number;
|
|
2307
2373
|
numSigned: number;
|
|
2308
2374
|
minSignatures: number;
|
|
@@ -2359,7 +2425,7 @@ export declare class PerpetualsClient {
|
|
|
2359
2425
|
}[];
|
|
2360
2426
|
markets: PublicKey[];
|
|
2361
2427
|
maxAumUsd: BN;
|
|
2362
|
-
buffer: BN;
|
|
2428
|
+
buffer: number | BN;
|
|
2363
2429
|
rawAumUsd: BN;
|
|
2364
2430
|
equityUsd: BN;
|
|
2365
2431
|
totalStaked: {
|
|
@@ -2390,6 +2456,9 @@ export declare class PerpetualsClient {
|
|
|
2390
2456
|
lpPrice: BN;
|
|
2391
2457
|
compoundingLpPrice: BN;
|
|
2392
2458
|
lastUpdatedTimestamp: BN;
|
|
2459
|
+
feesObligationUsd: BN;
|
|
2460
|
+
rebateObligationUsd: BN;
|
|
2461
|
+
thresholdUsd: BN;
|
|
2393
2462
|
delegate: PublicKey;
|
|
2394
2463
|
openTime: BN;
|
|
2395
2464
|
updateTime: BN;
|
|
@@ -2403,15 +2472,22 @@ export declare class PerpetualsClient {
|
|
|
2403
2472
|
lockedUsd: BN;
|
|
2404
2473
|
collateralAmount: BN;
|
|
2405
2474
|
collateralUsd: BN;
|
|
2406
|
-
|
|
2475
|
+
unsettledValueUsd: BN;
|
|
2407
2476
|
unsettledFeesUsd: BN;
|
|
2408
2477
|
cumulativeLockFeeSnapshot: BN;
|
|
2409
2478
|
degenSizeUsd: BN;
|
|
2479
|
+
referencePrice: {
|
|
2480
|
+
price: BN;
|
|
2481
|
+
exponent: number;
|
|
2482
|
+
};
|
|
2410
2483
|
sizeDecimals: number;
|
|
2411
2484
|
lockedDecimals: number;
|
|
2412
2485
|
collateralDecimals: number;
|
|
2413
2486
|
key: PublicKey;
|
|
2414
2487
|
feeAmount: BN;
|
|
2488
|
+
allowPayout: boolean;
|
|
2489
|
+
availableUsd: BN;
|
|
2490
|
+
availableAmount: BN;
|
|
2415
2491
|
refererTokenStakeAccount: PublicKey;
|
|
2416
2492
|
refererBoosterAccount: PublicKey;
|
|
2417
2493
|
level: number;
|
|
@@ -2425,6 +2501,7 @@ export declare class PerpetualsClient {
|
|
|
2425
2501
|
rewardTokens: BN;
|
|
2426
2502
|
unclaimedRevenueAmount: BN;
|
|
2427
2503
|
revenueSnapshot: BN;
|
|
2504
|
+
claimableRebateUsd: BN;
|
|
2428
2505
|
tokenMint: PublicKey;
|
|
2429
2506
|
tokenVaultTokenAccount: PublicKey;
|
|
2430
2507
|
tokenPermissions: {
|
|
@@ -2507,7 +2584,7 @@ export declare class PerpetualsClient {
|
|
|
2507
2584
|
maxUtilization: number;
|
|
2508
2585
|
degenPositionFactor: number;
|
|
2509
2586
|
degenExposureFactor: number;
|
|
2510
|
-
|
|
2587
|
+
maxPositionSizeUsd: BN;
|
|
2511
2588
|
maxExposureUsd: BN;
|
|
2512
2589
|
};
|
|
2513
2590
|
permissions: {
|
|
@@ -2600,7 +2677,7 @@ export declare class PerpetualsClient {
|
|
|
2600
2677
|
reservedAmount: BN;
|
|
2601
2678
|
minReserveUsd: BN;
|
|
2602
2679
|
limitPriceBufferBps: BN;
|
|
2603
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
2680
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2604
2681
|
owner: PublicKey;
|
|
2605
2682
|
stakeStats: {
|
|
2606
2683
|
pendingActivation: BN;
|
|
@@ -2634,7 +2711,7 @@ export declare class PerpetualsClient {
|
|
|
2634
2711
|
lockedAmount: BN;
|
|
2635
2712
|
lockedUsd: BN;
|
|
2636
2713
|
collateralAmount: BN;
|
|
2637
|
-
|
|
2714
|
+
collateralLiabilityUsd: BN;
|
|
2638
2715
|
unsettledFeeUsd: BN;
|
|
2639
2716
|
cumulativeLockFeeSnapshot: BN;
|
|
2640
2717
|
sizeDecimals: number;
|
|
@@ -2643,7 +2720,7 @@ export declare class PerpetualsClient {
|
|
|
2643
2720
|
};
|
|
2644
2721
|
targetCustodyUid: number;
|
|
2645
2722
|
collateralCustodyUid: number;
|
|
2646
|
-
padding2: number[] | BN[]
|
|
2723
|
+
padding2: number[] | BN[];
|
|
2647
2724
|
numSigners: number;
|
|
2648
2725
|
numSigned: number;
|
|
2649
2726
|
minSignatures: number;
|
|
@@ -2700,7 +2777,7 @@ export declare class PerpetualsClient {
|
|
|
2700
2777
|
}[];
|
|
2701
2778
|
markets: PublicKey[];
|
|
2702
2779
|
maxAumUsd: BN;
|
|
2703
|
-
buffer: BN;
|
|
2780
|
+
buffer: number | BN;
|
|
2704
2781
|
rawAumUsd: BN;
|
|
2705
2782
|
equityUsd: BN;
|
|
2706
2783
|
totalStaked: {
|
|
@@ -2731,6 +2808,9 @@ export declare class PerpetualsClient {
|
|
|
2731
2808
|
lpPrice: BN;
|
|
2732
2809
|
compoundingLpPrice: BN;
|
|
2733
2810
|
lastUpdatedTimestamp: BN;
|
|
2811
|
+
feesObligationUsd: BN;
|
|
2812
|
+
rebateObligationUsd: BN;
|
|
2813
|
+
thresholdUsd: BN;
|
|
2734
2814
|
delegate: PublicKey;
|
|
2735
2815
|
openTime: BN;
|
|
2736
2816
|
updateTime: BN;
|
|
@@ -2744,15 +2824,22 @@ export declare class PerpetualsClient {
|
|
|
2744
2824
|
lockedUsd: BN;
|
|
2745
2825
|
collateralAmount: BN;
|
|
2746
2826
|
collateralUsd: BN;
|
|
2747
|
-
|
|
2827
|
+
unsettledValueUsd: BN;
|
|
2748
2828
|
unsettledFeesUsd: BN;
|
|
2749
2829
|
cumulativeLockFeeSnapshot: BN;
|
|
2750
2830
|
degenSizeUsd: BN;
|
|
2831
|
+
referencePrice: {
|
|
2832
|
+
price: BN;
|
|
2833
|
+
exponent: number;
|
|
2834
|
+
};
|
|
2751
2835
|
sizeDecimals: number;
|
|
2752
2836
|
lockedDecimals: number;
|
|
2753
2837
|
collateralDecimals: number;
|
|
2754
2838
|
key: PublicKey;
|
|
2755
2839
|
feeAmount: BN;
|
|
2840
|
+
allowPayout: boolean;
|
|
2841
|
+
availableUsd: BN;
|
|
2842
|
+
availableAmount: BN;
|
|
2756
2843
|
refererTokenStakeAccount: PublicKey;
|
|
2757
2844
|
refererBoosterAccount: PublicKey;
|
|
2758
2845
|
level: number;
|
|
@@ -2766,6 +2853,7 @@ export declare class PerpetualsClient {
|
|
|
2766
2853
|
rewardTokens: BN;
|
|
2767
2854
|
unclaimedRevenueAmount: BN;
|
|
2768
2855
|
revenueSnapshot: BN;
|
|
2856
|
+
claimableRebateUsd: BN;
|
|
2769
2857
|
tokenMint: PublicKey;
|
|
2770
2858
|
tokenVaultTokenAccount: PublicKey;
|
|
2771
2859
|
tokenPermissions: {
|
|
@@ -2826,11 +2914,15 @@ export declare class PerpetualsClient {
|
|
|
2826
2914
|
lockedUsd: BN;
|
|
2827
2915
|
collateralAmount: BN;
|
|
2828
2916
|
collateralUsd: BN;
|
|
2829
|
-
|
|
2917
|
+
unsettledValueUsd: BN;
|
|
2830
2918
|
unsettledFeesUsd: BN;
|
|
2831
2919
|
cumulativeLockFeeSnapshot: BN;
|
|
2832
2920
|
degenSizeUsd: BN;
|
|
2833
|
-
|
|
2921
|
+
referencePrice: {
|
|
2922
|
+
price: BN;
|
|
2923
|
+
exponent: number;
|
|
2924
|
+
};
|
|
2925
|
+
buffer: number;
|
|
2834
2926
|
sizeDecimals: number;
|
|
2835
2927
|
lockedDecimals: number;
|
|
2836
2928
|
collateralDecimals: number;
|
|
@@ -2895,7 +2987,7 @@ export declare class PerpetualsClient {
|
|
|
2895
2987
|
maxUtilization: number;
|
|
2896
2988
|
degenPositionFactor: number;
|
|
2897
2989
|
degenExposureFactor: number;
|
|
2898
|
-
|
|
2990
|
+
maxPositionSizeUsd: BN;
|
|
2899
2991
|
maxExposureUsd: BN;
|
|
2900
2992
|
};
|
|
2901
2993
|
permissions: {
|
|
@@ -2988,7 +3080,7 @@ export declare class PerpetualsClient {
|
|
|
2988
3080
|
reservedAmount: BN;
|
|
2989
3081
|
minReserveUsd: BN;
|
|
2990
3082
|
limitPriceBufferBps: BN;
|
|
2991
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3083
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2992
3084
|
owner: PublicKey;
|
|
2993
3085
|
stakeStats: {
|
|
2994
3086
|
pendingActivation: BN;
|
|
@@ -3022,7 +3114,7 @@ export declare class PerpetualsClient {
|
|
|
3022
3114
|
lockedAmount: BN;
|
|
3023
3115
|
lockedUsd: BN;
|
|
3024
3116
|
collateralAmount: BN;
|
|
3025
|
-
|
|
3117
|
+
collateralLiabilityUsd: BN;
|
|
3026
3118
|
unsettledFeeUsd: BN;
|
|
3027
3119
|
cumulativeLockFeeSnapshot: BN;
|
|
3028
3120
|
sizeDecimals: number;
|
|
@@ -3031,7 +3123,7 @@ export declare class PerpetualsClient {
|
|
|
3031
3123
|
};
|
|
3032
3124
|
targetCustodyUid: number;
|
|
3033
3125
|
collateralCustodyUid: number;
|
|
3034
|
-
padding2: number[] | BN[]
|
|
3126
|
+
padding2: number[] | BN[];
|
|
3035
3127
|
numSigners: number;
|
|
3036
3128
|
numSigned: number;
|
|
3037
3129
|
minSignatures: number;
|
|
@@ -3088,7 +3180,7 @@ export declare class PerpetualsClient {
|
|
|
3088
3180
|
}[];
|
|
3089
3181
|
markets: PublicKey[];
|
|
3090
3182
|
maxAumUsd: BN;
|
|
3091
|
-
buffer: BN;
|
|
3183
|
+
buffer: number | BN;
|
|
3092
3184
|
rawAumUsd: BN;
|
|
3093
3185
|
equityUsd: BN;
|
|
3094
3186
|
totalStaked: {
|
|
@@ -3119,6 +3211,9 @@ export declare class PerpetualsClient {
|
|
|
3119
3211
|
lpPrice: BN;
|
|
3120
3212
|
compoundingLpPrice: BN;
|
|
3121
3213
|
lastUpdatedTimestamp: BN;
|
|
3214
|
+
feesObligationUsd: BN;
|
|
3215
|
+
rebateObligationUsd: BN;
|
|
3216
|
+
thresholdUsd: BN;
|
|
3122
3217
|
delegate: PublicKey;
|
|
3123
3218
|
openTime: BN;
|
|
3124
3219
|
updateTime: BN;
|
|
@@ -3132,15 +3227,22 @@ export declare class PerpetualsClient {
|
|
|
3132
3227
|
lockedUsd: BN;
|
|
3133
3228
|
collateralAmount: BN;
|
|
3134
3229
|
collateralUsd: BN;
|
|
3135
|
-
|
|
3230
|
+
unsettledValueUsd: BN;
|
|
3136
3231
|
unsettledFeesUsd: BN;
|
|
3137
3232
|
cumulativeLockFeeSnapshot: BN;
|
|
3138
3233
|
degenSizeUsd: BN;
|
|
3234
|
+
referencePrice: {
|
|
3235
|
+
price: BN;
|
|
3236
|
+
exponent: number;
|
|
3237
|
+
};
|
|
3139
3238
|
sizeDecimals: number;
|
|
3140
3239
|
lockedDecimals: number;
|
|
3141
3240
|
collateralDecimals: number;
|
|
3142
3241
|
key: PublicKey;
|
|
3143
3242
|
feeAmount: BN;
|
|
3243
|
+
allowPayout: boolean;
|
|
3244
|
+
availableUsd: BN;
|
|
3245
|
+
availableAmount: BN;
|
|
3144
3246
|
refererTokenStakeAccount: PublicKey;
|
|
3145
3247
|
refererBoosterAccount: PublicKey;
|
|
3146
3248
|
level: number;
|
|
@@ -3154,6 +3256,7 @@ export declare class PerpetualsClient {
|
|
|
3154
3256
|
rewardTokens: BN;
|
|
3155
3257
|
unclaimedRevenueAmount: BN;
|
|
3156
3258
|
revenueSnapshot: BN;
|
|
3259
|
+
claimableRebateUsd: BN;
|
|
3157
3260
|
tokenMint: PublicKey;
|
|
3158
3261
|
tokenVaultTokenAccount: PublicKey;
|
|
3159
3262
|
tokenPermissions: {
|
|
@@ -3236,7 +3339,7 @@ export declare class PerpetualsClient {
|
|
|
3236
3339
|
maxUtilization: number;
|
|
3237
3340
|
degenPositionFactor: number;
|
|
3238
3341
|
degenExposureFactor: number;
|
|
3239
|
-
|
|
3342
|
+
maxPositionSizeUsd: BN;
|
|
3240
3343
|
maxExposureUsd: BN;
|
|
3241
3344
|
};
|
|
3242
3345
|
permissions: {
|
|
@@ -3329,7 +3432,7 @@ export declare class PerpetualsClient {
|
|
|
3329
3432
|
reservedAmount: BN;
|
|
3330
3433
|
minReserveUsd: BN;
|
|
3331
3434
|
limitPriceBufferBps: BN;
|
|
3332
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3435
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3333
3436
|
owner: PublicKey;
|
|
3334
3437
|
stakeStats: {
|
|
3335
3438
|
pendingActivation: BN;
|
|
@@ -3363,7 +3466,7 @@ export declare class PerpetualsClient {
|
|
|
3363
3466
|
lockedAmount: BN;
|
|
3364
3467
|
lockedUsd: BN;
|
|
3365
3468
|
collateralAmount: BN;
|
|
3366
|
-
|
|
3469
|
+
collateralLiabilityUsd: BN;
|
|
3367
3470
|
unsettledFeeUsd: BN;
|
|
3368
3471
|
cumulativeLockFeeSnapshot: BN;
|
|
3369
3472
|
sizeDecimals: number;
|
|
@@ -3372,7 +3475,7 @@ export declare class PerpetualsClient {
|
|
|
3372
3475
|
};
|
|
3373
3476
|
targetCustodyUid: number;
|
|
3374
3477
|
collateralCustodyUid: number;
|
|
3375
|
-
padding2: number[] | BN[]
|
|
3478
|
+
padding2: number[] | BN[];
|
|
3376
3479
|
numSigners: number;
|
|
3377
3480
|
numSigned: number;
|
|
3378
3481
|
minSignatures: number;
|
|
@@ -3429,7 +3532,7 @@ export declare class PerpetualsClient {
|
|
|
3429
3532
|
}[];
|
|
3430
3533
|
markets: PublicKey[];
|
|
3431
3534
|
maxAumUsd: BN;
|
|
3432
|
-
buffer: BN;
|
|
3535
|
+
buffer: number | BN;
|
|
3433
3536
|
rawAumUsd: BN;
|
|
3434
3537
|
equityUsd: BN;
|
|
3435
3538
|
totalStaked: {
|
|
@@ -3460,6 +3563,9 @@ export declare class PerpetualsClient {
|
|
|
3460
3563
|
lpPrice: BN;
|
|
3461
3564
|
compoundingLpPrice: BN;
|
|
3462
3565
|
lastUpdatedTimestamp: BN;
|
|
3566
|
+
feesObligationUsd: BN;
|
|
3567
|
+
rebateObligationUsd: BN;
|
|
3568
|
+
thresholdUsd: BN;
|
|
3463
3569
|
delegate: PublicKey;
|
|
3464
3570
|
openTime: BN;
|
|
3465
3571
|
updateTime: BN;
|
|
@@ -3473,15 +3579,22 @@ export declare class PerpetualsClient {
|
|
|
3473
3579
|
lockedUsd: BN;
|
|
3474
3580
|
collateralAmount: BN;
|
|
3475
3581
|
collateralUsd: BN;
|
|
3476
|
-
|
|
3582
|
+
unsettledValueUsd: BN;
|
|
3477
3583
|
unsettledFeesUsd: BN;
|
|
3478
3584
|
cumulativeLockFeeSnapshot: BN;
|
|
3479
3585
|
degenSizeUsd: BN;
|
|
3586
|
+
referencePrice: {
|
|
3587
|
+
price: BN;
|
|
3588
|
+
exponent: number;
|
|
3589
|
+
};
|
|
3480
3590
|
sizeDecimals: number;
|
|
3481
3591
|
lockedDecimals: number;
|
|
3482
3592
|
collateralDecimals: number;
|
|
3483
3593
|
key: PublicKey;
|
|
3484
3594
|
feeAmount: BN;
|
|
3595
|
+
allowPayout: boolean;
|
|
3596
|
+
availableUsd: BN;
|
|
3597
|
+
availableAmount: BN;
|
|
3485
3598
|
refererTokenStakeAccount: PublicKey;
|
|
3486
3599
|
refererBoosterAccount: PublicKey;
|
|
3487
3600
|
level: number;
|
|
@@ -3495,6 +3608,7 @@ export declare class PerpetualsClient {
|
|
|
3495
3608
|
rewardTokens: BN;
|
|
3496
3609
|
unclaimedRevenueAmount: BN;
|
|
3497
3610
|
revenueSnapshot: BN;
|
|
3611
|
+
claimableRebateUsd: BN;
|
|
3498
3612
|
tokenMint: PublicKey;
|
|
3499
3613
|
tokenVaultTokenAccount: PublicKey;
|
|
3500
3614
|
tokenPermissions: {
|
|
@@ -3577,7 +3691,7 @@ export declare class PerpetualsClient {
|
|
|
3577
3691
|
maxUtilization: number;
|
|
3578
3692
|
degenPositionFactor: number;
|
|
3579
3693
|
degenExposureFactor: number;
|
|
3580
|
-
|
|
3694
|
+
maxPositionSizeUsd: BN;
|
|
3581
3695
|
maxExposureUsd: BN;
|
|
3582
3696
|
};
|
|
3583
3697
|
permissions: {
|
|
@@ -3670,7 +3784,7 @@ export declare class PerpetualsClient {
|
|
|
3670
3784
|
reservedAmount: BN;
|
|
3671
3785
|
minReserveUsd: BN;
|
|
3672
3786
|
limitPriceBufferBps: BN;
|
|
3673
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3787
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3674
3788
|
owner: PublicKey;
|
|
3675
3789
|
stakeStats: {
|
|
3676
3790
|
pendingActivation: BN;
|
|
@@ -3704,7 +3818,7 @@ export declare class PerpetualsClient {
|
|
|
3704
3818
|
lockedAmount: BN;
|
|
3705
3819
|
lockedUsd: BN;
|
|
3706
3820
|
collateralAmount: BN;
|
|
3707
|
-
|
|
3821
|
+
collateralLiabilityUsd: BN;
|
|
3708
3822
|
unsettledFeeUsd: BN;
|
|
3709
3823
|
cumulativeLockFeeSnapshot: BN;
|
|
3710
3824
|
sizeDecimals: number;
|
|
@@ -3713,7 +3827,7 @@ export declare class PerpetualsClient {
|
|
|
3713
3827
|
};
|
|
3714
3828
|
targetCustodyUid: number;
|
|
3715
3829
|
collateralCustodyUid: number;
|
|
3716
|
-
padding2: number[] | BN[]
|
|
3830
|
+
padding2: number[] | BN[];
|
|
3717
3831
|
numSigners: number;
|
|
3718
3832
|
numSigned: number;
|
|
3719
3833
|
minSignatures: number;
|
|
@@ -3770,7 +3884,7 @@ export declare class PerpetualsClient {
|
|
|
3770
3884
|
}[];
|
|
3771
3885
|
markets: PublicKey[];
|
|
3772
3886
|
maxAumUsd: BN;
|
|
3773
|
-
buffer: BN;
|
|
3887
|
+
buffer: number | BN;
|
|
3774
3888
|
rawAumUsd: BN;
|
|
3775
3889
|
equityUsd: BN;
|
|
3776
3890
|
totalStaked: {
|
|
@@ -3801,6 +3915,9 @@ export declare class PerpetualsClient {
|
|
|
3801
3915
|
lpPrice: BN;
|
|
3802
3916
|
compoundingLpPrice: BN;
|
|
3803
3917
|
lastUpdatedTimestamp: BN;
|
|
3918
|
+
feesObligationUsd: BN;
|
|
3919
|
+
rebateObligationUsd: BN;
|
|
3920
|
+
thresholdUsd: BN;
|
|
3804
3921
|
delegate: PublicKey;
|
|
3805
3922
|
openTime: BN;
|
|
3806
3923
|
updateTime: BN;
|
|
@@ -3814,15 +3931,22 @@ export declare class PerpetualsClient {
|
|
|
3814
3931
|
lockedUsd: BN;
|
|
3815
3932
|
collateralAmount: BN;
|
|
3816
3933
|
collateralUsd: BN;
|
|
3817
|
-
|
|
3934
|
+
unsettledValueUsd: BN;
|
|
3818
3935
|
unsettledFeesUsd: BN;
|
|
3819
3936
|
cumulativeLockFeeSnapshot: BN;
|
|
3820
3937
|
degenSizeUsd: BN;
|
|
3938
|
+
referencePrice: {
|
|
3939
|
+
price: BN;
|
|
3940
|
+
exponent: number;
|
|
3941
|
+
};
|
|
3821
3942
|
sizeDecimals: number;
|
|
3822
3943
|
lockedDecimals: number;
|
|
3823
3944
|
collateralDecimals: number;
|
|
3824
3945
|
key: PublicKey;
|
|
3825
3946
|
feeAmount: BN;
|
|
3947
|
+
allowPayout: boolean;
|
|
3948
|
+
availableUsd: BN;
|
|
3949
|
+
availableAmount: BN;
|
|
3826
3950
|
refererTokenStakeAccount: PublicKey;
|
|
3827
3951
|
refererBoosterAccount: PublicKey;
|
|
3828
3952
|
level: number;
|
|
@@ -3836,6 +3960,7 @@ export declare class PerpetualsClient {
|
|
|
3836
3960
|
rewardTokens: BN;
|
|
3837
3961
|
unclaimedRevenueAmount: BN;
|
|
3838
3962
|
revenueSnapshot: BN;
|
|
3963
|
+
claimableRebateUsd: BN;
|
|
3839
3964
|
tokenMint: PublicKey;
|
|
3840
3965
|
tokenVaultTokenAccount: PublicKey;
|
|
3841
3966
|
tokenPermissions: {
|
|
@@ -3918,7 +4043,7 @@ export declare class PerpetualsClient {
|
|
|
3918
4043
|
maxUtilization: number;
|
|
3919
4044
|
degenPositionFactor: number;
|
|
3920
4045
|
degenExposureFactor: number;
|
|
3921
|
-
|
|
4046
|
+
maxPositionSizeUsd: BN;
|
|
3922
4047
|
maxExposureUsd: BN;
|
|
3923
4048
|
};
|
|
3924
4049
|
permissions: {
|
|
@@ -4011,7 +4136,7 @@ export declare class PerpetualsClient {
|
|
|
4011
4136
|
reservedAmount: BN;
|
|
4012
4137
|
minReserveUsd: BN;
|
|
4013
4138
|
limitPriceBufferBps: BN;
|
|
4014
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
4139
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4015
4140
|
owner: PublicKey;
|
|
4016
4141
|
stakeStats: {
|
|
4017
4142
|
pendingActivation: BN;
|
|
@@ -4045,7 +4170,7 @@ export declare class PerpetualsClient {
|
|
|
4045
4170
|
lockedAmount: BN;
|
|
4046
4171
|
lockedUsd: BN;
|
|
4047
4172
|
collateralAmount: BN;
|
|
4048
|
-
|
|
4173
|
+
collateralLiabilityUsd: BN;
|
|
4049
4174
|
unsettledFeeUsd: BN;
|
|
4050
4175
|
cumulativeLockFeeSnapshot: BN;
|
|
4051
4176
|
sizeDecimals: number;
|
|
@@ -4054,7 +4179,7 @@ export declare class PerpetualsClient {
|
|
|
4054
4179
|
};
|
|
4055
4180
|
targetCustodyUid: number;
|
|
4056
4181
|
collateralCustodyUid: number;
|
|
4057
|
-
padding2: number[] | BN[]
|
|
4182
|
+
padding2: number[] | BN[];
|
|
4058
4183
|
numSigners: number;
|
|
4059
4184
|
numSigned: number;
|
|
4060
4185
|
minSignatures: number;
|
|
@@ -4111,7 +4236,7 @@ export declare class PerpetualsClient {
|
|
|
4111
4236
|
}[];
|
|
4112
4237
|
markets: PublicKey[];
|
|
4113
4238
|
maxAumUsd: BN;
|
|
4114
|
-
buffer: BN;
|
|
4239
|
+
buffer: number | BN;
|
|
4115
4240
|
rawAumUsd: BN;
|
|
4116
4241
|
equityUsd: BN;
|
|
4117
4242
|
totalStaked: {
|
|
@@ -4142,6 +4267,9 @@ export declare class PerpetualsClient {
|
|
|
4142
4267
|
lpPrice: BN;
|
|
4143
4268
|
compoundingLpPrice: BN;
|
|
4144
4269
|
lastUpdatedTimestamp: BN;
|
|
4270
|
+
feesObligationUsd: BN;
|
|
4271
|
+
rebateObligationUsd: BN;
|
|
4272
|
+
thresholdUsd: BN;
|
|
4145
4273
|
delegate: PublicKey;
|
|
4146
4274
|
openTime: BN;
|
|
4147
4275
|
updateTime: BN;
|
|
@@ -4155,15 +4283,22 @@ export declare class PerpetualsClient {
|
|
|
4155
4283
|
lockedUsd: BN;
|
|
4156
4284
|
collateralAmount: BN;
|
|
4157
4285
|
collateralUsd: BN;
|
|
4158
|
-
|
|
4286
|
+
unsettledValueUsd: BN;
|
|
4159
4287
|
unsettledFeesUsd: BN;
|
|
4160
4288
|
cumulativeLockFeeSnapshot: BN;
|
|
4161
4289
|
degenSizeUsd: BN;
|
|
4290
|
+
referencePrice: {
|
|
4291
|
+
price: BN;
|
|
4292
|
+
exponent: number;
|
|
4293
|
+
};
|
|
4162
4294
|
sizeDecimals: number;
|
|
4163
4295
|
lockedDecimals: number;
|
|
4164
4296
|
collateralDecimals: number;
|
|
4165
4297
|
key: PublicKey;
|
|
4166
4298
|
feeAmount: BN;
|
|
4299
|
+
allowPayout: boolean;
|
|
4300
|
+
availableUsd: BN;
|
|
4301
|
+
availableAmount: BN;
|
|
4167
4302
|
refererTokenStakeAccount: PublicKey;
|
|
4168
4303
|
refererBoosterAccount: PublicKey;
|
|
4169
4304
|
level: number;
|
|
@@ -4177,6 +4312,7 @@ export declare class PerpetualsClient {
|
|
|
4177
4312
|
rewardTokens: BN;
|
|
4178
4313
|
unclaimedRevenueAmount: BN;
|
|
4179
4314
|
revenueSnapshot: BN;
|
|
4315
|
+
claimableRebateUsd: BN;
|
|
4180
4316
|
tokenMint: PublicKey;
|
|
4181
4317
|
tokenVaultTokenAccount: PublicKey;
|
|
4182
4318
|
tokenPermissions: {
|
|
@@ -4259,7 +4395,7 @@ export declare class PerpetualsClient {
|
|
|
4259
4395
|
maxUtilization: number;
|
|
4260
4396
|
degenPositionFactor: number;
|
|
4261
4397
|
degenExposureFactor: number;
|
|
4262
|
-
|
|
4398
|
+
maxPositionSizeUsd: BN;
|
|
4263
4399
|
maxExposureUsd: BN;
|
|
4264
4400
|
};
|
|
4265
4401
|
permissions: {
|
|
@@ -4352,7 +4488,7 @@ export declare class PerpetualsClient {
|
|
|
4352
4488
|
reservedAmount: BN;
|
|
4353
4489
|
minReserveUsd: BN;
|
|
4354
4490
|
limitPriceBufferBps: BN;
|
|
4355
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
4491
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4356
4492
|
owner: PublicKey;
|
|
4357
4493
|
stakeStats: {
|
|
4358
4494
|
pendingActivation: BN;
|
|
@@ -4386,7 +4522,7 @@ export declare class PerpetualsClient {
|
|
|
4386
4522
|
lockedAmount: BN;
|
|
4387
4523
|
lockedUsd: BN;
|
|
4388
4524
|
collateralAmount: BN;
|
|
4389
|
-
|
|
4525
|
+
collateralLiabilityUsd: BN;
|
|
4390
4526
|
unsettledFeeUsd: BN;
|
|
4391
4527
|
cumulativeLockFeeSnapshot: BN;
|
|
4392
4528
|
sizeDecimals: number;
|
|
@@ -4395,7 +4531,7 @@ export declare class PerpetualsClient {
|
|
|
4395
4531
|
};
|
|
4396
4532
|
targetCustodyUid: number;
|
|
4397
4533
|
collateralCustodyUid: number;
|
|
4398
|
-
padding2: number[] | BN[]
|
|
4534
|
+
padding2: number[] | BN[];
|
|
4399
4535
|
numSigners: number;
|
|
4400
4536
|
numSigned: number;
|
|
4401
4537
|
minSignatures: number;
|
|
@@ -4452,7 +4588,7 @@ export declare class PerpetualsClient {
|
|
|
4452
4588
|
}[];
|
|
4453
4589
|
markets: PublicKey[];
|
|
4454
4590
|
maxAumUsd: BN;
|
|
4455
|
-
buffer: BN;
|
|
4591
|
+
buffer: number | BN;
|
|
4456
4592
|
rawAumUsd: BN;
|
|
4457
4593
|
equityUsd: BN;
|
|
4458
4594
|
totalStaked: {
|
|
@@ -4483,6 +4619,9 @@ export declare class PerpetualsClient {
|
|
|
4483
4619
|
lpPrice: BN;
|
|
4484
4620
|
compoundingLpPrice: BN;
|
|
4485
4621
|
lastUpdatedTimestamp: BN;
|
|
4622
|
+
feesObligationUsd: BN;
|
|
4623
|
+
rebateObligationUsd: BN;
|
|
4624
|
+
thresholdUsd: BN;
|
|
4486
4625
|
delegate: PublicKey;
|
|
4487
4626
|
openTime: BN;
|
|
4488
4627
|
updateTime: BN;
|
|
@@ -4496,15 +4635,22 @@ export declare class PerpetualsClient {
|
|
|
4496
4635
|
lockedUsd: BN;
|
|
4497
4636
|
collateralAmount: BN;
|
|
4498
4637
|
collateralUsd: BN;
|
|
4499
|
-
|
|
4638
|
+
unsettledValueUsd: BN;
|
|
4500
4639
|
unsettledFeesUsd: BN;
|
|
4501
4640
|
cumulativeLockFeeSnapshot: BN;
|
|
4502
4641
|
degenSizeUsd: BN;
|
|
4642
|
+
referencePrice: {
|
|
4643
|
+
price: BN;
|
|
4644
|
+
exponent: number;
|
|
4645
|
+
};
|
|
4503
4646
|
sizeDecimals: number;
|
|
4504
4647
|
lockedDecimals: number;
|
|
4505
4648
|
collateralDecimals: number;
|
|
4506
4649
|
key: PublicKey;
|
|
4507
4650
|
feeAmount: BN;
|
|
4651
|
+
allowPayout: boolean;
|
|
4652
|
+
availableUsd: BN;
|
|
4653
|
+
availableAmount: BN;
|
|
4508
4654
|
refererTokenStakeAccount: PublicKey;
|
|
4509
4655
|
refererBoosterAccount: PublicKey;
|
|
4510
4656
|
level: number;
|
|
@@ -4518,6 +4664,7 @@ export declare class PerpetualsClient {
|
|
|
4518
4664
|
rewardTokens: BN;
|
|
4519
4665
|
unclaimedRevenueAmount: BN;
|
|
4520
4666
|
revenueSnapshot: BN;
|
|
4667
|
+
claimableRebateUsd: BN;
|
|
4521
4668
|
tokenMint: PublicKey;
|
|
4522
4669
|
tokenVaultTokenAccount: PublicKey;
|
|
4523
4670
|
tokenPermissions: {
|
|
@@ -4581,9 +4728,9 @@ export declare class PerpetualsClient {
|
|
|
4581
4728
|
getMinAndMaxPriceSync: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount) => MinAndMaxPrice;
|
|
4582
4729
|
checkIfPriceStaleOrCustom: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount, timestampInSeconds: BN) => boolean;
|
|
4583
4730
|
getAveragePriceSync: (price1: BN, size1: BN, price2: BN, size2: BN) => BN;
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
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, collateralTokenPrice: OraclePrice, collateralTokenEmaPrice: OraclePrice, collateralTokenCustodyAccount: CustodyAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetTokenCustodyAccount: CustodyAccount, swapPoolAumUsdMax: BN, poolConfig: PoolConfig, pnlUsd: BN, enableDebuglogs?: boolean) => BN;
|
|
4587
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;
|
|
4588
4735
|
getEntryPriceUsdSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
|
4589
4736
|
getPriceAfterSlippage(isEntry: boolean, slippageBps: BN, targetPrice: OraclePrice, side: Side): ContractOraclePrice;
|
|
@@ -4594,29 +4741,37 @@ export declare class PerpetualsClient {
|
|
|
4594
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;
|
|
4595
4742
|
getTradeSpread: (targetCustodyAccount: CustodyAccount, sizeUsd: BN) => BN;
|
|
4596
4743
|
getExitOraclePriceSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
|
4597
|
-
getExitOraclePriceWithoutSpreadSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
|
4598
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;
|
|
4599
|
-
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;
|
|
4600
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;
|
|
4601
|
-
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,
|
|
4602
|
-
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;
|
|
4603
|
-
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) => {
|
|
4604
4750
|
maxWithdrawableAmount: BN;
|
|
4605
|
-
|
|
4751
|
+
maxWithdrawableAmountUsd: BN;
|
|
4752
|
+
diffUsd: BN;
|
|
4753
|
+
};
|
|
4754
|
+
getFinalCloseAmountUsdSync: (positionAccount: PositionAccount, marketCorrelation: boolean, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig) => {
|
|
4755
|
+
closeAmountUsd: BN;
|
|
4756
|
+
feesAmountUsd: BN;
|
|
4757
|
+
};
|
|
4758
|
+
getMaxAddableCollateralSync: (positionAccount: PositionAccount, targetCustodyAccount: CustodyAccount, collateralCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, errorBandwidthPercentageUi?: number) => {
|
|
4759
|
+
maxAddableAmount: BN;
|
|
4760
|
+
maxAddableAmountUsd: BN;
|
|
4606
4761
|
};
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4762
|
+
getMaxWithdrawableAmountSync: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => {
|
|
4763
|
+
maxWithdrawableAmount: BN;
|
|
4764
|
+
maxWithdrawableAmountUsd: BN;
|
|
4610
4765
|
};
|
|
4611
|
-
getMaxWithdrawableAmountSync: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => BN;
|
|
4612
4766
|
getCumulativeLockFeeSync: (custodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
|
4613
4767
|
getBorrowRateSync: (custodyAccount: CustodyAccount, currentUtilization: BN) => BN;
|
|
4614
4768
|
getLockFeeAndUnsettledUsdForPosition: (position: PositionAccount, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
|
4615
|
-
getLockedUsd: (
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
4769
|
+
getLockedUsd: (sizeUsd: BN, collateralUsd: BN, side: Side, marketCorrelation: boolean, maxPayOffBps: BN) => BN;
|
|
4770
|
+
getLiquidationPriceContractHelper: (entryOraclePrice: OraclePrice, lockAndUnsettledFeeUsd: BN, side: Side, targetCustodyAccount: CustodyAccount, positionAccount: PositionAccount) => OraclePrice;
|
|
4771
|
+
getLiquidationPriceSync: (collateralUsd: BN, entryOraclePrice: OraclePrice, lockAndUnsettledFeeUsd: BN, side: Side, targetCustodyAccount: CustodyAccount, positionAccount: PositionAccount) => OraclePrice;
|
|
4772
|
+
getLiquidationPriceWithOrder: (collateralUsd: BN, sizeAmount: BN, sizeUsd: BN, sizeDecimals: number, limitOraclePrice: OraclePrice, side: Side, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
|
4773
|
+
getMaxProfitPriceSync: (entryPrice: OraclePrice, marketCorrelation: boolean, side: Side, collateralPrice: OraclePrice, positionAccount: PositionAccount) => OraclePrice;
|
|
4774
|
+
getEstimateProfitLossforTpSlEntry: (positionAccount: PositionAccount | null, isTakeProfit: boolean, userEntrytpSlOraclePrice: OraclePrice, collateralDeltaAmount: BN, sizeDeltaAmount: BN, side: Side, marketCorrelation: boolean, maxPayOffBps: BN, marketAccountPk: PublicKey, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, poolConfig: PoolConfig) => {
|
|
4620
4775
|
pnlUsd: BN;
|
|
4621
4776
|
pnlPercentage: BN;
|
|
4622
4777
|
};
|
|
@@ -4626,6 +4781,10 @@ export declare class PerpetualsClient {
|
|
|
4626
4781
|
profitUsd: BN;
|
|
4627
4782
|
lossUsd: BN;
|
|
4628
4783
|
};
|
|
4784
|
+
getPnlContractHelper: (positionAccount: PositionAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, delay: BN, poolConfig: PoolConfig) => {
|
|
4785
|
+
profitUsd: BN;
|
|
4786
|
+
lossUsd: BN;
|
|
4787
|
+
};
|
|
4629
4788
|
getSwapAmountAndFeesSync: (amountIn: BN, amountOut: BN, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, outputTokenPrice: OraclePrice, outputTokenEmaPrice: OraclePrice, outputTokenCustodyAccount: CustodyAccount, poolAumUsdMax: BN, poolConfig: PoolConfig) => {
|
|
4630
4789
|
minAmountOut: BN;
|
|
4631
4790
|
minAmountIn: BN;
|
|
@@ -4636,8 +4795,9 @@ export declare class PerpetualsClient {
|
|
|
4636
4795
|
poolAmountUsd: BN;
|
|
4637
4796
|
poolEquityUsd: BN;
|
|
4638
4797
|
};
|
|
4639
|
-
|
|
4640
|
-
|
|
4798
|
+
getAssetsUnderManagementUsdContractHelper: (poolAccount: PoolAccount, tokenPrices: OraclePrice[], tokenEmaPrices: OraclePrice[], custodies: CustodyAccount[], markets: MarketAccount[], aumCalcMode: "includePnl" | "excludePnl", currentTime: BN, poolConfig: PoolConfig) => {
|
|
4799
|
+
poolAmountUsd: BN;
|
|
4800
|
+
poolEquityUsd: BN;
|
|
4641
4801
|
};
|
|
4642
4802
|
getFeeDiscount: (perpetualsAccount: PerpetualsAccount, tokenStakeAccount: TokenStake, currentTime: BN) => {
|
|
4643
4803
|
discountBn: BN;
|
|
@@ -4647,12 +4807,14 @@ export declare class PerpetualsClient {
|
|
|
4647
4807
|
getStakedLpTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4648
4808
|
getAssetsUnderManagement: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4649
4809
|
getAddLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
4650
|
-
amount: BN;
|
|
4651
|
-
fee: BN;
|
|
4810
|
+
amount: BN | undefined;
|
|
4811
|
+
fee: BN | undefined;
|
|
4812
|
+
error?: string;
|
|
4652
4813
|
}>;
|
|
4653
4814
|
getRemoveLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, removeTokenCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
4654
4815
|
amount: BN;
|
|
4655
4816
|
fee: BN;
|
|
4817
|
+
error?: string;
|
|
4656
4818
|
}>;
|
|
4657
4819
|
getCompoundingLPTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4658
4820
|
getAddCompoundingLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
@@ -4667,19 +4829,19 @@ export declare class PerpetualsClient {
|
|
|
4667
4829
|
getLiquidationStateView: (positionAccount: PublicKey, poolName: string, tokenMint: PublicKey, collateralMint: PublicKey, poolConfig: PoolConfig) => Promise<any>;
|
|
4668
4830
|
getCompoundingTokenDataView: (poolConfig: PoolConfig) => Promise<any>;
|
|
4669
4831
|
getLpTokenPriceView: (poolConfig: PoolConfig) => Promise<any>;
|
|
4670
|
-
openPosition: (targetSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, collateralWithfee: BN, size: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey,
|
|
4832
|
+
openPosition: (targetSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, collateralWithfee: BN, size: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4671
4833
|
instructions: TransactionInstruction[];
|
|
4672
4834
|
additionalSigners: Signer[];
|
|
4673
4835
|
}>;
|
|
4674
|
-
closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey,
|
|
4836
|
+
closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4675
4837
|
instructions: TransactionInstruction[];
|
|
4676
4838
|
additionalSigners: Signer[];
|
|
4677
4839
|
}>;
|
|
4678
|
-
swapAndOpen: (targetTokenSymbol: string, collateralTokenSymbol: string, userInputTokenSymbol: string, amountIn: BN,
|
|
4840
|
+
swapAndOpen: (targetTokenSymbol: string, collateralTokenSymbol: string, userInputTokenSymbol: string, amountIn: BN, priceWithSlippage: ContractOraclePrice, sizeAmount: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4679
4841
|
instructions: TransactionInstruction[];
|
|
4680
4842
|
additionalSigners: Signer[];
|
|
4681
4843
|
}>;
|
|
4682
|
-
closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string,
|
|
4844
|
+
closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, ephemeralSignerPubkey?: any) => Promise<{
|
|
4683
4845
|
instructions: TransactionInstruction[];
|
|
4684
4846
|
additionalSigners: Signer[];
|
|
4685
4847
|
}>;
|
|
@@ -4687,23 +4849,23 @@ export declare class PerpetualsClient {
|
|
|
4687
4849
|
instructions: TransactionInstruction[];
|
|
4688
4850
|
additionalSigners: Signer[];
|
|
4689
4851
|
}>;
|
|
4690
|
-
swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN,
|
|
4852
|
+
swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4691
4853
|
instructions: TransactionInstruction[];
|
|
4692
4854
|
additionalSigners: Signer[];
|
|
4693
4855
|
}>;
|
|
4694
|
-
removeCollateral: (
|
|
4856
|
+
removeCollateral: (collateralDeltaUsd: BN, marketSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4695
4857
|
instructions: TransactionInstruction[];
|
|
4696
4858
|
additionalSigners: Signer[];
|
|
4697
4859
|
}>;
|
|
4698
|
-
removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string,
|
|
4860
|
+
removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string, collateralDeltaUsd: BN, side: Side, poolConfig: PoolConfig, ephemeralSignerPubkey?: any) => Promise<{
|
|
4699
4861
|
instructions: TransactionInstruction[];
|
|
4700
4862
|
additionalSigners: Signer[];
|
|
4701
4863
|
}>;
|
|
4702
|
-
increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4864
|
+
increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4703
4865
|
instructions: TransactionInstruction[];
|
|
4704
4866
|
additionalSigners: Signer[];
|
|
4705
4867
|
}>;
|
|
4706
|
-
decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4868
|
+
decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4707
4869
|
instructions: TransactionInstruction[];
|
|
4708
4870
|
additionalSigners: Signer[];
|
|
4709
4871
|
}>;
|
|
@@ -4723,14 +4885,6 @@ export declare class PerpetualsClient {
|
|
|
4723
4885
|
instructions: TransactionInstruction[];
|
|
4724
4886
|
additionalSigners: Signer[];
|
|
4725
4887
|
}>;
|
|
4726
|
-
updateNftAccount: (nftMint: PublicKey, updateReferer: boolean, updateBooster: boolean, flpStakeAccounts: PublicKey[]) => Promise<{
|
|
4727
|
-
instructions: TransactionInstruction[];
|
|
4728
|
-
additionalSigners: Signer[];
|
|
4729
|
-
}>;
|
|
4730
|
-
levelUp: (poolConfig: PoolConfig, nftMint: PublicKey, authorizationRulesAccount: PublicKey) => Promise<{
|
|
4731
|
-
instructions: TransactionInstruction[];
|
|
4732
|
-
additionalSigners: Signer[];
|
|
4733
|
-
}>;
|
|
4734
4888
|
depositStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
4735
4889
|
instructions: TransactionInstruction[];
|
|
4736
4890
|
additionalSigners: Signer[];
|
|
@@ -4754,11 +4908,11 @@ export declare class PerpetualsClient {
|
|
|
4754
4908
|
instructions: TransactionInstruction[];
|
|
4755
4909
|
additionalSigners: Signer[];
|
|
4756
4910
|
}>;
|
|
4757
|
-
addCompoundingLiquidity: (amountIn: BN, minCompoundingAmountOut: BN, inTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined) => Promise<{
|
|
4911
|
+
addCompoundingLiquidity: (amountIn: BN, minCompoundingAmountOut: BN, inTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined, enableHeapSizeIx?: boolean, enableDebugLogs?: boolean) => Promise<{
|
|
4758
4912
|
instructions: TransactionInstruction[];
|
|
4759
4913
|
additionalSigners: Signer[];
|
|
4760
4914
|
}>;
|
|
4761
|
-
removeCompoundingLiquidity: (compoundingAmountIn: BN, minAmountOut: BN, outTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined) => Promise<{
|
|
4915
|
+
removeCompoundingLiquidity: (compoundingAmountIn: BN, minAmountOut: BN, outTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined, enableHeapSizeIx?: boolean, enableDebugLogs?: boolean) => Promise<{
|
|
4762
4916
|
instructions: TransactionInstruction[];
|
|
4763
4917
|
additionalSigners: Signer[];
|
|
4764
4918
|
}>;
|
|
@@ -4774,14 +4928,6 @@ export declare class PerpetualsClient {
|
|
|
4774
4928
|
instructions: TransactionInstruction[];
|
|
4775
4929
|
additionalSigners: Signer[];
|
|
4776
4930
|
}>;
|
|
4777
|
-
burnAndClaim: (owner: PublicKey, nftMint: PublicKey, poolConfig: PoolConfig, createAta: boolean) => Promise<{
|
|
4778
|
-
instructions: TransactionInstruction[];
|
|
4779
|
-
additionalSigners: Signer[];
|
|
4780
|
-
}>;
|
|
4781
|
-
burnAndStake: (owner: PublicKey, feePayer: PublicKey, nftMint: PublicKey, poolConfig: PoolConfig) => Promise<{
|
|
4782
|
-
instructions: TransactionInstruction[];
|
|
4783
|
-
additionalSigners: Signer[];
|
|
4784
|
-
}>;
|
|
4785
4931
|
depositTokenStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
4786
4932
|
instructions: TransactionInstruction[];
|
|
4787
4933
|
additionalSigners: Signer[];
|
|
@@ -4810,19 +4956,11 @@ export declare class PerpetualsClient {
|
|
|
4810
4956
|
instructions: TransactionInstruction[];
|
|
4811
4957
|
additionalSigners: Signer[];
|
|
4812
4958
|
}>;
|
|
4813
|
-
|
|
4814
|
-
instructions: TransactionInstruction[];
|
|
4815
|
-
additionalSigners: Signer[];
|
|
4816
|
-
}>;
|
|
4817
|
-
distributeReward: (rewardAmount: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4959
|
+
collectRebate: (owner: PublicKey, rebateSymbol: string, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
|
|
4818
4960
|
instructions: TransactionInstruction[];
|
|
4819
4961
|
additionalSigners: Signer[];
|
|
4820
4962
|
}>;
|
|
4821
|
-
|
|
4822
|
-
instructions: TransactionInstruction[];
|
|
4823
|
-
additionalSigners: Signer[];
|
|
4824
|
-
}>;
|
|
4825
|
-
collectAndDistributeFee: (rewardSymbol: string, poolConfig: PoolConfig, createUserATA?: boolean, nftTradingAccount?: PublicKey) => Promise<{
|
|
4963
|
+
settleRebates: (rebateSymbol: string, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4826
4964
|
instructions: TransactionInstruction[];
|
|
4827
4965
|
additionalSigners: Signer[];
|
|
4828
4966
|
}>;
|
|
@@ -4834,11 +4972,11 @@ export declare class PerpetualsClient {
|
|
|
4834
4972
|
instructions: TransactionInstruction[];
|
|
4835
4973
|
additionalSigners: Signer[];
|
|
4836
4974
|
}>;
|
|
4837
|
-
executeLimitOrder: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4975
|
+
executeLimitOrder: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4838
4976
|
instructions: TransactionInstruction[];
|
|
4839
4977
|
additionalSigners: Signer[];
|
|
4840
4978
|
}>;
|
|
4841
|
-
executeLimitWithSwap: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4979
|
+
executeLimitWithSwap: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4842
4980
|
instructions: TransactionInstruction[];
|
|
4843
4981
|
additionalSigners: Signer[];
|
|
4844
4982
|
}>;
|
|
@@ -4858,11 +4996,11 @@ export declare class PerpetualsClient {
|
|
|
4858
4996
|
instructions: TransactionInstruction[];
|
|
4859
4997
|
additionalSigners: Signer[];
|
|
4860
4998
|
}>;
|
|
4861
|
-
executeTriggerWithSwap: (owner: PublicKey, targetSymbol: string, collateralSymbol: string, receivingSymbol: string, side: Side, orderId: number, isStopLoss: boolean, privilege: Privilege, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4999
|
+
executeTriggerWithSwap: (owner: PublicKey, targetSymbol: string, collateralSymbol: string, receivingSymbol: string, side: Side, orderId: number, isStopLoss: boolean, privilege: Privilege, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4862
5000
|
instructions: TransactionInstruction[];
|
|
4863
5001
|
additionalSigners: Signer[];
|
|
4864
5002
|
}>;
|
|
4865
|
-
executeTriggerOrder: (owner: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, isStopLoss: boolean, privilege: Privilege, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
5003
|
+
executeTriggerOrder: (owner: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, isStopLoss: boolean, privilege: Privilege, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4866
5004
|
instructions: TransactionInstruction[];
|
|
4867
5005
|
additionalSigners: Signer[];
|
|
4868
5006
|
}>;
|
|
@@ -4885,9 +5023,9 @@ export declare class PerpetualsClient {
|
|
|
4885
5023
|
}>;
|
|
4886
5024
|
init: (admins: PublicKey[], config: any) => Promise<void>;
|
|
4887
5025
|
setAdminSigners: (admins: PublicKey[], minSignatures: number) => Promise<void>;
|
|
4888
|
-
addPool: (name: string, maxAumUsd: BN, permissions: Permissions, metadataSymbol: string, metadataTitle: string, metadataUri: string, stakingFeeShareBps: BN, vpVolumeFactor: number) => Promise<void>;
|
|
5026
|
+
addPool: (name: string, maxAumUsd: BN, permissions: Permissions, metadataSymbol: string, metadataTitle: string, metadataUri: string, stakingFeeShareBps: BN, vpVolumeFactor: number, stakingFeeBoostBps: BN[], minLpPriceUsd: BN, maxLpPriceUsd: BN, thresholdUsd: BN) => Promise<void>;
|
|
4889
5027
|
removePool: (name: string) => Promise<void>;
|
|
4890
|
-
addCustody: (poolName: string, tokenMint: PublicKey, isToken222: boolean, isStable: boolean, isVirtual: boolean, oracle: OracleParams, pricing: PricingParams, permissions: Permissions, fees: Fees, borrowRate: BorrowRateParams, ratios: TokenRatios[], depegAdjustment: boolean) => Promise<void>;
|
|
5028
|
+
addCustody: (poolName: string, tokenMint: PublicKey, isToken222: boolean, isStable: boolean, isVirtual: boolean, oracle: OracleParams, pricing: PricingParams, permissions: Permissions, fees: Fees, borrowRate: BorrowRateParams, ratios: TokenRatios[], depegAdjustment: boolean, rewardThreshold: BN, minReserveUsd: BN, limitPriceBufferBps: BN) => Promise<void>;
|
|
4891
5029
|
editCustody: (poolName: string, tokenMint: PublicKey, isStable: boolean, oracle: OracleParams, pricing: PricingParams, permissions: Permissions, fees: Fees, borrowRate: BorrowRateParams, ratios: TokenRatios[]) => Promise<void>;
|
|
4892
5030
|
removeCustody: (poolName: string, tokenMint: PublicKey, ratios: TokenRatios[], poolConfig: PoolConfig) => Promise<void>;
|
|
4893
5031
|
protocolWithdrawFees: (rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
@@ -4943,10 +5081,18 @@ export declare class PerpetualsClient {
|
|
|
4943
5081
|
instructions: TransactionInstruction[];
|
|
4944
5082
|
additionalSigners: Signer[];
|
|
4945
5083
|
}>;
|
|
5084
|
+
withdrawUnclaimedTokens: (poolConfig: PoolConfig) => Promise<{
|
|
5085
|
+
instructions: TransactionInstruction[];
|
|
5086
|
+
additionalSigners: Signer[];
|
|
5087
|
+
}>;
|
|
4946
5088
|
initRevenueTokenAccount: (feeShareBps: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4947
5089
|
instructions: TransactionInstruction[];
|
|
4948
5090
|
additionalSigners: Signer[];
|
|
4949
5091
|
}>;
|
|
5092
|
+
initRebateVault: (allowRebatePayout: boolean, rebateSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
5093
|
+
instructions: TransactionInstruction[];
|
|
5094
|
+
additionalSigners: Signer[];
|
|
5095
|
+
}>;
|
|
4950
5096
|
distributeTokenReward: (amount: BN, epochCount: number, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4951
5097
|
instructions: TransactionInstruction[];
|
|
4952
5098
|
additionalSigners: Signer[];
|