Skip to content

Migrate to upstream coinlib v5#13

Draft
sneurlax wants to merge 44 commits into
stagingfrom
migrate/upstream-v5
Draft

Migrate to upstream coinlib v5#13
sneurlax wants to merge 44 commits into
stagingfrom
migrate/upstream-v5

Conversation

@sneurlax

@sneurlax sneurlax commented Jul 16, 2026

Copy link
Copy Markdown
Member

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

sandakersmann and others added 30 commits May 9, 2026 06:30
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.
sneurlax added 14 commits July 16, 2026 21:53
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants