@pear-protocol/utils 1.6.0 → 1.6.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
@@ -1437,8 +1437,8 @@ function requestedBaseQuantity(leg, referencePrice) {
1437
1437
  }
1438
1438
  }
1439
1439
  __name(requestedBaseQuantity, "requestedBaseQuantity");
1440
- function isRefusedBelowMinimum(quantity, price, precision, heldByAnotherPosition) {
1441
- if (!heldByAnotherPosition) {
1440
+ function isRefusedBelowMinimum(quantity, price, precision, isPartialVenueReduce) {
1441
+ if (!isPartialVenueReduce) {
1442
1442
  return false;
1443
1443
  }
1444
1444
  const minQuantity = precision.quantity.min;
@@ -35,8 +35,9 @@ export declare function requestedBaseQuantity(leg: {
35
35
  amount: string;
36
36
  }, referencePrice: string): string;
37
37
  /**
38
- * Whether a close leg is refused for its size. A close places the position's whole exposure, so it closes
39
- * the venue position, valid at any size, unless another position holds the asset: then the venue reads it
40
- * as a partial reduce, held to its minimum order quantity and minimum order value at the order price (#1184).
38
+ * Whether a close leg is refused for its size. A close that flattens the venue position is valid at any
39
+ * size. When the venue reads it as a partial reduce instead, because another position holds the asset or
40
+ * the close leaves part of the position open, it is held to the venue's minimum order quantity and minimum
41
+ * order value at the order price (#1184).
41
42
  */
42
- export declare function isRefusedBelowMinimum(quantity: string, price: string, precision: InstrumentPrecision, heldByAnotherPosition: boolean): boolean;
43
+ export declare function isRefusedBelowMinimum(quantity: string, price: string, precision: InstrumentPrecision, isPartialVenueReduce: boolean): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/utils",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Pear Protocol Utility functions",
5
5
  "private": false,
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@noble/hashes": "^1.3.2",
30
- "@pear-protocol/types": "^2.24.0",
30
+ "@pear-protocol/types": "^2.25.0",
31
31
  "@scure/base": "^2.3.0",
32
32
  "bignumber.js": "9.3.1"
33
33
  },