mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
* feat: add Lightning transaction URL support in transaction details view model * fix: update currency selection logic in WalletAddressListViewModel and ReceivePage * feat: integrate computed transaction amount and fee getters in TransactionDetailsViewModel, refactor CopyWrapper logic in TransactionDetailsModal * refactor: apply lint rules * refactor: apply lint rules and improve LNURL handling with new methods for withdrawal requests and error checks * auto-reformat * fix: receive_page regression * fix: Withdraw lightning to other btc wallet gives LN address * chore: update .lock files [skip ci] --------- Co-authored-by: Robert Malikowski <malikowskirobert@gmail.com> Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
cw_decred
Decred wallet module that bridges to the native libdcrwallet via FFI. Provides high‑level methods to create/load wallets, sync, query balances/transactions, build and broadcast transactions, and sign/verify messages.
Features
- FFI bindings to
libdcrwalletwith an isolate‑based request/response model. - Initialize, create, load, close wallets; watch‑only creation.
- Start sync with optional peer list; query sync status and best block.
- Query balances, list transactions and unspents, rescan from height.
- Create signed transactions and broadcast raw transactions.
- Export wallet seed; change wallet password.
- Address management (new external address, default pubkey, address lists).
- Message signing and verification.
Getting started
Ensure the platform library is available:
- Android/Linux:
libdcrwallet.so - Apple: embedded
cw_decred.framework/cw_decred
Initialize and load a wallet:
final lib = await Libwallet.spawn();
await lib.initLibdcrwallet('', 'info');
await lib.loadWallet(jsonEncode({ /* libdcrwallet config */ }));
await lib.startSync('wallet.db', '');
final status = await lib.syncStatus('wallet.db');
Usage
Create, sign, and broadcast a transaction:
final signed = await lib.createSignedTransaction('wallet.db', jsonEncode({
// inputs/outputs and policy for libdcrwallet
}));
final txid = await lib.sendRawTransaction('wallet.db', signed);
Additional information
- See
lib/api/for the isolate wrapper (libdcrwallet.dart) and low‑level bindings. - Errors are surfaced via the
PayloadResultstruct; some calls supportthrowOnErrorin higher‑level wrappers.