flash-sdk 9.0.0-alpha.6 → 9.0.0-alpha.8
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/PerpetualsClient.d.ts +39 -49
- package/dist/PerpetualsClient.js +474 -1024
- package/dist/PoolConfig.d.ts +2 -0
- package/dist/PoolConfig.json +244 -10
- package/dist/idl/perpetuals.d.ts +70 -490
- package/dist/idl/perpetuals.js +70 -490
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +0 -2
- package/package.json +1 -1
@@ -2,7 +2,7 @@ import { Program, AnchorProvider, BN } from "@coral-xyz/anchor";
|
|
2
2
|
import { PublicKey, TransactionInstruction, Commitment, Signer, AddressLookupTableAccount, VersionedTransaction } from "@solana/web3.js";
|
3
3
|
import { PoolAccount } from "./PoolAccount";
|
4
4
|
import { PositionAccount } from "./PositionAccount";
|
5
|
-
import { AddLiquidityAmountAndFee, InternalPrice, BorrowRateParams, ExitPriceAndFee, Fees, OracleParams, Permissions, PricingParams, RemoveCollateralData, RemoveLiquidityAmountAndFee, Side, TokenRatios, MinAndMaxPrice, FeesAction, ContractOraclePrice, Privilege, PerpetualsAccount,
|
5
|
+
import { AddLiquidityAmountAndFee, InternalPrice, BorrowRateParams, ExitPriceAndFee, Fees, OracleParams, Permissions, PricingParams, RemoveCollateralData, RemoveLiquidityAmountAndFee, Side, TokenRatios, MinAndMaxPrice, FeesAction, ContractOraclePrice, Privilege, PerpetualsAccount, EntryPriceAndFeeV2, TokenPermissions, TokenStake, InternalEmaPrice } from "./types";
|
6
6
|
import { OraclePrice } from "./OraclePrice";
|
7
7
|
import { CustodyAccount } from "./CustodyAccount";
|
8
8
|
import { Perpetuals } from "./idl/perpetuals";
|
@@ -259,6 +259,7 @@ export declare class PerpetualsClient {
|
|
259
259
|
conf: BN;
|
260
260
|
ema: BN;
|
261
261
|
publishTime: BN;
|
262
|
+
extOracleAccount: PublicKey;
|
262
263
|
market: PublicKey;
|
263
264
|
limitOrders: unknown;
|
264
265
|
takeProfitOrders: unknown;
|
@@ -604,6 +605,7 @@ export declare class PerpetualsClient {
|
|
604
605
|
conf: BN;
|
605
606
|
ema: BN;
|
606
607
|
publishTime: BN;
|
608
|
+
extOracleAccount: PublicKey;
|
607
609
|
market: PublicKey;
|
608
610
|
limitOrders: unknown;
|
609
611
|
takeProfitOrders: unknown;
|
@@ -948,6 +950,7 @@ export declare class PerpetualsClient {
|
|
948
950
|
conf: BN;
|
949
951
|
ema: BN;
|
950
952
|
publishTime: BN;
|
953
|
+
extOracleAccount: PublicKey;
|
951
954
|
market: PublicKey;
|
952
955
|
limitOrders: unknown;
|
953
956
|
takeProfitOrders: unknown;
|
@@ -1296,6 +1299,7 @@ export declare class PerpetualsClient {
|
|
1296
1299
|
conf: BN;
|
1297
1300
|
ema: BN;
|
1298
1301
|
publishTime: BN;
|
1302
|
+
extOracleAccount: PublicKey;
|
1299
1303
|
market: PublicKey;
|
1300
1304
|
limitOrders: unknown;
|
1301
1305
|
takeProfitOrders: unknown;
|
@@ -1643,6 +1647,7 @@ export declare class PerpetualsClient {
|
|
1643
1647
|
conf: BN;
|
1644
1648
|
ema: BN;
|
1645
1649
|
publishTime: BN;
|
1650
|
+
extOracleAccount: PublicKey;
|
1646
1651
|
market: PublicKey;
|
1647
1652
|
limitOrders: unknown;
|
1648
1653
|
takeProfitOrders: unknown;
|
@@ -1988,6 +1993,7 @@ export declare class PerpetualsClient {
|
|
1988
1993
|
conf: BN;
|
1989
1994
|
ema: BN;
|
1990
1995
|
publishTime: BN;
|
1996
|
+
extOracleAccount: PublicKey;
|
1991
1997
|
market: PublicKey;
|
1992
1998
|
limitOrders: unknown;
|
1993
1999
|
takeProfitOrders: unknown;
|
@@ -2332,6 +2338,7 @@ export declare class PerpetualsClient {
|
|
2332
2338
|
conf: BN;
|
2333
2339
|
ema: BN;
|
2334
2340
|
publishTime: BN;
|
2341
|
+
extOracleAccount: PublicKey;
|
2335
2342
|
market: PublicKey;
|
2336
2343
|
limitOrders: unknown;
|
2337
2344
|
takeProfitOrders: unknown;
|
@@ -2676,6 +2683,7 @@ export declare class PerpetualsClient {
|
|
2676
2683
|
conf: BN;
|
2677
2684
|
ema: BN;
|
2678
2685
|
publishTime: BN;
|
2686
|
+
extOracleAccount: PublicKey;
|
2679
2687
|
market: PublicKey;
|
2680
2688
|
limitOrders: unknown;
|
2681
2689
|
takeProfitOrders: unknown;
|
@@ -3067,6 +3075,7 @@ export declare class PerpetualsClient {
|
|
3067
3075
|
conf: BN;
|
3068
3076
|
ema: BN;
|
3069
3077
|
publishTime: BN;
|
3078
|
+
extOracleAccount: PublicKey;
|
3070
3079
|
market: PublicKey;
|
3071
3080
|
limitOrders: unknown;
|
3072
3081
|
takeProfitOrders: unknown;
|
@@ -3411,6 +3420,7 @@ export declare class PerpetualsClient {
|
|
3411
3420
|
conf: BN;
|
3412
3421
|
ema: BN;
|
3413
3422
|
publishTime: BN;
|
3423
|
+
extOracleAccount: PublicKey;
|
3414
3424
|
market: PublicKey;
|
3415
3425
|
limitOrders: unknown;
|
3416
3426
|
takeProfitOrders: unknown;
|
@@ -3755,6 +3765,7 @@ export declare class PerpetualsClient {
|
|
3755
3765
|
conf: BN;
|
3756
3766
|
ema: BN;
|
3757
3767
|
publishTime: BN;
|
3768
|
+
extOracleAccount: PublicKey;
|
3758
3769
|
market: PublicKey;
|
3759
3770
|
limitOrders: unknown;
|
3760
3771
|
takeProfitOrders: unknown;
|
@@ -4099,6 +4110,7 @@ export declare class PerpetualsClient {
|
|
4099
4110
|
conf: BN;
|
4100
4111
|
ema: BN;
|
4101
4112
|
publishTime: BN;
|
4113
|
+
extOracleAccount: PublicKey;
|
4102
4114
|
market: PublicKey;
|
4103
4115
|
limitOrders: unknown;
|
4104
4116
|
takeProfitOrders: unknown;
|
@@ -4443,6 +4455,7 @@ export declare class PerpetualsClient {
|
|
4443
4455
|
conf: BN;
|
4444
4456
|
ema: BN;
|
4445
4457
|
publishTime: BN;
|
4458
|
+
extOracleAccount: PublicKey;
|
4446
4459
|
market: PublicKey;
|
4447
4460
|
limitOrders: unknown;
|
4448
4461
|
takeProfitOrders: unknown;
|
@@ -4618,9 +4631,9 @@ export declare class PerpetualsClient {
|
|
4618
4631
|
getMinAndMaxPriceSync: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount) => MinAndMaxPrice;
|
4619
4632
|
checkIfPriceStaleOrCustom: (price: OraclePrice, emaPrice: OraclePrice, custodyAccount: CustodyAccount, timestampInSeconds: BN) => boolean;
|
4620
4633
|
getAveragePriceSync: (price1: BN, size1: BN, price2: BN, size2: BN) => BN;
|
4621
|
-
|
4622
|
-
|
4623
|
-
|
4634
|
+
getLeverageContractHelper: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, isInitial: boolean, poolConfig: PoolConfig) => BN;
|
4635
|
+
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;
|
4636
|
+
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;
|
4624
4637
|
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;
|
4625
4638
|
getEntryPriceUsdSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
4626
4639
|
getPriceAfterSlippage(isEntry: boolean, slippageBps: BN, targetPrice: OraclePrice, side: Side): ContractOraclePrice;
|
@@ -4631,20 +4644,19 @@ export declare class PerpetualsClient {
|
|
4631
4644
|
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;
|
4632
4645
|
getTradeSpread: (targetCustodyAccount: CustodyAccount, sizeUsd: BN) => BN;
|
4633
4646
|
getExitOraclePriceSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, sizeUsd: BN) => OraclePrice;
|
4634
|
-
getExitOraclePriceWithoutSpreadSync: (side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
4635
4647
|
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;
|
4636
|
-
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,
|
4648
|
+
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;
|
4637
4649
|
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;
|
4638
|
-
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,
|
4650
|
+
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;
|
4639
4651
|
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;
|
4640
|
-
getMaxWithdrawableAmountSyncInternal: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig,
|
4652
|
+
getMaxWithdrawableAmountSyncInternal: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, closeAmountUsd?: BN, errorBandwidthPercentageUi?: number) => {
|
4641
4653
|
maxWithdrawableAmount: BN;
|
4642
4654
|
maxWithdrawableAmountUsd: BN;
|
4643
4655
|
diff: BN;
|
4644
4656
|
};
|
4645
|
-
|
4646
|
-
|
4647
|
-
|
4657
|
+
getFinalCloseAmountUsdSync: (positionAccount: PositionAccount, marketCorrelation: boolean, side: Side, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig) => {
|
4658
|
+
closeAmountUsd: BN;
|
4659
|
+
feesAmountUsd: BN;
|
4648
4660
|
};
|
4649
4661
|
getMaxWithdrawableAmountSync: (positionAccount: PositionAccount, targetPrice: OraclePrice, targetEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, poolConfig: PoolConfig, errorBandwidthPercentageUi?: number) => {
|
4650
4662
|
maxWithdrawableAmount: BN;
|
@@ -4654,8 +4666,9 @@ export declare class PerpetualsClient {
|
|
4654
4666
|
getBorrowRateSync: (custodyAccount: CustodyAccount, currentUtilization: BN) => BN;
|
4655
4667
|
getLockFeeAndUnsettledUsdForPosition: (position: PositionAccount, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN) => BN;
|
4656
4668
|
getLockedUsd: (sideUsd: BN, side: Side, marketCorrelation: boolean, maxPayOffBps: BN) => BN;
|
4657
|
-
|
4658
|
-
|
4669
|
+
getLiquidationPriceContractHelper: (entryOraclePrice: OraclePrice, lockAndUnsettledFeeUsd: BN, side: Side, targetCustodyAccount: CustodyAccount, positionAccount: PositionAccount) => OraclePrice;
|
4670
|
+
getLiquidationPriceSync: (collateralUsd: BN, sizeAmount: BN, entryOraclePrice: OraclePrice, lockAndUnsettledFeeUsd: BN, side: Side, targetPrice: OraclePrice, targetCustodyAccount: CustodyAccount, positionAccount: PositionAccount) => void;
|
4671
|
+
getLiquidationPriceWithOrder: (collateralUsd: BN, sizeAmount: BN, sizeUsd: BN, sizeDecimals: number, limitOraclePrice: OraclePrice, side: Side, targetCustodyAccount: CustodyAccount) => OraclePrice;
|
4659
4672
|
getMaxProfitPriceSync: (entryPrice: OraclePrice, marketCorrelation: boolean, side: Side, positionAccount: PositionAccount) => OraclePrice;
|
4660
4673
|
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) => {
|
4661
4674
|
pnlUsd: BN;
|
@@ -4667,6 +4680,10 @@ export declare class PerpetualsClient {
|
|
4667
4680
|
profitUsd: BN;
|
4668
4681
|
lossUsd: BN;
|
4669
4682
|
};
|
4683
|
+
getPnlContractHelper: (positionAccount: PositionAccount, targetTokenPrice: OraclePrice, targetTokenEmaPrice: OraclePrice, targetCustodyAccount: CustodyAccount, collateralPrice: OraclePrice, collateralEmaPrice: OraclePrice, collateralCustodyAccount: CustodyAccount, currentTimestamp: BN, delay: BN, poolConfig: PoolConfig) => {
|
4684
|
+
profitUsd: BN;
|
4685
|
+
lossUsd: BN;
|
4686
|
+
};
|
4670
4687
|
getSwapAmountAndFeesSync: (amountIn: BN, amountOut: BN, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, outputTokenPrice: OraclePrice, outputTokenEmaPrice: OraclePrice, outputTokenCustodyAccount: CustodyAccount, poolAumUsdMax: BN, poolConfig: PoolConfig) => {
|
4671
4688
|
minAmountOut: BN;
|
4672
4689
|
minAmountIn: BN;
|
@@ -4677,8 +4694,9 @@ export declare class PerpetualsClient {
|
|
4677
4694
|
poolAmountUsd: BN;
|
4678
4695
|
poolEquityUsd: BN;
|
4679
4696
|
};
|
4680
|
-
|
4681
|
-
|
4697
|
+
getAssetsUnderManagementUsdContractHelper: (poolAccount: PoolAccount, tokenPrices: OraclePrice[], tokenEmaPrices: OraclePrice[], custodies: CustodyAccount[], markets: MarketAccount[], aumCalcMode: "includePnl" | "excludePnl", currentTime: BN, poolConfig: PoolConfig) => {
|
4698
|
+
poolAmountUsd: BN;
|
4699
|
+
poolEquityUsd: BN;
|
4682
4700
|
};
|
4683
4701
|
getFeeDiscount: (perpetualsAccount: PerpetualsAccount, tokenStakeAccount: TokenStake, currentTime: BN) => {
|
4684
4702
|
discountBn: BN;
|
@@ -4764,14 +4782,6 @@ export declare class PerpetualsClient {
|
|
4764
4782
|
instructions: TransactionInstruction[];
|
4765
4783
|
additionalSigners: Signer[];
|
4766
4784
|
}>;
|
4767
|
-
updateNftAccount: (nftMint: PublicKey, updateReferer: boolean, updateBooster: boolean, flpStakeAccounts: PublicKey[]) => Promise<{
|
4768
|
-
instructions: TransactionInstruction[];
|
4769
|
-
additionalSigners: Signer[];
|
4770
|
-
}>;
|
4771
|
-
levelUp: (poolConfig: PoolConfig, nftMint: PublicKey, authorizationRulesAccount: PublicKey) => Promise<{
|
4772
|
-
instructions: TransactionInstruction[];
|
4773
|
-
additionalSigners: Signer[];
|
4774
|
-
}>;
|
4775
4785
|
depositStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
4776
4786
|
instructions: TransactionInstruction[];
|
4777
4787
|
additionalSigners: Signer[];
|
@@ -4815,14 +4825,6 @@ export declare class PerpetualsClient {
|
|
4815
4825
|
instructions: TransactionInstruction[];
|
4816
4826
|
additionalSigners: Signer[];
|
4817
4827
|
}>;
|
4818
|
-
burnAndClaim: (owner: PublicKey, nftMint: PublicKey, poolConfig: PoolConfig, createAta: boolean) => Promise<{
|
4819
|
-
instructions: TransactionInstruction[];
|
4820
|
-
additionalSigners: Signer[];
|
4821
|
-
}>;
|
4822
|
-
burnAndStake: (owner: PublicKey, feePayer: PublicKey, nftMint: PublicKey, poolConfig: PoolConfig) => Promise<{
|
4823
|
-
instructions: TransactionInstruction[];
|
4824
|
-
additionalSigners: Signer[];
|
4825
|
-
}>;
|
4826
4828
|
depositTokenStake: (owner: PublicKey, feePayer: PublicKey, depositAmount: BN, poolConfig: PoolConfig) => Promise<{
|
4827
4829
|
instructions: TransactionInstruction[];
|
4828
4830
|
additionalSigners: Signer[];
|
@@ -4851,22 +4853,6 @@ export declare class PerpetualsClient {
|
|
4851
4853
|
instructions: TransactionInstruction[];
|
4852
4854
|
additionalSigners: Signer[];
|
4853
4855
|
}>;
|
4854
|
-
initRewardVault: (nftCount: BN, rewardSymbol: string, collectionMint: PublicKey, poolConfig: PoolConfig) => Promise<{
|
4855
|
-
instructions: TransactionInstruction[];
|
4856
|
-
additionalSigners: Signer[];
|
4857
|
-
}>;
|
4858
|
-
distributeReward: (rewardAmount: BN, rewardSymbol: string, poolConfig: PoolConfig) => Promise<{
|
4859
|
-
instructions: TransactionInstruction[];
|
4860
|
-
additionalSigners: Signer[];
|
4861
|
-
}>;
|
4862
|
-
collectNftReward: (rewardSymbol: string, poolConfig: PoolConfig, nftMint: PublicKey, createUserATA?: boolean) => Promise<{
|
4863
|
-
instructions: TransactionInstruction[];
|
4864
|
-
additionalSigners: Signer[];
|
4865
|
-
}>;
|
4866
|
-
collectAndDistributeFee: (rewardSymbol: string, poolConfig: PoolConfig, createUserATA?: boolean, nftTradingAccount?: PublicKey) => Promise<{
|
4867
|
-
instructions: TransactionInstruction[];
|
4868
|
-
additionalSigners: Signer[];
|
4869
|
-
}>;
|
4870
4856
|
placeLimitOrder: (targetSymbol: string, collateralSymbol: string, reserveSymbol: string, receiveSymbol: string, side: Side, limitPrice: ContractOraclePrice, reserveAmount: BN, sizeAmount: BN, stopLossPrice: ContractOraclePrice, takeProfitPrice: ContractOraclePrice, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
4871
4857
|
instructions: TransactionInstruction[];
|
4872
4858
|
additionalSigners: Signer[];
|
@@ -4948,11 +4934,11 @@ export declare class PerpetualsClient {
|
|
4948
4934
|
instructions: TransactionInstruction[];
|
4949
4935
|
additionalSigners: Signer[];
|
4950
4936
|
}>;
|
4951
|
-
setInternalOraclePrice: (tokenMint: PublicKey, price: BN, expo: number, conf: BN, ema: BN, publishTime: BN, poolConfig: PoolConfig) => Promise<{
|
4937
|
+
setInternalOraclePrice: (tokenMint: PublicKey, useCurrentTime: number, price: BN, expo: number, conf: BN, ema: BN, publishTime: BN, poolConfig: PoolConfig) => Promise<{
|
4952
4938
|
instructions: TransactionInstruction[];
|
4953
4939
|
additionalSigners: Signer[];
|
4954
4940
|
}>;
|
4955
|
-
setInternalOraclePriceBatch: (tokenMintList: PublicKey[], tokenInternalPrices: InternalPrice[], POOL_CONFIGS: PoolConfig[]) => Promise<{
|
4941
|
+
setInternalOraclePriceBatch: (useCurrentTime: boolean, tokenMintList: PublicKey[], tokenInternalPrices: InternalPrice[], POOL_CONFIGS: PoolConfig[]) => Promise<{
|
4956
4942
|
instructions: TransactionInstruction[];
|
4957
4943
|
additionalSigners: Signer[];
|
4958
4944
|
}>;
|
@@ -5000,4 +4986,8 @@ export declare class PerpetualsClient {
|
|
5000
4986
|
instructions: TransactionInstruction[];
|
5001
4987
|
additionalSigners: Signer[];
|
5002
4988
|
}>;
|
4989
|
+
resizeInternalOracle: (extOracle: PublicKey, tokenMint: PublicKey, intOracleAccount: PublicKey) => Promise<{
|
4990
|
+
instructions: TransactionInstruction[];
|
4991
|
+
additionalSigners: Signer[];
|
4992
|
+
}>;
|
5003
4993
|
}
|