zklighter-perps 1.0.0

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.
Files changed (103) hide show
  1. package/.circleci/config.yml +86 -0
  2. package/.openapi-generator/FILES +95 -0
  3. package/.openapi-generator/VERSION +1 -0
  4. package/.openapi-generator-ignore +23 -0
  5. package/apis/AccountApi.ts +454 -0
  6. package/apis/BlockApi.ts +178 -0
  7. package/apis/CandlestickApi.ts +231 -0
  8. package/apis/InfoApi.ts +197 -0
  9. package/apis/OrderApi.ts +607 -0
  10. package/apis/RelayerApi.ts +95 -0
  11. package/apis/RootApi.ts +56 -0
  12. package/apis/TransactionApi.ts +608 -0
  13. package/apis/WsApi.ts +82 -0
  14. package/apis/index.ts +11 -0
  15. package/config.yaml +5 -0
  16. package/index.ts +5 -0
  17. package/models/AccountMarketStats.ts +100 -0
  18. package/models/AccountPnL.ts +91 -0
  19. package/models/AccountPosition.ts +140 -0
  20. package/models/AccountStats.ts +92 -0
  21. package/models/Block.ts +163 -0
  22. package/models/Blocks.ts +91 -0
  23. package/models/Candlestick.ts +108 -0
  24. package/models/Candlesticks.ts +91 -0
  25. package/models/ContractAddress.ts +68 -0
  26. package/models/CurrentHeight.ts +76 -0
  27. package/models/Cursor.ts +60 -0
  28. package/models/DetailedAccount.ts +169 -0
  29. package/models/DetailedAccounts.ts +91 -0
  30. package/models/EnrichedTx.ts +204 -0
  31. package/models/ExchangeStats.ts +107 -0
  32. package/models/Funding.ts +84 -0
  33. package/models/Fundings.ts +91 -0
  34. package/models/L1ProviderInfo.ts +84 -0
  35. package/models/Layer1BasicInfo.ts +143 -0
  36. package/models/Layer2BasicInfo.ts +92 -0
  37. package/models/MainAccount.ts +92 -0
  38. package/models/MainAccounts.ts +91 -0
  39. package/models/MarketInfo.ts +140 -0
  40. package/models/MarketSig.ts +100 -0
  41. package/models/NextNonce.ts +76 -0
  42. package/models/Order.ts +209 -0
  43. package/models/OrderBook.ts +143 -0
  44. package/models/OrderBookDepth.ts +99 -0
  45. package/models/OrderBookDetail.ts +287 -0
  46. package/models/OrderBookDetails.ts +83 -0
  47. package/models/OrderBookOrders.ts +107 -0
  48. package/models/OrderBookStats.ts +100 -0
  49. package/models/OrderBooks.ts +83 -0
  50. package/models/Orders.ts +91 -0
  51. package/models/Permission.ts +76 -0
  52. package/models/PnLEntry.ts +68 -0
  53. package/models/PriceLevel.ts +68 -0
  54. package/models/ReqDoFaucet.ts +60 -0
  55. package/models/ReqGetAccount.ts +79 -0
  56. package/models/ReqGetAccountActiveOrders.ts +76 -0
  57. package/models/ReqGetAccountByL1Address.ts +60 -0
  58. package/models/ReqGetAccountInactiveOrders.ts +111 -0
  59. package/models/ReqGetAccountOrders.ts +84 -0
  60. package/models/ReqGetAccountPendingTxs.ts +87 -0
  61. package/models/ReqGetAccountPnL.ts +124 -0
  62. package/models/ReqGetAccountTxs.ts +103 -0
  63. package/models/ReqGetBlock.ts +79 -0
  64. package/models/ReqGetBlockTxs.ts +79 -0
  65. package/models/ReqGetByAccount.ts +79 -0
  66. package/models/ReqGetCandlesticks.ts +107 -0
  67. package/models/ReqGetFundings.ts +102 -0
  68. package/models/ReqGetL1Tx.ts +60 -0
  69. package/models/ReqGetMarketSig.ts +76 -0
  70. package/models/ReqGetNextNonce.ts +68 -0
  71. package/models/ReqGetOrderBookDetails.ts +79 -0
  72. package/models/ReqGetOrderBookOrders.ts +68 -0
  73. package/models/ReqGetOrderBooks.ts +79 -0
  74. package/models/ReqGetPermission.ts +87 -0
  75. package/models/ReqGetRangeWithCursor.ts +68 -0
  76. package/models/ReqGetRangeWithIndex.ts +68 -0
  77. package/models/ReqGetRangeWithIndexSortable.ts +87 -0
  78. package/models/ReqGetRecentTrades.ts +68 -0
  79. package/models/ReqGetRollbacks.ts +76 -0
  80. package/models/ReqGetSubAccount.ts +87 -0
  81. package/models/ReqGetTrades.ts +104 -0
  82. package/models/ReqGetTx.ts +79 -0
  83. package/models/ReqSearch.ts +60 -0
  84. package/models/ResultCode.ts +68 -0
  85. package/models/Rollback.ts +84 -0
  86. package/models/Rollbacks.ts +91 -0
  87. package/models/Search.ts +76 -0
  88. package/models/SignBody.ts +76 -0
  89. package/models/SimpleOrder.ts +100 -0
  90. package/models/Status.ts +68 -0
  91. package/models/SubAccount.ts +116 -0
  92. package/models/SubAccounts.ts +107 -0
  93. package/models/Trade.ts +148 -0
  94. package/models/Trades.ts +83 -0
  95. package/models/Tx.ts +164 -0
  96. package/models/TxHash.ts +76 -0
  97. package/models/Txs.ts +83 -0
  98. package/models/ValidatorInfo.ts +68 -0
  99. package/models/index.ts +84 -0
  100. package/openapi-generator-cli.jar +0 -0
  101. package/openapi.json +3934 -0
  102. package/package.json +23 -0
  103. package/runtime.ts +426 -0
@@ -0,0 +1,84 @@
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 ReqGetAccountOrders
20
+ */
21
+ export interface ReqGetAccountOrders {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ReqGetAccountOrders
26
+ */
27
+ accountIndex?: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof ReqGetAccountOrders
32
+ */
33
+ marketId?: number;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ReqGetAccountOrders
38
+ */
39
+ cursor?: string;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof ReqGetAccountOrders
44
+ */
45
+ limit?: number;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the ReqGetAccountOrders interface.
50
+ */
51
+ export function instanceOfReqGetAccountOrders(value: object): value is ReqGetAccountOrders {
52
+ return true;
53
+ }
54
+
55
+ export function ReqGetAccountOrdersFromJSON(json: any): ReqGetAccountOrders {
56
+ return ReqGetAccountOrdersFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function ReqGetAccountOrdersFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetAccountOrders {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'accountIndex': json['account_index'] == null ? undefined : json['account_index'],
66
+ 'marketId': json['market_id'] == null ? undefined : json['market_id'],
67
+ 'cursor': json['cursor'] == null ? undefined : json['cursor'],
68
+ 'limit': json['limit'] == null ? undefined : json['limit'],
69
+ };
70
+ }
71
+
72
+ export function ReqGetAccountOrdersToJSON(value?: ReqGetAccountOrders | null): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+ return {
77
+
78
+ 'account_index': value['accountIndex'],
79
+ 'market_id': value['marketId'],
80
+ 'cursor': value['cursor'],
81
+ 'limit': value['limit'],
82
+ };
83
+ }
84
+
@@ -0,0 +1,87 @@
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 ReqGetAccountPendingTxs
20
+ */
21
+ export interface ReqGetAccountPendingTxs {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ReqGetAccountPendingTxs
26
+ */
27
+ by?: ReqGetAccountPendingTxsByEnum;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ReqGetAccountPendingTxs
32
+ */
33
+ value?: string;
34
+ /**
35
+ *
36
+ * @type {Array<number>}
37
+ * @memberof ReqGetAccountPendingTxs
38
+ */
39
+ types?: Array<number>;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const ReqGetAccountPendingTxsByEnum = {
47
+ AccountIndex: 'account_index',
48
+ L1Address: 'l1_address'
49
+ } as const;
50
+ export type ReqGetAccountPendingTxsByEnum = typeof ReqGetAccountPendingTxsByEnum[keyof typeof ReqGetAccountPendingTxsByEnum];
51
+
52
+
53
+ /**
54
+ * Check if a given object implements the ReqGetAccountPendingTxs interface.
55
+ */
56
+ export function instanceOfReqGetAccountPendingTxs(value: object): value is ReqGetAccountPendingTxs {
57
+ return true;
58
+ }
59
+
60
+ export function ReqGetAccountPendingTxsFromJSON(json: any): ReqGetAccountPendingTxs {
61
+ return ReqGetAccountPendingTxsFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function ReqGetAccountPendingTxsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetAccountPendingTxs {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'by': json['by'] == null ? undefined : json['by'],
71
+ 'value': json['value'] == null ? undefined : json['value'],
72
+ 'types': json['types'] == null ? undefined : json['types'],
73
+ };
74
+ }
75
+
76
+ export function ReqGetAccountPendingTxsToJSON(value?: ReqGetAccountPendingTxs | null): any {
77
+ if (value == null) {
78
+ return value;
79
+ }
80
+ return {
81
+
82
+ 'by': value['by'],
83
+ 'value': value['value'],
84
+ 'types': value['types'],
85
+ };
86
+ }
87
+
@@ -0,0 +1,124 @@
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 ReqGetAccountPnL
20
+ */
21
+ export interface ReqGetAccountPnL {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ReqGetAccountPnL
26
+ */
27
+ by?: ReqGetAccountPnLByEnum;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ReqGetAccountPnL
32
+ */
33
+ value?: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ReqGetAccountPnL
38
+ */
39
+ resolution?: ReqGetAccountPnLResolutionEnum;
40
+ /**
41
+ *
42
+ * @type {number}
43
+ * @memberof ReqGetAccountPnL
44
+ */
45
+ startTimestamp?: number;
46
+ /**
47
+ *
48
+ * @type {number}
49
+ * @memberof ReqGetAccountPnL
50
+ */
51
+ endTimestamp?: number;
52
+ /**
53
+ *
54
+ * @type {number}
55
+ * @memberof ReqGetAccountPnL
56
+ */
57
+ countBack?: number;
58
+ }
59
+
60
+
61
+ /**
62
+ * @export
63
+ */
64
+ export const ReqGetAccountPnLByEnum = {
65
+ Index: 'index',
66
+ L1Address: 'l1_address'
67
+ } as const;
68
+ export type ReqGetAccountPnLByEnum = typeof ReqGetAccountPnLByEnum[keyof typeof ReqGetAccountPnLByEnum];
69
+
70
+ /**
71
+ * @export
72
+ */
73
+ export const ReqGetAccountPnLResolutionEnum = {
74
+ _1m: '1m',
75
+ _5m: '5m',
76
+ _15m: '15m',
77
+ _1h: '1h',
78
+ _4h: '4h',
79
+ _1d: '1d'
80
+ } as const;
81
+ export type ReqGetAccountPnLResolutionEnum = typeof ReqGetAccountPnLResolutionEnum[keyof typeof ReqGetAccountPnLResolutionEnum];
82
+
83
+
84
+ /**
85
+ * Check if a given object implements the ReqGetAccountPnL interface.
86
+ */
87
+ export function instanceOfReqGetAccountPnL(value: object): value is ReqGetAccountPnL {
88
+ return true;
89
+ }
90
+
91
+ export function ReqGetAccountPnLFromJSON(json: any): ReqGetAccountPnL {
92
+ return ReqGetAccountPnLFromJSONTyped(json, false);
93
+ }
94
+
95
+ export function ReqGetAccountPnLFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetAccountPnL {
96
+ if (json == null) {
97
+ return json;
98
+ }
99
+ return {
100
+
101
+ 'by': json['by'] == null ? undefined : json['by'],
102
+ 'value': json['value'] == null ? undefined : json['value'],
103
+ 'resolution': json['resolution'] == null ? undefined : json['resolution'],
104
+ 'startTimestamp': json['start_timestamp'] == null ? undefined : json['start_timestamp'],
105
+ 'endTimestamp': json['end_timestamp'] == null ? undefined : json['end_timestamp'],
106
+ 'countBack': json['count_back'] == null ? undefined : json['count_back'],
107
+ };
108
+ }
109
+
110
+ export function ReqGetAccountPnLToJSON(value?: ReqGetAccountPnL | null): any {
111
+ if (value == null) {
112
+ return value;
113
+ }
114
+ return {
115
+
116
+ 'by': value['by'],
117
+ 'value': value['value'],
118
+ 'resolution': value['resolution'],
119
+ 'start_timestamp': value['startTimestamp'],
120
+ 'end_timestamp': value['endTimestamp'],
121
+ 'count_back': value['countBack'],
122
+ };
123
+ }
124
+
@@ -0,0 +1,103 @@
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 ReqGetAccountTxs
20
+ */
21
+ export interface ReqGetAccountTxs {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof ReqGetAccountTxs
26
+ */
27
+ index?: number;
28
+ /**
29
+ *
30
+ * @type {number}
31
+ * @memberof ReqGetAccountTxs
32
+ */
33
+ limit?: number;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ReqGetAccountTxs
38
+ */
39
+ by?: ReqGetAccountTxsByEnum;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof ReqGetAccountTxs
44
+ */
45
+ value?: string;
46
+ /**
47
+ *
48
+ * @type {Array<number>}
49
+ * @memberof ReqGetAccountTxs
50
+ */
51
+ types?: Array<number>;
52
+ }
53
+
54
+
55
+ /**
56
+ * @export
57
+ */
58
+ export const ReqGetAccountTxsByEnum = {
59
+ AccountIndex: 'account_index',
60
+ L1Address: 'l1_address'
61
+ } as const;
62
+ export type ReqGetAccountTxsByEnum = typeof ReqGetAccountTxsByEnum[keyof typeof ReqGetAccountTxsByEnum];
63
+
64
+
65
+ /**
66
+ * Check if a given object implements the ReqGetAccountTxs interface.
67
+ */
68
+ export function instanceOfReqGetAccountTxs(value: object): value is ReqGetAccountTxs {
69
+ return true;
70
+ }
71
+
72
+ export function ReqGetAccountTxsFromJSON(json: any): ReqGetAccountTxs {
73
+ return ReqGetAccountTxsFromJSONTyped(json, false);
74
+ }
75
+
76
+ export function ReqGetAccountTxsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetAccountTxs {
77
+ if (json == null) {
78
+ return json;
79
+ }
80
+ return {
81
+
82
+ 'index': json['index'] == null ? undefined : json['index'],
83
+ 'limit': json['limit'] == null ? undefined : json['limit'],
84
+ 'by': json['by'] == null ? undefined : json['by'],
85
+ 'value': json['value'] == null ? undefined : json['value'],
86
+ 'types': json['types'] == null ? undefined : json['types'],
87
+ };
88
+ }
89
+
90
+ export function ReqGetAccountTxsToJSON(value?: ReqGetAccountTxs | null): any {
91
+ if (value == null) {
92
+ return value;
93
+ }
94
+ return {
95
+
96
+ 'index': value['index'],
97
+ 'limit': value['limit'],
98
+ 'by': value['by'],
99
+ 'value': value['value'],
100
+ 'types': value['types'],
101
+ };
102
+ }
103
+
@@ -0,0 +1,79 @@
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 ReqGetBlock
20
+ */
21
+ export interface ReqGetBlock {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ReqGetBlock
26
+ */
27
+ by?: ReqGetBlockByEnum;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ReqGetBlock
32
+ */
33
+ value?: string;
34
+ }
35
+
36
+
37
+ /**
38
+ * @export
39
+ */
40
+ export const ReqGetBlockByEnum = {
41
+ Commitment: 'commitment',
42
+ Height: 'height'
43
+ } as const;
44
+ export type ReqGetBlockByEnum = typeof ReqGetBlockByEnum[keyof typeof ReqGetBlockByEnum];
45
+
46
+
47
+ /**
48
+ * Check if a given object implements the ReqGetBlock interface.
49
+ */
50
+ export function instanceOfReqGetBlock(value: object): value is ReqGetBlock {
51
+ return true;
52
+ }
53
+
54
+ export function ReqGetBlockFromJSON(json: any): ReqGetBlock {
55
+ return ReqGetBlockFromJSONTyped(json, false);
56
+ }
57
+
58
+ export function ReqGetBlockFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetBlock {
59
+ if (json == null) {
60
+ return json;
61
+ }
62
+ return {
63
+
64
+ 'by': json['by'] == null ? undefined : json['by'],
65
+ 'value': json['value'] == null ? undefined : json['value'],
66
+ };
67
+ }
68
+
69
+ export function ReqGetBlockToJSON(value?: ReqGetBlock | null): any {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+ return {
74
+
75
+ 'by': value['by'],
76
+ 'value': value['value'],
77
+ };
78
+ }
79
+
@@ -0,0 +1,79 @@
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 ReqGetBlockTxs
20
+ */
21
+ export interface ReqGetBlockTxs {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ReqGetBlockTxs
26
+ */
27
+ by?: ReqGetBlockTxsByEnum;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ReqGetBlockTxs
32
+ */
33
+ value?: string;
34
+ }
35
+
36
+
37
+ /**
38
+ * @export
39
+ */
40
+ export const ReqGetBlockTxsByEnum = {
41
+ Height: 'block_height',
42
+ Commitment: 'block_commitment'
43
+ } as const;
44
+ export type ReqGetBlockTxsByEnum = typeof ReqGetBlockTxsByEnum[keyof typeof ReqGetBlockTxsByEnum];
45
+
46
+
47
+ /**
48
+ * Check if a given object implements the ReqGetBlockTxs interface.
49
+ */
50
+ export function instanceOfReqGetBlockTxs(value: object): value is ReqGetBlockTxs {
51
+ return true;
52
+ }
53
+
54
+ export function ReqGetBlockTxsFromJSON(json: any): ReqGetBlockTxs {
55
+ return ReqGetBlockTxsFromJSONTyped(json, false);
56
+ }
57
+
58
+ export function ReqGetBlockTxsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetBlockTxs {
59
+ if (json == null) {
60
+ return json;
61
+ }
62
+ return {
63
+
64
+ 'by': json['by'] == null ? undefined : json['by'],
65
+ 'value': json['value'] == null ? undefined : json['value'],
66
+ };
67
+ }
68
+
69
+ export function ReqGetBlockTxsToJSON(value?: ReqGetBlockTxs | null): any {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+ return {
74
+
75
+ 'by': value['by'],
76
+ 'value': value['value'],
77
+ };
78
+ }
79
+
@@ -0,0 +1,79 @@
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 ReqGetByAccount
20
+ */
21
+ export interface ReqGetByAccount {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ReqGetByAccount
26
+ */
27
+ by?: ReqGetByAccountByEnum;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ReqGetByAccount
32
+ */
33
+ value?: string;
34
+ }
35
+
36
+
37
+ /**
38
+ * @export
39
+ */
40
+ export const ReqGetByAccountByEnum = {
41
+ AccountIndex: 'account_index',
42
+ L1Address: 'l1_address'
43
+ } as const;
44
+ export type ReqGetByAccountByEnum = typeof ReqGetByAccountByEnum[keyof typeof ReqGetByAccountByEnum];
45
+
46
+
47
+ /**
48
+ * Check if a given object implements the ReqGetByAccount interface.
49
+ */
50
+ export function instanceOfReqGetByAccount(value: object): value is ReqGetByAccount {
51
+ return true;
52
+ }
53
+
54
+ export function ReqGetByAccountFromJSON(json: any): ReqGetByAccount {
55
+ return ReqGetByAccountFromJSONTyped(json, false);
56
+ }
57
+
58
+ export function ReqGetByAccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReqGetByAccount {
59
+ if (json == null) {
60
+ return json;
61
+ }
62
+ return {
63
+
64
+ 'by': json['by'] == null ? undefined : json['by'],
65
+ 'value': json['value'] == null ? undefined : json['value'],
66
+ };
67
+ }
68
+
69
+ export function ReqGetByAccountToJSON(value?: ReqGetByAccount | null): any {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+ return {
74
+
75
+ 'by': value['by'],
76
+ 'value': value['value'],
77
+ };
78
+ }
79
+