flash-sdk 2.46.5 → 2.46.7
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 +10 -10
- package/dist/PerpetualsClient.js +786 -627
- package/dist/ViewHelper.d.ts +2 -2
- package/dist/ViewHelper.js +4 -3
- package/dist/backupOracle.js +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/rpc.js +50 -50
- package/package.json +8 -5
@@ -1,3 +1,4 @@
|
|
1
|
+
/// <reference types="bn.js" />
|
1
2
|
/// <reference types="node" />
|
2
3
|
import { Program, AnchorProvider, BN } from "@coral-xyz/anchor";
|
3
4
|
import { PublicKey, TransactionInstruction, Commitment, Signer, AddressLookupTableAccount, VersionedTransaction } from "@solana/web3.js";
|
@@ -12,7 +13,6 @@ import { FbnftRewards } from "./idl/fbnft_rewards";
|
|
12
13
|
import { RewardDistribution } from "./idl/reward_distribution";
|
13
14
|
import { SendTransactionOpts } from "./utils/rpc";
|
14
15
|
import { MarketConfig, PoolConfig, Token } from "./PoolConfig";
|
15
|
-
import { max } from "bn.js";
|
16
16
|
import { MarketAccount } from "./MarketAccount";
|
17
17
|
export type PerpClientOptions = {
|
18
18
|
postSendTxCallback?: ({ txid }: {
|
@@ -4404,20 +4404,20 @@ export declare class PerpetualsClient {
|
|
4404
4404
|
getIndexPriceAtParticularTime: (poolConfig: PoolConfig, targetPricesAtT1Ui: Number[], targetPricesAtT2Ui: Number[], tokenRatiosAtT2BN: BN[]) => string;
|
4405
4405
|
getStakedLpTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
4406
4406
|
getAssetsUnderManagement: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
4407
|
-
getAddLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<{
|
4407
|
+
getAddLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined) => Promise<{
|
4408
4408
|
amount: BN;
|
4409
4409
|
fee: BN;
|
4410
4410
|
}>;
|
4411
|
-
getRemoveLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, removeTokenCustodyKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<{
|
4411
|
+
getRemoveLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, removeTokenCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined) => Promise<{
|
4412
4412
|
amount: BN;
|
4413
4413
|
fee: BN;
|
4414
4414
|
}>;
|
4415
4415
|
getCompoundingLPTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
4416
|
-
getAddCompoundingLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<{
|
4416
|
+
getAddCompoundingLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined) => Promise<{
|
4417
4417
|
amount: BN;
|
4418
4418
|
fee: BN;
|
4419
4419
|
}>;
|
4420
|
-
getRemoveCompoundingLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, removeTokenCustodyKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<{
|
4420
|
+
getRemoveCompoundingLiquidityAmountAndFeeView: (amount: BN, poolKey: PublicKey, removeTokenCustodyKey: PublicKey, POOL_CONFIG: PoolConfig, userPublicKey?: PublicKey | undefined) => Promise<{
|
4421
4421
|
amount: BN;
|
4422
4422
|
fee: BN;
|
4423
4423
|
}>;
|
@@ -4476,11 +4476,11 @@ export declare class PerpetualsClient {
|
|
4476
4476
|
instructions: TransactionInstruction[];
|
4477
4477
|
additionalSigners: Signer[];
|
4478
4478
|
}>;
|
4479
|
-
addLiquidityAndStake: (inputSymbol: string, amountIn: BN, minLpAmountOut: BN, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
4479
|
+
addLiquidityAndStake: (inputSymbol: string, amountIn: BN, minLpAmountOut: BN, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined) => Promise<{
|
4480
4480
|
instructions: TransactionInstruction[];
|
4481
4481
|
additionalSigners: Signer[];
|
4482
4482
|
}>;
|
4483
|
-
removeLiquidity: (recieveTokenSymbol: string, liquidityAmountIn: BN, minTokenAmountOut: BN, poolConfig: PoolConfig, closeLpATA?: boolean, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
4483
|
+
removeLiquidity: (recieveTokenSymbol: string, liquidityAmountIn: BN, minTokenAmountOut: BN, poolConfig: PoolConfig, closeLpATA?: boolean, createUserATA?: boolean, closeUsersWSOLATA?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined) => Promise<{
|
4484
4484
|
instructions: TransactionInstruction[];
|
4485
4485
|
additionalSigners: Signer[];
|
4486
4486
|
}>;
|
@@ -4513,7 +4513,7 @@ export declare class PerpetualsClient {
|
|
4513
4513
|
additionalSigners: Signer[];
|
4514
4514
|
}>;
|
4515
4515
|
refreshStakeWithAllFlpStakeAccounts: (rewardSymbol: string, poolConfig: PoolConfig, flpStakeAccountPks: PublicKey[]) => Promise<TransactionInstruction>;
|
4516
|
-
refreshStakeWithTokenStake: (rewardSymbol: string, poolConfig: PoolConfig, flpStakeAccountPk: PublicKey) => Promise<TransactionInstruction>;
|
4516
|
+
refreshStakeWithTokenStake: (rewardSymbol: string, poolConfig: PoolConfig, flpStakeAccountPk: PublicKey, userPublicKey?: PublicKey | undefined) => Promise<TransactionInstruction>;
|
4517
4517
|
unstakeInstant: (rewardSymbol: string, unstakeAmount: BN, poolConfig: PoolConfig) => Promise<{
|
4518
4518
|
instructions: TransactionInstruction[];
|
4519
4519
|
additionalSigners: Signer[];
|
@@ -4672,11 +4672,11 @@ export declare class PerpetualsClient {
|
|
4672
4672
|
instructions: TransactionInstruction[];
|
4673
4673
|
additionalSigners: Signer[];
|
4674
4674
|
}>;
|
4675
|
-
addCompoundingLiquidity: (amountIn: BN, minCompoundingAmountOut: BN, inTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
4675
|
+
addCompoundingLiquidity: (amountIn: BN, minCompoundingAmountOut: BN, inTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined) => Promise<{
|
4676
4676
|
instructions: TransactionInstruction[];
|
4677
4677
|
additionalSigners: Signer[];
|
4678
4678
|
}>;
|
4679
|
-
removeCompoundingLiquidity: (compoundingAmountIn: BN, minAmountOut: BN, outTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any) => Promise<{
|
4679
|
+
removeCompoundingLiquidity: (compoundingAmountIn: BN, minAmountOut: BN, outTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, createUserATA?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined) => Promise<{
|
4680
4680
|
instructions: TransactionInstruction[];
|
4681
4681
|
additionalSigners: Signer[];
|
4682
4682
|
}>;
|