1
0
Commit Graph

713 Commits

Author SHA1 Message Date
Oren
9487589e06 Fix typo
website is mempoi.space, not
mempool.space.com
2025-07-27 12:12:39 +03:00
SomberNight
b0464cc934 refactor 'init_wallet_wizard' hook a bit. add test_wizard trezor test 2025-07-21 02:40:17 +00:00
SomberNight
bfd3c0e48c Merge branch spesmilo/pr/10016' into 202507_pr10016_qml_wizard_passphrase 2025-07-20 22:02:01 +00:00
Marko Bencun
6567e01f61 bitbox02: update to 7.0.0
This adds support for BitBox02 Nova devices.
2025-07-17 12:07:24 +02:00
SomberNight
3c82b00c5e WalletDB() usage: trivial refactors and fixes
split off from https://github.com/spesmilo/electrum/pull/10027
2025-07-15 12:30:06 +00:00
f321x
1bb8e2d468 adapt trustedcoin to updated passphrase flow in wizard 2025-07-15 00:19:40 +02:00
SomberNight
a1a55db39c lnwatcher: keep_watching should wait at least until closing_tx is deep
Even if it decides there is nothing to sweep from the ctx/etc, it still needs to
keep watching until a reorg-safe depth.
2025-07-08 13:36:04 +00:00
ghost43
08965d93c4 Merge pull request #10006 from shangchenglumetro/master
chore: fix some minor issues in the comments
2025-07-05 23:54:43 +00:00
f321x
f597436fd9 revealer: improve code formatting 2025-07-05 14:13:27 +02:00
f321x
9495aabc8c fix: do not catch exception in revealer plugin
exceptions thrown inside `create_noise_file()` were catched and
couldn't reach the `CrashReporter`.
2025-07-05 14:10:01 +02:00
shangchenglumetro
deca7837f1 chore: fix some minor issues in the comments
Signed-off-by: shangchenglumetro <shuang.cui@live.com>
2025-07-04 16:28:47 +08:00
Oren
afc62ebb77 Ok to press Sign and not save as a file
It's ok to click the View button, then
press Sign, and then close the window

the signed transaction will be used
by the on_closed callback
2025-07-03 15:50:12 +03:00
Oren
951ca76fc2 allow signing transaction from View 2025-07-03 15:50:12 +03:00
Oren
fb40bbe96b keep the same locktime
We don't want the txid to change because
the new transaction has a new random locktime.
2025-07-03 15:50:12 +03:00
Oren
2e96886960 labels to show signed txes 2025-07-03 15:50:12 +03:00
Oren
fb535516d3 Rename labels to fee labels 2025-07-03 15:50:12 +03:00
Oren
78c0425931 return tx in on_closed callback 2025-07-03 15:50:12 +03:00
Oren
7eb29f9a6b watch-only wallets should sign externally
The Next button should be clicked
only after the transactions have been signed
2025-07-03 15:50:12 +03:00
Oren
d1a15ae8f6 throw exception if signing is not complete
There could be flows where sign_transaction
will return without actually
signing the transaction.

We also want to add the ability to sign
the transactions externally, so here we check
if they are already signed.
2025-07-03 15:50:12 +03:00
Oren
ac38b4a594 don't use config FEE_POLICY
Long Term recovery transactions should have
a high fee policy, because we don't know when
we will broadcast them.

On the other hand, they won't need to be urgent
when broadcasted either.
2025-07-03 15:50:12 +03:00
cloudclaim
06d1b730b7 chore: fix some minor issues in the comments
Signed-off-by: cloudclaim <824973921@qq.com>
2025-06-29 10:07:38 +08:00
ThomasV
f6075a5825 follow-up ba3783f998 2025-06-19 09:44:56 +02:00
ThomasV
4714fdfba2 plugins: add icons to manifest.json 2025-06-17 10:45:03 +02:00
Sander van Grieken
3c9c6a286c imports, whitespace, type hints, copyright headers 2025-06-12 14:32:00 +02:00
Sander van Grieken
2c7afacbe1 timelock_recovery: remove redundant pi.parse_output() call and use pi fields directly 2025-06-12 10:07:28 +02:00
ThomasV
b8761ca006 payserver plugin: fix config var names 2025-06-10 20:39:14 +02:00
ghost43
448cbc7869 Merge pull request #9936 from f321x/nwc_incoming_event_filtering
plugin: nwc: improve filtering of expired requests
2025-06-10 18:32:13 +00:00
f321x
0f442f4c85 plugin: nwc: improve filtering of expired requests
improve the filtering of incoming requests by checking if they have
explicitly set an expiration tag. If so, they will only be ignored if
this timestamp is exceeded. Otherwise requests older than 30 secons will
get ignored and an error will get sent to the client so the client is
aware it's request arrived too late.
This is done to prevent handling requests the user may already expects
to have failed.
2025-06-10 19:29:19 +02:00
SomberNight
527d9e8215 plugins: nwc: clean-up imports
Try to follow PEP-8 import grouping, to make things readable.
I want to be able to quickly spot 3rd-party library imports! :P
2025-06-10 15:22:13 +00:00
SomberNight
dd7a284fd9 plugins: nwc: fix constants.net import
"# don't import net directly, import the module instead (so that net is singleton)"

set_as_network does not work if net is not a singleton, it results in a split worldview.
2025-06-10 15:22:10 +00:00
SomberNight
65bc28056c plugins: psbt_nostr: trivial rename
pycharm static analyser was getting confused and thinking this line was rebinding "_" from i18n._
(but AFAICT that's a bug in the static analyser)
2025-06-10 15:01:27 +00:00
SomberNight
f846a16f07 plugins: psbt_nostr: add comment about testnet/mainnet separation 2025-06-10 15:01:24 +00:00
SomberNight
bbe3350937 plugins: psbt_nostr: use wallet.up_to_date_changed_event 2025-06-10 15:01:20 +00:00
ThomasV
2024fa4507 Merge pull request #9902 from SomberNight/202506_base64_trailing_garbage
base64.b64decode: always set validate=True
2025-06-04 14:59:20 +02:00
SomberNight
3e4601c61d base64.b64decode: always set validate=True
Notably verifymessage and decrypt(message) were silently ignoring trailing garbage
or inserted non-base64 characters present in signatures/ciphertext.
(both the CLI commands and in the GUI)
I think it is much cleaner and preferable to treat such signatures/ciphertext as invalid.

In fact I find it surprising that base64.b64decode(validate=False) is the default.
Perhaps we should create a helper function for it that set validate=True and use that.
2025-06-03 18:58:05 +00:00
f321x
3daed92be2 nwc: don't announce spending methods if limit is 0
don't return the spending methods pay_invoice and multi_pay_invoice in
the get_info request and the info event so connections can be used for
services that enforce receive only connections.
2025-06-03 14:13:32 +02:00
ThomasV
f0930ffc1d Merge pull request #9839 from SomberNight/202505_transaction_verify_sig_2
transaction: add method verify_sig_for_txin
2025-05-30 14:32:27 +02:00
ThomasV
853b793bef rm verbosity_shortcuts option (unused, redundant) 2025-05-29 16:20:41 +02:00
ThomasV
05733088a3 psbt_nostr: minor fix 2025-05-20 13:52:30 +02:00
Sander van Grieken
000b1bb3b5 swaps: update instructions in manifest, add Max Forward and Max Reverse amounts in qml provider picker 2025-05-19 14:55:34 +02:00
SomberNight
0508625afc transaction: add method verify_sig_for_txin
This new `Transaction.verify_sig_for_txin` function is an instance method of `Transaction` instead of `PartialTransaction`.
It takes a complete txin, a pubkey and a signature, and verifies the signature.

- `get_preimage_script` is renamed to `get_scriptcode_for_sighash` and now effectively has two implementations:
  - the old impl became `PartialTxInput.get_scriptcode_for_sighash`
    - this assumes we are the ones constructing a spending txin and can have knowledge beyond what will be revealed onchain
  - the new impl is in the base class, `TxInput.get_scriptcode_for_sighash`
    - this assumes the txin is already "complete", and mimics a consensus-verifier by extracting the required fields
      from the already complete witness/scriptSig and the scriptpubkey of the funding utxo
- `serialize_preimage` now does not require a PartialTransaction, it also works on the base class Transaction

-----

I intend to use this for debugging only atm: I noticed TxBatcher sometimes creates invalid signatures by seeing
that bitcoind rejects txs with `mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation)`.
However the txs in question have multiple txins, with some txins containing multiple signatures, and bitcoind does not tell us
which txin/signature is invalid. Knowing which signature is invalid would be a start, but I can now add some temp debug logging
to `serialize_preimage` to compare the message being signed with the message being verified.

As can be seen from the tests, the signature and the pubkey needs to be manually extracted from the txin to be verified:
we still don't have a script interpreter so we don't have logic to "verify a txin". However this new code adds logic
to verify a signature for a txin/pubkey combo (which is a small part of an interpreter/verifier).
2025-05-18 15:20:19 +00:00
Sander van Grieken
77407fa206 qml: offer same choices as desktop; Open, Discard, Save to wallet 2025-05-16 10:41:41 +02:00
ThomasV
33ea89c94b Merge pull request #9793 from accumulator/psbt_nostr_send_description
PSBT nostr, send invoice/tx description along with PSBT
2025-05-15 09:44:55 +02:00
SomberNight
6c11c75d58 follow-up prev 2025-05-14 13:29:30 +00:00
SomberNight
44f3444795 lnworker: make "preimages" dict private
I want to hook into lnworker.save_preimage (not done yet).
Other modules should not put preimages into the dict directly.
2025-05-14 13:23:02 +00:00
ThomasV
37352ea5a9 Merge pull request #9823 from f321x/psbt_nostr_verify_authors
fix: verify author pubkey of psbt nostr events
2025-05-14 13:12:25 +02:00
Sander van Grieken
a9213c4d66 psbt_nostr: send label along with PSBT 2025-05-14 12:49:33 +02:00
Sander van Grieken
f535817006 psbt_nostr: qml: don't let iterator overwrite param 2025-05-14 12:48:47 +02:00
f321x
759022d3ff fix: verify author pubkey of psbt nostr events
Checks if the pubkey of the author sending the psbt cosigning
request is in our list of cosigner pubkeys to prevent accepting
"fake" requests from other pubkeys.
2025-05-14 11:28:11 +02:00
ThomasV
0d1b6aa432 nwc plugin: improve dialog layout 2025-05-07 12:10:20 +02:00