zklighter-perps 1.0.365 → 1.0.367
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/AccountApi.ts +9 -16
- package/models/OrderBookOrders.ts +8 -11
- package/openapi.json +7 -15
- package/package.json +1 -1
package/apis/AccountApi.ts
CHANGED
|
@@ -175,11 +175,11 @@ export interface ApikeysRequest {
|
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
export interface BuyVolumeQuotaRequest {
|
|
178
|
-
quota: number;
|
|
179
|
-
authorization?: string;
|
|
180
178
|
tx_info?: string;
|
|
181
179
|
tx_hash?: string;
|
|
180
|
+
quota?: number;
|
|
182
181
|
destination_l1_address?: string;
|
|
182
|
+
auth?: string;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
export interface ChangeAccountTierRequest {
|
|
@@ -810,21 +810,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
810
810
|
* buyVolumeQuota
|
|
811
811
|
*/
|
|
812
812
|
async buyVolumeQuotaRaw(requestParameters: BuyVolumeQuotaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespBuyVolumeQuota>> {
|
|
813
|
-
if (requestParameters['quota'] == null) {
|
|
814
|
-
throw new runtime.RequiredError(
|
|
815
|
-
'quota',
|
|
816
|
-
'Required parameter "quota" was null or undefined when calling buyVolumeQuota().'
|
|
817
|
-
);
|
|
818
|
-
}
|
|
819
|
-
|
|
820
813
|
const queryParameters: any = {};
|
|
821
814
|
|
|
822
815
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
823
816
|
|
|
824
|
-
if (requestParameters['authorization'] != null) {
|
|
825
|
-
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
826
|
-
}
|
|
827
|
-
|
|
828
817
|
const consumes: runtime.Consume[] = [
|
|
829
818
|
{ contentType: 'multipart/form-data' },
|
|
830
819
|
];
|
|
@@ -855,6 +844,10 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
855
844
|
formParams.append('destination_l1_address', requestParameters['destination_l1_address'] as any);
|
|
856
845
|
}
|
|
857
846
|
|
|
847
|
+
if (requestParameters['auth'] != null) {
|
|
848
|
+
formParams.append('auth', requestParameters['auth'] as any);
|
|
849
|
+
}
|
|
850
|
+
|
|
858
851
|
const response = await this.request({
|
|
859
852
|
path: `/api/v1/buyVolumeQuota`,
|
|
860
853
|
method: 'POST',
|
|
@@ -870,7 +863,7 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
870
863
|
* Buy volume quota with USDC
|
|
871
864
|
* buyVolumeQuota
|
|
872
865
|
*/
|
|
873
|
-
async buyVolumeQuota(requestParameters: BuyVolumeQuotaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespBuyVolumeQuota> {
|
|
866
|
+
async buyVolumeQuota(requestParameters: BuyVolumeQuotaRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespBuyVolumeQuota> {
|
|
874
867
|
const response = await this.buyVolumeQuotaRaw(requestParameters, initOverrides);
|
|
875
868
|
return await response.value();
|
|
876
869
|
}
|
|
@@ -2515,7 +2508,7 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
2515
2508
|
}
|
|
2516
2509
|
|
|
2517
2510
|
/**
|
|
2518
|
-
* Replace an API key\'s restrictions. They apply to every transaction the key signs except ChangePubKey and ChangeECDSAPubKey, which the L1 wallet signs. With a market whitelist, the key can only place, modify and cancel orders and change leverage or margin in those markets and in binary options markets of those series (event creator and tag). With an IP whitelist, the key can only send from those IPs. An expired key can sign nothing else. Restrictions belong to the key\'s public key. The account\'s L1 wallet personal_signs these lines: \'Set API Key Restrictions\', a blank line, \'account index: N\', \'api key index: N\', \'pubkey: 0x<public_key>\', \'market ids: <market_ids>\', \'series: <series>\', \'allowed ips: <allowed_ips>\', \'valid until: N\', \'timestamp: N\', \'chainId: N\', \'Only sign this message for a trusted client!\'. Each N is 0x plus 16 lowercase hex digits, public_key is lowercase hex, and lists are the exact strings sent, with an omitted series or allowed_ips signed as [].
|
|
2511
|
+
* Replace an API key\'s restrictions. They apply to every transaction the key signs except ChangePubKey and ChangeECDSAPubKey, which the L1 wallet signs to replace the key. With a market whitelist, the key can only place, modify and cancel orders and change leverage or margin in those markets and in binary options markets of those series (event creator and tag). With an IP whitelist, the key can only send from those IPs. An expired key can sign nothing else. Restrictions belong to the key\'s public key. The account\'s L1 wallet personal_signs these lines: \'Set API Key Restrictions\', a blank line, \'account index: N\', \'api key index: N\', \'pubkey: 0x<public_key>\', \'market ids: <market_ids>\', \'series: <series>\', \'allowed ips: <allowed_ips>\', \'valid until: N\', \'timestamp: N\', \'chainId: N\', \'Only sign this message for a trusted client!\'. Each N is 0x plus 16 lowercase hex digits, public_key is lowercase hex, and lists are the exact strings sent, with an omitted series or allowed_ips signed as [].
|
|
2519
2512
|
* setApiKeyRestrictions
|
|
2520
2513
|
*/
|
|
2521
2514
|
async setApiKeyRestrictionsRaw(requestParameters: SetApiKeyRestrictionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
|
|
@@ -2634,7 +2627,7 @@ export class AccountApi extends runtime.BaseAPI {
|
|
|
2634
2627
|
}
|
|
2635
2628
|
|
|
2636
2629
|
/**
|
|
2637
|
-
* Replace an API key\'s restrictions. They apply to every transaction the key signs except ChangePubKey and ChangeECDSAPubKey, which the L1 wallet signs. With a market whitelist, the key can only place, modify and cancel orders and change leverage or margin in those markets and in binary options markets of those series (event creator and tag). With an IP whitelist, the key can only send from those IPs. An expired key can sign nothing else. Restrictions belong to the key\'s public key. The account\'s L1 wallet personal_signs these lines: \'Set API Key Restrictions\', a blank line, \'account index: N\', \'api key index: N\', \'pubkey: 0x<public_key>\', \'market ids: <market_ids>\', \'series: <series>\', \'allowed ips: <allowed_ips>\', \'valid until: N\', \'timestamp: N\', \'chainId: N\', \'Only sign this message for a trusted client!\'. Each N is 0x plus 16 lowercase hex digits, public_key is lowercase hex, and lists are the exact strings sent, with an omitted series or allowed_ips signed as [].
|
|
2630
|
+
* Replace an API key\'s restrictions. They apply to every transaction the key signs except ChangePubKey and ChangeECDSAPubKey, which the L1 wallet signs to replace the key. With a market whitelist, the key can only place, modify and cancel orders and change leverage or margin in those markets and in binary options markets of those series (event creator and tag). With an IP whitelist, the key can only send from those IPs. An expired key can sign nothing else. Restrictions belong to the key\'s public key. The account\'s L1 wallet personal_signs these lines: \'Set API Key Restrictions\', a blank line, \'account index: N\', \'api key index: N\', \'pubkey: 0x<public_key>\', \'market ids: <market_ids>\', \'series: <series>\', \'allowed ips: <allowed_ips>\', \'valid until: N\', \'timestamp: N\', \'chainId: N\', \'Only sign this message for a trusted client!\'. Each N is 0x plus 16 lowercase hex digits, public_key is lowercase hex, and lists are the exact strings sent, with an omitted series or allowed_ips signed as [].
|
|
2638
2631
|
* setApiKeyRestrictions
|
|
2639
2632
|
*/
|
|
2640
2633
|
async setApiKeyRestrictions(requestParameters: SetApiKeyRestrictionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
|
|
@@ -73,19 +73,19 @@ export interface OrderBookOrders {
|
|
|
73
73
|
* @type {string}
|
|
74
74
|
* @memberof OrderBookOrders
|
|
75
75
|
*/
|
|
76
|
-
group_size
|
|
76
|
+
group_size?: string;
|
|
77
77
|
/**
|
|
78
78
|
*
|
|
79
79
|
* @type {Array<OrderBookLevel>}
|
|
80
80
|
* @memberof OrderBookOrders
|
|
81
81
|
*/
|
|
82
|
-
ask_levels
|
|
82
|
+
ask_levels?: Array<OrderBookLevel>;
|
|
83
83
|
/**
|
|
84
84
|
*
|
|
85
85
|
* @type {Array<OrderBookLevel>}
|
|
86
86
|
* @memberof OrderBookOrders
|
|
87
87
|
*/
|
|
88
|
-
bid_levels
|
|
88
|
+
bid_levels?: Array<OrderBookLevel>;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
/**
|
|
@@ -97,9 +97,6 @@ export function instanceOfOrderBookOrders(value: object): value is OrderBookOrde
|
|
|
97
97
|
if (!('asks' in value) || value['asks'] === undefined) return false;
|
|
98
98
|
if (!('total_bids' in value) || value['total_bids'] === undefined) return false;
|
|
99
99
|
if (!('bids' in value) || value['bids'] === undefined) return false;
|
|
100
|
-
if (!('group_size' in value) || value['group_size'] === undefined) return false;
|
|
101
|
-
if (!('ask_levels' in value) || value['ask_levels'] === undefined) return false;
|
|
102
|
-
if (!('bid_levels' in value) || value['bid_levels'] === undefined) return false;
|
|
103
100
|
return true;
|
|
104
101
|
}
|
|
105
102
|
|
|
@@ -119,9 +116,9 @@ export function OrderBookOrdersFromJSONTyped(json: any, ignoreDiscriminator: boo
|
|
|
119
116
|
'asks': ((json['asks'] as Array<any>).map(SimpleOrderFromJSON)),
|
|
120
117
|
'total_bids': json['total_bids'],
|
|
121
118
|
'bids': ((json['bids'] as Array<any>).map(SimpleOrderFromJSON)),
|
|
122
|
-
'group_size': json['group_size'],
|
|
123
|
-
'ask_levels': ((json['ask_levels'] as Array<any>).map(OrderBookLevelFromJSON)),
|
|
124
|
-
'bid_levels': ((json['bid_levels'] as Array<any>).map(OrderBookLevelFromJSON)),
|
|
119
|
+
'group_size': json['group_size'] == null ? undefined : json['group_size'],
|
|
120
|
+
'ask_levels': json['ask_levels'] == null ? undefined : ((json['ask_levels'] as Array<any>).map(OrderBookLevelFromJSON)),
|
|
121
|
+
'bid_levels': json['bid_levels'] == null ? undefined : ((json['bid_levels'] as Array<any>).map(OrderBookLevelFromJSON)),
|
|
125
122
|
};
|
|
126
123
|
}
|
|
127
124
|
|
|
@@ -138,8 +135,8 @@ export function OrderBookOrdersToJSON(value?: OrderBookOrders | null): any {
|
|
|
138
135
|
'total_bids': value['total_bids'],
|
|
139
136
|
'bids': ((value['bids'] as Array<any>).map(SimpleOrderToJSON)),
|
|
140
137
|
'group_size': value['group_size'],
|
|
141
|
-
'ask_levels': ((value['ask_levels'] as Array<any>).map(OrderBookLevelToJSON)),
|
|
142
|
-
'bid_levels': ((value['bid_levels'] as Array<any>).map(OrderBookLevelToJSON)),
|
|
138
|
+
'ask_levels': value['ask_levels'] == null ? undefined : ((value['ask_levels'] as Array<any>).map(OrderBookLevelToJSON)),
|
|
139
|
+
'bid_levels': value['bid_levels'] == null ? undefined : ((value['bid_levels'] as Array<any>).map(OrderBookLevelToJSON)),
|
|
143
140
|
};
|
|
144
141
|
}
|
|
145
142
|
|
package/openapi.json
CHANGED
|
@@ -1449,12 +1449,6 @@
|
|
|
1449
1449
|
}
|
|
1450
1450
|
},
|
|
1451
1451
|
"parameters": [
|
|
1452
|
-
{
|
|
1453
|
-
"name": "authorization",
|
|
1454
|
-
"in": "header",
|
|
1455
|
-
"required": false,
|
|
1456
|
-
"type": "string"
|
|
1457
|
-
},
|
|
1458
1452
|
{
|
|
1459
1453
|
"name": "body",
|
|
1460
1454
|
"in": "body",
|
|
@@ -7430,7 +7424,7 @@
|
|
|
7430
7424
|
"consumes": [
|
|
7431
7425
|
"multipart/form-data"
|
|
7432
7426
|
],
|
|
7433
|
-
"description": "Replace an API key's restrictions. They apply to every transaction the key signs except ChangePubKey and ChangeECDSAPubKey, which the L1 wallet signs. With a market whitelist, the key can only place, modify and cancel orders and change leverage or margin in those markets and in binary options markets of those series (event creator and tag). With an IP whitelist, the key can only send from those IPs. An expired key can sign nothing else. Restrictions belong to the key's public key. The account's L1 wallet personal_signs these lines: 'Set API Key Restrictions', a blank line, 'account index: N', 'api key index: N', 'pubkey: 0x<public_key>', 'market ids: <market_ids>', 'series: <series>', 'allowed ips: <allowed_ips>', 'valid until: N', 'timestamp: N', 'chainId: N', 'Only sign this message for a trusted client!'. Each N is 0x plus 16 lowercase hex digits, public_key is lowercase hex, and lists are the exact strings sent, with an omitted series or allowed_ips signed as []."
|
|
7427
|
+
"description": "Replace an API key's restrictions. They apply to every transaction the key signs except ChangePubKey and ChangeECDSAPubKey, which the L1 wallet signs to replace the key. With a market whitelist, the key can only place, modify and cancel orders and change leverage or margin in those markets and in binary options markets of those series (event creator and tag). With an IP whitelist, the key can only send from those IPs. An expired key can sign nothing else. Restrictions belong to the key's public key. The account's L1 wallet personal_signs these lines: 'Set API Key Restrictions', a blank line, 'account index: N', 'api key index: N', 'pubkey: 0x<public_key>', 'market ids: <market_ids>', 'series: <series>', 'allowed ips: <allowed_ips>', 'valid until: N', 'timestamp: N', 'chainId: N', 'Only sign this message for a trusted client!'. Each N is 0x plus 16 lowercase hex digits, public_key is lowercase hex, and lists are the exact strings sent, with an omitted series or allowed_ips signed as []."
|
|
7434
7428
|
}
|
|
7435
7429
|
},
|
|
7436
7430
|
"/api/v1/setMakerOnlyApiKeys": {
|
|
@@ -15355,10 +15349,7 @@
|
|
|
15355
15349
|
"total_asks",
|
|
15356
15350
|
"asks",
|
|
15357
15351
|
"total_bids",
|
|
15358
|
-
"bids"
|
|
15359
|
-
"group_size",
|
|
15360
|
-
"ask_levels",
|
|
15361
|
-
"bid_levels"
|
|
15352
|
+
"bids"
|
|
15362
15353
|
]
|
|
15363
15354
|
},
|
|
15364
15355
|
"OrderBookStats": {
|
|
@@ -17778,12 +17769,13 @@
|
|
|
17778
17769
|
},
|
|
17779
17770
|
"destination_l1_address": {
|
|
17780
17771
|
"type": "string"
|
|
17772
|
+
},
|
|
17773
|
+
"auth": {
|
|
17774
|
+
"type": "string",
|
|
17775
|
+
"description": " made optional to support header auth clients"
|
|
17781
17776
|
}
|
|
17782
17777
|
},
|
|
17783
|
-
"title": "ReqBuyVolumeQuota"
|
|
17784
|
-
"required": [
|
|
17785
|
-
"quota"
|
|
17786
|
-
]
|
|
17778
|
+
"title": "ReqBuyVolumeQuota"
|
|
17787
17779
|
},
|
|
17788
17780
|
"ReqChangeAccountTier": {
|
|
17789
17781
|
"type": "object",
|