@smartledger/bsv 9.12.0 → 9.13.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/CHANGELOG.md +28 -0
- package/README.md +19 -19
- package/bsv-gdaf.min.js +30 -30
- package/bsv-smartcontract.min.js +1 -1
- package/bsv.bundle.js +30 -30
- package/bsv.d.ts +14 -1
- package/bsv.min.js +30 -30
- package/docs/AUDIT_SCOPE.md +7 -7
- package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
- package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
- package/docs/audit-rfq/cure53.txt +2 -2
- package/docs/audit-rfq/ncc-group.txt +2 -2
- package/docs/audit-rfq/trail-of-bits.txt +2 -2
- package/docs/getting-started/INSTALLATION.md +23 -23
- package/docs/getting-started/QUICK_START.md +7 -7
- package/docs/migration/FROM_BSV_1_5_6.md +5 -5
- package/lib/notaryhash/index.js +19 -0
- package/lib/spv/merkleproof.js +12 -3
- package/package.json +1 -1
- package/version.js +1 -1
package/bsv.d.ts
CHANGED
|
@@ -987,6 +987,10 @@ declare module '@smartledger/bsv' {
|
|
|
987
987
|
* The easiest target a header may declare and still be believed: difficulty 1,
|
|
988
988
|
* 0x1d00ffff, the proof-of-work limit of mainnet and testnet. Regtest declares
|
|
989
989
|
* 0x207fffff, so regtest headers need `powLimit` set explicitly.
|
|
990
|
+
*
|
|
991
|
+
* This rules out a FREE forgery, not a cheap one: a header at difficulty 1 costs
|
|
992
|
+
* about 4.3e9 double-SHA256 attempts, against about 1e20 for a real mainnet header.
|
|
993
|
+
* Use `minWork`, or check the header against your own chain source.
|
|
990
994
|
*/
|
|
991
995
|
const POW_LIMIT_BITS: number;
|
|
992
996
|
/** A Merkle branch proof. All hashes are DISPLAY-order hex; a node of '*' means "duplicate the working hash". */
|
|
@@ -1723,6 +1727,11 @@ declare module '@smartledger/bsv' {
|
|
|
1723
1727
|
/**
|
|
1724
1728
|
* The block hash the caller's own chain source has at that height. No amount of
|
|
1725
1729
|
* proof of work detects an orphan: a block that lost a race carries real work.
|
|
1730
|
+
*
|
|
1731
|
+
* Supplying this or `minWork` will be REQUIRED in 10.0.0: the proof-of-work limit
|
|
1732
|
+
* rules out a free forgery, not a cheap one — a header at difficulty 1 costs about
|
|
1733
|
+
* 4.3e9 hashes, while a real mainnet header carries about 1e20. Verifying with a
|
|
1734
|
+
* header alone warns since 9.13.0.
|
|
1726
1735
|
*/
|
|
1727
1736
|
blockHashAtHeight?: string;
|
|
1728
1737
|
/**
|
|
@@ -1730,7 +1739,11 @@ declare module '@smartledger/bsv' {
|
|
|
1730
1739
|
* SPV.POW_LIMIT_BITS (difficulty 1); regtest headers need 0x207fffff.
|
|
1731
1740
|
*/
|
|
1732
1741
|
powLimit?: number | string;
|
|
1733
|
-
/**
|
|
1742
|
+
/**
|
|
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.
|
|
1746
|
+
*/
|
|
1734
1747
|
minWork?: number | string;
|
|
1735
1748
|
/** Pass false only for test fixtures. Defaults to true. */
|
|
1736
1749
|
requirePow?: boolean;
|