zklighter-perps 1.0.3 → 1.0.4

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 (81) hide show
  1. package/apis/TransactionApi.ts +34 -6
  2. package/models/AccountMarketStats.ts +18 -12
  3. package/models/AccountPnL.ts +7 -5
  4. package/models/AccountPosition.ts +33 -22
  5. package/models/AccountStats.ts +15 -10
  6. package/models/Block.ts +40 -27
  7. package/models/Blocks.ts +7 -5
  8. package/models/Candlestick.ts +21 -14
  9. package/models/Candlesticks.ts +7 -5
  10. package/models/ContractAddress.ts +6 -4
  11. package/models/CurrentHeight.ts +3 -2
  12. package/models/DetailedAccount.ts +11 -8
  13. package/models/DetailedAccounts.ts +7 -5
  14. package/models/EnrichedTx.ts +9 -6
  15. package/models/ExchangeStats.ts +13 -9
  16. package/models/Funding.ts +12 -8
  17. package/models/Fundings.ts +7 -5
  18. package/models/L1ProviderInfo.ts +12 -8
  19. package/models/Layer1BasicInfo.ts +24 -17
  20. package/models/Layer2BasicInfo.ts +9 -6
  21. package/models/MainAccount.ts +9 -6
  22. package/models/MainAccounts.ts +7 -5
  23. package/models/MarketInfo.ts +33 -22
  24. package/models/MarketSig.ts +12 -8
  25. package/models/NextNonce.ts +3 -2
  26. package/models/Order.ts +48 -32
  27. package/models/OrderBook.ts +30 -20
  28. package/models/OrderBookDepth.ts +11 -8
  29. package/models/OrderBookDetail.ts +54 -36
  30. package/models/OrderBookDetails.ts +4 -3
  31. package/models/OrderBookOrders.ts +14 -10
  32. package/models/OrderBookStats.ts +18 -12
  33. package/models/OrderBooks.ts +4 -3
  34. package/models/Orders.ts +4 -3
  35. package/models/Permission.ts +3 -2
  36. package/models/PnLEntry.ts +6 -4
  37. package/models/PriceLevel.ts +6 -4
  38. package/models/ReqDoFaucet.ts +3 -2
  39. package/models/ReqGetAccount.ts +6 -4
  40. package/models/ReqGetAccountActiveOrders.ts +9 -6
  41. package/models/ReqGetAccountByL1Address.ts +3 -2
  42. package/models/ReqGetAccountInactiveOrders.ts +12 -8
  43. package/models/ReqGetAccountOrders.ts +9 -6
  44. package/models/ReqGetAccountPnL.ts +18 -12
  45. package/models/ReqGetBlock.ts +6 -4
  46. package/models/ReqGetBlockTxs.ts +6 -4
  47. package/models/ReqGetByAccount.ts +6 -4
  48. package/models/ReqGetCandlesticks.ts +15 -10
  49. package/models/ReqGetFundings.ts +15 -10
  50. package/models/ReqGetL1Tx.ts +3 -2
  51. package/models/ReqGetMarketSig.ts +9 -6
  52. package/models/ReqGetNextNonce.ts +6 -4
  53. package/models/ReqGetOrderBookDetails.ts +3 -2
  54. package/models/ReqGetOrderBookOrders.ts +6 -4
  55. package/models/ReqGetOrderBooks.ts +3 -2
  56. package/models/ReqGetPermission.ts +9 -6
  57. package/models/ReqGetRangeWithCursor.ts +3 -2
  58. package/models/ReqGetRangeWithIndex.ts +3 -2
  59. package/models/ReqGetRecentTrades.ts +6 -4
  60. package/models/ReqGetRollbacks.ts +9 -6
  61. package/models/ReqGetSubAccount.ts +9 -6
  62. package/models/ReqGetTrades.ts +12 -8
  63. package/models/ReqGetTx.ts +6 -4
  64. package/models/ReqSearch.ts +3 -2
  65. package/models/ResultCode.ts +3 -2
  66. package/models/Rollback.ts +12 -8
  67. package/models/Rollbacks.ts +7 -5
  68. package/models/Search.ts +3 -2
  69. package/models/SignBody.ts +3 -2
  70. package/models/SimpleOrder.ts +18 -12
  71. package/models/Status.ts +6 -4
  72. package/models/SubAccount.ts +24 -16
  73. package/models/SubAccounts.ts +13 -9
  74. package/models/Trade.ts +36 -24
  75. package/models/Trades.ts +4 -3
  76. package/models/Tx.ts +42 -28
  77. package/models/TxHash.ts +3 -2
  78. package/models/Txs.ts +4 -3
  79. package/models/ValidatorInfo.ts +6 -4
  80. package/openapi.json +536 -80
  81. package/package.json +1 -1
@@ -24,19 +24,19 @@ export interface ReqGetAccountInactiveOrders {
24
24
  * @type {number}
25
25
  * @memberof ReqGetAccountInactiveOrders
26
26
  */
27
- accountIndex?: number;
27
+ accountIndex: number;
28
28
  /**
29
29
  * NilSubAccountIndex
30
30
  * @type {number}
31
31
  * @memberof ReqGetAccountInactiveOrders
32
32
  */
33
- subAccountIndex?: number;
33
+ subAccountIndex: number;
34
34
  /**
35
35
  *
36
36
  * @type {string}
37
37
  * @memberof ReqGetAccountInactiveOrders
38
38
  */
39
- filter?: ReqGetAccountInactiveOrdersFilterEnum;
39
+ filter: ReqGetAccountInactiveOrdersFilterEnum;
40
40
  /**
41
41
  *
42
42
  * @type {number}
@@ -54,7 +54,7 @@ export interface ReqGetAccountInactiveOrders {
54
54
  * @type {number}
55
55
  * @memberof ReqGetAccountInactiveOrders
56
56
  */
57
- limit?: number;
57
+ limit: number;
58
58
  }
59
59
 
60
60
 
@@ -72,6 +72,10 @@ export type ReqGetAccountInactiveOrdersFilterEnum = typeof ReqGetAccountInactive
72
72
  * Check if a given object implements the ReqGetAccountInactiveOrders interface.
73
73
  */
74
74
  export function instanceOfReqGetAccountInactiveOrders(value: object): value is ReqGetAccountInactiveOrders {
75
+ if (!('accountIndex' in value) || value['accountIndex'] === undefined) return false;
76
+ if (!('subAccountIndex' in value) || value['subAccountIndex'] === undefined) return false;
77
+ if (!('filter' in value) || value['filter'] === undefined) return false;
78
+ if (!('limit' in value) || value['limit'] === undefined) return false;
75
79
  return true;
76
80
  }
77
81
 
@@ -85,12 +89,12 @@ export function ReqGetAccountInactiveOrdersFromJSONTyped(json: any, ignoreDiscri
85
89
  }
86
90
  return {
87
91
 
88
- 'accountIndex': json['account_index'] == null ? undefined : json['account_index'],
89
- 'subAccountIndex': json['sub_account_index'] == null ? undefined : json['sub_account_index'],
90
- 'filter': json['filter'] == null ? undefined : json['filter'],
92
+ 'accountIndex': json['account_index'],
93
+ 'subAccountIndex': json['sub_account_index'],
94
+ 'filter': json['filter'],
91
95
  'marketId': json['market_id'] == null ? undefined : json['market_id'],
92
96
  'cursor': json['cursor'] == null ? undefined : json['cursor'],
93
- 'limit': json['limit'] == null ? undefined : json['limit'],
97
+ 'limit': json['limit'],
94
98
  };
95
99
  }
96
100
 
@@ -24,13 +24,13 @@ export interface ReqGetAccountOrders {
24
24
  * @type {number}
25
25
  * @memberof ReqGetAccountOrders
26
26
  */
27
- accountIndex?: number;
27
+ accountIndex: number;
28
28
  /**
29
29
  *
30
30
  * @type {number}
31
31
  * @memberof ReqGetAccountOrders
32
32
  */
33
- marketId?: number;
33
+ marketId: number;
34
34
  /**
35
35
  *
36
36
  * @type {string}
@@ -42,13 +42,16 @@ export interface ReqGetAccountOrders {
42
42
  * @type {number}
43
43
  * @memberof ReqGetAccountOrders
44
44
  */
45
- limit?: number;
45
+ limit: number;
46
46
  }
47
47
 
48
48
  /**
49
49
  * Check if a given object implements the ReqGetAccountOrders interface.
50
50
  */
51
51
  export function instanceOfReqGetAccountOrders(value: object): value is ReqGetAccountOrders {
52
+ if (!('accountIndex' in value) || value['accountIndex'] === undefined) return false;
53
+ if (!('marketId' in value) || value['marketId'] === undefined) return false;
54
+ if (!('limit' in value) || value['limit'] === undefined) return false;
52
55
  return true;
53
56
  }
54
57
 
@@ -62,10 +65,10 @@ export function ReqGetAccountOrdersFromJSONTyped(json: any, ignoreDiscriminator:
62
65
  }
63
66
  return {
64
67
 
65
- 'accountIndex': json['account_index'] == null ? undefined : json['account_index'],
66
- 'marketId': json['market_id'] == null ? undefined : json['market_id'],
68
+ 'accountIndex': json['account_index'],
69
+ 'marketId': json['market_id'],
67
70
  'cursor': json['cursor'] == null ? undefined : json['cursor'],
68
- 'limit': json['limit'] == null ? undefined : json['limit'],
71
+ 'limit': json['limit'],
69
72
  };
70
73
  }
71
74
 
@@ -24,37 +24,37 @@ export interface ReqGetAccountPnL {
24
24
  * @type {string}
25
25
  * @memberof ReqGetAccountPnL
26
26
  */
27
- by?: ReqGetAccountPnLByEnum;
27
+ by: ReqGetAccountPnLByEnum;
28
28
  /**
29
29
  *
30
30
  * @type {string}
31
31
  * @memberof ReqGetAccountPnL
32
32
  */
33
- value?: string;
33
+ value: string;
34
34
  /**
35
35
  *
36
36
  * @type {string}
37
37
  * @memberof ReqGetAccountPnL
38
38
  */
39
- resolution?: ReqGetAccountPnLResolutionEnum;
39
+ resolution: ReqGetAccountPnLResolutionEnum;
40
40
  /**
41
41
  *
42
42
  * @type {number}
43
43
  * @memberof ReqGetAccountPnL
44
44
  */
45
- startTimestamp?: number;
45
+ startTimestamp: number;
46
46
  /**
47
47
  *
48
48
  * @type {number}
49
49
  * @memberof ReqGetAccountPnL
50
50
  */
51
- endTimestamp?: number;
51
+ endTimestamp: number;
52
52
  /**
53
53
  *
54
54
  * @type {number}
55
55
  * @memberof ReqGetAccountPnL
56
56
  */
57
- countBack?: number;
57
+ countBack: number;
58
58
  }
59
59
 
60
60
 
@@ -85,6 +85,12 @@ export type ReqGetAccountPnLResolutionEnum = typeof ReqGetAccountPnLResolutionEn
85
85
  * Check if a given object implements the ReqGetAccountPnL interface.
86
86
  */
87
87
  export function instanceOfReqGetAccountPnL(value: object): value is ReqGetAccountPnL {
88
+ if (!('by' in value) || value['by'] === undefined) return false;
89
+ if (!('value' in value) || value['value'] === undefined) return false;
90
+ if (!('resolution' in value) || value['resolution'] === undefined) return false;
91
+ if (!('startTimestamp' in value) || value['startTimestamp'] === undefined) return false;
92
+ if (!('endTimestamp' in value) || value['endTimestamp'] === undefined) return false;
93
+ if (!('countBack' in value) || value['countBack'] === undefined) return false;
88
94
  return true;
89
95
  }
90
96
 
@@ -98,12 +104,12 @@ export function ReqGetAccountPnLFromJSONTyped(json: any, ignoreDiscriminator: bo
98
104
  }
99
105
  return {
100
106
 
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
+ 'by': json['by'],
108
+ 'value': json['value'],
109
+ 'resolution': json['resolution'],
110
+ 'startTimestamp': json['start_timestamp'],
111
+ 'endTimestamp': json['end_timestamp'],
112
+ 'countBack': json['count_back'],
107
113
  };
108
114
  }
109
115
 
@@ -24,13 +24,13 @@ export interface ReqGetBlock {
24
24
  * @type {string}
25
25
  * @memberof ReqGetBlock
26
26
  */
27
- by?: ReqGetBlockByEnum;
27
+ by: ReqGetBlockByEnum;
28
28
  /**
29
29
  *
30
30
  * @type {string}
31
31
  * @memberof ReqGetBlock
32
32
  */
33
- value?: string;
33
+ value: string;
34
34
  }
35
35
 
36
36
 
@@ -48,6 +48,8 @@ export type ReqGetBlockByEnum = typeof ReqGetBlockByEnum[keyof typeof ReqGetBloc
48
48
  * Check if a given object implements the ReqGetBlock interface.
49
49
  */
50
50
  export function instanceOfReqGetBlock(value: object): value is ReqGetBlock {
51
+ if (!('by' in value) || value['by'] === undefined) return false;
52
+ if (!('value' in value) || value['value'] === undefined) return false;
51
53
  return true;
52
54
  }
53
55
 
@@ -61,8 +63,8 @@ export function ReqGetBlockFromJSONTyped(json: any, ignoreDiscriminator: boolean
61
63
  }
62
64
  return {
63
65
 
64
- 'by': json['by'] == null ? undefined : json['by'],
65
- 'value': json['value'] == null ? undefined : json['value'],
66
+ 'by': json['by'],
67
+ 'value': json['value'],
66
68
  };
67
69
  }
68
70
 
@@ -24,13 +24,13 @@ export interface ReqGetBlockTxs {
24
24
  * @type {string}
25
25
  * @memberof ReqGetBlockTxs
26
26
  */
27
- by?: ReqGetBlockTxsByEnum;
27
+ by: ReqGetBlockTxsByEnum;
28
28
  /**
29
29
  *
30
30
  * @type {string}
31
31
  * @memberof ReqGetBlockTxs
32
32
  */
33
- value?: string;
33
+ value: string;
34
34
  }
35
35
 
36
36
 
@@ -48,6 +48,8 @@ export type ReqGetBlockTxsByEnum = typeof ReqGetBlockTxsByEnum[keyof typeof ReqG
48
48
  * Check if a given object implements the ReqGetBlockTxs interface.
49
49
  */
50
50
  export function instanceOfReqGetBlockTxs(value: object): value is ReqGetBlockTxs {
51
+ if (!('by' in value) || value['by'] === undefined) return false;
52
+ if (!('value' in value) || value['value'] === undefined) return false;
51
53
  return true;
52
54
  }
53
55
 
@@ -61,8 +63,8 @@ export function ReqGetBlockTxsFromJSONTyped(json: any, ignoreDiscriminator: bool
61
63
  }
62
64
  return {
63
65
 
64
- 'by': json['by'] == null ? undefined : json['by'],
65
- 'value': json['value'] == null ? undefined : json['value'],
66
+ 'by': json['by'],
67
+ 'value': json['value'],
66
68
  };
67
69
  }
68
70
 
@@ -24,13 +24,13 @@ export interface ReqGetByAccount {
24
24
  * @type {string}
25
25
  * @memberof ReqGetByAccount
26
26
  */
27
- by?: ReqGetByAccountByEnum;
27
+ by: ReqGetByAccountByEnum;
28
28
  /**
29
29
  *
30
30
  * @type {string}
31
31
  * @memberof ReqGetByAccount
32
32
  */
33
- value?: string;
33
+ value: string;
34
34
  }
35
35
 
36
36
 
@@ -48,6 +48,8 @@ export type ReqGetByAccountByEnum = typeof ReqGetByAccountByEnum[keyof typeof Re
48
48
  * Check if a given object implements the ReqGetByAccount interface.
49
49
  */
50
50
  export function instanceOfReqGetByAccount(value: object): value is ReqGetByAccount {
51
+ if (!('by' in value) || value['by'] === undefined) return false;
52
+ if (!('value' in value) || value['value'] === undefined) return false;
51
53
  return true;
52
54
  }
53
55
 
@@ -61,8 +63,8 @@ export function ReqGetByAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
61
63
  }
62
64
  return {
63
65
 
64
- 'by': json['by'] == null ? undefined : json['by'],
65
- 'value': json['value'] == null ? undefined : json['value'],
66
+ 'by': json['by'],
67
+ 'value': json['value'],
66
68
  };
67
69
  }
68
70
 
@@ -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,6 +70,11 @@ 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;
73
78
  return true;
74
79
  }
75
80
 
@@ -83,11 +88,11 @@ export function ReqGetCandlesticksFromJSONTyped(json: any, ignoreDiscriminator:
83
88
  }
84
89
  return {
85
90
 
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'],
91
+ 'marketId': json['market_id'],
92
+ 'resolution': json['resolution'],
93
+ 'startTimestamp': json['start_timestamp'],
94
+ 'endTimestamp': json['end_timestamp'],
95
+ 'countBack': json['count_back'],
91
96
  };
92
97
  }
93
98
 
@@ -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,6 +65,11 @@ 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;
68
73
  return true;
69
74
  }
70
75
 
@@ -78,11 +83,11 @@ export function ReqGetFundingsFromJSONTyped(json: any, ignoreDiscriminator: bool
78
83
  }
79
84
  return {
80
85
 
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'],
86
+ 'marketId': json['market_id'],
87
+ 'resolution': json['resolution'],
88
+ 'startTimestamp': json['start_timestamp'],
89
+ 'endTimestamp': json['end_timestamp'],
90
+ 'countBack': json['count_back'],
86
91
  };
87
92
  }
88
93
 
@@ -24,13 +24,14 @@ 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;
34
35
  return true;
35
36
  }
36
37
 
@@ -44,7 +45,7 @@ export function ReqGetL1TxFromJSONTyped(json: any, ignoreDiscriminator: boolean)
44
45
  }
45
46
  return {
46
47
 
47
- 'hash': json['hash'] == null ? undefined : json['hash'],
48
+ 'hash': json['hash'],
48
49
  };
49
50
  }
50
51
 
@@ -24,25 +24,28 @@ 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;
46
49
  return true;
47
50
  }
48
51
 
@@ -56,9 +59,9 @@ export function ReqGetMarketSigFromJSONTyped(json: any, ignoreDiscriminator: boo
56
59
  }
57
60
  return {
58
61
 
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'],
62
+ 'marketId': json['market_id'],
63
+ 'isAsk': json['is_ask'],
64
+ 'baseAmount': json['base_amount'],
62
65
  };
63
66
  }
64
67
 
@@ -24,19 +24,21 @@ 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;
40
42
  return true;
41
43
  }
42
44
 
@@ -50,8 +52,8 @@ export function ReqGetNextNonceFromJSONTyped(json: any, ignoreDiscriminator: boo
50
52
  }
51
53
  return {
52
54
 
53
- 'accountIndex': json['account_index'] == null ? undefined : json['account_index'],
54
- 'subAccountIndex': json['sub_account_index'] == null ? undefined : json['sub_account_index'],
55
+ 'accountIndex': json['account_index'],
56
+ 'subAccountIndex': json['sub_account_index'],
55
57
  };
56
58
  }
57
59
 
@@ -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,6 +48,7 @@ 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;
51
52
  return true;
52
53
  }
53
54
 
@@ -61,7 +62,7 @@ export function ReqGetOrderBookDetailsFromJSONTyped(json: any, ignoreDiscriminat
61
62
  }
62
63
  return {
63
64
 
64
- 'filter': json['filter'] == null ? undefined : json['filter'],
65
+ 'filter': json['filter'],
65
66
  'marketId': json['market_id'] == null ? undefined : json['market_id'],
66
67
  };
67
68
  }
@@ -24,19 +24,21 @@ 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;
40
42
  return true;
41
43
  }
42
44
 
@@ -50,8 +52,8 @@ export function ReqGetOrderBookOrdersFromJSONTyped(json: any, ignoreDiscriminato
50
52
  }
51
53
  return {
52
54
 
53
- 'marketId': json['market_id'] == null ? undefined : json['market_id'],
54
- 'limit': json['limit'] == null ? undefined : json['limit'],
55
+ 'marketId': json['market_id'],
56
+ 'limit': json['limit'],
55
57
  };
56
58
  }
57
59
 
@@ -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,6 +48,7 @@ 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;
51
52
  return true;
52
53
  }
53
54
 
@@ -61,7 +62,7 @@ export function ReqGetOrderBooksFromJSONTyped(json: any, ignoreDiscriminator: bo
61
62
  }
62
63
  return {
63
64
 
64
- 'filter': json['filter'] == null ? undefined : json['filter'],
65
+ 'filter': json['filter'],
65
66
  'marketId': json['market_id'] == null ? undefined : json['market_id'],
66
67
  };
67
68
  }
@@ -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,6 +54,9 @@ 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;
57
60
  return true;
58
61
  }
59
62
 
@@ -67,9 +70,9 @@ export function ReqGetPermissionFromJSONTyped(json: any, ignoreDiscriminator: bo
67
70
  }
68
71
  return {
69
72
 
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'],
73
+ 'by': json['by'],
74
+ 'value': json['value'],
75
+ 'txType': json['tx_type'],
73
76
  };
74
77
  }
75
78