listcoins response whether coin is from self
1c0338610f76419287157c14a6647a362160f9e4 commands: add is_from_self to listcoins response (Michael Mallan) c1e55716e619249c264193776d36c640df9bc946 database: add is_from_self to Coin (Michael Mallan) 6dd92052af0afc37bddb67493a64af396e7964c9 database: track whether coin is from self (Michael Mallan) da185361f99eb319554ec78daa2fccdcd72eb298 sqlite: add helper to query single row (Michael Mallan) 4f6dcbfdfd7eaf471a38badc0c9ce48aefac814c sqlite: add columns to transactions and coins tables (Michael Mallan) f2c910f6eb9f2b74329fa026c93f7e813f3baa53 sqlite: refactor test to not depend on order of coins (Michael Mallan) bde3299db1c38eb6b0b09d7da2a73c43e40181b9 sqlite: refactor migration tests (Michael Mallan) Pull request description: ⚠️ This PR upgrades and migrates DB version so a wallet opened against this PR will no longer work on Liana v8. This is a first step towards #1375. Following the approach from #1391, this PR adds a new `is_from_self` field to the response of the `listcoins` command. The underlying information is stored in a new `is_from_self` column in the coins database table. This column could instead have been added to the transactions table, but for consistency with other transaction-related columns, I added it to the coins table. It's also important to note that being from self is wallet-dependent, so adding it to the transactions table would not work if multiple wallets were supported in the same DB (h/t edouardparis). A subsequent PR will then use this field in the GUI to determine which unconfirmed coins, if any, can be included in the confirmed balance. It also needs to be added to the corresponding Liana Connect API call. Another use of this field will be to determine which unconfirmed coins to include in coin selection (https://github.com/wizardsardine/liana/issues/1484). The first commit in this PR refactors some existing DB migration tests so that they will not be affected by future changes to the coins table schema. ACKs for top commit: pythcoiner: utACK 1c033861 edouardparis: ACK 1c0338610f76419287157c14a6647a362160f9e4 Tree-SHA512: cdadb1f887989d40a08370a479310d80087b9075ff766dd518167baed4630ccbcbb0dc8f49b7fb31ad9aebddfb4ca459d83aeed3c47158bdb046a91352f98fc7
About
Liana is a simple Bitcoin wallet. Like other Bitcoin wallets you have one key which can spend the funds in the wallet immediately. Unlike other wallets, Liana lets you in addition specify one key which can only spend the coins after the wallet has been inactive for some time.
We refer to these as the primary spending path (always accessible) and the recovery path (only available after some time of inactivity). You may have more than one key in either the primary or the recovery path (multisig). You may have more than one recovery path.
Here is an example of a Liana wallet configuration:
- Owner's key (can always spend)
- Any 2 keys from the owner's spouse and two kids (after 1 year)
- A third party, in case all else failed (after 1 year and 3 months)
The lockup period is enforced onchain by the Bitcoin network. This is achieved by leveraging timelock capabilities of Bitcoin smart contracts (Script).
Liana can be used for trustless inheritance, loss protection or safer backups. Visit our website for more information.
Usage
Liana is available on Windows, Mac and Linux. To install and start using it see
doc/USAGE.md. A more accessible version of Liana is also available as a web
application here.
If you just want to quickly try out Liana on Bitcoin Signet, see doc/TRY.md.
Hacking on Liana
Liana is an open source project. It is hosted at Github. Contributions are very welcome. See here for guidelines. Most regular contributors hang out on our Discord. Join us there if you have any question about contributing.
Liana is separated in two main components: the daemon and the Graphical User Interface.
Liana daemon
The daemon contains the core logic of the wallet. It is both a library (a Rust crate) that exposes a command interface and a standalone UNIX daemon that exposes a JSONRPC API through a Unix Domain Socket.
The code for the daemon can be found in the liana folder.
Liana GUI
The GUI contains both an installer that guides a user through setting up a Liana wallet, as well as
a graphical interface to the daemon using the iced library.
The code for the GUI can be found in the liana-gui folder.
Security
See SECURITY.md for details about reporting a security vulnerability or any bug
that could potentially impact the security of users' funds.
License
Released under the BSD 3-Clause Licence. See the LICENCE file.