@n1xyz/nord-ts 0.0.21 → 0.0.22

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 (45) hide show
  1. package/dist/api/client.d.ts +14 -0
  2. package/dist/api/client.js +45 -0
  3. package/dist/bridge/client.d.ts +151 -0
  4. package/dist/bridge/client.js +434 -0
  5. package/dist/bridge/const.d.ts +23 -0
  6. package/dist/bridge/const.js +47 -0
  7. package/dist/bridge/index.d.ts +4 -0
  8. package/dist/bridge/index.js +23 -0
  9. package/dist/bridge/types.d.ts +120 -0
  10. package/dist/bridge/types.js +18 -0
  11. package/dist/bridge/utils.d.ts +64 -0
  12. package/dist/bridge/utils.js +131 -0
  13. package/dist/gen/common.d.ts +68 -0
  14. package/dist/gen/common.js +215 -0
  15. package/dist/gen/nord_pb.d.ts +3651 -0
  16. package/dist/gen/nord_pb.js +892 -0
  17. package/dist/gen/openapi.d.ts +241 -2
  18. package/dist/idl/bridge.d.ts +569 -0
  19. package/dist/idl/bridge.js +8 -0
  20. package/dist/idl/bridge.json +1506 -0
  21. package/dist/idl/index.d.ts +607 -0
  22. package/dist/idl/index.js +8 -0
  23. package/dist/nord/api/actions.d.ts +30 -72
  24. package/dist/nord/api/actions.js +179 -200
  25. package/dist/nord/api/market.d.ts +36 -0
  26. package/dist/nord/api/market.js +96 -0
  27. package/dist/nord/api/queries.d.ts +46 -0
  28. package/dist/nord/api/queries.js +109 -0
  29. package/dist/nord/client/Nord.js +3 -3
  30. package/dist/nord/client/NordUser.d.ts +26 -13
  31. package/dist/nord/client/NordUser.js +13 -10
  32. package/dist/types.d.ts +12 -1
  33. package/dist/types.js +29 -2
  34. package/dist/utils.d.ts +6 -20
  35. package/dist/utils.js +17 -35
  36. package/dist/websocket/NordWebSocketClient.js +2 -6
  37. package/package.json +26 -23
  38. package/src/gen/nord_pb.ts +4172 -0
  39. package/src/gen/openapi.ts +241 -2
  40. package/src/nord/api/actions.ts +249 -370
  41. package/src/nord/client/Nord.ts +3 -3
  42. package/src/nord/client/NordUser.ts +40 -19
  43. package/src/types.ts +32 -1
  44. package/src/utils.ts +24 -43
  45. package/src/websocket/NordWebSocketClient.ts +2 -8
@@ -0,0 +1,4172 @@
1
+ // TODO: add buf to control incompatible changes
2
+ // Only the `Action` and `Receipt` messages are length-delimited,
3
+ // i.e. prefixed with a varint encoding the length of the protobuf message.
4
+ // All other message types are encoded normally, i.e. with no prefix.
5
+
6
+ // @generated by protoc-gen-es v2.6.3 with parameter "target=ts,json_types=true"
7
+ // @generated from file nord.proto (package nord, syntax proto3)
8
+ /* eslint-disable */
9
+
10
+ import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
11
+ import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
12
+ import type { Message } from "@bufbuild/protobuf";
13
+
14
+ /**
15
+ * Describes the file nord.proto.
16
+ */
17
+ export const file_nord: GenFile = /*@__PURE__*/
18
+ fileDesc("Cgpub3JkLnByb3RvEgRub3JkItABCgZNYXJrZXQSEQoJbWFya2V0X2lkGAEgASgNEhYKDnByaWNlX2RlY2ltYWxzGAIgASgNEhUKDXNpemVfZGVjaW1hbHMYAyABKA0SFQoNYmFzZV90b2tlbl9pZBgEIAEoDRIlCgttYXJrZXRfdHlwZRgFIAEoDjIQLm5vcmQuTWFya2V0VHlwZRIPCgdpbWZfYnBzGAYgASgNEg8KB2NtZl9icHMYByABKA0SDwoHbW1mX2JwcxgIIAEoDRITCgt2aWV3X3N5bWJvbBgKIAEoCSJaCgVUb2tlbhIQCgh0b2tlbl9pZBgBIAEoDRIWCg50b2tlbl9kZWNpbWFscxgCIAEoDRISCgp3ZWlnaHRfYnBzGAQgASgNEhMKC3ZpZXdfc3ltYm9sGAUgASgJIigKCVF1b3RlU2l6ZRIMCgRzaXplGAEgASgEEg0KBXByaWNlGAIgASgEIk4KCk9yZGVyTGltaXQSDQoFcHJpY2UYBiABKAQSDAoEc2l6ZRgHIAEo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Q01GEOMBEioKJVJJU0tfVFJBREVfT01GX0xFU1NfVEhBTl9PUl9FUVVBTF9DTUYQ5QESNQowUklTS19VTkhFQUxUSFlfTUZfQU5EX1BPTl9BRlRFUl9CRVRURVJfT0ZfQkVGT1JFEOQBEhQKD09SREVSX0VYRUNVVElPThDwARIaChVPUkRFUl9FWEVDVVRJT05fRU1QVFkQ8QESIQocT1JERVJfRVhFQ1VUSU9OX0ZJTExfT1JfS0lMTBDyARIjCh5PUkRFUl9FWEVDVVRJT05fTUlTU0lOR19MSU1JVFMQ8wESIgodT1JERVJfRVhFQ1VUSU9OX01JU1NJTkdfUFJJQ0UQ9AESHwoaT1JERVJfRVhFQ1VUSU9OX1NJWkVfTElNSVQQ9QESIAobT1JERVJfRVhFQ1VUSU9OX0xJTUlUX1BSSUNFEPYBEh4KGU9SREVSX1JFRFVDRV9JU19QT1NUX09OTFkQ9wESHwoaT1JERVJfRVhFQ1VUSU9OX1NFTExfUFJJQ0UQ+AESKAojQVRPTUlDU19UUkFERVNfQ0FOTk9UX0ZPTExPV19QTEFDRVMQgAISMAorQVRPTUlDU19DQU5DRUxTX0NBTk5PVF9GT0xMT1dfVFJBREVTX1BMQUNFUxCBAhImCiFBQ1RJT05fUE9TSVRJT05fU0hPVUxEX0JFX0NPVkVSRUQQkQISGQoUQUNUSU9OX0lOVkFMSURfTk9OQ0UQkgISKQokQUNUSU9OX1BST1BPU0VEX1BSSUNFX01VU1RfQkVfSElHSEVSEJMCEhQKD05PVF9JTVBMRU1FTlRFRBD0AxIMCgdEcm9wcGVkEOcHKh4KDlNwZWNpYWxBY2NvdW50EgwKCEZlZVZhdWx0EABiBnByb3RvMw");
19
+
20
+ /**
21
+ * @generated from message nord.Market
22
+ */
23
+ export type Market = Message<"nord.Market"> & {
24
+ /**
25
+ * @generated from field: uint32 market_id = 1;
26
+ */
27
+ marketId: number;
28
+
29
+ /**
30
+ * @generated from field: uint32 price_decimals = 2;
31
+ */
32
+ priceDecimals: number;
33
+
34
+ /**
35
+ * @generated from field: uint32 size_decimals = 3;
36
+ */
37
+ sizeDecimals: number;
38
+
39
+ /**
40
+ * @generated from field: uint32 base_token_id = 4;
41
+ */
42
+ baseTokenId: number;
43
+
44
+ /**
45
+ * @generated from field: nord.MarketType market_type = 5;
46
+ */
47
+ marketType: MarketType;
48
+
49
+ /**
50
+ * @generated from field: uint32 imf_bps = 6;
51
+ */
52
+ imfBps: number;
53
+
54
+ /**
55
+ * @generated from field: uint32 cmf_bps = 7;
56
+ */
57
+ cmfBps: number;
58
+
59
+ /**
60
+ * @generated from field: uint32 mmf_bps = 8;
61
+ */
62
+ mmfBps: number;
63
+
64
+ /**
65
+ * @generated from field: string view_symbol = 10;
66
+ */
67
+ viewSymbol: string;
68
+ };
69
+
70
+ /**
71
+ * @generated from message nord.Market
72
+ */
73
+ export type MarketJson = {
74
+ /**
75
+ * @generated from field: uint32 market_id = 1;
76
+ */
77
+ marketId?: number;
78
+
79
+ /**
80
+ * @generated from field: uint32 price_decimals = 2;
81
+ */
82
+ priceDecimals?: number;
83
+
84
+ /**
85
+ * @generated from field: uint32 size_decimals = 3;
86
+ */
87
+ sizeDecimals?: number;
88
+
89
+ /**
90
+ * @generated from field: uint32 base_token_id = 4;
91
+ */
92
+ baseTokenId?: number;
93
+
94
+ /**
95
+ * @generated from field: nord.MarketType market_type = 5;
96
+ */
97
+ marketType?: MarketTypeJson;
98
+
99
+ /**
100
+ * @generated from field: uint32 imf_bps = 6;
101
+ */
102
+ imfBps?: number;
103
+
104
+ /**
105
+ * @generated from field: uint32 cmf_bps = 7;
106
+ */
107
+ cmfBps?: number;
108
+
109
+ /**
110
+ * @generated from field: uint32 mmf_bps = 8;
111
+ */
112
+ mmfBps?: number;
113
+
114
+ /**
115
+ * @generated from field: string view_symbol = 10;
116
+ */
117
+ viewSymbol?: string;
118
+ };
119
+
120
+ /**
121
+ * Describes the message nord.Market.
122
+ * Use `create(MarketSchema)` to create a new message.
123
+ */
124
+ export const MarketSchema: GenMessage<Market, {jsonType: MarketJson}> = /*@__PURE__*/
125
+ messageDesc(file_nord, 0);
126
+
127
+ /**
128
+ * @generated from message nord.Token
129
+ */
130
+ export type Token = Message<"nord.Token"> & {
131
+ /**
132
+ * @generated from field: uint32 token_id = 1;
133
+ */
134
+ tokenId: number;
135
+
136
+ /**
137
+ * / See CreateToken for details.
138
+ *
139
+ * @generated from field: uint32 token_decimals = 2;
140
+ */
141
+ tokenDecimals: number;
142
+
143
+ /**
144
+ * @generated from field: uint32 weight_bps = 4;
145
+ */
146
+ weightBps: number;
147
+
148
+ /**
149
+ * @generated from field: string view_symbol = 5;
150
+ */
151
+ viewSymbol: string;
152
+ };
153
+
154
+ /**
155
+ * @generated from message nord.Token
156
+ */
157
+ export type TokenJson = {
158
+ /**
159
+ * @generated from field: uint32 token_id = 1;
160
+ */
161
+ tokenId?: number;
162
+
163
+ /**
164
+ * / See CreateToken for details.
165
+ *
166
+ * @generated from field: uint32 token_decimals = 2;
167
+ */
168
+ tokenDecimals?: number;
169
+
170
+ /**
171
+ * @generated from field: uint32 weight_bps = 4;
172
+ */
173
+ weightBps?: number;
174
+
175
+ /**
176
+ * @generated from field: string view_symbol = 5;
177
+ */
178
+ viewSymbol?: string;
179
+ };
180
+
181
+ /**
182
+ * Describes the message nord.Token.
183
+ * Use `create(TokenSchema)` to create a new message.
184
+ */
185
+ export const TokenSchema: GenMessage<Token, {jsonType: TokenJson}> = /*@__PURE__*/
186
+ messageDesc(file_nord, 1);
187
+
188
+ /**
189
+ * quote_size = size * price, in decimals for specific market
190
+ * Use current market if you want realistic tick step exisitng on market.
191
+ * Use smaller prices for more granular quote size control,
192
+ * but beware it will be neared to possible value in engine.
193
+ *
194
+ * @generated from message nord.QuoteSize
195
+ */
196
+ export type QuoteSize = Message<"nord.QuoteSize"> & {
197
+ /**
198
+ * In `Market.size_decimals` decimals
199
+ *
200
+ * @generated from field: uint64 size = 1;
201
+ */
202
+ size: bigint;
203
+
204
+ /**
205
+ * In `Market.price_decimals` decimals
206
+ *
207
+ * @generated from field: uint64 price = 2;
208
+ */
209
+ price: bigint;
210
+ };
211
+
212
+ /**
213
+ * quote_size = size * price, in decimals for specific market
214
+ * Use current market if you want realistic tick step exisitng on market.
215
+ * Use smaller prices for more granular quote size control,
216
+ * but beware it will be neared to possible value in engine.
217
+ *
218
+ * @generated from message nord.QuoteSize
219
+ */
220
+ export type QuoteSizeJson = {
221
+ /**
222
+ * In `Market.size_decimals` decimals
223
+ *
224
+ * @generated from field: uint64 size = 1;
225
+ */
226
+ size?: string;
227
+
228
+ /**
229
+ * In `Market.price_decimals` decimals
230
+ *
231
+ * @generated from field: uint64 price = 2;
232
+ */
233
+ price?: string;
234
+ };
235
+
236
+ /**
237
+ * Describes the message nord.QuoteSize.
238
+ * Use `create(QuoteSizeSchema)` to create a new message.
239
+ */
240
+ export const QuoteSizeSchema: GenMessage<QuoteSize, {jsonType: QuoteSizeJson}> = /*@__PURE__*/
241
+ messageDesc(file_nord, 2);
242
+
243
+ /**
244
+ * @generated from message nord.OrderLimit
245
+ */
246
+ export type OrderLimit = Message<"nord.OrderLimit"> & {
247
+ /**
248
+ * @generated from field: uint64 price = 6;
249
+ */
250
+ price: bigint;
251
+
252
+ /**
253
+ * @generated from field: uint64 size = 7;
254
+ */
255
+ size: bigint;
256
+
257
+ /**
258
+ * Optional.
259
+ *
260
+ * @generated from field: nord.QuoteSize quote_size = 8;
261
+ */
262
+ quoteSize?: QuoteSize;
263
+ };
264
+
265
+ /**
266
+ * @generated from message nord.OrderLimit
267
+ */
268
+ export type OrderLimitJson = {
269
+ /**
270
+ * @generated from field: uint64 price = 6;
271
+ */
272
+ price?: string;
273
+
274
+ /**
275
+ * @generated from field: uint64 size = 7;
276
+ */
277
+ size?: string;
278
+
279
+ /**
280
+ * Optional.
281
+ *
282
+ * @generated from field: nord.QuoteSize quote_size = 8;
283
+ */
284
+ quoteSize?: QuoteSizeJson;
285
+ };
286
+
287
+ /**
288
+ * Describes the message nord.OrderLimit.
289
+ * Use `create(OrderLimitSchema)` to create a new message.
290
+ */
291
+ export const OrderLimitSchema: GenMessage<OrderLimit, {jsonType: OrderLimitJson}> = /*@__PURE__*/
292
+ messageDesc(file_nord, 3);
293
+
294
+ /**
295
+ * @generated from message nord.OrderType
296
+ */
297
+ export type OrderType = Message<"nord.OrderType"> & {
298
+ /**
299
+ * @generated from field: nord.Side side = 3;
300
+ */
301
+ side: Side;
302
+
303
+ /**
304
+ * @generated from field: nord.FillMode fill_mode = 4;
305
+ */
306
+ fillMode: FillMode;
307
+
308
+ /**
309
+ * @generated from field: bool is_reduce_only = 5;
310
+ */
311
+ isReduceOnly: boolean;
312
+ };
313
+
314
+ /**
315
+ * @generated from message nord.OrderType
316
+ */
317
+ export type OrderTypeJson = {
318
+ /**
319
+ * @generated from field: nord.Side side = 3;
320
+ */
321
+ side?: SideJson;
322
+
323
+ /**
324
+ * @generated from field: nord.FillMode fill_mode = 4;
325
+ */
326
+ fillMode?: FillModeJson;
327
+
328
+ /**
329
+ * @generated from field: bool is_reduce_only = 5;
330
+ */
331
+ isReduceOnly?: boolean;
332
+ };
333
+
334
+ /**
335
+ * Describes the message nord.OrderType.
336
+ * Use `create(OrderTypeSchema)` to create a new message.
337
+ */
338
+ export const OrderTypeSchema: GenMessage<OrderType, {jsonType: OrderTypeJson}> = /*@__PURE__*/
339
+ messageDesc(file_nord, 4);
340
+
341
+ /**
342
+ * @generated from message nord.TradeOrPlace
343
+ */
344
+ export type TradeOrPlace = Message<"nord.TradeOrPlace"> & {
345
+ /**
346
+ * @generated from field: uint32 market_id = 2;
347
+ */
348
+ marketId: number;
349
+
350
+ /**
351
+ * @generated from field: nord.OrderType order_type = 3;
352
+ */
353
+ orderType?: OrderType;
354
+
355
+ /**
356
+ * @generated from field: nord.OrderLimit limit = 6;
357
+ */
358
+ limit?: OrderLimit;
359
+
360
+ /**
361
+ * @generated from field: optional uint64 client_order_id = 33;
362
+ */
363
+ clientOrderId?: bigint;
364
+ };
365
+
366
+ /**
367
+ * @generated from message nord.TradeOrPlace
368
+ */
369
+ export type TradeOrPlaceJson = {
370
+ /**
371
+ * @generated from field: uint32 market_id = 2;
372
+ */
373
+ marketId?: number;
374
+
375
+ /**
376
+ * @generated from field: nord.OrderType order_type = 3;
377
+ */
378
+ orderType?: OrderTypeJson;
379
+
380
+ /**
381
+ * @generated from field: nord.OrderLimit limit = 6;
382
+ */
383
+ limit?: OrderLimitJson;
384
+
385
+ /**
386
+ * @generated from field: optional uint64 client_order_id = 33;
387
+ */
388
+ clientOrderId?: string;
389
+ };
390
+
391
+ /**
392
+ * Describes the message nord.TradeOrPlace.
393
+ * Use `create(TradeOrPlaceSchema)` to create a new message.
394
+ */
395
+ export const TradeOrPlaceSchema: GenMessage<TradeOrPlace, {jsonType: TradeOrPlaceJson}> = /*@__PURE__*/
396
+ messageDesc(file_nord, 5);
397
+
398
+ /**
399
+ * @generated from message nord.CancelOrder
400
+ */
401
+ export type CancelOrder = Message<"nord.CancelOrder"> & {
402
+ /**
403
+ * @generated from field: uint64 order_id = 2;
404
+ */
405
+ orderId: bigint;
406
+ };
407
+
408
+ /**
409
+ * @generated from message nord.CancelOrder
410
+ */
411
+ export type CancelOrderJson = {
412
+ /**
413
+ * @generated from field: uint64 order_id = 2;
414
+ */
415
+ orderId?: string;
416
+ };
417
+
418
+ /**
419
+ * Describes the message nord.CancelOrder.
420
+ * Use `create(CancelOrderSchema)` to create a new message.
421
+ */
422
+ export const CancelOrderSchema: GenMessage<CancelOrder, {jsonType: CancelOrderJson}> = /*@__PURE__*/
423
+ messageDesc(file_nord, 6);
424
+
425
+ /**
426
+ * @generated from message nord.Action
427
+ */
428
+ export type Action = Message<"nord.Action"> & {
429
+ /**
430
+ * Must be within 60s of the engine's current logical time, which
431
+ * should be within a few seconds of real time.
432
+ *
433
+ * Ignored for the `PythPriceFeedUpdate` action as that action updates
434
+ * the timestamp. Should be set to 0 in that case to omit it.
435
+ *
436
+ * @generated from field: int64 current_timestamp = 1;
437
+ */
438
+ currentTimestamp: bigint;
439
+
440
+ /**
441
+ * Optional nonce to handle if user wants several identical transactions to be
442
+ * executed with `current_timestamp`. Sending exactly same transaction twice
443
+ * is rejected. In order to change signature of transaction(execute it once
444
+ * more time), nonce should be changed(incremented).
445
+ *
446
+ * @generated from field: uint32 nonce = 2;
447
+ */
448
+ nonce: number;
449
+
450
+ /**
451
+ * @generated from oneof nord.Action.kind
452
+ */
453
+ kind: {
454
+ /**
455
+ * @generated from field: nord.Action.CreateSession create_session = 4;
456
+ */
457
+ value: Action_CreateSession;
458
+ case: "createSession";
459
+ } | {
460
+ /**
461
+ * @generated from field: nord.Action.CreateToken create_token = 5;
462
+ */
463
+ value: Action_CreateToken;
464
+ case: "createToken";
465
+ } | {
466
+ /**
467
+ * @generated from field: nord.Action.CreateMarket create_market = 6;
468
+ */
469
+ value: Action_CreateMarket;
470
+ case: "createMarket";
471
+ } | {
472
+ /**
473
+ * @generated from field: nord.Action.PlaceOrder place_order = 7;
474
+ */
475
+ value: Action_PlaceOrder;
476
+ case: "placeOrder";
477
+ } | {
478
+ /**
479
+ * @generated from field: nord.Action.CancelOrderById cancel_order_by_id = 8;
480
+ */
481
+ value: Action_CancelOrderById;
482
+ case: "cancelOrderById";
483
+ } | {
484
+ /**
485
+ * @generated from field: nord.Action.Deposit deposit = 9;
486
+ */
487
+ value: Action_Deposit;
488
+ case: "deposit";
489
+ } | {
490
+ /**
491
+ * @generated from field: nord.Action.Withdraw withdraw = 10;
492
+ */
493
+ value: Action_Withdraw;
494
+ case: "withdraw";
495
+ } | {
496
+ /**
497
+ * @generated from field: nord.Action.PythSetWormholeGuardians pyth_set_wormhole_guardians = 11;
498
+ */
499
+ value: Action_PythSetWormholeGuardians;
500
+ case: "pythSetWormholeGuardians";
501
+ } | {
502
+ /**
503
+ * @generated from field: nord.Action.PythSetSymbolFeed pyth_set_symbol_feed = 12;
504
+ */
505
+ value: Action_PythSetSymbolFeed;
506
+ case: "pythSetSymbolFeed";
507
+ } | {
508
+ /**
509
+ * @generated from field: nord.Action.PythPriceFeedUpdate pyth_price_feed_update = 13;
510
+ */
511
+ value: Action_PythPriceFeedUpdate;
512
+ case: "pythPriceFeedUpdate";
513
+ } | {
514
+ /**
515
+ * @generated from field: nord.Action.Liquidate liquidate = 14;
516
+ */
517
+ value: Action_Liquidate;
518
+ case: "liquidate";
519
+ } | {
520
+ /**
521
+ * @generated from field: nord.Action.RevokeSession revoke_session = 15;
522
+ */
523
+ value: Action_RevokeSession;
524
+ case: "revokeSession";
525
+ } | {
526
+ /**
527
+ * @generated from field: nord.Action.Pause pause = 16;
528
+ */
529
+ value: Action_Pause;
530
+ case: "pause";
531
+ } | {
532
+ /**
533
+ * @generated from field: nord.Action.Unpause unpause = 17;
534
+ */
535
+ value: Action_Unpause;
536
+ case: "unpause";
537
+ } | {
538
+ /**
539
+ * @generated from field: nord.Action.Transfer transfer = 18;
540
+ */
541
+ value: Action_Transfer;
542
+ case: "transfer";
543
+ } | {
544
+ /**
545
+ * @generated from field: nord.Action.AddTrigger add_trigger = 32;
546
+ */
547
+ value: Action_AddTrigger;
548
+ case: "addTrigger";
549
+ } | {
550
+ /**
551
+ * @generated from field: nord.Action.RemoveTrigger remove_trigger = 33;
552
+ */
553
+ value: Action_RemoveTrigger;
554
+ case: "removeTrigger";
555
+ } | {
556
+ /**
557
+ * @generated from field: nord.Action.TakePosition take_position = 34;
558
+ */
559
+ value: Action_TakePosition;
560
+ case: "takePosition";
561
+ } | {
562
+ /**
563
+ * @generated from field: nord.Atomic atomic = 35;
564
+ */
565
+ value: Atomic;
566
+ case: "atomic";
567
+ } | { case: undefined; value?: undefined };
568
+ };
569
+
570
+ /**
571
+ * @generated from message nord.Action
572
+ */
573
+ export type ActionJson = {
574
+ /**
575
+ * Must be within 60s of the engine's current logical time, which
576
+ * should be within a few seconds of real time.
577
+ *
578
+ * Ignored for the `PythPriceFeedUpdate` action as that action updates
579
+ * the timestamp. Should be set to 0 in that case to omit it.
580
+ *
581
+ * @generated from field: int64 current_timestamp = 1;
582
+ */
583
+ currentTimestamp?: string;
584
+
585
+ /**
586
+ * Optional nonce to handle if user wants several identical transactions to be
587
+ * executed with `current_timestamp`. Sending exactly same transaction twice
588
+ * is rejected. In order to change signature of transaction(execute it once
589
+ * more time), nonce should be changed(incremented).
590
+ *
591
+ * @generated from field: uint32 nonce = 2;
592
+ */
593
+ nonce?: number;
594
+
595
+ /**
596
+ * @generated from field: nord.Action.CreateSession create_session = 4;
597
+ */
598
+ createSession?: Action_CreateSessionJson;
599
+
600
+ /**
601
+ * @generated from field: nord.Action.CreateToken create_token = 5;
602
+ */
603
+ createToken?: Action_CreateTokenJson;
604
+
605
+ /**
606
+ * @generated from field: nord.Action.CreateMarket create_market = 6;
607
+ */
608
+ createMarket?: Action_CreateMarketJson;
609
+
610
+ /**
611
+ * @generated from field: nord.Action.PlaceOrder place_order = 7;
612
+ */
613
+ placeOrder?: Action_PlaceOrderJson;
614
+
615
+ /**
616
+ * @generated from field: nord.Action.CancelOrderById cancel_order_by_id = 8;
617
+ */
618
+ cancelOrderById?: Action_CancelOrderByIdJson;
619
+
620
+ /**
621
+ * @generated from field: nord.Action.Deposit deposit = 9;
622
+ */
623
+ deposit?: Action_DepositJson;
624
+
625
+ /**
626
+ * @generated from field: nord.Action.Withdraw withdraw = 10;
627
+ */
628
+ withdraw?: Action_WithdrawJson;
629
+
630
+ /**
631
+ * @generated from field: nord.Action.PythSetWormholeGuardians pyth_set_wormhole_guardians = 11;
632
+ */
633
+ pythSetWormholeGuardians?: Action_PythSetWormholeGuardiansJson;
634
+
635
+ /**
636
+ * @generated from field: nord.Action.PythSetSymbolFeed pyth_set_symbol_feed = 12;
637
+ */
638
+ pythSetSymbolFeed?: Action_PythSetSymbolFeedJson;
639
+
640
+ /**
641
+ * @generated from field: nord.Action.PythPriceFeedUpdate pyth_price_feed_update = 13;
642
+ */
643
+ pythPriceFeedUpdate?: Action_PythPriceFeedUpdateJson;
644
+
645
+ /**
646
+ * @generated from field: nord.Action.Liquidate liquidate = 14;
647
+ */
648
+ liquidate?: Action_LiquidateJson;
649
+
650
+ /**
651
+ * @generated from field: nord.Action.RevokeSession revoke_session = 15;
652
+ */
653
+ revokeSession?: Action_RevokeSessionJson;
654
+
655
+ /**
656
+ * @generated from field: nord.Action.Pause pause = 16;
657
+ */
658
+ pause?: Action_PauseJson;
659
+
660
+ /**
661
+ * @generated from field: nord.Action.Unpause unpause = 17;
662
+ */
663
+ unpause?: Action_UnpauseJson;
664
+
665
+ /**
666
+ * @generated from field: nord.Action.Transfer transfer = 18;
667
+ */
668
+ transfer?: Action_TransferJson;
669
+
670
+ /**
671
+ * @generated from field: nord.Action.AddTrigger add_trigger = 32;
672
+ */
673
+ addTrigger?: Action_AddTriggerJson;
674
+
675
+ /**
676
+ * @generated from field: nord.Action.RemoveTrigger remove_trigger = 33;
677
+ */
678
+ removeTrigger?: Action_RemoveTriggerJson;
679
+
680
+ /**
681
+ * @generated from field: nord.Action.TakePosition take_position = 34;
682
+ */
683
+ takePosition?: Action_TakePositionJson;
684
+
685
+ /**
686
+ * @generated from field: nord.Atomic atomic = 35;
687
+ */
688
+ atomic?: AtomicJson;
689
+ };
690
+
691
+ /**
692
+ * Describes the message nord.Action.
693
+ * Use `create(ActionSchema)` to create a new message.
694
+ */
695
+ export const ActionSchema: GenMessage<Action, {jsonType: ActionJson}> = /*@__PURE__*/
696
+ messageDesc(file_nord, 7);
697
+
698
+ /**
699
+ * @generated from message nord.Action.CreateSession
700
+ */
701
+ export type Action_CreateSession = Message<"nord.Action.CreateSession"> & {
702
+ /**
703
+ * User's SECP256K1 registration public key, 33 bytes long;
704
+ * user must be previously registered with that key
705
+ *
706
+ * @generated from field: bytes user_pubkey = 1;
707
+ */
708
+ userPubkey: Uint8Array;
709
+
710
+ /**
711
+ * MUST be 32 bytes.
712
+ *
713
+ * @generated from field: bytes blst_pubkey = 2;
714
+ */
715
+ blstPubkey: Uint8Array;
716
+
717
+ /**
718
+ * @generated from field: int64 expiry_timestamp = 3;
719
+ */
720
+ expiryTimestamp: bigint;
721
+ };
722
+
723
+ /**
724
+ * @generated from message nord.Action.CreateSession
725
+ */
726
+ export type Action_CreateSessionJson = {
727
+ /**
728
+ * User's SECP256K1 registration public key, 33 bytes long;
729
+ * user must be previously registered with that key
730
+ *
731
+ * @generated from field: bytes user_pubkey = 1;
732
+ */
733
+ userPubkey?: string;
734
+
735
+ /**
736
+ * MUST be 32 bytes.
737
+ *
738
+ * @generated from field: bytes blst_pubkey = 2;
739
+ */
740
+ blstPubkey?: string;
741
+
742
+ /**
743
+ * @generated from field: int64 expiry_timestamp = 3;
744
+ */
745
+ expiryTimestamp?: string;
746
+ };
747
+
748
+ /**
749
+ * Describes the message nord.Action.CreateSession.
750
+ * Use `create(Action_CreateSessionSchema)` to create a new message.
751
+ */
752
+ export const Action_CreateSessionSchema: GenMessage<Action_CreateSession, {jsonType: Action_CreateSessionJson}> = /*@__PURE__*/
753
+ messageDesc(file_nord, 7, 0);
754
+
755
+ /**
756
+ * @generated from message nord.Action.CreateToken
757
+ */
758
+ export type Action_CreateToken = Message<"nord.Action.CreateToken"> & {
759
+ /**
760
+ * / Example:
761
+ * / Settlement 1 ETH is 10**18 value.
762
+ * / With `token_decimals` of `10`, engine balance will have 1 ETH = 10**10
763
+ * / value. Rollup sends to engine and expects from engine 10**10 as 1 ETH
764
+ * / value. So if user has on balance 10**9 of ETH, it means he has 0.1 ETH
765
+ * / on engine balance and in settlement, but in settlement it will be
766
+ * / represented as 10**17 value. As consequence, if oracle gives index_price
767
+ * / of 1 ETH as it is in Ethereum, we must divide balance by
768
+ * / `10**token_decimals` and multiply by price to get USD value (do not
769
+ * / forget allow for rounding sub USD values). As for market price, to trade
770
+ * / 0.1 ETH,
771
+ * need to 1/10 / 10**token_decimals * 10**Market.size_decimals
772
+ *
773
+ * @generated from field: uint32 token_decimals = 1;
774
+ */
775
+ tokenDecimals: number;
776
+
777
+ /**
778
+ * @generated from field: uint32 weight_bps = 3;
779
+ */
780
+ weightBps: number;
781
+
782
+ /**
783
+ * @generated from field: string view_symbol = 4;
784
+ */
785
+ viewSymbol: string;
786
+
787
+ /**
788
+ * / Used to bind to relevant oracle feed
789
+ *
790
+ * @generated from field: string oracle_symbol = 5;
791
+ */
792
+ oracleSymbol: string;
793
+
794
+ /**
795
+ * On chain id for the wrapped asset on the rollup
796
+ *
797
+ * @generated from field: bytes sol_addr = 6;
798
+ */
799
+ solAddr: Uint8Array;
800
+ };
801
+
802
+ /**
803
+ * @generated from message nord.Action.CreateToken
804
+ */
805
+ export type Action_CreateTokenJson = {
806
+ /**
807
+ * / Example:
808
+ * / Settlement 1 ETH is 10**18 value.
809
+ * / With `token_decimals` of `10`, engine balance will have 1 ETH = 10**10
810
+ * / value. Rollup sends to engine and expects from engine 10**10 as 1 ETH
811
+ * / value. So if user has on balance 10**9 of ETH, it means he has 0.1 ETH
812
+ * / on engine balance and in settlement, but in settlement it will be
813
+ * / represented as 10**17 value. As consequence, if oracle gives index_price
814
+ * / of 1 ETH as it is in Ethereum, we must divide balance by
815
+ * / `10**token_decimals` and multiply by price to get USD value (do not
816
+ * / forget allow for rounding sub USD values). As for market price, to trade
817
+ * / 0.1 ETH,
818
+ * need to 1/10 / 10**token_decimals * 10**Market.size_decimals
819
+ *
820
+ * @generated from field: uint32 token_decimals = 1;
821
+ */
822
+ tokenDecimals?: number;
823
+
824
+ /**
825
+ * @generated from field: uint32 weight_bps = 3;
826
+ */
827
+ weightBps?: number;
828
+
829
+ /**
830
+ * @generated from field: string view_symbol = 4;
831
+ */
832
+ viewSymbol?: string;
833
+
834
+ /**
835
+ * / Used to bind to relevant oracle feed
836
+ *
837
+ * @generated from field: string oracle_symbol = 5;
838
+ */
839
+ oracleSymbol?: string;
840
+
841
+ /**
842
+ * On chain id for the wrapped asset on the rollup
843
+ *
844
+ * @generated from field: bytes sol_addr = 6;
845
+ */
846
+ solAddr?: string;
847
+ };
848
+
849
+ /**
850
+ * Describes the message nord.Action.CreateToken.
851
+ * Use `create(Action_CreateTokenSchema)` to create a new message.
852
+ */
853
+ export const Action_CreateTokenSchema: GenMessage<Action_CreateToken, {jsonType: Action_CreateTokenJson}> = /*@__PURE__*/
854
+ messageDesc(file_nord, 7, 1);
855
+
856
+ /**
857
+ * @generated from message nord.Action.CreateMarket
858
+ */
859
+ export type Action_CreateMarket = Message<"nord.Action.CreateMarket"> & {
860
+ /**
861
+ * @generated from field: uint32 size_decimals = 1;
862
+ */
863
+ sizeDecimals: number;
864
+
865
+ /**
866
+ * @generated from field: uint32 price_decimals = 2;
867
+ */
868
+ priceDecimals: number;
869
+
870
+ /**
871
+ * @generated from field: uint32 imf_bps = 3;
872
+ */
873
+ imfBps: number;
874
+
875
+ /**
876
+ * @generated from field: uint32 cmf_bps = 4;
877
+ */
878
+ cmfBps: number;
879
+
880
+ /**
881
+ * @generated from field: uint32 mmf_bps = 5;
882
+ */
883
+ mmfBps: number;
884
+
885
+ /**
886
+ * @generated from field: nord.MarketType market_type = 6;
887
+ */
888
+ marketType: MarketType;
889
+
890
+ /**
891
+ * Arbitrary human-readable market symbol, not to be confused with token's
892
+ * symbol
893
+ *
894
+ * @generated from field: string view_symbol = 7;
895
+ */
896
+ viewSymbol: string;
897
+
898
+ /**
899
+ * Oracle symbol which references specific price feed. Must be
900
+ * `oracle_symbol` of registered price feed
901
+ *
902
+ * @generated from field: string oracle_symbol = 8;
903
+ */
904
+ oracleSymbol: string;
905
+
906
+ /**
907
+ * One of registered `token_id`'s.
908
+ *
909
+ * Base token for `MarketType::Spot`.
910
+ *
911
+ * Same as quote token id for `MarketType::Perpetual`. `oracle_symbol`
912
+ * identifies relevant price feed.
913
+ *
914
+ * @generated from field: uint32 base_token_id = 9;
915
+ */
916
+ baseTokenId: number;
917
+ };
918
+
919
+ /**
920
+ * @generated from message nord.Action.CreateMarket
921
+ */
922
+ export type Action_CreateMarketJson = {
923
+ /**
924
+ * @generated from field: uint32 size_decimals = 1;
925
+ */
926
+ sizeDecimals?: number;
927
+
928
+ /**
929
+ * @generated from field: uint32 price_decimals = 2;
930
+ */
931
+ priceDecimals?: number;
932
+
933
+ /**
934
+ * @generated from field: uint32 imf_bps = 3;
935
+ */
936
+ imfBps?: number;
937
+
938
+ /**
939
+ * @generated from field: uint32 cmf_bps = 4;
940
+ */
941
+ cmfBps?: number;
942
+
943
+ /**
944
+ * @generated from field: uint32 mmf_bps = 5;
945
+ */
946
+ mmfBps?: number;
947
+
948
+ /**
949
+ * @generated from field: nord.MarketType market_type = 6;
950
+ */
951
+ marketType?: MarketTypeJson;
952
+
953
+ /**
954
+ * Arbitrary human-readable market symbol, not to be confused with token's
955
+ * symbol
956
+ *
957
+ * @generated from field: string view_symbol = 7;
958
+ */
959
+ viewSymbol?: string;
960
+
961
+ /**
962
+ * Oracle symbol which references specific price feed. Must be
963
+ * `oracle_symbol` of registered price feed
964
+ *
965
+ * @generated from field: string oracle_symbol = 8;
966
+ */
967
+ oracleSymbol?: string;
968
+
969
+ /**
970
+ * One of registered `token_id`'s.
971
+ *
972
+ * Base token for `MarketType::Spot`.
973
+ *
974
+ * Same as quote token id for `MarketType::Perpetual`. `oracle_symbol`
975
+ * identifies relevant price feed.
976
+ *
977
+ * @generated from field: uint32 base_token_id = 9;
978
+ */
979
+ baseTokenId?: number;
980
+ };
981
+
982
+ /**
983
+ * Describes the message nord.Action.CreateMarket.
984
+ * Use `create(Action_CreateMarketSchema)` to create a new message.
985
+ */
986
+ export const Action_CreateMarketSchema: GenMessage<Action_CreateMarket, {jsonType: Action_CreateMarketJson}> = /*@__PURE__*/
987
+ messageDesc(file_nord, 7, 2);
988
+
989
+ /**
990
+ * Note on order size.
991
+ * Any order being placed has absolute maximum size, which is 2^48-1.
992
+ * Although, this limit is applied not to initial order being placed
993
+ * but to final order being added to market's orderbook.
994
+ * This behavior exists because order can be limited by quote size,
995
+ * which converts to order size in a non-linear manner.
996
+ *
997
+ * Some orders can be executed immediately, in this no order will be added to
998
+ * orderbook, no order id created. Consider using `client_order_id` to track
999
+ * execution of such orders.
1000
+ *
1001
+ * Example: User posts order with size 2^48+100_000. Order fills counter
1002
+ * orders and its size is reduced to 2^48-1_000_000 in process. This order
1003
+ * will be added to orderbook successfully despite its initial size is above
1004
+ * limit.
1005
+ *
1006
+ * @generated from message nord.Action.PlaceOrder
1007
+ */
1008
+ export type Action_PlaceOrder = Message<"nord.Action.PlaceOrder"> & {
1009
+ /**
1010
+ * @generated from field: uint64 session_id = 1;
1011
+ */
1012
+ sessionId: bigint;
1013
+
1014
+ /**
1015
+ * @generated from field: uint32 market_id = 2;
1016
+ */
1017
+ marketId: number;
1018
+
1019
+ /**
1020
+ * @generated from field: nord.Side side = 3;
1021
+ */
1022
+ side: Side;
1023
+
1024
+ /**
1025
+ * @generated from field: nord.FillMode fill_mode = 4;
1026
+ */
1027
+ fillMode: FillMode;
1028
+
1029
+ /**
1030
+ * A reduce-only order only reduces your current position, as opposed to
1031
+ * increasing it. It means you can only use it to close a position. In
1032
+ * contrast, non-reduce-only orders can reduce or increase your position.
1033
+ * Reduce is handled by dynamically reducing or adjusting limit order's
1034
+ * contract quantity
1035
+ * / to match the contract size of the open position.
1036
+ *
1037
+ * @generated from field: bool is_reduce_only = 5;
1038
+ */
1039
+ isReduceOnly: boolean;
1040
+
1041
+ /**
1042
+ * Raw integral value of order limit price.
1043
+ * `1` here equals to market's `10^-price_decimals`
1044
+ * When used in token balances and reward computations, shifted by market's
1045
+ * `price_decimals`. Optional, treated as not set if 0.
1046
+ *
1047
+ * @generated from field: uint64 price = 6;
1048
+ */
1049
+ price: bigint;
1050
+
1051
+ /**
1052
+ * Raw integral value of order size limit.
1053
+ * For spot markers measured in base size,
1054
+ * for perpetuals in contract token.
1055
+ * So using base as default naming in codebase.
1056
+ * `1` here equals to market's `10^-size_decimals`
1057
+ * When used in token balances and reward computations, shifted by market's
1058
+ * `size_decimals`. Optional, treated as not set if 0.
1059
+ *
1060
+ * @generated from field: uint64 size = 7;
1061
+ */
1062
+ size: bigint;
1063
+
1064
+ /**
1065
+ * Quote size limit.
1066
+ * Optional, treated as not set if 0.
1067
+ *
1068
+ * @generated from field: nord.QuoteSize quote_size = 8;
1069
+ */
1070
+ quoteSize?: QuoteSize;
1071
+
1072
+ /**
1073
+ * Optional account on behalf of whom the order should be placed.
1074
+ * Executed only if sender has delegated authority to do so,
1075
+ * like admin user or liquidator bot.
1076
+ * # Delegation allowed if:
1077
+ * - trigger
1078
+ * - reduce bad position
1079
+ * - sell at good price to reduce if cannot cover bad position
1080
+ *
1081
+ * @generated from field: optional uint32 delegator_account_id = 32;
1082
+ */
1083
+ delegatorAccountId?: number;
1084
+
1085
+ /**
1086
+ * Caller provided opaque order identifier up to 8 bytes.
1087
+ * Not used by engine, but can be used by client to track orders.
1088
+ *
1089
+ * @generated from field: optional uint64 client_order_id = 33;
1090
+ */
1091
+ clientOrderId?: bigint;
1092
+
1093
+ /**
1094
+ * Account id which performs operation;
1095
+ * if not specified, first account of session's owner user is picked
1096
+ *
1097
+ * @generated from field: optional uint32 sender_account_id = 34;
1098
+ */
1099
+ senderAccountId?: number;
1100
+
1101
+ /**
1102
+ * Opaque identifier chosen by the sender to be able to correlate this
1103
+ * place order requests with the corresponding fill and place order events.
1104
+ *
1105
+ * @generated from field: optional uint64 sender_tracking_id = 35;
1106
+ */
1107
+ senderTrackingId?: bigint;
1108
+ };
1109
+
1110
+ /**
1111
+ * Note on order size.
1112
+ * Any order being placed has absolute maximum size, which is 2^48-1.
1113
+ * Although, this limit is applied not to initial order being placed
1114
+ * but to final order being added to market's orderbook.
1115
+ * This behavior exists because order can be limited by quote size,
1116
+ * which converts to order size in a non-linear manner.
1117
+ *
1118
+ * Some orders can be executed immediately, in this no order will be added to
1119
+ * orderbook, no order id created. Consider using `client_order_id` to track
1120
+ * execution of such orders.
1121
+ *
1122
+ * Example: User posts order with size 2^48+100_000. Order fills counter
1123
+ * orders and its size is reduced to 2^48-1_000_000 in process. This order
1124
+ * will be added to orderbook successfully despite its initial size is above
1125
+ * limit.
1126
+ *
1127
+ * @generated from message nord.Action.PlaceOrder
1128
+ */
1129
+ export type Action_PlaceOrderJson = {
1130
+ /**
1131
+ * @generated from field: uint64 session_id = 1;
1132
+ */
1133
+ sessionId?: string;
1134
+
1135
+ /**
1136
+ * @generated from field: uint32 market_id = 2;
1137
+ */
1138
+ marketId?: number;
1139
+
1140
+ /**
1141
+ * @generated from field: nord.Side side = 3;
1142
+ */
1143
+ side?: SideJson;
1144
+
1145
+ /**
1146
+ * @generated from field: nord.FillMode fill_mode = 4;
1147
+ */
1148
+ fillMode?: FillModeJson;
1149
+
1150
+ /**
1151
+ * A reduce-only order only reduces your current position, as opposed to
1152
+ * increasing it. It means you can only use it to close a position. In
1153
+ * contrast, non-reduce-only orders can reduce or increase your position.
1154
+ * Reduce is handled by dynamically reducing or adjusting limit order's
1155
+ * contract quantity
1156
+ * / to match the contract size of the open position.
1157
+ *
1158
+ * @generated from field: bool is_reduce_only = 5;
1159
+ */
1160
+ isReduceOnly?: boolean;
1161
+
1162
+ /**
1163
+ * Raw integral value of order limit price.
1164
+ * `1` here equals to market's `10^-price_decimals`
1165
+ * When used in token balances and reward computations, shifted by market's
1166
+ * `price_decimals`. Optional, treated as not set if 0.
1167
+ *
1168
+ * @generated from field: uint64 price = 6;
1169
+ */
1170
+ price?: string;
1171
+
1172
+ /**
1173
+ * Raw integral value of order size limit.
1174
+ * For spot markers measured in base size,
1175
+ * for perpetuals in contract token.
1176
+ * So using base as default naming in codebase.
1177
+ * `1` here equals to market's `10^-size_decimals`
1178
+ * When used in token balances and reward computations, shifted by market's
1179
+ * `size_decimals`. Optional, treated as not set if 0.
1180
+ *
1181
+ * @generated from field: uint64 size = 7;
1182
+ */
1183
+ size?: string;
1184
+
1185
+ /**
1186
+ * Quote size limit.
1187
+ * Optional, treated as not set if 0.
1188
+ *
1189
+ * @generated from field: nord.QuoteSize quote_size = 8;
1190
+ */
1191
+ quoteSize?: QuoteSizeJson;
1192
+
1193
+ /**
1194
+ * Optional account on behalf of whom the order should be placed.
1195
+ * Executed only if sender has delegated authority to do so,
1196
+ * like admin user or liquidator bot.
1197
+ * # Delegation allowed if:
1198
+ * - trigger
1199
+ * - reduce bad position
1200
+ * - sell at good price to reduce if cannot cover bad position
1201
+ *
1202
+ * @generated from field: optional uint32 delegator_account_id = 32;
1203
+ */
1204
+ delegatorAccountId?: number;
1205
+
1206
+ /**
1207
+ * Caller provided opaque order identifier up to 8 bytes.
1208
+ * Not used by engine, but can be used by client to track orders.
1209
+ *
1210
+ * @generated from field: optional uint64 client_order_id = 33;
1211
+ */
1212
+ clientOrderId?: string;
1213
+
1214
+ /**
1215
+ * Account id which performs operation;
1216
+ * if not specified, first account of session's owner user is picked
1217
+ *
1218
+ * @generated from field: optional uint32 sender_account_id = 34;
1219
+ */
1220
+ senderAccountId?: number;
1221
+
1222
+ /**
1223
+ * Opaque identifier chosen by the sender to be able to correlate this
1224
+ * place order requests with the corresponding fill and place order events.
1225
+ *
1226
+ * @generated from field: optional uint64 sender_tracking_id = 35;
1227
+ */
1228
+ senderTrackingId?: string;
1229
+ };
1230
+
1231
+ /**
1232
+ * Describes the message nord.Action.PlaceOrder.
1233
+ * Use `create(Action_PlaceOrderSchema)` to create a new message.
1234
+ */
1235
+ export const Action_PlaceOrderSchema: GenMessage<Action_PlaceOrder, {jsonType: Action_PlaceOrderJson}> = /*@__PURE__*/
1236
+ messageDesc(file_nord, 7, 3);
1237
+
1238
+ /**
1239
+ * @generated from message nord.Action.CancelOrderById
1240
+ */
1241
+ export type Action_CancelOrderById = Message<"nord.Action.CancelOrderById"> & {
1242
+ /**
1243
+ * @generated from field: uint64 session_id = 1;
1244
+ */
1245
+ sessionId: bigint;
1246
+
1247
+ /**
1248
+ * @generated from field: uint64 order_id = 2;
1249
+ */
1250
+ orderId: bigint;
1251
+
1252
+ /**
1253
+ * @generated from field: optional uint32 delegator_account_id = 32;
1254
+ */
1255
+ delegatorAccountId?: number;
1256
+
1257
+ /**
1258
+ * @generated from field: optional uint32 sender_account_id = 33;
1259
+ */
1260
+ senderAccountId?: number;
1261
+ };
1262
+
1263
+ /**
1264
+ * @generated from message nord.Action.CancelOrderById
1265
+ */
1266
+ export type Action_CancelOrderByIdJson = {
1267
+ /**
1268
+ * @generated from field: uint64 session_id = 1;
1269
+ */
1270
+ sessionId?: string;
1271
+
1272
+ /**
1273
+ * @generated from field: uint64 order_id = 2;
1274
+ */
1275
+ orderId?: string;
1276
+
1277
+ /**
1278
+ * @generated from field: optional uint32 delegator_account_id = 32;
1279
+ */
1280
+ delegatorAccountId?: number;
1281
+
1282
+ /**
1283
+ * @generated from field: optional uint32 sender_account_id = 33;
1284
+ */
1285
+ senderAccountId?: number;
1286
+ };
1287
+
1288
+ /**
1289
+ * Describes the message nord.Action.CancelOrderById.
1290
+ * Use `create(Action_CancelOrderByIdSchema)` to create a new message.
1291
+ */
1292
+ export const Action_CancelOrderByIdSchema: GenMessage<Action_CancelOrderById, {jsonType: Action_CancelOrderByIdJson}> = /*@__PURE__*/
1293
+ messageDesc(file_nord, 7, 4);
1294
+
1295
+ /**
1296
+ * @generated from message nord.Action.Deposit
1297
+ */
1298
+ export type Action_Deposit = Message<"nord.Action.Deposit"> & {
1299
+ /**
1300
+ * used for integration of rollup with nord app
1301
+ *
1302
+ * @generated from field: uint64 action_nonce = 1;
1303
+ */
1304
+ actionNonce: bigint;
1305
+
1306
+ /**
1307
+ * @generated from field: bytes token_addr = 2;
1308
+ */
1309
+ tokenAddr: Uint8Array;
1310
+
1311
+ /**
1312
+ * Shifted by the token's decimals.
1313
+ *
1314
+ * @generated from field: uint64 amount = 3;
1315
+ */
1316
+ amount: bigint;
1317
+
1318
+ /**
1319
+ * User's SECP256K1 registration public key, 33 bytes long
1320
+ *
1321
+ * @generated from field: bytes user_pubkey = 4;
1322
+ */
1323
+ userPubkey: Uint8Array;
1324
+ };
1325
+
1326
+ /**
1327
+ * @generated from message nord.Action.Deposit
1328
+ */
1329
+ export type Action_DepositJson = {
1330
+ /**
1331
+ * used for integration of rollup with nord app
1332
+ *
1333
+ * @generated from field: uint64 action_nonce = 1;
1334
+ */
1335
+ actionNonce?: string;
1336
+
1337
+ /**
1338
+ * @generated from field: bytes token_addr = 2;
1339
+ */
1340
+ tokenAddr?: string;
1341
+
1342
+ /**
1343
+ * Shifted by the token's decimals.
1344
+ *
1345
+ * @generated from field: uint64 amount = 3;
1346
+ */
1347
+ amount?: string;
1348
+
1349
+ /**
1350
+ * User's SECP256K1 registration public key, 33 bytes long
1351
+ *
1352
+ * @generated from field: bytes user_pubkey = 4;
1353
+ */
1354
+ userPubkey?: string;
1355
+ };
1356
+
1357
+ /**
1358
+ * Describes the message nord.Action.Deposit.
1359
+ * Use `create(Action_DepositSchema)` to create a new message.
1360
+ */
1361
+ export const Action_DepositSchema: GenMessage<Action_Deposit, {jsonType: Action_DepositJson}> = /*@__PURE__*/
1362
+ messageDesc(file_nord, 7, 5);
1363
+
1364
+ /**
1365
+ * todo(n1): when gate will be here, remove or replace internals with message
1366
+ *
1367
+ * @generated from message nord.Action.Withdraw
1368
+ */
1369
+ export type Action_Withdraw = Message<"nord.Action.Withdraw"> & {
1370
+ /**
1371
+ * @generated from field: uint32 token_id = 1;
1372
+ */
1373
+ tokenId: number;
1374
+
1375
+ /**
1376
+ * @generated from field: uint64 session_id = 2;
1377
+ */
1378
+ sessionId: bigint;
1379
+
1380
+ /**
1381
+ * Shifted by the token's decimals.
1382
+ *
1383
+ * @generated from field: uint64 amount = 3;
1384
+ */
1385
+ amount: bigint;
1386
+ };
1387
+
1388
+ /**
1389
+ * todo(n1): when gate will be here, remove or replace internals with message
1390
+ *
1391
+ * @generated from message nord.Action.Withdraw
1392
+ */
1393
+ export type Action_WithdrawJson = {
1394
+ /**
1395
+ * @generated from field: uint32 token_id = 1;
1396
+ */
1397
+ tokenId?: number;
1398
+
1399
+ /**
1400
+ * @generated from field: uint64 session_id = 2;
1401
+ */
1402
+ sessionId?: string;
1403
+
1404
+ /**
1405
+ * Shifted by the token's decimals.
1406
+ *
1407
+ * @generated from field: uint64 amount = 3;
1408
+ */
1409
+ amount?: string;
1410
+ };
1411
+
1412
+ /**
1413
+ * Describes the message nord.Action.Withdraw.
1414
+ * Use `create(Action_WithdrawSchema)` to create a new message.
1415
+ */
1416
+ export const Action_WithdrawSchema: GenMessage<Action_Withdraw, {jsonType: Action_WithdrawJson}> = /*@__PURE__*/
1417
+ messageDesc(file_nord, 7, 6);
1418
+
1419
+ /**
1420
+ * @generated from message nord.Action.PythSetWormholeGuardians
1421
+ */
1422
+ export type Action_PythSetWormholeGuardians = Message<"nord.Action.PythSetWormholeGuardians"> & {
1423
+ /**
1424
+ * See
1425
+ * https://docs.wormholescan.io/#/Guardian/guardian-set
1426
+ *
1427
+ * @generated from field: uint32 guardian_set_index = 1;
1428
+ */
1429
+ guardianSetIndex: number;
1430
+
1431
+ /**
1432
+ * Each address is 20 bytes, consisting of the last 20 bytes
1433
+ * of the keccak256 hash of the public key of the guardian.
1434
+ *
1435
+ * @generated from field: repeated bytes addresses = 2;
1436
+ */
1437
+ addresses: Uint8Array[];
1438
+ };
1439
+
1440
+ /**
1441
+ * @generated from message nord.Action.PythSetWormholeGuardians
1442
+ */
1443
+ export type Action_PythSetWormholeGuardiansJson = {
1444
+ /**
1445
+ * See
1446
+ * https://docs.wormholescan.io/#/Guardian/guardian-set
1447
+ *
1448
+ * @generated from field: uint32 guardian_set_index = 1;
1449
+ */
1450
+ guardianSetIndex?: number;
1451
+
1452
+ /**
1453
+ * Each address is 20 bytes, consisting of the last 20 bytes
1454
+ * of the keccak256 hash of the public key of the guardian.
1455
+ *
1456
+ * @generated from field: repeated bytes addresses = 2;
1457
+ */
1458
+ addresses?: string[];
1459
+ };
1460
+
1461
+ /**
1462
+ * Describes the message nord.Action.PythSetWormholeGuardians.
1463
+ * Use `create(Action_PythSetWormholeGuardiansSchema)` to create a new message.
1464
+ */
1465
+ export const Action_PythSetWormholeGuardiansSchema: GenMessage<Action_PythSetWormholeGuardians, {jsonType: Action_PythSetWormholeGuardiansJson}> = /*@__PURE__*/
1466
+ messageDesc(file_nord, 7, 7);
1467
+
1468
+ /**
1469
+ * Associate a oracle symbol to a Pyth Feed ID.
1470
+ *
1471
+ * @generated from message nord.Action.PythSetSymbolFeed
1472
+ */
1473
+ export type Action_PythSetSymbolFeed = Message<"nord.Action.PythSetSymbolFeed"> & {
1474
+ /**
1475
+ * @generated from field: string oracle_symbol = 1;
1476
+ */
1477
+ oracleSymbol: string;
1478
+
1479
+ /**
1480
+ * MUST be 32 bytes.
1481
+ *
1482
+ * @generated from field: bytes price_feed_id = 2;
1483
+ */
1484
+ priceFeedId: Uint8Array;
1485
+ };
1486
+
1487
+ /**
1488
+ * Associate a oracle symbol to a Pyth Feed ID.
1489
+ *
1490
+ * @generated from message nord.Action.PythSetSymbolFeed
1491
+ */
1492
+ export type Action_PythSetSymbolFeedJson = {
1493
+ /**
1494
+ * @generated from field: string oracle_symbol = 1;
1495
+ */
1496
+ oracleSymbol?: string;
1497
+
1498
+ /**
1499
+ * MUST be 32 bytes.
1500
+ *
1501
+ * @generated from field: bytes price_feed_id = 2;
1502
+ */
1503
+ priceFeedId?: string;
1504
+ };
1505
+
1506
+ /**
1507
+ * Describes the message nord.Action.PythSetSymbolFeed.
1508
+ * Use `create(Action_PythSetSymbolFeedSchema)` to create a new message.
1509
+ */
1510
+ export const Action_PythSetSymbolFeedSchema: GenMessage<Action_PythSetSymbolFeed, {jsonType: Action_PythSetSymbolFeedJson}> = /*@__PURE__*/
1511
+ messageDesc(file_nord, 7, 8);
1512
+
1513
+ /**
1514
+ * @generated from message nord.Action.PythPriceFeedUpdate
1515
+ */
1516
+ export type Action_PythPriceFeedUpdate = Message<"nord.Action.PythPriceFeedUpdate"> & {
1517
+ /**
1518
+ * See https://hermes.pyth.network/docs/#/rest/latest_price_updates
1519
+ *
1520
+ * @generated from field: bytes raw_pythnet_data = 1;
1521
+ */
1522
+ rawPythnetData: Uint8Array;
1523
+ };
1524
+
1525
+ /**
1526
+ * @generated from message nord.Action.PythPriceFeedUpdate
1527
+ */
1528
+ export type Action_PythPriceFeedUpdateJson = {
1529
+ /**
1530
+ * See https://hermes.pyth.network/docs/#/rest/latest_price_updates
1531
+ *
1532
+ * @generated from field: bytes raw_pythnet_data = 1;
1533
+ */
1534
+ rawPythnetData?: string;
1535
+ };
1536
+
1537
+ /**
1538
+ * Describes the message nord.Action.PythPriceFeedUpdate.
1539
+ * Use `create(Action_PythPriceFeedUpdateSchema)` to create a new message.
1540
+ */
1541
+ export const Action_PythPriceFeedUpdateSchema: GenMessage<Action_PythPriceFeedUpdate, {jsonType: Action_PythPriceFeedUpdateJson}> = /*@__PURE__*/
1542
+ messageDesc(file_nord, 7, 9);
1543
+
1544
+ /**
1545
+ * Perform final account liquidation procedure.
1546
+ * Can be executed only accounts with AV < 0 (bankrupt).
1547
+ * After execution, `liquidatee_account_id` is removed from state.
1548
+ * See MARKETS.md `Bankruptcy` for details.
1549
+ *
1550
+ * @generated from message nord.Action.Liquidate
1551
+ */
1552
+ export type Action_Liquidate = Message<"nord.Action.Liquidate"> & {
1553
+ /**
1554
+ * @generated from field: uint64 liquidator_session_id = 1;
1555
+ */
1556
+ liquidatorSessionId: bigint;
1557
+
1558
+ /**
1559
+ * @generated from field: uint32 liquidatee_account_id = 2;
1560
+ */
1561
+ liquidateeAccountId: number;
1562
+
1563
+ /**
1564
+ * @generated from field: optional uint32 liquidator_account_id = 3;
1565
+ */
1566
+ liquidatorAccountId?: number;
1567
+ };
1568
+
1569
+ /**
1570
+ * Perform final account liquidation procedure.
1571
+ * Can be executed only accounts with AV < 0 (bankrupt).
1572
+ * After execution, `liquidatee_account_id` is removed from state.
1573
+ * See MARKETS.md `Bankruptcy` for details.
1574
+ *
1575
+ * @generated from message nord.Action.Liquidate
1576
+ */
1577
+ export type Action_LiquidateJson = {
1578
+ /**
1579
+ * @generated from field: uint64 liquidator_session_id = 1;
1580
+ */
1581
+ liquidatorSessionId?: string;
1582
+
1583
+ /**
1584
+ * @generated from field: uint32 liquidatee_account_id = 2;
1585
+ */
1586
+ liquidateeAccountId?: number;
1587
+
1588
+ /**
1589
+ * @generated from field: optional uint32 liquidator_account_id = 3;
1590
+ */
1591
+ liquidatorAccountId?: number;
1592
+ };
1593
+
1594
+ /**
1595
+ * Describes the message nord.Action.Liquidate.
1596
+ * Use `create(Action_LiquidateSchema)` to create a new message.
1597
+ */
1598
+ export const Action_LiquidateSchema: GenMessage<Action_Liquidate, {jsonType: Action_LiquidateJson}> = /*@__PURE__*/
1599
+ messageDesc(file_nord, 7, 10);
1600
+
1601
+ /**
1602
+ * @generated from message nord.Action.RevokeSession
1603
+ */
1604
+ export type Action_RevokeSession = Message<"nord.Action.RevokeSession"> & {
1605
+ /**
1606
+ * @generated from field: uint64 session_id = 1;
1607
+ */
1608
+ sessionId: bigint;
1609
+ };
1610
+
1611
+ /**
1612
+ * @generated from message nord.Action.RevokeSession
1613
+ */
1614
+ export type Action_RevokeSessionJson = {
1615
+ /**
1616
+ * @generated from field: uint64 session_id = 1;
1617
+ */
1618
+ sessionId?: string;
1619
+ };
1620
+
1621
+ /**
1622
+ * Describes the message nord.Action.RevokeSession.
1623
+ * Use `create(Action_RevokeSessionSchema)` to create a new message.
1624
+ */
1625
+ export const Action_RevokeSessionSchema: GenMessage<Action_RevokeSession, {jsonType: Action_RevokeSessionJson}> = /*@__PURE__*/
1626
+ messageDesc(file_nord, 7, 11);
1627
+
1628
+ /**
1629
+ * The engine fails with a maintenance error while paused.
1630
+ *
1631
+ * @generated from message nord.Action.Pause
1632
+ */
1633
+ export type Action_Pause = Message<"nord.Action.Pause"> & {
1634
+ };
1635
+
1636
+ /**
1637
+ * The engine fails with a maintenance error while paused.
1638
+ *
1639
+ * @generated from message nord.Action.Pause
1640
+ */
1641
+ export type Action_PauseJson = {
1642
+ };
1643
+
1644
+ /**
1645
+ * Describes the message nord.Action.Pause.
1646
+ * Use `create(Action_PauseSchema)` to create a new message.
1647
+ */
1648
+ export const Action_PauseSchema: GenMessage<Action_Pause, {jsonType: Action_PauseJson}> = /*@__PURE__*/
1649
+ messageDesc(file_nord, 7, 12);
1650
+
1651
+ /**
1652
+ * @generated from message nord.Action.Unpause
1653
+ */
1654
+ export type Action_Unpause = Message<"nord.Action.Unpause"> & {
1655
+ };
1656
+
1657
+ /**
1658
+ * @generated from message nord.Action.Unpause
1659
+ */
1660
+ export type Action_UnpauseJson = {
1661
+ };
1662
+
1663
+ /**
1664
+ * Describes the message nord.Action.Unpause.
1665
+ * Use `create(Action_UnpauseSchema)` to create a new message.
1666
+ */
1667
+ export const Action_UnpauseSchema: GenMessage<Action_Unpause, {jsonType: Action_UnpauseJson}> = /*@__PURE__*/
1668
+ messageDesc(file_nord, 7, 13);
1669
+
1670
+ /**
1671
+ * Transfers tokens to specified account.
1672
+ *
1673
+ * @generated from message nord.Action.Transfer
1674
+ */
1675
+ export type Action_Transfer = Message<"nord.Action.Transfer"> & {
1676
+ /**
1677
+ * @generated from field: uint64 session_id = 1;
1678
+ */
1679
+ sessionId: bigint;
1680
+
1681
+ /**
1682
+ * @generated from field: uint32 from_account_id = 2;
1683
+ */
1684
+ fromAccountId: number;
1685
+
1686
+ /**
1687
+ * @generated from field: uint32 token_id = 3;
1688
+ */
1689
+ tokenId: number;
1690
+
1691
+ /**
1692
+ * @generated from field: uint64 amount = 4;
1693
+ */
1694
+ amount: bigint;
1695
+
1696
+ /**
1697
+ * If target account id isn't specified, new account is created.
1698
+ *
1699
+ * @generated from field: optional uint32 to_account_id = 8;
1700
+ */
1701
+ toAccountId?: number;
1702
+
1703
+ /**
1704
+ * If specified, than `to_account_id` must be none.
1705
+ * Transfer funds to accounts, for example to cover bankruptcies.
1706
+ *
1707
+ * @generated from field: optional nord.SpecialAccount special_account = 9;
1708
+ */
1709
+ specialAccount?: SpecialAccount;
1710
+ };
1711
+
1712
+ /**
1713
+ * Transfers tokens to specified account.
1714
+ *
1715
+ * @generated from message nord.Action.Transfer
1716
+ */
1717
+ export type Action_TransferJson = {
1718
+ /**
1719
+ * @generated from field: uint64 session_id = 1;
1720
+ */
1721
+ sessionId?: string;
1722
+
1723
+ /**
1724
+ * @generated from field: uint32 from_account_id = 2;
1725
+ */
1726
+ fromAccountId?: number;
1727
+
1728
+ /**
1729
+ * @generated from field: uint32 token_id = 3;
1730
+ */
1731
+ tokenId?: number;
1732
+
1733
+ /**
1734
+ * @generated from field: uint64 amount = 4;
1735
+ */
1736
+ amount?: string;
1737
+
1738
+ /**
1739
+ * If target account id isn't specified, new account is created.
1740
+ *
1741
+ * @generated from field: optional uint32 to_account_id = 8;
1742
+ */
1743
+ toAccountId?: number;
1744
+
1745
+ /**
1746
+ * If specified, than `to_account_id` must be none.
1747
+ * Transfer funds to accounts, for example to cover bankruptcies.
1748
+ *
1749
+ * @generated from field: optional nord.SpecialAccount special_account = 9;
1750
+ */
1751
+ specialAccount?: SpecialAccountJson;
1752
+ };
1753
+
1754
+ /**
1755
+ * Describes the message nord.Action.Transfer.
1756
+ * Use `create(Action_TransferSchema)` to create a new message.
1757
+ */
1758
+ export const Action_TransferSchema: GenMessage<Action_Transfer, {jsonType: Action_TransferJson}> = /*@__PURE__*/
1759
+ messageDesc(file_nord, 7, 14);
1760
+
1761
+ /**
1762
+ * @generated from message nord.Action.AddTrigger
1763
+ */
1764
+ export type Action_AddTrigger = Message<"nord.Action.AddTrigger"> & {
1765
+ /**
1766
+ * @generated from field: uint64 session_id = 1;
1767
+ */
1768
+ sessionId: bigint;
1769
+
1770
+ /**
1771
+ * @generated from field: uint32 market_id = 2;
1772
+ */
1773
+ marketId: number;
1774
+
1775
+ /**
1776
+ * @generated from field: nord.TriggerKind kind = 3;
1777
+ */
1778
+ kind: TriggerKind;
1779
+
1780
+ /**
1781
+ * @generated from field: nord.Side side = 4;
1782
+ */
1783
+ side: Side;
1784
+
1785
+ /**
1786
+ * Same price format as when placing order
1787
+ *
1788
+ * @generated from field: uint64 price = 5;
1789
+ */
1790
+ price: bigint;
1791
+
1792
+ /**
1793
+ * @generated from field: optional uint32 account_id = 10;
1794
+ */
1795
+ accountId?: number;
1796
+ };
1797
+
1798
+ /**
1799
+ * @generated from message nord.Action.AddTrigger
1800
+ */
1801
+ export type Action_AddTriggerJson = {
1802
+ /**
1803
+ * @generated from field: uint64 session_id = 1;
1804
+ */
1805
+ sessionId?: string;
1806
+
1807
+ /**
1808
+ * @generated from field: uint32 market_id = 2;
1809
+ */
1810
+ marketId?: number;
1811
+
1812
+ /**
1813
+ * @generated from field: nord.TriggerKind kind = 3;
1814
+ */
1815
+ kind?: TriggerKindJson;
1816
+
1817
+ /**
1818
+ * @generated from field: nord.Side side = 4;
1819
+ */
1820
+ side?: SideJson;
1821
+
1822
+ /**
1823
+ * Same price format as when placing order
1824
+ *
1825
+ * @generated from field: uint64 price = 5;
1826
+ */
1827
+ price?: string;
1828
+
1829
+ /**
1830
+ * @generated from field: optional uint32 account_id = 10;
1831
+ */
1832
+ accountId?: number;
1833
+ };
1834
+
1835
+ /**
1836
+ * Describes the message nord.Action.AddTrigger.
1837
+ * Use `create(Action_AddTriggerSchema)` to create a new message.
1838
+ */
1839
+ export const Action_AddTriggerSchema: GenMessage<Action_AddTrigger, {jsonType: Action_AddTriggerJson}> = /*@__PURE__*/
1840
+ messageDesc(file_nord, 7, 15);
1841
+
1842
+ /**
1843
+ * @generated from message nord.Action.RemoveTrigger
1844
+ */
1845
+ export type Action_RemoveTrigger = Message<"nord.Action.RemoveTrigger"> & {
1846
+ /**
1847
+ * @generated from field: uint64 session_id = 1;
1848
+ */
1849
+ sessionId: bigint;
1850
+
1851
+ /**
1852
+ * @generated from field: uint32 market_id = 2;
1853
+ */
1854
+ marketId: number;
1855
+
1856
+ /**
1857
+ * @generated from field: nord.TriggerKind kind = 3;
1858
+ */
1859
+ kind: TriggerKind;
1860
+
1861
+ /**
1862
+ * @generated from field: nord.Side side = 4;
1863
+ */
1864
+ side: Side;
1865
+
1866
+ /**
1867
+ * @generated from field: uint64 price = 5;
1868
+ */
1869
+ price: bigint;
1870
+
1871
+ /**
1872
+ * @generated from field: optional uint32 account_id = 10;
1873
+ */
1874
+ accountId?: number;
1875
+ };
1876
+
1877
+ /**
1878
+ * @generated from message nord.Action.RemoveTrigger
1879
+ */
1880
+ export type Action_RemoveTriggerJson = {
1881
+ /**
1882
+ * @generated from field: uint64 session_id = 1;
1883
+ */
1884
+ sessionId?: string;
1885
+
1886
+ /**
1887
+ * @generated from field: uint32 market_id = 2;
1888
+ */
1889
+ marketId?: number;
1890
+
1891
+ /**
1892
+ * @generated from field: nord.TriggerKind kind = 3;
1893
+ */
1894
+ kind?: TriggerKindJson;
1895
+
1896
+ /**
1897
+ * @generated from field: nord.Side side = 4;
1898
+ */
1899
+ side?: SideJson;
1900
+
1901
+ /**
1902
+ * @generated from field: uint64 price = 5;
1903
+ */
1904
+ price?: string;
1905
+
1906
+ /**
1907
+ * @generated from field: optional uint32 account_id = 10;
1908
+ */
1909
+ accountId?: number;
1910
+ };
1911
+
1912
+ /**
1913
+ * Describes the message nord.Action.RemoveTrigger.
1914
+ * Use `create(Action_RemoveTriggerSchema)` to create a new message.
1915
+ */
1916
+ export const Action_RemoveTriggerSchema: GenMessage<Action_RemoveTrigger, {jsonType: Action_RemoveTriggerJson}> = /*@__PURE__*/
1917
+ messageDesc(file_nord, 7, 16);
1918
+
1919
+ /**
1920
+ * @generated from message nord.Action.TakePosition
1921
+ */
1922
+ export type Action_TakePosition = Message<"nord.Action.TakePosition"> & {
1923
+ /**
1924
+ * @generated from field: uint64 session_id = 1;
1925
+ */
1926
+ sessionId: bigint;
1927
+
1928
+ /**
1929
+ * @generated from field: uint32 market_id = 2;
1930
+ */
1931
+ marketId: number;
1932
+
1933
+ /**
1934
+ * Amount to take.
1935
+ *
1936
+ * @generated from field: int64 size = 3;
1937
+ */
1938
+ size: bigint;
1939
+
1940
+ /**
1941
+ * Account id which performs operation;
1942
+ * if not specified, first account of session's owner user is picked
1943
+ *
1944
+ * @generated from field: optional uint32 sender_account_id = 4;
1945
+ */
1946
+ senderAccountId?: number;
1947
+
1948
+ /**
1949
+ * If set, then it is take action.
1950
+ * If price not so good as in field, take will fail.
1951
+ *
1952
+ *
1953
+ * If not set,
1954
+ * will do fill-or-kill order as per liquidation trade rule.
1955
+ *
1956
+ * @generated from field: optional uint64 price = 5;
1957
+ */
1958
+ price?: bigint;
1959
+ };
1960
+
1961
+ /**
1962
+ * @generated from message nord.Action.TakePosition
1963
+ */
1964
+ export type Action_TakePositionJson = {
1965
+ /**
1966
+ * @generated from field: uint64 session_id = 1;
1967
+ */
1968
+ sessionId?: string;
1969
+
1970
+ /**
1971
+ * @generated from field: uint32 market_id = 2;
1972
+ */
1973
+ marketId?: number;
1974
+
1975
+ /**
1976
+ * Amount to take.
1977
+ *
1978
+ * @generated from field: int64 size = 3;
1979
+ */
1980
+ size?: string;
1981
+
1982
+ /**
1983
+ * Account id which performs operation;
1984
+ * if not specified, first account of session's owner user is picked
1985
+ *
1986
+ * @generated from field: optional uint32 sender_account_id = 4;
1987
+ */
1988
+ senderAccountId?: number;
1989
+
1990
+ /**
1991
+ * If set, then it is take action.
1992
+ * If price not so good as in field, take will fail.
1993
+ *
1994
+ *
1995
+ * If not set,
1996
+ * will do fill-or-kill order as per liquidation trade rule.
1997
+ *
1998
+ * @generated from field: optional uint64 price = 5;
1999
+ */
2000
+ price?: string;
2001
+ };
2002
+
2003
+ /**
2004
+ * Describes the message nord.Action.TakePosition.
2005
+ * Use `create(Action_TakePositionSchema)` to create a new message.
2006
+ */
2007
+ export const Action_TakePositionSchema: GenMessage<Action_TakePosition, {jsonType: Action_TakePositionJson}> = /*@__PURE__*/
2008
+ messageDesc(file_nord, 7, 17);
2009
+
2010
+ /**
2011
+ * @generated from message nord.AtomicSubactionKind
2012
+ */
2013
+ export type AtomicSubactionKind = Message<"nord.AtomicSubactionKind"> & {
2014
+ /**
2015
+ * @generated from oneof nord.AtomicSubactionKind.inner
2016
+ */
2017
+ inner: {
2018
+ /**
2019
+ * @generated from field: nord.TradeOrPlace trade_or_place = 6;
2020
+ */
2021
+ value: TradeOrPlace;
2022
+ case: "tradeOrPlace";
2023
+ } | {
2024
+ /**
2025
+ * @generated from field: nord.CancelOrder cancel_order = 7;
2026
+ */
2027
+ value: CancelOrder;
2028
+ case: "cancelOrder";
2029
+ } | { case: undefined; value?: undefined };
2030
+ };
2031
+
2032
+ /**
2033
+ * @generated from message nord.AtomicSubactionKind
2034
+ */
2035
+ export type AtomicSubactionKindJson = {
2036
+ /**
2037
+ * @generated from field: nord.TradeOrPlace trade_or_place = 6;
2038
+ */
2039
+ tradeOrPlace?: TradeOrPlaceJson;
2040
+
2041
+ /**
2042
+ * @generated from field: nord.CancelOrder cancel_order = 7;
2043
+ */
2044
+ cancelOrder?: CancelOrderJson;
2045
+ };
2046
+
2047
+ /**
2048
+ * Describes the message nord.AtomicSubactionKind.
2049
+ * Use `create(AtomicSubactionKindSchema)` to create a new message.
2050
+ */
2051
+ export const AtomicSubactionKindSchema: GenMessage<AtomicSubactionKind, {jsonType: AtomicSubactionKindJson}> = /*@__PURE__*/
2052
+ messageDesc(file_nord, 8);
2053
+
2054
+ /**
2055
+ * @generated from message nord.Atomic
2056
+ */
2057
+ export type Atomic = Message<"nord.Atomic"> & {
2058
+ /**
2059
+ * @generated from field: uint64 session_id = 1;
2060
+ */
2061
+ sessionId: bigint;
2062
+
2063
+ /**
2064
+ * @generated from field: optional uint32 account_id = 2;
2065
+ */
2066
+ accountId?: number;
2067
+
2068
+ /**
2069
+ * @generated from field: repeated nord.AtomicSubactionKind actions = 6;
2070
+ */
2071
+ actions: AtomicSubactionKind[];
2072
+ };
2073
+
2074
+ /**
2075
+ * @generated from message nord.Atomic
2076
+ */
2077
+ export type AtomicJson = {
2078
+ /**
2079
+ * @generated from field: uint64 session_id = 1;
2080
+ */
2081
+ sessionId?: string;
2082
+
2083
+ /**
2084
+ * @generated from field: optional uint32 account_id = 2;
2085
+ */
2086
+ accountId?: number;
2087
+
2088
+ /**
2089
+ * @generated from field: repeated nord.AtomicSubactionKind actions = 6;
2090
+ */
2091
+ actions?: AtomicSubactionKindJson[];
2092
+ };
2093
+
2094
+ /**
2095
+ * Describes the message nord.Atomic.
2096
+ * Use `create(AtomicSchema)` to create a new message.
2097
+ */
2098
+ export const AtomicSchema: GenMessage<Atomic, {jsonType: AtomicJson}> = /*@__PURE__*/
2099
+ messageDesc(file_nord, 9);
2100
+
2101
+ /**
2102
+ * @generated from message nord.Receipt
2103
+ */
2104
+ export type Receipt = Message<"nord.Receipt"> & {
2105
+ /**
2106
+ * Action id which was run to produce this receipt.
2107
+ * In case of error it was next action id which did not incremented because of
2108
+ * error.
2109
+ *
2110
+ * @generated from field: uint64 action_id = 1;
2111
+ */
2112
+ actionId: bigint;
2113
+
2114
+ /**
2115
+ * @generated from oneof nord.Receipt.kind
2116
+ */
2117
+ kind: {
2118
+ /**
2119
+ * @generated from field: nord.Error err = 32;
2120
+ */
2121
+ value: Error;
2122
+ case: "err";
2123
+ } | {
2124
+ /**
2125
+ * @generated from field: nord.Receipt.CreateSessionResult create_session_result = 33;
2126
+ */
2127
+ value: Receipt_CreateSessionResult;
2128
+ case: "createSessionResult";
2129
+ } | {
2130
+ /**
2131
+ * @generated from field: nord.Receipt.PlaceOrderResult place_order_result = 34;
2132
+ */
2133
+ value: Receipt_PlaceOrderResult;
2134
+ case: "placeOrderResult";
2135
+ } | {
2136
+ /**
2137
+ * @generated from field: nord.Receipt.CancelOrderResult cancel_order_result = 35;
2138
+ */
2139
+ value: Receipt_CancelOrderResult;
2140
+ case: "cancelOrderResult";
2141
+ } | {
2142
+ /**
2143
+ * @generated from field: nord.Receipt.DepositResult deposit_result = 36;
2144
+ */
2145
+ value: Receipt_DepositResult;
2146
+ case: "depositResult";
2147
+ } | {
2148
+ /**
2149
+ * @generated from field: nord.Receipt.InsertTokenResult insert_token_result = 37;
2150
+ */
2151
+ value: Receipt_InsertTokenResult;
2152
+ case: "insertTokenResult";
2153
+ } | {
2154
+ /**
2155
+ * @generated from field: nord.Receipt.InsertMarketResult insert_market_result = 38;
2156
+ */
2157
+ value: Receipt_InsertMarketResult;
2158
+ case: "insertMarketResult";
2159
+ } | {
2160
+ /**
2161
+ * @generated from field: nord.Receipt.WithdrawResult withdraw_result = 39;
2162
+ */
2163
+ value: Receipt_WithdrawResult;
2164
+ case: "withdrawResult";
2165
+ } | {
2166
+ /**
2167
+ * @generated from field: nord.Receipt.OracleSymbolFeedResult oracle_symbol_feed_result = 40;
2168
+ */
2169
+ value: Receipt_OracleSymbolFeedResult;
2170
+ case: "oracleSymbolFeedResult";
2171
+ } | {
2172
+ /**
2173
+ * @generated from field: nord.Receipt.OracleUpdateResult oracle_update_result = 41;
2174
+ */
2175
+ value: Receipt_OracleUpdateResult;
2176
+ case: "oracleUpdateResult";
2177
+ } | {
2178
+ /**
2179
+ * @generated from field: nord.Receipt.UpdateGuardianSetResult update_guardian_set_result = 42;
2180
+ */
2181
+ value: Receipt_UpdateGuardianSetResult;
2182
+ case: "updateGuardianSetResult";
2183
+ } | {
2184
+ /**
2185
+ * @generated from field: nord.Receipt.AccountLiquidated liquidated = 43;
2186
+ */
2187
+ value: Receipt_AccountLiquidated;
2188
+ case: "liquidated";
2189
+ } | {
2190
+ /**
2191
+ * @generated from field: nord.Receipt.SessionRevoked session_revoked = 44;
2192
+ */
2193
+ value: Receipt_SessionRevoked;
2194
+ case: "sessionRevoked";
2195
+ } | {
2196
+ /**
2197
+ * @generated from field: nord.Receipt.Paused paused = 45;
2198
+ */
2199
+ value: Receipt_Paused;
2200
+ case: "paused";
2201
+ } | {
2202
+ /**
2203
+ * @generated from field: nord.Receipt.Unpaused unpaused = 46;
2204
+ */
2205
+ value: Receipt_Unpaused;
2206
+ case: "unpaused";
2207
+ } | {
2208
+ /**
2209
+ * @generated from field: nord.Receipt.Transferred transferred = 47;
2210
+ */
2211
+ value: Receipt_Transferred;
2212
+ case: "transferred";
2213
+ } | {
2214
+ /**
2215
+ * @generated from field: nord.Receipt.TriggerAdded trigger_added = 64;
2216
+ */
2217
+ value: Receipt_TriggerAdded;
2218
+ case: "triggerAdded";
2219
+ } | {
2220
+ /**
2221
+ * @generated from field: nord.Receipt.TriggerRemoved trigger_removed = 65;
2222
+ */
2223
+ value: Receipt_TriggerRemoved;
2224
+ case: "triggerRemoved";
2225
+ } | {
2226
+ /**
2227
+ * @generated from field: nord.Receipt.PositionTakenOrTradedResult position_taken_or_traded = 66;
2228
+ */
2229
+ value: Receipt_PositionTakenOrTradedResult;
2230
+ case: "positionTakenOrTraded";
2231
+ } | {
2232
+ /**
2233
+ * @generated from field: nord.Receipt.AtomicResult atomic = 67;
2234
+ */
2235
+ value: Receipt_AtomicResult;
2236
+ case: "atomic";
2237
+ } | { case: undefined; value?: undefined };
2238
+ };
2239
+
2240
+ /**
2241
+ * @generated from message nord.Receipt
2242
+ */
2243
+ export type ReceiptJson = {
2244
+ /**
2245
+ * Action id which was run to produce this receipt.
2246
+ * In case of error it was next action id which did not incremented because of
2247
+ * error.
2248
+ *
2249
+ * @generated from field: uint64 action_id = 1;
2250
+ */
2251
+ actionId?: string;
2252
+
2253
+ /**
2254
+ * @generated from field: nord.Error err = 32;
2255
+ */
2256
+ err?: ErrorJson;
2257
+
2258
+ /**
2259
+ * @generated from field: nord.Receipt.CreateSessionResult create_session_result = 33;
2260
+ */
2261
+ createSessionResult?: Receipt_CreateSessionResultJson;
2262
+
2263
+ /**
2264
+ * @generated from field: nord.Receipt.PlaceOrderResult place_order_result = 34;
2265
+ */
2266
+ placeOrderResult?: Receipt_PlaceOrderResultJson;
2267
+
2268
+ /**
2269
+ * @generated from field: nord.Receipt.CancelOrderResult cancel_order_result = 35;
2270
+ */
2271
+ cancelOrderResult?: Receipt_CancelOrderResultJson;
2272
+
2273
+ /**
2274
+ * @generated from field: nord.Receipt.DepositResult deposit_result = 36;
2275
+ */
2276
+ depositResult?: Receipt_DepositResultJson;
2277
+
2278
+ /**
2279
+ * @generated from field: nord.Receipt.InsertTokenResult insert_token_result = 37;
2280
+ */
2281
+ insertTokenResult?: Receipt_InsertTokenResultJson;
2282
+
2283
+ /**
2284
+ * @generated from field: nord.Receipt.InsertMarketResult insert_market_result = 38;
2285
+ */
2286
+ insertMarketResult?: Receipt_InsertMarketResultJson;
2287
+
2288
+ /**
2289
+ * @generated from field: nord.Receipt.WithdrawResult withdraw_result = 39;
2290
+ */
2291
+ withdrawResult?: Receipt_WithdrawResultJson;
2292
+
2293
+ /**
2294
+ * @generated from field: nord.Receipt.OracleSymbolFeedResult oracle_symbol_feed_result = 40;
2295
+ */
2296
+ oracleSymbolFeedResult?: Receipt_OracleSymbolFeedResultJson;
2297
+
2298
+ /**
2299
+ * @generated from field: nord.Receipt.OracleUpdateResult oracle_update_result = 41;
2300
+ */
2301
+ oracleUpdateResult?: Receipt_OracleUpdateResultJson;
2302
+
2303
+ /**
2304
+ * @generated from field: nord.Receipt.UpdateGuardianSetResult update_guardian_set_result = 42;
2305
+ */
2306
+ updateGuardianSetResult?: Receipt_UpdateGuardianSetResultJson;
2307
+
2308
+ /**
2309
+ * @generated from field: nord.Receipt.AccountLiquidated liquidated = 43;
2310
+ */
2311
+ liquidated?: Receipt_AccountLiquidatedJson;
2312
+
2313
+ /**
2314
+ * @generated from field: nord.Receipt.SessionRevoked session_revoked = 44;
2315
+ */
2316
+ sessionRevoked?: Receipt_SessionRevokedJson;
2317
+
2318
+ /**
2319
+ * @generated from field: nord.Receipt.Paused paused = 45;
2320
+ */
2321
+ paused?: Receipt_PausedJson;
2322
+
2323
+ /**
2324
+ * @generated from field: nord.Receipt.Unpaused unpaused = 46;
2325
+ */
2326
+ unpaused?: Receipt_UnpausedJson;
2327
+
2328
+ /**
2329
+ * @generated from field: nord.Receipt.Transferred transferred = 47;
2330
+ */
2331
+ transferred?: Receipt_TransferredJson;
2332
+
2333
+ /**
2334
+ * @generated from field: nord.Receipt.TriggerAdded trigger_added = 64;
2335
+ */
2336
+ triggerAdded?: Receipt_TriggerAddedJson;
2337
+
2338
+ /**
2339
+ * @generated from field: nord.Receipt.TriggerRemoved trigger_removed = 65;
2340
+ */
2341
+ triggerRemoved?: Receipt_TriggerRemovedJson;
2342
+
2343
+ /**
2344
+ * @generated from field: nord.Receipt.PositionTakenOrTradedResult position_taken_or_traded = 66;
2345
+ */
2346
+ positionTakenOrTraded?: Receipt_PositionTakenOrTradedResultJson;
2347
+
2348
+ /**
2349
+ * @generated from field: nord.Receipt.AtomicResult atomic = 67;
2350
+ */
2351
+ atomic?: Receipt_AtomicResultJson;
2352
+ };
2353
+
2354
+ /**
2355
+ * Describes the message nord.Receipt.
2356
+ * Use `create(ReceiptSchema)` to create a new message.
2357
+ */
2358
+ export const ReceiptSchema: GenMessage<Receipt, {jsonType: ReceiptJson}> = /*@__PURE__*/
2359
+ messageDesc(file_nord, 10);
2360
+
2361
+ /**
2362
+ * @generated from message nord.Receipt.Posted
2363
+ */
2364
+ export type Receipt_Posted = Message<"nord.Receipt.Posted"> & {
2365
+ /**
2366
+ * @generated from field: nord.Side side = 1;
2367
+ */
2368
+ side: Side;
2369
+
2370
+ /**
2371
+ * @generated from field: uint32 market_id = 2;
2372
+ */
2373
+ marketId: number;
2374
+
2375
+ /**
2376
+ * @generated from field: uint64 price = 3;
2377
+ */
2378
+ price: bigint;
2379
+
2380
+ /**
2381
+ * @generated from field: uint64 size = 4;
2382
+ */
2383
+ size: bigint;
2384
+
2385
+ /**
2386
+ * @generated from field: uint64 order_id = 5;
2387
+ */
2388
+ orderId: bigint;
2389
+
2390
+ /**
2391
+ * @generated from field: uint32 account_id = 6;
2392
+ */
2393
+ accountId: number;
2394
+ };
2395
+
2396
+ /**
2397
+ * @generated from message nord.Receipt.Posted
2398
+ */
2399
+ export type Receipt_PostedJson = {
2400
+ /**
2401
+ * @generated from field: nord.Side side = 1;
2402
+ */
2403
+ side?: SideJson;
2404
+
2405
+ /**
2406
+ * @generated from field: uint32 market_id = 2;
2407
+ */
2408
+ marketId?: number;
2409
+
2410
+ /**
2411
+ * @generated from field: uint64 price = 3;
2412
+ */
2413
+ price?: string;
2414
+
2415
+ /**
2416
+ * @generated from field: uint64 size = 4;
2417
+ */
2418
+ size?: string;
2419
+
2420
+ /**
2421
+ * @generated from field: uint64 order_id = 5;
2422
+ */
2423
+ orderId?: string;
2424
+
2425
+ /**
2426
+ * @generated from field: uint32 account_id = 6;
2427
+ */
2428
+ accountId?: number;
2429
+ };
2430
+
2431
+ /**
2432
+ * Describes the message nord.Receipt.Posted.
2433
+ * Use `create(Receipt_PostedSchema)` to create a new message.
2434
+ */
2435
+ export const Receipt_PostedSchema: GenMessage<Receipt_Posted, {jsonType: Receipt_PostedJson}> = /*@__PURE__*/
2436
+ messageDesc(file_nord, 10, 0);
2437
+
2438
+ /**
2439
+ * @generated from message nord.Receipt.Trade
2440
+ */
2441
+ export type Receipt_Trade = Message<"nord.Receipt.Trade"> & {
2442
+ /**
2443
+ * @generated from field: uint64 order_id = 2;
2444
+ */
2445
+ orderId: bigint;
2446
+
2447
+ /**
2448
+ * non zero
2449
+ *
2450
+ * @generated from field: uint64 price = 4;
2451
+ */
2452
+ price: bigint;
2453
+
2454
+ /**
2455
+ * @generated from field: uint64 size = 5;
2456
+ */
2457
+ size: bigint;
2458
+
2459
+ /**
2460
+ * @generated from field: uint32 account_id = 6;
2461
+ */
2462
+ accountId: number;
2463
+ };
2464
+
2465
+ /**
2466
+ * @generated from message nord.Receipt.Trade
2467
+ */
2468
+ export type Receipt_TradeJson = {
2469
+ /**
2470
+ * @generated from field: uint64 order_id = 2;
2471
+ */
2472
+ orderId?: string;
2473
+
2474
+ /**
2475
+ * non zero
2476
+ *
2477
+ * @generated from field: uint64 price = 4;
2478
+ */
2479
+ price?: string;
2480
+
2481
+ /**
2482
+ * @generated from field: uint64 size = 5;
2483
+ */
2484
+ size?: string;
2485
+
2486
+ /**
2487
+ * @generated from field: uint32 account_id = 6;
2488
+ */
2489
+ accountId?: number;
2490
+ };
2491
+
2492
+ /**
2493
+ * Describes the message nord.Receipt.Trade.
2494
+ * Use `create(Receipt_TradeSchema)` to create a new message.
2495
+ */
2496
+ export const Receipt_TradeSchema: GenMessage<Receipt_Trade, {jsonType: Receipt_TradeJson}> = /*@__PURE__*/
2497
+ messageDesc(file_nord, 10, 1);
2498
+
2499
+ /**
2500
+ * @generated from message nord.Receipt.CreateSessionResult
2501
+ */
2502
+ export type Receipt_CreateSessionResult = Message<"nord.Receipt.CreateSessionResult"> & {
2503
+ /**
2504
+ * @generated from field: uint64 session_id = 1;
2505
+ */
2506
+ sessionId: bigint;
2507
+ };
2508
+
2509
+ /**
2510
+ * @generated from message nord.Receipt.CreateSessionResult
2511
+ */
2512
+ export type Receipt_CreateSessionResultJson = {
2513
+ /**
2514
+ * @generated from field: uint64 session_id = 1;
2515
+ */
2516
+ sessionId?: string;
2517
+ };
2518
+
2519
+ /**
2520
+ * Describes the message nord.Receipt.CreateSessionResult.
2521
+ * Use `create(Receipt_CreateSessionResultSchema)` to create a new message.
2522
+ */
2523
+ export const Receipt_CreateSessionResultSchema: GenMessage<Receipt_CreateSessionResult, {jsonType: Receipt_CreateSessionResultJson}> = /*@__PURE__*/
2524
+ messageDesc(file_nord, 10, 2);
2525
+
2526
+ /**
2527
+ * @generated from message nord.Receipt.PlaceOrderResult
2528
+ */
2529
+ export type Receipt_PlaceOrderResult = Message<"nord.Receipt.PlaceOrderResult"> & {
2530
+ /**
2531
+ * @generated from field: optional nord.Receipt.Posted posted = 1;
2532
+ */
2533
+ posted?: Receipt_Posted;
2534
+
2535
+ /**
2536
+ * @generated from field: repeated nord.Receipt.Trade fills = 2;
2537
+ */
2538
+ fills: Receipt_Trade[];
2539
+
2540
+ /**
2541
+ * @generated from field: optional uint64 client_order_id = 3;
2542
+ */
2543
+ clientOrderId?: bigint;
2544
+
2545
+ /**
2546
+ * @generated from field: optional uint64 sender_tracking_id = 4;
2547
+ */
2548
+ senderTrackingId?: bigint;
2549
+ };
2550
+
2551
+ /**
2552
+ * @generated from message nord.Receipt.PlaceOrderResult
2553
+ */
2554
+ export type Receipt_PlaceOrderResultJson = {
2555
+ /**
2556
+ * @generated from field: optional nord.Receipt.Posted posted = 1;
2557
+ */
2558
+ posted?: Receipt_PostedJson;
2559
+
2560
+ /**
2561
+ * @generated from field: repeated nord.Receipt.Trade fills = 2;
2562
+ */
2563
+ fills?: Receipt_TradeJson[];
2564
+
2565
+ /**
2566
+ * @generated from field: optional uint64 client_order_id = 3;
2567
+ */
2568
+ clientOrderId?: string;
2569
+
2570
+ /**
2571
+ * @generated from field: optional uint64 sender_tracking_id = 4;
2572
+ */
2573
+ senderTrackingId?: string;
2574
+ };
2575
+
2576
+ /**
2577
+ * Describes the message nord.Receipt.PlaceOrderResult.
2578
+ * Use `create(Receipt_PlaceOrderResultSchema)` to create a new message.
2579
+ */
2580
+ export const Receipt_PlaceOrderResultSchema: GenMessage<Receipt_PlaceOrderResult, {jsonType: Receipt_PlaceOrderResultJson}> = /*@__PURE__*/
2581
+ messageDesc(file_nord, 10, 3);
2582
+
2583
+ /**
2584
+ * @generated from message nord.Receipt.TakenResult
2585
+ */
2586
+ export type Receipt_TakenResult = Message<"nord.Receipt.TakenResult"> & {
2587
+ /**
2588
+ * @generated from field: int64 pnl = 1;
2589
+ */
2590
+ pnl: bigint;
2591
+
2592
+ /**
2593
+ * @generated from field: int64 size = 2;
2594
+ */
2595
+ size: bigint;
2596
+
2597
+ /**
2598
+ * @generated from field: uint32 taker_account_id = 3;
2599
+ */
2600
+ takerAccountId: number;
2601
+ };
2602
+
2603
+ /**
2604
+ * @generated from message nord.Receipt.TakenResult
2605
+ */
2606
+ export type Receipt_TakenResultJson = {
2607
+ /**
2608
+ * @generated from field: int64 pnl = 1;
2609
+ */
2610
+ pnl?: string;
2611
+
2612
+ /**
2613
+ * @generated from field: int64 size = 2;
2614
+ */
2615
+ size?: string;
2616
+
2617
+ /**
2618
+ * @generated from field: uint32 taker_account_id = 3;
2619
+ */
2620
+ takerAccountId?: number;
2621
+ };
2622
+
2623
+ /**
2624
+ * Describes the message nord.Receipt.TakenResult.
2625
+ * Use `create(Receipt_TakenResultSchema)` to create a new message.
2626
+ */
2627
+ export const Receipt_TakenResultSchema: GenMessage<Receipt_TakenResult, {jsonType: Receipt_TakenResultJson}> = /*@__PURE__*/
2628
+ messageDesc(file_nord, 10, 4);
2629
+
2630
+ /**
2631
+ * @generated from message nord.Receipt.PositionTakenOrTradedResult
2632
+ */
2633
+ export type Receipt_PositionTakenOrTradedResult = Message<"nord.Receipt.PositionTakenOrTradedResult"> & {
2634
+ /**
2635
+ * @generated from field: uint32 market_id = 1;
2636
+ */
2637
+ marketId: number;
2638
+
2639
+ /**
2640
+ * @generated from oneof nord.Receipt.PositionTakenOrTradedResult.PositionTakenOrTradedKind
2641
+ */
2642
+ PositionTakenOrTradedKind: {
2643
+ /**
2644
+ * @generated from field: nord.Receipt.TakenResult taken = 2;
2645
+ */
2646
+ value: Receipt_TakenResult;
2647
+ case: "taken";
2648
+ } | {
2649
+ /**
2650
+ * non empty if trade immediately
2651
+ *
2652
+ * @generated from field: nord.Receipt.PlaceOrderResult traded = 3;
2653
+ */
2654
+ value: Receipt_PlaceOrderResult;
2655
+ case: "traded";
2656
+ } | { case: undefined; value?: undefined };
2657
+ };
2658
+
2659
+ /**
2660
+ * @generated from message nord.Receipt.PositionTakenOrTradedResult
2661
+ */
2662
+ export type Receipt_PositionTakenOrTradedResultJson = {
2663
+ /**
2664
+ * @generated from field: uint32 market_id = 1;
2665
+ */
2666
+ marketId?: number;
2667
+
2668
+ /**
2669
+ * @generated from field: nord.Receipt.TakenResult taken = 2;
2670
+ */
2671
+ taken?: Receipt_TakenResultJson;
2672
+
2673
+ /**
2674
+ * non empty if trade immediately
2675
+ *
2676
+ * @generated from field: nord.Receipt.PlaceOrderResult traded = 3;
2677
+ */
2678
+ traded?: Receipt_PlaceOrderResultJson;
2679
+ };
2680
+
2681
+ /**
2682
+ * Describes the message nord.Receipt.PositionTakenOrTradedResult.
2683
+ * Use `create(Receipt_PositionTakenOrTradedResultSchema)` to create a new message.
2684
+ */
2685
+ export const Receipt_PositionTakenOrTradedResultSchema: GenMessage<Receipt_PositionTakenOrTradedResult, {jsonType: Receipt_PositionTakenOrTradedResultJson}> = /*@__PURE__*/
2686
+ messageDesc(file_nord, 10, 5);
2687
+
2688
+ /**
2689
+ * @generated from message nord.Receipt.CancelOrderResult
2690
+ */
2691
+ export type Receipt_CancelOrderResult = Message<"nord.Receipt.CancelOrderResult"> & {
2692
+ /**
2693
+ * @generated from field: uint64 order_id = 1;
2694
+ */
2695
+ orderId: bigint;
2696
+
2697
+ /**
2698
+ * Account from which order was cancelled
2699
+ *
2700
+ * @generated from field: uint32 account_id = 2;
2701
+ */
2702
+ accountId: number;
2703
+ };
2704
+
2705
+ /**
2706
+ * @generated from message nord.Receipt.CancelOrderResult
2707
+ */
2708
+ export type Receipt_CancelOrderResultJson = {
2709
+ /**
2710
+ * @generated from field: uint64 order_id = 1;
2711
+ */
2712
+ orderId?: string;
2713
+
2714
+ /**
2715
+ * Account from which order was cancelled
2716
+ *
2717
+ * @generated from field: uint32 account_id = 2;
2718
+ */
2719
+ accountId?: number;
2720
+ };
2721
+
2722
+ /**
2723
+ * Describes the message nord.Receipt.CancelOrderResult.
2724
+ * Use `create(Receipt_CancelOrderResultSchema)` to create a new message.
2725
+ */
2726
+ export const Receipt_CancelOrderResultSchema: GenMessage<Receipt_CancelOrderResult, {jsonType: Receipt_CancelOrderResultJson}> = /*@__PURE__*/
2727
+ messageDesc(file_nord, 10, 6);
2728
+
2729
+ /**
2730
+ * @generated from message nord.Receipt.DepositResult
2731
+ */
2732
+ export type Receipt_DepositResult = Message<"nord.Receipt.DepositResult"> & {
2733
+ /**
2734
+ * @generated from field: uint32 token_id = 1;
2735
+ */
2736
+ tokenId: number;
2737
+
2738
+ /**
2739
+ * @generated from field: uint64 amount = 2;
2740
+ */
2741
+ amount: bigint;
2742
+
2743
+ /**
2744
+ * Default account of newly created or existing user
2745
+ *
2746
+ * @generated from field: uint32 account_id = 3;
2747
+ */
2748
+ accountId: number;
2749
+
2750
+ /**
2751
+ * @generated from field: bool user_created = 4;
2752
+ */
2753
+ userCreated: boolean;
2754
+
2755
+ /**
2756
+ * @generated from field: bytes user_pubkey = 5;
2757
+ */
2758
+ userPubkey: Uint8Array;
2759
+ };
2760
+
2761
+ /**
2762
+ * @generated from message nord.Receipt.DepositResult
2763
+ */
2764
+ export type Receipt_DepositResultJson = {
2765
+ /**
2766
+ * @generated from field: uint32 token_id = 1;
2767
+ */
2768
+ tokenId?: number;
2769
+
2770
+ /**
2771
+ * @generated from field: uint64 amount = 2;
2772
+ */
2773
+ amount?: string;
2774
+
2775
+ /**
2776
+ * Default account of newly created or existing user
2777
+ *
2778
+ * @generated from field: uint32 account_id = 3;
2779
+ */
2780
+ accountId?: number;
2781
+
2782
+ /**
2783
+ * @generated from field: bool user_created = 4;
2784
+ */
2785
+ userCreated?: boolean;
2786
+
2787
+ /**
2788
+ * @generated from field: bytes user_pubkey = 5;
2789
+ */
2790
+ userPubkey?: string;
2791
+ };
2792
+
2793
+ /**
2794
+ * Describes the message nord.Receipt.DepositResult.
2795
+ * Use `create(Receipt_DepositResultSchema)` to create a new message.
2796
+ */
2797
+ export const Receipt_DepositResultSchema: GenMessage<Receipt_DepositResult, {jsonType: Receipt_DepositResultJson}> = /*@__PURE__*/
2798
+ messageDesc(file_nord, 10, 7);
2799
+
2800
+ /**
2801
+ * @generated from message nord.Receipt.InsertTokenResult
2802
+ */
2803
+ export type Receipt_InsertTokenResult = Message<"nord.Receipt.InsertTokenResult"> & {
2804
+ /**
2805
+ * @generated from field: bytes chain_addr = 1;
2806
+ */
2807
+ chainAddr: Uint8Array;
2808
+
2809
+ /**
2810
+ * @generated from field: nord.Token token = 2;
2811
+ */
2812
+ token?: Token;
2813
+ };
2814
+
2815
+ /**
2816
+ * @generated from message nord.Receipt.InsertTokenResult
2817
+ */
2818
+ export type Receipt_InsertTokenResultJson = {
2819
+ /**
2820
+ * @generated from field: bytes chain_addr = 1;
2821
+ */
2822
+ chainAddr?: string;
2823
+
2824
+ /**
2825
+ * @generated from field: nord.Token token = 2;
2826
+ */
2827
+ token?: TokenJson;
2828
+ };
2829
+
2830
+ /**
2831
+ * Describes the message nord.Receipt.InsertTokenResult.
2832
+ * Use `create(Receipt_InsertTokenResultSchema)` to create a new message.
2833
+ */
2834
+ export const Receipt_InsertTokenResultSchema: GenMessage<Receipt_InsertTokenResult, {jsonType: Receipt_InsertTokenResultJson}> = /*@__PURE__*/
2835
+ messageDesc(file_nord, 10, 8);
2836
+
2837
+ /**
2838
+ * @generated from message nord.Receipt.InsertMarketResult
2839
+ */
2840
+ export type Receipt_InsertMarketResult = Message<"nord.Receipt.InsertMarketResult"> & {
2841
+ /**
2842
+ * @generated from field: nord.Market market = 1;
2843
+ */
2844
+ market?: Market;
2845
+ };
2846
+
2847
+ /**
2848
+ * @generated from message nord.Receipt.InsertMarketResult
2849
+ */
2850
+ export type Receipt_InsertMarketResultJson = {
2851
+ /**
2852
+ * @generated from field: nord.Market market = 1;
2853
+ */
2854
+ market?: MarketJson;
2855
+ };
2856
+
2857
+ /**
2858
+ * Describes the message nord.Receipt.InsertMarketResult.
2859
+ * Use `create(Receipt_InsertMarketResultSchema)` to create a new message.
2860
+ */
2861
+ export const Receipt_InsertMarketResultSchema: GenMessage<Receipt_InsertMarketResult, {jsonType: Receipt_InsertMarketResultJson}> = /*@__PURE__*/
2862
+ messageDesc(file_nord, 10, 9);
2863
+
2864
+ /**
2865
+ * @generated from message nord.Receipt.WithdrawResult
2866
+ */
2867
+ export type Receipt_WithdrawResult = Message<"nord.Receipt.WithdrawResult"> & {
2868
+ /**
2869
+ * @generated from field: uint32 token_id = 1;
2870
+ */
2871
+ tokenId: number;
2872
+
2873
+ /**
2874
+ * @generated from field: uint64 amount = 2;
2875
+ */
2876
+ amount: bigint;
2877
+
2878
+ /**
2879
+ * @generated from field: uint64 balance = 3;
2880
+ */
2881
+ balance: bigint;
2882
+
2883
+ /**
2884
+ * @generated from field: uint32 account_id = 4;
2885
+ */
2886
+ accountId: number;
2887
+
2888
+ /**
2889
+ * @generated from field: uint64 fee = 5;
2890
+ */
2891
+ fee: bigint;
2892
+
2893
+ /**
2894
+ * @generated from field: bytes user_pubkey = 6;
2895
+ */
2896
+ userPubkey: Uint8Array;
2897
+ };
2898
+
2899
+ /**
2900
+ * @generated from message nord.Receipt.WithdrawResult
2901
+ */
2902
+ export type Receipt_WithdrawResultJson = {
2903
+ /**
2904
+ * @generated from field: uint32 token_id = 1;
2905
+ */
2906
+ tokenId?: number;
2907
+
2908
+ /**
2909
+ * @generated from field: uint64 amount = 2;
2910
+ */
2911
+ amount?: string;
2912
+
2913
+ /**
2914
+ * @generated from field: uint64 balance = 3;
2915
+ */
2916
+ balance?: string;
2917
+
2918
+ /**
2919
+ * @generated from field: uint32 account_id = 4;
2920
+ */
2921
+ accountId?: number;
2922
+
2923
+ /**
2924
+ * @generated from field: uint64 fee = 5;
2925
+ */
2926
+ fee?: string;
2927
+
2928
+ /**
2929
+ * @generated from field: bytes user_pubkey = 6;
2930
+ */
2931
+ userPubkey?: string;
2932
+ };
2933
+
2934
+ /**
2935
+ * Describes the message nord.Receipt.WithdrawResult.
2936
+ * Use `create(Receipt_WithdrawResultSchema)` to create a new message.
2937
+ */
2938
+ export const Receipt_WithdrawResultSchema: GenMessage<Receipt_WithdrawResult, {jsonType: Receipt_WithdrawResultJson}> = /*@__PURE__*/
2939
+ messageDesc(file_nord, 10, 10);
2940
+
2941
+ /**
2942
+ * pyth receipts are not user facing, so they can be terse and optional
2943
+ *
2944
+ * @generated from message nord.Receipt.OracleSymbolFeedResult
2945
+ */
2946
+ export type Receipt_OracleSymbolFeedResult = Message<"nord.Receipt.OracleSymbolFeedResult"> & {
2947
+ /**
2948
+ * @generated from field: string oracle_symbol = 1;
2949
+ */
2950
+ oracleSymbol: string;
2951
+
2952
+ /**
2953
+ * @generated from field: bytes feed_id = 2;
2954
+ */
2955
+ feedId: Uint8Array;
2956
+ };
2957
+
2958
+ /**
2959
+ * pyth receipts are not user facing, so they can be terse and optional
2960
+ *
2961
+ * @generated from message nord.Receipt.OracleSymbolFeedResult
2962
+ */
2963
+ export type Receipt_OracleSymbolFeedResultJson = {
2964
+ /**
2965
+ * @generated from field: string oracle_symbol = 1;
2966
+ */
2967
+ oracleSymbol?: string;
2968
+
2969
+ /**
2970
+ * @generated from field: bytes feed_id = 2;
2971
+ */
2972
+ feedId?: string;
2973
+ };
2974
+
2975
+ /**
2976
+ * Describes the message nord.Receipt.OracleSymbolFeedResult.
2977
+ * Use `create(Receipt_OracleSymbolFeedResultSchema)` to create a new message.
2978
+ */
2979
+ export const Receipt_OracleSymbolFeedResultSchema: GenMessage<Receipt_OracleSymbolFeedResult, {jsonType: Receipt_OracleSymbolFeedResultJson}> = /*@__PURE__*/
2980
+ messageDesc(file_nord, 10, 11);
2981
+
2982
+ /**
2983
+ * @generated from message nord.Receipt.OracleUpdateResult
2984
+ */
2985
+ export type Receipt_OracleUpdateResult = Message<"nord.Receipt.OracleUpdateResult"> & {
2986
+ /**
2987
+ * @generated from field: int64 timestamp = 1;
2988
+ */
2989
+ timestamp: bigint;
2990
+ };
2991
+
2992
+ /**
2993
+ * @generated from message nord.Receipt.OracleUpdateResult
2994
+ */
2995
+ export type Receipt_OracleUpdateResultJson = {
2996
+ /**
2997
+ * @generated from field: int64 timestamp = 1;
2998
+ */
2999
+ timestamp?: string;
3000
+ };
3001
+
3002
+ /**
3003
+ * Describes the message nord.Receipt.OracleUpdateResult.
3004
+ * Use `create(Receipt_OracleUpdateResultSchema)` to create a new message.
3005
+ */
3006
+ export const Receipt_OracleUpdateResultSchema: GenMessage<Receipt_OracleUpdateResult, {jsonType: Receipt_OracleUpdateResultJson}> = /*@__PURE__*/
3007
+ messageDesc(file_nord, 10, 12);
3008
+
3009
+ /**
3010
+ * @generated from message nord.Receipt.UpdateGuardianSetResult
3011
+ */
3012
+ export type Receipt_UpdateGuardianSetResult = Message<"nord.Receipt.UpdateGuardianSetResult"> & {
3013
+ /**
3014
+ * @generated from field: uint32 guardian_set_index = 1;
3015
+ */
3016
+ guardianSetIndex: number;
3017
+
3018
+ /**
3019
+ * @generated from field: repeated bytes addresses = 2;
3020
+ */
3021
+ addresses: Uint8Array[];
3022
+ };
3023
+
3024
+ /**
3025
+ * @generated from message nord.Receipt.UpdateGuardianSetResult
3026
+ */
3027
+ export type Receipt_UpdateGuardianSetResultJson = {
3028
+ /**
3029
+ * @generated from field: uint32 guardian_set_index = 1;
3030
+ */
3031
+ guardianSetIndex?: number;
3032
+
3033
+ /**
3034
+ * @generated from field: repeated bytes addresses = 2;
3035
+ */
3036
+ addresses?: string[];
3037
+ };
3038
+
3039
+ /**
3040
+ * Describes the message nord.Receipt.UpdateGuardianSetResult.
3041
+ * Use `create(Receipt_UpdateGuardianSetResultSchema)` to create a new message.
3042
+ */
3043
+ export const Receipt_UpdateGuardianSetResultSchema: GenMessage<Receipt_UpdateGuardianSetResult, {jsonType: Receipt_UpdateGuardianSetResultJson}> = /*@__PURE__*/
3044
+ messageDesc(file_nord, 10, 13);
3045
+
3046
+ /**
3047
+ * @generated from message nord.Receipt.PerpPosition
3048
+ */
3049
+ export type Receipt_PerpPosition = Message<"nord.Receipt.PerpPosition"> & {
3050
+ /**
3051
+ * @generated from field: uint32 market_id = 1;
3052
+ */
3053
+ marketId: number;
3054
+
3055
+ /**
3056
+ * @generated from field: int64 base_size = 2;
3057
+ */
3058
+ baseSize: bigint;
3059
+
3060
+ /**
3061
+ * @generated from field: uint64 price = 3;
3062
+ */
3063
+ price: bigint;
3064
+ };
3065
+
3066
+ /**
3067
+ * @generated from message nord.Receipt.PerpPosition
3068
+ */
3069
+ export type Receipt_PerpPositionJson = {
3070
+ /**
3071
+ * @generated from field: uint32 market_id = 1;
3072
+ */
3073
+ marketId?: number;
3074
+
3075
+ /**
3076
+ * @generated from field: int64 base_size = 2;
3077
+ */
3078
+ baseSize?: string;
3079
+
3080
+ /**
3081
+ * @generated from field: uint64 price = 3;
3082
+ */
3083
+ price?: string;
3084
+ };
3085
+
3086
+ /**
3087
+ * Describes the message nord.Receipt.PerpPosition.
3088
+ * Use `create(Receipt_PerpPositionSchema)` to create a new message.
3089
+ */
3090
+ export const Receipt_PerpPositionSchema: GenMessage<Receipt_PerpPosition, {jsonType: Receipt_PerpPositionJson}> = /*@__PURE__*/
3091
+ messageDesc(file_nord, 10, 14);
3092
+
3093
+ /**
3094
+ * / Result of bankruptcy liquidation.
3095
+ *
3096
+ * @generated from message nord.Receipt.AccountLiquidated
3097
+ */
3098
+ export type Receipt_AccountLiquidated = Message<"nord.Receipt.AccountLiquidated"> & {
3099
+ /**
3100
+ * @generated from field: uint32 liquidator_account_id = 1;
3101
+ */
3102
+ liquidatorAccountId: number;
3103
+
3104
+ /**
3105
+ * @generated from field: uint32 liquidatee_account_id = 2;
3106
+ */
3107
+ liquidateeAccountId: number;
3108
+
3109
+ /**
3110
+ * @generated from field: repeated uint64 cancelled_orders = 3;
3111
+ */
3112
+ cancelledOrders: bigint[];
3113
+
3114
+ /**
3115
+ * @generated from field: repeated nord.Receipt.PerpPosition removed_perps = 4;
3116
+ */
3117
+ removedPerps: Receipt_PerpPosition[];
3118
+ };
3119
+
3120
+ /**
3121
+ * / Result of bankruptcy liquidation.
3122
+ *
3123
+ * @generated from message nord.Receipt.AccountLiquidated
3124
+ */
3125
+ export type Receipt_AccountLiquidatedJson = {
3126
+ /**
3127
+ * @generated from field: uint32 liquidator_account_id = 1;
3128
+ */
3129
+ liquidatorAccountId?: number;
3130
+
3131
+ /**
3132
+ * @generated from field: uint32 liquidatee_account_id = 2;
3133
+ */
3134
+ liquidateeAccountId?: number;
3135
+
3136
+ /**
3137
+ * @generated from field: repeated uint64 cancelled_orders = 3;
3138
+ */
3139
+ cancelledOrders?: string[];
3140
+
3141
+ /**
3142
+ * @generated from field: repeated nord.Receipt.PerpPosition removed_perps = 4;
3143
+ */
3144
+ removedPerps?: Receipt_PerpPositionJson[];
3145
+ };
3146
+
3147
+ /**
3148
+ * Describes the message nord.Receipt.AccountLiquidated.
3149
+ * Use `create(Receipt_AccountLiquidatedSchema)` to create a new message.
3150
+ */
3151
+ export const Receipt_AccountLiquidatedSchema: GenMessage<Receipt_AccountLiquidated, {jsonType: Receipt_AccountLiquidatedJson}> = /*@__PURE__*/
3152
+ messageDesc(file_nord, 10, 15);
3153
+
3154
+ /**
3155
+ * @generated from message nord.Receipt.SessionRevoked
3156
+ */
3157
+ export type Receipt_SessionRevoked = Message<"nord.Receipt.SessionRevoked"> & {
3158
+ };
3159
+
3160
+ /**
3161
+ * @generated from message nord.Receipt.SessionRevoked
3162
+ */
3163
+ export type Receipt_SessionRevokedJson = {
3164
+ };
3165
+
3166
+ /**
3167
+ * Describes the message nord.Receipt.SessionRevoked.
3168
+ * Use `create(Receipt_SessionRevokedSchema)` to create a new message.
3169
+ */
3170
+ export const Receipt_SessionRevokedSchema: GenMessage<Receipt_SessionRevoked, {jsonType: Receipt_SessionRevokedJson}> = /*@__PURE__*/
3171
+ messageDesc(file_nord, 10, 16);
3172
+
3173
+ /**
3174
+ * @generated from message nord.Receipt.Paused
3175
+ */
3176
+ export type Receipt_Paused = Message<"nord.Receipt.Paused"> & {
3177
+ };
3178
+
3179
+ /**
3180
+ * @generated from message nord.Receipt.Paused
3181
+ */
3182
+ export type Receipt_PausedJson = {
3183
+ };
3184
+
3185
+ /**
3186
+ * Describes the message nord.Receipt.Paused.
3187
+ * Use `create(Receipt_PausedSchema)` to create a new message.
3188
+ */
3189
+ export const Receipt_PausedSchema: GenMessage<Receipt_Paused, {jsonType: Receipt_PausedJson}> = /*@__PURE__*/
3190
+ messageDesc(file_nord, 10, 17);
3191
+
3192
+ /**
3193
+ * @generated from message nord.Receipt.Unpaused
3194
+ */
3195
+ export type Receipt_Unpaused = Message<"nord.Receipt.Unpaused"> & {
3196
+ };
3197
+
3198
+ /**
3199
+ * @generated from message nord.Receipt.Unpaused
3200
+ */
3201
+ export type Receipt_UnpausedJson = {
3202
+ };
3203
+
3204
+ /**
3205
+ * Describes the message nord.Receipt.Unpaused.
3206
+ * Use `create(Receipt_UnpausedSchema)` to create a new message.
3207
+ */
3208
+ export const Receipt_UnpausedSchema: GenMessage<Receipt_Unpaused, {jsonType: Receipt_UnpausedJson}> = /*@__PURE__*/
3209
+ messageDesc(file_nord, 10, 18);
3210
+
3211
+ /**
3212
+ * @generated from message nord.Receipt.Transferred
3213
+ */
3214
+ export type Receipt_Transferred = Message<"nord.Receipt.Transferred"> & {
3215
+ /**
3216
+ * @generated from field: uint32 from_account_id = 1;
3217
+ */
3218
+ fromAccountId: number;
3219
+
3220
+ /**
3221
+ * @generated from field: optional uint32 to_user_account = 2;
3222
+ */
3223
+ toUserAccount?: number;
3224
+
3225
+ /**
3226
+ * @generated from field: uint32 token_id = 3;
3227
+ */
3228
+ tokenId: number;
3229
+
3230
+ /**
3231
+ * @generated from field: uint64 amount = 4;
3232
+ */
3233
+ amount: bigint;
3234
+
3235
+ /**
3236
+ * @generated from field: bool account_created = 5;
3237
+ */
3238
+ accountCreated: boolean;
3239
+
3240
+ /**
3241
+ * @generated from field: optional nord.SpecialAccount to_special_account = 6;
3242
+ */
3243
+ toSpecialAccount?: SpecialAccount;
3244
+ };
3245
+
3246
+ /**
3247
+ * @generated from message nord.Receipt.Transferred
3248
+ */
3249
+ export type Receipt_TransferredJson = {
3250
+ /**
3251
+ * @generated from field: uint32 from_account_id = 1;
3252
+ */
3253
+ fromAccountId?: number;
3254
+
3255
+ /**
3256
+ * @generated from field: optional uint32 to_user_account = 2;
3257
+ */
3258
+ toUserAccount?: number;
3259
+
3260
+ /**
3261
+ * @generated from field: uint32 token_id = 3;
3262
+ */
3263
+ tokenId?: number;
3264
+
3265
+ /**
3266
+ * @generated from field: uint64 amount = 4;
3267
+ */
3268
+ amount?: string;
3269
+
3270
+ /**
3271
+ * @generated from field: bool account_created = 5;
3272
+ */
3273
+ accountCreated?: boolean;
3274
+
3275
+ /**
3276
+ * @generated from field: optional nord.SpecialAccount to_special_account = 6;
3277
+ */
3278
+ toSpecialAccount?: SpecialAccountJson;
3279
+ };
3280
+
3281
+ /**
3282
+ * Describes the message nord.Receipt.Transferred.
3283
+ * Use `create(Receipt_TransferredSchema)` to create a new message.
3284
+ */
3285
+ export const Receipt_TransferredSchema: GenMessage<Receipt_Transferred, {jsonType: Receipt_TransferredJson}> = /*@__PURE__*/
3286
+ messageDesc(file_nord, 10, 19);
3287
+
3288
+ /**
3289
+ * @generated from message nord.Receipt.TriggerAdded
3290
+ */
3291
+ export type Receipt_TriggerAdded = Message<"nord.Receipt.TriggerAdded"> & {
3292
+ };
3293
+
3294
+ /**
3295
+ * @generated from message nord.Receipt.TriggerAdded
3296
+ */
3297
+ export type Receipt_TriggerAddedJson = {
3298
+ };
3299
+
3300
+ /**
3301
+ * Describes the message nord.Receipt.TriggerAdded.
3302
+ * Use `create(Receipt_TriggerAddedSchema)` to create a new message.
3303
+ */
3304
+ export const Receipt_TriggerAddedSchema: GenMessage<Receipt_TriggerAdded, {jsonType: Receipt_TriggerAddedJson}> = /*@__PURE__*/
3305
+ messageDesc(file_nord, 10, 20);
3306
+
3307
+ /**
3308
+ * @generated from message nord.Receipt.TriggerRemoved
3309
+ */
3310
+ export type Receipt_TriggerRemoved = Message<"nord.Receipt.TriggerRemoved"> & {
3311
+ };
3312
+
3313
+ /**
3314
+ * @generated from message nord.Receipt.TriggerRemoved
3315
+ */
3316
+ export type Receipt_TriggerRemovedJson = {
3317
+ };
3318
+
3319
+ /**
3320
+ * Describes the message nord.Receipt.TriggerRemoved.
3321
+ * Use `create(Receipt_TriggerRemovedSchema)` to create a new message.
3322
+ */
3323
+ export const Receipt_TriggerRemovedSchema: GenMessage<Receipt_TriggerRemoved, {jsonType: Receipt_TriggerRemovedJson}> = /*@__PURE__*/
3324
+ messageDesc(file_nord, 10, 21);
3325
+
3326
+ /**
3327
+ * @generated from message nord.Receipt.AtomicSubactionResultKind
3328
+ */
3329
+ export type Receipt_AtomicSubactionResultKind = Message<"nord.Receipt.AtomicSubactionResultKind"> & {
3330
+ /**
3331
+ * @generated from oneof nord.Receipt.AtomicSubactionResultKind.inner
3332
+ */
3333
+ inner: {
3334
+ /**
3335
+ * reusing existing messages -> way less code to change in nord, with some
3336
+ * duplication of data unlike input, which is required to be very specific
3337
+ * to be correct, receipts can be same to easy ingested into view and hist
3338
+ *
3339
+ * @generated from field: nord.Receipt.PlaceOrderResult place_order_result = 1;
3340
+ */
3341
+ value: Receipt_PlaceOrderResult;
3342
+ case: "placeOrderResult";
3343
+ } | {
3344
+ /**
3345
+ * @generated from field: nord.Receipt.CancelOrderResult cancel_order = 2;
3346
+ */
3347
+ value: Receipt_CancelOrderResult;
3348
+ case: "cancelOrder";
3349
+ } | { case: undefined; value?: undefined };
3350
+ };
3351
+
3352
+ /**
3353
+ * @generated from message nord.Receipt.AtomicSubactionResultKind
3354
+ */
3355
+ export type Receipt_AtomicSubactionResultKindJson = {
3356
+ /**
3357
+ * reusing existing messages -> way less code to change in nord, with some
3358
+ * duplication of data unlike input, which is required to be very specific
3359
+ * to be correct, receipts can be same to easy ingested into view and hist
3360
+ *
3361
+ * @generated from field: nord.Receipt.PlaceOrderResult place_order_result = 1;
3362
+ */
3363
+ placeOrderResult?: Receipt_PlaceOrderResultJson;
3364
+
3365
+ /**
3366
+ * @generated from field: nord.Receipt.CancelOrderResult cancel_order = 2;
3367
+ */
3368
+ cancelOrder?: Receipt_CancelOrderResultJson;
3369
+ };
3370
+
3371
+ /**
3372
+ * Describes the message nord.Receipt.AtomicSubactionResultKind.
3373
+ * Use `create(Receipt_AtomicSubactionResultKindSchema)` to create a new message.
3374
+ */
3375
+ export const Receipt_AtomicSubactionResultKindSchema: GenMessage<Receipt_AtomicSubactionResultKind, {jsonType: Receipt_AtomicSubactionResultKindJson}> = /*@__PURE__*/
3376
+ messageDesc(file_nord, 10, 22);
3377
+
3378
+ /**
3379
+ * @generated from message nord.Receipt.AtomicResult
3380
+ */
3381
+ export type Receipt_AtomicResult = Message<"nord.Receipt.AtomicResult"> & {
3382
+ /**
3383
+ * @generated from field: repeated nord.Receipt.AtomicSubactionResultKind results = 1;
3384
+ */
3385
+ results: Receipt_AtomicSubactionResultKind[];
3386
+ };
3387
+
3388
+ /**
3389
+ * @generated from message nord.Receipt.AtomicResult
3390
+ */
3391
+ export type Receipt_AtomicResultJson = {
3392
+ /**
3393
+ * @generated from field: repeated nord.Receipt.AtomicSubactionResultKind results = 1;
3394
+ */
3395
+ results?: Receipt_AtomicSubactionResultKindJson[];
3396
+ };
3397
+
3398
+ /**
3399
+ * Describes the message nord.Receipt.AtomicResult.
3400
+ * Use `create(Receipt_AtomicResultSchema)` to create a new message.
3401
+ */
3402
+ export const Receipt_AtomicResultSchema: GenMessage<Receipt_AtomicResult, {jsonType: Receipt_AtomicResultJson}> = /*@__PURE__*/
3403
+ messageDesc(file_nord, 10, 23);
3404
+
3405
+ /**
3406
+ * @generated from enum nord.Side
3407
+ */
3408
+ export enum Side {
3409
+ /**
3410
+ * @generated from enum value: ASK = 0;
3411
+ */
3412
+ ASK = 0,
3413
+
3414
+ /**
3415
+ * @generated from enum value: BID = 1;
3416
+ */
3417
+ BID = 1,
3418
+ }
3419
+
3420
+ /**
3421
+ * @generated from enum nord.Side
3422
+ */
3423
+ export type SideJson = "ASK" | "BID";
3424
+
3425
+ /**
3426
+ * Describes the enum nord.Side.
3427
+ */
3428
+ export const SideSchema: GenEnum<Side, SideJson> = /*@__PURE__*/
3429
+ enumDesc(file_nord, 0);
3430
+
3431
+ /**
3432
+ * @generated from enum nord.TriggerKind
3433
+ */
3434
+ export enum TriggerKind {
3435
+ /**
3436
+ * @generated from enum value: STOP_LOSS = 0;
3437
+ */
3438
+ STOP_LOSS = 0,
3439
+
3440
+ /**
3441
+ * @generated from enum value: TAKE_PROFIT = 1;
3442
+ */
3443
+ TAKE_PROFIT = 1,
3444
+ }
3445
+
3446
+ /**
3447
+ * @generated from enum nord.TriggerKind
3448
+ */
3449
+ export type TriggerKindJson = "STOP_LOSS" | "TAKE_PROFIT";
3450
+
3451
+ /**
3452
+ * Describes the enum nord.TriggerKind.
3453
+ */
3454
+ export const TriggerKindSchema: GenEnum<TriggerKind, TriggerKindJson> = /*@__PURE__*/
3455
+ enumDesc(file_nord, 1);
3456
+
3457
+ /**
3458
+ * @generated from enum nord.FillMode
3459
+ */
3460
+ export enum FillMode {
3461
+ /**
3462
+ * @generated from enum value: LIMIT = 0;
3463
+ */
3464
+ LIMIT = 0,
3465
+
3466
+ /**
3467
+ * @generated from enum value: POST_ONLY = 1;
3468
+ */
3469
+ POST_ONLY = 1,
3470
+
3471
+ /**
3472
+ * @generated from enum value: IMMEDIATE_OR_CANCEL = 2;
3473
+ */
3474
+ IMMEDIATE_OR_CANCEL = 2,
3475
+
3476
+ /**
3477
+ * @generated from enum value: FILL_OR_KILL = 3;
3478
+ */
3479
+ FILL_OR_KILL = 3,
3480
+ }
3481
+
3482
+ /**
3483
+ * @generated from enum nord.FillMode
3484
+ */
3485
+ export type FillModeJson = "LIMIT" | "POST_ONLY" | "IMMEDIATE_OR_CANCEL" | "FILL_OR_KILL";
3486
+
3487
+ /**
3488
+ * Describes the enum nord.FillMode.
3489
+ */
3490
+ export const FillModeSchema: GenEnum<FillMode, FillModeJson> = /*@__PURE__*/
3491
+ enumDesc(file_nord, 2);
3492
+
3493
+ /**
3494
+ * @generated from enum nord.MarketType
3495
+ */
3496
+ export enum MarketType {
3497
+ /**
3498
+ * @generated from enum value: SPOT = 0;
3499
+ */
3500
+ SPOT = 0,
3501
+
3502
+ /**
3503
+ * @generated from enum value: PERPETUALS = 1;
3504
+ */
3505
+ PERPETUALS = 1,
3506
+ }
3507
+
3508
+ /**
3509
+ * @generated from enum nord.MarketType
3510
+ */
3511
+ export type MarketTypeJson = "SPOT" | "PERPETUALS";
3512
+
3513
+ /**
3514
+ * Describes the enum nord.MarketType.
3515
+ */
3516
+ export const MarketTypeSchema: GenEnum<MarketType, MarketTypeJson> = /*@__PURE__*/
3517
+ enumDesc(file_nord, 3);
3518
+
3519
+ /**
3520
+ * Error codes returned by the engine.
3521
+ * Some errors has 5bit prefix about error source and 3 bit suffix specifier.
3522
+ * Error source prefix indicates were too look into to fix error.
3523
+ * For example if order has bad input, it would be order relevant prefix.
3524
+ * But if order cannot apply results to balance, it would be balance relevant
3525
+ * prefix.
3526
+ *
3527
+ * @generated from enum nord.Error
3528
+ */
3529
+ export enum Error {
3530
+ /**
3531
+ * @generated from enum value: DUPLICATE = 0;
3532
+ */
3533
+ DUPLICATE = 0,
3534
+
3535
+ /**
3536
+ * @generated from enum value: DECODE_FAILURE = 2;
3537
+ */
3538
+ DECODE_FAILURE = 2,
3539
+
3540
+ /**
3541
+ * @generated from enum value: INVALID_SIGNATURE = 3;
3542
+ */
3543
+ INVALID_SIGNATURE = 3,
3544
+
3545
+ /**
3546
+ * @generated from enum value: MARKET_NOT_FOUND = 4;
3547
+ */
3548
+ MARKET_NOT_FOUND = 4,
3549
+
3550
+ /**
3551
+ * @generated from enum value: TOKEN_NOT_FOUND = 5;
3552
+ */
3553
+ TOKEN_NOT_FOUND = 5,
3554
+
3555
+ /**
3556
+ * @generated from enum value: USER_NOT_FOUND = 6;
3557
+ */
3558
+ USER_NOT_FOUND = 6,
3559
+
3560
+ /**
3561
+ * @generated from enum value: SESSION_NOT_FOUND = 7;
3562
+ */
3563
+ SESSION_NOT_FOUND = 7,
3564
+
3565
+ /**
3566
+ * @generated from enum value: ORDER_NOT_FOUND = 8;
3567
+ */
3568
+ ORDER_NOT_FOUND = 8,
3569
+
3570
+ /**
3571
+ * @generated from enum value: ORDER_SIZE_ZERO = 9;
3572
+ */
3573
+ ORDER_SIZE_ZERO = 9,
3574
+
3575
+ /**
3576
+ * @generated from enum value: ARITHMETIC_OVERFLOW = 11;
3577
+ */
3578
+ ARITHMETIC_OVERFLOW = 11,
3579
+
3580
+ /**
3581
+ * @generated from enum value: INVALID_ORDER_OWNER = 14;
3582
+ */
3583
+ INVALID_ORDER_OWNER = 14,
3584
+
3585
+ /**
3586
+ * @generated from enum value: KEY_ALREADY_REGISTERED = 15;
3587
+ */
3588
+ KEY_ALREADY_REGISTERED = 15,
3589
+
3590
+ /**
3591
+ * @generated from enum value: EXPIRY_TIMESTAMP_IN_PAST = 16;
3592
+ */
3593
+ EXPIRY_TIMESTAMP_IN_PAST = 16,
3594
+
3595
+ /**
3596
+ * @generated from enum value: UPDATE_TIMESTAMP_IN_PAST = 17;
3597
+ */
3598
+ UPDATE_TIMESTAMP_IN_PAST = 17,
3599
+
3600
+ /**
3601
+ * @generated from enum value: TOO_MANY_OPEN_ORDERS = 18;
3602
+ */
3603
+ TOO_MANY_OPEN_ORDERS = 18,
3604
+
3605
+ /**
3606
+ * @generated from enum value: WITHDRAW_AMOUNT_TOO_SMALL = 21;
3607
+ */
3608
+ WITHDRAW_AMOUNT_TOO_SMALL = 21,
3609
+
3610
+ /**
3611
+ * @generated from enum value: PYTH_FEED_NOT_ADDED = 93;
3612
+ */
3613
+ PYTH_FEED_NOT_ADDED = 93,
3614
+
3615
+ /**
3616
+ * @generated from enum value: PYTH_FEED_MISSING = 94;
3617
+ */
3618
+ PYTH_FEED_MISSING = 94,
3619
+
3620
+ /**
3621
+ * @generated from enum value: PYTH_FEED_ALREADY_ADDED = 95;
3622
+ */
3623
+ PYTH_FEED_ALREADY_ADDED = 95,
3624
+
3625
+ /**
3626
+ * @generated from enum value: PYTH_GUARDIAN_SET_UNINITIALIZED = 96;
3627
+ */
3628
+ PYTH_GUARDIAN_SET_UNINITIALIZED = 96,
3629
+
3630
+ /**
3631
+ * @generated from enum value: PYTH_GUARDIAN_SET_INVALID = 97;
3632
+ */
3633
+ PYTH_GUARDIAN_SET_INVALID = 97,
3634
+
3635
+ /**
3636
+ * @generated from enum value: PYTH_FEED_DECIMALS_OUT_OF_RANGE = 98;
3637
+ */
3638
+ PYTH_FEED_DECIMALS_OUT_OF_RANGE = 98,
3639
+
3640
+ /**
3641
+ * @generated from enum value: PYTH_FEED_PRICE_OUT_OF_RANGE = 99;
3642
+ */
3643
+ PYTH_FEED_PRICE_OUT_OF_RANGE = 99,
3644
+
3645
+ /**
3646
+ * @generated from enum value: PYTH_FEED_VARIANCE_OUT_OF_RANGE = 100;
3647
+ */
3648
+ PYTH_FEED_VARIANCE_OUT_OF_RANGE = 100,
3649
+
3650
+ /**
3651
+ * @generated from enum value: PYTH_GUARDIAN_SET_AND_PYTH_SIGNATURE_DO_NOT_MATCH = 101;
3652
+ */
3653
+ PYTH_GUARDIAN_SET_AND_PYTH_SIGNATURE_DO_NOT_MATCH = 101,
3654
+
3655
+ /**
3656
+ * @generated from enum value: INVALID_TOKEN_PARAMETERS = 102;
3657
+ */
3658
+ INVALID_TOKEN_PARAMETERS = 102,
3659
+
3660
+ /**
3661
+ * @generated from enum value: INDEX_PRICE_OUT_OF_RANGE = 103;
3662
+ */
3663
+ INDEX_PRICE_OUT_OF_RANGE = 103,
3664
+
3665
+ /**
3666
+ * @generated from enum value: INDEX_DECIMALS_OUT_OF_RANGE = 104;
3667
+ */
3668
+ INDEX_DECIMALS_OUT_OF_RANGE = 104,
3669
+
3670
+ /**
3671
+ * @generated from enum value: INVALID_STATE_VERSION = 105;
3672
+ */
3673
+ INVALID_STATE_VERSION = 105,
3674
+
3675
+ /**
3676
+ * @generated from enum value: INVALID_MARGINS = 107;
3677
+ */
3678
+ INVALID_MARGINS = 107,
3679
+
3680
+ /**
3681
+ * Market's decimal parameters exceed either "quote limit" or "base limit"
3682
+ * Two mentioned limits were deduced empirically and ensure
3683
+ * that certain overflow errors don't happen when value rescaling is performed
3684
+ * during order placement.
3685
+ *
3686
+ * For both perpetuals and spot markets,
3687
+ * `quote_token.decimals - market.size_decimals - market.price_decimals` must
3688
+ * be within range `[-19; 4]` For spot market, `base_token.decimals -
3689
+ * market.size_decimals` must be within range `[-19; 23]`
3690
+ *
3691
+ * @generated from enum value: MARKET_DECIMALS_EXCEED_LIMITS = 109;
3692
+ */
3693
+ MARKET_DECIMALS_EXCEED_LIMITS = 109,
3694
+
3695
+ /**
3696
+ * @generated from enum value: TOO_MANY_TOKENS = 110;
3697
+ */
3698
+ TOO_MANY_TOKENS = 110,
3699
+
3700
+ /**
3701
+ * @generated from enum value: FUNDING_OVERFLOW = 123;
3702
+ */
3703
+ FUNDING_OVERFLOW = 123,
3704
+
3705
+ /**
3706
+ * If there is order to cancel for position, it should be canceled first
3707
+ * before reducing position
3708
+ *
3709
+ * @generated from enum value: CAN_REDUCE_POSITION_ONLY_IF_ALL_ORDERS_ARE_CANCELED = 124;
3710
+ */
3711
+ CAN_REDUCE_POSITION_ONLY_IF_ALL_ORDERS_ARE_CANCELED = 124,
3712
+
3713
+ /**
3714
+ * Token was found, but not expected to be used in action context
3715
+ *
3716
+ * @generated from enum value: UNEXPECTED_TOKEN_ID = 127;
3717
+ */
3718
+ UNEXPECTED_TOKEN_ID = 127,
3719
+
3720
+ /**
3721
+ * happens in some situation when token misses some relevant information
3722
+ * needed for operation, for example index price
3723
+ *
3724
+ * @generated from enum value: TOKEN_NOT_READY = 130;
3725
+ */
3726
+ TOKEN_NOT_READY = 130,
3727
+
3728
+ /**
3729
+ * Token with specified blockchain address already registered
3730
+ *
3731
+ * @generated from enum value: TOKEN_ALREADY_REGISTERED = 112;
3732
+ */
3733
+ TOKEN_ALREADY_REGISTERED = 112,
3734
+
3735
+ /**
3736
+ * @generated from enum value: IMMEDIATE_ORDER_GOT_NO_FILLS = 133;
3737
+ */
3738
+ IMMEDIATE_ORDER_GOT_NO_FILLS = 133,
3739
+
3740
+ /**
3741
+ * In case there's no price, error if failed to fill at least one of limits
3742
+ *
3743
+ * @generated from enum value: FAILED_TO_FILL_LIMIT = 134;
3744
+ */
3745
+ FAILED_TO_FILL_LIMIT = 134,
3746
+
3747
+ /**
3748
+ * @generated from enum value: POST_ONLY_MUST_NOT_FILL_ANY_OPPOSITE_ORDERS = 135;
3749
+ */
3750
+ POST_ONLY_MUST_NOT_FILL_ANY_OPPOSITE_ORDERS = 135,
3751
+
3752
+ /**
3753
+ * @generated from enum value: INVALID = 136;
3754
+ */
3755
+ INVALID = 136,
3756
+
3757
+ /**
3758
+ * Any action stopped by admin for maintenance or other reason.
3759
+ *
3760
+ * @generated from enum value: MAINTENANCE = 137;
3761
+ */
3762
+ MAINTENANCE = 137,
3763
+
3764
+ /**
3765
+ * @generated from enum value: MINIMUM_SIZE_DECIMALS = 138;
3766
+ */
3767
+ MINIMUM_SIZE_DECIMALS = 138,
3768
+
3769
+ /**
3770
+ * @generated from enum value: PARAMETERS_WILL_CREATE_NON_OPERATIONAL_MARKET = 139;
3771
+ */
3772
+ PARAMETERS_WILL_CREATE_NON_OPERATIONAL_MARKET = 139,
3773
+
3774
+ /**
3775
+ * @generated from enum value: ONLY_IMMEDIATE_ORDERS_ALLOWED = 140;
3776
+ */
3777
+ ONLY_IMMEDIATE_ORDERS_ALLOWED = 140,
3778
+
3779
+ /**
3780
+ * @generated from enum value: TOO_MANY_USER_ACCOUNTS = 141;
3781
+ */
3782
+ TOO_MANY_USER_ACCOUNTS = 141,
3783
+
3784
+ /**
3785
+ * There's no such account with specified id,
3786
+ *
3787
+ * @generated from enum value: ACCOUNT_NOT_FOUND = 142;
3788
+ */
3789
+ ACCOUNT_NOT_FOUND = 142,
3790
+
3791
+ /**
3792
+ * Account doesn't belong to user designated by public key or session id
3793
+ *
3794
+ * @generated from enum value: ACCOUNT_INVALID_OWNER = 143;
3795
+ */
3796
+ ACCOUNT_INVALID_OWNER = 143,
3797
+
3798
+ /**
3799
+ * Operation cannot be made on account because to small amount will be
3800
+ * retained on account
3801
+ *
3802
+ * @generated from enum value: DUST_ACCOUNT = 145;
3803
+ */
3804
+ DUST_ACCOUNT = 145,
3805
+
3806
+ /**
3807
+ * 10100_000
3808
+ *
3809
+ * @generated from enum value: BALANCE = 160;
3810
+ */
3811
+ BALANCE = 160,
3812
+
3813
+ /**
3814
+ * 10100_001
3815
+ *
3816
+ * @generated from enum value: BALANCE_DEPOSIT_OVERFLOW = 161;
3817
+ */
3818
+ BALANCE_DEPOSIT_OVERFLOW = 161,
3819
+
3820
+ /**
3821
+ * 10100_010
3822
+ *
3823
+ * @generated from enum value: BALANCE_CHANGE_OVERFLOW = 162;
3824
+ */
3825
+ BALANCE_CHANGE_OVERFLOW = 162,
3826
+
3827
+ /**
3828
+ * 10100_011
3829
+ *
3830
+ * @generated from enum value: BALANCE_CHANGE_LIMIT_EXCEEDED = 163;
3831
+ */
3832
+ BALANCE_CHANGE_LIMIT_EXCEEDED = 163,
3833
+
3834
+ /**
3835
+ * Happens when account balances has no sufficient token amount to perform
3836
+ * action.
3837
+ * 10100_100
3838
+ *
3839
+ * @generated from enum value: BALANCE_INSUFFICIENT = 164;
3840
+ */
3841
+ BALANCE_INSUFFICIENT = 164,
3842
+
3843
+ /**
3844
+ * Happens when an action is meant to come from the settlement contract,
3845
+ * but is not authenticated, instead coming from the user channels.
3846
+ *
3847
+ * @generated from enum value: UNAUTHENTICATED_L1_ACTION = 165;
3848
+ */
3849
+ UNAUTHENTICATED_L1_ACTION = 165,
3850
+
3851
+ /**
3852
+ * Happens when an encoded action is too large. This is to mitigate dos
3853
+ * attacks due to excessive padding.
3854
+ *
3855
+ * @generated from enum value: ENCODED_ACTION_TOO_LARGE = 166;
3856
+ */
3857
+ ENCODED_ACTION_TOO_LARGE = 166,
3858
+
3859
+ /**
3860
+ * 10101_000
3861
+ *
3862
+ * @generated from enum value: TRIGGER = 168;
3863
+ */
3864
+ TRIGGER = 168,
3865
+
3866
+ /**
3867
+ * Happens when:
3868
+ * * Trigger price is "less or equal" to its corresponding pair trigger price
3869
+ * * Trigger rice is "less" than market's current index price
3870
+ *
3871
+ * Binary pattern: 10101_001
3872
+ *
3873
+ * @generated from enum value: TRIGGER_INVALID_PRICE = 169;
3874
+ */
3875
+ TRIGGER_INVALID_PRICE = 169,
3876
+
3877
+ /**
3878
+ * @generated from enum value: TRIGGER_NOT_FOUND = 170;
3879
+ */
3880
+ TRIGGER_NOT_FOUND = 170,
3881
+
3882
+ /**
3883
+ * 10110_000
3884
+ *
3885
+ * @generated from enum value: TIMESTAMP = 176;
3886
+ */
3887
+ TIMESTAMP = 176,
3888
+
3889
+ /**
3890
+ * 10110_001
3891
+ *
3892
+ * @generated from enum value: TIMESTAMP_OUT_OF_THRESHOLD = 177;
3893
+ */
3894
+ TIMESTAMP_OUT_OF_THRESHOLD = 177,
3895
+
3896
+ /**
3897
+ * @generated from enum value: TIMESTAMP_STALE = 178;
3898
+ */
3899
+ TIMESTAMP_STALE = 178,
3900
+
3901
+ /**
3902
+ * 10111_000
3903
+ * BANKRUPTCY = 184;
3904
+ * 10111_001
3905
+ *
3906
+ * @generated from enum value: BANKRUPTCY_INSUFFICIENT_COVERAGE = 185;
3907
+ */
3908
+ BANKRUPTCY_INSUFFICIENT_COVERAGE = 185,
3909
+
3910
+ /**
3911
+ * 10111_010
3912
+ * Account is not in bankruptcy state.
3913
+ *
3914
+ * @generated from enum value: BANKRUPTCY_NOT_FOUND = 186;
3915
+ */
3916
+ BANKRUPTCY_NOT_FOUND = 186,
3917
+
3918
+ /**
3919
+ * Cannot executed this action in case of bankruptcy.
3920
+ * Source of error is BANKRUPTCY, which leads to NOT_ALLOWED.
3921
+ * Not ideal to read by human, but follows the pattern.
3922
+ * Seek for methods which need BANKRUPTCY and give BANKRUPTCY_NOT_FOUND if not
3923
+ * a case.
3924
+ *
3925
+ * @generated from enum value: BANKRUPTCY_NOT_ALLOWED = 187;
3926
+ */
3927
+ BANKRUPTCY_NOT_ALLOWED = 187,
3928
+
3929
+ /**
3930
+ * 11000_000
3931
+ * Happens when market is not read to handle orders
3932
+ *
3933
+ * @generated from enum value: MARKET_NOT_READY = 192;
3934
+ */
3935
+ MARKET_NOT_READY = 192,
3936
+
3937
+ /**
3938
+ * @generated from enum value: MARKET_FROZEN = 193;
3939
+ */
3940
+ MARKET_FROZEN = 193,
3941
+
3942
+ /**
3943
+ * 11001_000
3944
+ *
3945
+ * @generated from enum value: POSITION = 200;
3946
+ */
3947
+ POSITION = 200,
3948
+
3949
+ /**
3950
+ * Position not found for specific entity in specific market
3951
+ *
3952
+ * @generated from enum value: POSITION_NOT_FOUND = 201;
3953
+ */
3954
+ POSITION_NOT_FOUND = 201,
3955
+
3956
+ /**
3957
+ * @generated from enum value: POSITION_STATE_ORDER = 202;
3958
+ */
3959
+ POSITION_STATE_ORDER = 202,
3960
+
3961
+ /**
3962
+ * @generated from enum value: POSITION_STATE_ORDER_PRICE = 203;
3963
+ */
3964
+ POSITION_STATE_ORDER_PRICE = 203,
3965
+
3966
+ /**
3967
+ * @generated from enum value: POSITION_STATE_ORDER_SIZE = 204;
3968
+ */
3969
+ POSITION_STATE_ORDER_SIZE = 204,
3970
+
3971
+ /**
3972
+ * @generated from enum value: POSITION_STATE_ORDER_SIDE = 205;
3973
+ */
3974
+ POSITION_STATE_ORDER_SIDE = 205,
3975
+
3976
+ /**
3977
+ * 1100_1110
3978
+ *
3979
+ * @generated from enum value: POSITION_SIZE_LIMIT = 206;
3980
+ */
3981
+ POSITION_SIZE_LIMIT = 206,
3982
+
3983
+ /**
3984
+ * @generated from enum value: PRICE = 209;
3985
+ */
3986
+ PRICE = 209,
3987
+
3988
+ /**
3989
+ * @generated from enum value: SIGNATURE_VERIFICATION = 217;
3990
+ */
3991
+ SIGNATURE_VERIFICATION = 217,
3992
+
3993
+ /**
3994
+ * @generated from enum value: SIGNATURE_VERIFICATION_MALFORMED_PUBLIC_KEY = 218;
3995
+ */
3996
+ SIGNATURE_VERIFICATION_MALFORMED_PUBLIC_KEY = 218,
3997
+
3998
+ /**
3999
+ * @generated from enum value: SIGNATURE_VERIFICATION_INVALID_LENGTH = 219;
4000
+ */
4001
+ SIGNATURE_VERIFICATION_INVALID_LENGTH = 219,
4002
+
4003
+ /**
4004
+ * 11011_000
4005
+ *
4006
+ * @generated from enum value: RISK = 224;
4007
+ */
4008
+ RISK = 224,
4009
+
4010
+ /**
4011
+ * @generated from enum value: RISK_DELEGATION_MF_TO_BE_LESS_THAN_OR_EQUAL_MMF = 225;
4012
+ */
4013
+ RISK_DELEGATION_MF_TO_BE_LESS_THAN_OR_EQUAL_MMF = 225,
4014
+
4015
+ /**
4016
+ * @generated from enum value: RISK_OMF_LESS_THAN_OR_EQUAL_IMF = 226;
4017
+ */
4018
+ RISK_OMF_LESS_THAN_OR_EQUAL_IMF = 226,
4019
+
4020
+ /**
4021
+ * @generated from enum value: RISK_OMF_LESS_THAN_OR_EQUAL_CMF = 227;
4022
+ */
4023
+ RISK_OMF_LESS_THAN_OR_EQUAL_CMF = 227,
4024
+
4025
+ /**
4026
+ * @generated from enum value: RISK_TRADE_OMF_LESS_THAN_OR_EQUAL_CMF = 229;
4027
+ */
4028
+ RISK_TRADE_OMF_LESS_THAN_OR_EQUAL_CMF = 229,
4029
+
4030
+ /**
4031
+ * @generated from enum value: RISK_UNHEALTHY_MF_AND_PON_AFTER_BETTER_OF_BEFORE = 228;
4032
+ */
4033
+ RISK_UNHEALTHY_MF_AND_PON_AFTER_BETTER_OF_BEFORE = 228,
4034
+
4035
+ /**
4036
+ * 1111_0000 = 240 -- 4 bit suffix
4037
+ *
4038
+ * @generated from enum value: ORDER_EXECUTION = 240;
4039
+ */
4040
+ ORDER_EXECUTION = 240,
4041
+
4042
+ /**
4043
+ * @generated from enum value: ORDER_EXECUTION_EMPTY = 241;
4044
+ */
4045
+ ORDER_EXECUTION_EMPTY = 241,
4046
+
4047
+ /**
4048
+ * @generated from enum value: ORDER_EXECUTION_FILL_OR_KILL = 242;
4049
+ */
4050
+ ORDER_EXECUTION_FILL_OR_KILL = 242,
4051
+
4052
+ /**
4053
+ * Order requires some of its limits specified according to fill mode
4054
+ *
4055
+ * @generated from enum value: ORDER_EXECUTION_MISSING_LIMITS = 243;
4056
+ */
4057
+ ORDER_EXECUTION_MISSING_LIMITS = 243,
4058
+
4059
+ /**
4060
+ * @generated from enum value: ORDER_EXECUTION_MISSING_PRICE = 244;
4061
+ */
4062
+ ORDER_EXECUTION_MISSING_PRICE = 244,
4063
+
4064
+ /**
4065
+ * @generated from enum value: ORDER_EXECUTION_SIZE_LIMIT = 245;
4066
+ */
4067
+ ORDER_EXECUTION_SIZE_LIMIT = 245,
4068
+
4069
+ /**
4070
+ * 111_0110
4071
+ *
4072
+ * @generated from enum value: ORDER_EXECUTION_LIMIT_PRICE = 246;
4073
+ */
4074
+ ORDER_EXECUTION_LIMIT_PRICE = 246,
4075
+
4076
+ /**
4077
+ * Reduce orders can only be post only.
4078
+ * 01111_0111 = 247
4079
+ *
4080
+ * @generated from enum value: ORDER_REDUCE_IS_POST_ONLY = 247;
4081
+ */
4082
+ ORDER_REDUCE_IS_POST_ONLY = 247,
4083
+
4084
+ /**
4085
+ * Order was rejected, because it planned under proposed price
4086
+ * 01111_1000 = 248
4087
+ *
4088
+ * @generated from enum value: ORDER_EXECUTION_SELL_PRICE = 248;
4089
+ */
4090
+ ORDER_EXECUTION_SELL_PRICE = 248,
4091
+
4092
+ /**
4093
+ * 10000_0000
4094
+ *
4095
+ * @generated from enum value: ATOMICS_TRADES_CANNOT_FOLLOW_PLACES = 256;
4096
+ */
4097
+ ATOMICS_TRADES_CANNOT_FOLLOW_PLACES = 256,
4098
+
4099
+ /**
4100
+ * 10000_0001
4101
+ *
4102
+ * @generated from enum value: ATOMICS_CANCELS_CANNOT_FOLLOW_TRADES_PLACES = 257;
4103
+ */
4104
+ ATOMICS_CANCELS_CANNOT_FOLLOW_TRADES_PLACES = 257,
4105
+
4106
+ /**
4107
+ * 10001_0001
4108
+ *
4109
+ * @generated from enum value: ACTION_POSITION_SHOULD_BE_COVERED = 273;
4110
+ */
4111
+ ACTION_POSITION_SHOULD_BE_COVERED = 273,
4112
+
4113
+ /**
4114
+ * @generated from enum value: ACTION_INVALID_NONCE = 274;
4115
+ */
4116
+ ACTION_INVALID_NONCE = 274,
4117
+
4118
+ /**
4119
+ * @generated from enum value: ACTION_PROPOSED_PRICE_MUST_BE_HIGHER = 275;
4120
+ */
4121
+ ACTION_PROPOSED_PRICE_MUST_BE_HIGHER = 275,
4122
+
4123
+ /**
4124
+ * @generated from enum value: NOT_IMPLEMENTED = 500;
4125
+ */
4126
+ NOT_IMPLEMENTED = 500,
4127
+
4128
+ /**
4129
+ * @generated from enum value: Dropped = 999;
4130
+ */
4131
+ Dropped = 999,
4132
+ }
4133
+
4134
+ /**
4135
+ * Error codes returned by the engine.
4136
+ * Some errors has 5bit prefix about error source and 3 bit suffix specifier.
4137
+ * Error source prefix indicates were too look into to fix error.
4138
+ * For example if order has bad input, it would be order relevant prefix.
4139
+ * But if order cannot apply results to balance, it would be balance relevant
4140
+ * prefix.
4141
+ *
4142
+ * @generated from enum nord.Error
4143
+ */
4144
+ export type ErrorJson = "DUPLICATE" | "DECODE_FAILURE" | "INVALID_SIGNATURE" | "MARKET_NOT_FOUND" | "TOKEN_NOT_FOUND" | "USER_NOT_FOUND" | "SESSION_NOT_FOUND" | "ORDER_NOT_FOUND" | "ORDER_SIZE_ZERO" | "ARITHMETIC_OVERFLOW" | "INVALID_ORDER_OWNER" | "KEY_ALREADY_REGISTERED" | "EXPIRY_TIMESTAMP_IN_PAST" | "UPDATE_TIMESTAMP_IN_PAST" | "TOO_MANY_OPEN_ORDERS" | "WITHDRAW_AMOUNT_TOO_SMALL" | "PYTH_FEED_NOT_ADDED" | "PYTH_FEED_MISSING" | "PYTH_FEED_ALREADY_ADDED" | "PYTH_GUARDIAN_SET_UNINITIALIZED" | "PYTH_GUARDIAN_SET_INVALID" | "PYTH_FEED_DECIMALS_OUT_OF_RANGE" | "PYTH_FEED_PRICE_OUT_OF_RANGE" | "PYTH_FEED_VARIANCE_OUT_OF_RANGE" | "PYTH_GUARDIAN_SET_AND_PYTH_SIGNATURE_DO_NOT_MATCH" | "INVALID_TOKEN_PARAMETERS" | "INDEX_PRICE_OUT_OF_RANGE" | "INDEX_DECIMALS_OUT_OF_RANGE" | "INVALID_STATE_VERSION" | "INVALID_MARGINS" | "MARKET_DECIMALS_EXCEED_LIMITS" | "TOO_MANY_TOKENS" | "FUNDING_OVERFLOW" | "CAN_REDUCE_POSITION_ONLY_IF_ALL_ORDERS_ARE_CANCELED" | "UNEXPECTED_TOKEN_ID" | "TOKEN_NOT_READY" | "TOKEN_ALREADY_REGISTERED" | "IMMEDIATE_ORDER_GOT_NO_FILLS" | "FAILED_TO_FILL_LIMIT" | "POST_ONLY_MUST_NOT_FILL_ANY_OPPOSITE_ORDERS" | "INVALID" | "MAINTENANCE" | "MINIMUM_SIZE_DECIMALS" | "PARAMETERS_WILL_CREATE_NON_OPERATIONAL_MARKET" | "ONLY_IMMEDIATE_ORDERS_ALLOWED" | "TOO_MANY_USER_ACCOUNTS" | "ACCOUNT_NOT_FOUND" | "ACCOUNT_INVALID_OWNER" | "DUST_ACCOUNT" | "BALANCE" | "BALANCE_DEPOSIT_OVERFLOW" | "BALANCE_CHANGE_OVERFLOW" | "BALANCE_CHANGE_LIMIT_EXCEEDED" | "BALANCE_INSUFFICIENT" | "UNAUTHENTICATED_L1_ACTION" | "ENCODED_ACTION_TOO_LARGE" | "TRIGGER" | "TRIGGER_INVALID_PRICE" | "TRIGGER_NOT_FOUND" | "TIMESTAMP" | "TIMESTAMP_OUT_OF_THRESHOLD" | "TIMESTAMP_STALE" | "BANKRUPTCY_INSUFFICIENT_COVERAGE" | "BANKRUPTCY_NOT_FOUND" | "BANKRUPTCY_NOT_ALLOWED" | "MARKET_NOT_READY" | "MARKET_FROZEN" | "POSITION" | "POSITION_NOT_FOUND" | "POSITION_STATE_ORDER" | "POSITION_STATE_ORDER_PRICE" | "POSITION_STATE_ORDER_SIZE" | "POSITION_STATE_ORDER_SIDE" | "POSITION_SIZE_LIMIT" | "PRICE" | "SIGNATURE_VERIFICATION" | "SIGNATURE_VERIFICATION_MALFORMED_PUBLIC_KEY" | "SIGNATURE_VERIFICATION_INVALID_LENGTH" | "RISK" | "RISK_DELEGATION_MF_TO_BE_LESS_THAN_OR_EQUAL_MMF" | "RISK_OMF_LESS_THAN_OR_EQUAL_IMF" | "RISK_OMF_LESS_THAN_OR_EQUAL_CMF" | "RISK_TRADE_OMF_LESS_THAN_OR_EQUAL_CMF" | "RISK_UNHEALTHY_MF_AND_PON_AFTER_BETTER_OF_BEFORE" | "ORDER_EXECUTION" | "ORDER_EXECUTION_EMPTY" | "ORDER_EXECUTION_FILL_OR_KILL" | "ORDER_EXECUTION_MISSING_LIMITS" | "ORDER_EXECUTION_MISSING_PRICE" | "ORDER_EXECUTION_SIZE_LIMIT" | "ORDER_EXECUTION_LIMIT_PRICE" | "ORDER_REDUCE_IS_POST_ONLY" | "ORDER_EXECUTION_SELL_PRICE" | "ATOMICS_TRADES_CANNOT_FOLLOW_PLACES" | "ATOMICS_CANCELS_CANNOT_FOLLOW_TRADES_PLACES" | "ACTION_POSITION_SHOULD_BE_COVERED" | "ACTION_INVALID_NONCE" | "ACTION_PROPOSED_PRICE_MUST_BE_HIGHER" | "NOT_IMPLEMENTED" | "Dropped";
4145
+
4146
+ /**
4147
+ * Describes the enum nord.Error.
4148
+ */
4149
+ export const ErrorSchema: GenEnum<Error, ErrorJson> = /*@__PURE__*/
4150
+ enumDesc(file_nord, 4);
4151
+
4152
+ /**
4153
+ * @generated from enum nord.SpecialAccount
4154
+ */
4155
+ export enum SpecialAccount {
4156
+ /**
4157
+ * @generated from enum value: FeeVault = 0;
4158
+ */
4159
+ FeeVault = 0,
4160
+ }
4161
+
4162
+ /**
4163
+ * @generated from enum nord.SpecialAccount
4164
+ */
4165
+ export type SpecialAccountJson = "FeeVault";
4166
+
4167
+ /**
4168
+ * Describes the enum nord.SpecialAccount.
4169
+ */
4170
+ export const SpecialAccountSchema: GenEnum<SpecialAccount, SpecialAccountJson> = /*@__PURE__*/
4171
+ enumDesc(file_nord, 5);
4172
+