zklighter-perps 1.0.31 → 1.0.32

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.
package/models/Account.ts CHANGED
@@ -24,7 +24,7 @@ export interface Account {
24
24
  * @type {number}
25
25
  * @memberof Account
26
26
  */
27
- code?: number;
27
+ code: number;
28
28
  /**
29
29
  *
30
30
  * @type {string}
@@ -79,6 +79,7 @@ export interface Account {
79
79
  * Check if a given object implements the Account interface.
80
80
  */
81
81
  export function instanceOfAccount(value: object): value is Account {
82
+ if (!('code' in value) || value['code'] === undefined) return false;
82
83
  if (!('account_type' in value) || value['account_type'] === undefined) return false;
83
84
  if (!('index' in value) || value['index'] === undefined) return false;
84
85
  if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
@@ -99,7 +100,7 @@ export function AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): A
99
100
  }
100
101
  return {
101
102
 
102
- 'code': json['code'] == null ? undefined : json['code'],
103
+ 'code': json['code'],
103
104
  'message': json['message'] == null ? undefined : json['message'],
104
105
  'account_type': json['account_type'],
105
106
  'index': json['index'],
@@ -31,7 +31,7 @@ export interface AccountApiKeys {
31
31
  * @type {number}
32
32
  * @memberof AccountApiKeys
33
33
  */
34
- code?: number;
34
+ code: number;
35
35
  /**
36
36
  *
37
37
  * @type {string}
@@ -50,6 +50,7 @@ export interface AccountApiKeys {
50
50
  * Check if a given object implements the AccountApiKeys interface.
51
51
  */
52
52
  export function instanceOfAccountApiKeys(value: object): value is AccountApiKeys {
53
+ if (!('code' in value) || value['code'] === undefined) return false;
53
54
  if (!('api_keys' in value) || value['api_keys'] === undefined) return false;
54
55
  return true;
55
56
  }
@@ -64,7 +65,7 @@ export function AccountApiKeysFromJSONTyped(json: any, ignoreDiscriminator: bool
64
65
  }
65
66
  return {
66
67
 
67
- 'code': json['code'] == null ? undefined : json['code'],
68
+ 'code': json['code'],
68
69
  'message': json['message'] == null ? undefined : json['message'],
69
70
  'api_keys': ((json['api_keys'] as Array<any>).map(ApiKeyFromJSON)),
70
71
  };
@@ -31,7 +31,7 @@ export interface AccountPnL {
31
31
  * @type {number}
32
32
  * @memberof AccountPnL
33
33
  */
34
- code?: number;
34
+ code: number;
35
35
  /**
36
36
  *
37
37
  * @type {string}
@@ -56,6 +56,7 @@ export interface AccountPnL {
56
56
  * Check if a given object implements the AccountPnL interface.
57
57
  */
58
58
  export function instanceOfAccountPnL(value: object): value is AccountPnL {
59
+ if (!('code' in value) || value['code'] === undefined) return false;
59
60
  if (!('resolution' in value) || value['resolution'] === undefined) return false;
60
61
  if (!('pnl' in value) || value['pnl'] === undefined) return false;
61
62
  return true;
@@ -71,7 +72,7 @@ export function AccountPnLFromJSONTyped(json: any, ignoreDiscriminator: boolean)
71
72
  }
72
73
  return {
73
74
 
74
- 'code': json['code'] == null ? undefined : json['code'],
75
+ 'code': json['code'],
75
76
  'message': json['message'] == null ? undefined : json['message'],
76
77
  'resolution': json['resolution'],
77
78
  'pnl': ((json['pnl'] as Array<any>).map(PnLEntryFromJSON)),
@@ -31,7 +31,7 @@ export interface Accounts {
31
31
  * @type {number}
32
32
  * @memberof Accounts
33
33
  */
34
- code?: number;
34
+ code: number;
35
35
  /**
36
36
  *
37
37
  * @type {string}
@@ -56,6 +56,7 @@ export interface Accounts {
56
56
  * Check if a given object implements the Accounts interface.
57
57
  */
58
58
  export function instanceOfAccounts(value: object): value is Accounts {
59
+ if (!('code' in value) || value['code'] === undefined) return false;
59
60
  if (!('total' in value) || value['total'] === undefined) return false;
60
61
  if (!('accounts' in value) || value['accounts'] === undefined) return false;
61
62
  return true;
@@ -71,7 +72,7 @@ export function AccountsFromJSONTyped(json: any, ignoreDiscriminator: boolean):
71
72
  }
72
73
  return {
73
74
 
74
- 'code': json['code'] == null ? undefined : json['code'],
75
+ 'code': json['code'],
75
76
  'message': json['message'] == null ? undefined : json['message'],
76
77
  'total': json['total'],
77
78
  'accounts': ((json['accounts'] as Array<any>).map(AccountFromJSON)),
package/models/Blocks.ts CHANGED
@@ -31,7 +31,7 @@ export interface Blocks {
31
31
  * @type {number}
32
32
  * @memberof Blocks
33
33
  */
34
- code?: number;
34
+ code: number;
35
35
  /**
36
36
  *
37
37
  * @type {string}
@@ -56,6 +56,7 @@ export interface Blocks {
56
56
  * Check if a given object implements the Blocks interface.
57
57
  */
58
58
  export function instanceOfBlocks(value: object): value is Blocks {
59
+ if (!('code' in value) || value['code'] === undefined) return false;
59
60
  if (!('total' in value) || value['total'] === undefined) return false;
60
61
  if (!('blocks' in value) || value['blocks'] === undefined) return false;
61
62
  return true;
@@ -71,7 +72,7 @@ export function BlocksFromJSONTyped(json: any, ignoreDiscriminator: boolean): Bl
71
72
  }
72
73
  return {
73
74
 
74
- 'code': json['code'] == null ? undefined : json['code'],
75
+ 'code': json['code'],
75
76
  'message': json['message'] == null ? undefined : json['message'],
76
77
  'total': json['total'],
77
78
  'blocks': ((json['blocks'] as Array<any>).map(BlockFromJSON)),
@@ -31,7 +31,7 @@ export interface Candlesticks {
31
31
  * @type {number}
32
32
  * @memberof Candlesticks
33
33
  */
34
- code?: number;
34
+ code: number;
35
35
  /**
36
36
  *
37
37
  * @type {string}
@@ -56,6 +56,7 @@ export interface Candlesticks {
56
56
  * Check if a given object implements the Candlesticks interface.
57
57
  */
58
58
  export function instanceOfCandlesticks(value: object): value is Candlesticks {
59
+ if (!('code' in value) || value['code'] === undefined) return false;
59
60
  if (!('resolution' in value) || value['resolution'] === undefined) return false;
60
61
  if (!('candlesticks' in value) || value['candlesticks'] === undefined) return false;
61
62
  return true;
@@ -71,7 +72,7 @@ export function CandlesticksFromJSONTyped(json: any, ignoreDiscriminator: boolea
71
72
  }
72
73
  return {
73
74
 
74
- 'code': json['code'] == null ? undefined : json['code'],
75
+ 'code': json['code'],
75
76
  'message': json['message'] == null ? undefined : json['message'],
76
77
  'resolution': json['resolution'],
77
78
  'candlesticks': ((json['candlesticks'] as Array<any>).map(CandlestickFromJSON)),
@@ -24,7 +24,7 @@ export interface CurrentHeight {
24
24
  * @type {number}
25
25
  * @memberof CurrentHeight
26
26
  */
27
- code?: number;
27
+ code: number;
28
28
  /**
29
29
  *
30
30
  * @type {string}
@@ -43,6 +43,7 @@ export interface CurrentHeight {
43
43
  * Check if a given object implements the CurrentHeight interface.
44
44
  */
45
45
  export function instanceOfCurrentHeight(value: object): value is CurrentHeight {
46
+ if (!('code' in value) || value['code'] === undefined) return false;
46
47
  if (!('height' in value) || value['height'] === undefined) return false;
47
48
  return true;
48
49
  }
@@ -57,7 +58,7 @@ export function CurrentHeightFromJSONTyped(json: any, ignoreDiscriminator: boole
57
58
  }
58
59
  return {
59
60
 
60
- 'code': json['code'] == null ? undefined : json['code'],
61
+ 'code': json['code'],
61
62
  'message': json['message'] == null ? undefined : json['message'],
62
63
  'height': json['height'],
63
64
  };
@@ -43,7 +43,7 @@ export interface DetailedAccount {
43
43
  * @type {number}
44
44
  * @memberof DetailedAccount
45
45
  */
46
- code?: number;
46
+ code: number;
47
47
  /**
48
48
  *
49
49
  * @type {string}
@@ -55,43 +55,43 @@ export interface DetailedAccount {
55
55
  * @type {number}
56
56
  * @memberof DetailedAccount
57
57
  */
58
- account_type?: number;
58
+ account_type: number;
59
59
  /**
60
60
  *
61
61
  * @type {number}
62
62
  * @memberof DetailedAccount
63
63
  */
64
- index?: number;
64
+ index: number;
65
65
  /**
66
66
  *
67
67
  * @type {string}
68
68
  * @memberof DetailedAccount
69
69
  */
70
- l1_address?: string;
70
+ l1_address: string;
71
71
  /**
72
72
  *
73
73
  * @type {number}
74
74
  * @memberof DetailedAccount
75
75
  */
76
- cancel_all_time?: number;
76
+ cancel_all_time: number;
77
77
  /**
78
78
  *
79
79
  * @type {number}
80
80
  * @memberof DetailedAccount
81
81
  */
82
- open_order_count?: number;
82
+ open_order_count: number;
83
83
  /**
84
84
  *
85
85
  * @type {number}
86
86
  * @memberof DetailedAccount
87
87
  */
88
- status?: number;
88
+ status: number;
89
89
  /**
90
90
  *
91
91
  * @type {string}
92
92
  * @memberof DetailedAccount
93
93
  */
94
- collateral?: string;
94
+ collateral: string;
95
95
  /**
96
96
  *
97
97
  * @type {Array<AccountPosition>}
@@ -122,6 +122,14 @@ export interface DetailedAccount {
122
122
  * Check if a given object implements the DetailedAccount interface.
123
123
  */
124
124
  export function instanceOfDetailedAccount(value: object): value is DetailedAccount {
125
+ if (!('code' in value) || value['code'] === undefined) return false;
126
+ if (!('account_type' in value) || value['account_type'] === undefined) return false;
127
+ if (!('index' in value) || value['index'] === undefined) return false;
128
+ if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
129
+ if (!('cancel_all_time' in value) || value['cancel_all_time'] === undefined) return false;
130
+ if (!('open_order_count' in value) || value['open_order_count'] === undefined) return false;
131
+ if (!('status' in value) || value['status'] === undefined) return false;
132
+ if (!('collateral' in value) || value['collateral'] === undefined) return false;
125
133
  if (!('positions' in value) || value['positions'] === undefined) return false;
126
134
  if (!('total_asset_value' in value) || value['total_asset_value'] === undefined) return false;
127
135
  if (!('market_stats' in value) || value['market_stats'] === undefined) return false;
@@ -139,15 +147,15 @@ export function DetailedAccountFromJSONTyped(json: any, ignoreDiscriminator: boo
139
147
  }
140
148
  return {
141
149
 
142
- 'code': json['code'] == null ? undefined : json['code'],
150
+ 'code': json['code'],
143
151
  'message': json['message'] == null ? undefined : json['message'],
144
- 'account_type': json['account_type'] == null ? undefined : json['account_type'],
145
- 'index': json['index'] == null ? undefined : json['index'],
146
- 'l1_address': json['l1_address'] == null ? undefined : json['l1_address'],
147
- 'cancel_all_time': json['cancel_all_time'] == null ? undefined : json['cancel_all_time'],
148
- 'open_order_count': json['open_order_count'] == null ? undefined : json['open_order_count'],
149
- 'status': json['status'] == null ? undefined : json['status'],
150
- 'collateral': json['collateral'] == null ? undefined : json['collateral'],
152
+ 'account_type': json['account_type'],
153
+ 'index': json['index'],
154
+ 'l1_address': json['l1_address'],
155
+ 'cancel_all_time': json['cancel_all_time'],
156
+ 'open_order_count': json['open_order_count'],
157
+ 'status': json['status'],
158
+ 'collateral': json['collateral'],
151
159
  'positions': ((json['positions'] as Array<any>).map(AccountPositionFromJSON)),
152
160
  'total_asset_value': json['total_asset_value'],
153
161
  'market_stats': ((json['market_stats'] as Array<any>).map(AccountMarketStatsFromJSON)),
@@ -31,7 +31,7 @@ export interface DetailedAccounts {
31
31
  * @type {number}
32
32
  * @memberof DetailedAccounts
33
33
  */
34
- code?: number;
34
+ code: number;
35
35
  /**
36
36
  *
37
37
  * @type {string}
@@ -56,6 +56,7 @@ export interface DetailedAccounts {
56
56
  * Check if a given object implements the DetailedAccounts interface.
57
57
  */
58
58
  export function instanceOfDetailedAccounts(value: object): value is DetailedAccounts {
59
+ if (!('code' in value) || value['code'] === undefined) return false;
59
60
  if (!('total' in value) || value['total'] === undefined) return false;
60
61
  if (!('accounts' in value) || value['accounts'] === undefined) return false;
61
62
  return true;
@@ -71,7 +72,7 @@ export function DetailedAccountsFromJSONTyped(json: any, ignoreDiscriminator: bo
71
72
  }
72
73
  return {
73
74
 
74
- 'code': json['code'] == null ? undefined : json['code'],
75
+ 'code': json['code'],
75
76
  'message': json['message'] == null ? undefined : json['message'],
76
77
  'total': json['total'],
77
78
  'accounts': ((json['accounts'] as Array<any>).map(DetailedAccountFromJSON)),
@@ -24,7 +24,7 @@ export interface EnrichedTx {
24
24
  * @type {number}
25
25
  * @memberof EnrichedTx
26
26
  */
27
- code?: number;
27
+ code: number;
28
28
  /**
29
29
  *
30
30
  * @type {string}
@@ -36,73 +36,73 @@ export interface EnrichedTx {
36
36
  * @type {string}
37
37
  * @memberof EnrichedTx
38
38
  */
39
- hash?: string;
39
+ hash: string;
40
40
  /**
41
41
  *
42
42
  * @type {number}
43
43
  * @memberof EnrichedTx
44
44
  */
45
- type?: number;
45
+ type: number;
46
46
  /**
47
47
  *
48
48
  * @type {string}
49
49
  * @memberof EnrichedTx
50
50
  */
51
- info?: string;
51
+ info: string;
52
52
  /**
53
53
  *
54
54
  * @type {string}
55
55
  * @memberof EnrichedTx
56
56
  */
57
- event_info?: string;
57
+ event_info: string;
58
58
  /**
59
59
  *
60
60
  * @type {number}
61
61
  * @memberof EnrichedTx
62
62
  */
63
- status?: number;
63
+ status: number;
64
64
  /**
65
65
  *
66
66
  * @type {number}
67
67
  * @memberof EnrichedTx
68
68
  */
69
- transaction_index?: number;
69
+ transaction_index: number;
70
70
  /**
71
71
  *
72
72
  * @type {string}
73
73
  * @memberof EnrichedTx
74
74
  */
75
- l1_address?: string;
75
+ l1_address: string;
76
76
  /**
77
77
  *
78
78
  * @type {number}
79
79
  * @memberof EnrichedTx
80
80
  */
81
- account_index?: number;
81
+ account_index: number;
82
82
  /**
83
83
  *
84
84
  * @type {number}
85
85
  * @memberof EnrichedTx
86
86
  */
87
- nonce?: number;
87
+ nonce: number;
88
88
  /**
89
89
  *
90
90
  * @type {number}
91
91
  * @memberof EnrichedTx
92
92
  */
93
- expire_at?: number;
93
+ expire_at: number;
94
94
  /**
95
95
  *
96
96
  * @type {number}
97
97
  * @memberof EnrichedTx
98
98
  */
99
- block_height?: number;
99
+ block_height: number;
100
100
  /**
101
101
  *
102
102
  * @type {number}
103
103
  * @memberof EnrichedTx
104
104
  */
105
- created_at?: number;
105
+ created_at: number;
106
106
  /**
107
107
  *
108
108
  * @type {number}
@@ -114,7 +114,7 @@ export interface EnrichedTx {
114
114
  * @type {number}
115
115
  * @memberof EnrichedTx
116
116
  */
117
- sequence_index?: number;
117
+ sequence_index: number;
118
118
  /**
119
119
  *
120
120
  * @type {number}
@@ -133,7 +133,21 @@ export interface EnrichedTx {
133
133
  * Check if a given object implements the EnrichedTx interface.
134
134
  */
135
135
  export function instanceOfEnrichedTx(value: object): value is EnrichedTx {
136
+ if (!('code' in value) || value['code'] === undefined) return false;
137
+ if (!('hash' in value) || value['hash'] === undefined) return false;
138
+ if (!('type' in value) || value['type'] === undefined) return false;
139
+ if (!('info' in value) || value['info'] === undefined) return false;
140
+ if (!('event_info' in value) || value['event_info'] === undefined) return false;
141
+ if (!('status' in value) || value['status'] === undefined) return false;
142
+ if (!('transaction_index' in value) || value['transaction_index'] === undefined) return false;
143
+ if (!('l1_address' in value) || value['l1_address'] === undefined) return false;
144
+ if (!('account_index' in value) || value['account_index'] === undefined) return false;
145
+ if (!('nonce' in value) || value['nonce'] === undefined) return false;
146
+ if (!('expire_at' in value) || value['expire_at'] === undefined) return false;
147
+ if (!('block_height' in value) || value['block_height'] === undefined) return false;
148
+ if (!('created_at' in value) || value['created_at'] === undefined) return false;
136
149
  if (!('executed_at' in value) || value['executed_at'] === undefined) return false;
150
+ if (!('sequence_index' in value) || value['sequence_index'] === undefined) return false;
137
151
  if (!('committed_at' in value) || value['committed_at'] === undefined) return false;
138
152
  if (!('verified_at' in value) || value['verified_at'] === undefined) return false;
139
153
  return true;
@@ -149,22 +163,22 @@ export function EnrichedTxFromJSONTyped(json: any, ignoreDiscriminator: boolean)
149
163
  }
150
164
  return {
151
165
 
152
- 'code': json['code'] == null ? undefined : json['code'],
166
+ 'code': json['code'],
153
167
  'message': json['message'] == null ? undefined : json['message'],
154
- 'hash': json['hash'] == null ? undefined : json['hash'],
155
- 'type': json['type'] == null ? undefined : json['type'],
156
- 'info': json['info'] == null ? undefined : json['info'],
157
- 'event_info': json['event_info'] == null ? undefined : json['event_info'],
158
- 'status': json['status'] == null ? undefined : json['status'],
159
- 'transaction_index': json['transaction_index'] == null ? undefined : json['transaction_index'],
160
- 'l1_address': json['l1_address'] == null ? undefined : json['l1_address'],
161
- 'account_index': json['account_index'] == null ? undefined : json['account_index'],
162
- 'nonce': json['nonce'] == null ? undefined : json['nonce'],
163
- 'expire_at': json['expire_at'] == null ? undefined : json['expire_at'],
164
- 'block_height': json['block_height'] == null ? undefined : json['block_height'],
165
- 'created_at': json['created_at'] == null ? undefined : json['created_at'],
168
+ 'hash': json['hash'],
169
+ 'type': json['type'],
170
+ 'info': json['info'],
171
+ 'event_info': json['event_info'],
172
+ 'status': json['status'],
173
+ 'transaction_index': json['transaction_index'],
174
+ 'l1_address': json['l1_address'],
175
+ 'account_index': json['account_index'],
176
+ 'nonce': json['nonce'],
177
+ 'expire_at': json['expire_at'],
178
+ 'block_height': json['block_height'],
179
+ 'created_at': json['created_at'],
166
180
  'executed_at': json['executed_at'],
167
- 'sequence_index': json['sequence_index'] == null ? undefined : json['sequence_index'],
181
+ 'sequence_index': json['sequence_index'],
168
182
  'committed_at': json['committed_at'],
169
183
  'verified_at': json['verified_at'],
170
184
  };
@@ -31,7 +31,7 @@ export interface ExchangeStats {
31
31
  * @type {number}
32
32
  * @memberof ExchangeStats
33
33
  */
34
- code?: number;
34
+ code: number;
35
35
  /**
36
36
  *
37
37
  * @type {string}
@@ -68,6 +68,7 @@ export interface ExchangeStats {
68
68
  * Check if a given object implements the ExchangeStats interface.
69
69
  */
70
70
  export function instanceOfExchangeStats(value: object): value is ExchangeStats {
71
+ if (!('code' in value) || value['code'] === undefined) return false;
71
72
  if (!('total' in value) || value['total'] === undefined) return false;
72
73
  if (!('order_book_stats' in value) || value['order_book_stats'] === undefined) return false;
73
74
  if (!('daily_usd_volume' in value) || value['daily_usd_volume'] === undefined) return false;
@@ -85,7 +86,7 @@ export function ExchangeStatsFromJSONTyped(json: any, ignoreDiscriminator: boole
85
86
  }
86
87
  return {
87
88
 
88
- 'code': json['code'] == null ? undefined : json['code'],
89
+ 'code': json['code'],
89
90
  'message': json['message'] == null ? undefined : json['message'],
90
91
  'total': json['total'],
91
92
  'order_book_stats': ((json['order_book_stats'] as Array<any>).map(OrderBookStatsFromJSON)),
@@ -31,7 +31,7 @@ export interface Fundings {
31
31
  * @type {number}
32
32
  * @memberof Fundings
33
33
  */
34
- code?: number;
34
+ code: number;
35
35
  /**
36
36
  *
37
37
  * @type {string}
@@ -56,6 +56,7 @@ export interface Fundings {
56
56
  * Check if a given object implements the Fundings interface.
57
57
  */
58
58
  export function instanceOfFundings(value: object): value is Fundings {
59
+ if (!('code' in value) || value['code'] === undefined) return false;
59
60
  if (!('resolution' in value) || value['resolution'] === undefined) return false;
60
61
  if (!('fundings' in value) || value['fundings'] === undefined) return false;
61
62
  return true;
@@ -71,7 +72,7 @@ export function FundingsFromJSONTyped(json: any, ignoreDiscriminator: boolean):
71
72
  }
72
73
  return {
73
74
 
74
- 'code': json['code'] == null ? undefined : json['code'],
75
+ 'code': json['code'],
75
76
  'message': json['message'] == null ? undefined : json['message'],
76
77
  'resolution': json['resolution'],
77
78
  'fundings': ((json['fundings'] as Array<any>).map(FundingFromJSON)),
@@ -43,7 +43,7 @@ export interface Layer1BasicInfo {
43
43
  * @type {number}
44
44
  * @memberof Layer1BasicInfo
45
45
  */
46
- code?: number;
46
+ code: number;
47
47
  /**
48
48
  *
49
49
  * @type {string}
@@ -98,6 +98,7 @@ export interface Layer1BasicInfo {
98
98
  * Check if a given object implements the Layer1BasicInfo interface.
99
99
  */
100
100
  export function instanceOfLayer1BasicInfo(value: object): value is Layer1BasicInfo {
101
+ if (!('code' in value) || value['code'] === undefined) return false;
101
102
  if (!('l1_providers' in value) || value['l1_providers'] === undefined) return false;
102
103
  if (!('l1_providers_health' in value) || value['l1_providers_health'] === undefined) return false;
103
104
  if (!('validator_info' in value) || value['validator_info'] === undefined) return false;
@@ -118,7 +119,7 @@ export function Layer1BasicInfoFromJSONTyped(json: any, ignoreDiscriminator: boo
118
119
  }
119
120
  return {
120
121
 
121
- 'code': json['code'] == null ? undefined : json['code'],
122
+ 'code': json['code'],
122
123
  'message': json['message'] == null ? undefined : json['message'],
123
124
  'l1_providers': ((json['l1_providers'] as Array<any>).map(L1ProviderInfoFromJSON)),
124
125
  'l1_providers_health': json['l1_providers_health'],
@@ -24,7 +24,7 @@ export interface Layer2BasicInfo {
24
24
  * @type {number}
25
25
  * @memberof Layer2BasicInfo
26
26
  */
27
- code?: number;
27
+ code: number;
28
28
  /**
29
29
  *
30
30
  * @type {string}
@@ -55,6 +55,7 @@ export interface Layer2BasicInfo {
55
55
  * Check if a given object implements the Layer2BasicInfo interface.
56
56
  */
57
57
  export function instanceOfLayer2BasicInfo(value: object): value is Layer2BasicInfo {
58
+ if (!('code' in value) || value['code'] === undefined) return false;
58
59
  if (!('block_committed' in value) || value['block_committed'] === undefined) return false;
59
60
  if (!('block_verified' in value) || value['block_verified'] === undefined) return false;
60
61
  if (!('total_transaction_count' in value) || value['total_transaction_count'] === undefined) return false;
@@ -71,7 +72,7 @@ export function Layer2BasicInfoFromJSONTyped(json: any, ignoreDiscriminator: boo
71
72
  }
72
73
  return {
73
74
 
74
- 'code': json['code'] == null ? undefined : json['code'],
75
+ 'code': json['code'],
75
76
  'message': json['message'] == null ? undefined : json['message'],
76
77
  'block_committed': json['block_committed'],
77
78
  'block_verified': json['block_verified'],
@@ -24,7 +24,7 @@ export interface NextNonce {
24
24
  * @type {number}
25
25
  * @memberof NextNonce
26
26
  */
27
- code?: number;
27
+ code: number;
28
28
  /**
29
29
  *
30
30
  * @type {string}
@@ -43,6 +43,7 @@ export interface NextNonce {
43
43
  * Check if a given object implements the NextNonce interface.
44
44
  */
45
45
  export function instanceOfNextNonce(value: object): value is NextNonce {
46
+ if (!('code' in value) || value['code'] === undefined) return false;
46
47
  if (!('nonce' in value) || value['nonce'] === undefined) return false;
47
48
  return true;
48
49
  }
@@ -57,7 +58,7 @@ export function NextNonceFromJSONTyped(json: any, ignoreDiscriminator: boolean):
57
58
  }
58
59
  return {
59
60
 
60
- 'code': json['code'] == null ? undefined : json['code'],
61
+ 'code': json['code'],
61
62
  'message': json['message'] == null ? undefined : json['message'],
62
63
  'nonce': json['nonce'],
63
64
  };
@@ -31,7 +31,7 @@ export interface OrderBookDepth {
31
31
  * @type {number}
32
32
  * @memberof OrderBookDepth
33
33
  */
34
- code?: number;
34
+ code: number;
35
35
  /**
36
36
  *
37
37
  * @type {string}
@@ -62,6 +62,7 @@ export interface OrderBookDepth {
62
62
  * Check if a given object implements the OrderBookDepth interface.
63
63
  */
64
64
  export function instanceOfOrderBookDepth(value: object): value is OrderBookDepth {
65
+ if (!('code' in value) || value['code'] === undefined) return false;
65
66
  if (!('asks' in value) || value['asks'] === undefined) return false;
66
67
  if (!('bids' in value) || value['bids'] === undefined) return false;
67
68
  if (!('offset' in value) || value['offset'] === undefined) return false;
@@ -78,7 +79,7 @@ export function OrderBookDepthFromJSONTyped(json: any, ignoreDiscriminator: bool
78
79
  }
79
80
  return {
80
81
 
81
- 'code': json['code'] == null ? undefined : json['code'],
82
+ 'code': json['code'],
82
83
  'message': json['message'] == null ? undefined : json['message'],
83
84
  'asks': ((json['asks'] as Array<any>).map(PriceLevelFromJSON)),
84
85
  'bids': ((json['bids'] as Array<any>).map(PriceLevelFromJSON)),