@cowprotocol/sdk-order-book 3.2.0 → 3.2.1

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/dist/index.js CHANGED
@@ -24,6 +24,7 @@ __export(src_exports, {
24
24
  CompetitionOrderStatus: () => CompetitionOrderStatus,
25
25
  DEFAULT_BACKOFF_OPTIONS: () => DEFAULT_BACKOFF_OPTIONS,
26
26
  DEFAULT_LIMITER_OPTIONS: () => DEFAULT_LIMITER_OPTIONS,
27
+ DebugFeePolicy: () => DebugFeePolicy,
27
28
  EcdsaSigningScheme: () => EcdsaSigningScheme,
28
29
  ORDER_BOOK_PARTNER_PROD_CONFIG: () => ORDER_BOOK_PARTNER_PROD_CONFIG,
29
30
  ORDER_BOOK_PARTNER_STAGING_CONFIG: () => ORDER_BOOK_PARTNER_STAGING_CONFIG,
@@ -43,6 +44,7 @@ __export(src_exports, {
43
44
  PriceQuality: () => PriceQuality,
44
45
  SellTokenSource: () => SellTokenSource,
45
46
  SigningScheme: () => SigningScheme,
47
+ SimulationType: () => SimulationType,
46
48
  getProtocolFeeAmount: () => getProtocolFeeAmount,
47
49
  getQuoteAmountsAfterPartnerFee: () => getQuoteAmountsAfterPartnerFee,
48
50
  getQuoteAmountsAfterSlippage: () => getQuoteAmountsAfterSlippage,
@@ -529,6 +531,17 @@ var CompetitionOrderStatus;
529
531
  })(type = CompetitionOrderStatus2.type || (CompetitionOrderStatus2.type = {}));
530
532
  })(CompetitionOrderStatus || (CompetitionOrderStatus = {}));
531
533
 
534
+ // src/generated/models/DebugFeePolicy.ts
535
+ var DebugFeePolicy;
536
+ ((DebugFeePolicy2) => {
537
+ let kind;
538
+ ((kind2) => {
539
+ kind2["SURPLUS"] = "surplus";
540
+ kind2["VOLUME"] = "volume";
541
+ kind2["PRICE_IMPROVEMENT"] = "priceImprovement";
542
+ })(kind = DebugFeePolicy2.kind || (DebugFeePolicy2.kind = {}));
543
+ })(DebugFeePolicy || (DebugFeePolicy = {}));
544
+
532
545
  // src/generated/models/EcdsaSigningScheme.ts
533
546
  var EcdsaSigningScheme = /* @__PURE__ */ ((EcdsaSigningScheme2) => {
534
547
  EcdsaSigningScheme2["EIP712"] = "eip712";
@@ -608,7 +621,9 @@ var OrderPostError;
608
621
  errorType2["UNSUPPORTED_TOKEN"] = "UnsupportedToken";
609
622
  errorType2["INVALID_APP_DATA"] = "InvalidAppData";
610
623
  errorType2["APP_DATA_HASH_MISMATCH"] = "AppDataHashMismatch";
624
+ errorType2["APP_DATA_MISMATCH"] = "AppDataMismatch";
611
625
  errorType2["APPDATA_FROM_MISMATCH"] = "AppdataFromMismatch";
626
+ errorType2["METADATA_SERIALIZATION_FAILED"] = "MetadataSerializationFailed";
612
627
  errorType2["OLD_ORDER_ACTIVELY_BID_ON"] = "OldOrderActivelyBidOn";
613
628
  })(errorType = OrderPostError2.errorType || (OrderPostError2.errorType = {}));
614
629
  })(OrderPostError || (OrderPostError = {}));
@@ -642,7 +657,7 @@ var PriceEstimationError;
642
657
  ((errorType2) => {
643
658
  errorType2["QUOTE_NOT_VERIFIED"] = "QuoteNotVerified";
644
659
  errorType2["UNSUPPORTED_TOKEN"] = "UnsupportedToken";
645
- errorType2["ZERO_AMOUNT"] = "ZeroAmount";
660
+ errorType2["NO_LIQUIDITY"] = "NoLiquidity";
646
661
  errorType2["UNSUPPORTED_ORDER_TYPE"] = "UnsupportedOrderType";
647
662
  })(errorType = PriceEstimationError2.errorType || (PriceEstimationError2.errorType = {}));
648
663
  })(PriceEstimationError || (PriceEstimationError = {}));
@@ -672,6 +687,13 @@ var SigningScheme = /* @__PURE__ */ ((SigningScheme2) => {
672
687
  return SigningScheme2;
673
688
  })(SigningScheme || {});
674
689
 
690
+ // src/generated/models/SimulationType.ts
691
+ var SimulationType = /* @__PURE__ */ ((SimulationType2) => {
692
+ SimulationType2["FULL"] = "full";
693
+ SimulationType2["QUICK"] = "quick";
694
+ return SimulationType2;
695
+ })(SimulationType || {});
696
+
675
697
  // src/quoteAmountsAndCosts/quoteAmountsAndCosts.const.ts
676
698
  var HUNDRED_THOUSANDS = 1e5;
677
699
  var ONE_HUNDRED_BPS = BigInt(100 * 100);
@@ -830,6 +852,7 @@ function getQuoteAmountsAndCosts(params) {
830
852
  CompetitionOrderStatus,
831
853
  DEFAULT_BACKOFF_OPTIONS,
832
854
  DEFAULT_LIMITER_OPTIONS,
855
+ DebugFeePolicy,
833
856
  EcdsaSigningScheme,
834
857
  ORDER_BOOK_PARTNER_PROD_CONFIG,
835
858
  ORDER_BOOK_PARTNER_STAGING_CONFIG,
@@ -849,6 +872,7 @@ function getQuoteAmountsAndCosts(params) {
849
872
  PriceQuality,
850
873
  SellTokenSource,
851
874
  SigningScheme,
875
+ SimulationType,
852
876
  getProtocolFeeAmount,
853
877
  getQuoteAmountsAfterPartnerFee,
854
878
  getQuoteAmountsAfterSlippage,
package/dist/index.mjs CHANGED
@@ -480,6 +480,17 @@ var CompetitionOrderStatus;
480
480
  })(type = CompetitionOrderStatus2.type || (CompetitionOrderStatus2.type = {}));
481
481
  })(CompetitionOrderStatus || (CompetitionOrderStatus = {}));
482
482
 
483
+ // src/generated/models/DebugFeePolicy.ts
484
+ var DebugFeePolicy;
485
+ ((DebugFeePolicy2) => {
486
+ let kind;
487
+ ((kind2) => {
488
+ kind2["SURPLUS"] = "surplus";
489
+ kind2["VOLUME"] = "volume";
490
+ kind2["PRICE_IMPROVEMENT"] = "priceImprovement";
491
+ })(kind = DebugFeePolicy2.kind || (DebugFeePolicy2.kind = {}));
492
+ })(DebugFeePolicy || (DebugFeePolicy = {}));
493
+
483
494
  // src/generated/models/EcdsaSigningScheme.ts
484
495
  var EcdsaSigningScheme = /* @__PURE__ */ ((EcdsaSigningScheme2) => {
485
496
  EcdsaSigningScheme2["EIP712"] = "eip712";
@@ -559,7 +570,9 @@ var OrderPostError;
559
570
  errorType2["UNSUPPORTED_TOKEN"] = "UnsupportedToken";
560
571
  errorType2["INVALID_APP_DATA"] = "InvalidAppData";
561
572
  errorType2["APP_DATA_HASH_MISMATCH"] = "AppDataHashMismatch";
573
+ errorType2["APP_DATA_MISMATCH"] = "AppDataMismatch";
562
574
  errorType2["APPDATA_FROM_MISMATCH"] = "AppdataFromMismatch";
575
+ errorType2["METADATA_SERIALIZATION_FAILED"] = "MetadataSerializationFailed";
563
576
  errorType2["OLD_ORDER_ACTIVELY_BID_ON"] = "OldOrderActivelyBidOn";
564
577
  })(errorType = OrderPostError2.errorType || (OrderPostError2.errorType = {}));
565
578
  })(OrderPostError || (OrderPostError = {}));
@@ -593,7 +606,7 @@ var PriceEstimationError;
593
606
  ((errorType2) => {
594
607
  errorType2["QUOTE_NOT_VERIFIED"] = "QuoteNotVerified";
595
608
  errorType2["UNSUPPORTED_TOKEN"] = "UnsupportedToken";
596
- errorType2["ZERO_AMOUNT"] = "ZeroAmount";
609
+ errorType2["NO_LIQUIDITY"] = "NoLiquidity";
597
610
  errorType2["UNSUPPORTED_ORDER_TYPE"] = "UnsupportedOrderType";
598
611
  })(errorType = PriceEstimationError2.errorType || (PriceEstimationError2.errorType = {}));
599
612
  })(PriceEstimationError || (PriceEstimationError = {}));
@@ -623,6 +636,13 @@ var SigningScheme = /* @__PURE__ */ ((SigningScheme2) => {
623
636
  return SigningScheme2;
624
637
  })(SigningScheme || {});
625
638
 
639
+ // src/generated/models/SimulationType.ts
640
+ var SimulationType = /* @__PURE__ */ ((SimulationType2) => {
641
+ SimulationType2["FULL"] = "full";
642
+ SimulationType2["QUICK"] = "quick";
643
+ return SimulationType2;
644
+ })(SimulationType || {});
645
+
626
646
  // src/quoteAmountsAndCosts/quoteAmountsAndCosts.const.ts
627
647
  var HUNDRED_THOUSANDS = 1e5;
628
648
  var ONE_HUNDRED_BPS = BigInt(100 * 100);
@@ -780,6 +800,7 @@ export {
780
800
  CompetitionOrderStatus,
781
801
  DEFAULT_BACKOFF_OPTIONS,
782
802
  DEFAULT_LIMITER_OPTIONS,
803
+ DebugFeePolicy,
783
804
  EcdsaSigningScheme,
784
805
  ORDER_BOOK_PARTNER_PROD_CONFIG,
785
806
  ORDER_BOOK_PARTNER_STAGING_CONFIG,
@@ -799,6 +820,7 @@ export {
799
820
  PriceQuality,
800
821
  SellTokenSource,
801
822
  SigningScheme,
823
+ SimulationType,
802
824
  getProtocolFeeAmount,
803
825
  getQuoteAmountsAfterPartnerFee,
804
826
  getQuoteAmountsAfterSlippage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cowprotocol/sdk-order-book",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "CowProtocol Order Book package",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,8 +36,8 @@
36
36
  "cross-fetch": "^3.2.0",
37
37
  "exponential-backoff": "^3.1.2",
38
38
  "limiter": "^3.0.0",
39
- "@cowprotocol/sdk-config": "2.2.0",
40
- "@cowprotocol/sdk-common": "0.11.0"
39
+ "@cowprotocol/sdk-config": "2.2.1",
40
+ "@cowprotocol/sdk-common": "0.11.1"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "tsup src/index.ts --format esm,cjs --dts",
@@ -46,7 +46,7 @@
46
46
  "test": "jest",
47
47
  "test:coverage": "jest --coverage --json --outputFile=jest.results.json && npx coveralls < ./coverage/lcov.info",
48
48
  "test:coverage:html": "jest --silent=false --coverage --coverageReporters html",
49
- "swagger:codegen": "openapi --input https://raw.githubusercontent.com/cowprotocol/services/dfb50cb4a103e8f949f5a7145beb6be63ef41c85/crates/orderbook/openapi.yml --output src/generated --exportServices false --exportCore false",
49
+ "swagger:codegen": "openapi --input https://raw.githubusercontent.com/cowprotocol/services/5341875c9498b2026d1b6f67c840b086e4696dcd/crates/orderbook/openapi.yml --output src/generated --exportServices false --exportCore false",
50
50
  "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
51
51
  "typecheck": "tsc --noEmit"
52
52
  }