zklighter-perps 1.0.366 → 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.
@@ -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> {
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": {
@@ -17775,12 +17769,13 @@
17775
17769
  },
17776
17770
  "destination_l1_address": {
17777
17771
  "type": "string"
17772
+ },
17773
+ "auth": {
17774
+ "type": "string",
17775
+ "description": " made optional to support header auth clients"
17778
17776
  }
17779
17777
  },
17780
- "title": "ReqBuyVolumeQuota",
17781
- "required": [
17782
- "quota"
17783
- ]
17778
+ "title": "ReqBuyVolumeQuota"
17784
17779
  },
17785
17780
  "ReqChangeAccountTier": {
17786
17781
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.366",
3
+ "version": "1.0.367",
4
4
  "description": "Lighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {