@0xmonaco/core 1.1.5-develop.129b2c6 → 1.1.5-prerelease.de852e2

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.
@@ -434,41 +434,22 @@ function parseRfqSideViewEventData(raw) {
434
434
  if (!isRecord(raw)) {
435
435
  throw new Error("Invalid RFQ view: a side must be an object");
436
436
  }
437
- const grossVwap = readOptionalDecimalString(raw, "grossVwap");
438
- const estimatedMonacoFee = readOptionalDecimalString(raw, "estimatedMonacoFee");
439
- const estimatedBuilderFee = readOptionalDecimalString(raw, "estimatedBuilderFee");
440
- const estimatedTotalFee = readOptionalDecimalString(raw, "estimatedTotalFee");
441
437
  return {
442
438
  vwap: readString(raw, "vwap"),
443
439
  availableQuantity: readString(raw, "availableQuantity"),
444
- ...(grossVwap !== undefined && { grossVwap }),
445
- ...(estimatedMonacoFee !== undefined && { estimatedMonacoFee }),
446
- ...(estimatedBuilderFee !== undefined && { estimatedBuilderFee }),
447
- ...(estimatedTotalFee !== undefined && { estimatedTotalFee }),
448
440
  };
449
441
  }
450
- /** An optional wire integer that may be negative; absent or `null` is `undefined`. */
451
- function readOptionalInteger(source, field) {
452
- const value = source[field];
453
- if (value === undefined || value === null)
454
- return undefined;
455
- return readInteger(source, field);
456
- }
457
442
  /** Parse the taker's view. A side no maker quotes is absent. */
458
443
  function parseRfqViewEventData(raw) {
459
444
  if (!isRecord(raw)) {
460
445
  throw new Error("Invalid RFQ view: view must be an object");
461
446
  }
462
- const monacoFeeCbps = readOptionalInteger(raw, "monacoFeeCbps");
463
- const builderFeeCbps = readOptionalInteger(raw, "builderFeeCbps");
464
447
  return {
465
448
  viewVersion: readSequence(raw, "viewVersion"),
466
449
  ...(raw.bid != null && { bid: parseRfqSideViewEventData(raw.bid) }),
467
450
  ...(raw.ask != null && { ask: parseRfqSideViewEventData(raw.ask) }),
468
451
  asOfMs: readSequence(raw, "asOfMs"),
469
452
  sequence: readSequence(raw, "sequence"),
470
- ...(monacoFeeCbps !== undefined && { monacoFeeCbps }),
471
- ...(builderFeeCbps !== undefined && { builderFeeCbps }),
472
453
  };
473
454
  }
474
455
  /** Parse a selected maker's own part of an acceptance. */
@@ -476,8 +457,6 @@ function parseRfqSelectionEventData(raw) {
476
457
  if (!isRecord(raw)) {
477
458
  throw new Error("Invalid RFQ selection: selection must be an object");
478
459
  }
479
- const maxBuilderFeeCbps = readOptionalInteger(raw, "maxBuilderFeeCbps");
480
- const estimatedNet = readOptionalDecimalString(raw, "estimatedNet");
481
460
  return {
482
461
  acceptanceId: readString(raw, "acceptanceId"),
483
462
  takerSide: readString(raw, "takerSide"),
@@ -489,23 +468,17 @@ function parseRfqSelectionEventData(raw) {
489
468
  capacity: readString(raw, "capacity"),
490
469
  makerFeeCbps: readInteger(raw, "makerFeeCbps"),
491
470
  lastLookDeadlineAtMs: readSequence(raw, "lastLookDeadlineAtMs"),
492
- ...(maxBuilderFeeCbps !== undefined && { maxBuilderFeeCbps }),
493
- ...(estimatedNet !== undefined && { estimatedNet }),
494
471
  };
495
472
  }
496
473
  function parseRfqFillEventData(raw) {
497
474
  if (!isRecord(raw)) {
498
475
  throw new Error("Invalid RFQ outcome: a fill must be an object");
499
476
  }
500
- const monacoFee = readOptionalDecimalString(raw, "monacoFee");
501
- const builderFee = readOptionalDecimalString(raw, "builderFee");
502
477
  return {
503
478
  executionId: readString(raw, "executionId"),
504
479
  price: readString(raw, "price"),
505
480
  quantity: readString(raw, "quantity"),
506
481
  fee: readString(raw, "fee"),
507
- ...(monacoFee !== undefined && { monacoFee }),
508
- ...(builderFee !== undefined && { builderFee }),
509
482
  };
510
483
  }
511
484
  /** Parse the taker's outcome. Nothing filled leaves `vwap` absent and `fills` empty. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xmonaco/core",
3
- "version": "1.1.5-develop.129b2c6",
3
+ "version": "1.1.5-prerelease.de852e2",
4
4
  "type": "module",
5
5
  "homepage": "https://docs.0xmonaco.com/sdk/typescript",
6
6
  "main": "./dist/index.js",
@@ -19,8 +19,8 @@
19
19
  "viem": "^2.45.2"
20
20
  },
21
21
  "dependencies": {
22
- "@0xmonaco/contracts": "1.1.5-develop.129b2c6",
23
- "@0xmonaco/types": "1.1.5-develop.129b2c6",
22
+ "@0xmonaco/contracts": "1.1.5-prerelease.de852e2",
23
+ "@0xmonaco/types": "1.1.5-prerelease.de852e2",
24
24
  "@noble/curves": "^2.4.0",
25
25
  "@noble/hashes": "^2.4.0",
26
26
  "http-status-codes": "^2.3.0"