zklighter-perps 1.0.76 → 1.0.77

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.
@@ -97,9 +97,9 @@ export interface PnlRequest {
97
97
  }
98
98
 
99
99
  export interface PublicPoolsRequest {
100
- filter: string;
101
100
  index: number;
102
101
  limit: number;
102
+ filter?: PublicPoolsFilterEnum;
103
103
  account_index?: number;
104
104
  }
105
105
 
@@ -557,13 +557,6 @@ export class AccountApi extends runtime.BaseAPI {
557
557
  * publicPools
558
558
  */
559
559
  async publicPoolsRaw(requestParameters: PublicPoolsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PublicPools>> {
560
- if (requestParameters['filter'] == null) {
561
- throw new runtime.RequiredError(
562
- 'filter',
563
- 'Required parameter "filter" was null or undefined when calling publicPools().'
564
- );
565
- }
566
-
567
560
  if (requestParameters['index'] == null) {
568
561
  throw new runtime.RequiredError(
569
562
  'index',
@@ -662,3 +655,13 @@ export const PnlResolutionEnum = {
662
655
  _1d: '1d'
663
656
  } as const;
664
657
  export type PnlResolutionEnum = typeof PnlResolutionEnum[keyof typeof PnlResolutionEnum];
658
+ /**
659
+ * @export
660
+ */
661
+ export const PublicPoolsFilterEnum = {
662
+ All: 'all',
663
+ User: 'user',
664
+ Protocol: 'protocol',
665
+ AccountIndex: 'account_index'
666
+ } as const;
667
+ export type PublicPoolsFilterEnum = typeof PublicPoolsFilterEnum[keyof typeof PublicPoolsFilterEnum];
@@ -23,7 +23,7 @@ import {
23
23
  } from '../models/index';
24
24
 
25
25
  export interface MarkNotifReadRequest {
26
- notif_type: string;
26
+ notif_type: MarkNotifReadNotifTypeEnum;
27
27
  account_index: number;
28
28
  api_key_index: number;
29
29
  liquidation_ids: string;
@@ -134,3 +134,11 @@ export class LiquidationApi extends runtime.BaseAPI {
134
134
  }
135
135
 
136
136
  }
137
+
138
+ /**
139
+ * @export
140
+ */
141
+ export const MarkNotifReadNotifTypeEnum = {
142
+ Liquidation: 'liquidation'
143
+ } as const;
144
+ export type MarkNotifReadNotifTypeEnum = typeof MarkNotifReadNotifTypeEnum[keyof typeof MarkNotifReadNotifTypeEnum];
@@ -64,8 +64,8 @@ export interface BlockTxsRequest {
64
64
 
65
65
  export interface DepositHistoryRequest {
66
66
  l1_address: string;
67
- filter: string;
68
67
  cursor?: string;
68
+ filter?: DepositHistoryFilterEnum;
69
69
  }
70
70
 
71
71
  export interface NextNonceRequest {
@@ -113,8 +113,8 @@ export interface TxsRequest {
113
113
 
114
114
  export interface WithdrawHistoryRequest {
115
115
  l1_address: string;
116
- filter: string;
117
116
  cursor?: string;
117
+ filter?: WithdrawHistoryFilterEnum;
118
118
  }
119
119
 
120
120
  /**
@@ -307,13 +307,6 @@ export class TransactionApi extends runtime.BaseAPI {
307
307
  );
308
308
  }
309
309
 
310
- if (requestParameters['filter'] == null) {
311
- throw new runtime.RequiredError(
312
- 'filter',
313
- 'Required parameter "filter" was null or undefined when calling depositHistory().'
314
- );
315
- }
316
-
317
310
  const queryParameters: any = {};
318
311
 
319
312
  if (requestParameters['l1_address'] != null) {
@@ -818,13 +811,6 @@ export class TransactionApi extends runtime.BaseAPI {
818
811
  );
819
812
  }
820
813
 
821
- if (requestParameters['filter'] == null) {
822
- throw new runtime.RequiredError(
823
- 'filter',
824
- 'Required parameter "filter" was null or undefined when calling withdrawHistory().'
825
- );
826
- }
827
-
828
814
  const queryParameters: any = {};
829
815
 
830
816
  if (requestParameters['l1_address'] != null) {
@@ -884,6 +870,15 @@ export const BlockTxsByEnum = {
884
870
  Commitment: 'block_commitment'
885
871
  } as const;
886
872
  export type BlockTxsByEnum = typeof BlockTxsByEnum[keyof typeof BlockTxsByEnum];
873
+ /**
874
+ * @export
875
+ */
876
+ export const DepositHistoryFilterEnum = {
877
+ All: 'all',
878
+ Pending: 'pending',
879
+ Claimable: 'claimable'
880
+ } as const;
881
+ export type DepositHistoryFilterEnum = typeof DepositHistoryFilterEnum[keyof typeof DepositHistoryFilterEnum];
887
882
  /**
888
883
  * @export
889
884
  */
@@ -892,3 +887,12 @@ export const TxByEnum = {
892
887
  SequenceIndex: 'sequence_index'
893
888
  } as const;
894
889
  export type TxByEnum = typeof TxByEnum[keyof typeof TxByEnum];
890
+ /**
891
+ * @export
892
+ */
893
+ export const WithdrawHistoryFilterEnum = {
894
+ All: 'all',
895
+ Pending: 'pending',
896
+ Claimable: 'claimable'
897
+ } as const;
898
+ export type WithdrawHistoryFilterEnum = typeof WithdrawHistoryFilterEnum[keyof typeof WithdrawHistoryFilterEnum];
@@ -36,15 +36,26 @@ export interface ReqGetDepositHistory {
36
36
  * @type {string}
37
37
  * @memberof ReqGetDepositHistory
38
38
  */
39
- filter: string;
39
+ filter?: ReqGetDepositHistoryFilterEnum;
40
40
  }
41
41
 
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const ReqGetDepositHistoryFilterEnum = {
47
+ All: 'all',
48
+ Pending: 'pending',
49
+ Claimable: 'claimable'
50
+ } as const;
51
+ export type ReqGetDepositHistoryFilterEnum = typeof ReqGetDepositHistoryFilterEnum[keyof typeof ReqGetDepositHistoryFilterEnum];
52
+
53
+
42
54
  /**
43
55
  * Check if a given object implements the ReqGetDepositHistory interface.
44
56
  */
45
57
  export function instanceOfReqGetDepositHistory(value: object): value is ReqGetDepositHistory {
46
58
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
47
- if (!('filter' in value) || value['filter'] === undefined) return false;
48
59
  return true;
49
60
  }
50
61
 
@@ -60,7 +71,7 @@ export function ReqGetDepositHistoryFromJSONTyped(json: any, ignoreDiscriminator
60
71
 
61
72
  'l1_address': json['l1_address'],
62
73
  'cursor': json['cursor'] == null ? undefined : json['cursor'],
63
- 'filter': json['filter'],
74
+ 'filter': json['filter'] == null ? undefined : json['filter'],
64
75
  };
65
76
  }
66
77
 
@@ -24,7 +24,7 @@ export interface ReqGetPublicPools {
24
24
  * @type {string}
25
25
  * @memberof ReqGetPublicPools
26
26
  */
27
- filter: string;
27
+ filter?: ReqGetPublicPoolsFilterEnum;
28
28
  /**
29
29
  *
30
30
  * @type {number}
@@ -45,11 +45,23 @@ export interface ReqGetPublicPools {
45
45
  account_index?: number;
46
46
  }
47
47
 
48
+
49
+ /**
50
+ * @export
51
+ */
52
+ export const ReqGetPublicPoolsFilterEnum = {
53
+ All: 'all',
54
+ User: 'user',
55
+ Protocol: 'protocol',
56
+ AccountIndex: 'account_index'
57
+ } as const;
58
+ export type ReqGetPublicPoolsFilterEnum = typeof ReqGetPublicPoolsFilterEnum[keyof typeof ReqGetPublicPoolsFilterEnum];
59
+
60
+
48
61
  /**
49
62
  * Check if a given object implements the ReqGetPublicPools interface.
50
63
  */
51
64
  export function instanceOfReqGetPublicPools(value: object): value is ReqGetPublicPools {
52
- if (!('filter' in value) || value['filter'] === undefined) return false;
53
65
  if (!('index' in value) || value['index'] === undefined) return false;
54
66
  if (!('limit' in value) || value['limit'] === undefined) return false;
55
67
  return true;
@@ -65,7 +77,7 @@ export function ReqGetPublicPoolsFromJSONTyped(json: any, ignoreDiscriminator: b
65
77
  }
66
78
  return {
67
79
 
68
- 'filter': json['filter'],
80
+ 'filter': json['filter'] == null ? undefined : json['filter'],
69
81
  'index': json['index'],
70
82
  'limit': json['limit'],
71
83
  'account_index': json['account_index'] == null ? undefined : json['account_index'],
@@ -36,15 +36,26 @@ export interface ReqGetWithdrawHistory {
36
36
  * @type {string}
37
37
  * @memberof ReqGetWithdrawHistory
38
38
  */
39
- filter: string;
39
+ filter?: ReqGetWithdrawHistoryFilterEnum;
40
40
  }
41
41
 
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const ReqGetWithdrawHistoryFilterEnum = {
47
+ All: 'all',
48
+ Pending: 'pending',
49
+ Claimable: 'claimable'
50
+ } as const;
51
+ export type ReqGetWithdrawHistoryFilterEnum = typeof ReqGetWithdrawHistoryFilterEnum[keyof typeof ReqGetWithdrawHistoryFilterEnum];
52
+
53
+
42
54
  /**
43
55
  * Check if a given object implements the ReqGetWithdrawHistory interface.
44
56
  */
45
57
  export function instanceOfReqGetWithdrawHistory(value: object): value is ReqGetWithdrawHistory {
46
58
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
47
- if (!('filter' in value) || value['filter'] === undefined) return false;
48
59
  return true;
49
60
  }
50
61
 
@@ -60,7 +71,7 @@ export function ReqGetWithdrawHistoryFromJSONTyped(json: any, ignoreDiscriminato
60
71
 
61
72
  'l1_address': json['l1_address'],
62
73
  'cursor': json['cursor'] == null ? undefined : json['cursor'],
63
- 'filter': json['filter'],
74
+ 'filter': json['filter'] == null ? undefined : json['filter'],
64
75
  };
65
76
  }
66
77
 
package/openapi.json CHANGED
@@ -164,14 +164,16 @@
164
164
  "in": "query",
165
165
  "required": false,
166
166
  "type": "integer",
167
- "format": "uint8"
167
+ "format": "uint8",
168
+ "default": "255"
168
169
  },
169
170
  {
170
171
  "name": "ask_filter",
171
172
  "in": "query",
172
173
  "required": false,
173
174
  "type": "integer",
174
- "format": "int8"
175
+ "format": "int8",
176
+ "default": "-1"
175
177
  },
176
178
  {
177
179
  "name": "cursor",
@@ -502,7 +504,8 @@
502
504
  "in": "query",
503
505
  "required": true,
504
506
  "type": "integer",
505
- "format": "uint8"
507
+ "format": "uint8",
508
+ "default": "255"
506
509
  }
507
510
  ],
508
511
  "tags": [
@@ -871,8 +874,13 @@
871
874
  {
872
875
  "name": "filter",
873
876
  "in": "query",
874
- "required": true,
875
- "type": "string"
877
+ "required": false,
878
+ "type": "string",
879
+ "enum": [
880
+ "all",
881
+ "pending",
882
+ "claimable"
883
+ ]
876
884
  }
877
885
  ],
878
886
  "tags": [
@@ -1336,7 +1344,8 @@
1336
1344
  "in": "query",
1337
1345
  "required": false,
1338
1346
  "type": "integer",
1339
- "format": "uint8"
1347
+ "format": "uint8",
1348
+ "default": "255"
1340
1349
  }
1341
1350
  ],
1342
1351
  "tags": [
@@ -1417,7 +1426,8 @@
1417
1426
  "in": "query",
1418
1427
  "required": false,
1419
1428
  "type": "integer",
1420
- "format": "uint8"
1429
+ "format": "uint8",
1430
+ "default": "255"
1421
1431
  }
1422
1432
  ],
1423
1433
  "tags": [
@@ -1583,8 +1593,14 @@
1583
1593
  {
1584
1594
  "name": "filter",
1585
1595
  "in": "query",
1586
- "required": true,
1587
- "type": "string"
1596
+ "required": false,
1597
+ "type": "string",
1598
+ "enum": [
1599
+ "all",
1600
+ "user",
1601
+ "protocol",
1602
+ "account_index"
1603
+ ]
1588
1604
  },
1589
1605
  {
1590
1606
  "name": "index",
@@ -1799,14 +1815,16 @@
1799
1815
  "in": "query",
1800
1816
  "required": false,
1801
1817
  "type": "integer",
1802
- "format": "uint8"
1818
+ "format": "uint8",
1819
+ "default": "255"
1803
1820
  },
1804
1821
  {
1805
1822
  "name": "account_index",
1806
1823
  "in": "query",
1807
1824
  "required": false,
1808
1825
  "type": "integer",
1809
- "format": "int64"
1826
+ "format": "int64",
1827
+ "default": "-1"
1810
1828
  },
1811
1829
  {
1812
1830
  "name": "order_index",
@@ -1848,14 +1866,16 @@
1848
1866
  "in": "query",
1849
1867
  "required": false,
1850
1868
  "type": "integer",
1851
- "format": "int64"
1869
+ "format": "int64",
1870
+ "default": "-1"
1852
1871
  },
1853
1872
  {
1854
1873
  "name": "ask_filter",
1855
1874
  "in": "query",
1856
1875
  "required": false,
1857
1876
  "type": "integer",
1858
- "format": "int8"
1877
+ "format": "int8",
1878
+ "default": "-1"
1859
1879
  },
1860
1880
  {
1861
1881
  "name": "limit",
@@ -2035,8 +2055,13 @@
2035
2055
  {
2036
2056
  "name": "filter",
2037
2057
  "in": "query",
2038
- "required": true,
2039
- "type": "string"
2058
+ "required": false,
2059
+ "type": "string",
2060
+ "enum": [
2061
+ "all",
2062
+ "pending",
2063
+ "claimable"
2064
+ ]
2040
2065
  }
2041
2066
  ],
2042
2067
  "tags": [
@@ -4583,7 +4608,8 @@
4583
4608
  },
4584
4609
  "api_key_index": {
4585
4610
  "type": "integer",
4586
- "format": "uint8"
4611
+ "format": "uint8",
4612
+ "default": "255"
4587
4613
  }
4588
4614
  },
4589
4615
  "title": "ReqGetAccountApiKeys",
@@ -4613,11 +4639,13 @@
4613
4639
  },
4614
4640
  "market_id": {
4615
4641
  "type": "integer",
4616
- "format": "uint8"
4642
+ "format": "uint8",
4643
+ "default": "255"
4617
4644
  },
4618
4645
  "ask_filter": {
4619
4646
  "type": "integer",
4620
- "format": "int8"
4647
+ "format": "int8",
4648
+ "default": "-1"
4621
4649
  },
4622
4650
  "cursor": {
4623
4651
  "type": "string"
@@ -4882,13 +4910,17 @@
4882
4910
  "type": "string"
4883
4911
  },
4884
4912
  "filter": {
4885
- "type": "string"
4913
+ "type": "string",
4914
+ "enum": [
4915
+ "all",
4916
+ "pending",
4917
+ "claimable"
4918
+ ]
4886
4919
  }
4887
4920
  },
4888
4921
  "title": "ReqGetDepositHistory",
4889
4922
  "required": [
4890
- "l1_address",
4891
- "filter"
4923
+ "l1_address"
4892
4924
  ]
4893
4925
  },
4894
4926
  "ReqGetExchangeStats": {
@@ -5009,7 +5041,8 @@
5009
5041
  "properties": {
5010
5042
  "market_id": {
5011
5043
  "type": "integer",
5012
- "format": "uint8"
5044
+ "format": "uint8",
5045
+ "default": "255"
5013
5046
  }
5014
5047
  },
5015
5048
  "title": "ReqGetOrderBookDetails"
@@ -5039,7 +5072,8 @@
5039
5072
  "properties": {
5040
5073
  "market_id": {
5041
5074
  "type": "integer",
5042
- "format": "uint8"
5075
+ "format": "uint8",
5076
+ "default": "255"
5043
5077
  }
5044
5078
  },
5045
5079
  "title": "ReqGetOrderBooks"
@@ -5048,7 +5082,13 @@
5048
5082
  "type": "object",
5049
5083
  "properties": {
5050
5084
  "filter": {
5051
- "type": "string"
5085
+ "type": "string",
5086
+ "enum": [
5087
+ "all",
5088
+ "user",
5089
+ "protocol",
5090
+ "account_index"
5091
+ ]
5052
5092
  },
5053
5093
  "index": {
5054
5094
  "type": "integer",
@@ -5067,7 +5107,6 @@
5067
5107
  },
5068
5108
  "title": "ReqGetPublicPools",
5069
5109
  "required": [
5070
- "filter",
5071
5110
  "index",
5072
5111
  "limit"
5073
5112
  ]
@@ -5158,11 +5197,13 @@
5158
5197
  "properties": {
5159
5198
  "market_id": {
5160
5199
  "type": "integer",
5161
- "format": "uint8"
5200
+ "format": "uint8",
5201
+ "default": "255"
5162
5202
  },
5163
5203
  "account_index": {
5164
5204
  "type": "integer",
5165
- "format": "int64"
5205
+ "format": "int64",
5206
+ "default": "-1"
5166
5207
  },
5167
5208
  "order_index": {
5168
5209
  "type": "integer",
@@ -5189,11 +5230,13 @@
5189
5230
  },
5190
5231
  "from": {
5191
5232
  "type": "integer",
5192
- "format": "int64"
5233
+ "format": "int64",
5234
+ "default": "-1"
5193
5235
  },
5194
5236
  "ask_filter": {
5195
5237
  "type": "integer",
5196
- "format": "int8"
5238
+ "format": "int8",
5239
+ "default": "-1"
5197
5240
  },
5198
5241
  "limit": {
5199
5242
  "type": "integer",
@@ -5238,13 +5281,17 @@
5238
5281
  "type": "string"
5239
5282
  },
5240
5283
  "filter": {
5241
- "type": "string"
5284
+ "type": "string",
5285
+ "enum": [
5286
+ "all",
5287
+ "pending",
5288
+ "claimable"
5289
+ ]
5242
5290
  }
5243
5291
  },
5244
5292
  "title": "ReqGetWithdrawHistory",
5245
5293
  "required": [
5246
- "l1_address",
5247
- "filter"
5294
+ "l1_address"
5248
5295
  ]
5249
5296
  },
5250
5297
  "ReqIsWhitelisted": {
@@ -5263,7 +5310,10 @@
5263
5310
  "type": "object",
5264
5311
  "properties": {
5265
5312
  "notif_type": {
5266
- "type": "string"
5313
+ "type": "string",
5314
+ "enum": [
5315
+ "liquidation"
5316
+ ]
5267
5317
  },
5268
5318
  "account_index": {
5269
5319
  "type": "integer",
@@ -5301,7 +5351,8 @@
5301
5351
  },
5302
5352
  "price_protection": {
5303
5353
  "type": "boolean",
5304
- "format": "boolean"
5354
+ "format": "boolean",
5355
+ "default": "true"
5305
5356
  }
5306
5357
  },
5307
5358
  "title": "ReqSendTx",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.76",
3
+ "version": "1.0.77",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {