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