Migrate to upstream coinlib v5#13
Draft
sneurlax wants to merge 44 commits into
Draft
Conversation
Update copyright year to 2026
Update copyright year to 2026
Requires actual testing on Windows
- fix: wasm target - fix: allow to increase maxCandidate number without overflowing
Adapt the branch and bound selection to the Locktime abstraction introduced for v5. The locktime parameter of CoinSelection.branchAndBound and the test call sites still used a raw int.
Add an optional vExtraData field to Transaction, serialized as a var-length slice after the locktime. This supports special transactions carrying an extra payload, such as Firo masternode (DIP2-style) transactions. The field is carried through input/output modification copies and legacy sighash computation. Ported from cypherstack/coinlib commit 22778c0.
Adds toString() implementations across transaction, input, output, outpoint, script, and program classes for easier debugging, plus minor formatting cleanup. Ported from cypherstack/coinlib commit da1b365 with MWEB-specific content removed (kept for a separate MWEB feature branch) and adapted to the InputSequence and Locktime abstractions.
Support reading and writing transactions carrying MWEB extension data as used by Litecoin. The 0x08 flag bit alongside the witness marker signals MWEB data, which is carried as opaque bytes between the witness data and the locktime. mwebBytes is preserved through input/output modification copies and legacy sighash computation. Ported from cypherstack/coinlib commit 7723ba3, reworked to keep the existing expectWitness two-pass parsing API and adapted to the Locktime abstraction.
# Conflicts: # coinlib/lib/src/tx/sighash/legacy_signature_hasher.dart # coinlib/lib/src/tx/transaction.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This needs more testing, I only tested it on Windows. This migrates to us to coinlib v5
Not accompanied by any corresponding Stack Wallet changes, TODo