Skip to content

refactor: drop protonlabs/bitcoin dependency - #203

Merged
ItsANameToo merged 7 commits into
developfrom
refactor/drop-protonlabs-bitcoin
Oct 23, 2026
Merged

ItsANameToo merged 7 commits into
developfrom
refactor/drop-protonlabs-bitcoin

Conversation

@alfonsobries

@alfonsobries alfonsobries commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

https://app.clickup.com/t/86e3uf66e

drops protonlabs/bitcoin (+ the abandoned phpecc / phpasn1 it pulls in), which spam deprecations on PHP 8.4+ as soon as you sign or verify anything. ECDSA now uses simplito/elliptic-php (was already a dep), base58check / hashing / WIF live in the package

also bumped everything to PHP 8.5: Pest 5, latest php-cs-fixer (and fixed its deprecated rules), CI on 8.5, tests moved to it(), and removed graham-campbell/analyzer, illuminate/support and the parallel plugin since they aren't needed anymore

breaking, so this needs a major

  • requires PHP ^8.5
  • keys are the package's own PrivateKey / PublicKey now, not the BitWasp classes. getHex(), getPublicKey() and toWif() work the same
  • sign() returns the DER Bytes, so ->sign($hash)->getBuffer()->getHex() is now ->sign($hash)->getHex()
  • getBytes() / serialize() return Binary\Bytes (getHex() / getBinary() unchanged)
  • AbstractNetwork doesn't extend the BitWasp network anymore, which means arkscan needs a one-line change in app/Contracts/Network.php when it upgrades

tested

  • compared 600 random cases against 1.9.0 (11,400 checks): signatures, keys, addresses and WIF are byte-identical
  • new fixture with vectors generated by ARK Core's @arkecosystem/crypto, must match exactly
  • 0 deprecations on 8.5, and sign/verify are ~5x/3x faster

also fixes Message::sign() breaking on messages that aren't valid utf-8

@alfonsobries
alfonsobries marked this pull request as ready for review October 21, 2026 18:15
@ItsANameToo
ItsANameToo merged commit 124d243 into develop Oct 23, 2026
3 checks passed
@ItsANameToo
ItsANameToo deleted the refactor/drop-protonlabs-bitcoin branch October 23, 2026 09:40
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.

3 participants