flash-sdk 2.48.8 → 2.49.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.
- package/dist/PerpetualsClient.d.ts +8 -4
- package/dist/PerpetualsClient.js +513 -603
- package/dist/PoolConfig.json +220 -0
- package/dist/ViewHelper.js +3 -3
- package/dist/backupOracle.js +3 -3
- package/dist/idl/perpetuals.d.ts +55 -0
- package/dist/idl/perpetuals.js +55 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/utils/alt.d.ts +1 -0
- package/dist/utils/rpc.js +50 -50
- package/package.json +1 -1
@@ -1,10 +1,9 @@
|
|
1
|
-
/// <reference types="bn.js" />
|
2
1
|
/// <reference types="node" />
|
3
2
|
import { Program, AnchorProvider, BN } from "@coral-xyz/anchor";
|
4
3
|
import { PublicKey, TransactionInstruction, Commitment, Signer, AddressLookupTableAccount, VersionedTransaction } from "@solana/web3.js";
|
5
4
|
import { PoolAccount } from "./PoolAccount";
|
6
5
|
import { PositionAccount } from "./PositionAccount";
|
7
|
-
import { AddLiquidityAmountAndFee, BorrowRateParams, ExitPriceAndFee, Fees, OracleParams, Permissions, PricingParams, RemoveCollateralData, RemoveLiquidityAmountAndFee, Side, TokenRatios, MinAndMaxPrice, FeesAction, ContractOraclePrice, Privilege, PerpetualsAccount, Trading, EntryPriceAndFeeV2, EntryPriceAndFee, TokenPermissions, TokenStake } from "./types";
|
6
|
+
import { AddLiquidityAmountAndFee, InternalPrice, BorrowRateParams, ExitPriceAndFee, Fees, OracleParams, Permissions, PricingParams, RemoveCollateralData, RemoveLiquidityAmountAndFee, Side, TokenRatios, MinAndMaxPrice, FeesAction, ContractOraclePrice, Privilege, PerpetualsAccount, Trading, EntryPriceAndFeeV2, EntryPriceAndFee, TokenPermissions, TokenStake } from "./types";
|
8
7
|
import { OraclePrice } from "./OraclePrice";
|
9
8
|
import { CustodyAccount } from "./CustodyAccount";
|
10
9
|
import { Perpetuals } from "./idl/perpetuals";
|
@@ -13,6 +12,7 @@ import { FbnftRewards } from "./idl/fbnft_rewards";
|
|
13
12
|
import { RewardDistribution } from "./idl/reward_distribution";
|
14
13
|
import { SendTransactionOpts } from "./utils/rpc";
|
15
14
|
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 }: {
|
@@ -4631,7 +4631,7 @@ export declare class PerpetualsClient {
|
|
4631
4631
|
}>;
|
4632
4632
|
refreshStakeWithAllFlpStakeAccounts: (rewardSymbol: string, poolConfig: PoolConfig, flpStakeAccountPks: PublicKey[]) => Promise<TransactionInstruction>;
|
4633
4633
|
refreshStakeWithTokenStake: (rewardSymbol: string, poolConfig: PoolConfig, flpStakeAccountPk: PublicKey, userPublicKey?: PublicKey | undefined) => Promise<TransactionInstruction>;
|
4634
|
-
unstakeInstant: (rewardSymbol: string, unstakeAmount: BN, poolConfig: PoolConfig
|
4634
|
+
unstakeInstant: (rewardSymbol: string, unstakeAmount: BN, poolConfig: PoolConfig) => Promise<{
|
4635
4635
|
instructions: TransactionInstruction[];
|
4636
4636
|
additionalSigners: Signer[];
|
4637
4637
|
}>;
|
@@ -4640,7 +4640,7 @@ export declare class PerpetualsClient {
|
|
4640
4640
|
instructions: TransactionInstruction[];
|
4641
4641
|
additionalSigners: Signer[];
|
4642
4642
|
}>;
|
4643
|
-
withdrawStake: (poolConfig: PoolConfig, pendingActivation?: boolean, deactivated?: boolean, createUserLPTA?: boolean
|
4643
|
+
withdrawStake: (poolConfig: PoolConfig, pendingActivation?: boolean, deactivated?: boolean, createUserLPTA?: boolean) => Promise<{
|
4644
4644
|
instructions: TransactionInstruction[];
|
4645
4645
|
additionalSigners: Signer[];
|
4646
4646
|
}>;
|
@@ -4802,6 +4802,10 @@ export declare class PerpetualsClient {
|
|
4802
4802
|
instructions: TransactionInstruction[];
|
4803
4803
|
additionalSigners: Signer[];
|
4804
4804
|
}>;
|
4805
|
+
setInternalOraclePriceBatch: (tokenMintList: PublicKey[], tokenInternalPrices: InternalPrice[], POOL_CONFIGS: PoolConfig[]) => Promise<{
|
4806
|
+
instructions: TransactionInstruction[];
|
4807
|
+
additionalSigners: Signer[];
|
4808
|
+
}>;
|
4805
4809
|
addCompoundingLiquidity: (amountIn: BN, minCompoundingAmountOut: BN, inTokenSymbol: string, rewardTokenMint: PublicKey, poolConfig: PoolConfig, skipBalanceChecks?: boolean, ephemeralSignerPubkey?: any, userPublicKey?: PublicKey | undefined) => Promise<{
|
4806
4810
|
instructions: TransactionInstruction[];
|
4807
4811
|
additionalSigners: Signer[];
|