flash-sdk 11.5.1 → 11.6.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.
@@ -4863,47 +4863,47 @@ export declare class PerpetualsClient {
4863
4863
  getLiquidationStateView: (positionAccount: PublicKey, poolName: string, tokenMint: PublicKey, collateralMint: PublicKey, poolConfig: PoolConfig) => Promise<any>;
4864
4864
  getCompoundingTokenDataView: (poolConfig: PoolConfig) => Promise<any>;
4865
4865
  getLpTokenPriceView: (poolConfig: PoolConfig) => Promise<any>;
4866
- 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<{
4866
+ 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<{
4867
4867
  instructions: TransactionInstruction[];
4868
4868
  additionalSigners: Signer[];
4869
4869
  }>;
4870
- closePosition: (marketSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
4870
+ 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<{
4871
4871
  instructions: TransactionInstruction[];
4872
4872
  additionalSigners: Signer[];
4873
4873
  }>;
4874
- 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<{
4874
+ 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<{
4875
4875
  instructions: TransactionInstruction[];
4876
4876
  additionalSigners: Signer[];
4877
4877
  }>;
4878
- closeAndSwap: (targetTokenSymbol: string, userOutputTokenSymbol: string, collateralTokenSymbol: string, priceWithSlippage: ContractOraclePrice, side: Side, poolConfig: PoolConfig, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, ephemeralSignerPubkey?: any) => Promise<{
4878
+ 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<{
4879
4879
  instructions: TransactionInstruction[];
4880
4880
  additionalSigners: Signer[];
4881
4881
  }>;
4882
- addCollateral: (collateralWithFee: BN, targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
4882
+ addCollateral: (collateralWithFee: BN, targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: PublicKey | undefined, userPublicKey?: PublicKey) => Promise<{
4883
4883
  instructions: TransactionInstruction[];
4884
4884
  additionalSigners: Signer[];
4885
4885
  }>;
4886
- swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
4886
+ swapAndAddCollateral: (targetSymbol: string, inputSymbol: string, collateralSymbol: string, amountIn: BN, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: PublicKey | undefined, userPublicKey?: PublicKey) => Promise<{
4887
4887
  instructions: TransactionInstruction[];
4888
4888
  additionalSigners: Signer[];
4889
4889
  }>;
4890
- removeCollateral: (collateralDeltaUsd: BN, marketSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
4890
+ removeCollateral: (collateralDeltaUsd: BN, marketSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: PublicKey | undefined, userPublicKey?: PublicKey) => Promise<{
4891
4891
  instructions: TransactionInstruction[];
4892
4892
  additionalSigners: Signer[];
4893
4893
  }>;
4894
- removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string, collateralDeltaUsd: BN, side: Side, poolConfig: PoolConfig, ephemeralSignerPubkey?: any) => Promise<{
4894
+ removeCollateralAndSwap: (targetSymbol: string, collateralSymbol: string, outputSymbol: string, collateralDeltaUsd: BN, side: Side, poolConfig: PoolConfig, ephemeralSignerPubkey?: PublicKey | undefined, userPublicKey?: PublicKey) => Promise<{
4895
4895
  instructions: TransactionInstruction[];
4896
4896
  additionalSigners: Signer[];
4897
4897
  }>;
4898
- increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
4898
+ increaseSize: (targetSymbol: string, collateralSymbol: string, positionPubKey: PublicKey, side: Side, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, userPublicKey?: PublicKey) => Promise<{
4899
4899
  instructions: TransactionInstruction[];
4900
4900
  additionalSigners: Signer[];
4901
4901
  }>;
4902
- decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey) => Promise<{
4902
+ decreaseSize: (targetSymbol: string, collateralSymbol: string, side: Side, positionPubKey: PublicKey, poolConfig: PoolConfig, priceWithSlippage: ContractOraclePrice, sizeDelta: BN, privilege: Privilege, tokenStakeAccount?: PublicKey, userReferralAccount?: PublicKey, userPublicKey?: PublicKey) => Promise<{
4903
4903
  instructions: TransactionInstruction[];
4904
4904
  additionalSigners: Signer[];
4905
4905
  }>;
4906
- addLiquidity: (payTokenSymbol: string, tokenAmountIn: BN, minLpAmountOut: BN, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, isWhitelistedUser?: boolean) => Promise<{
4906
+ addLiquidity: (payTokenSymbol: string, tokenAmountIn: BN, minLpAmountOut: BN, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: PublicKey | undefined, isWhitelistedUser?: boolean, userPublicKey?: PublicKey) => Promise<{
4907
4907
  instructions: TransactionInstruction[];
4908
4908
  additionalSigners: Signer[];
4909
4909
  }>;
@@ -4930,7 +4930,7 @@ export declare class PerpetualsClient {
4930
4930
  additionalSigners: Signer[];
4931
4931
  }>;
4932
4932
  setFeeShareBps: (poolConfig: PoolConfig, flpStakeAccountPks: PublicKey[]) => Promise<TransactionInstruction>;
4933
- unstakeRequest: (unstakeAmount: BN, poolConfig: PoolConfig) => Promise<{
4933
+ unstakeRequest: (unstakeAmount: BN, poolConfig: PoolConfig, userPublicKey?: PublicKey) => Promise<{
4934
4934
  instructions: TransactionInstruction[];
4935
4935
  additionalSigners: Signer[];
4936
4936
  }>;
@@ -4950,11 +4950,11 @@ export declare class PerpetualsClient {
4950
4950
  instructions: TransactionInstruction[];
4951
4951
  additionalSigners: Signer[];
4952
4952
  }>;
4953
- migrateStake: (amount: BN, rewardTokenMint: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
4953
+ migrateStake: (amount: BN, rewardTokenMint: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, userPublicKey?: PublicKey) => Promise<{
4954
4954
  instructions: TransactionInstruction[];
4955
4955
  additionalSigners: Signer[];
4956
4956
  }>;
4957
- migrateFlp: (amount: BN, rewardTokenMint: PublicKey, poolConfig: PoolConfig) => Promise<{
4957
+ migrateFlp: (amount: BN, rewardTokenMint: PublicKey, poolConfig: PoolConfig, userPublicKey?: PublicKey) => Promise<{
4958
4958
  instructions: TransactionInstruction[];
4959
4959
  additionalSigners: Signer[];
4960
4960
  }>;
@@ -4982,7 +4982,7 @@ export declare class PerpetualsClient {
4982
4982
  instructions: TransactionInstruction[];
4983
4983
  additionalSigners: Signer[];
4984
4984
  }>;
4985
- collectTokenReward: (owner: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean) => Promise<{
4985
+ collectTokenReward: (owner: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, userPublicKey?: PublicKey) => Promise<{
4986
4986
  instructions: TransactionInstruction[];
4987
4987
  additionalSigners: Signer[];
4988
4988
  }>;
@@ -4998,11 +4998,11 @@ export declare class PerpetualsClient {
4998
4998
  instructions: TransactionInstruction[];
4999
4999
  additionalSigners: Signer[];
5000
5000
  }>;
5001
- 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<{
5001
+ 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<{
5002
5002
  instructions: TransactionInstruction[];
5003
5003
  additionalSigners: Signer[];
5004
5004
  }>;
5005
- 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<{
5005
+ 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<{
5006
5006
  instructions: TransactionInstruction[];
5007
5007
  additionalSigners: Signer[];
5008
5008
  }>;
@@ -5014,19 +5014,19 @@ export declare class PerpetualsClient {
5014
5014
  instructions: TransactionInstruction[];
5015
5015
  additionalSigners: Signer[];
5016
5016
  }>;
5017
- placeTriggerOrder: (targetSymbol: string, collateralSymbol: string, receiveSymbol: string, side: Side, triggerPrice: ContractOraclePrice, deltaSizeAmount: BN, isStopLoss: boolean, poolConfig: PoolConfig) => Promise<{
5017
+ placeTriggerOrder: (targetSymbol: string, collateralSymbol: string, receiveSymbol: string, side: Side, triggerPrice: ContractOraclePrice, deltaSizeAmount: BN, isStopLoss: boolean, poolConfig: PoolConfig, userPublicKey?: PublicKey) => Promise<{
5018
5018
  instructions: TransactionInstruction[];
5019
5019
  additionalSigners: Signer[];
5020
5020
  }>;
5021
- editTriggerOrder: (targetSymbol: string, collateralSymbol: string, receiveSymbol: string, side: Side, orderId: number, triggerPrice: ContractOraclePrice, deltaSizeAmount: BN, isStopLoss: boolean, poolConfig: PoolConfig) => Promise<{
5021
+ editTriggerOrder: (targetSymbol: string, collateralSymbol: string, receiveSymbol: string, side: Side, orderId: number, triggerPrice: ContractOraclePrice, deltaSizeAmount: BN, isStopLoss: boolean, poolConfig: PoolConfig, userPublicKey?: PublicKey) => Promise<{
5022
5022
  instructions: TransactionInstruction[];
5023
5023
  additionalSigners: Signer[];
5024
5024
  }>;
5025
- cancelTriggerOrder: (targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, isStopLoss: boolean, poolConfig: PoolConfig) => Promise<{
5025
+ cancelTriggerOrder: (targetSymbol: string, collateralSymbol: string, side: Side, orderId: number, isStopLoss: boolean, poolConfig: PoolConfig, userPublicKey?: PublicKey) => Promise<{
5026
5026
  instructions: TransactionInstruction[];
5027
5027
  additionalSigners: Signer[];
5028
5028
  }>;
5029
- cancelAllTriggerOrders: (targetSymbol: string, collateralSymbol: string, side: Side, poolConfig: PoolConfig) => Promise<{
5029
+ cancelAllTriggerOrders: (targetSymbol: string, collateralSymbol: string, side: Side, poolConfig: PoolConfig, userPublicKey?: PublicKey) => Promise<{
5030
5030
  instructions: TransactionInstruction[];
5031
5031
  additionalSigners: Signer[];
5032
5032
  }>;
@@ -5043,7 +5043,7 @@ export declare class PerpetualsClient {
5043
5043
  signature: string;
5044
5044
  versionedTransaction: VersionedTransaction;
5045
5045
  }>;
5046
- swap: (userInputTokenSymbol: string, userOutputTokenSymbol: string, amountIn: BN, minAmountOut: BN, poolConfig: PoolConfig, useFeesPool?: boolean, createUserATA?: boolean, unWrapSol?: boolean, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, isWhitelistedUser?: boolean) => Promise<{
5046
+ 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<{
5047
5047
  instructions: TransactionInstruction[];
5048
5048
  additionalSigners: Signer[];
5049
5049
  }>;