zklighter-perps 1.0.181 → 1.0.182

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/apis/OrderApi.ts CHANGED
@@ -73,7 +73,7 @@ export interface AccountInactiveOrdersRequest {
73
73
  }
74
74
 
75
75
  export interface AssetDetailsRequest {
76
- asset_index?: number;
76
+ asset_id?: number;
77
77
  }
78
78
 
79
79
  export interface OrderBookDetailsRequest {
@@ -312,8 +312,8 @@ export class OrderApi extends runtime.BaseAPI {
312
312
  async assetDetailsRaw(requestParameters: AssetDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssetDetails>> {
313
313
  const queryParameters: any = {};
314
314
 
315
- if (requestParameters['asset_index'] != null) {
316
- queryParameters['asset_index'] = requestParameters['asset_index'];
315
+ if (requestParameters['asset_id'] != null) {
316
+ queryParameters['asset_id'] = requestParameters['asset_id'];
317
317
  }
318
318
 
319
319
  const headerParameters: runtime.HTTPHeaders = {};
package/models/Asset.ts CHANGED
@@ -24,7 +24,7 @@ export interface Asset {
24
24
  * @type {number}
25
25
  * @memberof Asset
26
26
  */
27
- asset_index: number;
27
+ asset_id: number;
28
28
  /**
29
29
  *
30
30
  * @type {string}
@@ -90,7 +90,7 @@ export type AssetMarginModeEnum = typeof AssetMarginModeEnum[keyof typeof AssetM
90
90
  * Check if a given object implements the Asset interface.
91
91
  */
92
92
  export function instanceOfAsset(value: object): value is Asset {
93
- if (!('asset_index' in value) || value['asset_index'] === undefined) return false;
93
+ if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
94
94
  if (!('symbol' in value) || value['symbol'] === undefined) return false;
95
95
  if (!('l1_decimals' in value) || value['l1_decimals'] === undefined) return false;
96
96
  if (!('decimals' in value) || value['decimals'] === undefined) return false;
@@ -112,7 +112,7 @@ export function AssetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Ass
112
112
  }
113
113
  return {
114
114
 
115
- 'asset_index': json['asset_index'],
115
+ 'asset_id': json['asset_id'],
116
116
  'symbol': json['symbol'],
117
117
  'l1_decimals': json['l1_decimals'],
118
118
  'decimals': json['decimals'],
@@ -130,7 +130,7 @@ export function AssetToJSON(value?: Asset | null): any {
130
130
  }
131
131
  return {
132
132
 
133
- 'asset_index': value['asset_index'],
133
+ 'asset_id': value['asset_id'],
134
134
  'symbol': value['symbol'],
135
135
  'l1_decimals': value['l1_decimals'],
136
136
  'decimals': value['decimals'],
@@ -30,7 +30,7 @@ export interface DepositHistoryItem {
30
30
  * @type {number}
31
31
  * @memberof DepositHistoryItem
32
32
  */
33
- asset_index: number;
33
+ asset_id: number;
34
34
  /**
35
35
  *
36
36
  * @type {string}
@@ -75,7 +75,7 @@ export type DepositHistoryItemStatusEnum = typeof DepositHistoryItemStatusEnum[k
75
75
  */
76
76
  export function instanceOfDepositHistoryItem(value: object): value is DepositHistoryItem {
77
77
  if (!('id' in value) || value['id'] === undefined) return false;
78
- if (!('asset_index' in value) || value['asset_index'] === undefined) return false;
78
+ if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
79
79
  if (!('amount' in value) || value['amount'] === undefined) return false;
80
80
  if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
81
81
  if (!('status' in value) || value['status'] === undefined) return false;
@@ -94,7 +94,7 @@ export function DepositHistoryItemFromJSONTyped(json: any, ignoreDiscriminator:
94
94
  return {
95
95
 
96
96
  'id': json['id'],
97
- 'asset_index': json['asset_index'],
97
+ 'asset_id': json['asset_id'],
98
98
  'amount': json['amount'],
99
99
  'timestamp': json['timestamp'],
100
100
  'status': json['status'],
@@ -109,7 +109,7 @@ export function DepositHistoryItemToJSON(value?: DepositHistoryItem | null): any
109
109
  return {
110
110
 
111
111
  'id': value['id'],
112
- 'asset_index': value['asset_index'],
112
+ 'asset_id': value['asset_id'],
113
113
  'amount': value['amount'],
114
114
  'timestamp': value['timestamp'],
115
115
  'status': value['status'],
@@ -24,7 +24,7 @@ export interface ReqGetAssetDetails {
24
24
  * @type {number}
25
25
  * @memberof ReqGetAssetDetails
26
26
  */
27
- asset_index?: number;
27
+ asset_id?: number;
28
28
  }
29
29
 
30
30
  /**
@@ -44,7 +44,7 @@ export function ReqGetAssetDetailsFromJSONTyped(json: any, ignoreDiscriminator:
44
44
  }
45
45
  return {
46
46
 
47
- 'asset_index': json['asset_index'] == null ? undefined : json['asset_index'],
47
+ 'asset_id': json['asset_id'] == null ? undefined : json['asset_id'],
48
48
  };
49
49
  }
50
50
 
@@ -54,7 +54,7 @@ export function ReqGetAssetDetailsToJSON(value?: ReqGetAssetDetails | null): any
54
54
  }
55
55
  return {
56
56
 
57
- 'asset_index': value['asset_index'],
57
+ 'asset_id': value['asset_id'],
58
58
  };
59
59
  }
60
60
 
@@ -13,13 +13,6 @@
13
13
  */
14
14
 
15
15
  import { mapValues } from '../runtime';
16
- import type { MarketConfig } from './MarketConfig';
17
- import {
18
- MarketConfigFromJSON,
19
- MarketConfigFromJSONTyped,
20
- MarketConfigToJSON,
21
- } from './MarketConfig';
22
-
23
16
  /**
24
17
  *
25
18
  * @export
@@ -176,12 +169,6 @@ export interface SpotOrderBookDetail {
176
169
  * @memberof SpotOrderBookDetail
177
170
  */
178
171
  daily_chart: { [key: string]: number; };
179
- /**
180
- *
181
- * @type {MarketConfig}
182
- * @memberof SpotOrderBookDetail
183
- */
184
- market_config: MarketConfig;
185
172
  }
186
173
 
187
174
 
@@ -233,7 +220,6 @@ export function instanceOfSpotOrderBookDetail(value: object): value is SpotOrder
233
220
  if (!('daily_price_high' in value) || value['daily_price_high'] === undefined) return false;
234
221
  if (!('daily_price_change' in value) || value['daily_price_change'] === undefined) return false;
235
222
  if (!('daily_chart' in value) || value['daily_chart'] === undefined) return false;
236
- if (!('market_config' in value) || value['market_config'] === undefined) return false;
237
223
  return true;
238
224
  }
239
225
 
@@ -272,7 +258,6 @@ export function SpotOrderBookDetailFromJSONTyped(json: any, ignoreDiscriminator:
272
258
  'daily_price_high': json['daily_price_high'],
273
259
  'daily_price_change': json['daily_price_change'],
274
260
  'daily_chart': json['daily_chart'],
275
- 'market_config': MarketConfigFromJSON(json['market_config']),
276
261
  };
277
262
  }
278
263
 
@@ -307,7 +292,6 @@ export function SpotOrderBookDetailToJSON(value?: SpotOrderBookDetail | null): a
307
292
  'daily_price_high': value['daily_price_high'],
308
293
  'daily_price_change': value['daily_price_change'],
309
294
  'daily_chart': value['daily_chart'],
310
- 'market_config': MarketConfigToJSON(value['market_config']),
311
295
  };
312
296
  }
313
297
 
@@ -30,7 +30,7 @@ export interface TransferHistoryItem {
30
30
  * @type {number}
31
31
  * @memberof TransferHistoryItem
32
32
  */
33
- asset_index: number;
33
+ asset_id: number;
34
34
  /**
35
35
  *
36
36
  * @type {string}
@@ -73,6 +73,18 @@ export interface TransferHistoryItem {
73
73
  * @memberof TransferHistoryItem
74
74
  */
75
75
  to_account_index: number;
76
+ /**
77
+ *
78
+ * @type {string}
79
+ * @memberof TransferHistoryItem
80
+ */
81
+ from_route: TransferHistoryItemFromRouteEnum;
82
+ /**
83
+ *
84
+ * @type {string}
85
+ * @memberof TransferHistoryItem
86
+ */
87
+ to_route: TransferHistoryItemToRouteEnum;
76
88
  /**
77
89
  *
78
90
  * @type {string}
@@ -91,17 +103,36 @@ export const TransferHistoryItemTypeEnum = {
91
103
  L2BurnSharesInflow: 'L2BurnSharesInflow',
92
104
  L2BurnSharesOutflow: 'L2BurnSharesOutflow',
93
105
  L2MintSharesInflow: 'L2MintSharesInflow',
94
- L2MintSharesOutflow: 'L2MintSharesOutflow'
106
+ L2MintSharesOutflow: 'L2MintSharesOutflow',
107
+ L2SelfTransfer: 'L2SelfTransfer'
95
108
  } as const;
96
109
  export type TransferHistoryItemTypeEnum = typeof TransferHistoryItemTypeEnum[keyof typeof TransferHistoryItemTypeEnum];
97
110
 
111
+ /**
112
+ * @export
113
+ */
114
+ export const TransferHistoryItemFromRouteEnum = {
115
+ Spot: 'spot',
116
+ Perps: 'perps'
117
+ } as const;
118
+ export type TransferHistoryItemFromRouteEnum = typeof TransferHistoryItemFromRouteEnum[keyof typeof TransferHistoryItemFromRouteEnum];
119
+
120
+ /**
121
+ * @export
122
+ */
123
+ export const TransferHistoryItemToRouteEnum = {
124
+ Spot: 'spot',
125
+ Perps: 'perps'
126
+ } as const;
127
+ export type TransferHistoryItemToRouteEnum = typeof TransferHistoryItemToRouteEnum[keyof typeof TransferHistoryItemToRouteEnum];
128
+
98
129
 
99
130
  /**
100
131
  * Check if a given object implements the TransferHistoryItem interface.
101
132
  */
102
133
  export function instanceOfTransferHistoryItem(value: object): value is TransferHistoryItem {
103
134
  if (!('id' in value) || value['id'] === undefined) return false;
104
- if (!('asset_index' in value) || value['asset_index'] === undefined) return false;
135
+ if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
105
136
  if (!('amount' in value) || value['amount'] === undefined) return false;
106
137
  if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
107
138
  if (!('type' in value) || value['type'] === undefined) return false;
@@ -109,6 +140,8 @@ export function instanceOfTransferHistoryItem(value: object): value is TransferH
109
140
  if (!('to_l1_address' in value) || value['to_l1_address'] === undefined) return false;
110
141
  if (!('from_account_index' in value) || value['from_account_index'] === undefined) return false;
111
142
  if (!('to_account_index' in value) || value['to_account_index'] === undefined) return false;
143
+ if (!('from_route' in value) || value['from_route'] === undefined) return false;
144
+ if (!('to_route' in value) || value['to_route'] === undefined) return false;
112
145
  if (!('tx_hash' in value) || value['tx_hash'] === undefined) return false;
113
146
  return true;
114
147
  }
@@ -124,7 +157,7 @@ export function TransferHistoryItemFromJSONTyped(json: any, ignoreDiscriminator:
124
157
  return {
125
158
 
126
159
  'id': json['id'],
127
- 'asset_index': json['asset_index'],
160
+ 'asset_id': json['asset_id'],
128
161
  'amount': json['amount'],
129
162
  'timestamp': json['timestamp'],
130
163
  'type': json['type'],
@@ -132,6 +165,8 @@ export function TransferHistoryItemFromJSONTyped(json: any, ignoreDiscriminator:
132
165
  'to_l1_address': json['to_l1_address'],
133
166
  'from_account_index': json['from_account_index'],
134
167
  'to_account_index': json['to_account_index'],
168
+ 'from_route': json['from_route'],
169
+ 'to_route': json['to_route'],
135
170
  'tx_hash': json['tx_hash'],
136
171
  };
137
172
  }
@@ -143,7 +178,7 @@ export function TransferHistoryItemToJSON(value?: TransferHistoryItem | null): a
143
178
  return {
144
179
 
145
180
  'id': value['id'],
146
- 'asset_index': value['asset_index'],
181
+ 'asset_id': value['asset_id'],
147
182
  'amount': value['amount'],
148
183
  'timestamp': value['timestamp'],
149
184
  'type': value['type'],
@@ -151,6 +186,8 @@ export function TransferHistoryItemToJSON(value?: TransferHistoryItem | null): a
151
186
  'to_l1_address': value['to_l1_address'],
152
187
  'from_account_index': value['from_account_index'],
153
188
  'to_account_index': value['to_account_index'],
189
+ 'from_route': value['from_route'],
190
+ 'to_route': value['to_route'],
154
191
  'tx_hash': value['tx_hash'],
155
192
  };
156
193
  }
@@ -30,7 +30,7 @@ export interface WithdrawHistoryItem {
30
30
  * @type {number}
31
31
  * @memberof WithdrawHistoryItem
32
32
  */
33
- asset_index: number;
33
+ asset_id: number;
34
34
  /**
35
35
  *
36
36
  * @type {string}
@@ -91,7 +91,7 @@ export type WithdrawHistoryItemTypeEnum = typeof WithdrawHistoryItemTypeEnum[key
91
91
  */
92
92
  export function instanceOfWithdrawHistoryItem(value: object): value is WithdrawHistoryItem {
93
93
  if (!('id' in value) || value['id'] === undefined) return false;
94
- if (!('asset_index' in value) || value['asset_index'] === undefined) return false;
94
+ if (!('asset_id' in value) || value['asset_id'] === undefined) return false;
95
95
  if (!('amount' in value) || value['amount'] === undefined) return false;
96
96
  if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
97
97
  if (!('status' in value) || value['status'] === undefined) return false;
@@ -111,7 +111,7 @@ export function WithdrawHistoryItemFromJSONTyped(json: any, ignoreDiscriminator:
111
111
  return {
112
112
 
113
113
  'id': json['id'],
114
- 'asset_index': json['asset_index'],
114
+ 'asset_id': json['asset_id'],
115
115
  'amount': json['amount'],
116
116
  'timestamp': json['timestamp'],
117
117
  'status': json['status'],
@@ -127,7 +127,7 @@ export function WithdrawHistoryItemToJSON(value?: WithdrawHistoryItem | null): a
127
127
  return {
128
128
 
129
129
  'id': value['id'],
130
- 'asset_index': value['asset_index'],
130
+ 'asset_id': value['asset_id'],
131
131
  'amount': value['amount'],
132
132
  'timestamp': value['timestamp'],
133
133
  'status': value['status'],
package/openapi.json CHANGED
@@ -540,7 +540,7 @@
540
540
  },
541
541
  "parameters": [
542
542
  {
543
- "name": "asset_index",
543
+ "name": "asset_id",
544
544
  "in": "query",
545
545
  "required": false,
546
546
  "type": "integer",
@@ -3843,7 +3843,7 @@
3843
3843
  "Asset": {
3844
3844
  "type": "object",
3845
3845
  "properties": {
3846
- "asset_index": {
3846
+ "asset_id": {
3847
3847
  "type": "integer",
3848
3848
  "format": "int16",
3849
3849
  "example": "1"
@@ -3889,7 +3889,7 @@
3889
3889
  },
3890
3890
  "title": "Asset",
3891
3891
  "required": [
3892
- "asset_index",
3892
+ "asset_id",
3893
3893
  "symbol",
3894
3894
  "l1_decimals",
3895
3895
  "decimals",
@@ -4472,7 +4472,7 @@
4472
4472
  "id": {
4473
4473
  "type": "string"
4474
4474
  },
4475
- "asset_index": {
4475
+ "asset_id": {
4476
4476
  "type": "integer",
4477
4477
  "format": "int16",
4478
4478
  "example": "1"
@@ -4503,7 +4503,7 @@
4503
4503
  "title": "DepositHistoryItem",
4504
4504
  "required": [
4505
4505
  "id",
4506
- "asset_index",
4506
+ "asset_id",
4507
4507
  "amount",
4508
4508
  "timestamp",
4509
4509
  "status",
@@ -7258,7 +7258,7 @@
7258
7258
  "ReqGetAssetDetails": {
7259
7259
  "type": "object",
7260
7260
  "properties": {
7261
- "asset_index": {
7261
+ "asset_id": {
7262
7262
  "type": "integer",
7263
7263
  "format": "int16",
7264
7264
  "default": "0"
@@ -8787,9 +8787,6 @@
8787
8787
  "type": "number",
8788
8788
  "format": "double"
8789
8789
  }
8790
- },
8791
- "market_config": {
8792
- "$ref": "#/definitions/MarketConfig"
8793
8790
  }
8794
8791
  },
8795
8792
  "title": "SpotOrderBookDetail",
@@ -8818,8 +8815,7 @@
8818
8815
  "daily_price_low",
8819
8816
  "daily_price_high",
8820
8817
  "daily_price_change",
8821
- "daily_chart",
8822
- "market_config"
8818
+ "daily_chart"
8823
8819
  ]
8824
8820
  },
8825
8821
  "Status": {
@@ -9141,7 +9137,7 @@
9141
9137
  "id": {
9142
9138
  "type": "string"
9143
9139
  },
9144
- "asset_index": {
9140
+ "asset_id": {
9145
9141
  "type": "integer",
9146
9142
  "format": "int16",
9147
9143
  "example": "1"
@@ -9163,7 +9159,8 @@
9163
9159
  "L2BurnSharesInflow",
9164
9160
  "L2BurnSharesOutflow",
9165
9161
  "L2MintSharesInflow",
9166
- "L2MintSharesOutflow"
9162
+ "L2MintSharesOutflow",
9163
+ "L2SelfTransfer"
9167
9164
  ]
9168
9165
  },
9169
9166
  "from_l1_address": {
@@ -9184,6 +9181,20 @@
9184
9181
  "format": "int64",
9185
9182
  "example": "1"
9186
9183
  },
9184
+ "from_route": {
9185
+ "type": "string",
9186
+ "enum": [
9187
+ "spot",
9188
+ "perps"
9189
+ ]
9190
+ },
9191
+ "to_route": {
9192
+ "type": "string",
9193
+ "enum": [
9194
+ "spot",
9195
+ "perps"
9196
+ ]
9197
+ },
9187
9198
  "tx_hash": {
9188
9199
  "type": "string",
9189
9200
  "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
@@ -9192,7 +9203,7 @@
9192
9203
  "title": "TransferHistoryItem",
9193
9204
  "required": [
9194
9205
  "id",
9195
- "asset_index",
9206
+ "asset_id",
9196
9207
  "amount",
9197
9208
  "timestamp",
9198
9209
  "type",
@@ -9200,6 +9211,8 @@
9200
9211
  "to_l1_address",
9201
9212
  "from_account_index",
9202
9213
  "to_account_index",
9214
+ "from_route",
9215
+ "to_route",
9203
9216
  "tx_hash"
9204
9217
  ]
9205
9218
  },
@@ -9421,7 +9434,7 @@
9421
9434
  "id": {
9422
9435
  "type": "string"
9423
9436
  },
9424
- "asset_index": {
9437
+ "asset_id": {
9425
9438
  "type": "integer",
9426
9439
  "format": "int16",
9427
9440
  "example": "1"
@@ -9460,7 +9473,7 @@
9460
9473
  "title": "WithdrawHistoryItem",
9461
9474
  "required": [
9462
9475
  "id",
9463
- "asset_index",
9476
+ "asset_id",
9464
9477
  "amount",
9465
9478
  "timestamp",
9466
9479
  "status",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.181",
3
+ "version": "1.0.182",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {