flash-sdk 11.6.2-alpha.0 → 11.7.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4886,47 +4886,47 @@ export declare class PerpetualsClient {
4886
4886
  getLiquidationStateView: (positionAccount: PublicKey, poolName: string, tokenMint: PublicKey, collateralMint: PublicKey, poolConfig: PoolConfig) => Promise<any>;
4887
4887
  getCompoundingTokenDataView: (poolConfig: PoolConfig) => Promise<any>;
4888
4888
  getLpTokenPriceView: (poolConfig: PoolConfig) => Promise<any>;
4889
- 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<{
4889
+ openPosition: (targetSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, collateralWithfee: BN, size: BN, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: PublicKey | undefined, userPublicKey?: PublicKey) => Promise<{
4890
4890
  instructions: TransactionInstruction[];
4891
4891
  additionalSigners: Signer[];
4892
4892
  }>;
4893
- closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
4893
+ closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: PublicKey | undefined, userPublicKey?: PublicKey) => Promise<{
4894
4894
  instructions: TransactionInstruction[];
4895
4895
  additionalSigners: Signer[];
4896
4896
  }>;
4897
- 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<{
4897
+ 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?: PublicKey | undefined, userPublicKey?: PublicKey) => Promise<{
4898
4898
  instructions: TransactionInstruction[];
4899
4899
  additionalSigners: Signer[];
4900
4900
  }>;
4901
- closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, ephemeralSignerPubkey?: any) => Promise<{
4901
+ closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, ephemeralSignerPubkey?: PublicKey | undefined, userPublicKey?: PublicKey) => Promise<{
4902
4902
  instructions: TransactionInstruction[];
4903
4903
  additionalSigners: Signer[];
4904
4904
  }>;
4905
- addCollateral: (collateralWithFee: BN, targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
4905
+ addCollateral: (collateralWithFee: BN, targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: PublicKey | undefined, userPublicKey?: PublicKey) => Promise<{
4906
4906
  instructions: TransactionInstruction[];
4907
4907
  additionalSigners: Signer[];
4908
4908
  }>;
4909
- swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
4909
+ swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: PublicKey | undefined, userPublicKey?: PublicKey) => Promise<{
4910
4910
  instructions: TransactionInstruction[];
4911
4911
  additionalSigners: Signer[];
4912
4912
  }>;
4913
- removeCollateral: (collateralDeltaUsd: BN, marketSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
4913
+ removeCollateral: (collateralDeltaUsd: BN, marketSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: PublicKey | undefined, userPublicKey?: PublicKey) => Promise<{
4914
4914
  instructions: TransactionInstruction[];
4915
4915
  additionalSigners: Signer[];
4916
4916
  }>;
4917
- removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string, collateralDeltaUsd: BN, side: Side, poolConfig: PoolConfig, ephemeralSignerPubkey?: any) => Promise<{
4917
+ removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string, collateralDeltaUsd: BN, side: Side, poolConfig: PoolConfig, ephemeralSignerPubkey?: PublicKey | undefined, userPublicKey?: PublicKey) => Promise<{
4918
4918
  instructions: TransactionInstruction[];
4919
4919
  additionalSigners: Signer[];
4920
4920
  }>;
4921
- increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
4921
+ increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, userPublicKey?: PublicKey) => Promise<{
4922
4922
  instructions: TransactionInstruction[];
4923
4923
  additionalSigners: Signer[];
4924
4924
  }>;
4925
- decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
4925
+ decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, userPublicKey?: PublicKey) => Promise<{
4926
4926
  instructions: TransactionInstruction[];
4927
4927
  additionalSigners: Signer[];
4928
4928
  }>;
4929
- addLiquidity: (payTokenSymbol: string, tokenAmountIn: BN, minLpAmountOut: BN, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, isWhitelistedUser?: boolean) => Promise<{
4929
+ addLiquidity: (payTokenSymbol: string, tokenAmountIn: BN, minLpAmountOut: BN, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: PublicKey | undefined, isWhitelistedUser?: boolean, userPublicKey?: PublicKey) => Promise<{
4930
4930
  instructions: TransactionInstruction[];
4931
4931
  additionalSigners: Signer[];
4932
4932
  }>;
@@ -4953,7 +4953,7 @@ export declare class PerpetualsClient {
4953
4953
  additionalSigners: Signer[];
4954
4954
  }>;
4955
4955
  setFeeShareBps: (poolConfig: PoolConfig, flpStakeAccountPks: PublicKey[]) => Promise<TransactionInstruction>;
4956
- unstakeRequest: (unstakeAmount: BN, poolConfig: PoolConfig) => Promise<{
4956
+ unstakeRequest: (unstakeAmount: BN, poolConfig: PoolConfig, userPublicKey?: PublicKey) => Promise<{
4957
4957
  instructions: TransactionInstruction[];
4958
4958
  additionalSigners: Signer[];
4959
4959
  }>;
@@ -4973,11 +4973,11 @@ export declare class PerpetualsClient {
4973
4973
  instructions: TransactionInstruction[];
4974
4974
  additionalSigners: Signer[];
4975
4975
  }>;
4976
- migrateStake: (amount: BN, rewardTokenMint: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
4976
+ migrateStake: (amount: BN, rewardTokenMint: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, userPublicKey?: PublicKey) => Promise<{
4977
4977
  instructions: TransactionInstruction[];
4978
4978
  additionalSigners: Signer[];
4979
4979
  }>;
4980
- migrateFlp: (amount: BN, rewardTokenMint: PublicKey, poolConfig: PoolConfig) => Promise<{
4980
+ migrateFlp: (amount: BN, rewardTokenMint: PublicKey, poolConfig: PoolConfig, userPublicKey?: PublicKey) => Promise<{
4981
4981
  instructions: TransactionInstruction[];
4982
4982
  additionalSigners: Signer[];
4983
4983
  }>;
@@ -5005,7 +5005,7 @@ export declare class PerpetualsClient {
5005
5005
  instructions: TransactionInstruction[];
5006
5006
  additionalSigners: Signer[];
5007
5007
  }>;
5008
- collectTokenReward: (owner: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
5008
+ collectTokenReward: (owner: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, userPublicKey?: PublicKey) => Promise<{
5009
5009
  instructions: TransactionInstruction[];
5010
5010
  additionalSigners: Signer[];
5011
5011
  }>;
@@ -5021,11 +5021,11 @@ export declare class PerpetualsClient {
5021
5021
  instructions: TransactionInstruction[];
5022
5022
  additionalSigners: Signer[];
5023
5023
  }>;
5024
- 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<{
5024
+ 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?: PublicKey | undefined, userPublicKey?: PublicKey) => Promise<{
5025
5025
  instructions: TransactionInstruction[];
5026
5026
  additionalSigners: Signer[];
5027
5027
  }>;
5028
- editLimitOrder: (targetSymbol: string, collateralSymbol: string, reserveSymbol: string, receiveSymbol: string, side: Side, orderId: number, limitPrice: ContractOraclePrice, sizeAmount: BN, stopLossPrice: ContractOraclePrice, takeProfitPrice: ContractOraclePrice, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
5028
+ editLimitOrder: (targetSymbol: string, collateralSymbol: string, reserveSymbol: string, receiveSymbol: string, side: Side, orderId: number, limitPrice: ContractOraclePrice, sizeAmount: BN, stopLossPrice: ContractOraclePrice, takeProfitPrice: ContractOraclePrice, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: PublicKey | undefined, userPublicKey?: PublicKey) => Promise<{
5029
5029
  instructions: TransactionInstruction[];
5030
5030
  additionalSigners: Signer[];
5031
5031
  }>;
@@ -5037,19 +5037,19 @@ export declare class PerpetualsClient {
5037
5037
  instructions: TransactionInstruction[];
5038
5038
  additionalSigners: Signer[];
5039
5039
  }>;
5040
- placeTriggerOrder: (targetSymbol: string, collateralSymbol: string, receiveSymbol: string, side: Side, triggerPrice: ContractOraclePrice, deltaSizeAmount: BN, isStopLoss: boolean, poolConfig: PoolConfig) => Promise<{
5040
+ placeTriggerOrder: (targetSymbol: string, collateralSymbol: string, receiveSymbol: string, side: Side, triggerPrice: ContractOraclePrice, deltaSizeAmount: BN, isStopLoss: boolean, poolConfig: PoolConfig, userPublicKey?: PublicKey) => Promise<{
5041
5041
  instructions: TransactionInstruction[];
5042
5042
  additionalSigners: Signer[];
5043
5043
  }>;
5044
- editTriggerOrder: (targetSymbol: string, collateralSymbol: string, receiveSymbol: string, side: Side, orderId: number, triggerPrice: ContractOraclePrice, deltaSizeAmount: BN, isStopLoss: boolean, poolConfig: PoolConfig) => Promise<{
5044
+ editTriggerOrder: (targetSymbol: string, collateralSymbol: string, receiveSymbol: string, side: Side, orderId: number, triggerPrice: ContractOraclePrice, deltaSizeAmount: BN, isStopLoss: boolean, poolConfig: PoolConfig, userPublicKey?: PublicKey) => Promise<{
5045
5045
  instructions: TransactionInstruction[];
5046
5046
  additionalSigners: Signer[];
5047
5047
  }>;
5048
- cancelTriggerOrder: (targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, isStopLoss: boolean, poolConfig: PoolConfig) => Promise<{
5048
+ cancelTriggerOrder: (targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, isStopLoss: boolean, poolConfig: PoolConfig, userPublicKey?: PublicKey) => Promise<{
5049
5049
  instructions: TransactionInstruction[];
5050
5050
  additionalSigners: Signer[];
5051
5051
  }>;
5052
- cancelAllTriggerOrders: (targetSymbol: string, collateralSymbol: string, side: Side, poolConfig: PoolConfig) => Promise<{
5052
+ cancelAllTriggerOrders: (targetSymbol: string, collateralSymbol: string, side: Side, poolConfig: PoolConfig, userPublicKey?: PublicKey) => Promise<{
5053
5053
  instructions: TransactionInstruction[];
5054
5054
  additionalSigners: Signer[];
5055
5055
  }>;
@@ -5066,7 +5066,7 @@ export declare class PerpetualsClient {
5066
5066
  signature: string;
5067
5067
  versionedTransaction: VersionedTransaction;
5068
5068
  }>;
5069
- swap: (userInputTokenSymbol: string, userOutputTokenSymbol: string, amountIn: BN, minAmountOut: BN, poolConfig: PoolConfig, useFeesPool?: boolean, createUserATA?: boolean, unWrapSol?: boolean, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, isWhitelistedUser?: boolean) => Promise<{
5069
+ swap: (userInputTokenSymbol: string, userOutputTokenSymbol: string, amountIn: BN, minAmountOut: BN, poolConfig: PoolConfig, useFeesPool?: boolean, createUserATA?: boolean, unWrapSol?: boolean, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: PublicKey | undefined, isWhitelistedUser?: boolean, userPublicKey?: PublicKey) => Promise<{
5070
5070
  instructions: TransactionInstruction[];
5071
5071
  additionalSigners: Signer[];
5072
5072
  }>;