flash-sdk 10.3.0 → 10.5.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MarketAccount.js +1 -1
- package/dist/OraclePrice.d.ts +0 -1
- package/dist/OrderAccount.d.ts +0 -1
- package/dist/PerpetualsClient.d.ts +292 -148
- package/dist/PerpetualsClient.js +737 -1064
- package/dist/PoolAccount.d.ts +3 -1
- package/dist/PoolConfig.d.ts +3 -1
- package/dist/PoolConfig.js +4 -2
- package/dist/PoolConfig.json +1041 -526
- package/dist/PoolDataClient.d.ts +0 -1
- package/dist/PositionAccount.d.ts +3 -3
- package/dist/TokenStakeAccount.d.ts +2 -3
- package/dist/TokenStakeAccount.js +2 -2
- package/dist/TokenVaultAccount.d.ts +0 -1
- package/dist/ViewHelper.js +2 -2
- package/dist/backupOracle.d.ts +0 -1
- package/dist/backupOracle.js +6 -6
- package/dist/constants/index.d.ts +0 -1
- 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 -5
- package/dist/types/index.js +6 -5
- package/dist/utils/IdlCoder.js +17 -7
- package/dist/utils/alt.js +5 -6
- package/dist/utils/anchorCpiEvents.d.ts +0 -1
- package/dist/utils/anchorCpiEvents.js +4 -4
- package/dist/utils/getReferralAccounts.d.ts +1 -1
- package/dist/utils/getReferralAccounts.js +3 -8
- package/dist/utils/index.js +6 -6
- package/dist/utils/rpc.js +9 -9
- package/package.json +1 -1
- package/dist/TradingAccount.d.ts +0 -24
- package/dist/TradingAccount.js +0 -17
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
/// <reference types="bn.js" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { Program, AnchorProvider, BN } from "@coral-xyz/anchor";
|
|
4
2
|
import { PublicKey, TransactionInstruction, Commitment, Signer, AddressLookupTableAccount, VersionedTransaction } from "@solana/web3.js";
|
|
5
3
|
import { PoolAccount } from "./PoolAccount";
|
|
6
4
|
import { PositionAccount } from "./PositionAccount";
|
|
7
|
-
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";
|
|
8
6
|
import { OraclePrice } from "./OraclePrice";
|
|
9
7
|
import { CustodyAccount } from "./CustodyAccount";
|
|
10
8
|
import { Perpetuals } from "./idl/perpetuals";
|
|
@@ -111,7 +109,7 @@ export declare class PerpetualsClient {
|
|
|
111
109
|
maxUtilization: number;
|
|
112
110
|
degenPositionFactor: number;
|
|
113
111
|
degenExposureFactor: number;
|
|
114
|
-
|
|
112
|
+
maxPositionSizeUsd: BN;
|
|
115
113
|
maxExposureUsd: BN;
|
|
116
114
|
};
|
|
117
115
|
permissions: {
|
|
@@ -204,7 +202,7 @@ export declare class PerpetualsClient {
|
|
|
204
202
|
reservedAmount: BN;
|
|
205
203
|
minReserveUsd: BN;
|
|
206
204
|
limitPriceBufferBps: BN;
|
|
207
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
205
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
208
206
|
owner: PublicKey;
|
|
209
207
|
stakeStats: {
|
|
210
208
|
pendingActivation: BN;
|
|
@@ -238,7 +236,7 @@ export declare class PerpetualsClient {
|
|
|
238
236
|
lockedAmount: BN;
|
|
239
237
|
lockedUsd: BN;
|
|
240
238
|
collateralAmount: BN;
|
|
241
|
-
|
|
239
|
+
collateralLiabilityUsd: BN;
|
|
242
240
|
unsettledFeeUsd: BN;
|
|
243
241
|
cumulativeLockFeeSnapshot: BN;
|
|
244
242
|
sizeDecimals: number;
|
|
@@ -247,7 +245,7 @@ export declare class PerpetualsClient {
|
|
|
247
245
|
};
|
|
248
246
|
targetCustodyUid: number;
|
|
249
247
|
collateralCustodyUid: number;
|
|
250
|
-
padding2: number[] | BN[]
|
|
248
|
+
padding2: number[] | BN[];
|
|
251
249
|
numSigners: number;
|
|
252
250
|
numSigned: number;
|
|
253
251
|
minSignatures: number;
|
|
@@ -304,7 +302,7 @@ export declare class PerpetualsClient {
|
|
|
304
302
|
}[];
|
|
305
303
|
markets: PublicKey[];
|
|
306
304
|
maxAumUsd: BN;
|
|
307
|
-
buffer: BN;
|
|
305
|
+
buffer: number | BN;
|
|
308
306
|
rawAumUsd: BN;
|
|
309
307
|
equityUsd: BN;
|
|
310
308
|
totalStaked: {
|
|
@@ -335,6 +333,9 @@ export declare class PerpetualsClient {
|
|
|
335
333
|
lpPrice: BN;
|
|
336
334
|
compoundingLpPrice: BN;
|
|
337
335
|
lastUpdatedTimestamp: BN;
|
|
336
|
+
feesObligationUsd: BN;
|
|
337
|
+
rebateObligationUsd: BN;
|
|
338
|
+
thresholdUsd: BN;
|
|
338
339
|
delegate: PublicKey;
|
|
339
340
|
openTime: BN;
|
|
340
341
|
updateTime: BN;
|
|
@@ -348,15 +349,22 @@ export declare class PerpetualsClient {
|
|
|
348
349
|
lockedUsd: BN;
|
|
349
350
|
collateralAmount: BN;
|
|
350
351
|
collateralUsd: BN;
|
|
351
|
-
|
|
352
|
+
unsettledValueUsd: BN;
|
|
352
353
|
unsettledFeesUsd: BN;
|
|
353
354
|
cumulativeLockFeeSnapshot: BN;
|
|
354
355
|
degenSizeUsd: BN;
|
|
356
|
+
referencePrice: {
|
|
357
|
+
price: BN;
|
|
358
|
+
exponent: number;
|
|
359
|
+
};
|
|
355
360
|
sizeDecimals: number;
|
|
356
361
|
lockedDecimals: number;
|
|
357
362
|
collateralDecimals: number;
|
|
358
363
|
key: PublicKey;
|
|
359
364
|
feeAmount: BN;
|
|
365
|
+
allowPayout: boolean;
|
|
366
|
+
availableUsd: BN;
|
|
367
|
+
availableAmount: BN;
|
|
360
368
|
refererTokenStakeAccount: PublicKey;
|
|
361
369
|
refererBoosterAccount: PublicKey;
|
|
362
370
|
level: number;
|
|
@@ -370,6 +378,7 @@ export declare class PerpetualsClient {
|
|
|
370
378
|
rewardTokens: BN;
|
|
371
379
|
unclaimedRevenueAmount: BN;
|
|
372
380
|
revenueSnapshot: BN;
|
|
381
|
+
claimableRebateUsd: BN;
|
|
373
382
|
tokenMint: PublicKey;
|
|
374
383
|
tokenVaultTokenAccount: PublicKey;
|
|
375
384
|
tokenPermissions: {
|
|
@@ -453,7 +462,7 @@ export declare class PerpetualsClient {
|
|
|
453
462
|
maxUtilization: number;
|
|
454
463
|
degenPositionFactor: number;
|
|
455
464
|
degenExposureFactor: number;
|
|
456
|
-
|
|
465
|
+
maxPositionSizeUsd: BN;
|
|
457
466
|
maxExposureUsd: BN;
|
|
458
467
|
};
|
|
459
468
|
permissions: {
|
|
@@ -546,7 +555,7 @@ export declare class PerpetualsClient {
|
|
|
546
555
|
reservedAmount: BN;
|
|
547
556
|
minReserveUsd: BN;
|
|
548
557
|
limitPriceBufferBps: BN;
|
|
549
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
558
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
550
559
|
owner: PublicKey;
|
|
551
560
|
stakeStats: {
|
|
552
561
|
pendingActivation: BN;
|
|
@@ -580,7 +589,7 @@ export declare class PerpetualsClient {
|
|
|
580
589
|
lockedAmount: BN;
|
|
581
590
|
lockedUsd: BN;
|
|
582
591
|
collateralAmount: BN;
|
|
583
|
-
|
|
592
|
+
collateralLiabilityUsd: BN;
|
|
584
593
|
unsettledFeeUsd: BN;
|
|
585
594
|
cumulativeLockFeeSnapshot: BN;
|
|
586
595
|
sizeDecimals: number;
|
|
@@ -589,7 +598,7 @@ export declare class PerpetualsClient {
|
|
|
589
598
|
};
|
|
590
599
|
targetCustodyUid: number;
|
|
591
600
|
collateralCustodyUid: number;
|
|
592
|
-
padding2: number[] | BN[]
|
|
601
|
+
padding2: number[] | BN[];
|
|
593
602
|
numSigners: number;
|
|
594
603
|
numSigned: number;
|
|
595
604
|
minSignatures: number;
|
|
@@ -646,7 +655,7 @@ export declare class PerpetualsClient {
|
|
|
646
655
|
}[];
|
|
647
656
|
markets: PublicKey[];
|
|
648
657
|
maxAumUsd: BN;
|
|
649
|
-
buffer: BN;
|
|
658
|
+
buffer: number | BN;
|
|
650
659
|
rawAumUsd: BN;
|
|
651
660
|
equityUsd: BN;
|
|
652
661
|
totalStaked: {
|
|
@@ -677,6 +686,9 @@ export declare class PerpetualsClient {
|
|
|
677
686
|
lpPrice: BN;
|
|
678
687
|
compoundingLpPrice: BN;
|
|
679
688
|
lastUpdatedTimestamp: BN;
|
|
689
|
+
feesObligationUsd: BN;
|
|
690
|
+
rebateObligationUsd: BN;
|
|
691
|
+
thresholdUsd: BN;
|
|
680
692
|
delegate: PublicKey;
|
|
681
693
|
openTime: BN;
|
|
682
694
|
updateTime: BN;
|
|
@@ -690,15 +702,22 @@ export declare class PerpetualsClient {
|
|
|
690
702
|
lockedUsd: BN;
|
|
691
703
|
collateralAmount: BN;
|
|
692
704
|
collateralUsd: BN;
|
|
693
|
-
|
|
705
|
+
unsettledValueUsd: BN;
|
|
694
706
|
unsettledFeesUsd: BN;
|
|
695
707
|
cumulativeLockFeeSnapshot: BN;
|
|
696
708
|
degenSizeUsd: BN;
|
|
709
|
+
referencePrice: {
|
|
710
|
+
price: BN;
|
|
711
|
+
exponent: number;
|
|
712
|
+
};
|
|
697
713
|
sizeDecimals: number;
|
|
698
714
|
lockedDecimals: number;
|
|
699
715
|
collateralDecimals: number;
|
|
700
716
|
key: PublicKey;
|
|
701
717
|
feeAmount: BN;
|
|
718
|
+
allowPayout: boolean;
|
|
719
|
+
availableUsd: BN;
|
|
720
|
+
availableAmount: BN;
|
|
702
721
|
refererTokenStakeAccount: PublicKey;
|
|
703
722
|
refererBoosterAccount: PublicKey;
|
|
704
723
|
level: number;
|
|
@@ -712,6 +731,7 @@ export declare class PerpetualsClient {
|
|
|
712
731
|
rewardTokens: BN;
|
|
713
732
|
unclaimedRevenueAmount: BN;
|
|
714
733
|
revenueSnapshot: BN;
|
|
734
|
+
claimableRebateUsd: BN;
|
|
715
735
|
tokenMint: PublicKey;
|
|
716
736
|
tokenVaultTokenAccount: PublicKey;
|
|
717
737
|
tokenPermissions: {
|
|
@@ -794,7 +814,7 @@ export declare class PerpetualsClient {
|
|
|
794
814
|
maxUtilization: number;
|
|
795
815
|
degenPositionFactor: number;
|
|
796
816
|
degenExposureFactor: number;
|
|
797
|
-
|
|
817
|
+
maxPositionSizeUsd: BN;
|
|
798
818
|
maxExposureUsd: BN;
|
|
799
819
|
};
|
|
800
820
|
permissions: {
|
|
@@ -887,7 +907,7 @@ export declare class PerpetualsClient {
|
|
|
887
907
|
reservedAmount: BN;
|
|
888
908
|
minReserveUsd: BN;
|
|
889
909
|
limitPriceBufferBps: BN;
|
|
890
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
910
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
891
911
|
owner: PublicKey;
|
|
892
912
|
stakeStats: {
|
|
893
913
|
pendingActivation: BN;
|
|
@@ -921,7 +941,7 @@ export declare class PerpetualsClient {
|
|
|
921
941
|
lockedAmount: BN;
|
|
922
942
|
lockedUsd: BN;
|
|
923
943
|
collateralAmount: BN;
|
|
924
|
-
|
|
944
|
+
collateralLiabilityUsd: BN;
|
|
925
945
|
unsettledFeeUsd: BN;
|
|
926
946
|
cumulativeLockFeeSnapshot: BN;
|
|
927
947
|
sizeDecimals: number;
|
|
@@ -930,7 +950,7 @@ export declare class PerpetualsClient {
|
|
|
930
950
|
};
|
|
931
951
|
targetCustodyUid: number;
|
|
932
952
|
collateralCustodyUid: number;
|
|
933
|
-
padding2: number[] | BN[]
|
|
953
|
+
padding2: number[] | BN[];
|
|
934
954
|
numSigners: number;
|
|
935
955
|
numSigned: number;
|
|
936
956
|
minSignatures: number;
|
|
@@ -987,7 +1007,7 @@ export declare class PerpetualsClient {
|
|
|
987
1007
|
}[];
|
|
988
1008
|
markets: PublicKey[];
|
|
989
1009
|
maxAumUsd: BN;
|
|
990
|
-
buffer: BN;
|
|
1010
|
+
buffer: number | BN;
|
|
991
1011
|
rawAumUsd: BN;
|
|
992
1012
|
equityUsd: BN;
|
|
993
1013
|
totalStaked: {
|
|
@@ -1018,6 +1038,9 @@ export declare class PerpetualsClient {
|
|
|
1018
1038
|
lpPrice: BN;
|
|
1019
1039
|
compoundingLpPrice: BN;
|
|
1020
1040
|
lastUpdatedTimestamp: BN;
|
|
1041
|
+
feesObligationUsd: BN;
|
|
1042
|
+
rebateObligationUsd: BN;
|
|
1043
|
+
thresholdUsd: BN;
|
|
1021
1044
|
delegate: PublicKey;
|
|
1022
1045
|
openTime: BN;
|
|
1023
1046
|
updateTime: BN;
|
|
@@ -1031,15 +1054,22 @@ export declare class PerpetualsClient {
|
|
|
1031
1054
|
lockedUsd: BN;
|
|
1032
1055
|
collateralAmount: BN;
|
|
1033
1056
|
collateralUsd: BN;
|
|
1034
|
-
|
|
1057
|
+
unsettledValueUsd: BN;
|
|
1035
1058
|
unsettledFeesUsd: BN;
|
|
1036
1059
|
cumulativeLockFeeSnapshot: BN;
|
|
1037
1060
|
degenSizeUsd: BN;
|
|
1061
|
+
referencePrice: {
|
|
1062
|
+
price: BN;
|
|
1063
|
+
exponent: number;
|
|
1064
|
+
};
|
|
1038
1065
|
sizeDecimals: number;
|
|
1039
1066
|
lockedDecimals: number;
|
|
1040
1067
|
collateralDecimals: number;
|
|
1041
1068
|
key: PublicKey;
|
|
1042
1069
|
feeAmount: BN;
|
|
1070
|
+
allowPayout: boolean;
|
|
1071
|
+
availableUsd: BN;
|
|
1072
|
+
availableAmount: BN;
|
|
1043
1073
|
refererTokenStakeAccount: PublicKey;
|
|
1044
1074
|
refererBoosterAccount: PublicKey;
|
|
1045
1075
|
level: number;
|
|
@@ -1053,6 +1083,7 @@ export declare class PerpetualsClient {
|
|
|
1053
1083
|
rewardTokens: BN;
|
|
1054
1084
|
unclaimedRevenueAmount: BN;
|
|
1055
1085
|
revenueSnapshot: BN;
|
|
1086
|
+
claimableRebateUsd: BN;
|
|
1056
1087
|
tokenMint: PublicKey;
|
|
1057
1088
|
tokenVaultTokenAccount: PublicKey;
|
|
1058
1089
|
tokenPermissions: {
|
|
@@ -1139,7 +1170,7 @@ export declare class PerpetualsClient {
|
|
|
1139
1170
|
maxUtilization: number;
|
|
1140
1171
|
degenPositionFactor: number;
|
|
1141
1172
|
degenExposureFactor: number;
|
|
1142
|
-
|
|
1173
|
+
maxPositionSizeUsd: BN;
|
|
1143
1174
|
maxExposureUsd: BN;
|
|
1144
1175
|
};
|
|
1145
1176
|
permissions: {
|
|
@@ -1232,7 +1263,7 @@ export declare class PerpetualsClient {
|
|
|
1232
1263
|
reservedAmount: BN;
|
|
1233
1264
|
minReserveUsd: BN;
|
|
1234
1265
|
limitPriceBufferBps: BN;
|
|
1235
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1266
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1236
1267
|
owner: PublicKey;
|
|
1237
1268
|
stakeStats: {
|
|
1238
1269
|
pendingActivation: BN;
|
|
@@ -1266,7 +1297,7 @@ export declare class PerpetualsClient {
|
|
|
1266
1297
|
lockedAmount: BN;
|
|
1267
1298
|
lockedUsd: BN;
|
|
1268
1299
|
collateralAmount: BN;
|
|
1269
|
-
|
|
1300
|
+
collateralLiabilityUsd: BN;
|
|
1270
1301
|
unsettledFeeUsd: BN;
|
|
1271
1302
|
cumulativeLockFeeSnapshot: BN;
|
|
1272
1303
|
sizeDecimals: number;
|
|
@@ -1275,7 +1306,7 @@ export declare class PerpetualsClient {
|
|
|
1275
1306
|
};
|
|
1276
1307
|
targetCustodyUid: number;
|
|
1277
1308
|
collateralCustodyUid: number;
|
|
1278
|
-
padding2: number[] | BN[]
|
|
1309
|
+
padding2: number[] | BN[];
|
|
1279
1310
|
numSigners: number;
|
|
1280
1311
|
numSigned: number;
|
|
1281
1312
|
minSignatures: number;
|
|
@@ -1332,7 +1363,7 @@ export declare class PerpetualsClient {
|
|
|
1332
1363
|
}[];
|
|
1333
1364
|
markets: PublicKey[];
|
|
1334
1365
|
maxAumUsd: BN;
|
|
1335
|
-
buffer: BN;
|
|
1366
|
+
buffer: number | BN;
|
|
1336
1367
|
rawAumUsd: BN;
|
|
1337
1368
|
equityUsd: BN;
|
|
1338
1369
|
totalStaked: {
|
|
@@ -1363,6 +1394,9 @@ export declare class PerpetualsClient {
|
|
|
1363
1394
|
lpPrice: BN;
|
|
1364
1395
|
compoundingLpPrice: BN;
|
|
1365
1396
|
lastUpdatedTimestamp: BN;
|
|
1397
|
+
feesObligationUsd: BN;
|
|
1398
|
+
rebateObligationUsd: BN;
|
|
1399
|
+
thresholdUsd: BN;
|
|
1366
1400
|
delegate: PublicKey;
|
|
1367
1401
|
openTime: BN;
|
|
1368
1402
|
updateTime: BN;
|
|
@@ -1376,15 +1410,22 @@ export declare class PerpetualsClient {
|
|
|
1376
1410
|
lockedUsd: BN;
|
|
1377
1411
|
collateralAmount: BN;
|
|
1378
1412
|
collateralUsd: BN;
|
|
1379
|
-
|
|
1413
|
+
unsettledValueUsd: BN;
|
|
1380
1414
|
unsettledFeesUsd: BN;
|
|
1381
1415
|
cumulativeLockFeeSnapshot: BN;
|
|
1382
1416
|
degenSizeUsd: BN;
|
|
1417
|
+
referencePrice: {
|
|
1418
|
+
price: BN;
|
|
1419
|
+
exponent: number;
|
|
1420
|
+
};
|
|
1383
1421
|
sizeDecimals: number;
|
|
1384
1422
|
lockedDecimals: number;
|
|
1385
1423
|
collateralDecimals: number;
|
|
1386
1424
|
key: PublicKey;
|
|
1387
1425
|
feeAmount: BN;
|
|
1426
|
+
allowPayout: boolean;
|
|
1427
|
+
availableUsd: BN;
|
|
1428
|
+
availableAmount: BN;
|
|
1388
1429
|
refererTokenStakeAccount: PublicKey;
|
|
1389
1430
|
refererBoosterAccount: PublicKey;
|
|
1390
1431
|
level: number;
|
|
@@ -1398,6 +1439,7 @@ export declare class PerpetualsClient {
|
|
|
1398
1439
|
rewardTokens: BN;
|
|
1399
1440
|
unclaimedRevenueAmount: BN;
|
|
1400
1441
|
revenueSnapshot: BN;
|
|
1442
|
+
claimableRebateUsd: BN;
|
|
1401
1443
|
tokenMint: PublicKey;
|
|
1402
1444
|
tokenVaultTokenAccount: PublicKey;
|
|
1403
1445
|
tokenPermissions: {
|
|
@@ -1483,7 +1525,7 @@ export declare class PerpetualsClient {
|
|
|
1483
1525
|
maxUtilization: number;
|
|
1484
1526
|
degenPositionFactor: number;
|
|
1485
1527
|
degenExposureFactor: number;
|
|
1486
|
-
|
|
1528
|
+
maxPositionSizeUsd: BN;
|
|
1487
1529
|
maxExposureUsd: BN;
|
|
1488
1530
|
};
|
|
1489
1531
|
permissions: {
|
|
@@ -1576,7 +1618,7 @@ export declare class PerpetualsClient {
|
|
|
1576
1618
|
reservedAmount: BN;
|
|
1577
1619
|
minReserveUsd: BN;
|
|
1578
1620
|
limitPriceBufferBps: BN;
|
|
1579
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1621
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1580
1622
|
owner: PublicKey;
|
|
1581
1623
|
stakeStats: {
|
|
1582
1624
|
pendingActivation: BN;
|
|
@@ -1610,7 +1652,7 @@ export declare class PerpetualsClient {
|
|
|
1610
1652
|
lockedAmount: BN;
|
|
1611
1653
|
lockedUsd: BN;
|
|
1612
1654
|
collateralAmount: BN;
|
|
1613
|
-
|
|
1655
|
+
collateralLiabilityUsd: BN;
|
|
1614
1656
|
unsettledFeeUsd: BN;
|
|
1615
1657
|
cumulativeLockFeeSnapshot: BN;
|
|
1616
1658
|
sizeDecimals: number;
|
|
@@ -1619,7 +1661,7 @@ export declare class PerpetualsClient {
|
|
|
1619
1661
|
};
|
|
1620
1662
|
targetCustodyUid: number;
|
|
1621
1663
|
collateralCustodyUid: number;
|
|
1622
|
-
padding2: number[] | BN[]
|
|
1664
|
+
padding2: number[] | BN[];
|
|
1623
1665
|
numSigners: number;
|
|
1624
1666
|
numSigned: number;
|
|
1625
1667
|
minSignatures: number;
|
|
@@ -1676,7 +1718,7 @@ export declare class PerpetualsClient {
|
|
|
1676
1718
|
}[];
|
|
1677
1719
|
markets: PublicKey[];
|
|
1678
1720
|
maxAumUsd: BN;
|
|
1679
|
-
buffer: BN;
|
|
1721
|
+
buffer: number | BN;
|
|
1680
1722
|
rawAumUsd: BN;
|
|
1681
1723
|
equityUsd: BN;
|
|
1682
1724
|
totalStaked: {
|
|
@@ -1707,6 +1749,9 @@ export declare class PerpetualsClient {
|
|
|
1707
1749
|
lpPrice: BN;
|
|
1708
1750
|
compoundingLpPrice: BN;
|
|
1709
1751
|
lastUpdatedTimestamp: BN;
|
|
1752
|
+
feesObligationUsd: BN;
|
|
1753
|
+
rebateObligationUsd: BN;
|
|
1754
|
+
thresholdUsd: BN;
|
|
1710
1755
|
delegate: PublicKey;
|
|
1711
1756
|
openTime: BN;
|
|
1712
1757
|
updateTime: BN;
|
|
@@ -1720,15 +1765,22 @@ export declare class PerpetualsClient {
|
|
|
1720
1765
|
lockedUsd: BN;
|
|
1721
1766
|
collateralAmount: BN;
|
|
1722
1767
|
collateralUsd: BN;
|
|
1723
|
-
|
|
1768
|
+
unsettledValueUsd: BN;
|
|
1724
1769
|
unsettledFeesUsd: BN;
|
|
1725
1770
|
cumulativeLockFeeSnapshot: BN;
|
|
1726
1771
|
degenSizeUsd: BN;
|
|
1772
|
+
referencePrice: {
|
|
1773
|
+
price: BN;
|
|
1774
|
+
exponent: number;
|
|
1775
|
+
};
|
|
1727
1776
|
sizeDecimals: number;
|
|
1728
1777
|
lockedDecimals: number;
|
|
1729
1778
|
collateralDecimals: number;
|
|
1730
1779
|
key: PublicKey;
|
|
1731
1780
|
feeAmount: BN;
|
|
1781
|
+
allowPayout: boolean;
|
|
1782
|
+
availableUsd: BN;
|
|
1783
|
+
availableAmount: BN;
|
|
1732
1784
|
refererTokenStakeAccount: PublicKey;
|
|
1733
1785
|
refererBoosterAccount: PublicKey;
|
|
1734
1786
|
level: number;
|
|
@@ -1742,6 +1794,7 @@ export declare class PerpetualsClient {
|
|
|
1742
1794
|
rewardTokens: BN;
|
|
1743
1795
|
unclaimedRevenueAmount: BN;
|
|
1744
1796
|
revenueSnapshot: BN;
|
|
1797
|
+
claimableRebateUsd: BN;
|
|
1745
1798
|
tokenMint: PublicKey;
|
|
1746
1799
|
tokenVaultTokenAccount: PublicKey;
|
|
1747
1800
|
tokenPermissions: {
|
|
@@ -1825,7 +1878,7 @@ export declare class PerpetualsClient {
|
|
|
1825
1878
|
maxUtilization: number;
|
|
1826
1879
|
degenPositionFactor: number;
|
|
1827
1880
|
degenExposureFactor: number;
|
|
1828
|
-
|
|
1881
|
+
maxPositionSizeUsd: BN;
|
|
1829
1882
|
maxExposureUsd: BN;
|
|
1830
1883
|
};
|
|
1831
1884
|
permissions: {
|
|
@@ -1918,7 +1971,7 @@ export declare class PerpetualsClient {
|
|
|
1918
1971
|
reservedAmount: BN;
|
|
1919
1972
|
minReserveUsd: BN;
|
|
1920
1973
|
limitPriceBufferBps: BN;
|
|
1921
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1974
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1922
1975
|
owner: PublicKey;
|
|
1923
1976
|
stakeStats: {
|
|
1924
1977
|
pendingActivation: BN;
|
|
@@ -1952,7 +2005,7 @@ export declare class PerpetualsClient {
|
|
|
1952
2005
|
lockedAmount: BN;
|
|
1953
2006
|
lockedUsd: BN;
|
|
1954
2007
|
collateralAmount: BN;
|
|
1955
|
-
|
|
2008
|
+
collateralLiabilityUsd: BN;
|
|
1956
2009
|
unsettledFeeUsd: BN;
|
|
1957
2010
|
cumulativeLockFeeSnapshot: BN;
|
|
1958
2011
|
sizeDecimals: number;
|
|
@@ -1961,7 +2014,7 @@ export declare class PerpetualsClient {
|
|
|
1961
2014
|
};
|
|
1962
2015
|
targetCustodyUid: number;
|
|
1963
2016
|
collateralCustodyUid: number;
|
|
1964
|
-
padding2: number[] | BN[]
|
|
2017
|
+
padding2: number[] | BN[];
|
|
1965
2018
|
numSigners: number;
|
|
1966
2019
|
numSigned: number;
|
|
1967
2020
|
minSignatures: number;
|
|
@@ -2018,7 +2071,7 @@ export declare class PerpetualsClient {
|
|
|
2018
2071
|
}[];
|
|
2019
2072
|
markets: PublicKey[];
|
|
2020
2073
|
maxAumUsd: BN;
|
|
2021
|
-
buffer: BN;
|
|
2074
|
+
buffer: number | BN;
|
|
2022
2075
|
rawAumUsd: BN;
|
|
2023
2076
|
equityUsd: BN;
|
|
2024
2077
|
totalStaked: {
|
|
@@ -2049,6 +2102,9 @@ export declare class PerpetualsClient {
|
|
|
2049
2102
|
lpPrice: BN;
|
|
2050
2103
|
compoundingLpPrice: BN;
|
|
2051
2104
|
lastUpdatedTimestamp: BN;
|
|
2105
|
+
feesObligationUsd: BN;
|
|
2106
|
+
rebateObligationUsd: BN;
|
|
2107
|
+
thresholdUsd: BN;
|
|
2052
2108
|
delegate: PublicKey;
|
|
2053
2109
|
openTime: BN;
|
|
2054
2110
|
updateTime: BN;
|
|
@@ -2062,15 +2118,22 @@ export declare class PerpetualsClient {
|
|
|
2062
2118
|
lockedUsd: BN;
|
|
2063
2119
|
collateralAmount: BN;
|
|
2064
2120
|
collateralUsd: BN;
|
|
2065
|
-
|
|
2121
|
+
unsettledValueUsd: BN;
|
|
2066
2122
|
unsettledFeesUsd: BN;
|
|
2067
2123
|
cumulativeLockFeeSnapshot: BN;
|
|
2068
2124
|
degenSizeUsd: BN;
|
|
2125
|
+
referencePrice: {
|
|
2126
|
+
price: BN;
|
|
2127
|
+
exponent: number;
|
|
2128
|
+
};
|
|
2069
2129
|
sizeDecimals: number;
|
|
2070
2130
|
lockedDecimals: number;
|
|
2071
2131
|
collateralDecimals: number;
|
|
2072
2132
|
key: PublicKey;
|
|
2073
2133
|
feeAmount: BN;
|
|
2134
|
+
allowPayout: boolean;
|
|
2135
|
+
availableUsd: BN;
|
|
2136
|
+
availableAmount: BN;
|
|
2074
2137
|
refererTokenStakeAccount: PublicKey;
|
|
2075
2138
|
refererBoosterAccount: PublicKey;
|
|
2076
2139
|
level: number;
|
|
@@ -2084,6 +2147,7 @@ export declare class PerpetualsClient {
|
|
|
2084
2147
|
rewardTokens: BN;
|
|
2085
2148
|
unclaimedRevenueAmount: BN;
|
|
2086
2149
|
revenueSnapshot: BN;
|
|
2150
|
+
claimableRebateUsd: BN;
|
|
2087
2151
|
tokenMint: PublicKey;
|
|
2088
2152
|
tokenVaultTokenAccount: PublicKey;
|
|
2089
2153
|
tokenPermissions: {
|
|
@@ -2166,7 +2230,7 @@ export declare class PerpetualsClient {
|
|
|
2166
2230
|
maxUtilization: number;
|
|
2167
2231
|
degenPositionFactor: number;
|
|
2168
2232
|
degenExposureFactor: number;
|
|
2169
|
-
|
|
2233
|
+
maxPositionSizeUsd: BN;
|
|
2170
2234
|
maxExposureUsd: BN;
|
|
2171
2235
|
};
|
|
2172
2236
|
permissions: {
|
|
@@ -2259,7 +2323,7 @@ export declare class PerpetualsClient {
|
|
|
2259
2323
|
reservedAmount: BN;
|
|
2260
2324
|
minReserveUsd: BN;
|
|
2261
2325
|
limitPriceBufferBps: BN;
|
|
2262
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
2326
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2263
2327
|
owner: PublicKey;
|
|
2264
2328
|
stakeStats: {
|
|
2265
2329
|
pendingActivation: BN;
|
|
@@ -2293,7 +2357,7 @@ export declare class PerpetualsClient {
|
|
|
2293
2357
|
lockedAmount: BN;
|
|
2294
2358
|
lockedUsd: BN;
|
|
2295
2359
|
collateralAmount: BN;
|
|
2296
|
-
|
|
2360
|
+
collateralLiabilityUsd: BN;
|
|
2297
2361
|
unsettledFeeUsd: BN;
|
|
2298
2362
|
cumulativeLockFeeSnapshot: BN;
|
|
2299
2363
|
sizeDecimals: number;
|
|
@@ -2302,7 +2366,7 @@ export declare class PerpetualsClient {
|
|
|
2302
2366
|
};
|
|
2303
2367
|
targetCustodyUid: number;
|
|
2304
2368
|
collateralCustodyUid: number;
|
|
2305
|
-
padding2: number[] | BN[]
|
|
2369
|
+
padding2: number[] | BN[];
|
|
2306
2370
|
numSigners: number;
|
|
2307
2371
|
numSigned: number;
|
|
2308
2372
|
minSignatures: number;
|
|
@@ -2359,7 +2423,7 @@ export declare class PerpetualsClient {
|
|
|
2359
2423
|
}[];
|
|
2360
2424
|
markets: PublicKey[];
|
|
2361
2425
|
maxAumUsd: BN;
|
|
2362
|
-
buffer: BN;
|
|
2426
|
+
buffer: number | BN;
|
|
2363
2427
|
rawAumUsd: BN;
|
|
2364
2428
|
equityUsd: BN;
|
|
2365
2429
|
totalStaked: {
|
|
@@ -2390,6 +2454,9 @@ export declare class PerpetualsClient {
|
|
|
2390
2454
|
lpPrice: BN;
|
|
2391
2455
|
compoundingLpPrice: BN;
|
|
2392
2456
|
lastUpdatedTimestamp: BN;
|
|
2457
|
+
feesObligationUsd: BN;
|
|
2458
|
+
rebateObligationUsd: BN;
|
|
2459
|
+
thresholdUsd: BN;
|
|
2393
2460
|
delegate: PublicKey;
|
|
2394
2461
|
openTime: BN;
|
|
2395
2462
|
updateTime: BN;
|
|
@@ -2403,15 +2470,22 @@ export declare class PerpetualsClient {
|
|
|
2403
2470
|
lockedUsd: BN;
|
|
2404
2471
|
collateralAmount: BN;
|
|
2405
2472
|
collateralUsd: BN;
|
|
2406
|
-
|
|
2473
|
+
unsettledValueUsd: BN;
|
|
2407
2474
|
unsettledFeesUsd: BN;
|
|
2408
2475
|
cumulativeLockFeeSnapshot: BN;
|
|
2409
2476
|
degenSizeUsd: BN;
|
|
2477
|
+
referencePrice: {
|
|
2478
|
+
price: BN;
|
|
2479
|
+
exponent: number;
|
|
2480
|
+
};
|
|
2410
2481
|
sizeDecimals: number;
|
|
2411
2482
|
lockedDecimals: number;
|
|
2412
2483
|
collateralDecimals: number;
|
|
2413
2484
|
key: PublicKey;
|
|
2414
2485
|
feeAmount: BN;
|
|
2486
|
+
allowPayout: boolean;
|
|
2487
|
+
availableUsd: BN;
|
|
2488
|
+
availableAmount: BN;
|
|
2415
2489
|
refererTokenStakeAccount: PublicKey;
|
|
2416
2490
|
refererBoosterAccount: PublicKey;
|
|
2417
2491
|
level: number;
|
|
@@ -2425,6 +2499,7 @@ export declare class PerpetualsClient {
|
|
|
2425
2499
|
rewardTokens: BN;
|
|
2426
2500
|
unclaimedRevenueAmount: BN;
|
|
2427
2501
|
revenueSnapshot: BN;
|
|
2502
|
+
claimableRebateUsd: BN;
|
|
2428
2503
|
tokenMint: PublicKey;
|
|
2429
2504
|
tokenVaultTokenAccount: PublicKey;
|
|
2430
2505
|
tokenPermissions: {
|
|
@@ -2507,7 +2582,7 @@ export declare class PerpetualsClient {
|
|
|
2507
2582
|
maxUtilization: number;
|
|
2508
2583
|
degenPositionFactor: number;
|
|
2509
2584
|
degenExposureFactor: number;
|
|
2510
|
-
|
|
2585
|
+
maxPositionSizeUsd: BN;
|
|
2511
2586
|
maxExposureUsd: BN;
|
|
2512
2587
|
};
|
|
2513
2588
|
permissions: {
|
|
@@ -2600,7 +2675,7 @@ export declare class PerpetualsClient {
|
|
|
2600
2675
|
reservedAmount: BN;
|
|
2601
2676
|
minReserveUsd: BN;
|
|
2602
2677
|
limitPriceBufferBps: BN;
|
|
2603
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
2678
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2604
2679
|
owner: PublicKey;
|
|
2605
2680
|
stakeStats: {
|
|
2606
2681
|
pendingActivation: BN;
|
|
@@ -2634,7 +2709,7 @@ export declare class PerpetualsClient {
|
|
|
2634
2709
|
lockedAmount: BN;
|
|
2635
2710
|
lockedUsd: BN;
|
|
2636
2711
|
collateralAmount: BN;
|
|
2637
|
-
|
|
2712
|
+
collateralLiabilityUsd: BN;
|
|
2638
2713
|
unsettledFeeUsd: BN;
|
|
2639
2714
|
cumulativeLockFeeSnapshot: BN;
|
|
2640
2715
|
sizeDecimals: number;
|
|
@@ -2643,7 +2718,7 @@ export declare class PerpetualsClient {
|
|
|
2643
2718
|
};
|
|
2644
2719
|
targetCustodyUid: number;
|
|
2645
2720
|
collateralCustodyUid: number;
|
|
2646
|
-
padding2: number[] | BN[]
|
|
2721
|
+
padding2: number[] | BN[];
|
|
2647
2722
|
numSigners: number;
|
|
2648
2723
|
numSigned: number;
|
|
2649
2724
|
minSignatures: number;
|
|
@@ -2700,7 +2775,7 @@ export declare class PerpetualsClient {
|
|
|
2700
2775
|
}[];
|
|
2701
2776
|
markets: PublicKey[];
|
|
2702
2777
|
maxAumUsd: BN;
|
|
2703
|
-
buffer: BN;
|
|
2778
|
+
buffer: number | BN;
|
|
2704
2779
|
rawAumUsd: BN;
|
|
2705
2780
|
equityUsd: BN;
|
|
2706
2781
|
totalStaked: {
|
|
@@ -2731,6 +2806,9 @@ export declare class PerpetualsClient {
|
|
|
2731
2806
|
lpPrice: BN;
|
|
2732
2807
|
compoundingLpPrice: BN;
|
|
2733
2808
|
lastUpdatedTimestamp: BN;
|
|
2809
|
+
feesObligationUsd: BN;
|
|
2810
|
+
rebateObligationUsd: BN;
|
|
2811
|
+
thresholdUsd: BN;
|
|
2734
2812
|
delegate: PublicKey;
|
|
2735
2813
|
openTime: BN;
|
|
2736
2814
|
updateTime: BN;
|
|
@@ -2744,15 +2822,22 @@ export declare class PerpetualsClient {
|
|
|
2744
2822
|
lockedUsd: BN;
|
|
2745
2823
|
collateralAmount: BN;
|
|
2746
2824
|
collateralUsd: BN;
|
|
2747
|
-
|
|
2825
|
+
unsettledValueUsd: BN;
|
|
2748
2826
|
unsettledFeesUsd: BN;
|
|
2749
2827
|
cumulativeLockFeeSnapshot: BN;
|
|
2750
2828
|
degenSizeUsd: BN;
|
|
2829
|
+
referencePrice: {
|
|
2830
|
+
price: BN;
|
|
2831
|
+
exponent: number;
|
|
2832
|
+
};
|
|
2751
2833
|
sizeDecimals: number;
|
|
2752
2834
|
lockedDecimals: number;
|
|
2753
2835
|
collateralDecimals: number;
|
|
2754
2836
|
key: PublicKey;
|
|
2755
2837
|
feeAmount: BN;
|
|
2838
|
+
allowPayout: boolean;
|
|
2839
|
+
availableUsd: BN;
|
|
2840
|
+
availableAmount: BN;
|
|
2756
2841
|
refererTokenStakeAccount: PublicKey;
|
|
2757
2842
|
refererBoosterAccount: PublicKey;
|
|
2758
2843
|
level: number;
|
|
@@ -2766,6 +2851,7 @@ export declare class PerpetualsClient {
|
|
|
2766
2851
|
rewardTokens: BN;
|
|
2767
2852
|
unclaimedRevenueAmount: BN;
|
|
2768
2853
|
revenueSnapshot: BN;
|
|
2854
|
+
claimableRebateUsd: BN;
|
|
2769
2855
|
tokenMint: PublicKey;
|
|
2770
2856
|
tokenVaultTokenAccount: PublicKey;
|
|
2771
2857
|
tokenPermissions: {
|
|
@@ -2826,11 +2912,15 @@ export declare class PerpetualsClient {
|
|
|
2826
2912
|
lockedUsd: BN;
|
|
2827
2913
|
collateralAmount: BN;
|
|
2828
2914
|
collateralUsd: BN;
|
|
2829
|
-
|
|
2915
|
+
unsettledValueUsd: BN;
|
|
2830
2916
|
unsettledFeesUsd: BN;
|
|
2831
2917
|
cumulativeLockFeeSnapshot: BN;
|
|
2832
2918
|
degenSizeUsd: BN;
|
|
2833
|
-
|
|
2919
|
+
referencePrice: {
|
|
2920
|
+
price: BN;
|
|
2921
|
+
exponent: number;
|
|
2922
|
+
};
|
|
2923
|
+
buffer: number;
|
|
2834
2924
|
sizeDecimals: number;
|
|
2835
2925
|
lockedDecimals: number;
|
|
2836
2926
|
collateralDecimals: number;
|
|
@@ -2895,7 +2985,7 @@ export declare class PerpetualsClient {
|
|
|
2895
2985
|
maxUtilization: number;
|
|
2896
2986
|
degenPositionFactor: number;
|
|
2897
2987
|
degenExposureFactor: number;
|
|
2898
|
-
|
|
2988
|
+
maxPositionSizeUsd: BN;
|
|
2899
2989
|
maxExposureUsd: BN;
|
|
2900
2990
|
};
|
|
2901
2991
|
permissions: {
|
|
@@ -2988,7 +3078,7 @@ export declare class PerpetualsClient {
|
|
|
2988
3078
|
reservedAmount: BN;
|
|
2989
3079
|
minReserveUsd: BN;
|
|
2990
3080
|
limitPriceBufferBps: BN;
|
|
2991
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3081
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2992
3082
|
owner: PublicKey;
|
|
2993
3083
|
stakeStats: {
|
|
2994
3084
|
pendingActivation: BN;
|
|
@@ -3022,7 +3112,7 @@ export declare class PerpetualsClient {
|
|
|
3022
3112
|
lockedAmount: BN;
|
|
3023
3113
|
lockedUsd: BN;
|
|
3024
3114
|
collateralAmount: BN;
|
|
3025
|
-
|
|
3115
|
+
collateralLiabilityUsd: BN;
|
|
3026
3116
|
unsettledFeeUsd: BN;
|
|
3027
3117
|
cumulativeLockFeeSnapshot: BN;
|
|
3028
3118
|
sizeDecimals: number;
|
|
@@ -3031,7 +3121,7 @@ export declare class PerpetualsClient {
|
|
|
3031
3121
|
};
|
|
3032
3122
|
targetCustodyUid: number;
|
|
3033
3123
|
collateralCustodyUid: number;
|
|
3034
|
-
padding2: number[] | BN[]
|
|
3124
|
+
padding2: number[] | BN[];
|
|
3035
3125
|
numSigners: number;
|
|
3036
3126
|
numSigned: number;
|
|
3037
3127
|
minSignatures: number;
|
|
@@ -3088,7 +3178,7 @@ export declare class PerpetualsClient {
|
|
|
3088
3178
|
}[];
|
|
3089
3179
|
markets: PublicKey[];
|
|
3090
3180
|
maxAumUsd: BN;
|
|
3091
|
-
buffer: BN;
|
|
3181
|
+
buffer: number | BN;
|
|
3092
3182
|
rawAumUsd: BN;
|
|
3093
3183
|
equityUsd: BN;
|
|
3094
3184
|
totalStaked: {
|
|
@@ -3119,6 +3209,9 @@ export declare class PerpetualsClient {
|
|
|
3119
3209
|
lpPrice: BN;
|
|
3120
3210
|
compoundingLpPrice: BN;
|
|
3121
3211
|
lastUpdatedTimestamp: BN;
|
|
3212
|
+
feesObligationUsd: BN;
|
|
3213
|
+
rebateObligationUsd: BN;
|
|
3214
|
+
thresholdUsd: BN;
|
|
3122
3215
|
delegate: PublicKey;
|
|
3123
3216
|
openTime: BN;
|
|
3124
3217
|
updateTime: BN;
|
|
@@ -3132,15 +3225,22 @@ export declare class PerpetualsClient {
|
|
|
3132
3225
|
lockedUsd: BN;
|
|
3133
3226
|
collateralAmount: BN;
|
|
3134
3227
|
collateralUsd: BN;
|
|
3135
|
-
|
|
3228
|
+
unsettledValueUsd: BN;
|
|
3136
3229
|
unsettledFeesUsd: BN;
|
|
3137
3230
|
cumulativeLockFeeSnapshot: BN;
|
|
3138
3231
|
degenSizeUsd: BN;
|
|
3232
|
+
referencePrice: {
|
|
3233
|
+
price: BN;
|
|
3234
|
+
exponent: number;
|
|
3235
|
+
};
|
|
3139
3236
|
sizeDecimals: number;
|
|
3140
3237
|
lockedDecimals: number;
|
|
3141
3238
|
collateralDecimals: number;
|
|
3142
3239
|
key: PublicKey;
|
|
3143
3240
|
feeAmount: BN;
|
|
3241
|
+
allowPayout: boolean;
|
|
3242
|
+
availableUsd: BN;
|
|
3243
|
+
availableAmount: BN;
|
|
3144
3244
|
refererTokenStakeAccount: PublicKey;
|
|
3145
3245
|
refererBoosterAccount: PublicKey;
|
|
3146
3246
|
level: number;
|
|
@@ -3154,6 +3254,7 @@ export declare class PerpetualsClient {
|
|
|
3154
3254
|
rewardTokens: BN;
|
|
3155
3255
|
unclaimedRevenueAmount: BN;
|
|
3156
3256
|
revenueSnapshot: BN;
|
|
3257
|
+
claimableRebateUsd: BN;
|
|
3157
3258
|
tokenMint: PublicKey;
|
|
3158
3259
|
tokenVaultTokenAccount: PublicKey;
|
|
3159
3260
|
tokenPermissions: {
|
|
@@ -3236,7 +3337,7 @@ export declare class PerpetualsClient {
|
|
|
3236
3337
|
maxUtilization: number;
|
|
3237
3338
|
degenPositionFactor: number;
|
|
3238
3339
|
degenExposureFactor: number;
|
|
3239
|
-
|
|
3340
|
+
maxPositionSizeUsd: BN;
|
|
3240
3341
|
maxExposureUsd: BN;
|
|
3241
3342
|
};
|
|
3242
3343
|
permissions: {
|
|
@@ -3329,7 +3430,7 @@ export declare class PerpetualsClient {
|
|
|
3329
3430
|
reservedAmount: BN;
|
|
3330
3431
|
minReserveUsd: BN;
|
|
3331
3432
|
limitPriceBufferBps: BN;
|
|
3332
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3433
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3333
3434
|
owner: PublicKey;
|
|
3334
3435
|
stakeStats: {
|
|
3335
3436
|
pendingActivation: BN;
|
|
@@ -3363,7 +3464,7 @@ export declare class PerpetualsClient {
|
|
|
3363
3464
|
lockedAmount: BN;
|
|
3364
3465
|
lockedUsd: BN;
|
|
3365
3466
|
collateralAmount: BN;
|
|
3366
|
-
|
|
3467
|
+
collateralLiabilityUsd: BN;
|
|
3367
3468
|
unsettledFeeUsd: BN;
|
|
3368
3469
|
cumulativeLockFeeSnapshot: BN;
|
|
3369
3470
|
sizeDecimals: number;
|
|
@@ -3372,7 +3473,7 @@ export declare class PerpetualsClient {
|
|
|
3372
3473
|
};
|
|
3373
3474
|
targetCustodyUid: number;
|
|
3374
3475
|
collateralCustodyUid: number;
|
|
3375
|
-
padding2: number[] | BN[]
|
|
3476
|
+
padding2: number[] | BN[];
|
|
3376
3477
|
numSigners: number;
|
|
3377
3478
|
numSigned: number;
|
|
3378
3479
|
minSignatures: number;
|
|
@@ -3429,7 +3530,7 @@ export declare class PerpetualsClient {
|
|
|
3429
3530
|
}[];
|
|
3430
3531
|
markets: PublicKey[];
|
|
3431
3532
|
maxAumUsd: BN;
|
|
3432
|
-
buffer: BN;
|
|
3533
|
+
buffer: number | BN;
|
|
3433
3534
|
rawAumUsd: BN;
|
|
3434
3535
|
equityUsd: BN;
|
|
3435
3536
|
totalStaked: {
|
|
@@ -3460,6 +3561,9 @@ export declare class PerpetualsClient {
|
|
|
3460
3561
|
lpPrice: BN;
|
|
3461
3562
|
compoundingLpPrice: BN;
|
|
3462
3563
|
lastUpdatedTimestamp: BN;
|
|
3564
|
+
feesObligationUsd: BN;
|
|
3565
|
+
rebateObligationUsd: BN;
|
|
3566
|
+
thresholdUsd: BN;
|
|
3463
3567
|
delegate: PublicKey;
|
|
3464
3568
|
openTime: BN;
|
|
3465
3569
|
updateTime: BN;
|
|
@@ -3473,15 +3577,22 @@ export declare class PerpetualsClient {
|
|
|
3473
3577
|
lockedUsd: BN;
|
|
3474
3578
|
collateralAmount: BN;
|
|
3475
3579
|
collateralUsd: BN;
|
|
3476
|
-
|
|
3580
|
+
unsettledValueUsd: BN;
|
|
3477
3581
|
unsettledFeesUsd: BN;
|
|
3478
3582
|
cumulativeLockFeeSnapshot: BN;
|
|
3479
3583
|
degenSizeUsd: BN;
|
|
3584
|
+
referencePrice: {
|
|
3585
|
+
price: BN;
|
|
3586
|
+
exponent: number;
|
|
3587
|
+
};
|
|
3480
3588
|
sizeDecimals: number;
|
|
3481
3589
|
lockedDecimals: number;
|
|
3482
3590
|
collateralDecimals: number;
|
|
3483
3591
|
key: PublicKey;
|
|
3484
3592
|
feeAmount: BN;
|
|
3593
|
+
allowPayout: boolean;
|
|
3594
|
+
availableUsd: BN;
|
|
3595
|
+
availableAmount: BN;
|
|
3485
3596
|
refererTokenStakeAccount: PublicKey;
|
|
3486
3597
|
refererBoosterAccount: PublicKey;
|
|
3487
3598
|
level: number;
|
|
@@ -3495,6 +3606,7 @@ export declare class PerpetualsClient {
|
|
|
3495
3606
|
rewardTokens: BN;
|
|
3496
3607
|
unclaimedRevenueAmount: BN;
|
|
3497
3608
|
revenueSnapshot: BN;
|
|
3609
|
+
claimableRebateUsd: BN;
|
|
3498
3610
|
tokenMint: PublicKey;
|
|
3499
3611
|
tokenVaultTokenAccount: PublicKey;
|
|
3500
3612
|
tokenPermissions: {
|
|
@@ -3577,7 +3689,7 @@ export declare class PerpetualsClient {
|
|
|
3577
3689
|
maxUtilization: number;
|
|
3578
3690
|
degenPositionFactor: number;
|
|
3579
3691
|
degenExposureFactor: number;
|
|
3580
|
-
|
|
3692
|
+
maxPositionSizeUsd: BN;
|
|
3581
3693
|
maxExposureUsd: BN;
|
|
3582
3694
|
};
|
|
3583
3695
|
permissions: {
|
|
@@ -3670,7 +3782,7 @@ export declare class PerpetualsClient {
|
|
|
3670
3782
|
reservedAmount: BN;
|
|
3671
3783
|
minReserveUsd: BN;
|
|
3672
3784
|
limitPriceBufferBps: BN;
|
|
3673
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3785
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3674
3786
|
owner: PublicKey;
|
|
3675
3787
|
stakeStats: {
|
|
3676
3788
|
pendingActivation: BN;
|
|
@@ -3704,7 +3816,7 @@ export declare class PerpetualsClient {
|
|
|
3704
3816
|
lockedAmount: BN;
|
|
3705
3817
|
lockedUsd: BN;
|
|
3706
3818
|
collateralAmount: BN;
|
|
3707
|
-
|
|
3819
|
+
collateralLiabilityUsd: BN;
|
|
3708
3820
|
unsettledFeeUsd: BN;
|
|
3709
3821
|
cumulativeLockFeeSnapshot: BN;
|
|
3710
3822
|
sizeDecimals: number;
|
|
@@ -3713,7 +3825,7 @@ export declare class PerpetualsClient {
|
|
|
3713
3825
|
};
|
|
3714
3826
|
targetCustodyUid: number;
|
|
3715
3827
|
collateralCustodyUid: number;
|
|
3716
|
-
padding2: number[] | BN[]
|
|
3828
|
+
padding2: number[] | BN[];
|
|
3717
3829
|
numSigners: number;
|
|
3718
3830
|
numSigned: number;
|
|
3719
3831
|
minSignatures: number;
|
|
@@ -3770,7 +3882,7 @@ export declare class PerpetualsClient {
|
|
|
3770
3882
|
}[];
|
|
3771
3883
|
markets: PublicKey[];
|
|
3772
3884
|
maxAumUsd: BN;
|
|
3773
|
-
buffer: BN;
|
|
3885
|
+
buffer: number | BN;
|
|
3774
3886
|
rawAumUsd: BN;
|
|
3775
3887
|
equityUsd: BN;
|
|
3776
3888
|
totalStaked: {
|
|
@@ -3801,6 +3913,9 @@ export declare class PerpetualsClient {
|
|
|
3801
3913
|
lpPrice: BN;
|
|
3802
3914
|
compoundingLpPrice: BN;
|
|
3803
3915
|
lastUpdatedTimestamp: BN;
|
|
3916
|
+
feesObligationUsd: BN;
|
|
3917
|
+
rebateObligationUsd: BN;
|
|
3918
|
+
thresholdUsd: BN;
|
|
3804
3919
|
delegate: PublicKey;
|
|
3805
3920
|
openTime: BN;
|
|
3806
3921
|
updateTime: BN;
|
|
@@ -3814,15 +3929,22 @@ export declare class PerpetualsClient {
|
|
|
3814
3929
|
lockedUsd: BN;
|
|
3815
3930
|
collateralAmount: BN;
|
|
3816
3931
|
collateralUsd: BN;
|
|
3817
|
-
|
|
3932
|
+
unsettledValueUsd: BN;
|
|
3818
3933
|
unsettledFeesUsd: BN;
|
|
3819
3934
|
cumulativeLockFeeSnapshot: BN;
|
|
3820
3935
|
degenSizeUsd: BN;
|
|
3936
|
+
referencePrice: {
|
|
3937
|
+
price: BN;
|
|
3938
|
+
exponent: number;
|
|
3939
|
+
};
|
|
3821
3940
|
sizeDecimals: number;
|
|
3822
3941
|
lockedDecimals: number;
|
|
3823
3942
|
collateralDecimals: number;
|
|
3824
3943
|
key: PublicKey;
|
|
3825
3944
|
feeAmount: BN;
|
|
3945
|
+
allowPayout: boolean;
|
|
3946
|
+
availableUsd: BN;
|
|
3947
|
+
availableAmount: BN;
|
|
3826
3948
|
refererTokenStakeAccount: PublicKey;
|
|
3827
3949
|
refererBoosterAccount: PublicKey;
|
|
3828
3950
|
level: number;
|
|
@@ -3836,6 +3958,7 @@ export declare class PerpetualsClient {
|
|
|
3836
3958
|
rewardTokens: BN;
|
|
3837
3959
|
unclaimedRevenueAmount: BN;
|
|
3838
3960
|
revenueSnapshot: BN;
|
|
3961
|
+
claimableRebateUsd: BN;
|
|
3839
3962
|
tokenMint: PublicKey;
|
|
3840
3963
|
tokenVaultTokenAccount: PublicKey;
|
|
3841
3964
|
tokenPermissions: {
|
|
@@ -3918,7 +4041,7 @@ export declare class PerpetualsClient {
|
|
|
3918
4041
|
maxUtilization: number;
|
|
3919
4042
|
degenPositionFactor: number;
|
|
3920
4043
|
degenExposureFactor: number;
|
|
3921
|
-
|
|
4044
|
+
maxPositionSizeUsd: BN;
|
|
3922
4045
|
maxExposureUsd: BN;
|
|
3923
4046
|
};
|
|
3924
4047
|
permissions: {
|
|
@@ -4011,7 +4134,7 @@ export declare class PerpetualsClient {
|
|
|
4011
4134
|
reservedAmount: BN;
|
|
4012
4135
|
minReserveUsd: BN;
|
|
4013
4136
|
limitPriceBufferBps: BN;
|
|
4014
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
4137
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4015
4138
|
owner: PublicKey;
|
|
4016
4139
|
stakeStats: {
|
|
4017
4140
|
pendingActivation: BN;
|
|
@@ -4045,7 +4168,7 @@ export declare class PerpetualsClient {
|
|
|
4045
4168
|
lockedAmount: BN;
|
|
4046
4169
|
lockedUsd: BN;
|
|
4047
4170
|
collateralAmount: BN;
|
|
4048
|
-
|
|
4171
|
+
collateralLiabilityUsd: BN;
|
|
4049
4172
|
unsettledFeeUsd: BN;
|
|
4050
4173
|
cumulativeLockFeeSnapshot: BN;
|
|
4051
4174
|
sizeDecimals: number;
|
|
@@ -4054,7 +4177,7 @@ export declare class PerpetualsClient {
|
|
|
4054
4177
|
};
|
|
4055
4178
|
targetCustodyUid: number;
|
|
4056
4179
|
collateralCustodyUid: number;
|
|
4057
|
-
padding2: number[] | BN[]
|
|
4180
|
+
padding2: number[] | BN[];
|
|
4058
4181
|
numSigners: number;
|
|
4059
4182
|
numSigned: number;
|
|
4060
4183
|
minSignatures: number;
|
|
@@ -4111,7 +4234,7 @@ export declare class PerpetualsClient {
|
|
|
4111
4234
|
}[];
|
|
4112
4235
|
markets: PublicKey[];
|
|
4113
4236
|
maxAumUsd: BN;
|
|
4114
|
-
buffer: BN;
|
|
4237
|
+
buffer: number | BN;
|
|
4115
4238
|
rawAumUsd: BN;
|
|
4116
4239
|
equityUsd: BN;
|
|
4117
4240
|
totalStaked: {
|
|
@@ -4142,6 +4265,9 @@ export declare class PerpetualsClient {
|
|
|
4142
4265
|
lpPrice: BN;
|
|
4143
4266
|
compoundingLpPrice: BN;
|
|
4144
4267
|
lastUpdatedTimestamp: BN;
|
|
4268
|
+
feesObligationUsd: BN;
|
|
4269
|
+
rebateObligationUsd: BN;
|
|
4270
|
+
thresholdUsd: BN;
|
|
4145
4271
|
delegate: PublicKey;
|
|
4146
4272
|
openTime: BN;
|
|
4147
4273
|
updateTime: BN;
|
|
@@ -4155,15 +4281,22 @@ export declare class PerpetualsClient {
|
|
|
4155
4281
|
lockedUsd: BN;
|
|
4156
4282
|
collateralAmount: BN;
|
|
4157
4283
|
collateralUsd: BN;
|
|
4158
|
-
|
|
4284
|
+
unsettledValueUsd: BN;
|
|
4159
4285
|
unsettledFeesUsd: BN;
|
|
4160
4286
|
cumulativeLockFeeSnapshot: BN;
|
|
4161
4287
|
degenSizeUsd: BN;
|
|
4288
|
+
referencePrice: {
|
|
4289
|
+
price: BN;
|
|
4290
|
+
exponent: number;
|
|
4291
|
+
};
|
|
4162
4292
|
sizeDecimals: number;
|
|
4163
4293
|
lockedDecimals: number;
|
|
4164
4294
|
collateralDecimals: number;
|
|
4165
4295
|
key: PublicKey;
|
|
4166
4296
|
feeAmount: BN;
|
|
4297
|
+
allowPayout: boolean;
|
|
4298
|
+
availableUsd: BN;
|
|
4299
|
+
availableAmount: BN;
|
|
4167
4300
|
refererTokenStakeAccount: PublicKey;
|
|
4168
4301
|
refererBoosterAccount: PublicKey;
|
|
4169
4302
|
level: number;
|
|
@@ -4177,6 +4310,7 @@ export declare class PerpetualsClient {
|
|
|
4177
4310
|
rewardTokens: BN;
|
|
4178
4311
|
unclaimedRevenueAmount: BN;
|
|
4179
4312
|
revenueSnapshot: BN;
|
|
4313
|
+
claimableRebateUsd: BN;
|
|
4180
4314
|
tokenMint: PublicKey;
|
|
4181
4315
|
tokenVaultTokenAccount: PublicKey;
|
|
4182
4316
|
tokenPermissions: {
|
|
@@ -4259,7 +4393,7 @@ export declare class PerpetualsClient {
|
|
|
4259
4393
|
maxUtilization: number;
|
|
4260
4394
|
degenPositionFactor: number;
|
|
4261
4395
|
degenExposureFactor: number;
|
|
4262
|
-
|
|
4396
|
+
maxPositionSizeUsd: BN;
|
|
4263
4397
|
maxExposureUsd: BN;
|
|
4264
4398
|
};
|
|
4265
4399
|
permissions: {
|
|
@@ -4352,7 +4486,7 @@ export declare class PerpetualsClient {
|
|
|
4352
4486
|
reservedAmount: BN;
|
|
4353
4487
|
minReserveUsd: BN;
|
|
4354
4488
|
limitPriceBufferBps: BN;
|
|
4355
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
4489
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4356
4490
|
owner: PublicKey;
|
|
4357
4491
|
stakeStats: {
|
|
4358
4492
|
pendingActivation: BN;
|
|
@@ -4386,7 +4520,7 @@ export declare class PerpetualsClient {
|
|
|
4386
4520
|
lockedAmount: BN;
|
|
4387
4521
|
lockedUsd: BN;
|
|
4388
4522
|
collateralAmount: BN;
|
|
4389
|
-
|
|
4523
|
+
collateralLiabilityUsd: BN;
|
|
4390
4524
|
unsettledFeeUsd: BN;
|
|
4391
4525
|
cumulativeLockFeeSnapshot: BN;
|
|
4392
4526
|
sizeDecimals: number;
|
|
@@ -4395,7 +4529,7 @@ export declare class PerpetualsClient {
|
|
|
4395
4529
|
};
|
|
4396
4530
|
targetCustodyUid: number;
|
|
4397
4531
|
collateralCustodyUid: number;
|
|
4398
|
-
padding2: number[] | BN[]
|
|
4532
|
+
padding2: number[] | BN[];
|
|
4399
4533
|
numSigners: number;
|
|
4400
4534
|
numSigned: number;
|
|
4401
4535
|
minSignatures: number;
|
|
@@ -4452,7 +4586,7 @@ export declare class PerpetualsClient {
|
|
|
4452
4586
|
}[];
|
|
4453
4587
|
markets: PublicKey[];
|
|
4454
4588
|
maxAumUsd: BN;
|
|
4455
|
-
buffer: BN;
|
|
4589
|
+
buffer: number | BN;
|
|
4456
4590
|
rawAumUsd: BN;
|
|
4457
4591
|
equityUsd: BN;
|
|
4458
4592
|
totalStaked: {
|
|
@@ -4483,6 +4617,9 @@ export declare class PerpetualsClient {
|
|
|
4483
4617
|
lpPrice: BN;
|
|
4484
4618
|
compoundingLpPrice: BN;
|
|
4485
4619
|
lastUpdatedTimestamp: BN;
|
|
4620
|
+
feesObligationUsd: BN;
|
|
4621
|
+
rebateObligationUsd: BN;
|
|
4622
|
+
thresholdUsd: BN;
|
|
4486
4623
|
delegate: PublicKey;
|
|
4487
4624
|
openTime: BN;
|
|
4488
4625
|
updateTime: BN;
|
|
@@ -4496,15 +4633,22 @@ export declare class PerpetualsClient {
|
|
|
4496
4633
|
lockedUsd: BN;
|
|
4497
4634
|
collateralAmount: BN;
|
|
4498
4635
|
collateralUsd: BN;
|
|
4499
|
-
|
|
4636
|
+
unsettledValueUsd: BN;
|
|
4500
4637
|
unsettledFeesUsd: BN;
|
|
4501
4638
|
cumulativeLockFeeSnapshot: BN;
|
|
4502
4639
|
degenSizeUsd: BN;
|
|
4640
|
+
referencePrice: {
|
|
4641
|
+
price: BN;
|
|
4642
|
+
exponent: number;
|
|
4643
|
+
};
|
|
4503
4644
|
sizeDecimals: number;
|
|
4504
4645
|
lockedDecimals: number;
|
|
4505
4646
|
collateralDecimals: number;
|
|
4506
4647
|
key: PublicKey;
|
|
4507
4648
|
feeAmount: BN;
|
|
4649
|
+
allowPayout: boolean;
|
|
4650
|
+
availableUsd: BN;
|
|
4651
|
+
availableAmount: BN;
|
|
4508
4652
|
refererTokenStakeAccount: PublicKey;
|
|
4509
4653
|
refererBoosterAccount: PublicKey;
|
|
4510
4654
|
level: number;
|
|
@@ -4518,6 +4662,7 @@ export declare class PerpetualsClient {
|
|
|
4518
4662
|
rewardTokens: BN;
|
|
4519
4663
|
unclaimedRevenueAmount: BN;
|
|
4520
4664
|
revenueSnapshot: BN;
|
|
4665
|
+
claimableRebateUsd: BN;
|
|
4521
4666
|
tokenMint: PublicKey;
|
|
4522
4667
|
tokenVaultTokenAccount: PublicKey;
|
|
4523
4668
|
tokenPermissions: {
|
|
@@ -4581,9 +4726,9 @@ export declare class PerpetualsClient {
|
|
|
4581
4726
|
getMinAndMaxPriceSync: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount) => MinAndMaxPrice;
|
|
4582
4727
|
checkIfPriceStaleOrCustom: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount, timestampInSeconds: BN) => boolean;
|
|
4583
4728
|
getAveragePriceSync: (price1: BN, size1: BN, price2: BN, size2: BN) => BN;
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
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;
|
|
4587
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;
|
|
4588
4733
|
getEntryPriceUsdSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
|
4589
4734
|
getPriceAfterSlippage(isEntry: boolean, slippageBps: BN, targetPrice: OraclePrice, side: Side): ContractOraclePrice;
|
|
@@ -4594,29 +4739,37 @@ export declare class PerpetualsClient {
|
|
|
4594
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;
|
|
4595
4740
|
getTradeSpread: (targetCustodyAccount: CustodyAccount, sizeUsd: BN) => BN;
|
|
4596
4741
|
getExitOraclePriceSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
|
4597
|
-
getExitOraclePriceWithoutSpreadSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
|
4598
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;
|
|
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,
|
|
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;
|
|
4600
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;
|
|
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,
|
|
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) => {
|
|
4604
4748
|
maxWithdrawableAmount: BN;
|
|
4605
|
-
|
|
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;
|
|
4606
4759
|
};
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
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;
|
|
4610
4763
|
};
|
|
4611
|
-
getMaxWithdrawableAmountSync: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => BN;
|
|
4612
4764
|
getCumulativeLockFeeSync: (custodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
|
4613
4765
|
getBorrowRateSync: (custodyAccount: CustodyAccount, currentUtilization: BN) => BN;
|
|
4614
4766
|
getLockFeeAndUnsettledUsdForPosition: (position: PositionAccount, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
|
4615
|
-
getLockedUsd: (
|
|
4616
|
-
|
|
4617
|
-
|
|
4618
|
-
|
|
4619
|
-
|
|
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) => {
|
|
4620
4773
|
pnlUsd: BN;
|
|
4621
4774
|
pnlPercentage: BN;
|
|
4622
4775
|
};
|
|
@@ -4626,6 +4779,10 @@ export declare class PerpetualsClient {
|
|
|
4626
4779
|
profitUsd: BN;
|
|
4627
4780
|
lossUsd: BN;
|
|
4628
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
|
+
};
|
|
4629
4786
|
getSwapAmountAndFeesSync: (amountIn: BN, amountOut: BN, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, outputTokenPrice: OraclePrice, outputTokenEmaPrice: OraclePrice, outputTokenCustodyAccount: CustodyAccount, poolAumUsdMax: BN, poolConfig: PoolConfig) => {
|
|
4630
4787
|
minAmountOut: BN;
|
|
4631
4788
|
minAmountIn: BN;
|
|
@@ -4636,8 +4793,9 @@ export declare class PerpetualsClient {
|
|
|
4636
4793
|
poolAmountUsd: BN;
|
|
4637
4794
|
poolEquityUsd: BN;
|
|
4638
4795
|
};
|
|
4639
|
-
|
|
4640
|
-
|
|
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;
|
|
4641
4799
|
};
|
|
4642
4800
|
getFeeDiscount: (perpetualsAccount: PerpetualsAccount, tokenStakeAccount: TokenStake, currentTime: BN) => {
|
|
4643
4801
|
discountBn: BN;
|
|
@@ -4647,12 +4805,14 @@ export declare class PerpetualsClient {
|
|
|
4647
4805
|
getStakedLpTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4648
4806
|
getAssetsUnderManagement: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4649
4807
|
getAddLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
4650
|
-
amount: BN;
|
|
4651
|
-
fee: BN;
|
|
4808
|
+
amount: BN | undefined;
|
|
4809
|
+
fee: BN | undefined;
|
|
4810
|
+
error?: string;
|
|
4652
4811
|
}>;
|
|
4653
4812
|
getRemoveLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, removeTokenCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
4654
4813
|
amount: BN;
|
|
4655
4814
|
fee: BN;
|
|
4815
|
+
error?: string;
|
|
4656
4816
|
}>;
|
|
4657
4817
|
getCompoundingLPTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4658
4818
|
getAddCompoundingLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
@@ -4667,19 +4827,19 @@ export declare class PerpetualsClient {
|
|
|
4667
4827
|
getLiquidationStateView: (positionAccount: PublicKey, poolName: string, tokenMint: PublicKey, collateralMint: PublicKey, poolConfig: PoolConfig) => Promise<any>;
|
|
4668
4828
|
getCompoundingTokenDataView: (poolConfig: PoolConfig) => Promise<any>;
|
|
4669
4829
|
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,
|
|
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<{
|
|
4671
4831
|
instructions: TransactionInstruction[];
|
|
4672
4832
|
additionalSigners: Signer[];
|
|
4673
4833
|
}>;
|
|
4674
|
-
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<{
|
|
4675
4835
|
instructions: TransactionInstruction[];
|
|
4676
4836
|
additionalSigners: Signer[];
|
|
4677
4837
|
}>;
|
|
4678
|
-
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<{
|
|
4679
4839
|
instructions: TransactionInstruction[];
|
|
4680
4840
|
additionalSigners: Signer[];
|
|
4681
4841
|
}>;
|
|
4682
|
-
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<{
|
|
4683
4843
|
instructions: TransactionInstruction[];
|
|
4684
4844
|
additionalSigners: Signer[];
|
|
4685
4845
|
}>;
|
|
@@ -4687,23 +4847,23 @@ export declare class PerpetualsClient {
|
|
|
4687
4847
|
instructions: TransactionInstruction[];
|
|
4688
4848
|
additionalSigners: Signer[];
|
|
4689
4849
|
}>;
|
|
4690
|
-
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<{
|
|
4691
4851
|
instructions: TransactionInstruction[];
|
|
4692
4852
|
additionalSigners: Signer[];
|
|
4693
4853
|
}>;
|
|
4694
|
-
removeCollateral: (
|
|
4854
|
+
removeCollateral: (collateralDeltaUsd: BN, marketSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4695
4855
|
instructions: TransactionInstruction[];
|
|
4696
4856
|
additionalSigners: Signer[];
|
|
4697
4857
|
}>;
|
|
4698
|
-
removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string,
|
|
4858
|
+
removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string, collateralDeltaUsd: BN, side: Side, poolConfig: PoolConfig, ephemeralSignerPubkey?: any) => Promise<{
|
|
4699
4859
|
instructions: TransactionInstruction[];
|
|
4700
4860
|
additionalSigners: Signer[];
|
|
4701
4861
|
}>;
|
|
4702
|
-
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<{
|
|
4703
4863
|
instructions: TransactionInstruction[];
|
|
4704
4864
|
additionalSigners: Signer[];
|
|
4705
4865
|
}>;
|
|
4706
|
-
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<{
|
|
4707
4867
|
instructions: TransactionInstruction[];
|
|
4708
4868
|
additionalSigners: Signer[];
|
|
4709
4869
|
}>;
|
|
@@ -4723,14 +4883,6 @@ export declare class PerpetualsClient {
|
|
|
4723
4883
|
instructions: TransactionInstruction[];
|
|
4724
4884
|
additionalSigners: Signer[];
|
|
4725
4885
|
}>;
|
|
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
4886
|
depositStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
4735
4887
|
instructions: TransactionInstruction[];
|
|
4736
4888
|
additionalSigners: Signer[];
|
|
@@ -4754,11 +4906,11 @@ export declare class PerpetualsClient {
|
|
|
4754
4906
|
instructions: TransactionInstruction[];
|
|
4755
4907
|
additionalSigners: Signer[];
|
|
4756
4908
|
}>;
|
|
4757
|
-
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<{
|
|
4758
4910
|
instructions: TransactionInstruction[];
|
|
4759
4911
|
additionalSigners: Signer[];
|
|
4760
4912
|
}>;
|
|
4761
|
-
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<{
|
|
4762
4914
|
instructions: TransactionInstruction[];
|
|
4763
4915
|
additionalSigners: Signer[];
|
|
4764
4916
|
}>;
|
|
@@ -4774,14 +4926,6 @@ export declare class PerpetualsClient {
|
|
|
4774
4926
|
instructions: TransactionInstruction[];
|
|
4775
4927
|
additionalSigners: Signer[];
|
|
4776
4928
|
}>;
|
|
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
4929
|
depositTokenStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
4786
4930
|
instructions: TransactionInstruction[];
|
|
4787
4931
|
additionalSigners: Signer[];
|
|
@@ -4810,19 +4954,11 @@ export declare class PerpetualsClient {
|
|
|
4810
4954
|
instructions: TransactionInstruction[];
|
|
4811
4955
|
additionalSigners: Signer[];
|
|
4812
4956
|
}>;
|
|
4813
|
-
|
|
4814
|
-
instructions: TransactionInstruction[];
|
|
4815
|
-
additionalSigners: Signer[];
|
|
4816
|
-
}>;
|
|
4817
|
-
distributeReward: (rewardAmount: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4957
|
+
collectRebate: (owner: PublicKey, rebateSymbol: string, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
|
|
4818
4958
|
instructions: TransactionInstruction[];
|
|
4819
4959
|
additionalSigners: Signer[];
|
|
4820
4960
|
}>;
|
|
4821
|
-
|
|
4822
|
-
instructions: TransactionInstruction[];
|
|
4823
|
-
additionalSigners: Signer[];
|
|
4824
|
-
}>;
|
|
4825
|
-
collectAndDistributeFee: (rewardSymbol: string, poolConfig: PoolConfig, createUserATA?: boolean, nftTradingAccount?: PublicKey) => Promise<{
|
|
4961
|
+
settleRebates: (rebateSymbol: string, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4826
4962
|
instructions: TransactionInstruction[];
|
|
4827
4963
|
additionalSigners: Signer[];
|
|
4828
4964
|
}>;
|
|
@@ -4834,11 +4970,11 @@ export declare class PerpetualsClient {
|
|
|
4834
4970
|
instructions: TransactionInstruction[];
|
|
4835
4971
|
additionalSigners: Signer[];
|
|
4836
4972
|
}>;
|
|
4837
|
-
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<{
|
|
4838
4974
|
instructions: TransactionInstruction[];
|
|
4839
4975
|
additionalSigners: Signer[];
|
|
4840
4976
|
}>;
|
|
4841
|
-
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<{
|
|
4842
4978
|
instructions: TransactionInstruction[];
|
|
4843
4979
|
additionalSigners: Signer[];
|
|
4844
4980
|
}>;
|
|
@@ -4858,11 +4994,11 @@ export declare class PerpetualsClient {
|
|
|
4858
4994
|
instructions: TransactionInstruction[];
|
|
4859
4995
|
additionalSigners: Signer[];
|
|
4860
4996
|
}>;
|
|
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
|
|
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<{
|
|
4862
4998
|
instructions: TransactionInstruction[];
|
|
4863
4999
|
additionalSigners: Signer[];
|
|
4864
5000
|
}>;
|
|
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
|
|
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<{
|
|
4866
5002
|
instructions: TransactionInstruction[];
|
|
4867
5003
|
additionalSigners: Signer[];
|
|
4868
5004
|
}>;
|
|
@@ -4885,9 +5021,9 @@ export declare class PerpetualsClient {
|
|
|
4885
5021
|
}>;
|
|
4886
5022
|
init: (admins: PublicKey[], config: any) => Promise<void>;
|
|
4887
5023
|
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>;
|
|
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>;
|
|
4889
5025
|
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>;
|
|
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>;
|
|
4891
5027
|
editCustody: (poolName: string, tokenMint: PublicKey, isStable: boolean, oracle: OracleParams, pricing: PricingParams, permissions: Permissions, fees: Fees, borrowRate: BorrowRateParams, ratios: TokenRatios[]) => Promise<void>;
|
|
4892
5028
|
removeCustody: (poolName: string, tokenMint: PublicKey, ratios: TokenRatios[], poolConfig: PoolConfig) => Promise<void>;
|
|
4893
5029
|
protocolWithdrawFees: (rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
@@ -4943,10 +5079,18 @@ export declare class PerpetualsClient {
|
|
|
4943
5079
|
instructions: TransactionInstruction[];
|
|
4944
5080
|
additionalSigners: Signer[];
|
|
4945
5081
|
}>;
|
|
5082
|
+
withdrawUnclaimedTokens: (poolConfig: PoolConfig) => Promise<{
|
|
5083
|
+
instructions: TransactionInstruction[];
|
|
5084
|
+
additionalSigners: Signer[];
|
|
5085
|
+
}>;
|
|
4946
5086
|
initRevenueTokenAccount: (feeShareBps: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4947
5087
|
instructions: TransactionInstruction[];
|
|
4948
5088
|
additionalSigners: Signer[];
|
|
4949
5089
|
}>;
|
|
5090
|
+
initRebateVault: (allowRebatePayout: boolean, rebateSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
5091
|
+
instructions: TransactionInstruction[];
|
|
5092
|
+
additionalSigners: Signer[];
|
|
5093
|
+
}>;
|
|
4950
5094
|
distributeTokenReward: (amount: BN, epochCount: number, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4951
5095
|
instructions: TransactionInstruction[];
|
|
4952
5096
|
additionalSigners: Signer[];
|