fd9d98fd09Fixes#639. Allow export of private keys in Qt. (Adam Gibson)
Pull request description:
Additionally, we add a note to wif_to_privkey()
in jmclient.cryptoenging.BTCEngine because the
'keytype' variable constructed there is not currently
usabe, and we remove a check of that keytype in
the add_utxo script used for PoDLE (it is not relevant).
ACKs for top commit:
kristapsk:
ACK fd9d98fd09
Tree-SHA512: 161c8cfab80b7eef04ce0f22253946530121e4827769096e80e3019529a6736c2a5525188ef04c695c8f0db704da144648732d5cea026667fbf4b047db973abd
Additionally, we add a note to wif_to_privkey()
in jmclient.cryptoenging.BTCEngine because the
'keytype' variable constructed there is not currently
usabe, and we remove a check of that keytype in
the add_utxo script used for PoDLE (it is not relevant).
In this commit, the jmclient.payjoin module now supports
sending payments to BIP21 URIs where the pj= parameter is
to a hidden service address.
Additionally, the test/payjoinclient and test/payjoinserver
modules are edited to support optionally testing payments to
an ephemeral hidden service.
73b0edc219 Update macOS installation instructions (Jules Comte)
Pull request description:
This should be merged after #536, and is a followup to #629
It includes build instructions for libsecp256k1 for those who don't use `install.sh`
@AdamISZ I was wrong, it turns out that `install.sh` does need some modifications to work on mac os from scratch.
My biggest question at this point is whether I have the list of darwin dependencies correct in `install.sh: line 44`
With the current list, I was able to build, and pass the testsuite on fresh installations of Mac OS Catalina with Apple Command Line Tools and Homebrew installed.
Top commit has no ACKs.
Tree-SHA512: f9feed9d6052cefd043a025212e27347669aa6a082a4543d2f19a64f74ceb51694fa33efb5a92b79f7fc15a70efead4ac32cee3ab78acb6badd894f8b616aede
Prior to this commit, the BIP78 payjoin would broadcast
a fallback transaction in case of the server returning an
error, but would not do so in case of server non-response.
After this commit, we add a 60 second timeout after which
the non-payjoin fallback is broadcast client side; see
BIP78 for an explanation of this behaviour.
e5ec172442 Output frozen UTXO's on showutxos too, add "frozen" state to output (Kristaps Kaupe)
Pull request description:
Top commit has no ACKs.
Tree-SHA512: 4bf23cce899918a054baacc6551e13df66d5ece4847e534aa7aa6b5e96473c5d65a2c5d2e0d5f66d0f7eb6d692f5674207a50f06bbfb071be52dfcb361c9b8fa
41540ab Modify Payjoin code for BIP78 changes. (Adam Gibson)
3ed4e88 Search for correct library extension on mac os (Jules Comte)
6e6bf0a Use VERIFY_STRICTENC flag for Script verification (Adam Gibson)
55295e8 first waypoint on bip78 (Adam Gibson)
d34c53b Various fixups: (Adam Gibson)
53ef79b Updates to account for code changes in #544 (Adam Gibson)
4cf77ed Various bugfixes: (Adam Gibson)
ca0de5c Add bip78 payjoin module and client-server test: See: https://github.com/bitcoin/bips/blob/master/bip-0078.mediawiki (Adam Gibson)
ad459d2 Add human readable representations of txs and PSBTs (Adam Gibson)
03a1359 Adds libsecp256k1 installation and addresses reviews (Adam Gibson)
037a2c1 Adds full payjoin workflow test (Adam Gibson)
de3ad53 Support output of PSBT instead of broadcast in direct_send (Adam Gibson)
f060781 Add SNICKER support to wallets. (Adam Gibson)
22ed0e0 Adds psbt creation and signing support in JM wallet. (Adam Gibson)
070c5bf python-bitcointx backend for jmbitcoin. (Adam Gibson)
This is now tested as compatible with BIP78 as
implemented by BTCPayServer.
An additional config section [PAYJOIN] is added to
manage settings for fee control in payjoin as
described in the BIP. These settings are marked as
advanced usage as they're rather complex for users
to understand and the defaults should be very safe.
Without this flag set, the python-bitcointx Script
verification will use openssl for non-strict encoding,
which requires a libopenssl dependency. Moreover non-
strict encoding is now out of consensus so is not needed
for our purpose.
Upgrade python-bitcointx to 1.1.0:
Address requirements of python-bitcointx 1.1.0:
Specifically, the witness `utxo` field can no longer be
assumed to be of type CTxOut, so we should access the
CTxOut with the field witness_utxo and also when updating
the `utxo` field we now use `set_utxo()`.
Use PartiallySignedTransaction.get_fee() method.
Use PartiallySignedTransaction.set_utxo.
Additionally some minor typos/comment corrections and removal
of the now defunct `apply_freeze_signature`.
Add custom load location for libsecp where needed;
falls back to system installation if Joinmarket custom
installation is not found.
Decode error msg from server in payjoin
Cleanup test file test_proposals.txt (delete after test)
Human readable function names (names for human readable
conversions are now themselves human readable).
Remove unused get_*_vbyte functions and cleanup
Removes old unused files (electrum*.py).
Fixes core nohistory sync test to use both standard
wallet types, and fixes address import counter.
Fixes that test to use the right chain params so that
native segwit wallets can work in regtest with
nohistory mode.
Removes some now unneeded imports.
Fixes commontest.create_wallet_for_sync to hash all
parameters, including optional ones.
Replaces usage of binascii.hexlify with bintohex.
Note in particular that:
bitcoin.mktx in this PR now does support script
entries in outputs to account for nonstandard
destinations (as is needed for burn).
bitcoin.sign now supports p2wsh (as is needed
for timelocks).
Fix bug in Coins tab, get_utxos_by_mixdepth calls
Fix bug in jmbitcoin.mktx, now respects nVersion choice
Fix bug in tumbler restart wait
Fix bug in makercount for payjoin for fee check, set to 0:
The value of `options.makercount` is set to zero
so that the fee sanity check in the sendpayment script
operates approximately correctly (the receiver will bump
the fee to keep the fee rate the same if necessary).
Also the `bip79` variable is better named `payjoinurl`.
Fix bug in "freeze" context menu function in Qt
See:
https://github.com/bitcoin/bips/blob/master/bip-0078.mediawiki
Adds a new module jmclient.payjoin which implements
the full sender workflow from a BIP21 uri to a
payjoin broadcast, state is managed in JMPayjoinManager,
includes all checks as per documentation of
btcpayserver (and later, BIP78).
Added simple client and server implementations in
test/payjoinclient.py and test/payjoinserver.py
which allow a full end to end test on regtest.
Add TLS support to payjoin tests:
Note: the jmclient.payjoin module already
supports TLS by default (Agent object), but
here we add the ability to test without
certificate verification. Both test/payjoinclient.py
and test/payjoinserver.py now support TLS, but
the server needs a key and certificate in its
directory to run.
Adds BIP78 payjoin option to sendpayment.py
Users can use a bip21 uri with the "pj" field to
send a payment to a remote server.
Removes require_path_templates setting from KeyStore call
in PSBTWalletMixin.sign_psbt
Human readable representation for CTransaction
objects in jmbitcoin.secp256k1_transaction.py and for
PartiallySignedTransaction objects in jmclient.wallet.
PSBTWalletMixin, use of these in maker, taker, direct
send and in tests. Users should note that PSBT human
readable representations can in some cases be really
huge.
Update no-history-sync code:
This updates the new functionality in jmclient.wallet_utils
in the no-history-sync PR #444 to be compatible
with the python-bitcointx refactoring.
Remove all future/py2 compatibility code remaining:
This is in line with #525 and corrects erroneous
addition of more compatibility code.
Addresses all flake8 complaints (ununsed imports etc)
Addresses review of @dgpv
Addresses review of @kristapsk