flash-sdk 15.1.6 → 15.1.8-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 +11 -1
- package/dist/PerpetualsClient.js +508 -314
- package/dist/idl/perpetuals.d.ts +1316 -108
- package/dist/idl/perpetuals.json +1318 -110
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/generated.d.ts +103 -0
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import { OraclePrice } from "./OraclePrice";
|
|
|
9
9
|
import { CustodyAccount } from "./CustodyAccount";
|
|
10
10
|
import type { Perpetuals } from './idl/perpetuals';
|
|
11
11
|
import { SendTransactionOpts } from "./utils/rpc";
|
|
12
|
-
import { MarketConfig, PoolConfig, Token } from "./PoolConfig";
|
|
12
|
+
import { CustodyConfig, MarketConfig, PoolConfig, Token } from "./PoolConfig";
|
|
13
13
|
import { MarketAccount } from "./MarketAccount";
|
|
14
14
|
import { TokenStakeAccount } from "./TokenStakeAccount";
|
|
15
15
|
export type PerpClientOptions = {
|
|
@@ -191,6 +191,16 @@ export declare class PerpetualsClient {
|
|
|
191
191
|
padding: number[];
|
|
192
192
|
}>;
|
|
193
193
|
getPositionData: (position: PositionAccount, poolConfig: PoolConfig) => Promise<any>;
|
|
194
|
+
getOpenPositionQuote: (amountIn: BN, leverage: BN, marketConfig: MarketConfig, poolConfig: PoolConfig, privilege?: Privilege, receivingCustodyConfig?: CustodyConfig, existingPositionPk?: PublicKey, discountIndex?: number | null, limitPrice?: {
|
|
195
|
+
price: BN;
|
|
196
|
+
exponent: number;
|
|
197
|
+
} | null) => Promise<any>;
|
|
198
|
+
getClosePositionQuote: (positionPk: PublicKey, positionAccount: PositionAccount, poolConfig: PoolConfig, sizeDeltaUsd?: BN, privilege?: Privilege, dispensingCustodyConfig?: CustodyConfig, discountIndex?: number | null, triggerPrice?: {
|
|
199
|
+
price: BN;
|
|
200
|
+
exponent: number;
|
|
201
|
+
} | null) => Promise<any>;
|
|
202
|
+
getAddCollateralQuote: (amountIn: BN, positionPk: PublicKey, positionAccount: PositionAccount, poolConfig: PoolConfig, receivingCustodyConfig?: CustodyConfig) => Promise<any>;
|
|
203
|
+
getRemoveCollateralQuote: (collateralDeltaUsd: BN, positionPk: PublicKey, positionAccount: PositionAccount, poolConfig: PoolConfig, dispensingCustodyConfig?: CustodyConfig) => Promise<any>;
|
|
194
204
|
getOrderAccount: (orderAccountKey: PublicKey) => Promise<{
|
|
195
205
|
owner: PublicKey;
|
|
196
206
|
market: PublicKey;
|