@deriverse/kit 1.0.30 → 1.0.38

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { Address, Base64EncodedDataResponse, Rpc, IAccountMeta, IInstruction, Commitment } from "@solana/kit";
2
- import { Instrument, GetClientSpotOrdersInfoResponse, GetClientSpotOrdersArgs, GetClientSpotOrdersResponse, SpotOrderCancelArgs, GetClientDataResponse, GetClientSpotOrdersInfoArgs, SpotLpArgs, getInstrAccountByTagArgs, GetInstrIdArgs, NewSpotOrderArgs, DepositArgs, WithdrawArgs, SpotQuotesReplaceArgs, SpotMassCancelArgs, InstrId, GetClientPerpOrdersInfoArgs, GetClientPerpOrdersInfoResponse, GetClientPerpOrdersArgs, GetClientPerpOrdersResponse, PerpDepositArgs, NewPerpOrderArgs, PerpQuotesReplaceArgs, PerpOrderCancelArgs, PerpMassCancelArgs, PerpForcedCloseArgs, CommunityData, LogMessage, PerpChangeLeverageArgs, PerpStatisticsResetArgs, EngineArgs, NewInstrumentArgs, PerpBuySeatArgs } from './types';
1
+ import { Address, Base64EncodedDataResponse, Rpc, IAccountMeta, Commitment } from "@solana/kit";
2
+ import { Instrument, GetClientSpotOrdersInfoResponse, GetClientSpotOrdersArgs, GetClientSpotOrdersResponse, SpotOrderCancelArgs, GetClientDataResponse, GetClientSpotOrdersInfoArgs, SpotLpArgs, getInstrAccountByTagArgs, GetInstrIdArgs, NewSpotOrderArgs, DepositArgs, WithdrawArgs, SpotQuotesReplaceArgs, SpotMassCancelArgs, InstrId, GetClientPerpOrdersInfoArgs, GetClientPerpOrdersInfoResponse, GetClientPerpOrdersArgs, GetClientPerpOrdersResponse, PerpDepositArgs, NewPerpOrderArgs, PerpQuotesReplaceArgs, PerpOrderCancelArgs, PerpMassCancelArgs, CommunityData, LogMessage, PerpChangeLeverageArgs, PerpStatisticsResetArgs, EngineArgs, NewInstrumentArgs, PerpBuySeatArgs, SwapArgs, PerpSellSeatArgs } from './types';
3
3
  import { InstrAccountHeaderModel, RootStateModel, TokenStateModel } from "./structure_models";
4
4
  export * from './types';
5
5
  export * from './logs_models';
@@ -8,7 +8,13 @@ export * from './logs_models';
8
8
  * @param price Current market price
9
9
  * @returns Price step
10
10
  */
11
- export declare function getPriceStep(price: number): number;
11
+ export declare function getSpotPriceStep(price: number): number;
12
+ /**
13
+ * Get price step between orderbook lines depending on curent price
14
+ * @param price Current market price
15
+ * @returns Price step
16
+ */
17
+ export declare function getPerpPriceStep(price: number): number;
12
18
  /**
13
19
  * Main class to operate with Deriverse
14
20
  * @property {number} originalClientId Deriverse main client ID
@@ -32,6 +38,7 @@ export declare class Engine {
32
38
  clientLutAddress?: Address<any>;
33
39
  private refClientPrimaryAccount?;
34
40
  private refClientCommunityAccount?;
41
+ privateMode?: boolean;
35
42
  tokens: Map<number, TokenStateModel>;
36
43
  instruments: Map<number, Instrument>;
37
44
  version: number;
@@ -185,7 +192,7 @@ export declare class Engine {
185
192
  * @returns Transaction instruction
186
193
  */
187
194
  perpBuySeatInstruction(args: PerpBuySeatArgs): Promise<any>;
188
- perpSellSeatInstruction(args: PerpBuySeatArgs): Promise<any>;
195
+ perpSellSeatInstruction(args: PerpSellSeatArgs): Promise<any>;
189
196
  /**
190
197
  * Build instruction for new perp order in particular instrument
191
198
  * @param args Order data
@@ -210,12 +217,6 @@ export declare class Engine {
210
217
  * @returns Transaction instruction
211
218
  */
212
219
  perpMassCancelInstruction(args: PerpMassCancelArgs): Promise<any>;
213
- /**
214
- * Build instruction for perp forced close in particular instrument
215
- * @param args Order data
216
- * @returns Transaction instruction
217
- */
218
- perpForcedCloseInstruction(args: PerpForcedCloseArgs): Promise<IInstruction>;
219
220
  /**
220
221
  * Build instruction for new referral link
221
222
  * @returns Transaction instruction
@@ -239,4 +240,10 @@ export declare class Engine {
239
240
  * @returns Transaction instruction
240
241
  */
241
242
  newInstrumentInstructions(args: NewInstrumentArgs): Promise<any[]>;
243
+ /**
244
+ * Build instruction for durect swap
245
+ * @param args Order data
246
+ * @returns Transaction instruction
247
+ */
248
+ swapInstruction(args: SwapArgs): Promise<any>;
242
249
  }