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