@smartledger/bsv 4.5.0 → 4.6.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 CHANGED
@@ -5,6 +5,33 @@ All notable changes to SmartLedger-BSV will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [4.6.0] - 2026-06-09
9
+
10
+ ### Fixed — covenants are now mainnet-relayable (MINIMALDATA)
11
+
12
+ OP_PUSH_TX covenants up to 4.5.0 were consensus-valid but **non-standard**: their
13
+ locking scripts contained non-minimal data pushes, so every mainnet miner
14
+ rejected the spend with `non-mandatory-script-verify-flag (Data push larger than
15
+ necessary)` = `SCRIPT_ERR_MINIMALDATA`. Found by actually broadcasting to BSV
16
+ mainnet (WhatsOnChain/Taal **and** GorillaPool ARC both rejected it).
17
+
18
+ The non-minimal pushes were: a bare `0x00` sign byte, a bare `0x02` pubkey
19
+ prefix, and small integers (3/4/8) pushed as data. Fixes:
20
+
21
+ - **`PushTx.pushTxCore`**: drop the `0x00` sign-extension — the grind now requires
22
+ `z[0]` (first byte of HASH256(preimage)) to be `0x01..0x7f`, so the hash is
23
+ already a positive, minimally-encoded number. Use `OP_2` for the pubkey prefix.
24
+ - **`CovenantHelpers.scriptNum`**: emit `OP_0`/`OP_1..OP_16`/`OP_1NEGATE` for
25
+ `0..16`/`-1` instead of a data push (fixes PELS, token, and the DSL's
26
+ `lockUntil`).
27
+ - **`CovenantHelpers.flags`**: now includes `SCRIPT_VERIFY_MINIMALDATA`, so local
28
+ `verifyScript`/`trace` mirror real mainnet relay policy and catch non-relayable
29
+ covenants before broadcast.
30
+
31
+ A value covenant built with this release was **deployed and spent on BSV
32
+ mainnet** (txids `f9f25dbd…` deploy, `ea438096…` spend). Full suite 4206 passing,
33
+ lint clean.
34
+
8
35
  ## [4.5.0] - 2026-06-09
9
36
 
10
37
  ### Added — declarative covenant DSL + stack debugger