flash-sdk 2.12.8 → 2.13.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 +22 -4
- package/dist/PerpetualsClient.js +533 -169
- package/dist/ViewHelper.d.ts +8 -0
- package/dist/ViewHelper.js +108 -0
- package/dist/backupOracle.d.ts +2 -0
- package/dist/backupOracle.js +31 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/IdlCoder.d.ts +8 -0
- package/dist/utils/IdlCoder.js +166 -0
- package/package.json +1 -1
@@ -55,6 +55,7 @@ export declare class PerpetualsClient {
|
|
55
55
|
private prioritizationFee;
|
56
56
|
private useExtOracleAccount;
|
57
57
|
private txConfirmationCommitment;
|
58
|
+
private viewHelper;
|
58
59
|
constructor(provider: AnchorProvider, programId: PublicKey, composabilityProgramId: PublicKey, fbNftRewardProgramId: PublicKey, rewardDistributionProgramId: PublicKey, opts: PerpClientOptions, useExtOracleAccount?: boolean);
|
59
60
|
setPrioritizationFee: (fee: number) => void;
|
60
61
|
loadAddressLookupTable: (poolConfig: PoolConfig) => Promise<void>;
|
@@ -2305,10 +2306,6 @@ export declare class PerpetualsClient {
|
|
2305
2306
|
addCustody: (poolName: string, tokenMint: PublicKey, isStable: boolean, isVirtual: boolean, oracle: OracleParams, pricing: PricingParams, permissions: Permissions, fees: Fees, borrowRate: BorrowRateParams, ratios: TokenRatios[], depegAdjustment: boolean) => Promise<void>;
|
2306
2307
|
editCustody: (poolName: string, tokenMint: PublicKey, isStable: boolean, oracle: OracleParams, pricing: PricingParams, permissions: Permissions, fees: Fees, borrowRate: BorrowRateParams, ratios: TokenRatios[]) => Promise<void>;
|
2307
2308
|
removeCustody: (poolName: string, tokenMint: PublicKey, ratios: TokenRatios[]) => Promise<void>;
|
2308
|
-
getLiquidationState: (positionAccount: PublicKey, poolName: string, tokenMint: PublicKey, collateralMint: PublicKey, poolConfig: PoolConfig) => Promise<any>;
|
2309
|
-
getCompoundingTokenData: (poolConfig: PoolConfig) => Promise<any>;
|
2310
|
-
getLpTokenPrice: (poolConfig: PoolConfig) => Promise<any>;
|
2311
|
-
getCompoundingTokenDataView: (poolConfig: PoolConfig) => Promise<any>;
|
2312
2309
|
liquidate: (positionAccount: PublicKey, poolConfig: PoolConfig, tokenMint: PublicKey, collateralMint: PublicKey, marketPk: PublicKey) => Promise<TransactionInstruction>;
|
2313
2310
|
getApyPercentageUi: (rewardCustodyAccount: CustodyAccount, previousSnapShotRewardPerLpStaked: BN, lpTokenUsdPrice: BN) => string;
|
2314
2311
|
getAddLiquidityAmountAndFeeSync: (amountIn: BN, poolAccount: PoolAccount, inputTokenPrice: OraclePrice, inputTokenEmaPrice: OraclePrice, inputTokenCustodyAccount: CustodyAccount, lpTokenSupplyAmount: BN, poolAumUsdMax: BN, poolConfig: PoolConfig) => AddLiquidityAmountAndFee;
|
@@ -2375,6 +2372,27 @@ export declare class PerpetualsClient {
|
|
2375
2372
|
discountBn: BN;
|
2376
2373
|
};
|
2377
2374
|
getIndexPriceAtParticularTime: (poolConfig: PoolConfig, targetPricesAtT1Ui: Number[], targetPricesAtT2Ui: Number[], tokenRatiosAtT2BN: BN[]) => string;
|
2375
|
+
getStakedLpTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
2376
|
+
getAddLiquidityAmountAndFee: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<{
|
2377
|
+
amount: BN;
|
2378
|
+
fee: BN;
|
2379
|
+
}>;
|
2380
|
+
getRemoveLiquidityAmountAndFee: (amount: BN, poolKey: PublicKey, removeTokenCustodyKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<{
|
2381
|
+
amount: BN;
|
2382
|
+
fee: BN;
|
2383
|
+
}>;
|
2384
|
+
getCompoundingLPTokenPrice: (poolKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<string>;
|
2385
|
+
getSFLPAddLiquidityAmountAndFee: (amount: BN, poolKey: PublicKey, depositCustodyKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<{
|
2386
|
+
amount: BN;
|
2387
|
+
fee: BN;
|
2388
|
+
}>;
|
2389
|
+
getSFLPRemoveLiquidityAmountAndFee: (amount: BN, poolKey: PublicKey, removeTokenCustodyKey: PublicKey, POOL_CONFIG: PoolConfig) => Promise<{
|
2390
|
+
amount: BN;
|
2391
|
+
fee: BN;
|
2392
|
+
}>;
|
2393
|
+
getLiquidationStateView: (positionAccount: PublicKey, poolName: string, tokenMint: PublicKey, collateralMint: PublicKey, poolConfig: PoolConfig) => Promise<any>;
|
2394
|
+
getCompoundingTokenDataView: (poolConfig: PoolConfig) => Promise<any>;
|
2395
|
+
getLpTokenPriceView: (poolConfig: PoolConfig) => Promise<any>;
|
2378
2396
|
openPosition: (targetSymbol: string, collateralSymbol: string, priceWithSlippage: ContractOraclePrice, collateralWithfee: BN, size: BN, side: Side, poolConfig: PoolConfig, nftTradingAccount: PublicKey, nftReferralAccount: PublicKey, nftRebateTokenAccount: PublicKey, privilege: Privilege, skipBalanceChecks?: boolean) => Promise<{
|
2379
2397
|
instructions: TransactionInstruction[];
|
2380
2398
|
additionalSigners: Signer[];
|