zklighter-perps 1.0.186 → 1.0.188

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.
@@ -26,8 +26,8 @@ models/AccountPnL.ts
26
26
  models/AccountPosition.ts
27
27
  models/AccountStats.ts
28
28
  models/AccountTradeStats.ts
29
- models/AirdropPercentageItem.ts
30
- models/AirdropPercentages.ts
29
+ models/AirdropAllocationItem.ts
30
+ models/AirdropAllocations.ts
31
31
  models/Announcement.ts
32
32
  models/Announcements.ts
33
33
  models/ApiKey.ts
@@ -106,7 +106,7 @@ models/ReqGetAccountLimits.ts
106
106
  models/ReqGetAccountMetadata.ts
107
107
  models/ReqGetAccountPnL.ts
108
108
  models/ReqGetAccountTxs.ts
109
- models/ReqGetAirdropPercentages.ts
109
+ models/ReqGetAirdropAllocations.ts
110
110
  models/ReqGetApiTokens.ts
111
111
  models/ReqGetAssetDetails.ts
112
112
  models/ReqGetBlock.ts
@@ -19,7 +19,7 @@ import type {
19
19
  AccountLimits,
20
20
  AccountMetadatas,
21
21
  AccountPnL,
22
- AirdropPercentages,
22
+ AirdropAllocations,
23
23
  DetailedAccounts,
24
24
  IsWhitelisted,
25
25
  L1Metadata,
@@ -43,8 +43,8 @@ import {
43
43
  AccountMetadatasToJSON,
44
44
  AccountPnLFromJSON,
45
45
  AccountPnLToJSON,
46
- AirdropPercentagesFromJSON,
47
- AirdropPercentagesToJSON,
46
+ AirdropAllocationsFromJSON,
47
+ AirdropAllocationsToJSON,
48
48
  DetailedAccountsFromJSON,
49
49
  DetailedAccountsToJSON,
50
50
  IsWhitelistedFromJSON,
@@ -103,7 +103,7 @@ export interface AirdropRequest {
103
103
 
104
104
  export interface AirdropCreateRequest {
105
105
  l1_address: string;
106
- percentages: string;
106
+ allocations: string;
107
107
  signature: string;
108
108
  authorization?: string;
109
109
  auth?: string;
@@ -404,10 +404,10 @@ export class AccountApi extends runtime.BaseAPI {
404
404
  }
405
405
 
406
406
  /**
407
- * Get airdrop percentages
407
+ * Get airdrop allocation
408
408
  * airdrop
409
409
  */
410
- async airdropRaw(requestParameters: AirdropRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AirdropPercentages>> {
410
+ async airdropRaw(requestParameters: AirdropRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AirdropAllocations>> {
411
411
  if (requestParameters['l1_address'] == null) {
412
412
  throw new runtime.RequiredError(
413
413
  'l1_address',
@@ -438,20 +438,20 @@ export class AccountApi extends runtime.BaseAPI {
438
438
  query: queryParameters,
439
439
  }, initOverrides);
440
440
 
441
- return new runtime.JSONApiResponse(response, (jsonValue) => AirdropPercentagesFromJSON(jsonValue));
441
+ return new runtime.JSONApiResponse(response, (jsonValue) => AirdropAllocationsFromJSON(jsonValue));
442
442
  }
443
443
 
444
444
  /**
445
- * Get airdrop percentages
445
+ * Get airdrop allocation
446
446
  * airdrop
447
447
  */
448
- async airdrop(requestParameters: AirdropRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AirdropPercentages> {
448
+ async airdrop(requestParameters: AirdropRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AirdropAllocations> {
449
449
  const response = await this.airdropRaw(requestParameters, initOverrides);
450
450
  return await response.value();
451
451
  }
452
452
 
453
453
  /**
454
- * Create airdrop percentages
454
+ * Create airdrop allocation
455
455
  * airdrop_create
456
456
  */
457
457
  async airdropCreateRaw(requestParameters: AirdropCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
@@ -462,10 +462,10 @@ export class AccountApi extends runtime.BaseAPI {
462
462
  );
463
463
  }
464
464
 
465
- if (requestParameters['percentages'] == null) {
465
+ if (requestParameters['allocations'] == null) {
466
466
  throw new runtime.RequiredError(
467
- 'percentages',
468
- 'Required parameter "percentages" was null or undefined when calling airdropCreate().'
467
+ 'allocations',
468
+ 'Required parameter "allocations" was null or undefined when calling airdropCreate().'
469
469
  );
470
470
  }
471
471
 
@@ -502,8 +502,8 @@ export class AccountApi extends runtime.BaseAPI {
502
502
  formParams.append('l1_address', requestParameters['l1_address'] as any);
503
503
  }
504
504
 
505
- if (requestParameters['percentages'] != null) {
506
- formParams.append('percentages', requestParameters['percentages'] as any);
505
+ if (requestParameters['allocations'] != null) {
506
+ formParams.append('allocations', requestParameters['allocations'] as any);
507
507
  }
508
508
 
509
509
  if (requestParameters['signature'] != null) {
@@ -526,7 +526,7 @@ export class AccountApi extends runtime.BaseAPI {
526
526
  }
527
527
 
528
528
  /**
529
- * Create airdrop percentages
529
+ * Create airdrop allocation
530
530
  * airdrop_create
531
531
  */
532
532
  async airdropCreate(requestParameters: AirdropCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ResultCode> {
@@ -0,0 +1,70 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ *
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document:
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AirdropAllocationItem
20
+ */
21
+ export interface AirdropAllocationItem {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AirdropAllocationItem
26
+ */
27
+ l1_address: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AirdropAllocationItem
32
+ */
33
+ allocation: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the AirdropAllocationItem interface.
38
+ */
39
+ export function instanceOfAirdropAllocationItem(value: object): value is AirdropAllocationItem {
40
+ if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
41
+ if (!('allocation' in value) || value['allocation'] === undefined) return false;
42
+ return true;
43
+ }
44
+
45
+ export function AirdropAllocationItemFromJSON(json: any): AirdropAllocationItem {
46
+ return AirdropAllocationItemFromJSONTyped(json, false);
47
+ }
48
+
49
+ export function AirdropAllocationItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): AirdropAllocationItem {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+
55
+ 'l1_address': json['l1_address'],
56
+ 'allocation': json['allocation'],
57
+ };
58
+ }
59
+
60
+ export function AirdropAllocationItemToJSON(value?: AirdropAllocationItem | null): any {
61
+ if (value == null) {
62
+ return value;
63
+ }
64
+ return {
65
+
66
+ 'l1_address': value['l1_address'],
67
+ 'allocation': value['allocation'],
68
+ };
69
+ }
70
+
@@ -0,0 +1,77 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ *
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document:
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { AirdropAllocationItem } from './AirdropAllocationItem';
17
+ import {
18
+ AirdropAllocationItemFromJSON,
19
+ AirdropAllocationItemFromJSONTyped,
20
+ AirdropAllocationItemToJSON,
21
+ } from './AirdropAllocationItem';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface AirdropAllocations
27
+ */
28
+ export interface AirdropAllocations {
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof AirdropAllocations
33
+ */
34
+ l1_address: string;
35
+ /**
36
+ *
37
+ * @type {Array<AirdropAllocationItem>}
38
+ * @memberof AirdropAllocations
39
+ */
40
+ allocations: Array<AirdropAllocationItem>;
41
+ }
42
+
43
+ /**
44
+ * Check if a given object implements the AirdropAllocations interface.
45
+ */
46
+ export function instanceOfAirdropAllocations(value: object): value is AirdropAllocations {
47
+ if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
48
+ if (!('allocations' in value) || value['allocations'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function AirdropAllocationsFromJSON(json: any): AirdropAllocations {
53
+ return AirdropAllocationsFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function AirdropAllocationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): AirdropAllocations {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'l1_address': json['l1_address'],
63
+ 'allocations': ((json['allocations'] as Array<any>).map(AirdropAllocationItemFromJSON)),
64
+ };
65
+ }
66
+
67
+ export function AirdropAllocationsToJSON(value?: AirdropAllocations | null): any {
68
+ if (value == null) {
69
+ return value;
70
+ }
71
+ return {
72
+
73
+ 'l1_address': value['l1_address'],
74
+ 'allocations': ((value['allocations'] as Array<any>).map(AirdropAllocationItemToJSON)),
75
+ };
76
+ }
77
+
@@ -0,0 +1,69 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ *
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document:
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ReqGetAirdropAllocations
20
+ */
21
+ export interface ReqGetAirdropAllocations {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ReqGetAirdropAllocations
26
+ */
27
+ l1_address: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ReqGetAirdropAllocations
32
+ */
33
+ auth?: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the ReqGetAirdropAllocations interface.
38
+ */
39
+ export function instanceOfReqGetAirdropAllocations(value: object): value is ReqGetAirdropAllocations {
40
+ if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
41
+ return true;
42
+ }
43
+
44
+ export function ReqGetAirdropAllocationsFromJSON(json: any): ReqGetAirdropAllocations {
45
+ return ReqGetAirdropAllocationsFromJSONTyped(json, false);
46
+ }
47
+
48
+ export function ReqGetAirdropAllocationsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetAirdropAllocations {
49
+ if (json == null) {
50
+ return json;
51
+ }
52
+ return {
53
+
54
+ 'l1_address': json['l1_address'],
55
+ 'auth': json['auth'] == null ? undefined : json['auth'],
56
+ };
57
+ }
58
+
59
+ export function ReqGetAirdropAllocationsToJSON(value?: ReqGetAirdropAllocations | null): any {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+
65
+ 'l1_address': value['l1_address'],
66
+ 'auth': value['auth'],
67
+ };
68
+ }
69
+
package/models/index.ts CHANGED
@@ -12,8 +12,8 @@ export * from './AccountPnL';
12
12
  export * from './AccountPosition';
13
13
  export * from './AccountStats';
14
14
  export * from './AccountTradeStats';
15
- export * from './AirdropPercentageItem';
16
- export * from './AirdropPercentages';
15
+ export * from './AirdropAllocationItem';
16
+ export * from './AirdropAllocations';
17
17
  export * from './Announcement';
18
18
  export * from './Announcements';
19
19
  export * from './ApiKey';
@@ -92,7 +92,7 @@ export * from './ReqGetAccountLimits';
92
92
  export * from './ReqGetAccountMetadata';
93
93
  export * from './ReqGetAccountPnL';
94
94
  export * from './ReqGetAccountTxs';
95
- export * from './ReqGetAirdropPercentages';
95
+ export * from './ReqGetAirdropAllocations';
96
96
  export * from './ReqGetApiTokens';
97
97
  export * from './ReqGetAssetDetails';
98
98
  export * from './ReqGetBlock';
package/openapi.json CHANGED
@@ -462,7 +462,7 @@
462
462
  "200": {
463
463
  "description": "A successful response.",
464
464
  "schema": {
465
- "$ref": "#/definitions/AirdropPercentages"
465
+ "$ref": "#/definitions/AirdropAllocations"
466
466
  }
467
467
  },
468
468
  "400": {
@@ -499,7 +499,7 @@
499
499
  "consumes": [
500
500
  "multipart/form-data"
501
501
  ],
502
- "description": "Get airdrop percentages"
502
+ "description": "Get airdrop allocation"
503
503
  }
504
504
  },
505
505
  "/api/v1/airdrop/create": {
@@ -533,7 +533,7 @@
533
533
  "in": "body",
534
534
  "required": true,
535
535
  "schema": {
536
- "$ref": "#/definitions/ReqCreateAirdropPercentages"
536
+ "$ref": "#/definitions/ReqCreateAirdropAllocations"
537
537
  }
538
538
  }
539
539
  ],
@@ -543,7 +543,7 @@
543
543
  "consumes": [
544
544
  "multipart/form-data"
545
545
  ],
546
- "description": "Create airdrop percentages"
546
+ "description": "Create airdrop allocation"
547
547
  }
548
548
  },
549
549
  "/api/v1/announcement": {
@@ -4025,39 +4025,39 @@
4025
4025
  "total_volume"
4026
4026
  ]
4027
4027
  },
4028
- "AirdropPercentageItem": {
4028
+ "AirdropAllocationItem": {
4029
4029
  "type": "object",
4030
4030
  "properties": {
4031
4031
  "l1_address": {
4032
4032
  "type": "string"
4033
4033
  },
4034
- "percentage": {
4034
+ "allocation": {
4035
4035
  "type": "string"
4036
4036
  }
4037
4037
  },
4038
- "title": "AirdropPercentageItem",
4038
+ "title": "AirdropAllocationItem",
4039
4039
  "required": [
4040
4040
  "l1_address",
4041
- "percentage"
4041
+ "allocation"
4042
4042
  ]
4043
4043
  },
4044
- "AirdropPercentages": {
4044
+ "AirdropAllocations": {
4045
4045
  "type": "object",
4046
4046
  "properties": {
4047
4047
  "l1_address": {
4048
4048
  "type": "string"
4049
4049
  },
4050
- "percentages": {
4050
+ "allocations": {
4051
4051
  "type": "array",
4052
4052
  "items": {
4053
- "$ref": "#/definitions/AirdropPercentageItem"
4053
+ "$ref": "#/definitions/AirdropAllocationItem"
4054
4054
  }
4055
4055
  }
4056
4056
  },
4057
- "title": "AirdropPercentages",
4057
+ "title": "AirdropAllocations",
4058
4058
  "required": [
4059
4059
  "l1_address",
4060
- "percentages"
4060
+ "allocations"
4061
4061
  ]
4062
4062
  },
4063
4063
  "Announcement": {
@@ -7291,13 +7291,13 @@
7291
7291
  "new_tier"
7292
7292
  ]
7293
7293
  },
7294
- "ReqCreateAirdropPercentages": {
7294
+ "ReqCreateAirdropAllocations": {
7295
7295
  "type": "object",
7296
7296
  "properties": {
7297
7297
  "l1_address": {
7298
7298
  "type": "string"
7299
7299
  },
7300
- "percentages": {
7300
+ "allocations": {
7301
7301
  "type": "string"
7302
7302
  },
7303
7303
  "signature": {
@@ -7307,10 +7307,10 @@
7307
7307
  "type": "string"
7308
7308
  }
7309
7309
  },
7310
- "title": "ReqCreateAirdropPercentages",
7310
+ "title": "ReqCreateAirdropAllocations",
7311
7311
  "required": [
7312
7312
  "l1_address",
7313
- "percentages",
7313
+ "allocations",
7314
7314
  "signature"
7315
7315
  ]
7316
7316
  },
@@ -7668,7 +7668,7 @@
7668
7668
  },
7669
7669
  "title": "ReqGetAccountTxs"
7670
7670
  },
7671
- "ReqGetAirdropPercentages": {
7671
+ "ReqGetAirdropAllocations": {
7672
7672
  "type": "object",
7673
7673
  "properties": {
7674
7674
  "l1_address": {
@@ -7678,7 +7678,7 @@
7678
7678
  "type": "string"
7679
7679
  }
7680
7680
  },
7681
- "title": "ReqGetAirdropPercentages",
7681
+ "title": "ReqGetAirdropAllocations",
7682
7682
  "required": [
7683
7683
  "l1_address"
7684
7684
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.186",
3
+ "version": "1.0.188",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {