zklighter-perps 1.0.57 → 1.0.59
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/.openapi-generator/FILES +0 -3
- package/apis/LiquidationApi.ts +23 -8
- package/apis/TransactionApi.ts +5 -0
- package/models/index.ts +0 -3
- package/openapi.json +10 -78
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -48,7 +48,6 @@ models/OrderBookOrders.ts
|
|
|
48
48
|
models/OrderBookStats.ts
|
|
49
49
|
models/OrderBooks.ts
|
|
50
50
|
models/Orders.ts
|
|
51
|
-
models/Permission.ts
|
|
52
51
|
models/PnLEntry.ts
|
|
53
52
|
models/PositionFunding.ts
|
|
54
53
|
models/PriceLevel.ts
|
|
@@ -77,7 +76,6 @@ models/ReqGetNextNonce.ts
|
|
|
77
76
|
models/ReqGetOrderBookDetails.ts
|
|
78
77
|
models/ReqGetOrderBookOrders.ts
|
|
79
78
|
models/ReqGetOrderBooks.ts
|
|
80
|
-
models/ReqGetPermission.ts
|
|
81
79
|
models/ReqGetPublicPools.ts
|
|
82
80
|
models/ReqGetRangeWithCursor.ts
|
|
83
81
|
models/ReqGetRangeWithIndex.ts
|
|
@@ -85,7 +83,6 @@ models/ReqGetRangeWithIndexSortable.ts
|
|
|
85
83
|
models/ReqGetRecentTrades.ts
|
|
86
84
|
models/ReqGetTrades.ts
|
|
87
85
|
models/ReqGetTx.ts
|
|
88
|
-
models/ReqMarkNotifRead.ts
|
|
89
86
|
models/ResultCode.ts
|
|
90
87
|
models/SimpleOrder.ts
|
|
91
88
|
models/Status.ts
|
package/apis/LiquidationApi.ts
CHANGED
|
@@ -77,33 +77,48 @@ export class LiquidationApi extends runtime.BaseAPI {
|
|
|
77
77
|
|
|
78
78
|
const queryParameters: any = {};
|
|
79
79
|
|
|
80
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
81
|
+
|
|
82
|
+
const consumes: runtime.Consume[] = [
|
|
83
|
+
{ contentType: 'multipart/form-data' },
|
|
84
|
+
];
|
|
85
|
+
// @ts-ignore: canConsumeForm may be unused
|
|
86
|
+
const canConsumeForm = runtime.canConsumeForm(consumes);
|
|
87
|
+
|
|
88
|
+
let formParams: { append(param: string, value: any): any };
|
|
89
|
+
let useForm = false;
|
|
90
|
+
if (useForm) {
|
|
91
|
+
formParams = new FormData();
|
|
92
|
+
} else {
|
|
93
|
+
formParams = new URLSearchParams();
|
|
94
|
+
}
|
|
95
|
+
|
|
80
96
|
if (requestParameters['notif_type'] != null) {
|
|
81
|
-
|
|
97
|
+
formParams.append('notif_type', requestParameters['notif_type'] as any);
|
|
82
98
|
}
|
|
83
99
|
|
|
84
100
|
if (requestParameters['account_index'] != null) {
|
|
85
|
-
|
|
101
|
+
formParams.append('account_index', requestParameters['account_index'] as any);
|
|
86
102
|
}
|
|
87
103
|
|
|
88
104
|
if (requestParameters['api_key_index'] != null) {
|
|
89
|
-
|
|
105
|
+
formParams.append('api_key_index', requestParameters['api_key_index'] as any);
|
|
90
106
|
}
|
|
91
107
|
|
|
92
108
|
if (requestParameters['liquidation_ids'] != null) {
|
|
93
|
-
|
|
109
|
+
formParams.append('liquidation_ids', requestParameters['liquidation_ids'] as any);
|
|
94
110
|
}
|
|
95
111
|
|
|
96
112
|
if (requestParameters['signature'] != null) {
|
|
97
|
-
|
|
113
|
+
formParams.append('signature', requestParameters['signature'] as any);
|
|
98
114
|
}
|
|
99
115
|
|
|
100
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
101
|
-
|
|
102
116
|
const response = await this.request({
|
|
103
117
|
path: `/api/v1/markNotifRead`,
|
|
104
|
-
method: '
|
|
118
|
+
method: 'POST',
|
|
105
119
|
headers: headerParameters,
|
|
106
120
|
query: queryParameters,
|
|
121
|
+
body: formParams,
|
|
107
122
|
}, initOverrides);
|
|
108
123
|
|
|
109
124
|
return new runtime.JSONApiResponse(response, (jsonValue) => ResultCodeFromJSON(jsonValue));
|
package/apis/TransactionApi.ts
CHANGED
|
@@ -69,6 +69,7 @@ export interface PendingTxsRequest {
|
|
|
69
69
|
export interface SendTxRequest {
|
|
70
70
|
tx_type: number;
|
|
71
71
|
tx_info: string;
|
|
72
|
+
price_protection?: boolean;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
export interface SendTxBatchRequest {
|
|
@@ -414,6 +415,10 @@ export class TransactionApi extends runtime.BaseAPI {
|
|
|
414
415
|
formParams.append('tx_info', requestParameters['tx_info'] as any);
|
|
415
416
|
}
|
|
416
417
|
|
|
418
|
+
if (requestParameters['price_protection'] != null) {
|
|
419
|
+
formParams.append('price_protection', requestParameters['price_protection'] as any);
|
|
420
|
+
}
|
|
421
|
+
|
|
417
422
|
const response = await this.request({
|
|
418
423
|
path: `/api/v1/sendTx`,
|
|
419
424
|
method: 'POST',
|
package/models/index.ts
CHANGED
|
@@ -40,7 +40,6 @@ export * from './OrderBookOrders';
|
|
|
40
40
|
export * from './OrderBookStats';
|
|
41
41
|
export * from './OrderBooks';
|
|
42
42
|
export * from './Orders';
|
|
43
|
-
export * from './Permission';
|
|
44
43
|
export * from './PnLEntry';
|
|
45
44
|
export * from './PositionFunding';
|
|
46
45
|
export * from './PriceLevel';
|
|
@@ -69,7 +68,6 @@ export * from './ReqGetNextNonce';
|
|
|
69
68
|
export * from './ReqGetOrderBookDetails';
|
|
70
69
|
export * from './ReqGetOrderBookOrders';
|
|
71
70
|
export * from './ReqGetOrderBooks';
|
|
72
|
-
export * from './ReqGetPermission';
|
|
73
71
|
export * from './ReqGetPublicPools';
|
|
74
72
|
export * from './ReqGetRangeWithCursor';
|
|
75
73
|
export * from './ReqGetRangeWithIndex';
|
|
@@ -77,7 +75,6 @@ export * from './ReqGetRangeWithIndexSortable';
|
|
|
77
75
|
export * from './ReqGetRecentTrades';
|
|
78
76
|
export * from './ReqGetTrades';
|
|
79
77
|
export * from './ReqGetTx';
|
|
80
|
-
export * from './ReqMarkNotifRead';
|
|
81
78
|
export * from './ResultCode';
|
|
82
79
|
export * from './SimpleOrder';
|
|
83
80
|
export * from './Status';
|
package/openapi.json
CHANGED
|
@@ -968,7 +968,7 @@
|
|
|
968
968
|
}
|
|
969
969
|
},
|
|
970
970
|
"/api/v1/markNotifRead": {
|
|
971
|
-
"
|
|
971
|
+
"post": {
|
|
972
972
|
"summary": "markNotifRead",
|
|
973
973
|
"operationId": "markNotifRead",
|
|
974
974
|
"responses": {
|
|
@@ -987,36 +987,12 @@
|
|
|
987
987
|
},
|
|
988
988
|
"parameters": [
|
|
989
989
|
{
|
|
990
|
-
"name": "
|
|
991
|
-
"in": "
|
|
992
|
-
"required": true,
|
|
993
|
-
"type": "string"
|
|
994
|
-
},
|
|
995
|
-
{
|
|
996
|
-
"name": "account_index",
|
|
997
|
-
"in": "query",
|
|
998
|
-
"required": true,
|
|
999
|
-
"type": "integer",
|
|
1000
|
-
"format": "int64"
|
|
1001
|
-
},
|
|
1002
|
-
{
|
|
1003
|
-
"name": "api_key_index",
|
|
1004
|
-
"in": "query",
|
|
1005
|
-
"required": true,
|
|
1006
|
-
"type": "integer",
|
|
1007
|
-
"format": "uint8"
|
|
1008
|
-
},
|
|
1009
|
-
{
|
|
1010
|
-
"name": "liquidation_ids",
|
|
1011
|
-
"in": "query",
|
|
1012
|
-
"required": true,
|
|
1013
|
-
"type": "string"
|
|
1014
|
-
},
|
|
1015
|
-
{
|
|
1016
|
-
"name": "signature",
|
|
1017
|
-
"in": "query",
|
|
990
|
+
"name": "body",
|
|
991
|
+
"in": "body",
|
|
1018
992
|
"required": true,
|
|
1019
|
-
"
|
|
993
|
+
"schema": {
|
|
994
|
+
"$ref": "#/definitions/ReqMarkNotifRead"
|
|
995
|
+
}
|
|
1020
996
|
}
|
|
1021
997
|
],
|
|
1022
998
|
"tags": [
|
|
@@ -3607,29 +3583,6 @@
|
|
|
3607
3583
|
"orders"
|
|
3608
3584
|
]
|
|
3609
3585
|
},
|
|
3610
|
-
"Permission": {
|
|
3611
|
-
"type": "object",
|
|
3612
|
-
"properties": {
|
|
3613
|
-
"code": {
|
|
3614
|
-
"type": "integer",
|
|
3615
|
-
"format": "int32",
|
|
3616
|
-
"example": "200"
|
|
3617
|
-
},
|
|
3618
|
-
"message": {
|
|
3619
|
-
"type": "string"
|
|
3620
|
-
},
|
|
3621
|
-
"permit": {
|
|
3622
|
-
"type": "boolean",
|
|
3623
|
-
"format": "boolean",
|
|
3624
|
-
"example": "true"
|
|
3625
|
-
}
|
|
3626
|
-
},
|
|
3627
|
-
"title": "Permission",
|
|
3628
|
-
"required": [
|
|
3629
|
-
"code",
|
|
3630
|
-
"permit"
|
|
3631
|
-
]
|
|
3632
|
-
},
|
|
3633
3586
|
"PnLEntry": {
|
|
3634
3587
|
"type": "object",
|
|
3635
3588
|
"properties": {
|
|
@@ -4350,31 +4303,6 @@
|
|
|
4350
4303
|
},
|
|
4351
4304
|
"title": "ReqGetOrderBooks"
|
|
4352
4305
|
},
|
|
4353
|
-
"ReqGetPermission": {
|
|
4354
|
-
"type": "object",
|
|
4355
|
-
"properties": {
|
|
4356
|
-
"by": {
|
|
4357
|
-
"type": "string",
|
|
4358
|
-
"enum": [
|
|
4359
|
-
"index",
|
|
4360
|
-
"l1_address"
|
|
4361
|
-
]
|
|
4362
|
-
},
|
|
4363
|
-
"value": {
|
|
4364
|
-
"type": "string"
|
|
4365
|
-
},
|
|
4366
|
-
"tx_type": {
|
|
4367
|
-
"type": "integer",
|
|
4368
|
-
"format": "uint8"
|
|
4369
|
-
}
|
|
4370
|
-
},
|
|
4371
|
-
"title": "ReqGetPermission",
|
|
4372
|
-
"required": [
|
|
4373
|
-
"by",
|
|
4374
|
-
"value",
|
|
4375
|
-
"tx_type"
|
|
4376
|
-
]
|
|
4377
|
-
},
|
|
4378
4306
|
"ReqGetPublicPools": {
|
|
4379
4307
|
"type": "object",
|
|
4380
4308
|
"properties": {
|
|
@@ -4594,6 +4522,10 @@
|
|
|
4594
4522
|
},
|
|
4595
4523
|
"tx_info": {
|
|
4596
4524
|
"type": "string"
|
|
4525
|
+
},
|
|
4526
|
+
"price_protection": {
|
|
4527
|
+
"type": "boolean",
|
|
4528
|
+
"format": "boolean"
|
|
4597
4529
|
}
|
|
4598
4530
|
},
|
|
4599
4531
|
"title": "ReqSendTx",
|