flash-sdk 9.0.2 → 9.0.3-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/OraclePrice.d.ts +0 -1
- package/dist/OrderAccount.d.ts +0 -1
- package/dist/PerpetualsClient.d.ts +303 -146
- package/dist/PerpetualsClient.js +720 -1078
- package/dist/PoolAccount.d.ts +3 -1
- package/dist/PoolConfig.d.ts +3 -1
- package/dist/PoolConfig.js +4 -2
- package/dist/PoolConfig.json +186 -3238
- 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 +3041 -1714
- package/dist/idl/perpetuals.js +3041 -1714
- 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 +18 -5
- package/dist/types/index.js +6 -5
- package/dist/utils/IdlCoder.js +17 -7
- package/dist/utils/alt.js +5 -6
- package/dist/utils/anchorCpiEvents.d.ts +0 -1
- package/dist/utils/anchorCpiEvents.js +4 -4
- package/dist/utils/getReferralAccounts.d.ts +1 -1
- package/dist/utils/getReferralAccounts.js +3 -8
- package/dist/utils/index.js +6 -6
- package/dist/utils/rpc.js +9 -9
- package/package.json +1 -1
- package/dist/TradingAccount.d.ts +0 -24
- package/dist/TradingAccount.js +0 -17
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
/// <reference types="bn.js" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { Program, AnchorProvider, BN } from "@coral-xyz/anchor";
|
|
4
2
|
import { PublicKey, TransactionInstruction, Commitment, Signer, AddressLookupTableAccount, VersionedTransaction } from "@solana/web3.js";
|
|
5
3
|
import { PoolAccount } from "./PoolAccount";
|
|
6
4
|
import { PositionAccount } from "./PositionAccount";
|
|
7
|
-
import { AddLiquidityAmountAndFee, InternalPrice, BorrowRateParams, ExitPriceAndFee, Fees, OracleParams, Permissions, PricingParams, RemoveCollateralData, RemoveLiquidityAmountAndFee, Side, TokenRatios, MinAndMaxPrice, FeesAction, ContractOraclePrice, Privilege, PerpetualsAccount,
|
|
5
|
+
import { AddLiquidityAmountAndFee, InternalPrice, BorrowRateParams, ExitPriceAndFee, Fees, OracleParams, Permissions, PricingParams, RemoveCollateralData, RemoveLiquidityAmountAndFee, Side, TokenRatios, MinAndMaxPrice, FeesAction, ContractOraclePrice, Privilege, PerpetualsAccount, EntryPriceAndFeeV2, TokenPermissions, TokenStake, InternalEmaPrice } from "./types";
|
|
8
6
|
import { OraclePrice } from "./OraclePrice";
|
|
9
7
|
import { CustodyAccount } from "./CustodyAccount";
|
|
10
8
|
import { Perpetuals } from "./idl/perpetuals";
|
|
@@ -111,7 +109,7 @@ export declare class PerpetualsClient {
|
|
|
111
109
|
maxUtilization: number;
|
|
112
110
|
degenPositionFactor: number;
|
|
113
111
|
degenExposureFactor: number;
|
|
114
|
-
|
|
112
|
+
maxPositionSizeUsd: BN;
|
|
115
113
|
maxExposureUsd: BN;
|
|
116
114
|
};
|
|
117
115
|
permissions: {
|
|
@@ -204,7 +202,7 @@ export declare class PerpetualsClient {
|
|
|
204
202
|
reservedAmount: BN;
|
|
205
203
|
minReserveUsd: BN;
|
|
206
204
|
limitPriceBufferBps: BN;
|
|
207
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
205
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
208
206
|
owner: PublicKey;
|
|
209
207
|
stakeStats: {
|
|
210
208
|
pendingActivation: BN;
|
|
@@ -238,7 +236,7 @@ export declare class PerpetualsClient {
|
|
|
238
236
|
lockedAmount: BN;
|
|
239
237
|
lockedUsd: BN;
|
|
240
238
|
collateralAmount: BN;
|
|
241
|
-
|
|
239
|
+
collateralLiabilityUsd: BN;
|
|
242
240
|
unsettledFeeUsd: BN;
|
|
243
241
|
cumulativeLockFeeSnapshot: BN;
|
|
244
242
|
sizeDecimals: number;
|
|
@@ -247,7 +245,7 @@ export declare class PerpetualsClient {
|
|
|
247
245
|
};
|
|
248
246
|
targetCustodyUid: number;
|
|
249
247
|
collateralCustodyUid: number;
|
|
250
|
-
padding2: number[] | BN[]
|
|
248
|
+
padding2: number[] | BN[];
|
|
251
249
|
numSigners: number;
|
|
252
250
|
numSigned: number;
|
|
253
251
|
minSignatures: number;
|
|
@@ -261,6 +259,7 @@ export declare class PerpetualsClient {
|
|
|
261
259
|
conf: BN;
|
|
262
260
|
ema: BN;
|
|
263
261
|
publishTime: BN;
|
|
262
|
+
extOracleAccount: PublicKey;
|
|
264
263
|
market: PublicKey;
|
|
265
264
|
limitOrders: unknown;
|
|
266
265
|
takeProfitOrders: unknown;
|
|
@@ -303,7 +302,7 @@ export declare class PerpetualsClient {
|
|
|
303
302
|
}[];
|
|
304
303
|
markets: PublicKey[];
|
|
305
304
|
maxAumUsd: BN;
|
|
306
|
-
buffer: BN;
|
|
305
|
+
buffer: number | BN;
|
|
307
306
|
rawAumUsd: BN;
|
|
308
307
|
equityUsd: BN;
|
|
309
308
|
totalStaked: {
|
|
@@ -334,6 +333,9 @@ export declare class PerpetualsClient {
|
|
|
334
333
|
lpPrice: BN;
|
|
335
334
|
compoundingLpPrice: BN;
|
|
336
335
|
lastUpdatedTimestamp: BN;
|
|
336
|
+
feesObligationUsd: BN;
|
|
337
|
+
rebateObligationUsd: BN;
|
|
338
|
+
thresholdUsd: BN;
|
|
337
339
|
delegate: PublicKey;
|
|
338
340
|
openTime: BN;
|
|
339
341
|
updateTime: BN;
|
|
@@ -347,15 +349,22 @@ export declare class PerpetualsClient {
|
|
|
347
349
|
lockedUsd: BN;
|
|
348
350
|
collateralAmount: BN;
|
|
349
351
|
collateralUsd: BN;
|
|
350
|
-
|
|
352
|
+
unsettledValueUsd: BN;
|
|
351
353
|
unsettledFeesUsd: BN;
|
|
352
354
|
cumulativeLockFeeSnapshot: BN;
|
|
353
355
|
degenSizeUsd: BN;
|
|
356
|
+
referencePrice: {
|
|
357
|
+
price: BN;
|
|
358
|
+
exponent: number;
|
|
359
|
+
};
|
|
354
360
|
sizeDecimals: number;
|
|
355
361
|
lockedDecimals: number;
|
|
356
362
|
collateralDecimals: number;
|
|
357
363
|
key: PublicKey;
|
|
358
364
|
feeAmount: BN;
|
|
365
|
+
allowPayout: boolean;
|
|
366
|
+
availableUsd: BN;
|
|
367
|
+
availableAmount: BN;
|
|
359
368
|
refererTokenStakeAccount: PublicKey;
|
|
360
369
|
refererBoosterAccount: PublicKey;
|
|
361
370
|
level: number;
|
|
@@ -369,6 +378,7 @@ export declare class PerpetualsClient {
|
|
|
369
378
|
rewardTokens: BN;
|
|
370
379
|
unclaimedRevenueAmount: BN;
|
|
371
380
|
revenueSnapshot: BN;
|
|
381
|
+
claimableRebateUsd: BN;
|
|
372
382
|
tokenMint: PublicKey;
|
|
373
383
|
tokenVaultTokenAccount: PublicKey;
|
|
374
384
|
tokenPermissions: {
|
|
@@ -452,7 +462,7 @@ export declare class PerpetualsClient {
|
|
|
452
462
|
maxUtilization: number;
|
|
453
463
|
degenPositionFactor: number;
|
|
454
464
|
degenExposureFactor: number;
|
|
455
|
-
|
|
465
|
+
maxPositionSizeUsd: BN;
|
|
456
466
|
maxExposureUsd: BN;
|
|
457
467
|
};
|
|
458
468
|
permissions: {
|
|
@@ -545,7 +555,7 @@ export declare class PerpetualsClient {
|
|
|
545
555
|
reservedAmount: BN;
|
|
546
556
|
minReserveUsd: BN;
|
|
547
557
|
limitPriceBufferBps: BN;
|
|
548
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
558
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
549
559
|
owner: PublicKey;
|
|
550
560
|
stakeStats: {
|
|
551
561
|
pendingActivation: BN;
|
|
@@ -579,7 +589,7 @@ export declare class PerpetualsClient {
|
|
|
579
589
|
lockedAmount: BN;
|
|
580
590
|
lockedUsd: BN;
|
|
581
591
|
collateralAmount: BN;
|
|
582
|
-
|
|
592
|
+
collateralLiabilityUsd: BN;
|
|
583
593
|
unsettledFeeUsd: BN;
|
|
584
594
|
cumulativeLockFeeSnapshot: BN;
|
|
585
595
|
sizeDecimals: number;
|
|
@@ -588,7 +598,7 @@ export declare class PerpetualsClient {
|
|
|
588
598
|
};
|
|
589
599
|
targetCustodyUid: number;
|
|
590
600
|
collateralCustodyUid: number;
|
|
591
|
-
padding2: number[] | BN[]
|
|
601
|
+
padding2: number[] | BN[];
|
|
592
602
|
numSigners: number;
|
|
593
603
|
numSigned: number;
|
|
594
604
|
minSignatures: number;
|
|
@@ -602,6 +612,7 @@ export declare class PerpetualsClient {
|
|
|
602
612
|
conf: BN;
|
|
603
613
|
ema: BN;
|
|
604
614
|
publishTime: BN;
|
|
615
|
+
extOracleAccount: PublicKey;
|
|
605
616
|
market: PublicKey;
|
|
606
617
|
limitOrders: unknown;
|
|
607
618
|
takeProfitOrders: unknown;
|
|
@@ -644,7 +655,7 @@ export declare class PerpetualsClient {
|
|
|
644
655
|
}[];
|
|
645
656
|
markets: PublicKey[];
|
|
646
657
|
maxAumUsd: BN;
|
|
647
|
-
buffer: BN;
|
|
658
|
+
buffer: number | BN;
|
|
648
659
|
rawAumUsd: BN;
|
|
649
660
|
equityUsd: BN;
|
|
650
661
|
totalStaked: {
|
|
@@ -675,6 +686,9 @@ export declare class PerpetualsClient {
|
|
|
675
686
|
lpPrice: BN;
|
|
676
687
|
compoundingLpPrice: BN;
|
|
677
688
|
lastUpdatedTimestamp: BN;
|
|
689
|
+
feesObligationUsd: BN;
|
|
690
|
+
rebateObligationUsd: BN;
|
|
691
|
+
thresholdUsd: BN;
|
|
678
692
|
delegate: PublicKey;
|
|
679
693
|
openTime: BN;
|
|
680
694
|
updateTime: BN;
|
|
@@ -688,15 +702,22 @@ export declare class PerpetualsClient {
|
|
|
688
702
|
lockedUsd: BN;
|
|
689
703
|
collateralAmount: BN;
|
|
690
704
|
collateralUsd: BN;
|
|
691
|
-
|
|
705
|
+
unsettledValueUsd: BN;
|
|
692
706
|
unsettledFeesUsd: BN;
|
|
693
707
|
cumulativeLockFeeSnapshot: BN;
|
|
694
708
|
degenSizeUsd: BN;
|
|
709
|
+
referencePrice: {
|
|
710
|
+
price: BN;
|
|
711
|
+
exponent: number;
|
|
712
|
+
};
|
|
695
713
|
sizeDecimals: number;
|
|
696
714
|
lockedDecimals: number;
|
|
697
715
|
collateralDecimals: number;
|
|
698
716
|
key: PublicKey;
|
|
699
717
|
feeAmount: BN;
|
|
718
|
+
allowPayout: boolean;
|
|
719
|
+
availableUsd: BN;
|
|
720
|
+
availableAmount: BN;
|
|
700
721
|
refererTokenStakeAccount: PublicKey;
|
|
701
722
|
refererBoosterAccount: PublicKey;
|
|
702
723
|
level: number;
|
|
@@ -710,6 +731,7 @@ export declare class PerpetualsClient {
|
|
|
710
731
|
rewardTokens: BN;
|
|
711
732
|
unclaimedRevenueAmount: BN;
|
|
712
733
|
revenueSnapshot: BN;
|
|
734
|
+
claimableRebateUsd: BN;
|
|
713
735
|
tokenMint: PublicKey;
|
|
714
736
|
tokenVaultTokenAccount: PublicKey;
|
|
715
737
|
tokenPermissions: {
|
|
@@ -792,7 +814,7 @@ export declare class PerpetualsClient {
|
|
|
792
814
|
maxUtilization: number;
|
|
793
815
|
degenPositionFactor: number;
|
|
794
816
|
degenExposureFactor: number;
|
|
795
|
-
|
|
817
|
+
maxPositionSizeUsd: BN;
|
|
796
818
|
maxExposureUsd: BN;
|
|
797
819
|
};
|
|
798
820
|
permissions: {
|
|
@@ -885,7 +907,7 @@ export declare class PerpetualsClient {
|
|
|
885
907
|
reservedAmount: BN;
|
|
886
908
|
minReserveUsd: BN;
|
|
887
909
|
limitPriceBufferBps: BN;
|
|
888
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
910
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
889
911
|
owner: PublicKey;
|
|
890
912
|
stakeStats: {
|
|
891
913
|
pendingActivation: BN;
|
|
@@ -919,7 +941,7 @@ export declare class PerpetualsClient {
|
|
|
919
941
|
lockedAmount: BN;
|
|
920
942
|
lockedUsd: BN;
|
|
921
943
|
collateralAmount: BN;
|
|
922
|
-
|
|
944
|
+
collateralLiabilityUsd: BN;
|
|
923
945
|
unsettledFeeUsd: BN;
|
|
924
946
|
cumulativeLockFeeSnapshot: BN;
|
|
925
947
|
sizeDecimals: number;
|
|
@@ -928,7 +950,7 @@ export declare class PerpetualsClient {
|
|
|
928
950
|
};
|
|
929
951
|
targetCustodyUid: number;
|
|
930
952
|
collateralCustodyUid: number;
|
|
931
|
-
padding2: number[] | BN[]
|
|
953
|
+
padding2: number[] | BN[];
|
|
932
954
|
numSigners: number;
|
|
933
955
|
numSigned: number;
|
|
934
956
|
minSignatures: number;
|
|
@@ -942,6 +964,7 @@ export declare class PerpetualsClient {
|
|
|
942
964
|
conf: BN;
|
|
943
965
|
ema: BN;
|
|
944
966
|
publishTime: BN;
|
|
967
|
+
extOracleAccount: PublicKey;
|
|
945
968
|
market: PublicKey;
|
|
946
969
|
limitOrders: unknown;
|
|
947
970
|
takeProfitOrders: unknown;
|
|
@@ -984,7 +1007,7 @@ export declare class PerpetualsClient {
|
|
|
984
1007
|
}[];
|
|
985
1008
|
markets: PublicKey[];
|
|
986
1009
|
maxAumUsd: BN;
|
|
987
|
-
buffer: BN;
|
|
1010
|
+
buffer: number | BN;
|
|
988
1011
|
rawAumUsd: BN;
|
|
989
1012
|
equityUsd: BN;
|
|
990
1013
|
totalStaked: {
|
|
@@ -1015,6 +1038,9 @@ export declare class PerpetualsClient {
|
|
|
1015
1038
|
lpPrice: BN;
|
|
1016
1039
|
compoundingLpPrice: BN;
|
|
1017
1040
|
lastUpdatedTimestamp: BN;
|
|
1041
|
+
feesObligationUsd: BN;
|
|
1042
|
+
rebateObligationUsd: BN;
|
|
1043
|
+
thresholdUsd: BN;
|
|
1018
1044
|
delegate: PublicKey;
|
|
1019
1045
|
openTime: BN;
|
|
1020
1046
|
updateTime: BN;
|
|
@@ -1028,15 +1054,22 @@ export declare class PerpetualsClient {
|
|
|
1028
1054
|
lockedUsd: BN;
|
|
1029
1055
|
collateralAmount: BN;
|
|
1030
1056
|
collateralUsd: BN;
|
|
1031
|
-
|
|
1057
|
+
unsettledValueUsd: BN;
|
|
1032
1058
|
unsettledFeesUsd: BN;
|
|
1033
1059
|
cumulativeLockFeeSnapshot: BN;
|
|
1034
1060
|
degenSizeUsd: BN;
|
|
1061
|
+
referencePrice: {
|
|
1062
|
+
price: BN;
|
|
1063
|
+
exponent: number;
|
|
1064
|
+
};
|
|
1035
1065
|
sizeDecimals: number;
|
|
1036
1066
|
lockedDecimals: number;
|
|
1037
1067
|
collateralDecimals: number;
|
|
1038
1068
|
key: PublicKey;
|
|
1039
1069
|
feeAmount: BN;
|
|
1070
|
+
allowPayout: boolean;
|
|
1071
|
+
availableUsd: BN;
|
|
1072
|
+
availableAmount: BN;
|
|
1040
1073
|
refererTokenStakeAccount: PublicKey;
|
|
1041
1074
|
refererBoosterAccount: PublicKey;
|
|
1042
1075
|
level: number;
|
|
@@ -1050,6 +1083,7 @@ export declare class PerpetualsClient {
|
|
|
1050
1083
|
rewardTokens: BN;
|
|
1051
1084
|
unclaimedRevenueAmount: BN;
|
|
1052
1085
|
revenueSnapshot: BN;
|
|
1086
|
+
claimableRebateUsd: BN;
|
|
1053
1087
|
tokenMint: PublicKey;
|
|
1054
1088
|
tokenVaultTokenAccount: PublicKey;
|
|
1055
1089
|
tokenPermissions: {
|
|
@@ -1136,7 +1170,7 @@ export declare class PerpetualsClient {
|
|
|
1136
1170
|
maxUtilization: number;
|
|
1137
1171
|
degenPositionFactor: number;
|
|
1138
1172
|
degenExposureFactor: number;
|
|
1139
|
-
|
|
1173
|
+
maxPositionSizeUsd: BN;
|
|
1140
1174
|
maxExposureUsd: BN;
|
|
1141
1175
|
};
|
|
1142
1176
|
permissions: {
|
|
@@ -1229,7 +1263,7 @@ export declare class PerpetualsClient {
|
|
|
1229
1263
|
reservedAmount: BN;
|
|
1230
1264
|
minReserveUsd: BN;
|
|
1231
1265
|
limitPriceBufferBps: BN;
|
|
1232
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1266
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1233
1267
|
owner: PublicKey;
|
|
1234
1268
|
stakeStats: {
|
|
1235
1269
|
pendingActivation: BN;
|
|
@@ -1263,7 +1297,7 @@ export declare class PerpetualsClient {
|
|
|
1263
1297
|
lockedAmount: BN;
|
|
1264
1298
|
lockedUsd: BN;
|
|
1265
1299
|
collateralAmount: BN;
|
|
1266
|
-
|
|
1300
|
+
collateralLiabilityUsd: BN;
|
|
1267
1301
|
unsettledFeeUsd: BN;
|
|
1268
1302
|
cumulativeLockFeeSnapshot: BN;
|
|
1269
1303
|
sizeDecimals: number;
|
|
@@ -1272,7 +1306,7 @@ export declare class PerpetualsClient {
|
|
|
1272
1306
|
};
|
|
1273
1307
|
targetCustodyUid: number;
|
|
1274
1308
|
collateralCustodyUid: number;
|
|
1275
|
-
padding2: number[] | BN[]
|
|
1309
|
+
padding2: number[] | BN[];
|
|
1276
1310
|
numSigners: number;
|
|
1277
1311
|
numSigned: number;
|
|
1278
1312
|
minSignatures: number;
|
|
@@ -1286,6 +1320,7 @@ export declare class PerpetualsClient {
|
|
|
1286
1320
|
conf: BN;
|
|
1287
1321
|
ema: BN;
|
|
1288
1322
|
publishTime: BN;
|
|
1323
|
+
extOracleAccount: PublicKey;
|
|
1289
1324
|
market: PublicKey;
|
|
1290
1325
|
limitOrders: unknown;
|
|
1291
1326
|
takeProfitOrders: unknown;
|
|
@@ -1328,7 +1363,7 @@ export declare class PerpetualsClient {
|
|
|
1328
1363
|
}[];
|
|
1329
1364
|
markets: PublicKey[];
|
|
1330
1365
|
maxAumUsd: BN;
|
|
1331
|
-
buffer: BN;
|
|
1366
|
+
buffer: number | BN;
|
|
1332
1367
|
rawAumUsd: BN;
|
|
1333
1368
|
equityUsd: BN;
|
|
1334
1369
|
totalStaked: {
|
|
@@ -1359,6 +1394,9 @@ export declare class PerpetualsClient {
|
|
|
1359
1394
|
lpPrice: BN;
|
|
1360
1395
|
compoundingLpPrice: BN;
|
|
1361
1396
|
lastUpdatedTimestamp: BN;
|
|
1397
|
+
feesObligationUsd: BN;
|
|
1398
|
+
rebateObligationUsd: BN;
|
|
1399
|
+
thresholdUsd: BN;
|
|
1362
1400
|
delegate: PublicKey;
|
|
1363
1401
|
openTime: BN;
|
|
1364
1402
|
updateTime: BN;
|
|
@@ -1372,15 +1410,22 @@ export declare class PerpetualsClient {
|
|
|
1372
1410
|
lockedUsd: BN;
|
|
1373
1411
|
collateralAmount: BN;
|
|
1374
1412
|
collateralUsd: BN;
|
|
1375
|
-
|
|
1413
|
+
unsettledValueUsd: BN;
|
|
1376
1414
|
unsettledFeesUsd: BN;
|
|
1377
1415
|
cumulativeLockFeeSnapshot: BN;
|
|
1378
1416
|
degenSizeUsd: BN;
|
|
1417
|
+
referencePrice: {
|
|
1418
|
+
price: BN;
|
|
1419
|
+
exponent: number;
|
|
1420
|
+
};
|
|
1379
1421
|
sizeDecimals: number;
|
|
1380
1422
|
lockedDecimals: number;
|
|
1381
1423
|
collateralDecimals: number;
|
|
1382
1424
|
key: PublicKey;
|
|
1383
1425
|
feeAmount: BN;
|
|
1426
|
+
allowPayout: boolean;
|
|
1427
|
+
availableUsd: BN;
|
|
1428
|
+
availableAmount: BN;
|
|
1384
1429
|
refererTokenStakeAccount: PublicKey;
|
|
1385
1430
|
refererBoosterAccount: PublicKey;
|
|
1386
1431
|
level: number;
|
|
@@ -1394,6 +1439,7 @@ export declare class PerpetualsClient {
|
|
|
1394
1439
|
rewardTokens: BN;
|
|
1395
1440
|
unclaimedRevenueAmount: BN;
|
|
1396
1441
|
revenueSnapshot: BN;
|
|
1442
|
+
claimableRebateUsd: BN;
|
|
1397
1443
|
tokenMint: PublicKey;
|
|
1398
1444
|
tokenVaultTokenAccount: PublicKey;
|
|
1399
1445
|
tokenPermissions: {
|
|
@@ -1479,7 +1525,7 @@ export declare class PerpetualsClient {
|
|
|
1479
1525
|
maxUtilization: number;
|
|
1480
1526
|
degenPositionFactor: number;
|
|
1481
1527
|
degenExposureFactor: number;
|
|
1482
|
-
|
|
1528
|
+
maxPositionSizeUsd: BN;
|
|
1483
1529
|
maxExposureUsd: BN;
|
|
1484
1530
|
};
|
|
1485
1531
|
permissions: {
|
|
@@ -1572,7 +1618,7 @@ export declare class PerpetualsClient {
|
|
|
1572
1618
|
reservedAmount: BN;
|
|
1573
1619
|
minReserveUsd: BN;
|
|
1574
1620
|
limitPriceBufferBps: BN;
|
|
1575
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1621
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1576
1622
|
owner: PublicKey;
|
|
1577
1623
|
stakeStats: {
|
|
1578
1624
|
pendingActivation: BN;
|
|
@@ -1606,7 +1652,7 @@ export declare class PerpetualsClient {
|
|
|
1606
1652
|
lockedAmount: BN;
|
|
1607
1653
|
lockedUsd: BN;
|
|
1608
1654
|
collateralAmount: BN;
|
|
1609
|
-
|
|
1655
|
+
collateralLiabilityUsd: BN;
|
|
1610
1656
|
unsettledFeeUsd: BN;
|
|
1611
1657
|
cumulativeLockFeeSnapshot: BN;
|
|
1612
1658
|
sizeDecimals: number;
|
|
@@ -1615,7 +1661,7 @@ export declare class PerpetualsClient {
|
|
|
1615
1661
|
};
|
|
1616
1662
|
targetCustodyUid: number;
|
|
1617
1663
|
collateralCustodyUid: number;
|
|
1618
|
-
padding2: number[] | BN[]
|
|
1664
|
+
padding2: number[] | BN[];
|
|
1619
1665
|
numSigners: number;
|
|
1620
1666
|
numSigned: number;
|
|
1621
1667
|
minSignatures: number;
|
|
@@ -1629,6 +1675,7 @@ export declare class PerpetualsClient {
|
|
|
1629
1675
|
conf: BN;
|
|
1630
1676
|
ema: BN;
|
|
1631
1677
|
publishTime: BN;
|
|
1678
|
+
extOracleAccount: PublicKey;
|
|
1632
1679
|
market: PublicKey;
|
|
1633
1680
|
limitOrders: unknown;
|
|
1634
1681
|
takeProfitOrders: unknown;
|
|
@@ -1671,7 +1718,7 @@ export declare class PerpetualsClient {
|
|
|
1671
1718
|
}[];
|
|
1672
1719
|
markets: PublicKey[];
|
|
1673
1720
|
maxAumUsd: BN;
|
|
1674
|
-
buffer: BN;
|
|
1721
|
+
buffer: number | BN;
|
|
1675
1722
|
rawAumUsd: BN;
|
|
1676
1723
|
equityUsd: BN;
|
|
1677
1724
|
totalStaked: {
|
|
@@ -1702,6 +1749,9 @@ export declare class PerpetualsClient {
|
|
|
1702
1749
|
lpPrice: BN;
|
|
1703
1750
|
compoundingLpPrice: BN;
|
|
1704
1751
|
lastUpdatedTimestamp: BN;
|
|
1752
|
+
feesObligationUsd: BN;
|
|
1753
|
+
rebateObligationUsd: BN;
|
|
1754
|
+
thresholdUsd: BN;
|
|
1705
1755
|
delegate: PublicKey;
|
|
1706
1756
|
openTime: BN;
|
|
1707
1757
|
updateTime: BN;
|
|
@@ -1715,15 +1765,22 @@ export declare class PerpetualsClient {
|
|
|
1715
1765
|
lockedUsd: BN;
|
|
1716
1766
|
collateralAmount: BN;
|
|
1717
1767
|
collateralUsd: BN;
|
|
1718
|
-
|
|
1768
|
+
unsettledValueUsd: BN;
|
|
1719
1769
|
unsettledFeesUsd: BN;
|
|
1720
1770
|
cumulativeLockFeeSnapshot: BN;
|
|
1721
1771
|
degenSizeUsd: BN;
|
|
1772
|
+
referencePrice: {
|
|
1773
|
+
price: BN;
|
|
1774
|
+
exponent: number;
|
|
1775
|
+
};
|
|
1722
1776
|
sizeDecimals: number;
|
|
1723
1777
|
lockedDecimals: number;
|
|
1724
1778
|
collateralDecimals: number;
|
|
1725
1779
|
key: PublicKey;
|
|
1726
1780
|
feeAmount: BN;
|
|
1781
|
+
allowPayout: boolean;
|
|
1782
|
+
availableUsd: BN;
|
|
1783
|
+
availableAmount: BN;
|
|
1727
1784
|
refererTokenStakeAccount: PublicKey;
|
|
1728
1785
|
refererBoosterAccount: PublicKey;
|
|
1729
1786
|
level: number;
|
|
@@ -1737,6 +1794,7 @@ export declare class PerpetualsClient {
|
|
|
1737
1794
|
rewardTokens: BN;
|
|
1738
1795
|
unclaimedRevenueAmount: BN;
|
|
1739
1796
|
revenueSnapshot: BN;
|
|
1797
|
+
claimableRebateUsd: BN;
|
|
1740
1798
|
tokenMint: PublicKey;
|
|
1741
1799
|
tokenVaultTokenAccount: PublicKey;
|
|
1742
1800
|
tokenPermissions: {
|
|
@@ -1820,7 +1878,7 @@ export declare class PerpetualsClient {
|
|
|
1820
1878
|
maxUtilization: number;
|
|
1821
1879
|
degenPositionFactor: number;
|
|
1822
1880
|
degenExposureFactor: number;
|
|
1823
|
-
|
|
1881
|
+
maxPositionSizeUsd: BN;
|
|
1824
1882
|
maxExposureUsd: BN;
|
|
1825
1883
|
};
|
|
1826
1884
|
permissions: {
|
|
@@ -1913,7 +1971,7 @@ export declare class PerpetualsClient {
|
|
|
1913
1971
|
reservedAmount: BN;
|
|
1914
1972
|
minReserveUsd: BN;
|
|
1915
1973
|
limitPriceBufferBps: BN;
|
|
1916
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
1974
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
1917
1975
|
owner: PublicKey;
|
|
1918
1976
|
stakeStats: {
|
|
1919
1977
|
pendingActivation: BN;
|
|
@@ -1947,7 +2005,7 @@ export declare class PerpetualsClient {
|
|
|
1947
2005
|
lockedAmount: BN;
|
|
1948
2006
|
lockedUsd: BN;
|
|
1949
2007
|
collateralAmount: BN;
|
|
1950
|
-
|
|
2008
|
+
collateralLiabilityUsd: BN;
|
|
1951
2009
|
unsettledFeeUsd: BN;
|
|
1952
2010
|
cumulativeLockFeeSnapshot: BN;
|
|
1953
2011
|
sizeDecimals: number;
|
|
@@ -1956,7 +2014,7 @@ export declare class PerpetualsClient {
|
|
|
1956
2014
|
};
|
|
1957
2015
|
targetCustodyUid: number;
|
|
1958
2016
|
collateralCustodyUid: number;
|
|
1959
|
-
padding2: number[] | BN[]
|
|
2017
|
+
padding2: number[] | BN[];
|
|
1960
2018
|
numSigners: number;
|
|
1961
2019
|
numSigned: number;
|
|
1962
2020
|
minSignatures: number;
|
|
@@ -1970,6 +2028,7 @@ export declare class PerpetualsClient {
|
|
|
1970
2028
|
conf: BN;
|
|
1971
2029
|
ema: BN;
|
|
1972
2030
|
publishTime: BN;
|
|
2031
|
+
extOracleAccount: PublicKey;
|
|
1973
2032
|
market: PublicKey;
|
|
1974
2033
|
limitOrders: unknown;
|
|
1975
2034
|
takeProfitOrders: unknown;
|
|
@@ -2012,7 +2071,7 @@ export declare class PerpetualsClient {
|
|
|
2012
2071
|
}[];
|
|
2013
2072
|
markets: PublicKey[];
|
|
2014
2073
|
maxAumUsd: BN;
|
|
2015
|
-
buffer: BN;
|
|
2074
|
+
buffer: number | BN;
|
|
2016
2075
|
rawAumUsd: BN;
|
|
2017
2076
|
equityUsd: BN;
|
|
2018
2077
|
totalStaked: {
|
|
@@ -2043,6 +2102,9 @@ export declare class PerpetualsClient {
|
|
|
2043
2102
|
lpPrice: BN;
|
|
2044
2103
|
compoundingLpPrice: BN;
|
|
2045
2104
|
lastUpdatedTimestamp: BN;
|
|
2105
|
+
feesObligationUsd: BN;
|
|
2106
|
+
rebateObligationUsd: BN;
|
|
2107
|
+
thresholdUsd: BN;
|
|
2046
2108
|
delegate: PublicKey;
|
|
2047
2109
|
openTime: BN;
|
|
2048
2110
|
updateTime: BN;
|
|
@@ -2056,15 +2118,22 @@ export declare class PerpetualsClient {
|
|
|
2056
2118
|
lockedUsd: BN;
|
|
2057
2119
|
collateralAmount: BN;
|
|
2058
2120
|
collateralUsd: BN;
|
|
2059
|
-
|
|
2121
|
+
unsettledValueUsd: BN;
|
|
2060
2122
|
unsettledFeesUsd: BN;
|
|
2061
2123
|
cumulativeLockFeeSnapshot: BN;
|
|
2062
2124
|
degenSizeUsd: BN;
|
|
2125
|
+
referencePrice: {
|
|
2126
|
+
price: BN;
|
|
2127
|
+
exponent: number;
|
|
2128
|
+
};
|
|
2063
2129
|
sizeDecimals: number;
|
|
2064
2130
|
lockedDecimals: number;
|
|
2065
2131
|
collateralDecimals: number;
|
|
2066
2132
|
key: PublicKey;
|
|
2067
2133
|
feeAmount: BN;
|
|
2134
|
+
allowPayout: boolean;
|
|
2135
|
+
availableUsd: BN;
|
|
2136
|
+
availableAmount: BN;
|
|
2068
2137
|
refererTokenStakeAccount: PublicKey;
|
|
2069
2138
|
refererBoosterAccount: PublicKey;
|
|
2070
2139
|
level: number;
|
|
@@ -2078,6 +2147,7 @@ export declare class PerpetualsClient {
|
|
|
2078
2147
|
rewardTokens: BN;
|
|
2079
2148
|
unclaimedRevenueAmount: BN;
|
|
2080
2149
|
revenueSnapshot: BN;
|
|
2150
|
+
claimableRebateUsd: BN;
|
|
2081
2151
|
tokenMint: PublicKey;
|
|
2082
2152
|
tokenVaultTokenAccount: PublicKey;
|
|
2083
2153
|
tokenPermissions: {
|
|
@@ -2160,7 +2230,7 @@ export declare class PerpetualsClient {
|
|
|
2160
2230
|
maxUtilization: number;
|
|
2161
2231
|
degenPositionFactor: number;
|
|
2162
2232
|
degenExposureFactor: number;
|
|
2163
|
-
|
|
2233
|
+
maxPositionSizeUsd: BN;
|
|
2164
2234
|
maxExposureUsd: BN;
|
|
2165
2235
|
};
|
|
2166
2236
|
permissions: {
|
|
@@ -2253,7 +2323,7 @@ export declare class PerpetualsClient {
|
|
|
2253
2323
|
reservedAmount: BN;
|
|
2254
2324
|
minReserveUsd: BN;
|
|
2255
2325
|
limitPriceBufferBps: BN;
|
|
2256
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
2326
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2257
2327
|
owner: PublicKey;
|
|
2258
2328
|
stakeStats: {
|
|
2259
2329
|
pendingActivation: BN;
|
|
@@ -2287,7 +2357,7 @@ export declare class PerpetualsClient {
|
|
|
2287
2357
|
lockedAmount: BN;
|
|
2288
2358
|
lockedUsd: BN;
|
|
2289
2359
|
collateralAmount: BN;
|
|
2290
|
-
|
|
2360
|
+
collateralLiabilityUsd: BN;
|
|
2291
2361
|
unsettledFeeUsd: BN;
|
|
2292
2362
|
cumulativeLockFeeSnapshot: BN;
|
|
2293
2363
|
sizeDecimals: number;
|
|
@@ -2296,7 +2366,7 @@ export declare class PerpetualsClient {
|
|
|
2296
2366
|
};
|
|
2297
2367
|
targetCustodyUid: number;
|
|
2298
2368
|
collateralCustodyUid: number;
|
|
2299
|
-
padding2: number[] | BN[]
|
|
2369
|
+
padding2: number[] | BN[];
|
|
2300
2370
|
numSigners: number;
|
|
2301
2371
|
numSigned: number;
|
|
2302
2372
|
minSignatures: number;
|
|
@@ -2310,6 +2380,7 @@ export declare class PerpetualsClient {
|
|
|
2310
2380
|
conf: BN;
|
|
2311
2381
|
ema: BN;
|
|
2312
2382
|
publishTime: BN;
|
|
2383
|
+
extOracleAccount: PublicKey;
|
|
2313
2384
|
market: PublicKey;
|
|
2314
2385
|
limitOrders: unknown;
|
|
2315
2386
|
takeProfitOrders: unknown;
|
|
@@ -2352,7 +2423,7 @@ export declare class PerpetualsClient {
|
|
|
2352
2423
|
}[];
|
|
2353
2424
|
markets: PublicKey[];
|
|
2354
2425
|
maxAumUsd: BN;
|
|
2355
|
-
buffer: BN;
|
|
2426
|
+
buffer: number | BN;
|
|
2356
2427
|
rawAumUsd: BN;
|
|
2357
2428
|
equityUsd: BN;
|
|
2358
2429
|
totalStaked: {
|
|
@@ -2383,6 +2454,9 @@ export declare class PerpetualsClient {
|
|
|
2383
2454
|
lpPrice: BN;
|
|
2384
2455
|
compoundingLpPrice: BN;
|
|
2385
2456
|
lastUpdatedTimestamp: BN;
|
|
2457
|
+
feesObligationUsd: BN;
|
|
2458
|
+
rebateObligationUsd: BN;
|
|
2459
|
+
thresholdUsd: BN;
|
|
2386
2460
|
delegate: PublicKey;
|
|
2387
2461
|
openTime: BN;
|
|
2388
2462
|
updateTime: BN;
|
|
@@ -2396,15 +2470,22 @@ export declare class PerpetualsClient {
|
|
|
2396
2470
|
lockedUsd: BN;
|
|
2397
2471
|
collateralAmount: BN;
|
|
2398
2472
|
collateralUsd: BN;
|
|
2399
|
-
|
|
2473
|
+
unsettledValueUsd: BN;
|
|
2400
2474
|
unsettledFeesUsd: BN;
|
|
2401
2475
|
cumulativeLockFeeSnapshot: BN;
|
|
2402
2476
|
degenSizeUsd: BN;
|
|
2477
|
+
referencePrice: {
|
|
2478
|
+
price: BN;
|
|
2479
|
+
exponent: number;
|
|
2480
|
+
};
|
|
2403
2481
|
sizeDecimals: number;
|
|
2404
2482
|
lockedDecimals: number;
|
|
2405
2483
|
collateralDecimals: number;
|
|
2406
2484
|
key: PublicKey;
|
|
2407
2485
|
feeAmount: BN;
|
|
2486
|
+
allowPayout: boolean;
|
|
2487
|
+
availableUsd: BN;
|
|
2488
|
+
availableAmount: BN;
|
|
2408
2489
|
refererTokenStakeAccount: PublicKey;
|
|
2409
2490
|
refererBoosterAccount: PublicKey;
|
|
2410
2491
|
level: number;
|
|
@@ -2418,6 +2499,7 @@ export declare class PerpetualsClient {
|
|
|
2418
2499
|
rewardTokens: BN;
|
|
2419
2500
|
unclaimedRevenueAmount: BN;
|
|
2420
2501
|
revenueSnapshot: BN;
|
|
2502
|
+
claimableRebateUsd: BN;
|
|
2421
2503
|
tokenMint: PublicKey;
|
|
2422
2504
|
tokenVaultTokenAccount: PublicKey;
|
|
2423
2505
|
tokenPermissions: {
|
|
@@ -2500,7 +2582,7 @@ export declare class PerpetualsClient {
|
|
|
2500
2582
|
maxUtilization: number;
|
|
2501
2583
|
degenPositionFactor: number;
|
|
2502
2584
|
degenExposureFactor: number;
|
|
2503
|
-
|
|
2585
|
+
maxPositionSizeUsd: BN;
|
|
2504
2586
|
maxExposureUsd: BN;
|
|
2505
2587
|
};
|
|
2506
2588
|
permissions: {
|
|
@@ -2593,7 +2675,7 @@ export declare class PerpetualsClient {
|
|
|
2593
2675
|
reservedAmount: BN;
|
|
2594
2676
|
minReserveUsd: BN;
|
|
2595
2677
|
limitPriceBufferBps: BN;
|
|
2596
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
2678
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2597
2679
|
owner: PublicKey;
|
|
2598
2680
|
stakeStats: {
|
|
2599
2681
|
pendingActivation: BN;
|
|
@@ -2627,7 +2709,7 @@ export declare class PerpetualsClient {
|
|
|
2627
2709
|
lockedAmount: BN;
|
|
2628
2710
|
lockedUsd: BN;
|
|
2629
2711
|
collateralAmount: BN;
|
|
2630
|
-
|
|
2712
|
+
collateralLiabilityUsd: BN;
|
|
2631
2713
|
unsettledFeeUsd: BN;
|
|
2632
2714
|
cumulativeLockFeeSnapshot: BN;
|
|
2633
2715
|
sizeDecimals: number;
|
|
@@ -2636,7 +2718,7 @@ export declare class PerpetualsClient {
|
|
|
2636
2718
|
};
|
|
2637
2719
|
targetCustodyUid: number;
|
|
2638
2720
|
collateralCustodyUid: number;
|
|
2639
|
-
padding2: number[] | BN[]
|
|
2721
|
+
padding2: number[] | BN[];
|
|
2640
2722
|
numSigners: number;
|
|
2641
2723
|
numSigned: number;
|
|
2642
2724
|
minSignatures: number;
|
|
@@ -2650,6 +2732,7 @@ export declare class PerpetualsClient {
|
|
|
2650
2732
|
conf: BN;
|
|
2651
2733
|
ema: BN;
|
|
2652
2734
|
publishTime: BN;
|
|
2735
|
+
extOracleAccount: PublicKey;
|
|
2653
2736
|
market: PublicKey;
|
|
2654
2737
|
limitOrders: unknown;
|
|
2655
2738
|
takeProfitOrders: unknown;
|
|
@@ -2692,7 +2775,7 @@ export declare class PerpetualsClient {
|
|
|
2692
2775
|
}[];
|
|
2693
2776
|
markets: PublicKey[];
|
|
2694
2777
|
maxAumUsd: BN;
|
|
2695
|
-
buffer: BN;
|
|
2778
|
+
buffer: number | BN;
|
|
2696
2779
|
rawAumUsd: BN;
|
|
2697
2780
|
equityUsd: BN;
|
|
2698
2781
|
totalStaked: {
|
|
@@ -2723,6 +2806,9 @@ export declare class PerpetualsClient {
|
|
|
2723
2806
|
lpPrice: BN;
|
|
2724
2807
|
compoundingLpPrice: BN;
|
|
2725
2808
|
lastUpdatedTimestamp: BN;
|
|
2809
|
+
feesObligationUsd: BN;
|
|
2810
|
+
rebateObligationUsd: BN;
|
|
2811
|
+
thresholdUsd: BN;
|
|
2726
2812
|
delegate: PublicKey;
|
|
2727
2813
|
openTime: BN;
|
|
2728
2814
|
updateTime: BN;
|
|
@@ -2736,15 +2822,22 @@ export declare class PerpetualsClient {
|
|
|
2736
2822
|
lockedUsd: BN;
|
|
2737
2823
|
collateralAmount: BN;
|
|
2738
2824
|
collateralUsd: BN;
|
|
2739
|
-
|
|
2825
|
+
unsettledValueUsd: BN;
|
|
2740
2826
|
unsettledFeesUsd: BN;
|
|
2741
2827
|
cumulativeLockFeeSnapshot: BN;
|
|
2742
2828
|
degenSizeUsd: BN;
|
|
2829
|
+
referencePrice: {
|
|
2830
|
+
price: BN;
|
|
2831
|
+
exponent: number;
|
|
2832
|
+
};
|
|
2743
2833
|
sizeDecimals: number;
|
|
2744
2834
|
lockedDecimals: number;
|
|
2745
2835
|
collateralDecimals: number;
|
|
2746
2836
|
key: PublicKey;
|
|
2747
2837
|
feeAmount: BN;
|
|
2838
|
+
allowPayout: boolean;
|
|
2839
|
+
availableUsd: BN;
|
|
2840
|
+
availableAmount: BN;
|
|
2748
2841
|
refererTokenStakeAccount: PublicKey;
|
|
2749
2842
|
refererBoosterAccount: PublicKey;
|
|
2750
2843
|
level: number;
|
|
@@ -2758,6 +2851,7 @@ export declare class PerpetualsClient {
|
|
|
2758
2851
|
rewardTokens: BN;
|
|
2759
2852
|
unclaimedRevenueAmount: BN;
|
|
2760
2853
|
revenueSnapshot: BN;
|
|
2854
|
+
claimableRebateUsd: BN;
|
|
2761
2855
|
tokenMint: PublicKey;
|
|
2762
2856
|
tokenVaultTokenAccount: PublicKey;
|
|
2763
2857
|
tokenPermissions: {
|
|
@@ -2818,11 +2912,15 @@ export declare class PerpetualsClient {
|
|
|
2818
2912
|
lockedUsd: BN;
|
|
2819
2913
|
collateralAmount: BN;
|
|
2820
2914
|
collateralUsd: BN;
|
|
2821
|
-
|
|
2915
|
+
unsettledValueUsd: BN;
|
|
2822
2916
|
unsettledFeesUsd: BN;
|
|
2823
2917
|
cumulativeLockFeeSnapshot: BN;
|
|
2824
2918
|
degenSizeUsd: BN;
|
|
2825
|
-
|
|
2919
|
+
referencePrice: {
|
|
2920
|
+
price: BN;
|
|
2921
|
+
exponent: number;
|
|
2922
|
+
};
|
|
2923
|
+
buffer: number;
|
|
2826
2924
|
sizeDecimals: number;
|
|
2827
2925
|
lockedDecimals: number;
|
|
2828
2926
|
collateralDecimals: number;
|
|
@@ -2887,7 +2985,7 @@ export declare class PerpetualsClient {
|
|
|
2887
2985
|
maxUtilization: number;
|
|
2888
2986
|
degenPositionFactor: number;
|
|
2889
2987
|
degenExposureFactor: number;
|
|
2890
|
-
|
|
2988
|
+
maxPositionSizeUsd: BN;
|
|
2891
2989
|
maxExposureUsd: BN;
|
|
2892
2990
|
};
|
|
2893
2991
|
permissions: {
|
|
@@ -2980,7 +3078,7 @@ export declare class PerpetualsClient {
|
|
|
2980
3078
|
reservedAmount: BN;
|
|
2981
3079
|
minReserveUsd: BN;
|
|
2982
3080
|
limitPriceBufferBps: BN;
|
|
2983
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3081
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
2984
3082
|
owner: PublicKey;
|
|
2985
3083
|
stakeStats: {
|
|
2986
3084
|
pendingActivation: BN;
|
|
@@ -3014,7 +3112,7 @@ export declare class PerpetualsClient {
|
|
|
3014
3112
|
lockedAmount: BN;
|
|
3015
3113
|
lockedUsd: BN;
|
|
3016
3114
|
collateralAmount: BN;
|
|
3017
|
-
|
|
3115
|
+
collateralLiabilityUsd: BN;
|
|
3018
3116
|
unsettledFeeUsd: BN;
|
|
3019
3117
|
cumulativeLockFeeSnapshot: BN;
|
|
3020
3118
|
sizeDecimals: number;
|
|
@@ -3023,7 +3121,7 @@ export declare class PerpetualsClient {
|
|
|
3023
3121
|
};
|
|
3024
3122
|
targetCustodyUid: number;
|
|
3025
3123
|
collateralCustodyUid: number;
|
|
3026
|
-
padding2: number[] | BN[]
|
|
3124
|
+
padding2: number[] | BN[];
|
|
3027
3125
|
numSigners: number;
|
|
3028
3126
|
numSigned: number;
|
|
3029
3127
|
minSignatures: number;
|
|
@@ -3037,6 +3135,7 @@ export declare class PerpetualsClient {
|
|
|
3037
3135
|
conf: BN;
|
|
3038
3136
|
ema: BN;
|
|
3039
3137
|
publishTime: BN;
|
|
3138
|
+
extOracleAccount: PublicKey;
|
|
3040
3139
|
market: PublicKey;
|
|
3041
3140
|
limitOrders: unknown;
|
|
3042
3141
|
takeProfitOrders: unknown;
|
|
@@ -3079,7 +3178,7 @@ export declare class PerpetualsClient {
|
|
|
3079
3178
|
}[];
|
|
3080
3179
|
markets: PublicKey[];
|
|
3081
3180
|
maxAumUsd: BN;
|
|
3082
|
-
buffer: BN;
|
|
3181
|
+
buffer: number | BN;
|
|
3083
3182
|
rawAumUsd: BN;
|
|
3084
3183
|
equityUsd: BN;
|
|
3085
3184
|
totalStaked: {
|
|
@@ -3110,6 +3209,9 @@ export declare class PerpetualsClient {
|
|
|
3110
3209
|
lpPrice: BN;
|
|
3111
3210
|
compoundingLpPrice: BN;
|
|
3112
3211
|
lastUpdatedTimestamp: BN;
|
|
3212
|
+
feesObligationUsd: BN;
|
|
3213
|
+
rebateObligationUsd: BN;
|
|
3214
|
+
thresholdUsd: BN;
|
|
3113
3215
|
delegate: PublicKey;
|
|
3114
3216
|
openTime: BN;
|
|
3115
3217
|
updateTime: BN;
|
|
@@ -3123,15 +3225,22 @@ export declare class PerpetualsClient {
|
|
|
3123
3225
|
lockedUsd: BN;
|
|
3124
3226
|
collateralAmount: BN;
|
|
3125
3227
|
collateralUsd: BN;
|
|
3126
|
-
|
|
3228
|
+
unsettledValueUsd: BN;
|
|
3127
3229
|
unsettledFeesUsd: BN;
|
|
3128
3230
|
cumulativeLockFeeSnapshot: BN;
|
|
3129
3231
|
degenSizeUsd: BN;
|
|
3232
|
+
referencePrice: {
|
|
3233
|
+
price: BN;
|
|
3234
|
+
exponent: number;
|
|
3235
|
+
};
|
|
3130
3236
|
sizeDecimals: number;
|
|
3131
3237
|
lockedDecimals: number;
|
|
3132
3238
|
collateralDecimals: number;
|
|
3133
3239
|
key: PublicKey;
|
|
3134
3240
|
feeAmount: BN;
|
|
3241
|
+
allowPayout: boolean;
|
|
3242
|
+
availableUsd: BN;
|
|
3243
|
+
availableAmount: BN;
|
|
3135
3244
|
refererTokenStakeAccount: PublicKey;
|
|
3136
3245
|
refererBoosterAccount: PublicKey;
|
|
3137
3246
|
level: number;
|
|
@@ -3145,6 +3254,7 @@ export declare class PerpetualsClient {
|
|
|
3145
3254
|
rewardTokens: BN;
|
|
3146
3255
|
unclaimedRevenueAmount: BN;
|
|
3147
3256
|
revenueSnapshot: BN;
|
|
3257
|
+
claimableRebateUsd: BN;
|
|
3148
3258
|
tokenMint: PublicKey;
|
|
3149
3259
|
tokenVaultTokenAccount: PublicKey;
|
|
3150
3260
|
tokenPermissions: {
|
|
@@ -3227,7 +3337,7 @@ export declare class PerpetualsClient {
|
|
|
3227
3337
|
maxUtilization: number;
|
|
3228
3338
|
degenPositionFactor: number;
|
|
3229
3339
|
degenExposureFactor: number;
|
|
3230
|
-
|
|
3340
|
+
maxPositionSizeUsd: BN;
|
|
3231
3341
|
maxExposureUsd: BN;
|
|
3232
3342
|
};
|
|
3233
3343
|
permissions: {
|
|
@@ -3320,7 +3430,7 @@ export declare class PerpetualsClient {
|
|
|
3320
3430
|
reservedAmount: BN;
|
|
3321
3431
|
minReserveUsd: BN;
|
|
3322
3432
|
limitPriceBufferBps: BN;
|
|
3323
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3433
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3324
3434
|
owner: PublicKey;
|
|
3325
3435
|
stakeStats: {
|
|
3326
3436
|
pendingActivation: BN;
|
|
@@ -3354,7 +3464,7 @@ export declare class PerpetualsClient {
|
|
|
3354
3464
|
lockedAmount: BN;
|
|
3355
3465
|
lockedUsd: BN;
|
|
3356
3466
|
collateralAmount: BN;
|
|
3357
|
-
|
|
3467
|
+
collateralLiabilityUsd: BN;
|
|
3358
3468
|
unsettledFeeUsd: BN;
|
|
3359
3469
|
cumulativeLockFeeSnapshot: BN;
|
|
3360
3470
|
sizeDecimals: number;
|
|
@@ -3363,7 +3473,7 @@ export declare class PerpetualsClient {
|
|
|
3363
3473
|
};
|
|
3364
3474
|
targetCustodyUid: number;
|
|
3365
3475
|
collateralCustodyUid: number;
|
|
3366
|
-
padding2: number[] | BN[]
|
|
3476
|
+
padding2: number[] | BN[];
|
|
3367
3477
|
numSigners: number;
|
|
3368
3478
|
numSigned: number;
|
|
3369
3479
|
minSignatures: number;
|
|
@@ -3377,6 +3487,7 @@ export declare class PerpetualsClient {
|
|
|
3377
3487
|
conf: BN;
|
|
3378
3488
|
ema: BN;
|
|
3379
3489
|
publishTime: BN;
|
|
3490
|
+
extOracleAccount: PublicKey;
|
|
3380
3491
|
market: PublicKey;
|
|
3381
3492
|
limitOrders: unknown;
|
|
3382
3493
|
takeProfitOrders: unknown;
|
|
@@ -3419,7 +3530,7 @@ export declare class PerpetualsClient {
|
|
|
3419
3530
|
}[];
|
|
3420
3531
|
markets: PublicKey[];
|
|
3421
3532
|
maxAumUsd: BN;
|
|
3422
|
-
buffer: BN;
|
|
3533
|
+
buffer: number | BN;
|
|
3423
3534
|
rawAumUsd: BN;
|
|
3424
3535
|
equityUsd: BN;
|
|
3425
3536
|
totalStaked: {
|
|
@@ -3450,6 +3561,9 @@ export declare class PerpetualsClient {
|
|
|
3450
3561
|
lpPrice: BN;
|
|
3451
3562
|
compoundingLpPrice: BN;
|
|
3452
3563
|
lastUpdatedTimestamp: BN;
|
|
3564
|
+
feesObligationUsd: BN;
|
|
3565
|
+
rebateObligationUsd: BN;
|
|
3566
|
+
thresholdUsd: BN;
|
|
3453
3567
|
delegate: PublicKey;
|
|
3454
3568
|
openTime: BN;
|
|
3455
3569
|
updateTime: BN;
|
|
@@ -3463,15 +3577,22 @@ export declare class PerpetualsClient {
|
|
|
3463
3577
|
lockedUsd: BN;
|
|
3464
3578
|
collateralAmount: BN;
|
|
3465
3579
|
collateralUsd: BN;
|
|
3466
|
-
|
|
3580
|
+
unsettledValueUsd: BN;
|
|
3467
3581
|
unsettledFeesUsd: BN;
|
|
3468
3582
|
cumulativeLockFeeSnapshot: BN;
|
|
3469
3583
|
degenSizeUsd: BN;
|
|
3584
|
+
referencePrice: {
|
|
3585
|
+
price: BN;
|
|
3586
|
+
exponent: number;
|
|
3587
|
+
};
|
|
3470
3588
|
sizeDecimals: number;
|
|
3471
3589
|
lockedDecimals: number;
|
|
3472
3590
|
collateralDecimals: number;
|
|
3473
3591
|
key: PublicKey;
|
|
3474
3592
|
feeAmount: BN;
|
|
3593
|
+
allowPayout: boolean;
|
|
3594
|
+
availableUsd: BN;
|
|
3595
|
+
availableAmount: BN;
|
|
3475
3596
|
refererTokenStakeAccount: PublicKey;
|
|
3476
3597
|
refererBoosterAccount: PublicKey;
|
|
3477
3598
|
level: number;
|
|
@@ -3485,6 +3606,7 @@ export declare class PerpetualsClient {
|
|
|
3485
3606
|
rewardTokens: BN;
|
|
3486
3607
|
unclaimedRevenueAmount: BN;
|
|
3487
3608
|
revenueSnapshot: BN;
|
|
3609
|
+
claimableRebateUsd: BN;
|
|
3488
3610
|
tokenMint: PublicKey;
|
|
3489
3611
|
tokenVaultTokenAccount: PublicKey;
|
|
3490
3612
|
tokenPermissions: {
|
|
@@ -3567,7 +3689,7 @@ export declare class PerpetualsClient {
|
|
|
3567
3689
|
maxUtilization: number;
|
|
3568
3690
|
degenPositionFactor: number;
|
|
3569
3691
|
degenExposureFactor: number;
|
|
3570
|
-
|
|
3692
|
+
maxPositionSizeUsd: BN;
|
|
3571
3693
|
maxExposureUsd: BN;
|
|
3572
3694
|
};
|
|
3573
3695
|
permissions: {
|
|
@@ -3660,7 +3782,7 @@ export declare class PerpetualsClient {
|
|
|
3660
3782
|
reservedAmount: BN;
|
|
3661
3783
|
minReserveUsd: BN;
|
|
3662
3784
|
limitPriceBufferBps: BN;
|
|
3663
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
3785
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
3664
3786
|
owner: PublicKey;
|
|
3665
3787
|
stakeStats: {
|
|
3666
3788
|
pendingActivation: BN;
|
|
@@ -3694,7 +3816,7 @@ export declare class PerpetualsClient {
|
|
|
3694
3816
|
lockedAmount: BN;
|
|
3695
3817
|
lockedUsd: BN;
|
|
3696
3818
|
collateralAmount: BN;
|
|
3697
|
-
|
|
3819
|
+
collateralLiabilityUsd: BN;
|
|
3698
3820
|
unsettledFeeUsd: BN;
|
|
3699
3821
|
cumulativeLockFeeSnapshot: BN;
|
|
3700
3822
|
sizeDecimals: number;
|
|
@@ -3703,7 +3825,7 @@ export declare class PerpetualsClient {
|
|
|
3703
3825
|
};
|
|
3704
3826
|
targetCustodyUid: number;
|
|
3705
3827
|
collateralCustodyUid: number;
|
|
3706
|
-
padding2: number[] | BN[]
|
|
3828
|
+
padding2: number[] | BN[];
|
|
3707
3829
|
numSigners: number;
|
|
3708
3830
|
numSigned: number;
|
|
3709
3831
|
minSignatures: number;
|
|
@@ -3717,6 +3839,7 @@ export declare class PerpetualsClient {
|
|
|
3717
3839
|
conf: BN;
|
|
3718
3840
|
ema: BN;
|
|
3719
3841
|
publishTime: BN;
|
|
3842
|
+
extOracleAccount: PublicKey;
|
|
3720
3843
|
market: PublicKey;
|
|
3721
3844
|
limitOrders: unknown;
|
|
3722
3845
|
takeProfitOrders: unknown;
|
|
@@ -3759,7 +3882,7 @@ export declare class PerpetualsClient {
|
|
|
3759
3882
|
}[];
|
|
3760
3883
|
markets: PublicKey[];
|
|
3761
3884
|
maxAumUsd: BN;
|
|
3762
|
-
buffer: BN;
|
|
3885
|
+
buffer: number | BN;
|
|
3763
3886
|
rawAumUsd: BN;
|
|
3764
3887
|
equityUsd: BN;
|
|
3765
3888
|
totalStaked: {
|
|
@@ -3790,6 +3913,9 @@ export declare class PerpetualsClient {
|
|
|
3790
3913
|
lpPrice: BN;
|
|
3791
3914
|
compoundingLpPrice: BN;
|
|
3792
3915
|
lastUpdatedTimestamp: BN;
|
|
3916
|
+
feesObligationUsd: BN;
|
|
3917
|
+
rebateObligationUsd: BN;
|
|
3918
|
+
thresholdUsd: BN;
|
|
3793
3919
|
delegate: PublicKey;
|
|
3794
3920
|
openTime: BN;
|
|
3795
3921
|
updateTime: BN;
|
|
@@ -3803,15 +3929,22 @@ export declare class PerpetualsClient {
|
|
|
3803
3929
|
lockedUsd: BN;
|
|
3804
3930
|
collateralAmount: BN;
|
|
3805
3931
|
collateralUsd: BN;
|
|
3806
|
-
|
|
3932
|
+
unsettledValueUsd: BN;
|
|
3807
3933
|
unsettledFeesUsd: BN;
|
|
3808
3934
|
cumulativeLockFeeSnapshot: BN;
|
|
3809
3935
|
degenSizeUsd: BN;
|
|
3936
|
+
referencePrice: {
|
|
3937
|
+
price: BN;
|
|
3938
|
+
exponent: number;
|
|
3939
|
+
};
|
|
3810
3940
|
sizeDecimals: number;
|
|
3811
3941
|
lockedDecimals: number;
|
|
3812
3942
|
collateralDecimals: number;
|
|
3813
3943
|
key: PublicKey;
|
|
3814
3944
|
feeAmount: BN;
|
|
3945
|
+
allowPayout: boolean;
|
|
3946
|
+
availableUsd: BN;
|
|
3947
|
+
availableAmount: BN;
|
|
3815
3948
|
refererTokenStakeAccount: PublicKey;
|
|
3816
3949
|
refererBoosterAccount: PublicKey;
|
|
3817
3950
|
level: number;
|
|
@@ -3825,6 +3958,7 @@ export declare class PerpetualsClient {
|
|
|
3825
3958
|
rewardTokens: BN;
|
|
3826
3959
|
unclaimedRevenueAmount: BN;
|
|
3827
3960
|
revenueSnapshot: BN;
|
|
3961
|
+
claimableRebateUsd: BN;
|
|
3828
3962
|
tokenMint: PublicKey;
|
|
3829
3963
|
tokenVaultTokenAccount: PublicKey;
|
|
3830
3964
|
tokenPermissions: {
|
|
@@ -3907,7 +4041,7 @@ export declare class PerpetualsClient {
|
|
|
3907
4041
|
maxUtilization: number;
|
|
3908
4042
|
degenPositionFactor: number;
|
|
3909
4043
|
degenExposureFactor: number;
|
|
3910
|
-
|
|
4044
|
+
maxPositionSizeUsd: BN;
|
|
3911
4045
|
maxExposureUsd: BN;
|
|
3912
4046
|
};
|
|
3913
4047
|
permissions: {
|
|
@@ -4000,7 +4134,7 @@ export declare class PerpetualsClient {
|
|
|
4000
4134
|
reservedAmount: BN;
|
|
4001
4135
|
minReserveUsd: BN;
|
|
4002
4136
|
limitPriceBufferBps: BN;
|
|
4003
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
4137
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4004
4138
|
owner: PublicKey;
|
|
4005
4139
|
stakeStats: {
|
|
4006
4140
|
pendingActivation: BN;
|
|
@@ -4034,7 +4168,7 @@ export declare class PerpetualsClient {
|
|
|
4034
4168
|
lockedAmount: BN;
|
|
4035
4169
|
lockedUsd: BN;
|
|
4036
4170
|
collateralAmount: BN;
|
|
4037
|
-
|
|
4171
|
+
collateralLiabilityUsd: BN;
|
|
4038
4172
|
unsettledFeeUsd: BN;
|
|
4039
4173
|
cumulativeLockFeeSnapshot: BN;
|
|
4040
4174
|
sizeDecimals: number;
|
|
@@ -4043,7 +4177,7 @@ export declare class PerpetualsClient {
|
|
|
4043
4177
|
};
|
|
4044
4178
|
targetCustodyUid: number;
|
|
4045
4179
|
collateralCustodyUid: number;
|
|
4046
|
-
padding2: number[] | BN[]
|
|
4180
|
+
padding2: number[] | BN[];
|
|
4047
4181
|
numSigners: number;
|
|
4048
4182
|
numSigned: number;
|
|
4049
4183
|
minSignatures: number;
|
|
@@ -4057,6 +4191,7 @@ export declare class PerpetualsClient {
|
|
|
4057
4191
|
conf: BN;
|
|
4058
4192
|
ema: BN;
|
|
4059
4193
|
publishTime: BN;
|
|
4194
|
+
extOracleAccount: PublicKey;
|
|
4060
4195
|
market: PublicKey;
|
|
4061
4196
|
limitOrders: unknown;
|
|
4062
4197
|
takeProfitOrders: unknown;
|
|
@@ -4099,7 +4234,7 @@ export declare class PerpetualsClient {
|
|
|
4099
4234
|
}[];
|
|
4100
4235
|
markets: PublicKey[];
|
|
4101
4236
|
maxAumUsd: BN;
|
|
4102
|
-
buffer: BN;
|
|
4237
|
+
buffer: number | BN;
|
|
4103
4238
|
rawAumUsd: BN;
|
|
4104
4239
|
equityUsd: BN;
|
|
4105
4240
|
totalStaked: {
|
|
@@ -4130,6 +4265,9 @@ export declare class PerpetualsClient {
|
|
|
4130
4265
|
lpPrice: BN;
|
|
4131
4266
|
compoundingLpPrice: BN;
|
|
4132
4267
|
lastUpdatedTimestamp: BN;
|
|
4268
|
+
feesObligationUsd: BN;
|
|
4269
|
+
rebateObligationUsd: BN;
|
|
4270
|
+
thresholdUsd: BN;
|
|
4133
4271
|
delegate: PublicKey;
|
|
4134
4272
|
openTime: BN;
|
|
4135
4273
|
updateTime: BN;
|
|
@@ -4143,15 +4281,22 @@ export declare class PerpetualsClient {
|
|
|
4143
4281
|
lockedUsd: BN;
|
|
4144
4282
|
collateralAmount: BN;
|
|
4145
4283
|
collateralUsd: BN;
|
|
4146
|
-
|
|
4284
|
+
unsettledValueUsd: BN;
|
|
4147
4285
|
unsettledFeesUsd: BN;
|
|
4148
4286
|
cumulativeLockFeeSnapshot: BN;
|
|
4149
4287
|
degenSizeUsd: BN;
|
|
4288
|
+
referencePrice: {
|
|
4289
|
+
price: BN;
|
|
4290
|
+
exponent: number;
|
|
4291
|
+
};
|
|
4150
4292
|
sizeDecimals: number;
|
|
4151
4293
|
lockedDecimals: number;
|
|
4152
4294
|
collateralDecimals: number;
|
|
4153
4295
|
key: PublicKey;
|
|
4154
4296
|
feeAmount: BN;
|
|
4297
|
+
allowPayout: boolean;
|
|
4298
|
+
availableUsd: BN;
|
|
4299
|
+
availableAmount: BN;
|
|
4155
4300
|
refererTokenStakeAccount: PublicKey;
|
|
4156
4301
|
refererBoosterAccount: PublicKey;
|
|
4157
4302
|
level: number;
|
|
@@ -4165,6 +4310,7 @@ export declare class PerpetualsClient {
|
|
|
4165
4310
|
rewardTokens: BN;
|
|
4166
4311
|
unclaimedRevenueAmount: BN;
|
|
4167
4312
|
revenueSnapshot: BN;
|
|
4313
|
+
claimableRebateUsd: BN;
|
|
4168
4314
|
tokenMint: PublicKey;
|
|
4169
4315
|
tokenVaultTokenAccount: PublicKey;
|
|
4170
4316
|
tokenPermissions: {
|
|
@@ -4247,7 +4393,7 @@ export declare class PerpetualsClient {
|
|
|
4247
4393
|
maxUtilization: number;
|
|
4248
4394
|
degenPositionFactor: number;
|
|
4249
4395
|
degenExposureFactor: number;
|
|
4250
|
-
|
|
4396
|
+
maxPositionSizeUsd: BN;
|
|
4251
4397
|
maxExposureUsd: BN;
|
|
4252
4398
|
};
|
|
4253
4399
|
permissions: {
|
|
@@ -4340,7 +4486,7 @@ export declare class PerpetualsClient {
|
|
|
4340
4486
|
reservedAmount: BN;
|
|
4341
4487
|
minReserveUsd: BN;
|
|
4342
4488
|
limitPriceBufferBps: BN;
|
|
4343
|
-
padding: number[] | number[] | number[] | BN[] | number[] |
|
|
4489
|
+
padding: number[] | number[] | number[] | BN[] | number[] | number[] | BN[] | BN[] | BN[] | number[];
|
|
4344
4490
|
owner: PublicKey;
|
|
4345
4491
|
stakeStats: {
|
|
4346
4492
|
pendingActivation: BN;
|
|
@@ -4374,7 +4520,7 @@ export declare class PerpetualsClient {
|
|
|
4374
4520
|
lockedAmount: BN;
|
|
4375
4521
|
lockedUsd: BN;
|
|
4376
4522
|
collateralAmount: BN;
|
|
4377
|
-
|
|
4523
|
+
collateralLiabilityUsd: BN;
|
|
4378
4524
|
unsettledFeeUsd: BN;
|
|
4379
4525
|
cumulativeLockFeeSnapshot: BN;
|
|
4380
4526
|
sizeDecimals: number;
|
|
@@ -4383,7 +4529,7 @@ export declare class PerpetualsClient {
|
|
|
4383
4529
|
};
|
|
4384
4530
|
targetCustodyUid: number;
|
|
4385
4531
|
collateralCustodyUid: number;
|
|
4386
|
-
padding2: number[] | BN[]
|
|
4532
|
+
padding2: number[] | BN[];
|
|
4387
4533
|
numSigners: number;
|
|
4388
4534
|
numSigned: number;
|
|
4389
4535
|
minSignatures: number;
|
|
@@ -4397,6 +4543,7 @@ export declare class PerpetualsClient {
|
|
|
4397
4543
|
conf: BN;
|
|
4398
4544
|
ema: BN;
|
|
4399
4545
|
publishTime: BN;
|
|
4546
|
+
extOracleAccount: PublicKey;
|
|
4400
4547
|
market: PublicKey;
|
|
4401
4548
|
limitOrders: unknown;
|
|
4402
4549
|
takeProfitOrders: unknown;
|
|
@@ -4439,7 +4586,7 @@ export declare class PerpetualsClient {
|
|
|
4439
4586
|
}[];
|
|
4440
4587
|
markets: PublicKey[];
|
|
4441
4588
|
maxAumUsd: BN;
|
|
4442
|
-
buffer: BN;
|
|
4589
|
+
buffer: number | BN;
|
|
4443
4590
|
rawAumUsd: BN;
|
|
4444
4591
|
equityUsd: BN;
|
|
4445
4592
|
totalStaked: {
|
|
@@ -4470,6 +4617,9 @@ export declare class PerpetualsClient {
|
|
|
4470
4617
|
lpPrice: BN;
|
|
4471
4618
|
compoundingLpPrice: BN;
|
|
4472
4619
|
lastUpdatedTimestamp: BN;
|
|
4620
|
+
feesObligationUsd: BN;
|
|
4621
|
+
rebateObligationUsd: BN;
|
|
4622
|
+
thresholdUsd: BN;
|
|
4473
4623
|
delegate: PublicKey;
|
|
4474
4624
|
openTime: BN;
|
|
4475
4625
|
updateTime: BN;
|
|
@@ -4483,15 +4633,22 @@ export declare class PerpetualsClient {
|
|
|
4483
4633
|
lockedUsd: BN;
|
|
4484
4634
|
collateralAmount: BN;
|
|
4485
4635
|
collateralUsd: BN;
|
|
4486
|
-
|
|
4636
|
+
unsettledValueUsd: BN;
|
|
4487
4637
|
unsettledFeesUsd: BN;
|
|
4488
4638
|
cumulativeLockFeeSnapshot: BN;
|
|
4489
4639
|
degenSizeUsd: BN;
|
|
4640
|
+
referencePrice: {
|
|
4641
|
+
price: BN;
|
|
4642
|
+
exponent: number;
|
|
4643
|
+
};
|
|
4490
4644
|
sizeDecimals: number;
|
|
4491
4645
|
lockedDecimals: number;
|
|
4492
4646
|
collateralDecimals: number;
|
|
4493
4647
|
key: PublicKey;
|
|
4494
4648
|
feeAmount: BN;
|
|
4649
|
+
allowPayout: boolean;
|
|
4650
|
+
availableUsd: BN;
|
|
4651
|
+
availableAmount: BN;
|
|
4495
4652
|
refererTokenStakeAccount: PublicKey;
|
|
4496
4653
|
refererBoosterAccount: PublicKey;
|
|
4497
4654
|
level: number;
|
|
@@ -4505,6 +4662,7 @@ export declare class PerpetualsClient {
|
|
|
4505
4662
|
rewardTokens: BN;
|
|
4506
4663
|
unclaimedRevenueAmount: BN;
|
|
4507
4664
|
revenueSnapshot: BN;
|
|
4665
|
+
claimableRebateUsd: BN;
|
|
4508
4666
|
tokenMint: PublicKey;
|
|
4509
4667
|
tokenVaultTokenAccount: PublicKey;
|
|
4510
4668
|
tokenPermissions: {
|
|
@@ -4568,9 +4726,9 @@ export declare class PerpetualsClient {
|
|
|
4568
4726
|
getMinAndMaxPriceSync: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount) => MinAndMaxPrice;
|
|
4569
4727
|
checkIfPriceStaleOrCustom: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount, timestampInSeconds: BN) => boolean;
|
|
4570
4728
|
getAveragePriceSync: (price1: BN, size1: BN, price2: BN, size2: BN) => BN;
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4729
|
+
getLeverageContractHelper: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, isInitial: boolean, poolConfig: PoolConfig) => BN;
|
|
4730
|
+
getLeverageSync: (positionAccount: PositionAccount, finalCollateralUsd: BN, finalSizeUsd: BN, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, isInitial: boolean, poolConfig: PoolConfig) => BN;
|
|
4731
|
+
getLeverageAtAmountEntryWithSwapSync: (positionAccount: PositionAccount | null, inputDeltaAmount: BN, sizeDeltaAmount: BN, side: Side, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, swapOutTokenPrice: OraclePrice, swapOutTokenEmaPrice: OraclePrice, swapOutTokenCustodyAccount: CustodyAccount, collateralTokenPrice: OraclePrice, collateralTokenEmaPrice: OraclePrice, collateralTokenCustodyAccount: CustodyAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetTokenCustodyAccount: CustodyAccount, swapPoolAumUsdMax: BN, poolConfig: PoolConfig, pnlUsd: BN) => BN;
|
|
4574
4732
|
getEntryPriceAndFeeSyncV2: (positionAccount: PositionAccount | null, marketCorrelation: boolean, collateralDeltaAmount: BN, sizeDeltaAmount: BN, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, discountBps?: BN, enableLogs?: boolean) => EntryPriceAndFeeV2;
|
|
4575
4733
|
getEntryPriceUsdSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
|
4576
4734
|
getPriceAfterSlippage(isEntry: boolean, slippageBps: BN, targetPrice: OraclePrice, side: Side): ContractOraclePrice;
|
|
@@ -4581,29 +4739,33 @@ export declare class PerpetualsClient {
|
|
|
4581
4739
|
getExitPriceAndFeeSync: (positionAccount: PositionAccount, marketCorrelation: boolean, collateralDeltaAmount: BN, sizeDeltaAmount: BN, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, discountBps?: BN) => ExitPriceAndFee;
|
|
4582
4740
|
getTradeSpread: (targetCustodyAccount: CustodyAccount, sizeUsd: BN) => BN;
|
|
4583
4741
|
getExitOraclePriceSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
|
4584
|
-
getExitOraclePriceWithoutSpreadSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
|
4585
4742
|
getSizeAmountFromLeverageAndCollateral: (collateralAmtWithFee: BN, leverage: string, marketToken: Token, collateralToken: Token, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, discountBps?: BN) => BN;
|
|
4586
|
-
getSizeAmountWithSwapSync: (amountIn: BN, leverage: string, side: Side, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, collateralTokenPrice: OraclePrice, collateralTokenEmaPrice: OraclePrice, collateralTokenCustodyAccount: CustodyAccount, swapOutTokenPrice: OraclePrice, swapOutTokenEmaPrice: OraclePrice, swapOutTokenCustodyAccount: CustodyAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetTokenCustodyAccount: CustodyAccount, swapPoolAumUsdMax: BN,
|
|
4743
|
+
getSizeAmountWithSwapSync: (amountIn: BN, leverage: string, side: Side, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, collateralTokenPrice: OraclePrice, collateralTokenEmaPrice: OraclePrice, collateralTokenCustodyAccount: CustodyAccount, swapOutTokenPrice: OraclePrice, swapOutTokenEmaPrice: OraclePrice, swapOutTokenCustodyAccount: CustodyAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetTokenCustodyAccount: CustodyAccount, swapPoolAumUsdMax: BN, poolConfig: PoolConfig, discountBps?: BN) => BN;
|
|
4587
4744
|
getCollateralAmountWithFeeFromLeverageAndSize: (sizeAmount: BN, leverage: string, marketToken: Token, collateralToken: Token, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, discountBps?: BN) => BN;
|
|
4588
|
-
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,
|
|
4589
|
-
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;
|
|
4590
|
-
getMaxWithdrawableAmountSyncInternal: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig,
|
|
4745
|
+
getCollateralAmountWithSwapSync: (sizeAmount: BN, leverage: string, side: Side, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, swapOutTokenPrice: OraclePrice, swapOutTokenEmaPrice: OraclePrice, swapOutTokenCustodyAccount: CustodyAccount, collateralTokenPrice: OraclePrice, collateralTokenEmaPrice: OraclePrice, collateralTokenCustodyAccount: CustodyAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetTokenCustodyAccount: CustodyAccount, swapPoolAumUsdMax: BN, poolConfig: PoolConfig) => BN;
|
|
4746
|
+
getDecreaseSizeCollateralAndFeeSync: (positionAccount: PositionAccount, marketCorrelation: boolean, maxPayOffBps: BN, sizeDeltaUsd: BN, keepLevSame: boolean, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, marketConfig: MarketConfig, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, side: Side, poolConfig: PoolConfig, discountBps?: BN, debugLogs?: boolean) => RemoveCollateralData;
|
|
4747
|
+
getMaxWithdrawableAmountSyncInternal: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => {
|
|
4591
4748
|
maxWithdrawableAmount: BN;
|
|
4592
|
-
|
|
4749
|
+
maxWithdrawableAmountUsd: BN;
|
|
4750
|
+
diffUsd: BN;
|
|
4593
4751
|
};
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
|
|
4752
|
+
getFinalCloseAmountUsdSync: (positionAccount: PositionAccount, marketCorrelation: boolean, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig) => {
|
|
4753
|
+
closeAmountUsd: BN;
|
|
4754
|
+
feesAmountUsd: BN;
|
|
4755
|
+
};
|
|
4756
|
+
getMaxWithdrawableAmountSync: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => {
|
|
4757
|
+
maxWithdrawableAmount: BN;
|
|
4758
|
+
maxWithdrawableAmountUsd: BN;
|
|
4597
4759
|
};
|
|
4598
|
-
getMaxWithdrawableAmountSync: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => BN;
|
|
4599
4760
|
getCumulativeLockFeeSync: (custodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
|
4600
4761
|
getBorrowRateSync: (custodyAccount: CustodyAccount, currentUtilization: BN) => BN;
|
|
4601
4762
|
getLockFeeAndUnsettledUsdForPosition: (position: PositionAccount, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
|
4602
|
-
getLockedUsd: (
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4763
|
+
getLockedUsd: (sizeUsd: BN, collateralUsd: BN, side: Side, marketCorrelation: boolean, maxPayOffBps: BN) => BN;
|
|
4764
|
+
getLiquidationPriceContractHelper: (entryOraclePrice: OraclePrice, lockAndUnsettledFeeUsd: BN, side: Side, targetCustodyAccount: CustodyAccount, positionAccount: PositionAccount) => OraclePrice;
|
|
4765
|
+
getLiquidationPriceSync: (collateralUsd: BN, sizeAmount: BN, entryOraclePrice: OraclePrice, lockAndUnsettledFeeUsd: BN, side: Side, targetPrice: OraclePrice, targetCustodyAccount: CustodyAccount, positionAccount: PositionAccount) => OraclePrice;
|
|
4766
|
+
getLiquidationPriceWithOrder: (collateralUsd: BN, sizeAmount: BN, sizeUsd: BN, sizeDecimals: number, limitOraclePrice: OraclePrice, side: Side, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
|
4767
|
+
getMaxProfitPriceSync: (entryPrice: OraclePrice, marketCorrelation: boolean, side: Side, collateralPrice: OraclePrice, positionAccount: PositionAccount) => OraclePrice;
|
|
4768
|
+
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) => {
|
|
4607
4769
|
pnlUsd: BN;
|
|
4608
4770
|
pnlPercentage: BN;
|
|
4609
4771
|
};
|
|
@@ -4613,6 +4775,10 @@ export declare class PerpetualsClient {
|
|
|
4613
4775
|
profitUsd: BN;
|
|
4614
4776
|
lossUsd: BN;
|
|
4615
4777
|
};
|
|
4778
|
+
getPnlContractHelper: (positionAccount: PositionAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, delay: BN, poolConfig: PoolConfig) => {
|
|
4779
|
+
profitUsd: BN;
|
|
4780
|
+
lossUsd: BN;
|
|
4781
|
+
};
|
|
4616
4782
|
getSwapAmountAndFeesSync: (amountIn: BN, amountOut: BN, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, outputTokenPrice: OraclePrice, outputTokenEmaPrice: OraclePrice, outputTokenCustodyAccount: CustodyAccount, poolAumUsdMax: BN, poolConfig: PoolConfig) => {
|
|
4617
4783
|
minAmountOut: BN;
|
|
4618
4784
|
minAmountIn: BN;
|
|
@@ -4623,8 +4789,9 @@ export declare class PerpetualsClient {
|
|
|
4623
4789
|
poolAmountUsd: BN;
|
|
4624
4790
|
poolEquityUsd: BN;
|
|
4625
4791
|
};
|
|
4626
|
-
|
|
4627
|
-
|
|
4792
|
+
getAssetsUnderManagementUsdContractHelper: (poolAccount: PoolAccount, tokenPrices: OraclePrice[], tokenEmaPrices: OraclePrice[], custodies: CustodyAccount[], markets: MarketAccount[], aumCalcMode: "includePnl" | "excludePnl", currentTime: BN, poolConfig: PoolConfig) => {
|
|
4793
|
+
poolAmountUsd: BN;
|
|
4794
|
+
poolEquityUsd: BN;
|
|
4628
4795
|
};
|
|
4629
4796
|
getFeeDiscount: (perpetualsAccount: PerpetualsAccount, tokenStakeAccount: TokenStake, currentTime: BN) => {
|
|
4630
4797
|
discountBn: BN;
|
|
@@ -4634,12 +4801,14 @@ export declare class PerpetualsClient {
|
|
|
4634
4801
|
getStakedLpTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4635
4802
|
getAssetsUnderManagement: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4636
4803
|
getAddLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
4637
|
-
amount: BN;
|
|
4638
|
-
fee: BN;
|
|
4804
|
+
amount: BN | undefined;
|
|
4805
|
+
fee: BN | undefined;
|
|
4806
|
+
error?: string;
|
|
4639
4807
|
}>;
|
|
4640
4808
|
getRemoveLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, removeTokenCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
4641
4809
|
amount: BN;
|
|
4642
4810
|
fee: BN;
|
|
4811
|
+
error?: string;
|
|
4643
4812
|
}>;
|
|
4644
4813
|
getCompoundingLPTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
|
4645
4814
|
getAddCompoundingLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined, enableBackupOracle?: boolean) => Promise<{
|
|
@@ -4654,19 +4823,19 @@ export declare class PerpetualsClient {
|
|
|
4654
4823
|
getLiquidationStateView: (positionAccount: PublicKey, poolName: string, tokenMint: PublicKey, collateralMint: PublicKey, poolConfig: PoolConfig) => Promise<any>;
|
|
4655
4824
|
getCompoundingTokenDataView: (poolConfig: PoolConfig) => Promise<any>;
|
|
4656
4825
|
getLpTokenPriceView: (poolConfig: PoolConfig) => Promise<any>;
|
|
4657
|
-
openPosition: (targetSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, collateralWithfee: BN, size: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey,
|
|
4826
|
+
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<{
|
|
4658
4827
|
instructions: TransactionInstruction[];
|
|
4659
4828
|
additionalSigners: Signer[];
|
|
4660
4829
|
}>;
|
|
4661
|
-
closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey,
|
|
4830
|
+
closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4662
4831
|
instructions: TransactionInstruction[];
|
|
4663
4832
|
additionalSigners: Signer[];
|
|
4664
4833
|
}>;
|
|
4665
|
-
swapAndOpen: (targetTokenSymbol: string, collateralTokenSymbol: string, userInputTokenSymbol: string, amountIn: BN,
|
|
4834
|
+
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<{
|
|
4666
4835
|
instructions: TransactionInstruction[];
|
|
4667
4836
|
additionalSigners: Signer[];
|
|
4668
4837
|
}>;
|
|
4669
|
-
closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string,
|
|
4838
|
+
closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, ephemeralSignerPubkey?: any) => Promise<{
|
|
4670
4839
|
instructions: TransactionInstruction[];
|
|
4671
4840
|
additionalSigners: Signer[];
|
|
4672
4841
|
}>;
|
|
@@ -4674,23 +4843,23 @@ export declare class PerpetualsClient {
|
|
|
4674
4843
|
instructions: TransactionInstruction[];
|
|
4675
4844
|
additionalSigners: Signer[];
|
|
4676
4845
|
}>;
|
|
4677
|
-
swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN,
|
|
4846
|
+
swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4678
4847
|
instructions: TransactionInstruction[];
|
|
4679
4848
|
additionalSigners: Signer[];
|
|
4680
4849
|
}>;
|
|
4681
|
-
removeCollateral: (
|
|
4850
|
+
removeCollateral: (collateralDeltaUsd: BN, marketSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
|
4682
4851
|
instructions: TransactionInstruction[];
|
|
4683
4852
|
additionalSigners: Signer[];
|
|
4684
4853
|
}>;
|
|
4685
|
-
removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string,
|
|
4854
|
+
removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string, collateralDeltaUsd: BN, side: Side, poolConfig: PoolConfig, ephemeralSignerPubkey?: any) => Promise<{
|
|
4686
4855
|
instructions: TransactionInstruction[];
|
|
4687
4856
|
additionalSigners: Signer[];
|
|
4688
4857
|
}>;
|
|
4689
|
-
increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4858
|
+
increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4690
4859
|
instructions: TransactionInstruction[];
|
|
4691
4860
|
additionalSigners: Signer[];
|
|
4692
4861
|
}>;
|
|
4693
|
-
decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4862
|
+
decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4694
4863
|
instructions: TransactionInstruction[];
|
|
4695
4864
|
additionalSigners: Signer[];
|
|
4696
4865
|
}>;
|
|
@@ -4710,14 +4879,6 @@ export declare class PerpetualsClient {
|
|
|
4710
4879
|
instructions: TransactionInstruction[];
|
|
4711
4880
|
additionalSigners: Signer[];
|
|
4712
4881
|
}>;
|
|
4713
|
-
updateNftAccount: (nftMint: PublicKey, updateReferer: boolean, updateBooster: boolean, flpStakeAccounts: PublicKey[]) => Promise<{
|
|
4714
|
-
instructions: TransactionInstruction[];
|
|
4715
|
-
additionalSigners: Signer[];
|
|
4716
|
-
}>;
|
|
4717
|
-
levelUp: (poolConfig: PoolConfig, nftMint: PublicKey, authorizationRulesAccount: PublicKey) => Promise<{
|
|
4718
|
-
instructions: TransactionInstruction[];
|
|
4719
|
-
additionalSigners: Signer[];
|
|
4720
|
-
}>;
|
|
4721
4882
|
depositStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
4722
4883
|
instructions: TransactionInstruction[];
|
|
4723
4884
|
additionalSigners: Signer[];
|
|
@@ -4761,14 +4922,6 @@ export declare class PerpetualsClient {
|
|
|
4761
4922
|
instructions: TransactionInstruction[];
|
|
4762
4923
|
additionalSigners: Signer[];
|
|
4763
4924
|
}>;
|
|
4764
|
-
burnAndClaim: (owner: PublicKey, nftMint: PublicKey, poolConfig: PoolConfig, createAta: boolean) => Promise<{
|
|
4765
|
-
instructions: TransactionInstruction[];
|
|
4766
|
-
additionalSigners: Signer[];
|
|
4767
|
-
}>;
|
|
4768
|
-
burnAndStake: (owner: PublicKey, feePayer: PublicKey, nftMint: PublicKey, poolConfig: PoolConfig) => Promise<{
|
|
4769
|
-
instructions: TransactionInstruction[];
|
|
4770
|
-
additionalSigners: Signer[];
|
|
4771
|
-
}>;
|
|
4772
4925
|
depositTokenStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
|
4773
4926
|
instructions: TransactionInstruction[];
|
|
4774
4927
|
additionalSigners: Signer[];
|
|
@@ -4797,19 +4950,11 @@ export declare class PerpetualsClient {
|
|
|
4797
4950
|
instructions: TransactionInstruction[];
|
|
4798
4951
|
additionalSigners: Signer[];
|
|
4799
4952
|
}>;
|
|
4800
|
-
|
|
4801
|
-
instructions: TransactionInstruction[];
|
|
4802
|
-
additionalSigners: Signer[];
|
|
4803
|
-
}>;
|
|
4804
|
-
distributeReward: (rewardAmount: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4805
|
-
instructions: TransactionInstruction[];
|
|
4806
|
-
additionalSigners: Signer[];
|
|
4807
|
-
}>;
|
|
4808
|
-
collectNftReward: (rewardSymbol: string, poolConfig: PoolConfig, nftMint: PublicKey, createUserATA?: boolean) => Promise<{
|
|
4953
|
+
collectRebate: (owner: PublicKey, rebateSymbol: string, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
|
|
4809
4954
|
instructions: TransactionInstruction[];
|
|
4810
4955
|
additionalSigners: Signer[];
|
|
4811
4956
|
}>;
|
|
4812
|
-
|
|
4957
|
+
settleRebates: (rebateSymbol: string, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4813
4958
|
instructions: TransactionInstruction[];
|
|
4814
4959
|
additionalSigners: Signer[];
|
|
4815
4960
|
}>;
|
|
@@ -4821,11 +4966,11 @@ export declare class PerpetualsClient {
|
|
|
4821
4966
|
instructions: TransactionInstruction[];
|
|
4822
4967
|
additionalSigners: Signer[];
|
|
4823
4968
|
}>;
|
|
4824
|
-
executeLimitOrder: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4969
|
+
executeLimitOrder: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4825
4970
|
instructions: TransactionInstruction[];
|
|
4826
4971
|
additionalSigners: Signer[];
|
|
4827
4972
|
}>;
|
|
4828
|
-
executeLimitWithSwap: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey
|
|
4973
|
+
executeLimitWithSwap: (userPubkey: PublicKey, targetSymbol: string, collateralSymbol: string, reserveSymbol: string, side: Side, orderId: number, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
|
|
4829
4974
|
instructions: TransactionInstruction[];
|
|
4830
4975
|
additionalSigners: Signer[];
|
|
4831
4976
|
}>;
|
|
@@ -4845,11 +4990,11 @@ export declare class PerpetualsClient {
|
|
|
4845
4990
|
instructions: TransactionInstruction[];
|
|
4846
4991
|
additionalSigners: Signer[];
|
|
4847
4992
|
}>;
|
|
4848
|
-
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
|
|
4993
|
+
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<{
|
|
4849
4994
|
instructions: TransactionInstruction[];
|
|
4850
4995
|
additionalSigners: Signer[];
|
|
4851
4996
|
}>;
|
|
4852
|
-
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
|
|
4997
|
+
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<{
|
|
4853
4998
|
instructions: TransactionInstruction[];
|
|
4854
4999
|
additionalSigners: Signer[];
|
|
4855
5000
|
}>;
|
|
@@ -4894,11 +5039,11 @@ export declare class PerpetualsClient {
|
|
|
4894
5039
|
instructions: TransactionInstruction[];
|
|
4895
5040
|
additionalSigners: Signer[];
|
|
4896
5041
|
}>;
|
|
4897
|
-
setInternalOraclePrice: (tokenMint: PublicKey, price: BN, expo: number, conf: BN, ema: BN, publishTime: BN, poolConfig: PoolConfig) => Promise<{
|
|
5042
|
+
setInternalOraclePrice: (tokenMint: PublicKey, useCurrentTime: number, price: BN, expo: number, conf: BN, ema: BN, publishTime: BN, poolConfig: PoolConfig) => Promise<{
|
|
4898
5043
|
instructions: TransactionInstruction[];
|
|
4899
5044
|
additionalSigners: Signer[];
|
|
4900
5045
|
}>;
|
|
4901
|
-
setInternalOraclePriceBatch: (tokenMintList: PublicKey[], tokenInternalPrices: InternalPrice[], POOL_CONFIGS: PoolConfig[]) => Promise<{
|
|
5046
|
+
setInternalOraclePriceBatch: (useCurrentTime: number, tokenMintList: PublicKey[], tokenInternalPrices: InternalPrice[], POOL_CONFIGS: PoolConfig[]) => Promise<{
|
|
4902
5047
|
instructions: TransactionInstruction[];
|
|
4903
5048
|
additionalSigners: Signer[];
|
|
4904
5049
|
}>;
|
|
@@ -4930,10 +5075,18 @@ export declare class PerpetualsClient {
|
|
|
4930
5075
|
instructions: TransactionInstruction[];
|
|
4931
5076
|
additionalSigners: Signer[];
|
|
4932
5077
|
}>;
|
|
5078
|
+
withdrawUnclaimedTokens: (poolConfig: PoolConfig) => Promise<{
|
|
5079
|
+
instructions: TransactionInstruction[];
|
|
5080
|
+
additionalSigners: Signer[];
|
|
5081
|
+
}>;
|
|
4933
5082
|
initRevenueTokenAccount: (feeShareBps: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4934
5083
|
instructions: TransactionInstruction[];
|
|
4935
5084
|
additionalSigners: Signer[];
|
|
4936
5085
|
}>;
|
|
5086
|
+
initRebateVault: (allowRebatePayout: boolean, rebateSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
5087
|
+
instructions: TransactionInstruction[];
|
|
5088
|
+
additionalSigners: Signer[];
|
|
5089
|
+
}>;
|
|
4937
5090
|
distributeTokenReward: (amount: BN, epochCount: number, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
|
4938
5091
|
instructions: TransactionInstruction[];
|
|
4939
5092
|
additionalSigners: Signer[];
|
|
@@ -4946,4 +5099,8 @@ export declare class PerpetualsClient {
|
|
|
4946
5099
|
instructions: TransactionInstruction[];
|
|
4947
5100
|
additionalSigners: Signer[];
|
|
4948
5101
|
}>;
|
|
5102
|
+
resizeInternalOracle: (extOracle: PublicKey, tokenMint: PublicKey, intOracleAccount: PublicKey) => Promise<{
|
|
5103
|
+
instructions: TransactionInstruction[];
|
|
5104
|
+
additionalSigners: Signer[];
|
|
5105
|
+
}>;
|
|
4949
5106
|
}
|