crypto_wallet_util 2.0.3
crypto_wallet_util: ^2.0.3 copied to clipboard
A collection of utility functions for cryptocurrencies.
Changelog #
2.0.3 - 2026-07-17 #
Fixed #
- BTC address generation and validation now consistently honor the selected network, including legacy, SegWit v0, BIP86 Taproot, custom HRPs, and fail-closed handling for explicitly configured networks without a valid HRP.
- Taproot key tweaking now follows BIP341
lift_xsemantics and is pinned to the official BIP86 address and scriptPubKey vector. - Bech32, Bech32m, and CashAddr decoding now verifies checksum, network prefix, witness version and length, and canonical bit padding.
- BCH testnet uses
bchtestplus testnet version bytes, and BCH validation requires a full network-matching CashAddr to avoid BTC/BCH legacy ambiguity. - PSBT change detection infers the CashAddr network prefix from the input
address instead of hard-coding
bitcoincash, so BCH testnet CashAddr change outputs no longer abort transaction construction. PSBT.fromTransferPsbtselects the mainnet or testnet chain config from the extended key's BIP32 version bytes, so a standard testnettpub(0x043587cf) parses and builds instead of being rejected by the mainnet config and crashing on a null wallet. BTC/BCH testnet BIP32 public version bytes were corrected to0x043587cf.- BTC PSBT construction remains backward-compatible with the non-standard
testnet extended public-key version (
0x04358a68,tpw...) emitted by 2.0.2, while malformed keys and genuinely unknown versions now fail closed. - Taproot wallets keep the caller's
WalletSettingby reference and derive the BIP86 path at sign time, so switching the setting's network stays consistent across existing and freshly derived wallets.
2.0.2 - 2026-07-02 #
Fixed #
- PSBT: parse LTC P2SH / Nested SegWit addresses correctly by plumbing chain-aware version bytes and bech32 HRP through address encoding instead of hard-coding BTC mainnet values.
- GSPL: support LTC P2SH payment address parsing by detecting the script type (P2PKH vs P2SH) and resolving the correct network version bytes from the bip44 path coin-type segment.
- BTC / LTC chain configs: fill in distinct testnet NetworkType values (previously shared mainnet settings).
2.0.1 - 2026-06-12 #
Added #
- SC (Sia): native Go FFI transaction bridge (
ScGoFfiBridge) as a faster, opt-in alternative to the WASM bridge. The defaultcreate()is unchanged and still uses the WASM bridge (ScWasmRunBridge), so existing callers are unaffected. The native library is not bundled: the caller builds it for their platform (seelib/src/forked_lib/sia-wasi/build.sh), loads it, and passes it viaScTransactionBuilder.createWithFfi(DynamicLibrary).
Changed #
- Minimum Dart SDK raised to
>=3.11.0(required by thewasdWASM interpreter that backs the default SC bridge). Consumers on Dart 3.7–3.10 must upgrade.
Removed #
- Pruned dead code from the vendored
bitcoin_base_hdfork that is never reached by this package (BTC/LTC/BCH only useECPrivate):- the entire
provider/subtree (Electrum/HTTP API providers and theBitcoinTransactionBuilder/ BCH builder) andutils/btc_utils.dart(~2.2k lines). ECPublic.verifyTransactionSignatureandECPublic.verifySchnorrTransactionSignature(unused; their post-upgrade bodies had latent argument-shape issues).
- the entire
2.0.0 - 2026-06-09 #
BREAKING #
- Upgrade
blockchain_utilsfrom^1.4.1to^6.0.0. Resolves the dependency conflict reported in #20 (consumers usingbitcoin_base 7.x/xrpl_dart 7.x, which requireblockchain_utils ^6.0.0). - Minimum Dart SDK raised to
>=3.7.0(required byblockchain_utils 6.0.0).
Changed #
- Migrated the vendored
bitcoin_base_hdandxrpl_dartforks to theblockchain_utils6.x API: relocated utility imports to the package barrel,Tuple/item1,item2→ Dart records ($1,$2),mask*/writeUintXLE→BinaryOps.*,bytesEqual/iterableIsEqual→BytesUtils/CompareUtils,Secp256k1*KeyEcdsa→Secp256k1*Key,BitcoinSigner/BitcoinVerifier→BitcoinKeySigner/BitcoinSignatureVerifier,BigintUtils.orderLen→BigintUtils.bitlengthInBytes. - ECDSA / Taproot / message signing outputs verified byte-for-byte identical to the pre-upgrade implementation; XRP secp256k1 family-seed derivation and classic/X-address conversion pinned with characterization tests.
Bech32Validations/SegwitValidationsdeclared asmixin(Dart 3 language level no longer permits using a plain class as a mixin).
Notes #
- No public API changes beyond the SDK floor; all 782 unit tests pass.
1.0.0 - 2024-06-19 #
Added #
- Initial release version featuring fundamental functionalities:
- support wallets: ALPH, APTOS, CKB, COSMOS, DOT, HNS, KAS, KLS, NEAR, SC, SOL,SUI, XRP.
- support address check.
1.0.2 - 2024-07-30 #
Update #
- Add wallets: FIL, SCP.
- Add function: F410 address conversion, evm address custom generate.
1.0.5 - 2024-09-05 #
Update #
- Add wallet: ETH.
- Support eth transaction type: EIP1559, LEGACY.
- Support eth signed typed data module.