@@ -293,73 +293,71 @@ export interface StreamOrderbookUpdatesResponseSDKType {
293293 */
294294
295295export interface StreamUpdate {
296- orderbookUpdate ?: StreamOrderbookUpdate ;
297- orderFill ?: StreamOrderbookFill ;
298- takerOrder ?: StreamTakerOrder ;
299- subaccountUpdate ?: StreamSubaccountUpdate ;
300296 /** Block height of the update. */
301-
302297 blockHeight : number ;
303298 /** Exec mode of the update. */
304299
305300 execMode : number ;
301+ orderbookUpdate ?: StreamOrderbookUpdate ;
302+ orderFill ?: StreamOrderbookFill ;
303+ takerOrder ?: StreamTakerOrder ;
304+ subaccountUpdate ?: StreamSubaccountUpdate ;
306305}
307306/**
308307 * StreamUpdate is an update that will be pushed through the
309308 * GRPC stream.
310309 */
311310
312311export interface StreamUpdateSDKType {
313- orderbook_update ?: StreamOrderbookUpdateSDKType ;
314- order_fill ?: StreamOrderbookFillSDKType ;
315- taker_order ?: StreamTakerOrderSDKType ;
316- subaccount_update ?: StreamSubaccountUpdateSDKType ;
317312 /** Block height of the update. */
318-
319313 block_height : number ;
320314 /** Exec mode of the update. */
321315
322316 exec_mode : number ;
317+ orderbook_update ?: StreamOrderbookUpdateSDKType ;
318+ order_fill ?: StreamOrderbookFillSDKType ;
319+ taker_order ?: StreamTakerOrderSDKType ;
320+ subaccount_update ?: StreamSubaccountUpdateSDKType ;
323321}
324322/**
325323 * StreamOrderbookUpdate provides information on an orderbook update. Used in
326324 * the full node GRPC stream.
327325 */
328326
329327export interface StreamOrderbookUpdate {
330- /**
331- * Orderbook updates for the clob pair. Can contain order place, removals,
332- * or updates.
333- */
334- updates : OffChainUpdateV1 [ ] ;
335328 /**
336329 * Snapshot indicates if the response is from a snapshot of the orderbook.
337330 * All updates should be ignored until snapshot is recieved.
338331 * If the snapshot is true, then all previous entries should be
339332 * discarded and the orderbook should be resynced.
340333 */
341-
342334 snapshot : boolean ;
335+ /**
336+ * Orderbook updates for the clob pair. Can contain order place, removals,
337+ * or updates.
338+ */
339+
340+ updates : OffChainUpdateV1 [ ] ;
343341}
344342/**
345343 * StreamOrderbookUpdate provides information on an orderbook update. Used in
346344 * the full node GRPC stream.
347345 */
348346
349347export interface StreamOrderbookUpdateSDKType {
350- /**
351- * Orderbook updates for the clob pair. Can contain order place, removals,
352- * or updates.
353- */
354- updates : OffChainUpdateV1SDKType [ ] ;
355348 /**
356349 * Snapshot indicates if the response is from a snapshot of the orderbook.
357350 * All updates should be ignored until snapshot is recieved.
358351 * If the snapshot is true, then all previous entries should be
359352 * discarded and the orderbook should be resynced.
360353 */
361-
362354 snapshot : boolean ;
355+ /**
356+ * Orderbook updates for the clob pair. Can contain order place, removals,
357+ * or updates.
358+ */
359+
360+ updates : OffChainUpdateV1SDKType [ ] ;
363361}
364362/**
365363 * StreamOrderbookFill provides information on an orderbook fill. Used in
@@ -1305,39 +1303,39 @@ export const StreamOrderbookUpdatesResponse = {
13051303
13061304function createBaseStreamUpdate ( ) : StreamUpdate {
13071305 return {
1306+ blockHeight : 0 ,
1307+ execMode : 0 ,
13081308 orderbookUpdate : undefined ,
13091309 orderFill : undefined ,
13101310 takerOrder : undefined ,
1311- subaccountUpdate : undefined ,
1312- blockHeight : 0 ,
1313- execMode : 0
1311+ subaccountUpdate : undefined
13141312 } ;
13151313}
13161314
13171315export const StreamUpdate = {
13181316 encode ( message : StreamUpdate , writer : _m0 . Writer = _m0 . Writer . create ( ) ) : _m0 . Writer {
1319- if ( message . orderbookUpdate !== undefined ) {
1320- StreamOrderbookUpdate . encode ( message . orderbookUpdate , writer . uint32 ( 10 ) . fork ( ) ) . ldelim ( ) ;
1317+ if ( message . blockHeight !== 0 ) {
1318+ writer . uint32 ( 8 ) . uint32 ( message . blockHeight ) ;
13211319 }
13221320
1323- if ( message . orderFill !== undefined ) {
1324- StreamOrderbookFill . encode ( message . orderFill , writer . uint32 ( 18 ) . fork ( ) ) . ldelim ( ) ;
1321+ if ( message . execMode !== 0 ) {
1322+ writer . uint32 ( 16 ) . uint32 ( message . execMode ) ;
13251323 }
13261324
1327- if ( message . takerOrder !== undefined ) {
1328- StreamTakerOrder . encode ( message . takerOrder , writer . uint32 ( 26 ) . fork ( ) ) . ldelim ( ) ;
1325+ if ( message . orderbookUpdate !== undefined ) {
1326+ StreamOrderbookUpdate . encode ( message . orderbookUpdate , writer . uint32 ( 26 ) . fork ( ) ) . ldelim ( ) ;
13291327 }
13301328
1331- if ( message . subaccountUpdate !== undefined ) {
1332- StreamSubaccountUpdate . encode ( message . subaccountUpdate , writer . uint32 ( 34 ) . fork ( ) ) . ldelim ( ) ;
1329+ if ( message . orderFill !== undefined ) {
1330+ StreamOrderbookFill . encode ( message . orderFill , writer . uint32 ( 34 ) . fork ( ) ) . ldelim ( ) ;
13331331 }
13341332
1335- if ( message . blockHeight !== 0 ) {
1336- writer . uint32 ( 40 ) . uint32 ( message . blockHeight ) ;
1333+ if ( message . takerOrder !== undefined ) {
1334+ StreamTakerOrder . encode ( message . takerOrder , writer . uint32 ( 42 ) . fork ( ) ) . ldelim ( ) ;
13371335 }
13381336
1339- if ( message . execMode !== 0 ) {
1340- writer . uint32 ( 48 ) . uint32 ( message . execMode ) ;
1337+ if ( message . subaccountUpdate !== undefined ) {
1338+ StreamSubaccountUpdate . encode ( message . subaccountUpdate , writer . uint32 ( 50 ) . fork ( ) ) . ldelim ( ) ;
13411339 }
13421340
13431341 return writer ;
@@ -1353,27 +1351,27 @@ export const StreamUpdate = {
13531351
13541352 switch ( tag >>> 3 ) {
13551353 case 1 :
1356- message . orderbookUpdate = StreamOrderbookUpdate . decode ( reader , reader . uint32 ( ) ) ;
1354+ message . blockHeight = reader . uint32 ( ) ;
13571355 break ;
13581356
13591357 case 2 :
1360- message . orderFill = StreamOrderbookFill . decode ( reader , reader . uint32 ( ) ) ;
1358+ message . execMode = reader . uint32 ( ) ;
13611359 break ;
13621360
13631361 case 3 :
1364- message . takerOrder = StreamTakerOrder . decode ( reader , reader . uint32 ( ) ) ;
1362+ message . orderbookUpdate = StreamOrderbookUpdate . decode ( reader , reader . uint32 ( ) ) ;
13651363 break ;
13661364
13671365 case 4 :
1368- message . subaccountUpdate = StreamSubaccountUpdate . decode ( reader , reader . uint32 ( ) ) ;
1366+ message . orderFill = StreamOrderbookFill . decode ( reader , reader . uint32 ( ) ) ;
13691367 break ;
13701368
13711369 case 5 :
1372- message . blockHeight = reader . uint32 ( ) ;
1370+ message . takerOrder = StreamTakerOrder . decode ( reader , reader . uint32 ( ) ) ;
13731371 break ;
13741372
13751373 case 6 :
1376- message . execMode = reader . uint32 ( ) ;
1374+ message . subaccountUpdate = StreamSubaccountUpdate . decode ( reader , reader . uint32 ( ) ) ;
13771375 break ;
13781376
13791377 default :
@@ -1387,32 +1385,32 @@ export const StreamUpdate = {
13871385
13881386 fromPartial ( object : DeepPartial < StreamUpdate > ) : StreamUpdate {
13891387 const message = createBaseStreamUpdate ( ) ;
1388+ message . blockHeight = object . blockHeight ?? 0 ;
1389+ message . execMode = object . execMode ?? 0 ;
13901390 message . orderbookUpdate = object . orderbookUpdate !== undefined && object . orderbookUpdate !== null ? StreamOrderbookUpdate . fromPartial ( object . orderbookUpdate ) : undefined ;
13911391 message . orderFill = object . orderFill !== undefined && object . orderFill !== null ? StreamOrderbookFill . fromPartial ( object . orderFill ) : undefined ;
13921392 message . takerOrder = object . takerOrder !== undefined && object . takerOrder !== null ? StreamTakerOrder . fromPartial ( object . takerOrder ) : undefined ;
13931393 message . subaccountUpdate = object . subaccountUpdate !== undefined && object . subaccountUpdate !== null ? StreamSubaccountUpdate . fromPartial ( object . subaccountUpdate ) : undefined ;
1394- message . blockHeight = object . blockHeight ?? 0 ;
1395- message . execMode = object . execMode ?? 0 ;
13961394 return message ;
13971395 }
13981396
13991397} ;
14001398
14011399function createBaseStreamOrderbookUpdate ( ) : StreamOrderbookUpdate {
14021400 return {
1403- updates : [ ] ,
1404- snapshot : false
1401+ snapshot : false ,
1402+ updates : [ ]
14051403 } ;
14061404}
14071405
14081406export const StreamOrderbookUpdate = {
14091407 encode ( message : StreamOrderbookUpdate , writer : _m0 . Writer = _m0 . Writer . create ( ) ) : _m0 . Writer {
1410- for ( const v of message . updates ) {
1411- OffChainUpdateV1 . encode ( v ! , writer . uint32 ( 10 ) . fork ( ) ) . ldelim ( ) ;
1408+ if ( message . snapshot === true ) {
1409+ writer . uint32 ( 8 ) . bool ( message . snapshot ) ;
14121410 }
14131411
1414- if ( message . snapshot === true ) {
1415- writer . uint32 ( 16 ) . bool ( message . snapshot ) ;
1412+ for ( const v of message . updates ) {
1413+ OffChainUpdateV1 . encode ( v ! , writer . uint32 ( 18 ) . fork ( ) ) . ldelim ( ) ;
14161414 }
14171415
14181416 return writer ;
@@ -1428,11 +1426,11 @@ export const StreamOrderbookUpdate = {
14281426
14291427 switch ( tag >>> 3 ) {
14301428 case 1 :
1431- message . updates . push ( OffChainUpdateV1 . decode ( reader , reader . uint32 ( ) ) ) ;
1429+ message . snapshot = reader . bool ( ) ;
14321430 break ;
14331431
14341432 case 2 :
1435- message . snapshot = reader . bool ( ) ;
1433+ message . updates . push ( OffChainUpdateV1 . decode ( reader , reader . uint32 ( ) ) ) ;
14361434 break ;
14371435
14381436 default :
@@ -1446,8 +1444,8 @@ export const StreamOrderbookUpdate = {
14461444
14471445 fromPartial ( object : DeepPartial < StreamOrderbookUpdate > ) : StreamOrderbookUpdate {
14481446 const message = createBaseStreamOrderbookUpdate ( ) ;
1449- message . updates = object . updates ?. map ( e => OffChainUpdateV1 . fromPartial ( e ) ) || [ ] ;
14501447 message . snapshot = object . snapshot ?? false ;
1448+ message . updates = object . updates ?. map ( e => OffChainUpdateV1 . fromPartial ( e ) ) || [ ] ;
14511449 return message ;
14521450 }
14531451
0 commit comments