flash-sdk 10.4.0 → 10.5.0-alpha.1
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 +729 -1061
- package/dist/PoolAccount.d.ts +3 -0
- package/dist/PoolConfig.d.ts +3 -1
- package/dist/PoolConfig.js +4 -2
- package/dist/PoolConfig.json +1041 -526
- 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 +3432 -2072
- package/dist/idl/perpetuals.js +4979 -3619
- 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 +22 -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 -23
- package/dist/TradingAccount.js +0 -17
|
@@ -2,7 +2,7 @@ import { Program, AnchorProvider, BN } from "@coral-xyz/anchor";
|
|
|
2
2
|
import { PublicKey, TransactionInstruction, Commitment, Signer, AddressLookupTableAccount, VersionedTransaction } from "@solana/web3.js";
|
|
3
3
|
import { PoolAccount } from "./PoolAccount";
|
|
4
4
|
import { PositionAccount } from "./PositionAccount";
|
|
5
|
-
import { AddLiquidityAmountAndFee, InternalPrice, BorrowRateParams, ExitPriceAndFee, Fees, OracleParams, Permissions, PricingParams, RemoveCollateralData, RemoveLiquidityAmountAndFee, Side, TokenRatios, MinAndMaxPrice, FeesAction, ContractOraclePrice, Privilege, PerpetualsAccount,
|
|
5
|
+
import { AddLiquidityAmountAndFee, InternalPrice, BorrowRateParams, ExitPriceAndFee, Fees, OracleParams, Permissions, PricingParams, RemoveCollateralData, RemoveLiquidityAmountAndFee, Side, TokenRatios, MinAndMaxPrice, FeesAction, ContractOraclePrice, Privilege, PerpetualsAccount, EntryPriceAndFeeV2, TokenPermissions, TokenStake, InternalEmaPrice } from "./types";
|
|
6
6
|
import { OraclePrice } from "./OraclePrice";
|
|
7
7
|
import { CustodyAccount } from "./CustodyAccount";
|
|
8
8
|
import { Perpetuals } from "./idl/perpetuals";
|
|
@@ -109,7 +109,7 @@ export declare class PerpetualsClient {
|
|
|
109
109
|
maxUtilization: number;
|
|
110
110
|
degenPositionFactor: number;
|
|
111
111
|
degenExposureFactor: number;
|
|
112
|
-
|
|
112
|
+
maxPositionSizeUsd: BN;
|
|
113
113
|
maxExposureUsd: BN;
|
|
114
114
|
};
|
|
115
115
|
permissions: {
|
|
@@ -202,7 +202,7 @@ export declare class PerpetualsClient {
|
|
|
202
202
|
reservedAmount: BN;
|
|
203
203
|
minReserveUsd: BN;
|
|
204
204
|
limitPriceBufferBps: BN;
|
|
205
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
205
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
206
206
|
owner: PublicKey;
|
|
207
207
|
stakeStats: {
|
|
208
208
|
pendingActivation: BN;
|
|
@@ -236,7 +236,7 @@ export declare class PerpetualsClient {
|
|
|
236
236
|
lockedAmount: BN;
|
|
237
237
|
lockedUsd: BN;
|
|
238
238
|
collateralAmount: BN;
|
|
239
|
-
|
|
239
|
+
collateralLiabilityUsd: BN;
|
|
240
240
|
unsettledFeeUsd: BN;
|
|
241
241
|
cumulativeLockFeeSnapshot: BN;
|
|
242
242
|
sizeDecimals: number;
|
|
@@ -245,7 +245,7 @@ export declare class PerpetualsClient {
|
|
|
245
245
|
};
|
|
246
246
|
targetCustodyUid: number;
|
|
247
247
|
collateralCustodyUid: number;
|
|
248
|
-
padding2: number[] | BN[]
|
|
248
|
+
padding2: number[] | BN[];
|
|
249
249
|
numSigners: number;
|
|
250
250
|
numSigned: number;
|
|
251
251
|
minSignatures: number;
|
|
@@ -302,7 +302,7 @@ export declare class PerpetualsClient {
|
|
|
302
302
|
}[];
|
|
303
303
|
markets: PublicKey[];
|
|
304
304
|
maxAumUsd: BN;
|
|
305
|
-
buffer: BN;
|
|
305
|
+
buffer: number | BN;
|
|
306
306
|
rawAumUsd: BN;
|
|
307
307
|
equityUsd: BN;
|
|
308
308
|
totalStaked: {
|
|
@@ -333,6 +333,9 @@ export declare class PerpetualsClient {
|
|
|
333
333
|
lpPrice: BN;
|
|
334
334
|
compoundingLpPrice: BN;
|
|
335
335
|
lastUpdatedTimestamp: BN;
|
|
336
|
+
feesObligationUsd: BN;
|
|
337
|
+
rebateObligationUsd: BN;
|
|
338
|
+
thresholdUsd: BN;
|
|
336
339
|
delegate: PublicKey;
|
|
337
340
|
openTime: BN;
|
|
338
341
|
updateTime: BN;
|
|
@@ -346,15 +349,22 @@ export declare class PerpetualsClient {
|
|
|
346
349
|
lockedUsd: BN;
|
|
347
350
|
collateralAmount: BN;
|
|
348
351
|
collateralUsd: BN;
|
|
349
|
-
|
|
352
|
+
unsettledValueUsd: BN;
|
|
350
353
|
unsettledFeesUsd: BN;
|
|
351
354
|
cumulativeLockFeeSnapshot: BN;
|
|
352
355
|
degenSizeUsd: BN;
|
|
356
|
+
referencePrice: {
|
|
357
|
+
price: BN;
|
|
358
|
+
exponent: number;
|
|
359
|
+
};
|
|
353
360
|
sizeDecimals: number;
|
|
354
361
|
lockedDecimals: number;
|
|
355
362
|
collateralDecimals: number;
|
|
356
363
|
key: PublicKey;
|
|
357
364
|
feeAmount: BN;
|
|
365
|
+
allowPayout: boolean;
|
|
366
|
+
availableUsd: BN;
|
|
367
|
+
availableAmount: BN;
|
|
358
368
|
refererTokenStakeAccount: PublicKey;
|
|
359
369
|
refererBoosterAccount: PublicKey;
|
|
360
370
|
level: number;
|
|
@@ -368,6 +378,7 @@ export declare class PerpetualsClient {
|
|
|
368
378
|
rewardTokens: BN;
|
|
369
379
|
unclaimedRevenueAmount: BN;
|
|
370
380
|
revenueSnapshot: BN;
|
|
381
|
+
claimableRebateUsd: BN;
|
|
371
382
|
tokenMint: PublicKey;
|
|
372
383
|
tokenVaultTokenAccount: PublicKey;
|
|
373
384
|
tokenPermissions: {
|
|
@@ -451,7 +462,7 @@ export declare class PerpetualsClient {
|
|
|
451
462
|
maxUtilization: number;
|
|
452
463
|
degenPositionFactor: number;
|
|
453
464
|
degenExposureFactor: number;
|
|
454
|
-
|
|
465
|
+
maxPositionSizeUsd: BN;
|
|
455
466
|
maxExposureUsd: BN;
|
|
456
467
|
};
|
|
457
468
|
permissions: {
|
|
@@ -544,7 +555,7 @@ export declare class PerpetualsClient {
|
|
|
544
555
|
reservedAmount: BN;
|
|
545
556
|
minReserveUsd: BN;
|
|
546
557
|
limitPriceBufferBps: BN;
|
|
547
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
558
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
548
559
|
owner: PublicKey;
|
|
549
560
|
stakeStats: {
|
|
550
561
|
pendingActivation: BN;
|
|
@@ -578,7 +589,7 @@ export declare class PerpetualsClient {
|
|
|
578
589
|
lockedAmount: BN;
|
|
579
590
|
lockedUsd: BN;
|
|
580
591
|
collateralAmount: BN;
|
|
581
|
-
|
|
592
|
+
collateralLiabilityUsd: BN;
|
|
582
593
|
unsettledFeeUsd: BN;
|
|
583
594
|
cumulativeLockFeeSnapshot: BN;
|
|
584
595
|
sizeDecimals: number;
|
|
@@ -587,7 +598,7 @@ export declare class PerpetualsClient {
|
|
|
587
598
|
};
|
|
588
599
|
targetCustodyUid: number;
|
|
589
600
|
collateralCustodyUid: number;
|
|
590
|
-
padding2: number[] | BN[]
|
|
601
|
+
padding2: number[] | BN[];
|
|
591
602
|
numSigners: number;
|
|
592
603
|
numSigned: number;
|
|
593
604
|
minSignatures: number;
|
|
@@ -644,7 +655,7 @@ export declare class PerpetualsClient {
|
|
|
644
655
|
}[];
|
|
645
656
|
markets: PublicKey[];
|
|
646
657
|
maxAumUsd: BN;
|
|
647
|
-
buffer: BN;
|
|
658
|
+
buffer: number | BN;
|
|
648
659
|
rawAumUsd: BN;
|
|
649
660
|
equityUsd: BN;
|
|
650
661
|
totalStaked: {
|
|
@@ -675,6 +686,9 @@ export declare class PerpetualsClient {
|
|
|
675
686
|
lpPrice: BN;
|
|
676
687
|
compoundingLpPrice: BN;
|
|
677
688
|
lastUpdatedTimestamp: BN;
|
|
689
|
+
feesObligationUsd: BN;
|
|
690
|
+
rebateObligationUsd: BN;
|
|
691
|
+
thresholdUsd: BN;
|
|
678
692
|
delegate: PublicKey;
|
|
679
693
|
openTime: BN;
|
|
680
694
|
updateTime: BN;
|
|
@@ -688,15 +702,22 @@ export declare class PerpetualsClient {
|
|
|
688
702
|
lockedUsd: BN;
|
|
689
703
|
collateralAmount: BN;
|
|
690
704
|
collateralUsd: BN;
|
|
691
|
-
|
|
705
|
+
unsettledValueUsd: BN;
|
|
692
706
|
unsettledFeesUsd: BN;
|
|
693
707
|
cumulativeLockFeeSnapshot: BN;
|
|
694
708
|
degenSizeUsd: BN;
|
|
709
|
+
referencePrice: {
|
|
710
|
+
price: BN;
|
|
711
|
+
exponent: number;
|
|
712
|
+
};
|
|
695
713
|
sizeDecimals: number;
|
|
696
714
|
lockedDecimals: number;
|
|
697
715
|
collateralDecimals: number;
|
|
698
716
|
key: PublicKey;
|
|
699
717
|
feeAmount: BN;
|
|
718
|
+
allowPayout: boolean;
|
|
719
|
+
availableUsd: BN;
|
|
720
|
+
availableAmount: BN;
|
|
700
721
|
refererTokenStakeAccount: PublicKey;
|
|
701
722
|
refererBoosterAccount: PublicKey;
|
|
702
723
|
level: number;
|
|
@@ -710,6 +731,7 @@ export declare class PerpetualsClient {
|
|
|
710
731
|
rewardTokens: BN;
|
|
711
732
|
unclaimedRevenueAmount: BN;
|
|
712
733
|
revenueSnapshot: BN;
|
|
734
|
+
claimableRebateUsd: BN;
|
|
713
735
|
tokenMint: PublicKey;
|
|
714
736
|
tokenVaultTokenAccount: PublicKey;
|
|
715
737
|
tokenPermissions: {
|
|
@@ -792,7 +814,7 @@ export declare class PerpetualsClient {
|
|
|
792
814
|
maxUtilization: number;
|
|
793
815
|
degenPositionFactor: number;
|
|
794
816
|
degenExposureFactor: number;
|
|
795
|
-
|
|
817
|
+
maxPositionSizeUsd: BN;
|
|
796
818
|
maxExposureUsd: BN;
|
|
797
819
|
};
|
|
798
820
|
permissions: {
|
|
@@ -885,7 +907,7 @@ export declare class PerpetualsClient {
|
|
|
885
907
|
reservedAmount: BN;
|
|
886
908
|
minReserveUsd: BN;
|
|
887
909
|
limitPriceBufferBps: BN;
|
|
888
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
910
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
889
911
|
owner: PublicKey;
|
|
890
912
|
stakeStats: {
|
|
891
913
|
pendingActivation: BN;
|
|
@@ -919,7 +941,7 @@ export declare class PerpetualsClient {
|
|
|
919
941
|
lockedAmount: BN;
|
|
920
942
|
lockedUsd: BN;
|
|
921
943
|
collateralAmount: BN;
|
|
922
|
-
|
|
944
|
+
collateralLiabilityUsd: BN;
|
|
923
945
|
unsettledFeeUsd: BN;
|
|
924
946
|
cumulativeLockFeeSnapshot: BN;
|
|
925
947
|
sizeDecimals: number;
|
|
@@ -928,7 +950,7 @@ export declare class PerpetualsClient {
|
|
|
928
950
|
};
|
|
929
951
|
targetCustodyUid: number;
|
|
930
952
|
collateralCustodyUid: number;
|
|
931
|
-
padding2: number[] | BN[]
|
|
953
|
+
padding2: number[] | BN[];
|
|
932
954
|
numSigners: number;
|
|
933
955
|
numSigned: number;
|
|
934
956
|
minSignatures: number;
|
|
@@ -985,7 +1007,7 @@ export declare class PerpetualsClient {
|
|
|
985
1007
|
}[];
|
|
986
1008
|
markets: PublicKey[];
|
|
987
1009
|
maxAumUsd: BN;
|
|
988
|
-
buffer: BN;
|
|
1010
|
+
buffer: number | BN;
|
|
989
1011
|
rawAumUsd: BN;
|
|
990
1012
|
equityUsd: BN;
|
|
991
1013
|
totalStaked: {
|
|
@@ -1016,6 +1038,9 @@ export declare class PerpetualsClient {
|
|
|
1016
1038
|
lpPrice: BN;
|
|
1017
1039
|
compoundingLpPrice: BN;
|
|
1018
1040
|
lastUpdatedTimestamp: BN;
|
|
1041
|
+
feesObligationUsd: BN;
|
|
1042
|
+
rebateObligationUsd: BN;
|
|
1043
|
+
thresholdUsd: BN;
|
|
1019
1044
|
delegate: PublicKey;
|
|
1020
1045
|
openTime: BN;
|
|
1021
1046
|
updateTime: BN;
|
|
@@ -1029,15 +1054,22 @@ export declare class PerpetualsClient {
|
|
|
1029
1054
|
lockedUsd: BN;
|
|
1030
1055
|
collateralAmount: BN;
|
|
1031
1056
|
collateralUsd: BN;
|
|
1032
|
-
|
|
1057
|
+
unsettledValueUsd: BN;
|
|
1033
1058
|
unsettledFeesUsd: BN;
|
|
1034
1059
|
cumulativeLockFeeSnapshot: BN;
|
|
1035
1060
|
degenSizeUsd: BN;
|
|
1061
|
+
referencePrice: {
|
|
1062
|
+
price: BN;
|
|
1063
|
+
exponent: number;
|
|
1064
|
+
};
|
|
1036
1065
|
sizeDecimals: number;
|
|
1037
1066
|
lockedDecimals: number;
|
|
1038
1067
|
collateralDecimals: number;
|
|
1039
1068
|
key: PublicKey;
|
|
1040
1069
|
feeAmount: BN;
|
|
1070
|
+
allowPayout: boolean;
|
|
1071
|
+
availableUsd: BN;
|
|
1072
|
+
availableAmount: BN;
|
|
1041
1073
|
refererTokenStakeAccount: PublicKey;
|
|
1042
1074
|
refererBoosterAccount: PublicKey;
|
|
1043
1075
|
level: number;
|
|
@@ -1051,6 +1083,7 @@ export declare class PerpetualsClient {
|
|
|
1051
1083
|
rewardTokens: BN;
|
|
1052
1084
|
unclaimedRevenueAmount: BN;
|
|
1053
1085
|
revenueSnapshot: BN;
|
|
1086
|
+
claimableRebateUsd: BN;
|
|
1054
1087
|
tokenMint: PublicKey;
|
|
1055
1088
|
tokenVaultTokenAccount: PublicKey;
|
|
1056
1089
|
tokenPermissions: {
|
|
@@ -1137,7 +1170,7 @@ export declare class PerpetualsClient {
|
|
|
1137
1170
|
maxUtilization: number;
|
|
1138
1171
|
degenPositionFactor: number;
|
|
1139
1172
|
degenExposureFactor: number;
|
|
1140
|
-
|
|
1173
|
+
maxPositionSizeUsd: BN;
|
|
1141
1174
|
maxExposureUsd: BN;
|
|
1142
1175
|
};
|
|
1143
1176
|
permissions: {
|
|
@@ -1230,7 +1263,7 @@ export declare class PerpetualsClient {
|
|
|
1230
1263
|
reservedAmount: BN;
|
|
1231
1264
|
minReserveUsd: BN;
|
|
1232
1265
|
limitPriceBufferBps: BN;
|
|
1233
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1266
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1234
1267
|
owner: PublicKey;
|
|
1235
1268
|
stakeStats: {
|
|
1236
1269
|
pendingActivation: BN;
|
|
@@ -1264,7 +1297,7 @@ export declare class PerpetualsClient {
|
|
|
1264
1297
|
lockedAmount: BN;
|
|
1265
1298
|
lockedUsd: BN;
|
|
1266
1299
|
collateralAmount: BN;
|
|
1267
|
-
|
|
1300
|
+
collateralLiabilityUsd: BN;
|
|
1268
1301
|
unsettledFeeUsd: BN;
|
|
1269
1302
|
cumulativeLockFeeSnapshot: BN;
|
|
1270
1303
|
sizeDecimals: number;
|
|
@@ -1273,7 +1306,7 @@ export declare class PerpetualsClient {
|
|
|
1273
1306
|
};
|
|
1274
1307
|
targetCustodyUid: number;
|
|
1275
1308
|
collateralCustodyUid: number;
|
|
1276
|
-
padding2: number[] | BN[]
|
|
1309
|
+
padding2: number[] | BN[];
|
|
1277
1310
|
numSigners: number;
|
|
1278
1311
|
numSigned: number;
|
|
1279
1312
|
minSignatures: number;
|
|
@@ -1330,7 +1363,7 @@ export declare class PerpetualsClient {
|
|
|
1330
1363
|
}[];
|
|
1331
1364
|
markets: PublicKey[];
|
|
1332
1365
|
maxAumUsd: BN;
|
|
1333
|
-
buffer: BN;
|
|
1366
|
+
buffer: number | BN;
|
|
1334
1367
|
rawAumUsd: BN;
|
|
1335
1368
|
equityUsd: BN;
|
|
1336
1369
|
totalStaked: {
|
|
@@ -1361,6 +1394,9 @@ export declare class PerpetualsClient {
|
|
|
1361
1394
|
lpPrice: BN;
|
|
1362
1395
|
compoundingLpPrice: BN;
|
|
1363
1396
|
lastUpdatedTimestamp: BN;
|
|
1397
|
+
feesObligationUsd: BN;
|
|
1398
|
+
rebateObligationUsd: BN;
|
|
1399
|
+
thresholdUsd: BN;
|
|
1364
1400
|
delegate: PublicKey;
|
|
1365
1401
|
openTime: BN;
|
|
1366
1402
|
updateTime: BN;
|
|
@@ -1374,15 +1410,22 @@ export declare class PerpetualsClient {
|
|
|
1374
1410
|
lockedUsd: BN;
|
|
1375
1411
|
collateralAmount: BN;
|
|
1376
1412
|
collateralUsd: BN;
|
|
1377
|
-
|
|
1413
|
+
unsettledValueUsd: BN;
|
|
1378
1414
|
unsettledFeesUsd: BN;
|
|
1379
1415
|
cumulativeLockFeeSnapshot: BN;
|
|
1380
1416
|
degenSizeUsd: BN;
|
|
1417
|
+
referencePrice: {
|
|
1418
|
+
price: BN;
|
|
1419
|
+
exponent: number;
|
|
1420
|
+
};
|
|
1381
1421
|
sizeDecimals: number;
|
|
1382
1422
|
lockedDecimals: number;
|
|
1383
1423
|
collateralDecimals: number;
|
|
1384
1424
|
key: PublicKey;
|
|
1385
1425
|
feeAmount: BN;
|
|
1426
|
+
allowPayout: boolean;
|
|
1427
|
+
availableUsd: BN;
|
|
1428
|
+
availableAmount: BN;
|
|
1386
1429
|
refererTokenStakeAccount: PublicKey;
|
|
1387
1430
|
refererBoosterAccount: PublicKey;
|
|
1388
1431
|
level: number;
|
|
@@ -1396,6 +1439,7 @@ export declare class PerpetualsClient {
|
|
|
1396
1439
|
rewardTokens: BN;
|
|
1397
1440
|
unclaimedRevenueAmount: BN;
|
|
1398
1441
|
revenueSnapshot: BN;
|
|
1442
|
+
claimableRebateUsd: BN;
|
|
1399
1443
|
tokenMint: PublicKey;
|
|
1400
1444
|
tokenVaultTokenAccount: PublicKey;
|
|
1401
1445
|
tokenPermissions: {
|
|
@@ -1481,7 +1525,7 @@ export declare class PerpetualsClient {
|
|
|
1481
1525
|
maxUtilization: number;
|
|
1482
1526
|
degenPositionFactor: number;
|
|
1483
1527
|
degenExposureFactor: number;
|
|
1484
|
-
|
|
1528
|
+
maxPositionSizeUsd: BN;
|
|
1485
1529
|
maxExposureUsd: BN;
|
|
1486
1530
|
};
|
|
1487
1531
|
permissions: {
|
|
@@ -1574,7 +1618,7 @@ export declare class PerpetualsClient {
|
|
|
1574
1618
|
reservedAmount: BN;
|
|
1575
1619
|
minReserveUsd: BN;
|
|
1576
1620
|
limitPriceBufferBps: BN;
|
|
1577
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1621
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1578
1622
|
owner: PublicKey;
|
|
1579
1623
|
stakeStats: {
|
|
1580
1624
|
pendingActivation: BN;
|
|
@@ -1608,7 +1652,7 @@ export declare class PerpetualsClient {
|
|
|
1608
1652
|
lockedAmount: BN;
|
|
1609
1653
|
lockedUsd: BN;
|
|
1610
1654
|
collateralAmount: BN;
|
|
1611
|
-
|
|
1655
|
+
collateralLiabilityUsd: BN;
|
|
1612
1656
|
unsettledFeeUsd: BN;
|
|
1613
1657
|
cumulativeLockFeeSnapshot: BN;
|
|
1614
1658
|
sizeDecimals: number;
|
|
@@ -1617,7 +1661,7 @@ export declare class PerpetualsClient {
|
|
|
1617
1661
|
};
|
|
1618
1662
|
targetCustodyUid: number;
|
|
1619
1663
|
collateralCustodyUid: number;
|
|
1620
|
-
padding2: number[] | BN[]
|
|
1664
|
+
padding2: number[] | BN[];
|
|
1621
1665
|
numSigners: number;
|
|
1622
1666
|
numSigned: number;
|
|
1623
1667
|
minSignatures: number;
|
|
@@ -1674,7 +1718,7 @@ export declare class PerpetualsClient {
|
|
|
1674
1718
|
}[];
|
|
1675
1719
|
markets: PublicKey[];
|
|
1676
1720
|
maxAumUsd: BN;
|
|
1677
|
-
buffer: BN;
|
|
1721
|
+
buffer: number | BN;
|
|
1678
1722
|
rawAumUsd: BN;
|
|
1679
1723
|
equityUsd: BN;
|
|
1680
1724
|
totalStaked: {
|
|
@@ -1705,6 +1749,9 @@ export declare class PerpetualsClient {
|
|
|
1705
1749
|
lpPrice: BN;
|
|
1706
1750
|
compoundingLpPrice: BN;
|
|
1707
1751
|
lastUpdatedTimestamp: BN;
|
|
1752
|
+
feesObligationUsd: BN;
|
|
1753
|
+
rebateObligationUsd: BN;
|
|
1754
|
+
thresholdUsd: BN;
|
|
1708
1755
|
delegate: PublicKey;
|
|
1709
1756
|
openTime: BN;
|
|
1710
1757
|
updateTime: BN;
|
|
@@ -1718,15 +1765,22 @@ export declare class PerpetualsClient {
|
|
|
1718
1765
|
lockedUsd: BN;
|
|
1719
1766
|
collateralAmount: BN;
|
|
1720
1767
|
collateralUsd: BN;
|
|
1721
|
-
|
|
1768
|
+
unsettledValueUsd: BN;
|
|
1722
1769
|
unsettledFeesUsd: BN;
|
|
1723
1770
|
cumulativeLockFeeSnapshot: BN;
|
|
1724
1771
|
degenSizeUsd: BN;
|
|
1772
|
+
referencePrice: {
|
|
1773
|
+
price: BN;
|
|
1774
|
+
exponent: number;
|
|
1775
|
+
};
|
|
1725
1776
|
sizeDecimals: number;
|
|
1726
1777
|
lockedDecimals: number;
|
|
1727
1778
|
collateralDecimals: number;
|
|
1728
1779
|
key: PublicKey;
|
|
1729
1780
|
feeAmount: BN;
|
|
1781
|
+
allowPayout: boolean;
|
|
1782
|
+
availableUsd: BN;
|
|
1783
|
+
availableAmount: BN;
|
|
1730
1784
|
refererTokenStakeAccount: PublicKey;
|
|
1731
1785
|
refererBoosterAccount: PublicKey;
|
|
1732
1786
|
level: number;
|
|
@@ -1740,6 +1794,7 @@ export declare class PerpetualsClient {
|
|
|
1740
1794
|
rewardTokens: BN;
|
|
1741
1795
|
unclaimedRevenueAmount: BN;
|
|
1742
1796
|
revenueSnapshot: BN;
|
|
1797
|
+
claimableRebateUsd: BN;
|
|
1743
1798
|
tokenMint: PublicKey;
|
|
1744
1799
|
tokenVaultTokenAccount: PublicKey;
|
|
1745
1800
|
tokenPermissions: {
|
|
@@ -1823,7 +1878,7 @@ export declare class PerpetualsClient {
|
|
|
1823
1878
|
maxUtilization: number;
|
|
1824
1879
|
degenPositionFactor: number;
|
|
1825
1880
|
degenExposureFactor: number;
|
|
1826
|
-
|
|
1881
|
+
maxPositionSizeUsd: BN;
|
|
1827
1882
|
maxExposureUsd: BN;
|
|
1828
1883
|
};
|
|
1829
1884
|
permissions: {
|
|
@@ -1916,7 +1971,7 @@ export declare class PerpetualsClient {
|
|
|
1916
1971
|
reservedAmount: BN;
|
|
1917
1972
|
minReserveUsd: BN;
|
|
1918
1973
|
limitPriceBufferBps: BN;
|
|
1919
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1974
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1920
1975
|
owner: PublicKey;
|
|
1921
1976
|
stakeStats: {
|
|
1922
1977
|
pendingActivation: BN;
|
|
@@ -1950,7 +2005,7 @@ export declare class PerpetualsClient {
|
|
|
1950
2005
|
lockedAmount: BN;
|
|
1951
2006
|
lockedUsd: BN;
|
|
1952
2007
|
collateralAmount: BN;
|
|
1953
|
-
|
|
2008
|
+
collateralLiabilityUsd: BN;
|
|
1954
2009
|
unsettledFeeUsd: BN;
|
|
1955
2010
|
cumulativeLockFeeSnapshot: BN;
|
|
1956
2011
|
sizeDecimals: number;
|
|
@@ -1959,7 +2014,7 @@ export declare class PerpetualsClient {
|
|
|
1959
2014
|
};
|
|
1960
2015
|
targetCustodyUid: number;
|
|
1961
2016
|
collateralCustodyUid: number;
|
|
1962
|
-
padding2: number[] | BN[]
|
|
2017
|
+
padding2: number[] | BN[];
|
|
1963
2018
|
numSigners: number;
|
|
1964
2019
|
numSigned: number;
|
|
1965
2020
|
minSignatures: number;
|
|
@@ -2016,7 +2071,7 @@ export declare class PerpetualsClient {
|
|
|
2016
2071
|
}[];
|
|
2017
2072
|
markets: PublicKey[];
|
|
2018
2073
|
maxAumUsd: BN;
|
|
2019
|
-
buffer: BN;
|
|
2074
|
+
buffer: number | BN;
|
|
2020
2075
|
rawAumUsd: BN;
|
|
2021
2076
|
equityUsd: BN;
|
|
2022
2077
|
totalStaked: {
|
|
@@ -2047,6 +2102,9 @@ export declare class PerpetualsClient {
|
|
|
2047
2102
|
lpPrice: BN;
|
|
2048
2103
|
compoundingLpPrice: BN;
|
|
2049
2104
|
lastUpdatedTimestamp: BN;
|
|
2105
|
+
feesObligationUsd: BN;
|
|
2106
|
+
rebateObligationUsd: BN;
|
|
2107
|
+
thresholdUsd: BN;
|
|
2050
2108
|
delegate: PublicKey;
|
|
2051
2109
|
openTime: BN;
|
|
2052
2110
|
updateTime: BN;
|
|
@@ -2060,15 +2118,22 @@ export declare class PerpetualsClient {
|
|
|
2060
2118
|
lockedUsd: BN;
|
|
2061
2119
|
collateralAmount: BN;
|
|
2062
2120
|
collateralUsd: BN;
|
|
2063
|
-
|
|
2121
|
+
unsettledValueUsd: BN;
|
|
2064
2122
|
unsettledFeesUsd: BN;
|
|
2065
2123
|
cumulativeLockFeeSnapshot: BN;
|
|
2066
2124
|
degenSizeUsd: BN;
|
|
2125
|
+
referencePrice: {
|
|
2126
|
+
price: BN;
|
|
2127
|
+
exponent: number;
|
|
2128
|
+
};
|
|
2067
2129
|
sizeDecimals: number;
|
|
2068
2130
|
lockedDecimals: number;
|
|
2069
2131
|
collateralDecimals: number;
|
|
2070
2132
|
key: PublicKey;
|
|
2071
2133
|
feeAmount: BN;
|
|
2134
|
+
allowPayout: boolean;
|
|
2135
|
+
availableUsd: BN;
|
|
2136
|
+
availableAmount: BN;
|
|
2072
2137
|
refererTokenStakeAccount: PublicKey;
|
|
2073
2138
|
refererBoosterAccount: PublicKey;
|
|
2074
2139
|
level: number;
|
|
@@ -2082,6 +2147,7 @@ export declare class PerpetualsClient {
|
|
|
2082
2147
|
rewardTokens: BN;
|
|
2083
2148
|
unclaimedRevenueAmount: BN;
|
|
2084
2149
|
revenueSnapshot: BN;
|
|
2150
|
+
claimableRebateUsd: BN;
|
|
2085
2151
|
tokenMint: PublicKey;
|
|
2086
2152
|
tokenVaultTokenAccount: PublicKey;
|
|
2087
2153
|
tokenPermissions: {
|
|
@@ -2164,7 +2230,7 @@ export declare class PerpetualsClient {
|
|
|
2164
2230
|
maxUtilization: number;
|
|
2165
2231
|
degenPositionFactor: number;
|
|
2166
2232
|
degenExposureFactor: number;
|
|
2167
|
-
|
|
2233
|
+
maxPositionSizeUsd: BN;
|
|
2168
2234
|
maxExposureUsd: BN;
|
|
2169
2235
|
};
|
|
2170
2236
|
permissions: {
|
|
@@ -2257,7 +2323,7 @@ export declare class PerpetualsClient {
|
|
|
2257
2323
|
reservedAmount: BN;
|
|
2258
2324
|
minReserveUsd: BN;
|
|
2259
2325
|
limitPriceBufferBps: BN;
|
|
2260
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
2326
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2261
2327
|
owner: PublicKey;
|
|
2262
2328
|
stakeStats: {
|
|
2263
2329
|
pendingActivation: BN;
|
|
@@ -2291,7 +2357,7 @@ export declare class PerpetualsClient {
|
|
|
2291
2357
|
lockedAmount: BN;
|
|
2292
2358
|
lockedUsd: BN;
|
|
2293
2359
|
collateralAmount: BN;
|
|
2294
|
-
|
|
2360
|
+
collateralLiabilityUsd: BN;
|
|
2295
2361
|
unsettledFeeUsd: BN;
|
|
2296
2362
|
cumulativeLockFeeSnapshot: BN;
|
|
2297
2363
|
sizeDecimals: number;
|
|
@@ -2300,7 +2366,7 @@ export declare class PerpetualsClient {
|
|
|
2300
2366
|
};
|
|
2301
2367
|
targetCustodyUid: number;
|
|
2302
2368
|
collateralCustodyUid: number;
|
|
2303
|
-
padding2: number[] | BN[]
|
|
2369
|
+
padding2: number[] | BN[];
|
|
2304
2370
|
numSigners: number;
|
|
2305
2371
|
numSigned: number;
|
|
2306
2372
|
minSignatures: number;
|
|
@@ -2357,7 +2423,7 @@ export declare class PerpetualsClient {
|
|
|
2357
2423
|
}[];
|
|
2358
2424
|
markets: PublicKey[];
|
|
2359
2425
|
maxAumUsd: BN;
|
|
2360
|
-
buffer: BN;
|
|
2426
|
+
buffer: number | BN;
|
|
2361
2427
|
rawAumUsd: BN;
|
|
2362
2428
|
equityUsd: BN;
|
|
2363
2429
|
totalStaked: {
|
|
@@ -2388,6 +2454,9 @@ export declare class PerpetualsClient {
|
|
|
2388
2454
|
lpPrice: BN;
|
|
2389
2455
|
compoundingLpPrice: BN;
|
|
2390
2456
|
lastUpdatedTimestamp: BN;
|
|
2457
|
+
feesObligationUsd: BN;
|
|
2458
|
+
rebateObligationUsd: BN;
|
|
2459
|
+
thresholdUsd: BN;
|
|
2391
2460
|
delegate: PublicKey;
|
|
2392
2461
|
openTime: BN;
|
|
2393
2462
|
updateTime: BN;
|
|
@@ -2401,15 +2470,22 @@ export declare class PerpetualsClient {
|
|
|
2401
2470
|
lockedUsd: BN;
|
|
2402
2471
|
collateralAmount: BN;
|
|
2403
2472
|
collateralUsd: BN;
|
|
2404
|
-
|
|
2473
|
+
unsettledValueUsd: BN;
|
|
2405
2474
|
unsettledFeesUsd: BN;
|
|
2406
2475
|
cumulativeLockFeeSnapshot: BN;
|
|
2407
2476
|
degenSizeUsd: BN;
|
|
2477
|
+
referencePrice: {
|
|
2478
|
+
price: BN;
|
|
2479
|
+
exponent: number;
|
|
2480
|
+
};
|
|
2408
2481
|
sizeDecimals: number;
|
|
2409
2482
|
lockedDecimals: number;
|
|
2410
2483
|
collateralDecimals: number;
|
|
2411
2484
|
key: PublicKey;
|
|
2412
2485
|
feeAmount: BN;
|
|
2486
|
+
allowPayout: boolean;
|
|
2487
|
+
availableUsd: BN;
|
|
2488
|
+
availableAmount: BN;
|
|
2413
2489
|
refererTokenStakeAccount: PublicKey;
|
|
2414
2490
|
refererBoosterAccount: PublicKey;
|
|
2415
2491
|
level: number;
|
|
@@ -2423,6 +2499,7 @@ export declare class PerpetualsClient {
|
|
|
2423
2499
|
rewardTokens: BN;
|
|
2424
2500
|
unclaimedRevenueAmount: BN;
|
|
2425
2501
|
revenueSnapshot: BN;
|
|
2502
|
+
claimableRebateUsd: BN;
|
|
2426
2503
|
tokenMint: PublicKey;
|
|
2427
2504
|
tokenVaultTokenAccount: PublicKey;
|
|
2428
2505
|
tokenPermissions: {
|
|
@@ -2505,7 +2582,7 @@ export declare class PerpetualsClient {
|
|
|
2505
2582
|
maxUtilization: number;
|
|
2506
2583
|
degenPositionFactor: number;
|
|
2507
2584
|
degenExposureFactor: number;
|
|
2508
|
-
|
|
2585
|
+
maxPositionSizeUsd: BN;
|
|
2509
2586
|
maxExposureUsd: BN;
|
|
2510
2587
|
};
|
|
2511
2588
|
permissions: {
|
|
@@ -2598,7 +2675,7 @@ export declare class PerpetualsClient {
|
|
|
2598
2675
|
reservedAmount: BN;
|
|
2599
2676
|
minReserveUsd: BN;
|
|
2600
2677
|
limitPriceBufferBps: BN;
|
|
2601
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
2678
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2602
2679
|
owner: PublicKey;
|
|
2603
2680
|
stakeStats: {
|
|
2604
2681
|
pendingActivation: BN;
|
|
@@ -2632,7 +2709,7 @@ export declare class PerpetualsClient {
|
|
|
2632
2709
|
lockedAmount: BN;
|
|
2633
2710
|
lockedUsd: BN;
|
|
2634
2711
|
collateralAmount: BN;
|
|
2635
|
-
|
|
2712
|
+
collateralLiabilityUsd: BN;
|
|
2636
2713
|
unsettledFeeUsd: BN;
|
|
2637
2714
|
cumulativeLockFeeSnapshot: BN;
|
|
2638
2715
|
sizeDecimals: number;
|
|
@@ -2641,7 +2718,7 @@ export declare class PerpetualsClient {
|
|
|
2641
2718
|
};
|
|
2642
2719
|
targetCustodyUid: number;
|
|
2643
2720
|
collateralCustodyUid: number;
|
|
2644
|
-
padding2: number[] | BN[]
|
|
2721
|
+
padding2: number[] | BN[];
|
|
2645
2722
|
numSigners: number;
|
|
2646
2723
|
numSigned: number;
|
|
2647
2724
|
minSignatures: number;
|
|
@@ -2698,7 +2775,7 @@ export declare class PerpetualsClient {
|
|
|
2698
2775
|
}[];
|
|
2699
2776
|
markets: PublicKey[];
|
|
2700
2777
|
maxAumUsd: BN;
|
|
2701
|
-
buffer: BN;
|
|
2778
|
+
buffer: number | BN;
|
|
2702
2779
|
rawAumUsd: BN;
|
|
2703
2780
|
equityUsd: BN;
|
|
2704
2781
|
totalStaked: {
|
|
@@ -2729,6 +2806,9 @@ export declare class PerpetualsClient {
|
|
|
2729
2806
|
lpPrice: BN;
|
|
2730
2807
|
compoundingLpPrice: BN;
|
|
2731
2808
|
lastUpdatedTimestamp: BN;
|
|
2809
|
+
feesObligationUsd: BN;
|
|
2810
|
+
rebateObligationUsd: BN;
|
|
2811
|
+
thresholdUsd: BN;
|
|
2732
2812
|
delegate: PublicKey;
|
|
2733
2813
|
openTime: BN;
|
|
2734
2814
|
updateTime: BN;
|
|
@@ -2742,15 +2822,22 @@ export declare class PerpetualsClient {
|
|
|
2742
2822
|
lockedUsd: BN;
|
|
2743
2823
|
collateralAmount: BN;
|
|
2744
2824
|
collateralUsd: BN;
|
|
2745
|
-
|
|
2825
|
+
unsettledValueUsd: BN;
|
|
2746
2826
|
unsettledFeesUsd: BN;
|
|
2747
2827
|
cumulativeLockFeeSnapshot: BN;
|
|
2748
2828
|
degenSizeUsd: BN;
|
|
2829
|
+
referencePrice: {
|
|
2830
|
+
price: BN;
|
|
2831
|
+
exponent: number;
|
|
2832
|
+
};
|
|
2749
2833
|
sizeDecimals: number;
|
|
2750
2834
|
lockedDecimals: number;
|
|
2751
2835
|
collateralDecimals: number;
|
|
2752
2836
|
key: PublicKey;
|
|
2753
2837
|
feeAmount: BN;
|
|
2838
|
+
allowPayout: boolean;
|
|
2839
|
+
availableUsd: BN;
|
|
2840
|
+
availableAmount: BN;
|
|
2754
2841
|
refererTokenStakeAccount: PublicKey;
|
|
2755
2842
|
refererBoosterAccount: PublicKey;
|
|
2756
2843
|
level: number;
|
|
@@ -2764,6 +2851,7 @@ export declare class PerpetualsClient {
|
|
|
2764
2851
|
rewardTokens: BN;
|
|
2765
2852
|
unclaimedRevenueAmount: BN;
|
|
2766
2853
|
revenueSnapshot: BN;
|
|
2854
|
+
claimableRebateUsd: BN;
|
|
2767
2855
|
tokenMint: PublicKey;
|
|
2768
2856
|
tokenVaultTokenAccount: PublicKey;
|
|
2769
2857
|
tokenPermissions: {
|
|
@@ -2824,11 +2912,15 @@ export declare class PerpetualsClient {
|
|
|
2824
2912
|
lockedUsd: BN;
|
|
2825
2913
|
collateralAmount: BN;
|
|
2826
2914
|
collateralUsd: BN;
|
|
2827
|
-
|
|
2915
|
+
unsettledValueUsd: BN;
|
|
2828
2916
|
unsettledFeesUsd: BN;
|
|
2829
2917
|
cumulativeLockFeeSnapshot: BN;
|
|
2830
2918
|
degenSizeUsd: BN;
|
|
2831
|
-
|
|
2919
|
+
referencePrice: {
|
|
2920
|
+
price: BN;
|
|
2921
|
+
exponent: number;
|
|
2922
|
+
};
|
|
2923
|
+
buffer: number;
|
|
2832
2924
|
sizeDecimals: number;
|
|
2833
2925
|
lockedDecimals: number;
|
|
2834
2926
|
collateralDecimals: number;
|
|
@@ -2893,7 +2985,7 @@ export declare class PerpetualsClient {
|
|
|
2893
2985
|
maxUtilization: number;
|
|
2894
2986
|
degenPositionFactor: number;
|
|
2895
2987
|
degenExposureFactor: number;
|
|
2896
|
-
|
|
2988
|
+
maxPositionSizeUsd: BN;
|
|
2897
2989
|
maxExposureUsd: BN;
|
|
2898
2990
|
};
|
|
2899
2991
|
permissions: {
|
|
@@ -2986,7 +3078,7 @@ export declare class PerpetualsClient {
|
|
|
2986
3078
|
reservedAmount: BN;
|
|
2987
3079
|
minReserveUsd: BN;
|
|
2988
3080
|
limitPriceBufferBps: BN;
|
|
2989
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3081
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2990
3082
|
owner: PublicKey;
|
|
2991
3083
|
stakeStats: {
|
|
2992
3084
|
pendingActivation: BN;
|
|
@@ -3020,7 +3112,7 @@ export declare class PerpetualsClient {
|
|
|
3020
3112
|
lockedAmount: BN;
|
|
3021
3113
|
lockedUsd: BN;
|
|
3022
3114
|
collateralAmount: BN;
|
|
3023
|
-
|
|
3115
|
+
collateralLiabilityUsd: BN;
|
|
3024
3116
|
unsettledFeeUsd: BN;
|
|
3025
3117
|
cumulativeLockFeeSnapshot: BN;
|
|
3026
3118
|
sizeDecimals: number;
|
|
@@ -3029,7 +3121,7 @@ export declare class PerpetualsClient {
|
|
|
3029
3121
|
};
|
|
3030
3122
|
targetCustodyUid: number;
|
|
3031
3123
|
collateralCustodyUid: number;
|
|
3032
|
-
padding2: number[] | BN[]
|
|
3124
|
+
padding2: number[] | BN[];
|
|
3033
3125
|
numSigners: number;
|
|
3034
3126
|
numSigned: number;
|
|
3035
3127
|
minSignatures: number;
|
|
@@ -3086,7 +3178,7 @@ export declare class PerpetualsClient {
|
|
|
3086
3178
|
}[];
|
|
3087
3179
|
markets: PublicKey[];
|
|
3088
3180
|
maxAumUsd: BN;
|
|
3089
|
-
buffer: BN;
|
|
3181
|
+
buffer: number | BN;
|
|
3090
3182
|
rawAumUsd: BN;
|
|
3091
3183
|
equityUsd: BN;
|
|
3092
3184
|
totalStaked: {
|
|
@@ -3117,6 +3209,9 @@ export declare class PerpetualsClient {
|
|
|
3117
3209
|
lpPrice: BN;
|
|
3118
3210
|
compoundingLpPrice: BN;
|
|
3119
3211
|
lastUpdatedTimestamp: BN;
|
|
3212
|
+
feesObligationUsd: BN;
|
|
3213
|
+
rebateObligationUsd: BN;
|
|
3214
|
+
thresholdUsd: BN;
|
|
3120
3215
|
delegate: PublicKey;
|
|
3121
3216
|
openTime: BN;
|
|
3122
3217
|
updateTime: BN;
|
|
@@ -3130,15 +3225,22 @@ export declare class PerpetualsClient {
|
|
|
3130
3225
|
lockedUsd: BN;
|
|
3131
3226
|
collateralAmount: BN;
|
|
3132
3227
|
collateralUsd: BN;
|
|
3133
|
-
|
|
3228
|
+
unsettledValueUsd: BN;
|
|
3134
3229
|
unsettledFeesUsd: BN;
|
|
3135
3230
|
cumulativeLockFeeSnapshot: BN;
|
|
3136
3231
|
degenSizeUsd: BN;
|
|
3232
|
+
referencePrice: {
|
|
3233
|
+
price: BN;
|
|
3234
|
+
exponent: number;
|
|
3235
|
+
};
|
|
3137
3236
|
sizeDecimals: number;
|
|
3138
3237
|
lockedDecimals: number;
|
|
3139
3238
|
collateralDecimals: number;
|
|
3140
3239
|
key: PublicKey;
|
|
3141
3240
|
feeAmount: BN;
|
|
3241
|
+
allowPayout: boolean;
|
|
3242
|
+
availableUsd: BN;
|
|
3243
|
+
availableAmount: BN;
|
|
3142
3244
|
refererTokenStakeAccount: PublicKey;
|
|
3143
3245
|
refererBoosterAccount: PublicKey;
|
|
3144
3246
|
level: number;
|
|
@@ -3152,6 +3254,7 @@ export declare class PerpetualsClient {
|
|
|
3152
3254
|
rewardTokens: BN;
|
|
3153
3255
|
unclaimedRevenueAmount: BN;
|
|
3154
3256
|
revenueSnapshot: BN;
|
|
3257
|
+
claimableRebateUsd: BN;
|
|
3155
3258
|
tokenMint: PublicKey;
|
|
3156
3259
|
tokenVaultTokenAccount: PublicKey;
|
|
3157
3260
|
tokenPermissions: {
|
|
@@ -3234,7 +3337,7 @@ export declare class PerpetualsClient {
|
|
|
3234
3337
|
maxUtilization: number;
|
|
3235
3338
|
degenPositionFactor: number;
|
|
3236
3339
|
degenExposureFactor: number;
|
|
3237
|
-
|
|
3340
|
+
maxPositionSizeUsd: BN;
|
|
3238
3341
|
maxExposureUsd: BN;
|
|
3239
3342
|
};
|
|
3240
3343
|
permissions: {
|
|
@@ -3327,7 +3430,7 @@ export declare class PerpetualsClient {
|
|
|
3327
3430
|
reservedAmount: BN;
|
|
3328
3431
|
minReserveUsd: BN;
|
|
3329
3432
|
limitPriceBufferBps: BN;
|
|
3330
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3433
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3331
3434
|
owner: PublicKey;
|
|
3332
3435
|
stakeStats: {
|
|
3333
3436
|
pendingActivation: BN;
|
|
@@ -3361,7 +3464,7 @@ export declare class PerpetualsClient {
|
|
|
3361
3464
|
lockedAmount: BN;
|
|
3362
3465
|
lockedUsd: BN;
|
|
3363
3466
|
collateralAmount: BN;
|
|
3364
|
-
|
|
3467
|
+
collateralLiabilityUsd: BN;
|
|
3365
3468
|
unsettledFeeUsd: BN;
|
|
3366
3469
|
cumulativeLockFeeSnapshot: BN;
|
|
3367
3470
|
sizeDecimals: number;
|
|
@@ -3370,7 +3473,7 @@ export declare class PerpetualsClient {
|
|
|
3370
3473
|
};
|
|
3371
3474
|
targetCustodyUid: number;
|
|
3372
3475
|
collateralCustodyUid: number;
|
|
3373
|
-
padding2: number[] | BN[]
|
|
3476
|
+
padding2: number[] | BN[];
|
|
3374
3477
|
numSigners: number;
|
|
3375
3478
|
numSigned: number;
|
|
3376
3479
|
minSignatures: number;
|
|
@@ -3427,7 +3530,7 @@ export declare class PerpetualsClient {
|
|
|
3427
3530
|
}[];
|
|
3428
3531
|
markets: PublicKey[];
|
|
3429
3532
|
maxAumUsd: BN;
|
|
3430
|
-
buffer: BN;
|
|
3533
|
+
buffer: number | BN;
|
|
3431
3534
|
rawAumUsd: BN;
|
|
3432
3535
|
equityUsd: BN;
|
|
3433
3536
|
totalStaked: {
|
|
@@ -3458,6 +3561,9 @@ export declare class PerpetualsClient {
|
|
|
3458
3561
|
lpPrice: BN;
|
|
3459
3562
|
compoundingLpPrice: BN;
|
|
3460
3563
|
lastUpdatedTimestamp: BN;
|
|
3564
|
+
feesObligationUsd: BN;
|
|
3565
|
+
rebateObligationUsd: BN;
|
|
3566
|
+
thresholdUsd: BN;
|
|
3461
3567
|
delegate: PublicKey;
|
|
3462
3568
|
openTime: BN;
|
|
3463
3569
|
updateTime: BN;
|
|
@@ -3471,15 +3577,22 @@ export declare class PerpetualsClient {
|
|
|
3471
3577
|
lockedUsd: BN;
|
|
3472
3578
|
collateralAmount: BN;
|
|
3473
3579
|
collateralUsd: BN;
|
|
3474
|
-
|
|
3580
|
+
unsettledValueUsd: BN;
|
|
3475
3581
|
unsettledFeesUsd: BN;
|
|
3476
3582
|
cumulativeLockFeeSnapshot: BN;
|
|
3477
3583
|
degenSizeUsd: BN;
|
|
3584
|
+
referencePrice: {
|
|
3585
|
+
price: BN;
|
|
3586
|
+
exponent: number;
|
|
3587
|
+
};
|
|
3478
3588
|
sizeDecimals: number;
|
|
3479
3589
|
lockedDecimals: number;
|
|
3480
3590
|
collateralDecimals: number;
|
|
3481
3591
|
key: PublicKey;
|
|
3482
3592
|
feeAmount: BN;
|
|
3593
|
+
allowPayout: boolean;
|
|
3594
|
+
availableUsd: BN;
|
|
3595
|
+
availableAmount: BN;
|
|
3483
3596
|
refererTokenStakeAccount: PublicKey;
|
|
3484
3597
|
refererBoosterAccount: PublicKey;
|
|
3485
3598
|
level: number;
|
|
@@ -3493,6 +3606,7 @@ export declare class PerpetualsClient {
|
|
|
3493
3606
|
rewardTokens: BN;
|
|
3494
3607
|
unclaimedRevenueAmount: BN;
|
|
3495
3608
|
revenueSnapshot: BN;
|
|
3609
|
+
claimableRebateUsd: BN;
|
|
3496
3610
|
tokenMint: PublicKey;
|
|
3497
3611
|
tokenVaultTokenAccount: PublicKey;
|
|
3498
3612
|
tokenPermissions: {
|
|
@@ -3575,7 +3689,7 @@ export declare class PerpetualsClient {
|
|
|
3575
3689
|
maxUtilization: number;
|
|
3576
3690
|
degenPositionFactor: number;
|
|
3577
3691
|
degenExposureFactor: number;
|
|
3578
|
-
|
|
3692
|
+
maxPositionSizeUsd: BN;
|
|
3579
3693
|
maxExposureUsd: BN;
|
|
3580
3694
|
};
|
|
3581
3695
|
permissions: {
|
|
@@ -3668,7 +3782,7 @@ export declare class PerpetualsClient {
|
|
|
3668
3782
|
reservedAmount: BN;
|
|
3669
3783
|
minReserveUsd: BN;
|
|
3670
3784
|
limitPriceBufferBps: BN;
|
|
3671
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3785
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3672
3786
|
owner: PublicKey;
|
|
3673
3787
|
stakeStats: {
|
|
3674
3788
|
pendingActivation: BN;
|
|
@@ -3702,7 +3816,7 @@ export declare class PerpetualsClient {
|
|
|
3702
3816
|
lockedAmount: BN;
|
|
3703
3817
|
lockedUsd: BN;
|
|
3704
3818
|
collateralAmount: BN;
|
|
3705
|
-
|
|
3819
|
+
collateralLiabilityUsd: BN;
|
|
3706
3820
|
unsettledFeeUsd: BN;
|
|
3707
3821
|
cumulativeLockFeeSnapshot: BN;
|
|
3708
3822
|
sizeDecimals: number;
|
|
@@ -3711,7 +3825,7 @@ export declare class PerpetualsClient {
|
|
|
3711
3825
|
};
|
|
3712
3826
|
targetCustodyUid: number;
|
|
3713
3827
|
collateralCustodyUid: number;
|
|
3714
|
-
padding2: number[] | BN[]
|
|
3828
|
+
padding2: number[] | BN[];
|
|
3715
3829
|
numSigners: number;
|
|
3716
3830
|
numSigned: number;
|
|
3717
3831
|
minSignatures: number;
|
|
@@ -3768,7 +3882,7 @@ export declare class PerpetualsClient {
|
|
|
3768
3882
|
}[];
|
|
3769
3883
|
markets: PublicKey[];
|
|
3770
3884
|
maxAumUsd: BN;
|
|
3771
|
-
buffer: BN;
|
|
3885
|
+
buffer: number | BN;
|
|
3772
3886
|
rawAumUsd: BN;
|
|
3773
3887
|
equityUsd: BN;
|
|
3774
3888
|
totalStaked: {
|
|
@@ -3799,6 +3913,9 @@ export declare class PerpetualsClient {
|
|
|
3799
3913
|
lpPrice: BN;
|
|
3800
3914
|
compoundingLpPrice: BN;
|
|
3801
3915
|
lastUpdatedTimestamp: BN;
|
|
3916
|
+
feesObligationUsd: BN;
|
|
3917
|
+
rebateObligationUsd: BN;
|
|
3918
|
+
thresholdUsd: BN;
|
|
3802
3919
|
delegate: PublicKey;
|
|
3803
3920
|
openTime: BN;
|
|
3804
3921
|
updateTime: BN;
|
|
@@ -3812,15 +3929,22 @@ export declare class PerpetualsClient {
|
|
|
3812
3929
|
lockedUsd: BN;
|
|
3813
3930
|
collateralAmount: BN;
|
|
3814
3931
|
collateralUsd: BN;
|
|
3815
|
-
|
|
3932
|
+
unsettledValueUsd: BN;
|
|
3816
3933
|
unsettledFeesUsd: BN;
|
|
3817
3934
|
cumulativeLockFeeSnapshot: BN;
|
|
3818
3935
|
degenSizeUsd: BN;
|
|
3936
|
+
referencePrice: {
|
|
3937
|
+
price: BN;
|
|
3938
|
+
exponent: number;
|
|
3939
|
+
};
|
|
3819
3940
|
sizeDecimals: number;
|
|
3820
3941
|
lockedDecimals: number;
|
|
3821
3942
|
collateralDecimals: number;
|
|
3822
3943
|
key: PublicKey;
|
|
3823
3944
|
feeAmount: BN;
|
|
3945
|
+
allowPayout: boolean;
|
|
3946
|
+
availableUsd: BN;
|
|
3947
|
+
availableAmount: BN;
|
|
3824
3948
|
refererTokenStakeAccount: PublicKey;
|
|
3825
3949
|
refererBoosterAccount: PublicKey;
|
|
3826
3950
|
level: number;
|
|
@@ -3834,6 +3958,7 @@ export declare class PerpetualsClient {
|
|
|
3834
3958
|
rewardTokens: BN;
|
|
3835
3959
|
unclaimedRevenueAmount: BN;
|
|
3836
3960
|
revenueSnapshot: BN;
|
|
3961
|
+
claimableRebateUsd: BN;
|
|
3837
3962
|
tokenMint: PublicKey;
|
|
3838
3963
|
tokenVaultTokenAccount: PublicKey;
|
|
3839
3964
|
tokenPermissions: {
|
|
@@ -3916,7 +4041,7 @@ export declare class PerpetualsClient {
|
|
|
3916
4041
|
maxUtilization: number;
|
|
3917
4042
|
degenPositionFactor: number;
|
|
3918
4043
|
degenExposureFactor: number;
|
|
3919
|
-
|
|
4044
|
+
maxPositionSizeUsd: BN;
|
|
3920
4045
|
maxExposureUsd: BN;
|
|
3921
4046
|
};
|
|
3922
4047
|
permissions: {
|
|
@@ -4009,7 +4134,7 @@ export declare class PerpetualsClient {
|
|
|
4009
4134
|
reservedAmount: BN;
|
|
4010
4135
|
minReserveUsd: BN;
|
|
4011
4136
|
limitPriceBufferBps: BN;
|
|
4012
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
4137
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4013
4138
|
owner: PublicKey;
|
|
4014
4139
|
stakeStats: {
|
|
4015
4140
|
pendingActivation: BN;
|
|
@@ -4043,7 +4168,7 @@ export declare class PerpetualsClient {
|
|
|
4043
4168
|
lockedAmount: BN;
|
|
4044
4169
|
lockedUsd: BN;
|
|
4045
4170
|
collateralAmount: BN;
|
|
4046
|
-
|
|
4171
|
+
collateralLiabilityUsd: BN;
|
|
4047
4172
|
unsettledFeeUsd: BN;
|
|
4048
4173
|
cumulativeLockFeeSnapshot: BN;
|
|
4049
4174
|
sizeDecimals: number;
|
|
@@ -4052,7 +4177,7 @@ export declare class PerpetualsClient {
|
|
|
4052
4177
|
};
|
|
4053
4178
|
targetCustodyUid: number;
|
|
4054
4179
|
collateralCustodyUid: number;
|
|
4055
|
-
padding2: number[] | BN[]
|
|
4180
|
+
padding2: number[] | BN[];
|
|
4056
4181
|
numSigners: number;
|
|
4057
4182
|
numSigned: number;
|
|
4058
4183
|
minSignatures: number;
|
|
@@ -4109,7 +4234,7 @@ export declare class PerpetualsClient {
|
|
|
4109
4234
|
}[];
|
|
4110
4235
|
markets: PublicKey[];
|
|
4111
4236
|
maxAumUsd: BN;
|
|
4112
|
-
buffer: BN;
|
|
4237
|
+
buffer: number | BN;
|
|
4113
4238
|
rawAumUsd: BN;
|
|
4114
4239
|
equityUsd: BN;
|
|
4115
4240
|
totalStaked: {
|
|
@@ -4140,6 +4265,9 @@ export declare class PerpetualsClient {
|
|
|
4140
4265
|
lpPrice: BN;
|
|
4141
4266
|
compoundingLpPrice: BN;
|
|
4142
4267
|
lastUpdatedTimestamp: BN;
|
|
4268
|
+
feesObligationUsd: BN;
|
|
4269
|
+
rebateObligationUsd: BN;
|
|
4270
|
+
thresholdUsd: BN;
|
|
4143
4271
|
delegate: PublicKey;
|
|
4144
4272
|
openTime: BN;
|
|
4145
4273
|
updateTime: BN;
|
|
@@ -4153,15 +4281,22 @@ export declare class PerpetualsClient {
|
|
|
4153
4281
|
lockedUsd: BN;
|
|
4154
4282
|
collateralAmount: BN;
|
|
4155
4283
|
collateralUsd: BN;
|
|
4156
|
-
|
|
4284
|
+
unsettledValueUsd: BN;
|
|
4157
4285
|
unsettledFeesUsd: BN;
|
|
4158
4286
|
cumulativeLockFeeSnapshot: BN;
|
|
4159
4287
|
degenSizeUsd: BN;
|
|
4288
|
+
referencePrice: {
|
|
4289
|
+
price: BN;
|
|
4290
|
+
exponent: number;
|
|
4291
|
+
};
|
|
4160
4292
|
sizeDecimals: number;
|
|
4161
4293
|
lockedDecimals: number;
|
|
4162
4294
|
collateralDecimals: number;
|
|
4163
4295
|
key: PublicKey;
|
|
4164
4296
|
feeAmount: BN;
|
|
4297
|
+
allowPayout: boolean;
|
|
4298
|
+
availableUsd: BN;
|
|
4299
|
+
availableAmount: BN;
|
|
4165
4300
|
refererTokenStakeAccount: PublicKey;
|
|
4166
4301
|
refererBoosterAccount: PublicKey;
|
|
4167
4302
|
level: number;
|
|
@@ -4175,6 +4310,7 @@ export declare class PerpetualsClient {
|
|
|
4175
4310
|
rewardTokens: BN;
|
|
4176
4311
|
unclaimedRevenueAmount: BN;
|
|
4177
4312
|
revenueSnapshot: BN;
|
|
4313
|
+
claimableRebateUsd: BN;
|
|
4178
4314
|
tokenMint: PublicKey;
|
|
4179
4315
|
tokenVaultTokenAccount: PublicKey;
|
|
4180
4316
|
tokenPermissions: {
|
|
@@ -4257,7 +4393,7 @@ export declare class PerpetualsClient {
|
|
|
4257
4393
|
maxUtilization: number;
|
|
4258
4394
|
degenPositionFactor: number;
|
|
4259
4395
|
degenExposureFactor: number;
|
|
4260
|
-
|
|
4396
|
+
maxPositionSizeUsd: BN;
|
|
4261
4397
|
maxExposureUsd: BN;
|
|
4262
4398
|
};
|
|
4263
4399
|
permissions: {
|
|
@@ -4350,7 +4486,7 @@ export declare class PerpetualsClient {
|
|
|
4350
4486
|
reservedAmount: BN;
|
|
4351
4487
|
minReserveUsd: BN;
|
|
4352
4488
|
limitPriceBufferBps: BN;
|
|
4353
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
4489
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4354
4490
|
owner: PublicKey;
|
|
4355
4491
|
stakeStats: {
|
|
4356
4492
|
pendingActivation: BN;
|
|
@@ -4384,7 +4520,7 @@ export declare class PerpetualsClient {
|
|
|
4384
4520
|
lockedAmount: BN;
|
|
4385
4521
|
lockedUsd: BN;
|
|
4386
4522
|
collateralAmount: BN;
|
|
4387
|
-
|
|
4523
|
+
collateralLiabilityUsd: BN;
|
|
4388
4524
|
unsettledFeeUsd: BN;
|
|
4389
4525
|
cumulativeLockFeeSnapshot: BN;
|
|
4390
4526
|
sizeDecimals: number;
|
|
@@ -4393,7 +4529,7 @@ export declare class PerpetualsClient {
|
|
|
4393
4529
|
};
|
|
4394
4530
|
targetCustodyUid: number;
|
|
4395
4531
|
collateralCustodyUid: number;
|
|
4396
|
-
padding2: number[] | BN[]
|
|
4532
|
+
padding2: number[] | BN[];
|
|
4397
4533
|
numSigners: number;
|
|
4398
4534
|
numSigned: number;
|
|
4399
4535
|
minSignatures: number;
|
|
@@ -4450,7 +4586,7 @@ export declare class PerpetualsClient {
|
|
|
4450
4586
|
}[];
|
|
4451
4587
|
markets: PublicKey[];
|
|
4452
4588
|
maxAumUsd: BN;
|
|
4453
|
-
buffer: BN;
|
|
4589
|
+
buffer: number | BN;
|
|
4454
4590
|
rawAumUsd: BN;
|
|
4455
4591
|
equityUsd: BN;
|
|
4456
4592
|
totalStaked: {
|
|
@@ -4481,6 +4617,9 @@ export declare class PerpetualsClient {
|
|
|
4481
4617
|
lpPrice: BN;
|
|
4482
4618
|
compoundingLpPrice: BN;
|
|
4483
4619
|
lastUpdatedTimestamp: BN;
|
|
4620
|
+
feesObligationUsd: BN;
|
|
4621
|
+
rebateObligationUsd: BN;
|
|
4622
|
+
thresholdUsd: BN;
|
|
4484
4623
|
delegate: PublicKey;
|
|
4485
4624
|
openTime: BN;
|
|
4486
4625
|
updateTime: BN;
|
|
@@ -4494,15 +4633,22 @@ export declare class PerpetualsClient {
|
|
|
4494
4633
|
lockedUsd: BN;
|
|
4495
4634
|
collateralAmount: BN;
|
|
4496
4635
|
collateralUsd: BN;
|
|
4497
|
-
|
|
4636
|
+
unsettledValueUsd: BN;
|
|
4498
4637
|
unsettledFeesUsd: BN;
|
|
4499
4638
|
cumulativeLockFeeSnapshot: BN;
|
|
4500
4639
|
degenSizeUsd: BN;
|
|
4640
|
+
referencePrice: {
|
|
4641
|
+
price: BN;
|
|
4642
|
+
exponent: number;
|
|
4643
|
+
};
|
|
4501
4644
|
sizeDecimals: number;
|
|
4502
4645
|
lockedDecimals: number;
|
|
4503
4646
|
collateralDecimals: number;
|
|
4504
4647
|
key: PublicKey;
|
|
4505
4648
|
feeAmount: BN;
|
|
4649
|
+
allowPayout: boolean;
|
|
4650
|
+
availableUsd: BN;
|
|
4651
|
+
availableAmount: BN;
|
|
4506
4652
|
refererTokenStakeAccount: PublicKey;
|
|
4507
4653
|
refererBoosterAccount: PublicKey;
|
|
4508
4654
|
level: number;
|
|
@@ -4516,6 +4662,7 @@ export declare class PerpetualsClient {
|
|
|
4516
4662
|
rewardTokens: BN;
|
|
4517
4663
|
unclaimedRevenueAmount: BN;
|
|
4518
4664
|
revenueSnapshot: BN;
|
|
4665
|
+
claimableRebateUsd: BN;
|
|
4519
4666
|
tokenMint: PublicKey;
|
|
4520
4667
|
tokenVaultTokenAccount: PublicKey;
|
|
4521
4668
|
tokenPermissions: {
|
|
@@ -4579,9 +4726,9 @@ export declare class PerpetualsClient {
|
|
|
4579
4726
|
getMinAndMaxPriceSync: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount) => MinAndMaxPrice;
|
|
4580
4727
|
checkIfPriceStaleOrCustom: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount, timestampInSeconds: BN) => boolean;
|
|
4581
4728
|
getAveragePriceSync: (price1: BN, size1: BN, price2: BN, size2: BN) => BN;
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4729
|
+
getLeverageContractHelper: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, isInitial: boolean, poolConfig: PoolConfig) => BN;
|
|
4730
|
+
getLeverageSync: (positionAccount: PositionAccount, finalCollateralUsd: BN, finalSizeUsd: BN, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, isInitial: boolean, poolConfig: PoolConfig) => BN;
|
|
4731
|
+
getLeverageAtAmountEntryWithSwapSync: (positionAccount: PositionAccount | null, inputDeltaAmount: BN, sizeDeltaAmount: BN, side: Side, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, collateralTokenPrice: OraclePrice, collateralTokenEmaPrice: OraclePrice, collateralTokenCustodyAccount: CustodyAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetTokenCustodyAccount: CustodyAccount, swapPoolAumUsdMax: BN, poolConfig: PoolConfig, pnlUsd: BN, enableDebuglogs?: boolean) => BN;
|
|
4585
4732
|
getEntryPriceAndFeeSyncV2: (positionAccount: PositionAccount | null, marketCorrelation: boolean, collateralDeltaAmount: BN, sizeDeltaAmount: BN, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, discountBps?: BN, enableLogs?: boolean) => EntryPriceAndFeeV2;
|
|
4586
4733
|
getEntryPriceUsdSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
|
4587
4734
|
getPriceAfterSlippage(isEntry: boolean, slippageBps: BN, targetPrice: OraclePrice, side: Side): ContractOraclePrice;
|
|
@@ -4592,29 +4739,37 @@ export declare class PerpetualsClient {
|
|
|
4592
4739
|
getExitPriceAndFeeSync: (positionAccount: PositionAccount, marketCorrelation: boolean, collateralDeltaAmount: BN, sizeDeltaAmount: BN, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, discountBps?: BN) => ExitPriceAndFee;
|
|
4593
4740
|
getTradeSpread: (targetCustodyAccount: CustodyAccount, sizeUsd: BN) => BN;
|
|
4594
4741
|
getExitOraclePriceSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
|
4595
|
-
getExitOraclePriceWithoutSpreadSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
|
4596
4742
|
getSizeAmountFromLeverageAndCollateral: (collateralAmtWithFee: BN, leverage: string, marketToken: Token, collateralToken: Token, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, discountBps?: BN) => BN;
|
|
4597
|
-
getSizeAmountWithSwapSync: (amountIn: BN, leverage: string, side: Side, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, collateralTokenPrice: OraclePrice, collateralTokenEmaPrice: OraclePrice, collateralTokenCustodyAccount: CustodyAccount, swapOutTokenPrice: OraclePrice, swapOutTokenEmaPrice: OraclePrice, swapOutTokenCustodyAccount: CustodyAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetTokenCustodyAccount: CustodyAccount, swapPoolAumUsdMax: BN,
|
|
4743
|
+
getSizeAmountWithSwapSync: (amountIn: BN, leverage: string, side: Side, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, collateralTokenPrice: OraclePrice, collateralTokenEmaPrice: OraclePrice, collateralTokenCustodyAccount: CustodyAccount, swapOutTokenPrice: OraclePrice, swapOutTokenEmaPrice: OraclePrice, swapOutTokenCustodyAccount: CustodyAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetTokenCustodyAccount: CustodyAccount, swapPoolAumUsdMax: BN, poolConfig: PoolConfig, discountBps?: BN) => BN;
|
|
4598
4744
|
getCollateralAmountWithFeeFromLeverageAndSize: (sizeAmount: BN, leverage: string, marketToken: Token, collateralToken: Token, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, discountBps?: BN) => BN;
|
|
4599
|
-
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,
|
|
4600
|
-
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;
|
|
4601
|
-
getMaxWithdrawableAmountSyncInternal: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig,
|
|
4745
|
+
getCollateralAmountWithSwapSync: (sizeAmount: BN, leverage: string, side: Side, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, swapOutTokenPrice: OraclePrice, swapOutTokenEmaPrice: OraclePrice, swapOutTokenCustodyAccount: CustodyAccount, collateralTokenPrice: OraclePrice, collateralTokenEmaPrice: OraclePrice, collateralTokenCustodyAccount: CustodyAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetTokenCustodyAccount: CustodyAccount, swapPoolAumUsdMax: BN, poolConfig: PoolConfig) => BN;
|
|
4746
|
+
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;
|
|
4747
|
+
getMaxWithdrawableAmountSyncInternal: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => {
|
|
4602
4748
|
maxWithdrawableAmount: BN;
|
|
4603
|
-
|
|
4749
|
+
maxWithdrawableAmountUsd: BN;
|
|
4750
|
+
diffUsd: BN;
|
|
4751
|
+
};
|
|
4752
|
+
getFinalCloseAmountUsdSync: (positionAccount: PositionAccount, marketCorrelation: boolean, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig) => {
|
|
4753
|
+
closeAmountUsd: BN;
|
|
4754
|
+
feesAmountUsd: BN;
|
|
4755
|
+
};
|
|
4756
|
+
getMaxAddableCollateralSync: (positionAccount: PositionAccount, targetCustodyAccount: CustodyAccount, collateralCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, errorBandwidthPercentageUi?: number) => {
|
|
4757
|
+
maxAddableAmount: BN;
|
|
4758
|
+
maxAddableAmountUsd: BN;
|
|
4604
4759
|
};
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4760
|
+
getMaxWithdrawableAmountSync: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => {
|
|
4761
|
+
maxWithdrawableAmount: BN;
|
|
4762
|
+
maxWithdrawableAmountUsd: BN;
|
|
4608
4763
|
};
|
|
4609
|
-
getMaxWithdrawableAmountSync: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => BN;
|
|
4610
4764
|
getCumulativeLockFeeSync: (custodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
|
4611
4765
|
getBorrowRateSync: (custodyAccount: CustodyAccount, currentUtilization: BN) => BN;
|
|
4612
4766
|
getLockFeeAndUnsettledUsdForPosition: (position: PositionAccount, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
|
4613
|
-
getLockedUsd: (
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4617
|
-
|
|
4767
|
+
getLockedUsd: (sizeUsd: BN, collateralUsd: BN, side: Side, marketCorrelation: boolean, maxPayOffBps: BN) => BN;
|
|
4768
|
+
getLiquidationPriceContractHelper: (entryOraclePrice: OraclePrice, lockAndUnsettledFeeUsd: BN, side: Side, targetCustodyAccount: CustodyAccount, positionAccount: PositionAccount) => OraclePrice;
|
|
4769
|
+
getLiquidationPriceSync: (collateralUsd: BN, sizeAmount: BN, entryOraclePrice: OraclePrice, lockAndUnsettledFeeUsd: BN, side: Side, targetPrice: OraclePrice, targetCustodyAccount: CustodyAccount, positionAccount: PositionAccount) => OraclePrice;
|
|
4770
|
+
getLiquidationPriceWithOrder: (collateralUsd: BN, sizeAmount: BN, sizeUsd: BN, sizeDecimals: number, limitOraclePrice: OraclePrice, side: Side, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
|
4771
|
+
getMaxProfitPriceSync: (entryPrice: OraclePrice, marketCorrelation: boolean, side: Side, collateralPrice: OraclePrice, positionAccount: PositionAccount) => OraclePrice;
|
|
4772
|
+
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) => {
|
|
4618
4773
|
pnlUsd: BN;
|
|
4619
4774
|
pnlPercentage: BN;
|
|
4620
4775
|
};
|
|
@@ -4624,6 +4779,10 @@ export declare class PerpetualsClient {
|
|
|
4624
4779
|
profitUsd: BN;
|
|
4625
4780
|
lossUsd: BN;
|
|
4626
4781
|
};
|
|
4782
|
+
getPnlContractHelper: (positionAccount: PositionAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, delay: BN, poolConfig: PoolConfig) => {
|
|
4783
|
+
profitUsd: BN;
|
|
4784
|
+
lossUsd: BN;
|
|
4785
|
+
};
|
|
4627
4786
|
getSwapAmountAndFeesSync: (amountIn: BN, amountOut: BN, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, outputTokenPrice: OraclePrice, outputTokenEmaPrice: OraclePrice, outputTokenCustodyAccount: CustodyAccount, poolAumUsdMax: BN, poolConfig: PoolConfig) => {
|
|
4628
4787
|
minAmountOut: BN;
|
|
4629
4788
|
minAmountIn: BN;
|
|
@@ -4634,8 +4793,9 @@ export declare class PerpetualsClient {
|
|
|
4634
4793
|
poolAmountUsd: BN;
|
|
4635
4794
|
poolEquityUsd: BN;
|
|
4636
4795
|
};
|
|
4637
|
-
|
|
4638
|
-
|
|
4796
|
+
getAssetsUnderManagementUsdContractHelper: (poolAccount: PoolAccount, tokenPrices: OraclePrice[], tokenEmaPrices: OraclePrice[], custodies: CustodyAccount[], markets: MarketAccount[], aumCalcMode: "includePnl" | "excludePnl", currentTime: BN, poolConfig: PoolConfig) => {
|
|
4797
|
+
poolAmountUsd: BN;
|
|
4798
|
+
poolEquityUsd: BN;
|
|
4639
4799
|
};
|
|
4640
4800
|
getFeeDiscount: (perpetualsAccount: PerpetualsAccount, tokenStakeAccount: TokenStake, currentTime: BN) => {
|
|
4641
4801
|
discountBn: BN;
|
|
@@ -4645,12 +4805,14 @@ export declare class PerpetualsClient {
|
|
|
4645
4805
|
getStakedLpTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4646
4806
|
getAssetsUnderManagement: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4647
4807
|
getAddLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
4648
|
-
amount: BN;
|
|
4649
|
-
fee: BN;
|
|
4808
|
+
amount: BN | undefined;
|
|
4809
|
+
fee: BN | undefined;
|
|
4810
|
+
error?: string;
|
|
4650
4811
|
}>;
|
|
4651
4812
|
getRemoveLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, removeTokenCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
4652
4813
|
amount: BN;
|
|
4653
4814
|
fee: BN;
|
|
4815
|
+
error?: string;
|
|
4654
4816
|
}>;
|
|
4655
4817
|
getCompoundingLPTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4656
4818
|
getAddCompoundingLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
@@ -4665,19 +4827,19 @@ export declare class PerpetualsClient {
|
|
|
4665
4827
|
getLiquidationStateView: (positionAccount: PublicKey, poolName: string, tokenMint: PublicKey, collateralMint: PublicKey, poolConfig: PoolConfig) => Promise<any>;
|
|
4666
4828
|
getCompoundingTokenDataView: (poolConfig: PoolConfig) => Promise<any>;
|
|
4667
4829
|
getLpTokenPriceView: (poolConfig: PoolConfig) => Promise<any>;
|
|
4668
|
-
openPosition: (targetSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, collateralWithfee: BN, size: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey,
|
|
4830
|
+
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<{
|
|
4669
4831
|
instructions: TransactionInstruction[];
|
|
4670
4832
|
additionalSigners: Signer[];
|
|
4671
4833
|
}>;
|
|
4672
|
-
closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey,
|
|
4834
|
+
closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4673
4835
|
instructions: TransactionInstruction[];
|
|
4674
4836
|
additionalSigners: Signer[];
|
|
4675
4837
|
}>;
|
|
4676
|
-
swapAndOpen: (targetTokenSymbol: string, collateralTokenSymbol: string, userInputTokenSymbol: string, amountIn: BN,
|
|
4838
|
+
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<{
|
|
4677
4839
|
instructions: TransactionInstruction[];
|
|
4678
4840
|
additionalSigners: Signer[];
|
|
4679
4841
|
}>;
|
|
4680
|
-
closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string,
|
|
4842
|
+
closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, ephemeralSignerPubkey?: any) => Promise<{
|
|
4681
4843
|
instructions: TransactionInstruction[];
|
|
4682
4844
|
additionalSigners: Signer[];
|
|
4683
4845
|
}>;
|
|
@@ -4685,23 +4847,23 @@ export declare class PerpetualsClient {
|
|
|
4685
4847
|
instructions: TransactionInstruction[];
|
|
4686
4848
|
additionalSigners: Signer[];
|
|
4687
4849
|
}>;
|
|
4688
|
-
swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN,
|
|
4850
|
+
swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4689
4851
|
instructions: TransactionInstruction[];
|
|
4690
4852
|
additionalSigners: Signer[];
|
|
4691
4853
|
}>;
|
|
4692
|
-
removeCollateral: (
|
|
4854
|
+
removeCollateral: (collateralDeltaUsd: BN, marketSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4693
4855
|
instructions: TransactionInstruction[];
|
|
4694
4856
|
additionalSigners: Signer[];
|
|
4695
4857
|
}>;
|
|
4696
|
-
removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string,
|
|
4858
|
+
removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string, collateralDeltaUsd: BN, side: Side, poolConfig: PoolConfig, ephemeralSignerPubkey?: any) => Promise<{
|
|
4697
4859
|
instructions: TransactionInstruction[];
|
|
4698
4860
|
additionalSigners: Signer[];
|
|
4699
4861
|
}>;
|
|
4700
|
-
increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4862
|
+
increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4701
4863
|
instructions: TransactionInstruction[];
|
|
4702
4864
|
additionalSigners: Signer[];
|
|
4703
4865
|
}>;
|
|
4704
|
-
decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4866
|
+
decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4705
4867
|
instructions: TransactionInstruction[];
|
|
4706
4868
|
additionalSigners: Signer[];
|
|
4707
4869
|
}>;
|
|
@@ -4721,14 +4883,6 @@ export declare class PerpetualsClient {
|
|
|
4721
4883
|
instructions: TransactionInstruction[];
|
|
4722
4884
|
additionalSigners: Signer[];
|
|
4723
4885
|
}>;
|
|
4724
|
-
updateNftAccount: (nftMint: PublicKey, updateReferer: boolean, updateBooster: boolean, flpStakeAccounts: PublicKey[]) => Promise<{
|
|
4725
|
-
instructions: TransactionInstruction[];
|
|
4726
|
-
additionalSigners: Signer[];
|
|
4727
|
-
}>;
|
|
4728
|
-
levelUp: (poolConfig: PoolConfig, nftMint: PublicKey, authorizationRulesAccount: PublicKey) => Promise<{
|
|
4729
|
-
instructions: TransactionInstruction[];
|
|
4730
|
-
additionalSigners: Signer[];
|
|
4731
|
-
}>;
|
|
4732
4886
|
depositStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
4733
4887
|
instructions: TransactionInstruction[];
|
|
4734
4888
|
additionalSigners: Signer[];
|
|
@@ -4752,11 +4906,11 @@ export declare class PerpetualsClient {
|
|
|
4752
4906
|
instructions: TransactionInstruction[];
|
|
4753
4907
|
additionalSigners: Signer[];
|
|
4754
4908
|
}>;
|
|
4755
|
-
addCompoundingLiquidity: (amountIn: BN, minCompoundingAmountOut: BN, inTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined) => Promise<{
|
|
4909
|
+
addCompoundingLiquidity: (amountIn: BN, minCompoundingAmountOut: BN, inTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined, enableHeapSizeIx?: boolean, enableDebugLogs?: boolean) => Promise<{
|
|
4756
4910
|
instructions: TransactionInstruction[];
|
|
4757
4911
|
additionalSigners: Signer[];
|
|
4758
4912
|
}>;
|
|
4759
|
-
removeCompoundingLiquidity: (compoundingAmountIn: BN, minAmountOut: BN, outTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined) => Promise<{
|
|
4913
|
+
removeCompoundingLiquidity: (compoundingAmountIn: BN, minAmountOut: BN, outTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined, enableHeapSizeIx?: boolean, enableDebugLogs?: boolean) => Promise<{
|
|
4760
4914
|
instructions: TransactionInstruction[];
|
|
4761
4915
|
additionalSigners: Signer[];
|
|
4762
4916
|
}>;
|
|
@@ -4772,14 +4926,6 @@ export declare class PerpetualsClient {
|
|
|
4772
4926
|
instructions: TransactionInstruction[];
|
|
4773
4927
|
additionalSigners: Signer[];
|
|
4774
4928
|
}>;
|
|
4775
|
-
burnAndClaim: (owner: PublicKey, nftMint: PublicKey, poolConfig: PoolConfig, createAta: boolean) => Promise<{
|
|
4776
|
-
instructions: TransactionInstruction[];
|
|
4777
|
-
additionalSigners: Signer[];
|
|
4778
|
-
}>;
|
|
4779
|
-
burnAndStake: (owner: PublicKey, feePayer: PublicKey, nftMint: PublicKey, poolConfig: PoolConfig) => Promise<{
|
|
4780
|
-
instructions: TransactionInstruction[];
|
|
4781
|
-
additionalSigners: Signer[];
|
|
4782
|
-
}>;
|
|
4783
4929
|
depositTokenStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
4784
4930
|
instructions: TransactionInstruction[];
|
|
4785
4931
|
additionalSigners: Signer[];
|
|
@@ -4808,19 +4954,11 @@ export declare class PerpetualsClient {
|
|
|
4808
4954
|
instructions: TransactionInstruction[];
|
|
4809
4955
|
additionalSigners: Signer[];
|
|
4810
4956
|
}>;
|
|
4811
|
-
|
|
4812
|
-
instructions: TransactionInstruction[];
|
|
4813
|
-
additionalSigners: Signer[];
|
|
4814
|
-
}>;
|
|
4815
|
-
distributeReward: (rewardAmount: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4957
|
+
collectRebate: (owner: PublicKey, rebateSymbol: string, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
|
|
4816
4958
|
instructions: TransactionInstruction[];
|
|
4817
4959
|
additionalSigners: Signer[];
|
|
4818
4960
|
}>;
|
|
4819
|
-
|
|
4820
|
-
instructions: TransactionInstruction[];
|
|
4821
|
-
additionalSigners: Signer[];
|
|
4822
|
-
}>;
|
|
4823
|
-
collectAndDistributeFee: (rewardSymbol: string, poolConfig: PoolConfig, createUserATA?: boolean, nftTradingAccount?: PublicKey) => Promise<{
|
|
4961
|
+
settleRebates: (rebateSymbol: string, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4824
4962
|
instructions: TransactionInstruction[];
|
|
4825
4963
|
additionalSigners: Signer[];
|
|
4826
4964
|
}>;
|
|
@@ -4832,11 +4970,11 @@ export declare class PerpetualsClient {
|
|
|
4832
4970
|
instructions: TransactionInstruction[];
|
|
4833
4971
|
additionalSigners: Signer[];
|
|
4834
4972
|
}>;
|
|
4835
|
-
executeLimitOrder: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4973
|
+
executeLimitOrder: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4836
4974
|
instructions: TransactionInstruction[];
|
|
4837
4975
|
additionalSigners: Signer[];
|
|
4838
4976
|
}>;
|
|
4839
|
-
executeLimitWithSwap: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4977
|
+
executeLimitWithSwap: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4840
4978
|
instructions: TransactionInstruction[];
|
|
4841
4979
|
additionalSigners: Signer[];
|
|
4842
4980
|
}>;
|
|
@@ -4856,11 +4994,11 @@ export declare class PerpetualsClient {
|
|
|
4856
4994
|
instructions: TransactionInstruction[];
|
|
4857
4995
|
additionalSigners: Signer[];
|
|
4858
4996
|
}>;
|
|
4859
|
-
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
|
|
4997
|
+
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<{
|
|
4860
4998
|
instructions: TransactionInstruction[];
|
|
4861
4999
|
additionalSigners: Signer[];
|
|
4862
5000
|
}>;
|
|
4863
|
-
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
|
|
5001
|
+
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<{
|
|
4864
5002
|
instructions: TransactionInstruction[];
|
|
4865
5003
|
additionalSigners: Signer[];
|
|
4866
5004
|
}>;
|
|
@@ -4883,9 +5021,9 @@ export declare class PerpetualsClient {
|
|
|
4883
5021
|
}>;
|
|
4884
5022
|
init: (admins: PublicKey[], config: any) => Promise<void>;
|
|
4885
5023
|
setAdminSigners: (admins: PublicKey[], minSignatures: number) => Promise<void>;
|
|
4886
|
-
addPool: (name: string, maxAumUsd: BN, permissions: Permissions, metadataSymbol: string, metadataTitle: string, metadataUri: string, stakingFeeShareBps: BN, vpVolumeFactor: number) => Promise<void>;
|
|
5024
|
+
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>;
|
|
4887
5025
|
removePool: (name: string) => Promise<void>;
|
|
4888
|
-
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>;
|
|
5026
|
+
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>;
|
|
4889
5027
|
editCustody: (poolName: string, tokenMint: PublicKey, isStable: boolean, oracle: OracleParams, pricing: PricingParams, permissions: Permissions, fees: Fees, borrowRate: BorrowRateParams, ratios: TokenRatios[]) => Promise<void>;
|
|
4890
5028
|
removeCustody: (poolName: string, tokenMint: PublicKey, ratios: TokenRatios[], poolConfig: PoolConfig) => Promise<void>;
|
|
4891
5029
|
protocolWithdrawFees: (rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
@@ -4941,10 +5079,18 @@ export declare class PerpetualsClient {
|
|
|
4941
5079
|
instructions: TransactionInstruction[];
|
|
4942
5080
|
additionalSigners: Signer[];
|
|
4943
5081
|
}>;
|
|
5082
|
+
withdrawUnclaimedTokens: (poolConfig: PoolConfig) => Promise<{
|
|
5083
|
+
instructions: TransactionInstruction[];
|
|
5084
|
+
additionalSigners: Signer[];
|
|
5085
|
+
}>;
|
|
4944
5086
|
initRevenueTokenAccount: (feeShareBps: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4945
5087
|
instructions: TransactionInstruction[];
|
|
4946
5088
|
additionalSigners: Signer[];
|
|
4947
5089
|
}>;
|
|
5090
|
+
initRebateVault: (allowRebatePayout: boolean, rebateSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
5091
|
+
instructions: TransactionInstruction[];
|
|
5092
|
+
additionalSigners: Signer[];
|
|
5093
|
+
}>;
|
|
4948
5094
|
distributeTokenReward: (amount: BN, epochCount: number, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4949
5095
|
instructions: TransactionInstruction[];
|
|
4950
5096
|
additionalSigners: Signer[];
|