zklighter-perps 1.0.29 → 1.0.30

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/BlockApi.ts CHANGED
@@ -28,15 +28,15 @@ import {
28
28
  ResultCodeToJSON,
29
29
  } from '../models/index';
30
30
 
31
- export interface GetBlockRequest {
32
- by: GetBlockByEnum;
31
+ export interface BlockRequest {
32
+ by: BlockByEnum;
33
33
  value: string;
34
34
  }
35
35
 
36
- export interface GetBlocksRequest {
36
+ export interface BlocksRequest {
37
37
  limit: number;
38
38
  index?: number;
39
- sort?: GetBlocksSortEnum;
39
+ sort?: BlocksSortEnum;
40
40
  }
41
41
 
42
42
  /**
@@ -46,20 +46,20 @@ export class BlockApi extends runtime.BaseAPI {
46
46
 
47
47
  /**
48
48
  * Get block by its height or commitment
49
- * GetBlock
49
+ * block
50
50
  */
51
- async getBlockRaw(requestParameters: GetBlockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blocks>> {
51
+ async blockRaw(requestParameters: BlockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blocks>> {
52
52
  if (requestParameters['by'] == null) {
53
53
  throw new runtime.RequiredError(
54
54
  'by',
55
- 'Required parameter "by" was null or undefined when calling getBlock().'
55
+ 'Required parameter "by" was null or undefined when calling block().'
56
56
  );
57
57
  }
58
58
 
59
59
  if (requestParameters['value'] == null) {
60
60
  throw new runtime.RequiredError(
61
61
  'value',
62
- 'Required parameter "value" was null or undefined when calling getBlock().'
62
+ 'Required parameter "value" was null or undefined when calling block().'
63
63
  );
64
64
  }
65
65
 
@@ -87,22 +87,22 @@ export class BlockApi extends runtime.BaseAPI {
87
87
 
88
88
  /**
89
89
  * Get block by its height or commitment
90
- * GetBlock
90
+ * block
91
91
  */
92
- async getBlock(requestParameters: GetBlockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blocks> {
93
- const response = await this.getBlockRaw(requestParameters, initOverrides);
92
+ async block(requestParameters: BlockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blocks> {
93
+ const response = await this.blockRaw(requestParameters, initOverrides);
94
94
  return await response.value();
95
95
  }
96
96
 
97
97
  /**
98
98
  * Get blocks
99
- * GetBlocks
99
+ * blocks
100
100
  */
101
- async getBlocksRaw(requestParameters: GetBlocksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blocks>> {
101
+ async blocksRaw(requestParameters: BlocksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blocks>> {
102
102
  if (requestParameters['limit'] == null) {
103
103
  throw new runtime.RequiredError(
104
104
  'limit',
105
- 'Required parameter "limit" was null or undefined when calling getBlocks().'
105
+ 'Required parameter "limit" was null or undefined when calling blocks().'
106
106
  );
107
107
  }
108
108
 
@@ -134,17 +134,18 @@ export class BlockApi extends runtime.BaseAPI {
134
134
 
135
135
  /**
136
136
  * Get blocks
137
- * GetBlocks
137
+ * blocks
138
138
  */
139
- async getBlocks(requestParameters: GetBlocksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blocks> {
140
- const response = await this.getBlocksRaw(requestParameters, initOverrides);
139
+ async blocks(requestParameters: BlocksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blocks> {
140
+ const response = await this.blocksRaw(requestParameters, initOverrides);
141
141
  return await response.value();
142
142
  }
143
143
 
144
144
  /**
145
- * GetCurrentHeight
145
+ * Get current height
146
+ * currentHeight
146
147
  */
147
- async getCurrentHeightRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CurrentHeight>> {
148
+ async currentHeightRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CurrentHeight>> {
148
149
  const queryParameters: any = {};
149
150
 
150
151
  const headerParameters: runtime.HTTPHeaders = {};
@@ -160,10 +161,11 @@ export class BlockApi extends runtime.BaseAPI {
160
161
  }
161
162
 
162
163
  /**
163
- * GetCurrentHeight
164
+ * Get current height
165
+ * currentHeight
164
166
  */
165
- async getCurrentHeight(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CurrentHeight> {
166
- const response = await this.getCurrentHeightRaw(initOverrides);
167
+ async currentHeight(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CurrentHeight> {
168
+ const response = await this.currentHeightRaw(initOverrides);
167
169
  return await response.value();
168
170
  }
169
171
 
@@ -172,16 +174,16 @@ export class BlockApi extends runtime.BaseAPI {
172
174
  /**
173
175
  * @export
174
176
  */
175
- export const GetBlockByEnum = {
177
+ export const BlockByEnum = {
176
178
  Commitment: 'commitment',
177
179
  Height: 'height'
178
180
  } as const;
179
- export type GetBlockByEnum = typeof GetBlockByEnum[keyof typeof GetBlockByEnum];
181
+ export type BlockByEnum = typeof BlockByEnum[keyof typeof BlockByEnum];
180
182
  /**
181
183
  * @export
182
184
  */
183
- export const GetBlocksSortEnum = {
185
+ export const BlocksSortEnum = {
184
186
  Asc: 'asc',
185
187
  Desc: 'desc'
186
188
  } as const;
187
- export type GetBlocksSortEnum = typeof GetBlocksSortEnum[keyof typeof GetBlocksSortEnum];
189
+ export type BlocksSortEnum = typeof BlocksSortEnum[keyof typeof BlocksSortEnum];
@@ -28,17 +28,17 @@ import {
28
28
  ResultCodeToJSON,
29
29
  } from '../models/index';
30
30
 
31
- export interface GetCandlesticksRequest {
31
+ export interface CandlesticksRequest {
32
32
  market_id: number;
33
- resolution: GetCandlesticksResolutionEnum;
33
+ resolution: CandlesticksResolutionEnum;
34
34
  start_timestamp: number;
35
35
  end_timestamp: number;
36
36
  count_back: number;
37
37
  }
38
38
 
39
- export interface GetFundingsRequest {
39
+ export interface FundingsRequest {
40
40
  market_id: number;
41
- resolution: GetFundingsResolutionEnum;
41
+ resolution: FundingsResolutionEnum;
42
42
  start_timestamp: number;
43
43
  end_timestamp: number;
44
44
  count_back: number;
@@ -51,41 +51,41 @@ export class CandlestickApi extends runtime.BaseAPI {
51
51
 
52
52
  /**
53
53
  * Get candlesticks
54
- * GetCandlesticks
54
+ * candlesticks
55
55
  */
56
- async getCandlesticksRaw(requestParameters: GetCandlesticksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Candlesticks>> {
56
+ async candlesticksRaw(requestParameters: CandlesticksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Candlesticks>> {
57
57
  if (requestParameters['market_id'] == null) {
58
58
  throw new runtime.RequiredError(
59
59
  'market_id',
60
- 'Required parameter "market_id" was null or undefined when calling getCandlesticks().'
60
+ 'Required parameter "market_id" was null or undefined when calling candlesticks().'
61
61
  );
62
62
  }
63
63
 
64
64
  if (requestParameters['resolution'] == null) {
65
65
  throw new runtime.RequiredError(
66
66
  'resolution',
67
- 'Required parameter "resolution" was null or undefined when calling getCandlesticks().'
67
+ 'Required parameter "resolution" was null or undefined when calling candlesticks().'
68
68
  );
69
69
  }
70
70
 
71
71
  if (requestParameters['start_timestamp'] == null) {
72
72
  throw new runtime.RequiredError(
73
73
  'start_timestamp',
74
- 'Required parameter "start_timestamp" was null or undefined when calling getCandlesticks().'
74
+ 'Required parameter "start_timestamp" was null or undefined when calling candlesticks().'
75
75
  );
76
76
  }
77
77
 
78
78
  if (requestParameters['end_timestamp'] == null) {
79
79
  throw new runtime.RequiredError(
80
80
  'end_timestamp',
81
- 'Required parameter "end_timestamp" was null or undefined when calling getCandlesticks().'
81
+ 'Required parameter "end_timestamp" was null or undefined when calling candlesticks().'
82
82
  );
83
83
  }
84
84
 
85
85
  if (requestParameters['count_back'] == null) {
86
86
  throw new runtime.RequiredError(
87
87
  'count_back',
88
- 'Required parameter "count_back" was null or undefined when calling getCandlesticks().'
88
+ 'Required parameter "count_back" was null or undefined when calling candlesticks().'
89
89
  );
90
90
  }
91
91
 
@@ -125,50 +125,50 @@ export class CandlestickApi extends runtime.BaseAPI {
125
125
 
126
126
  /**
127
127
  * Get candlesticks
128
- * GetCandlesticks
128
+ * candlesticks
129
129
  */
130
- async getCandlesticks(requestParameters: GetCandlesticksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Candlesticks> {
131
- const response = await this.getCandlesticksRaw(requestParameters, initOverrides);
130
+ async candlesticks(requestParameters: CandlesticksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Candlesticks> {
131
+ const response = await this.candlesticksRaw(requestParameters, initOverrides);
132
132
  return await response.value();
133
133
  }
134
134
 
135
135
  /**
136
136
  * Get fundings
137
- * GetFundings
137
+ * fundings
138
138
  */
139
- async getFundingsRaw(requestParameters: GetFundingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Fundings>> {
139
+ async fundingsRaw(requestParameters: FundingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Fundings>> {
140
140
  if (requestParameters['market_id'] == null) {
141
141
  throw new runtime.RequiredError(
142
142
  'market_id',
143
- 'Required parameter "market_id" was null or undefined when calling getFundings().'
143
+ 'Required parameter "market_id" was null or undefined when calling fundings().'
144
144
  );
145
145
  }
146
146
 
147
147
  if (requestParameters['resolution'] == null) {
148
148
  throw new runtime.RequiredError(
149
149
  'resolution',
150
- 'Required parameter "resolution" was null or undefined when calling getFundings().'
150
+ 'Required parameter "resolution" was null or undefined when calling fundings().'
151
151
  );
152
152
  }
153
153
 
154
154
  if (requestParameters['start_timestamp'] == null) {
155
155
  throw new runtime.RequiredError(
156
156
  'start_timestamp',
157
- 'Required parameter "start_timestamp" was null or undefined when calling getFundings().'
157
+ 'Required parameter "start_timestamp" was null or undefined when calling fundings().'
158
158
  );
159
159
  }
160
160
 
161
161
  if (requestParameters['end_timestamp'] == null) {
162
162
  throw new runtime.RequiredError(
163
163
  'end_timestamp',
164
- 'Required parameter "end_timestamp" was null or undefined when calling getFundings().'
164
+ 'Required parameter "end_timestamp" was null or undefined when calling fundings().'
165
165
  );
166
166
  }
167
167
 
168
168
  if (requestParameters['count_back'] == null) {
169
169
  throw new runtime.RequiredError(
170
170
  'count_back',
171
- 'Required parameter "count_back" was null or undefined when calling getFundings().'
171
+ 'Required parameter "count_back" was null or undefined when calling fundings().'
172
172
  );
173
173
  }
174
174
 
@@ -208,10 +208,10 @@ export class CandlestickApi extends runtime.BaseAPI {
208
208
 
209
209
  /**
210
210
  * Get fundings
211
- * GetFundings
211
+ * fundings
212
212
  */
213
- async getFundings(requestParameters: GetFundingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Fundings> {
214
- const response = await this.getFundingsRaw(requestParameters, initOverrides);
213
+ async fundings(requestParameters: FundingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Fundings> {
214
+ const response = await this.fundingsRaw(requestParameters, initOverrides);
215
215
  return await response.value();
216
216
  }
217
217
 
@@ -220,7 +220,7 @@ export class CandlestickApi extends runtime.BaseAPI {
220
220
  /**
221
221
  * @export
222
222
  */
223
- export const GetCandlesticksResolutionEnum = {
223
+ export const CandlesticksResolutionEnum = {
224
224
  _1m: '1m',
225
225
  _5m: '5m',
226
226
  _15m: '15m',
@@ -228,11 +228,11 @@ export const GetCandlesticksResolutionEnum = {
228
228
  _4h: '4h',
229
229
  _1d: '1d'
230
230
  } as const;
231
- export type GetCandlesticksResolutionEnum = typeof GetCandlesticksResolutionEnum[keyof typeof GetCandlesticksResolutionEnum];
231
+ export type CandlesticksResolutionEnum = typeof CandlesticksResolutionEnum[keyof typeof CandlesticksResolutionEnum];
232
232
  /**
233
233
  * @export
234
234
  */
235
- export const GetFundingsResolutionEnum = {
235
+ export const FundingsResolutionEnum = {
236
236
  _1h: '1h'
237
237
  } as const;
238
- export type GetFundingsResolutionEnum = typeof GetFundingsResolutionEnum[keyof typeof GetFundingsResolutionEnum];
238
+ export type FundingsResolutionEnum = typeof FundingsResolutionEnum[keyof typeof FundingsResolutionEnum];
package/apis/InfoApi.ts CHANGED
@@ -34,7 +34,7 @@ import {
34
34
  SearchToJSON,
35
35
  } from '../models/index';
36
36
 
37
- export interface GetRollbacksRequest {
37
+ export interface RollbacksRequest {
38
38
  from_block_height: number;
39
39
  offset: number;
40
40
  limit: number;
@@ -51,9 +51,9 @@ export class InfoApi extends runtime.BaseAPI {
51
51
 
52
52
  /**
53
53
  * Get zklighter l1 general info, including contract address and rpc info
54
- * GetLayer1BasicInfo
54
+ * layer1BasicInfo
55
55
  */
56
- async getLayer1BasicInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Layer1BasicInfo>> {
56
+ async layer1BasicInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Layer1BasicInfo>> {
57
57
  const queryParameters: any = {};
58
58
 
59
59
  const headerParameters: runtime.HTTPHeaders = {};
@@ -70,18 +70,18 @@ export class InfoApi extends runtime.BaseAPI {
70
70
 
71
71
  /**
72
72
  * Get zklighter l1 general info, including contract address and rpc info
73
- * GetLayer1BasicInfo
73
+ * layer1BasicInfo
74
74
  */
75
- async getLayer1BasicInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Layer1BasicInfo> {
76
- const response = await this.getLayer1BasicInfoRaw(initOverrides);
75
+ async layer1BasicInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Layer1BasicInfo> {
76
+ const response = await this.layer1BasicInfoRaw(initOverrides);
77
77
  return await response.value();
78
78
  }
79
79
 
80
80
  /**
81
81
  * Get zklighter general info, including contract address, and count of transactions and active users
82
- * GetLayer2BasicInfo
82
+ * layer2BasicInfo
83
83
  */
84
- async getLayer2BasicInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Layer2BasicInfo>> {
84
+ async layer2BasicInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Layer2BasicInfo>> {
85
85
  const queryParameters: any = {};
86
86
 
87
87
  const headerParameters: runtime.HTTPHeaders = {};
@@ -98,36 +98,36 @@ export class InfoApi extends runtime.BaseAPI {
98
98
 
99
99
  /**
100
100
  * Get zklighter general info, including contract address, and count of transactions and active users
101
- * GetLayer2BasicInfo
101
+ * layer2BasicInfo
102
102
  */
103
- async getLayer2BasicInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Layer2BasicInfo> {
104
- const response = await this.getLayer2BasicInfoRaw(initOverrides);
103
+ async layer2BasicInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Layer2BasicInfo> {
104
+ const response = await this.layer2BasicInfoRaw(initOverrides);
105
105
  return await response.value();
106
106
  }
107
107
 
108
108
  /**
109
109
  * Get rollbacks
110
- * GetRollbacks
110
+ * rollbacks
111
111
  */
112
- async getRollbacksRaw(requestParameters: GetRollbacksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Rollbacks>> {
112
+ async rollbacksRaw(requestParameters: RollbacksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Rollbacks>> {
113
113
  if (requestParameters['from_block_height'] == null) {
114
114
  throw new runtime.RequiredError(
115
115
  'from_block_height',
116
- 'Required parameter "from_block_height" was null or undefined when calling getRollbacks().'
116
+ 'Required parameter "from_block_height" was null or undefined when calling rollbacks().'
117
117
  );
118
118
  }
119
119
 
120
120
  if (requestParameters['offset'] == null) {
121
121
  throw new runtime.RequiredError(
122
122
  'offset',
123
- 'Required parameter "offset" was null or undefined when calling getRollbacks().'
123
+ 'Required parameter "offset" was null or undefined when calling rollbacks().'
124
124
  );
125
125
  }
126
126
 
127
127
  if (requestParameters['limit'] == null) {
128
128
  throw new runtime.RequiredError(
129
129
  'limit',
130
- 'Required parameter "limit" was null or undefined when calling getRollbacks().'
130
+ 'Required parameter "limit" was null or undefined when calling rollbacks().'
131
131
  );
132
132
  }
133
133
 
@@ -159,16 +159,16 @@ export class InfoApi extends runtime.BaseAPI {
159
159
 
160
160
  /**
161
161
  * Get rollbacks
162
- * GetRollbacks
162
+ * rollbacks
163
163
  */
164
- async getRollbacks(requestParameters: GetRollbacksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Rollbacks> {
165
- const response = await this.getRollbacksRaw(requestParameters, initOverrides);
164
+ async rollbacks(requestParameters: RollbacksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Rollbacks> {
165
+ const response = await this.rollbacksRaw(requestParameters, initOverrides);
166
166
  return await response.value();
167
167
  }
168
168
 
169
169
  /**
170
170
  * Search with a specific keyword
171
- * Search
171
+ * search
172
172
  */
173
173
  async searchRaw(requestParameters: SearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Search>> {
174
174
  if (requestParameters['keyword'] == null) {
@@ -198,7 +198,7 @@ export class InfoApi extends runtime.BaseAPI {
198
198
 
199
199
  /**
200
200
  * Search with a specific keyword
201
- * Search
201
+ * search
202
202
  */
203
203
  async search(requestParameters: SearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Search> {
204
204
  const response = await this.searchRaw(requestParameters, initOverrides);
@@ -36,8 +36,8 @@ export interface MarkNotifReadRequest {
36
36
  export class LiquidationApi extends runtime.BaseAPI {
37
37
 
38
38
  /**
39
- * Mark
40
- * MarkNotifRead
39
+ * Mark liquidation notification as read
40
+ * markNotifRead
41
41
  */
42
42
  async markNotifReadRaw(requestParameters: MarkNotifReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
43
43
  if (requestParameters['notif_type'] == null) {
@@ -110,8 +110,8 @@ export class LiquidationApi extends runtime.BaseAPI {
110
110
  }
111
111
 
112
112
  /**
113
- * Mark
114
- * MarkNotifRead
113
+ * Mark liquidation notification as read
114
+ * markNotifRead
115
115
  */
116
116
  async markNotifRead(requestParameters: MarkNotifReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
117
117
  const response = await this.markNotifReadRaw(requestParameters, initOverrides);