52 Commits

Author SHA1 Message Date
edouardparis
b6971fdd64 Prepare version 12.0 2025-07-22 10:38:42 +02:00
Michael Mallan
cb60089ace
fix(poller): only update last used index for affected keychain 2025-07-09 10:48:18 +01:00
edouardparis
fef70879b9 refac: remove patch field from Version
The Version struct is used across the software
to display the release version. A release version
does not include patch number as we increment
only the major and the minor during a new release.

For very small patch that does not change the
API and does not require a new release, then the crates
Cargo.toml version patch number will be incremented.
2025-06-16 18:48:31 +02:00
pythcoiner
df1fb7f8f5
allow to connect to an electrum server w/ a self signed certificate"
This reverts commit b7b52d73bec0522af6dd08e9018868841b9363ca.
2025-06-11 12:19:23 +02:00
edouardparis
a9d417bc39 Prepare v11.0-dev 2025-05-26 11:11:46 +02:00
Michael Mallan
8b8b48142f
feat: add list addresses method to gui daemon interface 2025-05-14 15:06:49 +01:00
edouardparis
619ea6923f
Merge #1692: feat: add listrevealedaddresses command
3d6a22ea05df70d6f0c11f2f00c85dc16975ad28 feat: add rpc command to list revealed addresses (Michael Mallan)
4945dba7c066d1434fa38a09a955339b7182e693 feat: add command to list revealed addresses (Michael Mallan)
75f37708b3b1f6a89e0f5488c95618a07356f166 test: implement methods for getting/setting labels (Michael Mallan)
16b96b5456b46cd3703d4829b24746c8a489b3ed style: apply black formatting (Michael Mallan)

Pull request description:

  This implements #1678.

  The command parameters differ slightly from those described in the issue:
  - instead of a `keychain` enum parameter, I used  `is_change` to control whether receive or change addresses are returned.
  - I used an optional `continue_from` parameter to control pagination. The value to pass in the next request is provided by the previous response. If no value is provided in the response, there are no more addresses to list. If no value is set in the request, the addresses will be returned starting from the last revealed address.

  Setting the positional argument for `continue_after` as `null` will be treated the same as omitting it (for other RPC commands, a `null` value results in a parsing error).

ACKs for top commit:
  pythcoiner:
    utACK 3d6a22e

Tree-SHA512: 0efa93bc40d0751cbe64570f9789b3a701e0bc5aab982da9ed9f21117a2eea073a81388370d56a9021c0ff87b6cbaec7338339427e6c879e8e97eababb107f57
2025-05-12 09:36:21 +02:00
Michael Mallan
3d6a22ea05
feat: add rpc command to list revealed addresses 2025-05-07 08:48:34 +01:00
Michael Mallan
4945dba7c0
feat: add command to list revealed addresses 2025-05-07 08:48:31 +01:00
edouardparis
8c0c23e688 Use gui panic hook 2025-05-06 11:16:57 +02:00
Michael Mallan
75f37708b3
test: implement methods for getting/setting labels 2025-05-02 17:47:11 +01:00
edouardparis
bb7777878e Use type wrapper instead of PathBuf for directories
With the multiplicity of directories, liana directory,
network directory and in the future per wallet lianad
directories, passing a simple type PathBuf does not
transmit to the contributors the information about
which directory each module works with.

This commit introduces wrappers around PathBuf
to give this information and link parent directories
to their child directories.
2025-04-28 11:14:35 +02:00
edouardparis
6ccaa0573b Prepare datadir for multiple wallet support
A new field data_directory is introduced in lianad configuration, it
resolves directly to the path of the wallet datadir without the per network
reasoning. The previous data_dir field is kept for backward
compatibility for already generated configuration file.
2025-04-23 17:27:28 +02:00
edouardparis
733c3a6071
Merge #1657: lianad: in update_spend_tx() work on the db_psbt
d637564a117947bd0493eba9bf61a1d84f893aa5 lianad: in update_spend_tx() work on the db_psbt instead of the imported one (pythcoiner)

Pull request description:

  This PR partially fixes #1581.

  Previously the imported PSBT we taken as base and signature added from the PSBT stored in DB, this create issue when the imported PSBT is supplied by a signing device that trim the PSBT (in QRCode context for instance).
  This PR change the logic by taking the PSBT stored in DB as base and add signatures from the imported PSBT.

  ~~Note: the same logic change must be done on `liana-backend`~~
  edit: review the logic on liana-backend, nothing seems to be change on this side, validated by a test by importing a psbt from krux trough Krux(QRCode) => SeedQReader => file => import

ACKs for top commit:
  edouardparis:
    ACK d637564a117947bd0493eba9bf61a1d84f893aa5

Tree-SHA512: 2a14f2387f3ab74e93f4e5b67ff48011bea945bfa897e21f14be40bf40b52460c921c4dcb92899ce46f1aed6096ec8bd97b423341c1660dd3cd081146080572c
2025-04-16 17:57:37 +02:00
pythcoiner
d637564a11
lianad: in update_spend_tx() work on the db_psbt instead of the imported one 2025-04-16 13:08:40 +02:00
Michael Mallan
d4151d88d6
rpc: allow to choose outpoints in createrecovery
To maintain backwards compatibility, the `outpoints` parameter
is the final positional argument and can be omitted entirely.
2025-04-08 14:50:10 +01:00
Michael Mallan
8cc723fb3b
commands: allow to specify coins for recovery 2025-04-08 14:49:02 +01:00
Michael Mallan
ce711ae10a
commands: add test for create_recovery 2025-04-07 16:01:20 +01:00
Michael Mallan
e987458657
lianad: ensure consistent derivation index management
The database should store the last used/revealed derivation index.

Docstrings have been updated accordingly.

Getting a new address requires that the database value first be
incremented.

When listing addresses without specifying a count, all
used/revealed addresses should be returned.
2025-03-24 18:39:04 +00:00
pythcoiner
c4b037a08d
lianad: drop defaults features for bip329 crate 2025-03-21 17:39:42 +01:00
edouardparis
88cebffb03 Prepare v10.0 2025-03-21 16:12:32 +01:00
pythcoiner
4e17483340
lianad: reverse the byte order of txid before parsing bip329 label transactions 2025-03-19 10:44:57 +01:00
pythcoiner
e1b90b056f
lianad: in DaemonControl::update_deriv_indexes() limit the gap the index can be incremented and return db indexes 2025-03-19 07:43:41 +01:00
pythcoiner
d0d7007e83
import: implement import_backup() 2025-03-19 07:26:02 +01:00
pythcoiner
b6f900355c
lianad: implement LabelItem.from_bip329() 2025-03-19 07:26:01 +01:00
pythcoiner
39f71d3de8
lianad: add update_deriv_indexes() command 2025-03-19 07:26:01 +01:00
pythcoiner
f7ed341d28
gui: Daemon trait => add receive and change indexes to GetInfoResult 2025-03-18 17:38:41 +01:00
pythcoiner
38eed1b881
lianad: add feature to dump labels in BIP-0329 format 2025-03-15 09:59:18 +01:00
Michael Mallan
7a1d87fb4c
use ring provider with rustls in electrum client
This uses a modified version of bdk_electrum 0.15 (corresponding
to BDK tag v1.0.0-alpha.13) that enables the use of the ring
provider in rustls.

The default aws-lc-rs provider breaks the reproducible build.
2025-02-24 17:23:59 +00:00
zoupingshi
37f0d54360 chore: fix some typos
Signed-off-by: zoupingshi <hangfachang@outlook.com>
2025-02-08 14:39:56 +08:00
Michael Mallan
1859a2d5f0
bump bdk_coin_select to 0.4
Weights are now stored as `u64` instead of `u32`.

The tests have been updated to reflect that coin selection now
calculates feerates using a transaction's size in rounded-up
vbytes.
2025-01-30 15:45:15 +00:00
Michael Mallan
4d05c1f0ff
commands: allow rbf for spending txs without saved psbt 2025-01-29 15:54:39 +00:00
edouardparis
3c8e412384
Merge #1555: upgrade bitcoin dependency to 0.32 and related
c5f5284f57e37e578cc3001a7da1790c724437a3 upgrade bitcoin to 0.32 and related (Michael Mallan)

Pull request description:

  This is to upgrade bitcoin to 0.32 and related dependencies accordingly.

  Note that the bdk_electrum crate has not been upgraded to the most recent version available as the Electrum syncing there takes much longer due to the fetching and validation of Merkle proofs. There are ongoing changes in relation to that (https://github.com/bitcoindevkit/bdk/issues/1699) and so we can further upgrade this dependency once those changes have been completed.

  Non-BDK changes to the liana and lianad crates are taken from commit 20ee8b1e7b77cbf65942bc4f083afea95f2d1506 in draft PR https://github.com/wizardsardine/liana/pull/1228, which this replaces.

  (Once this PR has been tested and approved, we can release a new version of the async_hwi crate and point to that.)

ACKs for top commit:
  edouardparis:
    ACK c5f5284f57e37e578cc3001a7da1790c724437a3

Tree-SHA512: 3cb1a2060ecc4c6b9631df0eadf5692ad35495b9303edbb80a437aca60ae062a7227f20ddeb5eb722cf57dd80bfa752372a14d26b8f306844237bfdb5f41e51a
2025-01-27 18:04:19 +01:00
Michael Mallan
c5f5284f57
upgrade bitcoin to 0.32 and related
This upgrades bitcoin to 0.32 and related dependencies accordingly.

Note that the bdk_electrum crate has not been upgraded to the most
recent version available as the Electrum syncing there takes much
longer due to the fetching and validation of Merkle proofs. There
are ongoing BDK changes in relation to that and so we can further
upgrade this dependency once those changes have been completed.

Non-BDK changes to the liana and lianad crates are taken from
darosior's commit 20ee8b1e7b77cbf65942bc4f083afea95f2d1506 in
draft PR https://github.com/wizardsardine/liana/pull/1228.
2025-01-27 14:36:29 +00:00
damuzhi0810
f12c65cdd2 chore: fix some comments
Signed-off-by: damuzhi0810 <rust@before.tech>
2025-01-23 22:05:18 +08:00
edouardparis
c5b1f73660 fix fetching of coins txids before migration 2025-01-07 16:10:14 +01:00
edouardparis
d0fefc37f4 Prepare v9 release 2025-01-07 11:22:24 +01:00
edouardparis
b7b52d73be Revert "Merge #1500: gui: allow to connect to an electrum server w/ a self signed certificate"
This reverts commit 2d2d080888f5c2a0fd82d6c4a4009a254b2dbcb2, reversing
changes made to cfe15b360d0f9a40d0de2ca00bdd1530e6e6c8e9.
2025-01-02 15:31:30 +01:00
edouardparis
31c495572d
Merge #1506: lianad: fix check that rescan has started
6b914fd2491841bb3daa41f59641677c10cc880b bitcoind: parse descriptor before comparing strings (Michael Mallan)
652eb5b799c8d2ed9f65ab24c0101af3e09905f8 refactor(bitcoind): extract logic to function (Michael Mallan)

Pull request description:

  The `startrescan` command uses the response from bitcoind's `listdescriptors` RPC method to confirm that the rescan has started.

  This check includes a string comparison that can fail in some cases (Taproot descriptors with a spending path having only a single key) as the descriptor string returned by bitcoind may contain both `h` and `'` , whereas Liana's descriptor string only uses `'` (as per the `Descriptor::to_string()` method).

  This PR changes the check to first parse each descriptor string as a `Descriptor` object to avoid any `h` / `'` mismatch issues.

ACKs for top commit:
  edouardparis:
    utACK 6b914fd2491841bb3daa41f59641677c10cc880b

Tree-SHA512: 14d3eaef950a490020af2157e03adcbd1cc821c92750f21e682ba74bc4fd3531552a7ba0f70144792d5bbc18546b919567f181e468e2b196c6c473ca45d9d9de
2025-01-02 11:32:08 +01:00
pythcoiner
09bb450b1f gui: allow user to not validate the ssl domain for an electrum server 2024-12-31 15:18:21 +01:00
pythcoiner
efb23300da lianad(electrum): add an option to not validate SSL domain in order to work w/ self signed certificates 2024-12-31 15:18:21 +01:00
Michael Mallan
6b914fd249
bitcoind: parse descriptor before comparing strings
Parsing the descriptor first will ensure a match is found
regardless of whether bitcoind uses `h` or `'`.
2024-12-30 17:12:28 +00:00
Michael Mallan
652eb5b799
refactor(bitcoind): extract logic to function 2024-12-30 13:26:54 +00:00
Michael Mallan
091d7728ee
commands: use unconfirmed from self for coin selection
We previously used unconfirmed change as a best-guess way of
identifying those coins from self, but now we have the
`is_from_self` field we can use it directly and be sure we only
select coins that are fully under our control.
2024-12-16 10:24:19 +00:00
Michael Mallan
1c0338610f
commands: add is_from_self to listcoins response 2024-12-02 10:08:18 +00:00
Michael Mallan
c1e55716e6
database: add is_from_self to Coin 2024-12-02 10:08:16 +00:00
Michael Mallan
6dd92052af
database: track whether coin is from self
This populates the new columns from the previous migration
for existing rows and then maintains them in the poller moving
forward.
2024-12-02 10:08:14 +00:00
Michael Mallan
da185361f9
sqlite: add helper to query single row 2024-11-28 14:56:15 +00:00
Michael Mallan
4f6dcbfdfd
sqlite: add columns to transactions and coins tables
The new columns in the transactions table will be populated for
new transactions by the poller, while existing rows will be
updated in a subsequent migration.

New and existing coins will all have `is_from_self` set to false
due to the default column value.

None of these columns will be used by the wallet at this stage.
2024-11-28 14:56:13 +00:00
Michael Mallan
f2c910f6eb
sqlite: refactor test to not depend on order of coins
I found that making changes to the transactions used in the test
can affect the order in which coins are returned, probably due
to the txid changing.
2024-11-28 08:56:08 +00:00