@deriverse/kit 1.0.32 → 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/types.d.ts CHANGED
@@ -41,10 +41,10 @@ export declare enum AccountType {
41
41
  PERP_LONG_PX_TREE = 48,
42
42
  PERP_SHORT_PX_TREE = 49,
43
43
  PERP_REBALANCE_TIME_TREE = 50,
44
- PERP_PRIORITY_TREE = 51
44
+ PRIVATE_CLIENTS = 51
45
45
  }
46
46
  export declare const VERSION = 1;
47
- export declare const PROGRAM_ID: Address<"2M1irQU4JmQzxBGrQDi8cWAhdAATSPCeGYV43uvGwsDX">;
47
+ export declare const PROGRAM_ID: Address<"DRVSpZ2YUYYKgZP8XtLhAGtT1zYSCKzeHfb4DgRnrgqD">;
48
48
  export declare const MARKET_DEPTH = 20;
49
49
  export interface EngineArgs {
50
50
  programId?: Address<any>;
@@ -141,17 +141,7 @@ export interface NewSpotOrderArgs {
141
141
  ioc?: number;
142
142
  orderType?: number;
143
143
  side: number;
144
- }
145
- /**
146
- * Contains data for swapInstruction.
147
- * @property {number} instrId Instrument ID
148
- * @property {number} price Indicates limit price for swap instructiom, zero value means market order without limits.
149
- * @property {number} qty Indicates asset tokens quantity that you want to trade, negative value means selling.
150
- */
151
- export interface SwapArgs {
152
- instrId: number;
153
- price: number;
154
- qty: number;
144
+ edgePrice?: number;
155
145
  }
156
146
  /**
157
147
  * Contains data for spotQuotesReplaceInstruction
@@ -172,6 +162,21 @@ export interface SpotQuotesReplaceArgs {
172
162
  newAskPrice: number;
173
163
  newAskQty: number;
174
164
  }
165
+ /**
166
+ * Contains data for swapInstruction
167
+ * @property {Address} assetMint Asset Token Mint
168
+ * @property {Address} crncyMint Crncy Token Mint
169
+ * @property {number} amount Amount to swap
170
+ * @property {number} limitPrice limit price
171
+ * @property {boolean} crncyInput crncy token as input token
172
+ */
173
+ export interface SwapArgs {
174
+ assetMint: Address<any>;
175
+ crncyMint: Address<any>;
176
+ amount: number;
177
+ limitPrice: number;
178
+ crncyInput: boolean;
179
+ }
175
180
  /**
176
181
  * Contains data for perpQuotesReplaceInstruction
177
182
  * @property {number} instrId Instrument ID
@@ -518,6 +523,8 @@ export interface SpotLpArgs {
518
523
  instrId: number;
519
524
  side: number;
520
525
  amount: number;
526
+ minPrice?: number;
527
+ maxPrice?: number;
521
528
  }
522
529
  /**
523
530
  * Contains data for distribFundsInstruction function
@@ -533,9 +540,11 @@ export interface PerpDepositArgs {
533
540
  export interface PerpBuySeatArgs {
534
541
  instrId: number;
535
542
  amount: number;
543
+ slippage?: number;
536
544
  }
537
545
  export interface PerpSellSeatArgs {
538
546
  instrId: number;
547
+ slippage?: number;
539
548
  }
540
549
  export interface NewPerpOrderArgs {
541
550
  instrId: number;
@@ -545,6 +554,7 @@ export interface NewPerpOrderArgs {
545
554
  price: number;
546
555
  leverage?: number;
547
556
  side: number;
557
+ edgePrice?: number;
548
558
  }
549
559
  export interface NewInstrumentArgs {
550
560
  assetMint: Address<any>;
package/dist/types.js CHANGED
@@ -13,32 +13,17 @@ var InstrMask;
13
13
  var AccountType;
14
14
  (function (AccountType) {
15
15
  AccountType[AccountType["CLIENT_COMMUNITY"] = 35] = "CLIENT_COMMUNITY";
16
- //CLIENT_DRV = 32,
17
16
  AccountType[AccountType["CLIENT_PRIMARY"] = 31] = "CLIENT_PRIMARY";
18
17
  AccountType[AccountType["COMMUNITY"] = 34] = "COMMUNITY";
19
- /*
20
- PDF = 33,
21
- FUTURES_ASK_ORDERS = 29,
22
- FUTURES_ASKS_TREE = 27,
23
- FUTURES_BID_ORDERS = 28,
24
- FUTURES_BIDS_TREE = 26,
25
- FUTURES_CLIENT_ACCOUNTS = 23,
26
- FUTURES_CLIENT_INFOS = 24,
27
- FUTURES_CLIENT_INFOS2 = 25,
28
- FUTURES_LINES = 30,
29
- FUTURES_MAPS = 22,
30
- */
31
18
  AccountType[AccountType["HOLDER"] = 1] = "HOLDER";
32
19
  AccountType[AccountType["ROOT"] = 2] = "ROOT";
33
20
  AccountType[AccountType["INSTR"] = 7] = "INSTR";
34
- //INSTR_TRACE = 8,
35
21
  AccountType[AccountType["SPOT_15M_CANDLES"] = 20] = "SPOT_15M_CANDLES";
36
22
  AccountType[AccountType["SPOT_1M_CANDLES"] = 19] = "SPOT_1M_CANDLES";
37
23
  AccountType[AccountType["SPOT_ASK_ORDERS"] = 17] = "SPOT_ASK_ORDERS";
38
24
  AccountType[AccountType["SPOT_ASKS_TREE"] = 15] = "SPOT_ASKS_TREE";
39
25
  AccountType[AccountType["SPOT_BID_ORDERS"] = 16] = "SPOT_BID_ORDERS";
40
26
  AccountType[AccountType["SPOT_BIDS_TREE"] = 14] = "SPOT_BIDS_TREE";
41
- //SPOT_CLIENT_ACCOUNTS = 11,
42
27
  AccountType[AccountType["SPOT_CLIENT_INFOS"] = 12] = "SPOT_CLIENT_INFOS";
43
28
  AccountType[AccountType["SPOT_CLIENT_INFOS2"] = 13] = "SPOT_CLIENT_INFOS2";
44
29
  AccountType[AccountType["SPOT_DAY_CANDLES"] = 21] = "SPOT_DAY_CANDLES";
@@ -49,7 +34,6 @@ var AccountType;
49
34
  AccountType[AccountType["PERP_ASKS_TREE"] = 37] = "PERP_ASKS_TREE";
50
35
  AccountType[AccountType["PERP_BID_ORDERS"] = 38] = "PERP_BID_ORDERS";
51
36
  AccountType[AccountType["PERP_BIDS_TREE"] = 39] = "PERP_BIDS_TREE";
52
- //PERP_CLIENT_ACCOUNTS = 40,
53
37
  AccountType[AccountType["PERP_CLIENT_INFOS"] = 41] = "PERP_CLIENT_INFOS";
54
38
  AccountType[AccountType["PERP_CLIENT_INFOS2"] = 42] = "PERP_CLIENT_INFOS2";
55
39
  AccountType[AccountType["PERP_CLIENT_INFOS3"] = 43] = "PERP_CLIENT_INFOS3";
@@ -60,8 +44,8 @@ var AccountType;
60
44
  AccountType[AccountType["PERP_LONG_PX_TREE"] = 48] = "PERP_LONG_PX_TREE";
61
45
  AccountType[AccountType["PERP_SHORT_PX_TREE"] = 49] = "PERP_SHORT_PX_TREE";
62
46
  AccountType[AccountType["PERP_REBALANCE_TIME_TREE"] = 50] = "PERP_REBALANCE_TIME_TREE";
63
- AccountType[AccountType["PERP_PRIORITY_TREE"] = 51] = "PERP_PRIORITY_TREE";
47
+ AccountType[AccountType["PRIVATE_CLIENTS"] = 51] = "PRIVATE_CLIENTS";
64
48
  })(AccountType || (exports.AccountType = AccountType = {}));
65
49
  exports.VERSION = 1;
66
- exports.PROGRAM_ID = (0, kit_1.address)("2M1irQU4JmQzxBGrQDi8cWAhdAATSPCeGYV43uvGwsDX");
50
+ exports.PROGRAM_ID = (0, kit_1.address)("DRVSpZ2YUYYKgZP8XtLhAGtT1zYSCKzeHfb4DgRnrgqD");
67
51
  exports.MARKET_DEPTH = 20;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deriverse/kit",
3
- "version": "1.0.32",
3
+ "version": "1.0.38",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",