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
@@ -24,31 +24,31 @@ export interface ReqGetCandlesticks {
24
24
  * @type {number}
25
25
  * @memberof ReqGetCandlesticks
26
26
  */
27
- marketId: number;
27
+ marketId?: number;
28
28
  /**
29
29
  *
30
30
  * @type {string}
31
31
  * @memberof ReqGetCandlesticks
32
32
  */
33
- resolution: ReqGetCandlesticksResolutionEnum;
33
+ resolution?: ReqGetCandlesticksResolutionEnum;
34
34
  /**
35
35
  *
36
36
  * @type {number}
37
37
  * @memberof ReqGetCandlesticks
38
38
  */
39
- startTimestamp: number;
39
+ startTimestamp?: number;
40
40
  /**
41
41
  *
42
42
  * @type {number}
43
43
  * @memberof ReqGetCandlesticks
44
44
  */
45
- endTimestamp: number;
45
+ endTimestamp?: number;
46
46
  /**
47
47
  *
48
48
  * @type {number}
49
49
  * @memberof ReqGetCandlesticks
50
50
  */
51
- countBack: number;
51
+ countBack?: number;
52
52
  }
53
53
 
54
54
 
@@ -70,11 +70,6 @@ export type ReqGetCandlesticksResolutionEnum = typeof ReqGetCandlesticksResoluti
70
70
  * Check if a given object implements the ReqGetCandlesticks interface.
71
71
  */
72
72
  export function instanceOfReqGetCandlesticks(value: object): value is ReqGetCandlesticks {
73
- if (!('marketId' in value) || value['marketId'] === undefined) return false;
74
- if (!('resolution' in value) || value['resolution'] === undefined) return false;
75
- if (!('startTimestamp' in value) || value['startTimestamp'] === undefined) return false;
76
- if (!('endTimestamp' in value) || value['endTimestamp'] === undefined) return false;
77
- if (!('countBack' in value) || value['countBack'] === undefined) return false;
78
73
  return true;
79
74
  }
80
75
 
@@ -88,11 +83,11 @@ export function ReqGetCandlesticksFromJSONTyped(json: any, ignoreDiscriminator:
88
83
  }
89
84
  return {
90
85
 
91
- 'marketId': json['market_id'],
92
- 'resolution': json['resolution'],
93
- 'startTimestamp': json['start_timestamp'],
94
- 'endTimestamp': json['end_timestamp'],
95
- 'countBack': json['count_back'],
86
+ 'marketId': json['market_id'] == null ? undefined : json['market_id'],
87
+ 'resolution': json['resolution'] == null ? undefined : json['resolution'],
88
+ 'startTimestamp': json['start_timestamp'] == null ? undefined : json['start_timestamp'],
89
+ 'endTimestamp': json['end_timestamp'] == null ? undefined : json['end_timestamp'],
90
+ 'countBack': json['count_back'] == null ? undefined : json['count_back'],
96
91
  };
97
92
  }
98
93
 
@@ -24,31 +24,31 @@ export interface ReqGetFundings {
24
24
  * @type {number}
25
25
  * @memberof ReqGetFundings
26
26
  */
27
- marketId: number;
27
+ marketId?: number;
28
28
  /**
29
29
  *
30
30
  * @type {string}
31
31
  * @memberof ReqGetFundings
32
32
  */
33
- resolution: ReqGetFundingsResolutionEnum;
33
+ resolution?: ReqGetFundingsResolutionEnum;
34
34
  /**
35
35
  *
36
36
  * @type {number}
37
37
  * @memberof ReqGetFundings
38
38
  */
39
- startTimestamp: number;
39
+ startTimestamp?: number;
40
40
  /**
41
41
  *
42
42
  * @type {number}
43
43
  * @memberof ReqGetFundings
44
44
  */
45
- endTimestamp: number;
45
+ endTimestamp?: number;
46
46
  /**
47
47
  *
48
48
  * @type {number}
49
49
  * @memberof ReqGetFundings
50
50
  */
51
- countBack: number;
51
+ countBack?: number;
52
52
  }
53
53
 
54
54
 
@@ -65,11 +65,6 @@ export type ReqGetFundingsResolutionEnum = typeof ReqGetFundingsResolutionEnum[k
65
65
  * Check if a given object implements the ReqGetFundings interface.
66
66
  */
67
67
  export function instanceOfReqGetFundings(value: object): value is ReqGetFundings {
68
- if (!('marketId' in value) || value['marketId'] === undefined) return false;
69
- if (!('resolution' in value) || value['resolution'] === undefined) return false;
70
- if (!('startTimestamp' in value) || value['startTimestamp'] === undefined) return false;
71
- if (!('endTimestamp' in value) || value['endTimestamp'] === undefined) return false;
72
- if (!('countBack' in value) || value['countBack'] === undefined) return false;
73
68
  return true;
74
69
  }
75
70
 
@@ -83,11 +78,11 @@ export function ReqGetFundingsFromJSONTyped(json: any, ignoreDiscriminator: bool
83
78
  }
84
79
  return {
85
80
 
86
- 'marketId': json['market_id'],
87
- 'resolution': json['resolution'],
88
- 'startTimestamp': json['start_timestamp'],
89
- 'endTimestamp': json['end_timestamp'],
90
- 'countBack': json['count_back'],
81
+ 'marketId': json['market_id'] == null ? undefined : json['market_id'],
82
+ 'resolution': json['resolution'] == null ? undefined : json['resolution'],
83
+ 'startTimestamp': json['start_timestamp'] == null ? undefined : json['start_timestamp'],
84
+ 'endTimestamp': json['end_timestamp'] == null ? undefined : json['end_timestamp'],
85
+ 'countBack': json['count_back'] == null ? undefined : json['count_back'],
91
86
  };
92
87
  }
93
88
 
@@ -24,14 +24,13 @@ export interface ReqGetL1Tx {
24
24
  * @type {string}
25
25
  * @memberof ReqGetL1Tx
26
26
  */
27
- hash: string;
27
+ hash?: string;
28
28
  }
29
29
 
30
30
  /**
31
31
  * Check if a given object implements the ReqGetL1Tx interface.
32
32
  */
33
33
  export function instanceOfReqGetL1Tx(value: object): value is ReqGetL1Tx {
34
- if (!('hash' in value) || value['hash'] === undefined) return false;
35
34
  return true;
36
35
  }
37
36
 
@@ -45,7 +44,7 @@ export function ReqGetL1TxFromJSONTyped(json: any, ignoreDiscriminator: boolean)
45
44
  }
46
45
  return {
47
46
 
48
- 'hash': json['hash'],
47
+ 'hash': json['hash'] == null ? undefined : json['hash'],
49
48
  };
50
49
  }
51
50
 
@@ -24,28 +24,25 @@ export interface ReqGetMarketSig {
24
24
  * @type {number}
25
25
  * @memberof ReqGetMarketSig
26
26
  */
27
- marketId: number;
27
+ marketId?: number;
28
28
  /**
29
29
  *
30
30
  * @type {boolean}
31
31
  * @memberof ReqGetMarketSig
32
32
  */
33
- isAsk: boolean;
33
+ isAsk?: boolean;
34
34
  /**
35
35
  *
36
36
  * @type {number}
37
37
  * @memberof ReqGetMarketSig
38
38
  */
39
- baseAmount: number;
39
+ baseAmount?: number;
40
40
  }
41
41
 
42
42
  /**
43
43
  * Check if a given object implements the ReqGetMarketSig interface.
44
44
  */
45
45
  export function instanceOfReqGetMarketSig(value: object): value is ReqGetMarketSig {
46
- if (!('marketId' in value) || value['marketId'] === undefined) return false;
47
- if (!('isAsk' in value) || value['isAsk'] === undefined) return false;
48
- if (!('baseAmount' in value) || value['baseAmount'] === undefined) return false;
49
46
  return true;
50
47
  }
51
48
 
@@ -59,9 +56,9 @@ export function ReqGetMarketSigFromJSONTyped(json: any, ignoreDiscriminator: boo
59
56
  }
60
57
  return {
61
58
 
62
- 'marketId': json['market_id'],
63
- 'isAsk': json['is_ask'],
64
- 'baseAmount': json['base_amount'],
59
+ 'marketId': json['market_id'] == null ? undefined : json['market_id'],
60
+ 'isAsk': json['is_ask'] == null ? undefined : json['is_ask'],
61
+ 'baseAmount': json['base_amount'] == null ? undefined : json['base_amount'],
65
62
  };
66
63
  }
67
64
 
@@ -24,21 +24,19 @@ export interface ReqGetNextNonce {
24
24
  * @type {number}
25
25
  * @memberof ReqGetNextNonce
26
26
  */
27
- accountIndex: number;
27
+ accountIndex?: number;
28
28
  /**
29
29
  *
30
30
  * @type {number}
31
31
  * @memberof ReqGetNextNonce
32
32
  */
33
- subAccountIndex: number;
33
+ subAccountIndex?: number;
34
34
  }
35
35
 
36
36
  /**
37
37
  * Check if a given object implements the ReqGetNextNonce interface.
38
38
  */
39
39
  export function instanceOfReqGetNextNonce(value: object): value is ReqGetNextNonce {
40
- if (!('accountIndex' in value) || value['accountIndex'] === undefined) return false;
41
- if (!('subAccountIndex' in value) || value['subAccountIndex'] === undefined) return false;
42
40
  return true;
43
41
  }
44
42
 
@@ -52,8 +50,8 @@ export function ReqGetNextNonceFromJSONTyped(json: any, ignoreDiscriminator: boo
52
50
  }
53
51
  return {
54
52
 
55
- 'accountIndex': json['account_index'],
56
- 'subAccountIndex': json['sub_account_index'],
53
+ 'accountIndex': json['account_index'] == null ? undefined : json['account_index'],
54
+ 'subAccountIndex': json['sub_account_index'] == null ? undefined : json['sub_account_index'],
57
55
  };
58
56
  }
59
57
 
@@ -24,7 +24,7 @@ export interface ReqGetOrderBookDetails {
24
24
  * @type {string}
25
25
  * @memberof ReqGetOrderBookDetails
26
26
  */
27
- filter: ReqGetOrderBookDetailsFilterEnum;
27
+ filter?: ReqGetOrderBookDetailsFilterEnum;
28
28
  /**
29
29
  *
30
30
  * @type {number}
@@ -48,7 +48,6 @@ export type ReqGetOrderBookDetailsFilterEnum = typeof ReqGetOrderBookDetailsFilt
48
48
  * Check if a given object implements the ReqGetOrderBookDetails interface.
49
49
  */
50
50
  export function instanceOfReqGetOrderBookDetails(value: object): value is ReqGetOrderBookDetails {
51
- if (!('filter' in value) || value['filter'] === undefined) return false;
52
51
  return true;
53
52
  }
54
53
 
@@ -62,7 +61,7 @@ export function ReqGetOrderBookDetailsFromJSONTyped(json: any, ignoreDiscriminat
62
61
  }
63
62
  return {
64
63
 
65
- 'filter': json['filter'],
64
+ 'filter': json['filter'] == null ? undefined : json['filter'],
66
65
  'marketId': json['market_id'] == null ? undefined : json['market_id'],
67
66
  };
68
67
  }
@@ -24,21 +24,19 @@ export interface ReqGetOrderBookOrders {
24
24
  * @type {number}
25
25
  * @memberof ReqGetOrderBookOrders
26
26
  */
27
- marketId: number;
27
+ marketId?: number;
28
28
  /**
29
29
  *
30
30
  * @type {number}
31
31
  * @memberof ReqGetOrderBookOrders
32
32
  */
33
- limit: number;
33
+ limit?: number;
34
34
  }
35
35
 
36
36
  /**
37
37
  * Check if a given object implements the ReqGetOrderBookOrders interface.
38
38
  */
39
39
  export function instanceOfReqGetOrderBookOrders(value: object): value is ReqGetOrderBookOrders {
40
- if (!('marketId' in value) || value['marketId'] === undefined) return false;
41
- if (!('limit' in value) || value['limit'] === undefined) return false;
42
40
  return true;
43
41
  }
44
42
 
@@ -52,8 +50,8 @@ export function ReqGetOrderBookOrdersFromJSONTyped(json: any, ignoreDiscriminato
52
50
  }
53
51
  return {
54
52
 
55
- 'marketId': json['market_id'],
56
- 'limit': json['limit'],
53
+ 'marketId': json['market_id'] == null ? undefined : json['market_id'],
54
+ 'limit': json['limit'] == null ? undefined : json['limit'],
57
55
  };
58
56
  }
59
57
 
@@ -24,7 +24,7 @@ export interface ReqGetOrderBooks {
24
24
  * @type {string}
25
25
  * @memberof ReqGetOrderBooks
26
26
  */
27
- filter: ReqGetOrderBooksFilterEnum;
27
+ filter?: ReqGetOrderBooksFilterEnum;
28
28
  /**
29
29
  *
30
30
  * @type {number}
@@ -48,7 +48,6 @@ export type ReqGetOrderBooksFilterEnum = typeof ReqGetOrderBooksFilterEnum[keyof
48
48
  * Check if a given object implements the ReqGetOrderBooks interface.
49
49
  */
50
50
  export function instanceOfReqGetOrderBooks(value: object): value is ReqGetOrderBooks {
51
- if (!('filter' in value) || value['filter'] === undefined) return false;
52
51
  return true;
53
52
  }
54
53
 
@@ -62,7 +61,7 @@ export function ReqGetOrderBooksFromJSONTyped(json: any, ignoreDiscriminator: bo
62
61
  }
63
62
  return {
64
63
 
65
- 'filter': json['filter'],
64
+ 'filter': json['filter'] == null ? undefined : json['filter'],
66
65
  'marketId': json['market_id'] == null ? undefined : json['market_id'],
67
66
  };
68
67
  }
@@ -24,19 +24,19 @@ export interface ReqGetPermission {
24
24
  * @type {string}
25
25
  * @memberof ReqGetPermission
26
26
  */
27
- by: ReqGetPermissionByEnum;
27
+ by?: ReqGetPermissionByEnum;
28
28
  /**
29
29
  *
30
30
  * @type {string}
31
31
  * @memberof ReqGetPermission
32
32
  */
33
- value: string;
33
+ value?: string;
34
34
  /**
35
35
  *
36
36
  * @type {number}
37
37
  * @memberof ReqGetPermission
38
38
  */
39
- txType: number;
39
+ txType?: number;
40
40
  }
41
41
 
42
42
 
@@ -54,9 +54,6 @@ export type ReqGetPermissionByEnum = typeof ReqGetPermissionByEnum[keyof typeof
54
54
  * Check if a given object implements the ReqGetPermission interface.
55
55
  */
56
56
  export function instanceOfReqGetPermission(value: object): value is ReqGetPermission {
57
- if (!('by' in value) || value['by'] === undefined) return false;
58
- if (!('value' in value) || value['value'] === undefined) return false;
59
- if (!('txType' in value) || value['txType'] === undefined) return false;
60
57
  return true;
61
58
  }
62
59
 
@@ -70,9 +67,9 @@ export function ReqGetPermissionFromJSONTyped(json: any, ignoreDiscriminator: bo
70
67
  }
71
68
  return {
72
69
 
73
- 'by': json['by'],
74
- 'value': json['value'],
75
- 'txType': json['tx_type'],
70
+ 'by': json['by'] == null ? undefined : json['by'],
71
+ 'value': json['value'] == null ? undefined : json['value'],
72
+ 'txType': json['tx_type'] == null ? undefined : json['tx_type'],
76
73
  };
77
74
  }
78
75
 
@@ -30,14 +30,13 @@ export interface ReqGetRangeWithCursor {
30
30
  * @type {number}
31
31
  * @memberof ReqGetRangeWithCursor
32
32
  */
33
- limit: number;
33
+ limit?: number;
34
34
  }
35
35
 
36
36
  /**
37
37
  * Check if a given object implements the ReqGetRangeWithCursor interface.
38
38
  */
39
39
  export function instanceOfReqGetRangeWithCursor(value: object): value is ReqGetRangeWithCursor {
40
- if (!('limit' in value) || value['limit'] === undefined) return false;
41
40
  return true;
42
41
  }
43
42
 
@@ -52,7 +51,7 @@ export function ReqGetRangeWithCursorFromJSONTyped(json: any, ignoreDiscriminato
52
51
  return {
53
52
 
54
53
  'cursor': json['cursor'] == null ? undefined : json['cursor'],
55
- 'limit': json['limit'],
54
+ 'limit': json['limit'] == null ? undefined : json['limit'],
56
55
  };
57
56
  }
58
57
 
@@ -30,14 +30,13 @@ export interface ReqGetRangeWithIndex {
30
30
  * @type {number}
31
31
  * @memberof ReqGetRangeWithIndex
32
32
  */
33
- limit: number;
33
+ limit?: number;
34
34
  }
35
35
 
36
36
  /**
37
37
  * Check if a given object implements the ReqGetRangeWithIndex interface.
38
38
  */
39
39
  export function instanceOfReqGetRangeWithIndex(value: object): value is ReqGetRangeWithIndex {
40
- if (!('limit' in value) || value['limit'] === undefined) return false;
41
40
  return true;
42
41
  }
43
42
 
@@ -52,7 +51,7 @@ export function ReqGetRangeWithIndexFromJSONTyped(json: any, ignoreDiscriminator
52
51
  return {
53
52
 
54
53
  'index': json['index'] == null ? undefined : json['index'],
55
- 'limit': json['limit'],
54
+ 'limit': json['limit'] == null ? undefined : json['limit'],
56
55
  };
57
56
  }
58
57
 
@@ -24,21 +24,19 @@ export interface ReqGetRecentTrades {
24
24
  * @type {number}
25
25
  * @memberof ReqGetRecentTrades
26
26
  */
27
- marketId: number;
27
+ marketId?: number;
28
28
  /**
29
29
  *
30
30
  * @type {number}
31
31
  * @memberof ReqGetRecentTrades
32
32
  */
33
- limit: number;
33
+ limit?: number;
34
34
  }
35
35
 
36
36
  /**
37
37
  * Check if a given object implements the ReqGetRecentTrades interface.
38
38
  */
39
39
  export function instanceOfReqGetRecentTrades(value: object): value is ReqGetRecentTrades {
40
- if (!('marketId' in value) || value['marketId'] === undefined) return false;
41
- if (!('limit' in value) || value['limit'] === undefined) return false;
42
40
  return true;
43
41
  }
44
42
 
@@ -52,8 +50,8 @@ export function ReqGetRecentTradesFromJSONTyped(json: any, ignoreDiscriminator:
52
50
  }
53
51
  return {
54
52
 
55
- 'marketId': json['market_id'],
56
- 'limit': json['limit'],
53
+ 'marketId': json['market_id'] == null ? undefined : json['market_id'],
54
+ 'limit': json['limit'] == null ? undefined : json['limit'],
57
55
  };
58
56
  }
59
57
 
@@ -24,28 +24,25 @@ export interface ReqGetRollbacks {
24
24
  * @type {number}
25
25
  * @memberof ReqGetRollbacks
26
26
  */
27
- fromBlockHeight: number;
27
+ fromBlockHeight?: number;
28
28
  /**
29
29
  *
30
30
  * @type {number}
31
31
  * @memberof ReqGetRollbacks
32
32
  */
33
- offset: number;
33
+ offset?: number;
34
34
  /**
35
35
  *
36
36
  * @type {number}
37
37
  * @memberof ReqGetRollbacks
38
38
  */
39
- limit: number;
39
+ limit?: number;
40
40
  }
41
41
 
42
42
  /**
43
43
  * Check if a given object implements the ReqGetRollbacks interface.
44
44
  */
45
45
  export function instanceOfReqGetRollbacks(value: object): value is ReqGetRollbacks {
46
- if (!('fromBlockHeight' in value) || value['fromBlockHeight'] === undefined) return false;
47
- if (!('offset' in value) || value['offset'] === undefined) return false;
48
- if (!('limit' in value) || value['limit'] === undefined) return false;
49
46
  return true;
50
47
  }
51
48
 
@@ -59,9 +56,9 @@ export function ReqGetRollbacksFromJSONTyped(json: any, ignoreDiscriminator: boo
59
56
  }
60
57
  return {
61
58
 
62
- 'fromBlockHeight': json['from_block_height'],
63
- 'offset': json['offset'],
64
- 'limit': json['limit'],
59
+ 'fromBlockHeight': json['from_block_height'] == null ? undefined : json['from_block_height'],
60
+ 'offset': json['offset'] == null ? undefined : json['offset'],
61
+ 'limit': json['limit'] == null ? undefined : json['limit'],
65
62
  };
66
63
  }
67
64
 
@@ -24,19 +24,19 @@ export interface ReqGetSubAccount {
24
24
  * @type {string}
25
25
  * @memberof ReqGetSubAccount
26
26
  */
27
- by: ReqGetSubAccountByEnum;
27
+ by?: ReqGetSubAccountByEnum;
28
28
  /**
29
29
  *
30
30
  * @type {string}
31
31
  * @memberof ReqGetSubAccount
32
32
  */
33
- value: string;
33
+ value?: string;
34
34
  /**
35
35
  * NilSubAccountIndex
36
36
  * @type {number}
37
37
  * @memberof ReqGetSubAccount
38
38
  */
39
- subAccountIndex: number;
39
+ subAccountIndex?: number;
40
40
  }
41
41
 
42
42
 
@@ -54,9 +54,6 @@ export type ReqGetSubAccountByEnum = typeof ReqGetSubAccountByEnum[keyof typeof
54
54
  * Check if a given object implements the ReqGetSubAccount interface.
55
55
  */
56
56
  export function instanceOfReqGetSubAccount(value: object): value is ReqGetSubAccount {
57
- if (!('by' in value) || value['by'] === undefined) return false;
58
- if (!('value' in value) || value['value'] === undefined) return false;
59
- if (!('subAccountIndex' in value) || value['subAccountIndex'] === undefined) return false;
60
57
  return true;
61
58
  }
62
59
 
@@ -70,9 +67,9 @@ export function ReqGetSubAccountFromJSONTyped(json: any, ignoreDiscriminator: bo
70
67
  }
71
68
  return {
72
69
 
73
- 'by': json['by'],
74
- 'value': json['value'],
75
- 'subAccountIndex': json['sub_account_index'],
70
+ 'by': json['by'] == null ? undefined : json['by'],
71
+ 'value': json['value'] == null ? undefined : json['value'],
72
+ 'subAccountIndex': json['sub_account_index'] == null ? undefined : json['sub_account_index'],
76
73
  };
77
74
  }
78
75
 
@@ -24,7 +24,7 @@ export interface ReqGetTrades {
24
24
  * @type {number}
25
25
  * @memberof ReqGetTrades
26
26
  */
27
- marketId: number;
27
+ marketId?: number;
28
28
  /**
29
29
  *
30
30
  * @type {number}
@@ -36,19 +36,19 @@ export interface ReqGetTrades {
36
36
  * @type {string}
37
37
  * @memberof ReqGetTrades
38
38
  */
39
- by: ReqGetTradesByEnum;
39
+ by?: ReqGetTradesByEnum;
40
40
  /**
41
41
  *
42
42
  * @type {number}
43
43
  * @memberof ReqGetTrades
44
44
  */
45
- from: number;
45
+ from?: number;
46
46
  /**
47
47
  *
48
48
  * @type {number}
49
49
  * @memberof ReqGetTrades
50
50
  */
51
- limit: number;
51
+ limit?: number;
52
52
  }
53
53
 
54
54
 
@@ -67,10 +67,6 @@ export type ReqGetTradesByEnum = typeof ReqGetTradesByEnum[keyof typeof ReqGetTr
67
67
  * Check if a given object implements the ReqGetTrades interface.
68
68
  */
69
69
  export function instanceOfReqGetTrades(value: object): value is ReqGetTrades {
70
- if (!('marketId' in value) || value['marketId'] === undefined) return false;
71
- if (!('by' in value) || value['by'] === undefined) return false;
72
- if (!('from' in value) || value['from'] === undefined) return false;
73
- if (!('limit' in value) || value['limit'] === undefined) return false;
74
70
  return true;
75
71
  }
76
72
 
@@ -84,11 +80,11 @@ export function ReqGetTradesFromJSONTyped(json: any, ignoreDiscriminator: boolea
84
80
  }
85
81
  return {
86
82
 
87
- 'marketId': json['market_id'],
83
+ 'marketId': json['market_id'] == null ? undefined : json['market_id'],
88
84
  'orderIndex': json['order_index'] == null ? undefined : json['order_index'],
89
- 'by': json['by'],
90
- 'from': json['from'],
91
- 'limit': json['limit'],
85
+ 'by': json['by'] == null ? undefined : json['by'],
86
+ 'from': json['from'] == null ? undefined : json['from'],
87
+ 'limit': json['limit'] == null ? undefined : json['limit'],
92
88
  };
93
89
  }
94
90
 
@@ -24,13 +24,13 @@ export interface ReqGetTx {
24
24
  * @type {string}
25
25
  * @memberof ReqGetTx
26
26
  */
27
- by: ReqGetTxByEnum;
27
+ by?: ReqGetTxByEnum;
28
28
  /**
29
29
  *
30
30
  * @type {string}
31
31
  * @memberof ReqGetTx
32
32
  */
33
- value: string;
33
+ value?: string;
34
34
  }
35
35
 
36
36
 
@@ -48,8 +48,6 @@ export type ReqGetTxByEnum = typeof ReqGetTxByEnum[keyof typeof ReqGetTxByEnum];
48
48
  * Check if a given object implements the ReqGetTx interface.
49
49
  */
50
50
  export function instanceOfReqGetTx(value: object): value is ReqGetTx {
51
- if (!('by' in value) || value['by'] === undefined) return false;
52
- if (!('value' in value) || value['value'] === undefined) return false;
53
51
  return true;
54
52
  }
55
53
 
@@ -63,8 +61,8 @@ export function ReqGetTxFromJSONTyped(json: any, ignoreDiscriminator: boolean):
63
61
  }
64
62
  return {
65
63
 
66
- 'by': json['by'],
67
- 'value': json['value'],
64
+ 'by': json['by'] == null ? undefined : json['by'],
65
+ 'value': json['value'] == null ? undefined : json['value'],
68
66
  };
69
67
  }
70
68
 
@@ -24,14 +24,13 @@ export interface ReqSearch {
24
24
  * @type {string}
25
25
  * @memberof ReqSearch
26
26
  */
27
- keyword: string;
27
+ keyword?: string;
28
28
  }
29
29
 
30
30
  /**
31
31
  * Check if a given object implements the ReqSearch interface.
32
32
  */
33
33
  export function instanceOfReqSearch(value: object): value is ReqSearch {
34
- if (!('keyword' in value) || value['keyword'] === undefined) return false;
35
34
  return true;
36
35
  }
37
36
 
@@ -45,7 +44,7 @@ export function ReqSearchFromJSONTyped(json: any, ignoreDiscriminator: boolean):
45
44
  }
46
45
  return {
47
46
 
48
- 'keyword': json['keyword'],
47
+ 'keyword': json['keyword'] == null ? undefined : json['keyword'],
49
48
  };
50
49
  }
51
50