@neuraiproject/neurai-sign-esp32 0.7.0 → 0.7.2

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/README.md CHANGED
@@ -40,6 +40,16 @@ outputs are still signed from the raw unsigned transaction, while optional
40
40
  display metadata can be provided to the device so the firmware can show the
41
41
  asset name, transferred amount, destination address, and fee more clearly.
42
42
 
43
+ ## Reset testnet
44
+
45
+ Before supplying UTXOs or PSBT inputs to this signing library, the host
46
+ application must verify `getblockhash(0)` against
47
+ `0000008b384aeffecdab182575dc4e86c9f07f90318c65088532660ed9a8a021`.
48
+ The device does not query the chain. Discard UTXOs and PSBTs assembled from
49
+ the previous testnet. All three AuthScript address families activate on the
50
+ reset testnet at block 10; outputs included earlier have no AuthScript spend
51
+ protection.
52
+
43
53
  ## Install
44
54
 
45
55
  ```
@@ -354,9 +364,9 @@ await identity.session.ensure({ minRemainingSeconds: 60 });
354
364
  > `depin_sign_auth` and session permissions are **not implemented in current
355
365
  > firmware yet** — the contract they must satisfy is specified, and exercised
356
366
  > by a cryptographically faithful device mock, in this package's tests.
357
- > `@neuraiproject/neurai-depin-msg@3.1.2` must be published before installing
358
- > this repository from scratch or publishing `neurai-sign-esp32@0.7.0`. The
359
- > package has no runtime dependency on `neurai-depin-msg`; it is a `^3.1.2`
367
+ > `@neuraiproject/neurai-depin-msg@3.1.3` is published and required for
368
+ > installing this repository from scratch or publishing `neurai-sign-esp32@0.7.1`.
369
+ > The package has no runtime dependency on `neurai-depin-msg`; it is a `^3.1.3`
360
370
  > development dependency used only by the integration tests. The package gate
361
371
  > validates the adapter from a clean `neurai-sign-esp32` tarball.
362
372
 
@@ -667,7 +677,9 @@ oldest release the declarations support).
667
677
 
668
678
  Each UTXO requires the `rawTxHex` field — the full raw hex of the previous
669
679
  transaction. This is needed because P2PKH inputs use `nonWitnessUtxo` in the
670
- PSBT spec. You can get it from your Neurai node:
680
+ PSBT spec. Any Neurai transaction version is accepted, version 3 (NIP-014
681
+ reference inputs) included, and it must hash to the txid the input spends. You
682
+ can get it from your Neurai node:
671
683
 
672
684
  ```javascript
673
685
  const rawTxHex = await rpc("getrawtransaction", [txid]);
@@ -731,8 +743,8 @@ Three of them are spelled like key-5 networks that mean something else:
731
743
  `type: "pq"` for every Bech32m address (as before) and adds `family`
732
744
  (`"authscript"` | `"pq"` | `"ecdsa"`), `witnessVersion` and `network`.
733
745
  - `encodeDestinationScript()` emits `OP_1`/`OP_2`/`OP_3 0x20 <C>`.
734
- - **Activation:** the strict families (v2/v3) are active only on regtest for
735
- now. Before activation the node refuses `pq1…`/`nq1…` addresses because an
746
+ - **Activation:** all three AuthScript families activate on the reset testnet
747
+ at block 10 and on regtest at block 1. Before activation the node refuses `pq1…`/`nq1…` addresses because an
736
748
  `OP_2`/`OP_3` output is anyone-can-spend there. The library cannot know the
737
749
  activation state of the target chain: do not pay to v2/v3 addresses where
738
750
  they are not active.
@@ -931,6 +943,27 @@ ArduinoJson parser was checked on the host up to MAX_MONEY; this does not replac
931
943
  an on-device signing and display check of the firmware installed on your ESP32.
932
944
  No global bigint JSON serializer is required.
933
945
 
946
+ ## Upgrading to 0.7.2
947
+
948
+ Previous transactions may be Neurai version-3 transactions (privacy pools and
949
+ state threads create them; NIP-014 serializes their reference inputs, even an
950
+ empty list). bitcoinjs-lib cannot read them and failed with "Transaction has
951
+ unexpected data" while building or finalizing a PSBT that spends one of their
952
+ outputs. The PSBT helpers now read every `nonWitnessUtxo` with the codec of
953
+ `@neuraiproject/neurai-create-transaction` (new dependency), check that it
954
+ hashes to the txid the input spends, and finalize inputs without
955
+ `Psbt.finalizeInput`, which would parse it again. A version-3 transaction *to
956
+ sign* is refused with an explicit error: a PSBT has no field for its reference
957
+ inputs. The device firmware (uNeurai) must also parse version-3 previous
958
+ transactions before it can sign such inputs.
959
+
960
+ ## Upgrading to 0.7.1
961
+
962
+ 0.7.1 requires the published `neurai-depin-msg@3.1.3` for development and
963
+ integration tests. The runtime API is unchanged. The reset testnet guide now
964
+ records the new genesis, and Web Serial tests run on Node 20. Hardware and
965
+ firmware validation is still required before using the adapter on a device.
966
+
934
967
  ## Upgrading to 0.7.0
935
968
 
936
969
  0.7.0 follows the address types of the Neurai node (Neurai-DePIN) and