zklighter-perps 1.0.166 → 1.0.168

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.
@@ -96,7 +96,6 @@ models/ReqGetAccountByL1Address.ts
96
96
  models/ReqGetAccountInactiveOrders.ts
97
97
  models/ReqGetAccountLimits.ts
98
98
  models/ReqGetAccountMetadata.ts
99
- models/ReqGetAccountPendingTxs.ts
100
99
  models/ReqGetAccountPnL.ts
101
100
  models/ReqGetAccountTxs.ts
102
101
  models/ReqGetBlock.ts
@@ -46,12 +46,6 @@ import {
46
46
  WithdrawHistoryToJSON,
47
47
  } from '../models/index';
48
48
 
49
- export interface AccountPendingTxsRequest {
50
- by: AccountPendingTxsByEnum;
51
- value: string;
52
- types?: Array<number>;
53
- }
54
-
55
49
  export interface AccountTxsRequest {
56
50
  limit: number;
57
51
  by: AccountTxsByEnum;
@@ -81,11 +75,6 @@ export interface NextNonceRequest {
81
75
  api_key_index: number;
82
76
  }
83
77
 
84
- export interface PendingTxsRequest {
85
- limit: number;
86
- index?: number;
87
- }
88
-
89
78
  export interface SendTxRequest {
90
79
  tx_type: number;
91
80
  tx_info: string;
@@ -140,60 +129,6 @@ export interface WithdrawHistoryRequest {
140
129
  */
141
130
  export class TransactionApi extends runtime.BaseAPI {
142
131
 
143
- /**
144
- * Get pending transactions of a specific account
145
- * accountPendingTxs
146
- */
147
- async accountPendingTxsRaw(requestParameters: AccountPendingTxsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Txs>> {
148
- if (requestParameters['by'] == null) {
149
- throw new runtime.RequiredError(
150
- 'by',
151
- 'Required parameter "by" was null or undefined when calling accountPendingTxs().'
152
- );
153
- }
154
-
155
- if (requestParameters['value'] == null) {
156
- throw new runtime.RequiredError(
157
- 'value',
158
- 'Required parameter "value" was null or undefined when calling accountPendingTxs().'
159
- );
160
- }
161
-
162
- const queryParameters: any = {};
163
-
164
- if (requestParameters['by'] != null) {
165
- queryParameters['by'] = requestParameters['by'];
166
- }
167
-
168
- if (requestParameters['value'] != null) {
169
- queryParameters['value'] = requestParameters['value'];
170
- }
171
-
172
- if (requestParameters['types'] != null) {
173
- queryParameters['types'] = requestParameters['types']!.join(runtime.COLLECTION_FORMATS["csv"]);
174
- }
175
-
176
- const headerParameters: runtime.HTTPHeaders = {};
177
-
178
- const response = await this.request({
179
- path: `/api/v1/accountPendingTxs`,
180
- method: 'GET',
181
- headers: headerParameters,
182
- query: queryParameters,
183
- }, initOverrides);
184
-
185
- return new runtime.JSONApiResponse(response, (jsonValue) => TxsFromJSON(jsonValue));
186
- }
187
-
188
- /**
189
- * Get pending transactions of a specific account
190
- * accountPendingTxs
191
- */
192
- async accountPendingTxs(requestParameters: AccountPendingTxsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Txs> {
193
- const response = await this.accountPendingTxsRaw(requestParameters, initOverrides);
194
- return await response.value();
195
- }
196
-
197
132
  /**
198
133
  * Get transactions of a specific account
199
134
  * accountTxs
@@ -437,49 +372,6 @@ export class TransactionApi extends runtime.BaseAPI {
437
372
  return await response.value();
438
373
  }
439
374
 
440
- /**
441
- * Get pending transactions
442
- * pendingTxs
443
- */
444
- async pendingTxsRaw(requestParameters: PendingTxsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Txs>> {
445
- if (requestParameters['limit'] == null) {
446
- throw new runtime.RequiredError(
447
- 'limit',
448
- 'Required parameter "limit" was null or undefined when calling pendingTxs().'
449
- );
450
- }
451
-
452
- const queryParameters: any = {};
453
-
454
- if (requestParameters['index'] != null) {
455
- queryParameters['index'] = requestParameters['index'];
456
- }
457
-
458
- if (requestParameters['limit'] != null) {
459
- queryParameters['limit'] = requestParameters['limit'];
460
- }
461
-
462
- const headerParameters: runtime.HTTPHeaders = {};
463
-
464
- const response = await this.request({
465
- path: `/api/v1/pendingTxs`,
466
- method: 'GET',
467
- headers: headerParameters,
468
- query: queryParameters,
469
- }, initOverrides);
470
-
471
- return new runtime.JSONApiResponse(response, (jsonValue) => TxsFromJSON(jsonValue));
472
- }
473
-
474
- /**
475
- * Get pending transactions
476
- * pendingTxs
477
- */
478
- async pendingTxs(requestParameters: PendingTxsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Txs> {
479
- const response = await this.pendingTxsRaw(requestParameters, initOverrides);
480
- return await response.value();
481
- }
482
-
483
375
  /**
484
376
  * You need to sign the transaction body before sending it to the server. More details can be found in the Get Started docs: [Get Started For Programmers](https://apidocs.lighter.xyz/docs/get-started-for-programmers)
485
377
  * sendTx
@@ -949,13 +841,6 @@ export class TransactionApi extends runtime.BaseAPI {
949
841
 
950
842
  }
951
843
 
952
- /**
953
- * @export
954
- */
955
- export const AccountPendingTxsByEnum = {
956
- AccountIndex: 'account_index'
957
- } as const;
958
- export type AccountPendingTxsByEnum = typeof AccountPendingTxsByEnum[keyof typeof AccountPendingTxsByEnum];
959
844
  /**
960
845
  * @export
961
846
  */
package/models/Bridge.ts CHANGED
@@ -19,6 +19,18 @@ import { mapValues } from '../runtime';
19
19
  * @interface Bridge
20
20
  */
21
21
  export interface Bridge {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof Bridge
26
+ */
27
+ id: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof Bridge
32
+ */
33
+ version: BridgeVersionEnum;
22
34
  /**
23
35
  *
24
36
  * @type {string}
@@ -66,7 +78,7 @@ export interface Bridge {
66
78
  * @type {string}
67
79
  * @memberof Bridge
68
80
  */
69
- status: string;
81
+ status: BridgeStatusEnum;
70
82
  /**
71
83
  *
72
84
  * @type {string}
@@ -99,10 +111,33 @@ export interface Bridge {
99
111
  is_external_deposit: boolean;
100
112
  }
101
113
 
114
+
115
+ /**
116
+ * @export
117
+ */
118
+ export const BridgeVersionEnum = {
119
+ NUMBER_1: 1,
120
+ NUMBER_2: 2
121
+ } as const;
122
+ export type BridgeVersionEnum = typeof BridgeVersionEnum[keyof typeof BridgeVersionEnum];
123
+
124
+ /**
125
+ * @export
126
+ */
127
+ export const BridgeStatusEnum = {
128
+ Pending: 'pending',
129
+ Bridging: 'bridging',
130
+ Completed: 'completed'
131
+ } as const;
132
+ export type BridgeStatusEnum = typeof BridgeStatusEnum[keyof typeof BridgeStatusEnum];
133
+
134
+
102
135
  /**
103
136
  * Check if a given object implements the Bridge interface.
104
137
  */
105
138
  export function instanceOfBridge(value: object): value is Bridge {
139
+ if (!('id' in value) || value['id'] === undefined) return false;
140
+ if (!('version' in value) || value['version'] === undefined) return false;
106
141
  if (!('source' in value) || value['source'] === undefined) return false;
107
142
  if (!('source_chain_id' in value) || value['source_chain_id'] === undefined) return false;
108
143
  if (!('fast_bridge_tx_hash' in value) || value['fast_bridge_tx_hash'] === undefined) return false;
@@ -129,6 +164,8 @@ export function BridgeFromJSONTyped(json: any, ignoreDiscriminator: boolean): Br
129
164
  }
130
165
  return {
131
166
 
167
+ 'id': json['id'],
168
+ 'version': json['version'],
132
169
  'source': json['source'],
133
170
  'source_chain_id': json['source_chain_id'],
134
171
  'fast_bridge_tx_hash': json['fast_bridge_tx_hash'],
@@ -151,6 +188,8 @@ export function BridgeToJSON(value?: Bridge | null): any {
151
188
  }
152
189
  return {
153
190
 
191
+ 'id': value['id'],
192
+ 'version': value['version'],
154
193
  'source': value['source'],
155
194
  'source_chain_id': value['source_chain_id'],
156
195
  'fast_bridge_tx_hash': value['fast_bridge_tx_hash'],
package/models/index.ts CHANGED
@@ -83,7 +83,6 @@ export * from './ReqGetAccountByL1Address';
83
83
  export * from './ReqGetAccountInactiveOrders';
84
84
  export * from './ReqGetAccountLimits';
85
85
  export * from './ReqGetAccountMetadata';
86
- export * from './ReqGetAccountPendingTxs';
87
86
  export * from './ReqGetAccountPnL';
88
87
  export * from './ReqGetAccountTxs';
89
88
  export * from './ReqGetBlock';
package/openapi.json CHANGED
@@ -335,60 +335,6 @@
335
335
  "description": "Get account metadatas"
336
336
  }
337
337
  },
338
- "/api/v1/accountPendingTxs": {
339
- "get": {
340
- "summary": "accountPendingTxs",
341
- "operationId": "accountPendingTxs",
342
- "responses": {
343
- "200": {
344
- "description": "A successful response.",
345
- "schema": {
346
- "$ref": "#/definitions/Txs"
347
- }
348
- },
349
- "400": {
350
- "description": "Bad request",
351
- "schema": {
352
- "$ref": "#/definitions/ResultCode"
353
- }
354
- }
355
- },
356
- "parameters": [
357
- {
358
- "name": "by",
359
- "in": "query",
360
- "required": true,
361
- "type": "string",
362
- "enum": [
363
- "account_index"
364
- ]
365
- },
366
- {
367
- "name": "value",
368
- "in": "query",
369
- "required": true,
370
- "type": "string"
371
- },
372
- {
373
- "name": "types",
374
- "in": "query",
375
- "required": false,
376
- "type": "array",
377
- "items": {
378
- "type": "integer",
379
- "format": "uint8"
380
- }
381
- }
382
- ],
383
- "tags": [
384
- "transaction"
385
- ],
386
- "consumes": [
387
- "multipart/form-data"
388
- ],
389
- "description": "Get pending transactions of a specific account"
390
- }
391
- },
392
338
  "/api/v1/accountTxs": {
393
339
  "get": {
394
340
  "summary": "accountTxs",
@@ -2013,51 +1959,6 @@
2013
1959
  "description": "Get order books metadata.<hr>**Response Description:**<br><br>1) **Taker and maker fees** are in percentage.<br>2) **Min base amount:** The amount of base token that can be traded in a single order.<br>3) **Min quote amount:** The amount of quote token that can be traded in a single order.<br>4) **Supported size decimals:** The number of decimal places that can be used for the size of the order.<br>5) **Supported price decimals:** The number of decimal places that can be used for the price of the order.<br>6) **Supported quote decimals:** Size Decimals + Quote Decimals."
2014
1960
  }
2015
1961
  },
2016
- "/api/v1/pendingTxs": {
2017
- "get": {
2018
- "summary": "pendingTxs",
2019
- "operationId": "pendingTxs",
2020
- "responses": {
2021
- "200": {
2022
- "description": "A successful response.",
2023
- "schema": {
2024
- "$ref": "#/definitions/Txs"
2025
- }
2026
- },
2027
- "400": {
2028
- "description": "Bad request",
2029
- "schema": {
2030
- "$ref": "#/definitions/ResultCode"
2031
- }
2032
- }
2033
- },
2034
- "parameters": [
2035
- {
2036
- "name": "index",
2037
- "in": "query",
2038
- "required": false,
2039
- "type": "integer",
2040
- "format": "int64"
2041
- },
2042
- {
2043
- "name": "limit",
2044
- "in": "query",
2045
- "required": true,
2046
- "type": "integer",
2047
- "format": "int64",
2048
- "minimum": 1,
2049
- "maximum": 100
2050
- }
2051
- ],
2052
- "tags": [
2053
- "transaction"
2054
- ],
2055
- "consumes": [
2056
- "multipart/form-data"
2057
- ],
2058
- "description": "Get pending transactions"
2059
- }
2060
- },
2061
1962
  "/api/v1/pnl": {
2062
1963
  "get": {
2063
1964
  "summary": "pnl",
@@ -3847,6 +3748,18 @@
3847
3748
  "Bridge": {
3848
3749
  "type": "object",
3849
3750
  "properties": {
3751
+ "id": {
3752
+ "type": "integer",
3753
+ "format": "int64"
3754
+ },
3755
+ "version": {
3756
+ "type": "integer",
3757
+ "format": "int32",
3758
+ "enum": [
3759
+ "1",
3760
+ "2"
3761
+ ]
3762
+ },
3850
3763
  "source": {
3851
3764
  "type": "string",
3852
3765
  "example": "Arbitrum"
@@ -3874,7 +3787,12 @@
3874
3787
  "type": "string"
3875
3788
  },
3876
3789
  "status": {
3877
- "type": "string"
3790
+ "type": "string",
3791
+ "enum": [
3792
+ "pending",
3793
+ "bridging",
3794
+ "completed"
3795
+ ]
3878
3796
  },
3879
3797
  "step": {
3880
3798
  "type": "string"
@@ -3897,6 +3815,8 @@
3897
3815
  },
3898
3816
  "title": "Bridge",
3899
3817
  "required": [
3818
+ "id",
3819
+ "version",
3900
3820
  "source",
3901
3821
  "source_chain_id",
3902
3822
  "fast_bridge_tx_hash",
@@ -6822,28 +6742,6 @@
6822
6742
  "value"
6823
6743
  ]
6824
6744
  },
6825
- "ReqGetAccountPendingTxs": {
6826
- "type": "object",
6827
- "properties": {
6828
- "by": {
6829
- "type": "string",
6830
- "enum": [
6831
- "account_index"
6832
- ]
6833
- },
6834
- "value": {
6835
- "type": "string"
6836
- },
6837
- "types": {
6838
- "type": "array",
6839
- "items": {
6840
- "type": "integer",
6841
- "format": "uint8"
6842
- }
6843
- }
6844
- },
6845
- "title": "ReqGetAccountPendingTxs"
6846
- },
6847
6745
  "ReqGetAccountPnL": {
6848
6746
  "type": "object",
6849
6747
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.166",
3
+ "version": "1.0.168",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {