-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #536: python-bitcointx backend for jmbitcoin + bip78 and snicker.
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)
- Loading branch information
Showing
81 changed files
with
4,322 additions
and
4,291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
""" See https://twistedmatrix.com/documents/current/web/howto/client.html | ||
""" | ||
from zope.interface import implementer | ||
|
||
from twisted.internet.defer import succeed | ||
from twisted.web.iweb import IBodyProducer | ||
|
||
@implementer(IBodyProducer) | ||
class BytesProducer(object): | ||
def __init__(self, body): | ||
self.body = body | ||
self.length = len(body) | ||
|
||
def startProducing(self, consumer): | ||
consumer.write(self.body) | ||
return succeed(None) | ||
|
||
def pauseProducing(self): | ||
pass | ||
|
||
def stopProducing(self): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,35 @@ | ||
import coincurve as secp256k1 | ||
|
||
# If user has compiled and installed libsecp256k1 via | ||
# JM installation script install.sh, use that; | ||
# if not, it is assumed to be present at the system level | ||
# See: https://github.com/Simplexum/python-bitcointx/commit/79333106eeb55841df2935781646369b186d99f7#diff-1ea6586127522e62d109ec5893a18850R301-R310 | ||
import os, sys | ||
if sys.platform == "darwin": | ||
secp_name = "libsecp256k1.dylib" | ||
else: | ||
secp_name = "libsecp256k1.so" | ||
expected_secp_location = os.path.join(sys.prefix, "lib", secp_name) | ||
if os.path.exists(expected_secp_location): | ||
import bitcointx | ||
bitcointx.set_custom_secp256k1_path(expected_secp_location) | ||
|
||
from jmbitcoin.secp256k1_main import * | ||
from jmbitcoin.secp256k1_transaction import * | ||
from jmbitcoin.secp256k1_deterministic import * | ||
from jmbitcoin.btscript import * | ||
from jmbitcoin.bech32 import * | ||
from jmbitcoin.snicker import * | ||
from jmbitcoin.amount import * | ||
from jmbitcoin.bip21 import * | ||
from bitcointx import select_chain_params | ||
from bitcointx.core import (x, b2x, b2lx, lx, COutPoint, CTxOut, CTxIn, | ||
CTxInWitness, CTxWitness, CTransaction, | ||
CMutableTransaction, Hash160, | ||
coins_to_satoshi, satoshi_to_coins) | ||
from bitcointx.core.key import KeyStore | ||
from bitcointx.wallet import (P2SHCoinAddress, P2SHCoinAddressError, | ||
P2WPKHCoinAddress, P2WPKHCoinAddressError) | ||
from bitcointx.core.script import (CScript, OP_0, SignatureHash, SIGHASH_ALL, | ||
SIGVERSION_WITNESS_V0, CScriptWitness) | ||
from bitcointx.core.psbt import (PartiallySignedTransaction, PSBT_Input, | ||
PSBT_Output) | ||
|
Oops, something went wrong.