zklighter-perps 1.0.187 → 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,12 +103,9 @@ 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
- nonce?: number;
110
- account_index?: number;
111
- api_key_index?: number;
112
109
  auth?: string;
113
110
  }
114
111
 
@@ -407,10 +404,10 @@ export class AccountApi extends runtime.BaseAPI {
407
404
  }
408
405
 
409
406
  /**
410
- * Get airdrop percentages
407
+ * Get airdrop allocation
411
408
  * airdrop
412
409
  */
413
- 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>> {
414
411
  if (requestParameters['l1_address'] == null) {
415
412
  throw new runtime.RequiredError(
416
413
  'l1_address',
@@ -441,20 +438,20 @@ export class AccountApi extends runtime.BaseAPI {
441
438
  query: queryParameters,
442
439
  }, initOverrides);
443
440
 
444
- return new runtime.JSONApiResponse(response, (jsonValue) => AirdropPercentagesFromJSON(jsonValue));
441
+ return new runtime.JSONApiResponse(response, (jsonValue) => AirdropAllocationsFromJSON(jsonValue));
445
442
  }
446
443
 
447
444
  /**
448
- * Get airdrop percentages
445
+ * Get airdrop allocation
449
446
  * airdrop
450
447
  */
451
- async airdrop(requestParameters: AirdropRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AirdropPercentages> {
448
+ async airdrop(requestParameters: AirdropRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AirdropAllocations> {
452
449
  const response = await this.airdropRaw(requestParameters, initOverrides);
453
450
  return await response.value();
454
451
  }
455
452
 
456
453
  /**
457
- * Create airdrop percentages
454
+ * Create airdrop allocation
458
455
  * airdrop_create
459
456
  */
460
457
  async airdropCreateRaw(requestParameters: AirdropCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ResultCode>> {
@@ -465,10 +462,10 @@ export class AccountApi extends runtime.BaseAPI {
465
462
  );
466
463
  }
467
464
 
468
- if (requestParameters['percentages'] == null) {
465
+ if (requestParameters['allocations'] == null) {
469
466
  throw new runtime.RequiredError(
470
- 'percentages',
471
- 'Required parameter "percentages" was null or undefined when calling airdropCreate().'
467
+ 'allocations',
468
+ 'Required parameter "allocations" was null or undefined when calling airdropCreate().'
472
469
  );
473
470
  }
474
471
 
@@ -505,20 +502,8 @@ export class AccountApi extends runtime.BaseAPI {
505
502
  formParams.append('l1_address', requestParameters['l1_address'] as any);
506
503
  }
507
504
 
508
- if (requestParameters['percentages'] != null) {
509
- formParams.append('percentages', requestParameters['percentages'] as any);
510
- }
511
-
512
- if (requestParameters['nonce'] != null) {
513
- formParams.append('nonce', requestParameters['nonce'] as any);
514
- }
515
-
516
- if (requestParameters['account_index'] != null) {
517
- formParams.append('account_index', requestParameters['account_index'] as any);
518
- }
519
-
520
- if (requestParameters['api_key_index'] != null) {
521
- formParams.append('api_key_index', requestParameters['api_key_index'] as any);
505
+ if (requestParameters['allocations'] != null) {
506
+ formParams.append('allocations', requestParameters['allocations'] as any);
522
507
  }
523
508
 
524
509
  if (requestParameters['signature'] != null) {
@@ -541,7 +526,7 @@ export class AccountApi extends runtime.BaseAPI {
541
526
  }
542
527
 
543
528
  /**
544
- * Create airdrop percentages
529
+ * Create airdrop allocation
545
530
  * airdrop_create
546
531
  */
547
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,27 +7291,15 @@
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
- "nonce": {
7304
- "type": "integer",
7305
- "format": "int64"
7306
- },
7307
- "account_index": {
7308
- "type": "integer",
7309
- "format": "int64"
7310
- },
7311
- "api_key_index": {
7312
- "type": "integer",
7313
- "format": "uint8"
7314
- },
7315
7303
  "signature": {
7316
7304
  "type": "string"
7317
7305
  },
@@ -7319,10 +7307,10 @@
7319
7307
  "type": "string"
7320
7308
  }
7321
7309
  },
7322
- "title": "ReqCreateAirdropPercentages",
7310
+ "title": "ReqCreateAirdropAllocations",
7323
7311
  "required": [
7324
7312
  "l1_address",
7325
- "percentages",
7313
+ "allocations",
7326
7314
  "signature"
7327
7315
  ]
7328
7316
  },
@@ -7680,7 +7668,7 @@
7680
7668
  },
7681
7669
  "title": "ReqGetAccountTxs"
7682
7670
  },
7683
- "ReqGetAirdropPercentages": {
7671
+ "ReqGetAirdropAllocations": {
7684
7672
  "type": "object",
7685
7673
  "properties": {
7686
7674
  "l1_address": {
@@ -7690,7 +7678,7 @@
7690
7678
  "type": "string"
7691
7679
  }
7692
7680
  },
7693
- "title": "ReqGetAirdropPercentages",
7681
+ "title": "ReqGetAirdropAllocations",
7694
7682
  "required": [
7695
7683
  "l1_address"
7696
7684
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.187",
3
+ "version": "1.0.188",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {