@smartledger/bsv 9.13.0 → 9.15.0

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/bsv.d.ts CHANGED
@@ -540,6 +540,13 @@ declare module '@smartledger/bsv' {
540
540
  */
541
541
  isAfterGenesis(): boolean;
542
542
  isAfterChronicle(): boolean;
543
+ /**
544
+ * False where Chronicle applies and the spending transaction's version is
545
+ * above 1, which is how a transaction opts into malleability. LOW_S,
546
+ * MINIMALDATA, MINIMALIF, NULLFAIL, NULLDUMMY, SIGPUSHONLY and CLEANSTACK
547
+ * are not applied to such a transaction.
548
+ */
549
+ enforceNonMalleability(): boolean;
543
550
  /** 520 before Genesis, UNLIMITED after. */
544
551
  maxScriptElementSize(): number;
545
552
  /** 10,000 before Genesis, UNLIMITED after. */
@@ -1009,8 +1016,18 @@ declare module '@smartledger/bsv' {
1009
1016
  * declares its own target, so without this a forged header costs nothing to make.
1010
1017
  */
1011
1018
  powLimit?: number | string | object;
1012
- /** Minimum work the header must represent: 2^256 / (target + 1). Difficulty 1 is about 4.295e9. */
1019
+ /**
1020
+ * Minimum work the header must represent, in HASHES: 2^256 / (target + 1).
1021
+ * Difficulty 1 is about 4.295e9. Use `minDifficulty` to say it in difficulty.
1022
+ */
1013
1023
  minWork?: number | string | object;
1024
+ /**
1025
+ * The same floor in DIFFICULTY, which is the unit difficulty is quoted in: a real
1026
+ * BSV header is about 2.6e10, i.e. about 1.1e20 hashes. Exactly one of the two —
1027
+ * passing both throws, because they are 4.3e9 apart and silence would hide which
1028
+ * one applied.
1029
+ */
1030
+ minDifficulty?: number | string;
1014
1031
  }
1015
1032
  interface InclusionResult {
1016
1033
  valid: boolean;
@@ -1740,11 +1757,16 @@ declare module '@smartledger/bsv' {
1740
1757
  */
1741
1758
  powLimit?: number | string;
1742
1759
  /**
1743
- * Minimum work the header must represent. Difficulty 1 is about 4.295e9, and a
1744
- * real mainnet header carries about 1e20. Either this or `blockHashAtHeight` will
1745
- * be required in 10.0.0.
1760
+ * Minimum work the header must represent, in HASHES. Difficulty 1 is about
1761
+ * 4.295e9, and a real mainnet header carries about 1e20. Either this,
1762
+ * `minDifficulty` or `blockHashAtHeight` will be required in 10.0.0.
1746
1763
  */
1747
1764
  minWork?: number | string;
1765
+ /**
1766
+ * The same floor in DIFFICULTY (a real BSV header is about 2.6e10). Exactly one
1767
+ * of this and `minWork`; passing both throws.
1768
+ */
1769
+ minDifficulty?: number | string;
1748
1770
  /** Pass false only for test fixtures. Defaults to true. */
1749
1771
  requirePow?: boolean;
1750
1772
  }