mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
* fix android CI * feat: add anypay core models, parser and routing engine * feat: add anypay resolver, anypay service and wallet switch service * refactor: route the send page payment flow through anypay service * fix: show message when there's no swap providers for a pair and reset the trade guard on dismissal * refactor: merge the swap from network and send to network decision pages together and clean up anypay widgets * feat: reapply deep links to a currently open send flow and register the solana scheme * feat: add support for zcash address detection to anypay and other minor fixes * refactor: remove trailing icon * feat: hide swap flow for sp and mweb addresses * feat: enhance zcash address detection and deeplink handling * fix: pin bitcoin_base * refactor: Move the anypay decision navigation out of the send page and address minor review comments * refactor: Move the anypay decision navigation out of the send page and address minor review comments * feat: handle exception in switch service and mvoe balance compute to call site * refactor: combine anypay entry points to one and extract selected mode widget --------- Co-authored-by: Czarek Nakamoto <cyjan@mrcyjanek.net>
cw_bitcoin_cash
Bitcoin Cash wallet module using the shared Electrum implementation configured for BCH mainnet. Includes CashAddr handling and BCH-specific fee/priority presets.
Features
- Derive keys via BIP‑39; maintain receive/change address chains.
- Load/save snapshots of addresses, indices, and balances.
- Electrum connectivity and UTXO management.
- Create/sign/broadcast BCH transactions; calculate size-based fees by priority.
- CashAddr compatibility for addresses; migration of legacy snapshots.
- Message signing and verification.
Getting started
Create/open via the app’s wallet service using WalletType.bitcoinCash. Ensure BCH Electrum nodes are configured.
final wallet = await BitcoinCashWallet.create(
mnemonic: '...',
password: 'secret',
walletInfo: walletInfo,
unspentCoinsInfo: unspentCoinsBox,
encryptionFileUtils: encryption,
);
Usage
Fee calculation and send:
final feeRate = wallet.feeRate(BitcoinCashTransactionPriority.medium);
final pending = await wallet.createTransaction(
outputs: [
BitcoinTransactionOutput(
address: 'bitcoincash:qq...',
amount: 10000, // satoshis
),
],
feeRate: feeRate,
);
final txHash = await pending.commit();
Additional information
- See
lib/src/for:BitcoinCashWallet,BitcoinCashWalletAddresses, and helpers inbitcoin_cash_base.dart. - Snapshot migration and CashAddr normalization are handled during open.