zklighter-perps 1.0.5 → 1.0.7

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 (91) hide show
  1. package/.openapi-generator/FILES +0 -1
  2. package/apis/AccountApi.ts +12 -0
  3. package/apis/BlockApi.ts +6 -3
  4. package/apis/CandlestickApi.ts +4 -3
  5. package/apis/InfoApi.ts +8 -3
  6. package/apis/OrderApi.ts +18 -3
  7. package/apis/RelayerApi.ts +2 -3
  8. package/apis/RootApi.ts +2 -69
  9. package/apis/TransactionApi.ts +26 -37
  10. package/apis/WsApi.ts +4 -0
  11. package/apis/index.ts +0 -1
  12. package/models/AccountMarketStats.ts +12 -18
  13. package/models/AccountPnL.ts +5 -7
  14. package/models/AccountPosition.ts +22 -33
  15. package/models/AccountStats.ts +10 -15
  16. package/models/Block.ts +27 -40
  17. package/models/Blocks.ts +5 -7
  18. package/models/Candlestick.ts +14 -21
  19. package/models/Candlesticks.ts +5 -7
  20. package/models/ContractAddress.ts +4 -6
  21. package/models/CurrentHeight.ts +2 -3
  22. package/models/DetailedAccount.ts +8 -11
  23. package/models/DetailedAccounts.ts +5 -7
  24. package/models/EnrichedTx.ts +6 -9
  25. package/models/ExchangeStats.ts +9 -13
  26. package/models/Funding.ts +8 -12
  27. package/models/Fundings.ts +5 -7
  28. package/models/L1ProviderInfo.ts +8 -12
  29. package/models/Layer1BasicInfo.ts +17 -24
  30. package/models/Layer2BasicInfo.ts +6 -9
  31. package/models/MainAccount.ts +6 -9
  32. package/models/MainAccounts.ts +5 -7
  33. package/models/MarketInfo.ts +22 -33
  34. package/models/MarketSig.ts +8 -12
  35. package/models/NextNonce.ts +2 -3
  36. package/models/Order.ts +32 -48
  37. package/models/OrderBook.ts +20 -30
  38. package/models/OrderBookDepth.ts +8 -11
  39. package/models/OrderBookDetail.ts +36 -54
  40. package/models/OrderBookDetails.ts +3 -4
  41. package/models/OrderBookOrders.ts +10 -14
  42. package/models/OrderBookStats.ts +12 -18
  43. package/models/OrderBooks.ts +3 -4
  44. package/models/Orders.ts +3 -4
  45. package/models/Permission.ts +2 -3
  46. package/models/PnLEntry.ts +4 -6
  47. package/models/PriceLevel.ts +4 -6
  48. package/models/ReqDoFaucet.ts +2 -3
  49. package/models/ReqGetAccount.ts +4 -6
  50. package/models/ReqGetAccountActiveOrders.ts +6 -9
  51. package/models/ReqGetAccountByL1Address.ts +2 -3
  52. package/models/ReqGetAccountInactiveOrders.ts +8 -12
  53. package/models/ReqGetAccountOrders.ts +6 -9
  54. package/models/ReqGetAccountPnL.ts +12 -18
  55. package/models/ReqGetBlock.ts +4 -6
  56. package/models/ReqGetBlockTxs.ts +4 -6
  57. package/models/ReqGetByAccount.ts +4 -6
  58. package/models/ReqGetCandlesticks.ts +10 -15
  59. package/models/ReqGetFundings.ts +10 -15
  60. package/models/ReqGetL1Tx.ts +2 -3
  61. package/models/ReqGetMarketSig.ts +6 -9
  62. package/models/ReqGetNextNonce.ts +4 -6
  63. package/models/ReqGetOrderBookDetails.ts +2 -3
  64. package/models/ReqGetOrderBookOrders.ts +4 -6
  65. package/models/ReqGetOrderBooks.ts +2 -3
  66. package/models/ReqGetPermission.ts +6 -9
  67. package/models/ReqGetRangeWithCursor.ts +2 -3
  68. package/models/ReqGetRangeWithIndex.ts +2 -3
  69. package/models/ReqGetRecentTrades.ts +4 -6
  70. package/models/ReqGetRollbacks.ts +6 -9
  71. package/models/ReqGetSubAccount.ts +6 -9
  72. package/models/ReqGetTrades.ts +8 -12
  73. package/models/ReqGetTx.ts +4 -6
  74. package/models/ReqSearch.ts +2 -3
  75. package/models/ResultCode.ts +2 -3
  76. package/models/Rollback.ts +8 -12
  77. package/models/Rollbacks.ts +5 -7
  78. package/models/Search.ts +2 -3
  79. package/models/SignBody.ts +2 -3
  80. package/models/SimpleOrder.ts +12 -18
  81. package/models/Status.ts +4 -6
  82. package/models/SubAccount.ts +16 -24
  83. package/models/SubAccounts.ts +9 -13
  84. package/models/Trade.ts +24 -36
  85. package/models/Trades.ts +3 -4
  86. package/models/Tx.ts +28 -42
  87. package/models/TxHash.ts +2 -3
  88. package/models/Txs.ts +3 -4
  89. package/models/ValidatorInfo.ts +4 -6
  90. package/openapi.json +185 -921
  91. package/package.json +1 -1
package/models/Tx.ts CHANGED
@@ -24,105 +24,91 @@ 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;
126
112
  return true;
127
113
  }
128
114
 
@@ -136,20 +122,20 @@ export function TxFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tx {
136
122
  }
137
123
  return {
138
124
 
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'],
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'],
153
139
  };
154
140
  }
155
141
 
package/models/TxHash.ts CHANGED
@@ -36,14 +36,13 @@ 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;
47
46
  return true;
48
47
  }
49
48
 
@@ -59,7 +58,7 @@ export function TxHashFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tx
59
58
 
60
59
  'code': json['code'] == null ? undefined : json['code'],
61
60
  'message': json['message'] == null ? undefined : json['message'],
62
- 'txHash': json['tx_hash'],
61
+ 'txHash': json['tx_hash'] == null ? undefined : json['tx_hash'],
63
62
  };
64
63
  }
65
64
 
package/models/Txs.ts CHANGED
@@ -43,14 +43,13 @@ 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;
54
53
  return true;
55
54
  }
56
55
 
@@ -66,7 +65,7 @@ export function TxsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Txs {
66
65
 
67
66
  'code': json['code'] == null ? undefined : json['code'],
68
67
  'message': json['message'] == null ? undefined : json['message'],
69
- 'txs': ((json['txs'] as Array<any>).map(TxFromJSON)),
68
+ 'txs': json['txs'] == null ? undefined : ((json['txs'] as Array<any>).map(TxFromJSON)),
70
69
  };
71
70
  }
72
71
 
@@ -78,7 +77,7 @@ export function TxsToJSON(value?: Txs | null): any {
78
77
 
79
78
  'code': value['code'],
80
79
  'message': value['message'],
81
- 'txs': ((value['txs'] as Array<any>).map(TxToJSON)),
80
+ 'txs': value['txs'] == null ? undefined : ((value['txs'] as Array<any>).map(TxToJSON)),
82
81
  };
83
82
  }
84
83
 
@@ -24,21 +24,19 @@ 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;
42
40
  return true;
43
41
  }
44
42
 
@@ -52,8 +50,8 @@ export function ValidatorInfoFromJSONTyped(json: any, ignoreDiscriminator: boole
52
50
  }
53
51
  return {
54
52
 
55
- 'address': json['address'],
56
- 'isActive': json['is_active'],
53
+ 'address': json['address'] == null ? undefined : json['address'],
54
+ 'isActive': json['is_active'] == null ? undefined : json['is_active'],
57
55
  };
58
56
  }
59
57