zklighter-perps 1.0.134 → 1.0.136

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.
@@ -119,9 +119,11 @@ models/ReqGetRecentTrades.ts
119
119
  models/ReqGetReferralCode.ts
120
120
  models/ReqGetReferralPoints.ts
121
121
  models/ReqGetTrades.ts
122
+ models/ReqGetTransferHistory.ts
122
123
  models/ReqGetTx.ts
123
124
  models/ReqGetWithdrawHistory.ts
124
125
  models/ReqIsWhitelisted.ts
126
+ models/RespChangeAccountTier.ts
125
127
  models/RespGetFastBridgeInfo.ts
126
128
  models/RespGetFastwithdrawalInfo.ts
127
129
  models/ResultCode.ts
@@ -133,6 +135,8 @@ models/SubAccounts.ts
133
135
  models/Ticker.ts
134
136
  models/Trade.ts
135
137
  models/Trades.ts
138
+ models/TransferHistory.ts
139
+ models/TransferHistoryItem.ts
136
140
  models/Tx.ts
137
141
  models/TxHash.ts
138
142
  models/TxHashes.ts
@@ -26,6 +26,7 @@ import type {
26
26
  LiquidationInfos,
27
27
  PositionFundings,
28
28
  PublicPools,
29
+ RespChangeAccountTier,
29
30
  ResultCode,
30
31
  SubAccounts,
31
32
  } from '../models/index';
@@ -52,6 +53,8 @@ import {
52
53
  PositionFundingsToJSON,
53
54
  PublicPoolsFromJSON,
54
55
  PublicPoolsToJSON,
56
+ RespChangeAccountTierFromJSON,
57
+ RespChangeAccountTierToJSON,
55
58
  ResultCodeFromJSON,
56
59
  ResultCodeToJSON,
57
60
  SubAccountsFromJSON,
@@ -85,6 +88,13 @@ export interface ApikeysRequest {
85
88
  api_key_index?: number;
86
89
  }
87
90
 
91
+ export interface ChangeAccountTierRequest {
92
+ account_index: number;
93
+ new_tier: string;
94
+ authorization?: string;
95
+ auth?: string;
96
+ }
97
+
88
98
  export interface FaucetRequest {
89
99
  l1_address: string;
90
100
  }
@@ -389,6 +399,79 @@ export class AccountApi extends runtime.BaseAPI {
389
399
  return await response.value();
390
400
  }
391
401
 
402
+ /**
403
+ * Change account tier
404
+ * changeAccountTier
405
+ */
406
+ async changeAccountTierRaw(requestParameters: ChangeAccountTierRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<RespChangeAccountTier>> {
407
+ if (requestParameters['account_index'] == null) {
408
+ throw new runtime.RequiredError(
409
+ 'account_index',
410
+ 'Required parameter "account_index" was null or undefined when calling changeAccountTier().'
411
+ );
412
+ }
413
+
414
+ if (requestParameters['new_tier'] == null) {
415
+ throw new runtime.RequiredError(
416
+ 'new_tier',
417
+ 'Required parameter "new_tier" was null or undefined when calling changeAccountTier().'
418
+ );
419
+ }
420
+
421
+ const queryParameters: any = {};
422
+
423
+ const headerParameters: runtime.HTTPHeaders = {};
424
+
425
+ if (requestParameters['authorization'] != null) {
426
+ headerParameters['authorization'] = String(requestParameters['authorization']);
427
+ }
428
+
429
+ const consumes: runtime.Consume[] = [
430
+ { contentType: 'multipart/form-data' },
431
+ ];
432
+ // @ts-ignore: canConsumeForm may be unused
433
+ const canConsumeForm = runtime.canConsumeForm(consumes);
434
+
435
+ let formParams: { append(param: string, value: any): any };
436
+ let useForm = false;
437
+ if (useForm) {
438
+ formParams = new FormData();
439
+ } else {
440
+ formParams = new URLSearchParams();
441
+ }
442
+
443
+ if (requestParameters['auth'] != null) {
444
+ formParams.append('auth', requestParameters['auth'] as any);
445
+ }
446
+
447
+ if (requestParameters['account_index'] != null) {
448
+ formParams.append('account_index', requestParameters['account_index'] as any);
449
+ }
450
+
451
+ if (requestParameters['new_tier'] != null) {
452
+ formParams.append('new_tier', requestParameters['new_tier'] as any);
453
+ }
454
+
455
+ const response = await this.request({
456
+ path: `/api/v1/changeAccountTier`,
457
+ method: 'POST',
458
+ headers: headerParameters,
459
+ query: queryParameters,
460
+ body: formParams,
461
+ }, initOverrides);
462
+
463
+ return new runtime.JSONApiResponse(response, (jsonValue) => RespChangeAccountTierFromJSON(jsonValue));
464
+ }
465
+
466
+ /**
467
+ * Change account tier
468
+ * changeAccountTier
469
+ */
470
+ async changeAccountTier(requestParameters: ChangeAccountTierRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RespChangeAccountTier> {
471
+ const response = await this.changeAccountTierRaw(requestParameters, initOverrides);
472
+ return await response.value();
473
+ }
474
+
392
475
  /**
393
476
  * Request funds from faucet
394
477
  * faucet
@@ -19,6 +19,7 @@ import type {
19
19
  EnrichedTx,
20
20
  NextNonce,
21
21
  ResultCode,
22
+ TransferHistory,
22
23
  TxHash,
23
24
  TxHashes,
24
25
  Txs,
@@ -33,6 +34,8 @@ import {
33
34
  NextNonceToJSON,
34
35
  ResultCodeFromJSON,
35
36
  ResultCodeToJSON,
37
+ TransferHistoryFromJSON,
38
+ TransferHistoryToJSON,
36
39
  TxHashFromJSON,
37
40
  TxHashToJSON,
38
41
  TxHashesFromJSON,
@@ -101,6 +104,13 @@ export interface SetAccountMetadataRequest {
101
104
  auth?: string;
102
105
  }
103
106
 
107
+ export interface TransferHistoryRequest {
108
+ account_index: number;
109
+ authorization?: string;
110
+ auth?: string;
111
+ cursor?: string;
112
+ }
113
+
104
114
  export interface TxRequest {
105
115
  by: TxByEnum;
106
116
  value: string;
@@ -689,6 +699,57 @@ export class TransactionApi extends runtime.BaseAPI {
689
699
  return await response.value();
690
700
  }
691
701
 
702
+ /**
703
+ * Get transfer history
704
+ * transfer_history
705
+ */
706
+ async transferHistoryRaw(requestParameters: TransferHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<TransferHistory>> {
707
+ if (requestParameters['account_index'] == null) {
708
+ throw new runtime.RequiredError(
709
+ 'account_index',
710
+ 'Required parameter "account_index" was null or undefined when calling transferHistory().'
711
+ );
712
+ }
713
+
714
+ const queryParameters: any = {};
715
+
716
+ if (requestParameters['account_index'] != null) {
717
+ queryParameters['account_index'] = requestParameters['account_index'];
718
+ }
719
+
720
+ if (requestParameters['auth'] != null) {
721
+ queryParameters['auth'] = requestParameters['auth'];
722
+ }
723
+
724
+ if (requestParameters['cursor'] != null) {
725
+ queryParameters['cursor'] = requestParameters['cursor'];
726
+ }
727
+
728
+ const headerParameters: runtime.HTTPHeaders = {};
729
+
730
+ if (requestParameters['authorization'] != null) {
731
+ headerParameters['authorization'] = String(requestParameters['authorization']);
732
+ }
733
+
734
+ const response = await this.request({
735
+ path: `/api/v1/transfer/history`,
736
+ method: 'GET',
737
+ headers: headerParameters,
738
+ query: queryParameters,
739
+ }, initOverrides);
740
+
741
+ return new runtime.JSONApiResponse(response, (jsonValue) => TransferHistoryFromJSON(jsonValue));
742
+ }
743
+
744
+ /**
745
+ * Get transfer history
746
+ * transfer_history
747
+ */
748
+ async transferHistory(requestParameters: TransferHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<TransferHistory> {
749
+ const response = await this.transferHistoryRaw(requestParameters, initOverrides);
750
+ return await response.value();
751
+ }
752
+
692
753
  /**
693
754
  * Get transaction by hash or sequence index
694
755
  * tx
@@ -37,6 +37,12 @@ export interface AccountLimits {
37
37
  * @memberof AccountLimits
38
38
  */
39
39
  max_llp_percentage: number;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof AccountLimits
44
+ */
45
+ user_tier: string;
40
46
  }
41
47
 
42
48
  /**
@@ -45,6 +51,7 @@ export interface AccountLimits {
45
51
  export function instanceOfAccountLimits(value: object): value is AccountLimits {
46
52
  if (!('code' in value) || value['code'] === undefined) return false;
47
53
  if (!('max_llp_percentage' in value) || value['max_llp_percentage'] === undefined) return false;
54
+ if (!('user_tier' in value) || value['user_tier'] === undefined) return false;
48
55
  return true;
49
56
  }
50
57
 
@@ -61,6 +68,7 @@ export function AccountLimitsFromJSONTyped(json: any, ignoreDiscriminator: boole
61
68
  'code': json['code'],
62
69
  'message': json['message'] == null ? undefined : json['message'],
63
70
  'max_llp_percentage': json['max_llp_percentage'],
71
+ 'user_tier': json['user_tier'],
64
72
  };
65
73
  }
66
74
 
@@ -73,6 +81,7 @@ export function AccountLimitsToJSON(value?: AccountLimits | null): any {
73
81
  'code': value['code'],
74
82
  'message': value['message'],
75
83
  'max_llp_percentage': value['max_llp_percentage'],
84
+ 'user_tier': value['user_tier'],
76
85
  };
77
86
  }
78
87
 
@@ -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
+ /**
17
+ *
18
+ * @export
19
+ * @interface ReqGetTransferHistory
20
+ */
21
+ export interface ReqGetTransferHistory {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ReqGetTransferHistory
26
+ */
27
+ account_index: number;
28
+ /**
29
+ * made optional to support header auth clients
30
+ * @type {string}
31
+ * @memberof ReqGetTransferHistory
32
+ */
33
+ auth?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ReqGetTransferHistory
38
+ */
39
+ cursor?: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the ReqGetTransferHistory interface.
44
+ */
45
+ export function instanceOfReqGetTransferHistory(value: object): value is ReqGetTransferHistory {
46
+ if (!('account_index' in value) || value['account_index'] === undefined) return false;
47
+ return true;
48
+ }
49
+
50
+ export function ReqGetTransferHistoryFromJSON(json: any): ReqGetTransferHistory {
51
+ return ReqGetTransferHistoryFromJSONTyped(json, false);
52
+ }
53
+
54
+ export function ReqGetTransferHistoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetTransferHistory {
55
+ if (json == null) {
56
+ return json;
57
+ }
58
+ return {
59
+
60
+ 'account_index': json['account_index'],
61
+ 'auth': json['auth'] == null ? undefined : json['auth'],
62
+ 'cursor': json['cursor'] == null ? undefined : json['cursor'],
63
+ };
64
+ }
65
+
66
+ export function ReqGetTransferHistoryToJSON(value?: ReqGetTransferHistory | null): any {
67
+ if (value == null) {
68
+ return value;
69
+ }
70
+ return {
71
+
72
+ 'account_index': value['account_index'],
73
+ 'auth': value['auth'],
74
+ 'cursor': value['cursor'],
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 RespChangeAccountTier
20
+ */
21
+ export interface RespChangeAccountTier {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof RespChangeAccountTier
26
+ */
27
+ code: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof RespChangeAccountTier
32
+ */
33
+ message?: string;
34
+ }
35
+
36
+ /**
37
+ * Check if a given object implements the RespChangeAccountTier interface.
38
+ */
39
+ export function instanceOfRespChangeAccountTier(value: object): value is RespChangeAccountTier {
40
+ if (!('code' in value) || value['code'] === undefined) return false;
41
+ return true;
42
+ }
43
+
44
+ export function RespChangeAccountTierFromJSON(json: any): RespChangeAccountTier {
45
+ return RespChangeAccountTierFromJSONTyped(json, false);
46
+ }
47
+
48
+ export function RespChangeAccountTierFromJSONTyped(json: any, ignoreDiscriminator: boolean): RespChangeAccountTier {
49
+ if (json == null) {
50
+ return json;
51
+ }
52
+ return {
53
+
54
+ 'code': json['code'],
55
+ 'message': json['message'] == null ? undefined : json['message'],
56
+ };
57
+ }
58
+
59
+ export function RespChangeAccountTierToJSON(value?: RespChangeAccountTier | null): any {
60
+ if (value == null) {
61
+ return value;
62
+ }
63
+ return {
64
+
65
+ 'code': value['code'],
66
+ 'message': value['message'],
67
+ };
68
+ }
69
+
@@ -0,0 +1,94 @@
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 { TransferHistoryItem } from './TransferHistoryItem';
17
+ import {
18
+ TransferHistoryItemFromJSON,
19
+ TransferHistoryItemFromJSONTyped,
20
+ TransferHistoryItemToJSON,
21
+ } from './TransferHistoryItem';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface TransferHistory
27
+ */
28
+ export interface TransferHistory {
29
+ /**
30
+ *
31
+ * @type {number}
32
+ * @memberof TransferHistory
33
+ */
34
+ code: number;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof TransferHistory
39
+ */
40
+ message?: string;
41
+ /**
42
+ *
43
+ * @type {Array<TransferHistoryItem>}
44
+ * @memberof TransferHistory
45
+ */
46
+ transfers: Array<TransferHistoryItem>;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof TransferHistory
51
+ */
52
+ cursor: string;
53
+ }
54
+
55
+ /**
56
+ * Check if a given object implements the TransferHistory interface.
57
+ */
58
+ export function instanceOfTransferHistory(value: object): value is TransferHistory {
59
+ if (!('code' in value) || value['code'] === undefined) return false;
60
+ if (!('transfers' in value) || value['transfers'] === undefined) return false;
61
+ if (!('cursor' in value) || value['cursor'] === undefined) return false;
62
+ return true;
63
+ }
64
+
65
+ export function TransferHistoryFromJSON(json: any): TransferHistory {
66
+ return TransferHistoryFromJSONTyped(json, false);
67
+ }
68
+
69
+ export function TransferHistoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransferHistory {
70
+ if (json == null) {
71
+ return json;
72
+ }
73
+ return {
74
+
75
+ 'code': json['code'],
76
+ 'message': json['message'] == null ? undefined : json['message'],
77
+ 'transfers': ((json['transfers'] as Array<any>).map(TransferHistoryItemFromJSON)),
78
+ 'cursor': json['cursor'],
79
+ };
80
+ }
81
+
82
+ export function TransferHistoryToJSON(value?: TransferHistory | null): any {
83
+ if (value == null) {
84
+ return value;
85
+ }
86
+ return {
87
+
88
+ 'code': value['code'],
89
+ 'message': value['message'],
90
+ 'transfers': ((value['transfers'] as Array<any>).map(TransferHistoryItemToJSON)),
91
+ 'cursor': value['cursor'],
92
+ };
93
+ }
94
+
@@ -0,0 +1,126 @@
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 TransferHistoryItem
20
+ */
21
+ export interface TransferHistoryItem {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof TransferHistoryItem
26
+ */
27
+ id: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof TransferHistoryItem
32
+ */
33
+ amount: string;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof TransferHistoryItem
38
+ */
39
+ timestamp: number;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof TransferHistoryItem
44
+ */
45
+ type: TransferHistoryItemTypeEnum;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof TransferHistoryItem
50
+ */
51
+ from_account_index: number;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof TransferHistoryItem
56
+ */
57
+ to_account_index: number;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof TransferHistoryItem
62
+ */
63
+ tx_hash: string;
64
+ }
65
+
66
+
67
+ /**
68
+ * @export
69
+ */
70
+ export const TransferHistoryItemTypeEnum = {
71
+ Inflow: 'l2_transfer_inflow',
72
+ Outflow: 'l2_transfer_outflow'
73
+ } as const;
74
+ export type TransferHistoryItemTypeEnum = typeof TransferHistoryItemTypeEnum[keyof typeof TransferHistoryItemTypeEnum];
75
+
76
+
77
+ /**
78
+ * Check if a given object implements the TransferHistoryItem interface.
79
+ */
80
+ export function instanceOfTransferHistoryItem(value: object): value is TransferHistoryItem {
81
+ if (!('id' in value) || value['id'] === undefined) return false;
82
+ if (!('amount' in value) || value['amount'] === undefined) return false;
83
+ if (!('timestamp' in value) || value['timestamp'] === undefined) return false;
84
+ if (!('type' in value) || value['type'] === undefined) return false;
85
+ if (!('from_account_index' in value) || value['from_account_index'] === undefined) return false;
86
+ if (!('to_account_index' in value) || value['to_account_index'] === undefined) return false;
87
+ if (!('tx_hash' in value) || value['tx_hash'] === undefined) return false;
88
+ return true;
89
+ }
90
+
91
+ export function TransferHistoryItemFromJSON(json: any): TransferHistoryItem {
92
+ return TransferHistoryItemFromJSONTyped(json, false);
93
+ }
94
+
95
+ export function TransferHistoryItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransferHistoryItem {
96
+ if (json == null) {
97
+ return json;
98
+ }
99
+ return {
100
+
101
+ 'id': json['id'],
102
+ 'amount': json['amount'],
103
+ 'timestamp': json['timestamp'],
104
+ 'type': json['type'],
105
+ 'from_account_index': json['from_account_index'],
106
+ 'to_account_index': json['to_account_index'],
107
+ 'tx_hash': json['tx_hash'],
108
+ };
109
+ }
110
+
111
+ export function TransferHistoryItemToJSON(value?: TransferHistoryItem | null): any {
112
+ if (value == null) {
113
+ return value;
114
+ }
115
+ return {
116
+
117
+ 'id': value['id'],
118
+ 'amount': value['amount'],
119
+ 'timestamp': value['timestamp'],
120
+ 'type': value['type'],
121
+ 'from_account_index': value['from_account_index'],
122
+ 'to_account_index': value['to_account_index'],
123
+ 'tx_hash': value['tx_hash'],
124
+ };
125
+ }
126
+
package/models/index.ts CHANGED
@@ -107,9 +107,11 @@ export * from './ReqGetRecentTrades';
107
107
  export * from './ReqGetReferralCode';
108
108
  export * from './ReqGetReferralPoints';
109
109
  export * from './ReqGetTrades';
110
+ export * from './ReqGetTransferHistory';
110
111
  export * from './ReqGetTx';
111
112
  export * from './ReqGetWithdrawHistory';
112
113
  export * from './ReqIsWhitelisted';
114
+ export * from './RespChangeAccountTier';
113
115
  export * from './RespGetFastBridgeInfo';
114
116
  export * from './RespGetFastwithdrawalInfo';
115
117
  export * from './ResultCode';
@@ -121,6 +123,8 @@ export * from './SubAccounts';
121
123
  export * from './Ticker';
122
124
  export * from './Trade';
123
125
  export * from './Trades';
126
+ export * from './TransferHistory';
127
+ export * from './TransferHistoryItem';
124
128
  export * from './Tx';
125
129
  export * from './TxHash';
126
130
  export * from './TxHashes';
package/openapi.json CHANGED
@@ -791,6 +791,50 @@
791
791
  "description": "Get candlesticks"
792
792
  }
793
793
  },
794
+ "/api/v1/changeAccountTier": {
795
+ "post": {
796
+ "summary": "changeAccountTier",
797
+ "operationId": "changeAccountTier",
798
+ "responses": {
799
+ "200": {
800
+ "description": "A successful response.",
801
+ "schema": {
802
+ "$ref": "#/definitions/RespChangeAccountTier"
803
+ }
804
+ },
805
+ "400": {
806
+ "description": "Bad request",
807
+ "schema": {
808
+ "$ref": "#/definitions/ResultCode"
809
+ }
810
+ }
811
+ },
812
+ "parameters": [
813
+ {
814
+ "name": "authorization",
815
+ "description": " make required after integ is done",
816
+ "in": "header",
817
+ "required": false,
818
+ "type": "string"
819
+ },
820
+ {
821
+ "name": "body",
822
+ "in": "body",
823
+ "required": true,
824
+ "schema": {
825
+ "$ref": "#/definitions/ReqChangeAccountTier"
826
+ }
827
+ }
828
+ ],
829
+ "tags": [
830
+ "account"
831
+ ],
832
+ "consumes": [
833
+ "multipart/form-data"
834
+ ],
835
+ "description": "Change account tier"
836
+ }
837
+ },
794
838
  "/api/v1/createIntentAddress": {
795
839
  "post": {
796
840
  "summary": "createIntentAddress",
@@ -2577,6 +2621,62 @@
2577
2621
  "description": "Get trades"
2578
2622
  }
2579
2623
  },
2624
+ "/api/v1/transfer/history": {
2625
+ "get": {
2626
+ "summary": "transfer_history",
2627
+ "operationId": "transfer_history",
2628
+ "responses": {
2629
+ "200": {
2630
+ "description": "A successful response.",
2631
+ "schema": {
2632
+ "$ref": "#/definitions/TransferHistory"
2633
+ }
2634
+ },
2635
+ "400": {
2636
+ "description": "Bad request",
2637
+ "schema": {
2638
+ "$ref": "#/definitions/ResultCode"
2639
+ }
2640
+ }
2641
+ },
2642
+ "parameters": [
2643
+ {
2644
+ "name": "authorization",
2645
+ "description": " make required after integ is done",
2646
+ "in": "header",
2647
+ "required": false,
2648
+ "type": "string"
2649
+ },
2650
+ {
2651
+ "name": "account_index",
2652
+ "in": "query",
2653
+ "required": true,
2654
+ "type": "integer",
2655
+ "format": "int64"
2656
+ },
2657
+ {
2658
+ "name": "auth",
2659
+ "description": " made optional to support header auth clients",
2660
+ "in": "query",
2661
+ "required": false,
2662
+ "type": "string"
2663
+ },
2664
+ {
2665
+ "name": "cursor",
2666
+ "in": "query",
2667
+ "required": false,
2668
+ "type": "string"
2669
+ }
2670
+ ],
2671
+ "tags": [
2672
+ "transaction"
2673
+ ],
2674
+ "consumes": [
2675
+ "multipart/form-data"
2676
+ ],
2677
+ "description": "Get transfer history"
2678
+ }
2679
+ },
2580
2680
  "/api/v1/tx": {
2581
2681
  "get": {
2582
2682
  "summary": "tx",
@@ -2903,12 +3003,17 @@
2903
3003
  "type": "integer",
2904
3004
  "format": "int32",
2905
3005
  "example": "25"
3006
+ },
3007
+ "user_tier": {
3008
+ "type": "string",
3009
+ "example": "std"
2906
3010
  }
2907
3011
  },
2908
3012
  "title": "AccountLimits",
2909
3013
  "required": [
2910
3014
  "code",
2911
- "max_llp_percentage"
3015
+ "max_llp_percentage",
3016
+ "user_tier"
2912
3017
  ]
2913
3018
  },
2914
3019
  "AccountMarginStats": {
@@ -5950,6 +6055,27 @@
5950
6055
  "chain_id"
5951
6056
  ]
5952
6057
  },
6058
+ "ReqChangeAccountTier": {
6059
+ "type": "object",
6060
+ "properties": {
6061
+ "auth": {
6062
+ "type": "string",
6063
+ "description": " made optional to support header auth clients"
6064
+ },
6065
+ "account_index": {
6066
+ "type": "integer",
6067
+ "format": "int64"
6068
+ },
6069
+ "new_tier": {
6070
+ "type": "string"
6071
+ }
6072
+ },
6073
+ "title": "ReqChangeAccountTier",
6074
+ "required": [
6075
+ "account_index",
6076
+ "new_tier"
6077
+ ]
6078
+ },
5953
6079
  "ReqCreateIntentAddress": {
5954
6080
  "type": "object",
5955
6081
  "properties": {
@@ -6920,6 +7046,26 @@
6920
7046
  "limit"
6921
7047
  ]
6922
7048
  },
7049
+ "ReqGetTransferHistory": {
7050
+ "type": "object",
7051
+ "properties": {
7052
+ "account_index": {
7053
+ "type": "integer",
7054
+ "format": "int64"
7055
+ },
7056
+ "auth": {
7057
+ "type": "string",
7058
+ "description": " made optional to support header auth clients"
7059
+ },
7060
+ "cursor": {
7061
+ "type": "string"
7062
+ }
7063
+ },
7064
+ "title": "ReqGetTransferHistory",
7065
+ "required": [
7066
+ "account_index"
7067
+ ]
7068
+ },
6923
7069
  "ReqGetTx": {
6924
7070
  "type": "object",
6925
7071
  "properties": {
@@ -7074,6 +7220,23 @@
7074
7220
  "x"
7075
7221
  ]
7076
7222
  },
7223
+ "RespChangeAccountTier": {
7224
+ "type": "object",
7225
+ "properties": {
7226
+ "code": {
7227
+ "type": "integer",
7228
+ "format": "int32",
7229
+ "example": "200"
7230
+ },
7231
+ "message": {
7232
+ "type": "string"
7233
+ }
7234
+ },
7235
+ "title": "RespChangeAccountTier",
7236
+ "required": [
7237
+ "code"
7238
+ ]
7239
+ },
7077
7240
  "RespGetFastBridgeInfo": {
7078
7241
  "type": "object",
7079
7242
  "properties": {
@@ -7492,6 +7655,82 @@
7492
7655
  "trades"
7493
7656
  ]
7494
7657
  },
7658
+ "TransferHistory": {
7659
+ "type": "object",
7660
+ "properties": {
7661
+ "code": {
7662
+ "type": "integer",
7663
+ "format": "int32",
7664
+ "example": "200"
7665
+ },
7666
+ "message": {
7667
+ "type": "string"
7668
+ },
7669
+ "transfers": {
7670
+ "type": "array",
7671
+ "items": {
7672
+ "$ref": "#/definitions/TransferHistoryItem"
7673
+ }
7674
+ },
7675
+ "cursor": {
7676
+ "type": "string"
7677
+ }
7678
+ },
7679
+ "title": "TransferHistory",
7680
+ "required": [
7681
+ "code",
7682
+ "transfers",
7683
+ "cursor"
7684
+ ]
7685
+ },
7686
+ "TransferHistoryItem": {
7687
+ "type": "object",
7688
+ "properties": {
7689
+ "id": {
7690
+ "type": "string"
7691
+ },
7692
+ "amount": {
7693
+ "type": "string",
7694
+ "example": "0.1"
7695
+ },
7696
+ "timestamp": {
7697
+ "type": "integer",
7698
+ "format": "int64",
7699
+ "example": "1640995200"
7700
+ },
7701
+ "type": {
7702
+ "type": "string",
7703
+ "enum": [
7704
+ "l2_transfer_inflow",
7705
+ "l2_transfer_outflow"
7706
+ ]
7707
+ },
7708
+ "from_account_index": {
7709
+ "type": "integer",
7710
+ "format": "int64",
7711
+ "example": "1"
7712
+ },
7713
+ "to_account_index": {
7714
+ "type": "integer",
7715
+ "format": "int64",
7716
+ "example": "1"
7717
+ },
7718
+ "tx_hash": {
7719
+ "type": "string",
7720
+ "example": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8"
7721
+ }
7722
+ },
7723
+ "title": "TransferHistoryItem",
7724
+ "required": [
7725
+ "id",
7726
+ "amount",
7727
+ "timestamp",
7728
+ "type",
7729
+ "from_account_index",
7730
+ "to_account_index",
7731
+ "tx_hash"
7732
+ ]
7733
+ },
7495
7734
  "Tx": {
7496
7735
  "type": "object",
7497
7736
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zklighter-perps",
3
- "version": "1.0.134",
3
+ "version": "1.0.136",
4
4
  "description": "zkLighter Perps SDK",
5
5
  "main": "index.ts",
6
6
  "directories": {