@loafmarkets/shared-types 2.0.27 → 2.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loafmarkets/shared-types",
3
- "version": "2.0.27",
3
+ "version": "2.0.28",
4
4
  "description": "Shared contracts for Loaf Markets frontend, backend, and matching engine.",
5
5
  "type": "module",
6
6
  "private": false,
@@ -24,9 +24,9 @@ syntax = "proto3";
24
24
  // - users.id and properties.id are PostgreSQL integer, hence the bounds 1..=2147483647; order,
25
25
  // trade and conditional-order ids are bigint, hence 1..=9223372036854775807.
26
26
  //
27
- // Enums. Enums added for the write-loop matching engine have <NAME>_UNSPECIFIED = 0 and prefixed
28
- // values; UNSPECIFIED is never a valid business value (rejected in requests, "not applicable" in
29
- // replies). The older enums OrderSide, OrderType and TimeInForce keep a meaningful zero (BUY, MARKET,
27
+ // Enums. Every enum except OrderSide, OrderType and TimeInForce has <NAME>_UNSPECIFIED = 0 and
28
+ // prefixed values; UNSPECIFIED is never a valid business value (rejected in requests, "not
29
+ // applicable" in replies). OrderSide, OrderType and TimeInForce have a meaningful zero (BUY, MARKET,
30
30
  // GTC), so the engine cannot tell an omitted value from that zero: callers must always set them.
31
31
  //
32
32
  // gRPC status contract (every RPC):
@@ -165,7 +165,6 @@ message SubmitOrderRequest {
165
165
  uint64 price = 3;
166
166
 
167
167
  // Quantity, property tokens x 10; stored as orders.quantity. Required: 1..=9223372036854775807.
168
- // Widened from uint32; the varint encoding is the same, so older encoders stay readable.
169
168
  uint64 quantity = 4;
170
169
 
171
170
  // BUY or SELL; any other number is rejected.
@@ -565,8 +564,8 @@ message TradeExecution {
565
564
  // trades.tx_hash: the on-chain transaction of the batch proof that covers this trade, "" until it
566
565
  // is posted. The engine publishes before any proof exists, so it is always "" today.
567
566
  string tx_hash = 52;
568
- // Retired fields that no subscriber read: never reuse their numbers or names. 40 to 51 are not free
569
- // either: unmerged branches use them (Permit 40 and 41, the ZkLoaf L2 fill fields 42 to 51).
567
+ // Reserved: never reuse these numbers or names. 40 to 51 are taken too: unmerged branches use them
568
+ // (Permit 40 and 41, the ZkLoaf L2 fill fields 42 to 51).
570
569
  reserved 5, 16 to 24, 26 to 30, 32 to 39;
571
570
  reserved "property_token_address", "deadline", "buyer_nonce", "seller_nonce", "buyer_signature",
572
571
  "seller_signature", "cpp_signature", "buy_price", "buy_price_multiplier", "buy_quantity",
@@ -594,11 +593,10 @@ message OrderBookSnapshot {
594
593
 
595
594
  // One price level of an OrderBookSnapshot.
596
595
  message PriceLevel {
597
- // Level price, USDL x 1000. Declared double for historical reasons: always an integer, printed as a
598
- // JSON integer.
596
+ // Level price, USDL x 1000. Declared double: always an integer, printed as a JSON integer.
599
597
  double price = 1;
600
- // Sum of the level's unfilled quantities, property tokens x 10. Declared double for historical
601
- // reasons: always an integer, printed as a JSON integer.
598
+ // Sum of the level's unfilled quantities, property tokens x 10. Declared double: always an
599
+ // integer, printed as a JSON integer.
602
600
  double quantity = 2;
603
601
  // The level's resting orders in time priority (the first fills first).
604
602
  repeated OrderData orders = 3;