zklighter-perps 1.0.7 → 1.0.8

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 (90) hide show
  1. package/.openapi-generator/FILES +1 -0
  2. package/apis/BlockApi.ts +3 -0
  3. package/apis/CandlestickApi.ts +3 -0
  4. package/apis/InfoApi.ts +3 -0
  5. package/apis/OrderApi.ts +3 -0
  6. package/apis/RelayerApi.ts +3 -0
  7. package/apis/RootApi.ts +3 -0
  8. package/apis/TransactionApi.ts +110 -6
  9. package/models/AccountMarketStats.ts +18 -12
  10. package/models/AccountPnL.ts +7 -5
  11. package/models/AccountPosition.ts +33 -22
  12. package/models/AccountStats.ts +15 -10
  13. package/models/Block.ts +40 -27
  14. package/models/Blocks.ts +7 -5
  15. package/models/Candlestick.ts +21 -14
  16. package/models/Candlesticks.ts +7 -5
  17. package/models/ContractAddress.ts +6 -4
  18. package/models/CurrentHeight.ts +3 -2
  19. package/models/DetailedAccount.ts +11 -8
  20. package/models/DetailedAccounts.ts +7 -5
  21. package/models/EnrichedTx.ts +9 -6
  22. package/models/ExchangeStats.ts +13 -9
  23. package/models/Funding.ts +12 -8
  24. package/models/Fundings.ts +7 -5
  25. package/models/L1ProviderInfo.ts +12 -8
  26. package/models/Layer1BasicInfo.ts +24 -17
  27. package/models/Layer2BasicInfo.ts +9 -6
  28. package/models/MainAccount.ts +9 -6
  29. package/models/MainAccounts.ts +7 -5
  30. package/models/MarketInfo.ts +33 -22
  31. package/models/MarketSig.ts +12 -8
  32. package/models/NextNonce.ts +3 -2
  33. package/models/Order.ts +48 -32
  34. package/models/OrderBook.ts +30 -20
  35. package/models/OrderBookDepth.ts +11 -8
  36. package/models/OrderBookDetail.ts +54 -36
  37. package/models/OrderBookDetails.ts +4 -3
  38. package/models/OrderBookOrders.ts +14 -10
  39. package/models/OrderBookStats.ts +18 -12
  40. package/models/OrderBooks.ts +4 -3
  41. package/models/Orders.ts +4 -3
  42. package/models/Permission.ts +3 -2
  43. package/models/PnLEntry.ts +6 -4
  44. package/models/PriceLevel.ts +6 -4
  45. package/models/ReqDoFaucet.ts +3 -2
  46. package/models/ReqGetAccount.ts +6 -4
  47. package/models/ReqGetAccountActiveOrders.ts +9 -6
  48. package/models/ReqGetAccountByL1Address.ts +3 -2
  49. package/models/ReqGetAccountInactiveOrders.ts +12 -8
  50. package/models/ReqGetAccountOrders.ts +9 -6
  51. package/models/ReqGetAccountPnL.ts +18 -12
  52. package/models/ReqGetBlock.ts +6 -4
  53. package/models/ReqGetBlockTxs.ts +6 -4
  54. package/models/ReqGetByAccount.ts +6 -4
  55. package/models/ReqGetCandlesticks.ts +15 -10
  56. package/models/ReqGetFundings.ts +15 -10
  57. package/models/ReqGetL1Tx.ts +3 -2
  58. package/models/ReqGetMarketSig.ts +9 -6
  59. package/models/ReqGetNextNonce.ts +6 -4
  60. package/models/ReqGetOrderBookDetails.ts +3 -2
  61. package/models/ReqGetOrderBookOrders.ts +6 -4
  62. package/models/ReqGetOrderBooks.ts +3 -2
  63. package/models/ReqGetPermission.ts +9 -6
  64. package/models/ReqGetRangeWithCursor.ts +3 -2
  65. package/models/ReqGetRangeWithIndex.ts +3 -2
  66. package/models/ReqGetRecentTrades.ts +6 -4
  67. package/models/ReqGetRollbacks.ts +9 -6
  68. package/models/ReqGetSubAccount.ts +9 -6
  69. package/models/ReqGetTrades.ts +12 -8
  70. package/models/ReqGetTx.ts +6 -4
  71. package/models/ReqSearch.ts +3 -2
  72. package/models/ResultCode.ts +3 -2
  73. package/models/Rollback.ts +12 -8
  74. package/models/Rollbacks.ts +7 -5
  75. package/models/Search.ts +3 -2
  76. package/models/SignBody.ts +3 -2
  77. package/models/SimpleOrder.ts +18 -12
  78. package/models/Status.ts +6 -4
  79. package/models/SubAccount.ts +24 -16
  80. package/models/SubAccounts.ts +13 -9
  81. package/models/Trade.ts +36 -24
  82. package/models/Trades.ts +4 -3
  83. package/models/Tx.ts +42 -28
  84. package/models/TxHash.ts +3 -2
  85. package/models/TxHashes.ts +77 -0
  86. package/models/Txs.ts +4 -3
  87. package/models/ValidatorInfo.ts +6 -4
  88. package/models/index.ts +1 -0
  89. package/openapi.json +828 -80
  90. package/package.json +1 -1
package/models/Tx.ts CHANGED
@@ -24,91 +24,105 @@ export interface Tx {
24
24
  * @type {string}
25
25
  * @memberof Tx
26
26
  */
27
- hash?: string;
27
+ hash: string;
28
28
  /**
29
29
  *
30
30
  * @type {number}
31
31
  * @memberof Tx
32
32
  */
33
- type?: number;
33
+ type: number;
34
34
  /**
35
35
  *
36
36
  * @type {string}
37
37
  * @memberof Tx
38
38
  */
39
- info?: string;
39
+ info: string;
40
40
  /**
41
41
  *
42
42
  * @type {string}
43
43
  * @memberof Tx
44
44
  */
45
- eventInfo?: string;
45
+ eventInfo: string;
46
46
  /**
47
47
  *
48
48
  * @type {number}
49
49
  * @memberof Tx
50
50
  */
51
- status?: number;
51
+ status: number;
52
52
  /**
53
53
  *
54
54
  * @type {number}
55
55
  * @memberof Tx
56
56
  */
57
- transactionIndex?: number;
57
+ transactionIndex: number;
58
58
  /**
59
59
  *
60
60
  * @type {string}
61
61
  * @memberof Tx
62
62
  */
63
- l1Address?: string;
63
+ l1Address: string;
64
64
  /**
65
65
  *
66
66
  * @type {number}
67
67
  * @memberof Tx
68
68
  */
69
- accountIndex?: number;
69
+ accountIndex: number;
70
70
  /**
71
71
  *
72
72
  * @type {number}
73
73
  * @memberof Tx
74
74
  */
75
- nonce?: number;
75
+ nonce: number;
76
76
  /**
77
77
  *
78
78
  * @type {number}
79
79
  * @memberof Tx
80
80
  */
81
- expireAt?: number;
81
+ expireAt: number;
82
82
  /**
83
83
  *
84
84
  * @type {number}
85
85
  * @memberof Tx
86
86
  */
87
- blockHeight?: number;
87
+ blockHeight: number;
88
88
  /**
89
89
  *
90
90
  * @type {number}
91
91
  * @memberof Tx
92
92
  */
93
- createdAt?: number;
93
+ createdAt: number;
94
94
  /**
95
95
  *
96
96
  * @type {number}
97
97
  * @memberof Tx
98
98
  */
99
- verifyAt?: number;
99
+ verifyAt: number;
100
100
  /**
101
101
  *
102
102
  * @type {number}
103
103
  * @memberof Tx
104
104
  */
105
- sequenceIndex?: number;
105
+ sequenceIndex: number;
106
106
  }
107
107
 
108
108
  /**
109
109
  * Check if a given object implements the Tx interface.
110
110
  */
111
111
  export function instanceOfTx(value: object): value is Tx {
112
+ if (!('hash' in value) || value['hash'] === undefined) return false;
113
+ if (!('type' in value) || value['type'] === undefined) return false;
114
+ if (!('info' in value) || value['info'] === undefined) return false;
115
+ if (!('eventInfo' in value) || value['eventInfo'] === undefined) return false;
116
+ if (!('status' in value) || value['status'] === undefined) return false;
117
+ if (!('transactionIndex' in value) || value['transactionIndex'] === undefined) return false;
118
+ if (!('l1Address' in value) || value['l1Address'] === undefined) return false;
119
+ if (!('accountIndex' in value) || value['accountIndex'] === undefined) return false;
120
+ if (!('nonce' in value) || value['nonce'] === undefined) return false;
121
+ if (!('expireAt' in value) || value['expireAt'] === undefined) return false;
122
+ if (!('blockHeight' in value) || value['blockHeight'] === undefined) return false;
123
+ if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
124
+ if (!('verifyAt' in value) || value['verifyAt'] === undefined) return false;
125
+ if (!('sequenceIndex' in value) || value['sequenceIndex'] === undefined) return false;
112
126
  return true;
113
127
  }
114
128
 
@@ -122,20 +136,20 @@ export function TxFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tx {
122
136
  }
123
137
  return {
124
138
 
125
- 'hash': json['hash'] == null ? undefined : json['hash'],
126
- 'type': json['type'] == null ? undefined : json['type'],
127
- 'info': json['info'] == null ? undefined : json['info'],
128
- 'eventInfo': json['event_info'] == null ? undefined : json['event_info'],
129
- 'status': json['status'] == null ? undefined : json['status'],
130
- 'transactionIndex': json['transaction_index'] == null ? undefined : json['transaction_index'],
131
- 'l1Address': json['l1_address'] == null ? undefined : json['l1_address'],
132
- 'accountIndex': json['account_index'] == null ? undefined : json['account_index'],
133
- 'nonce': json['nonce'] == null ? undefined : json['nonce'],
134
- 'expireAt': json['expire_at'] == null ? undefined : json['expire_at'],
135
- 'blockHeight': json['block_height'] == null ? undefined : json['block_height'],
136
- 'createdAt': json['created_at'] == null ? undefined : json['created_at'],
137
- 'verifyAt': json['verify_at'] == null ? undefined : json['verify_at'],
138
- 'sequenceIndex': json['sequence_index'] == null ? undefined : json['sequence_index'],
139
+ 'hash': json['hash'],
140
+ 'type': json['type'],
141
+ 'info': json['info'],
142
+ 'eventInfo': json['event_info'],
143
+ 'status': json['status'],
144
+ 'transactionIndex': json['transaction_index'],
145
+ 'l1Address': json['l1_address'],
146
+ 'accountIndex': json['account_index'],
147
+ 'nonce': json['nonce'],
148
+ 'expireAt': json['expire_at'],
149
+ 'blockHeight': json['block_height'],
150
+ 'createdAt': json['created_at'],
151
+ 'verifyAt': json['verify_at'],
152
+ 'sequenceIndex': json['sequence_index'],
139
153
  };
140
154
  }
141
155
 
package/models/TxHash.ts CHANGED
@@ -36,13 +36,14 @@ export interface TxHash {
36
36
  * @type {string}
37
37
  * @memberof TxHash
38
38
  */
39
- txHash?: string;
39
+ txHash: string;
40
40
  }
41
41
 
42
42
  /**
43
43
  * Check if a given object implements the TxHash interface.
44
44
  */
45
45
  export function instanceOfTxHash(value: object): value is TxHash {
46
+ if (!('txHash' in value) || value['txHash'] === undefined) return false;
46
47
  return true;
47
48
  }
48
49
 
@@ -58,7 +59,7 @@ export function TxHashFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tx
58
59
 
59
60
  'code': json['code'] == null ? undefined : json['code'],
60
61
  'message': json['message'] == null ? undefined : json['message'],
61
- 'txHash': json['tx_hash'] == null ? undefined : json['tx_hash'],
62
+ 'txHash': json['tx_hash'],
62
63
  };
63
64
  }
64
65
 
@@ -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 TxHashes
20
+ */
21
+ export interface TxHashes {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof TxHashes
26
+ */
27
+ code?: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof TxHashes
32
+ */
33
+ message?: string;
34
+ /**
35
+ *
36
+ * @type {Array<string>}
37
+ * @memberof TxHashes
38
+ */
39
+ txHash: Array<string>;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the TxHashes interface.
44
+ */
45
+ export function instanceOfTxHashes(value: object): value is TxHashes {
46
+ if (!('txHash' in value) || value['txHash'] === undefined) return false;
47
+ return true;
48
+ }
49
+
50
+ export function TxHashesFromJSON(json: any): TxHashes {
51
+ return TxHashesFromJSONTyped(json, false);
52
+ }
53
+
54
+ export function TxHashesFromJSONTyped(json: any, ignoreDiscriminator: boolean): TxHashes {
55
+ if (json == null) {
56
+ return json;
57
+ }
58
+ return {
59
+
60
+ 'code': json['code'] == null ? undefined : json['code'],
61
+ 'message': json['message'] == null ? undefined : json['message'],
62
+ 'txHash': json['tx_hash'],
63
+ };
64
+ }
65
+
66
+ export function TxHashesToJSON(value?: TxHashes | null): any {
67
+ if (value == null) {
68
+ return value;
69
+ }
70
+ return {
71
+
72
+ 'code': value['code'],
73
+ 'message': value['message'],
74
+ 'tx_hash': value['txHash'],
75
+ };
76
+ }
77
+
package/models/Txs.ts CHANGED
@@ -43,13 +43,14 @@ export interface Txs {
43
43
  * @type {Array<Tx>}
44
44
  * @memberof Txs
45
45
  */
46
- txs?: Array<Tx>;
46
+ txs: Array<Tx>;
47
47
  }
48
48
 
49
49
  /**
50
50
  * Check if a given object implements the Txs interface.
51
51
  */
52
52
  export function instanceOfTxs(value: object): value is Txs {
53
+ if (!('txs' in value) || value['txs'] === undefined) return false;
53
54
  return true;
54
55
  }
55
56
 
@@ -65,7 +66,7 @@ export function TxsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Txs {
65
66
 
66
67
  'code': json['code'] == null ? undefined : json['code'],
67
68
  'message': json['message'] == null ? undefined : json['message'],
68
- 'txs': json['txs'] == null ? undefined : ((json['txs'] as Array<any>).map(TxFromJSON)),
69
+ 'txs': ((json['txs'] as Array<any>).map(TxFromJSON)),
69
70
  };
70
71
  }
71
72
 
@@ -77,7 +78,7 @@ export function TxsToJSON(value?: Txs | null): any {
77
78
 
78
79
  'code': value['code'],
79
80
  'message': value['message'],
80
- 'txs': value['txs'] == null ? undefined : ((value['txs'] as Array<any>).map(TxToJSON)),
81
+ 'txs': ((value['txs'] as Array<any>).map(TxToJSON)),
81
82
  };
82
83
  }
83
84
 
@@ -24,19 +24,21 @@ export interface ValidatorInfo {
24
24
  * @type {string}
25
25
  * @memberof ValidatorInfo
26
26
  */
27
- address?: string;
27
+ address: string;
28
28
  /**
29
29
  *
30
30
  * @type {boolean}
31
31
  * @memberof ValidatorInfo
32
32
  */
33
- isActive?: boolean;
33
+ isActive: boolean;
34
34
  }
35
35
 
36
36
  /**
37
37
  * Check if a given object implements the ValidatorInfo interface.
38
38
  */
39
39
  export function instanceOfValidatorInfo(value: object): value is ValidatorInfo {
40
+ if (!('address' in value) || value['address'] === undefined) return false;
41
+ if (!('isActive' in value) || value['isActive'] === undefined) return false;
40
42
  return true;
41
43
  }
42
44
 
@@ -50,8 +52,8 @@ export function ValidatorInfoFromJSONTyped(json: any, ignoreDiscriminator: boole
50
52
  }
51
53
  return {
52
54
 
53
- 'address': json['address'] == null ? undefined : json['address'],
54
- 'isActive': json['is_active'] == null ? undefined : json['is_active'],
55
+ 'address': json['address'],
56
+ 'isActive': json['is_active'],
55
57
  };
56
58
  }
57
59
 
package/models/index.ts CHANGED
@@ -80,5 +80,6 @@ export * from './Trade';
80
80
  export * from './Trades';
81
81
  export * from './Tx';
82
82
  export * from './TxHash';
83
+ export * from './TxHashes';
83
84
  export * from './Txs';
84
85
  export * from './ValidatorInfo';