Title: [ANN] pyspv 0.0.1-alpha - Python 3 Bitcoin SPV library Post by: Sarchar on February 26, 2014, 10:49:14 AM pyspv - An extensible Python 3 Bitcoin SPV library (https://github.com/sarchar/pyspv)
WARNING: This is ALPHA software. USE AT YOUR OWN RISK. I've been working on this project for the past month and I finally feel that it's time to tell the community about it and ask for some constructive feedback. I'm also more than happy to accept code contributions :) The goal of this project is to create a library that can be used with Bitcoin (and eventually altcoins) that makes it easy for you to develop applications, both client and server, without doing any of the tedious Blockchain/Network/Transaction programming. Integrating Bitcoin into your application is now literally a two line change to your code. Features:
The source comes with a sample RPC wallet called simple-wallet.py, you can launch it simply: Code: $ python3 examples/simple-wallet.py --testnet -v The README (https://github.com/sarchar/pyspv/blob/master/README.md) describes the full set of RPC commands available, but here is a small demonstration: Code: $ python3 examples/simple-wallet.py getnewstealthaddress Code: $ python3 examples/simple-wallet.py genmultisig 1 2 0378d430274f8c5ec1321338151e9f27f4c676a008bdf8638d07c0b6be9ab35c71 So, anyways. If you have time, try it out and let me know. Also, let me know if you end up using it in a project, I'd love to link to it from here. TODO * Namecoin support (I actually have this mostly working, but I need to implement AuxPOW for the new blocks) * Once Namecoin works, I should be able to finish my P2P alt-chain trading code and help automate trades (see https://en.bitcoin.it/wiki/Contracts#Example_5:_Trading_across_chains) * BIP32 (HDW) and BIP38 (Encryption) support * BIP70 (Payment protocol) support * More altcoins? More payment monitors? * CPU mining support (To aid in the creation of new alt-coins) * Bug fixes NOTE: Looks like there's a crash that happens between OpenSSL and Python when using 64-Bit Python build, so refrain from using 64-bit python for now. I'm looking into it. Title: Re: [ANN] pyspv - Python 3 Bitcoin SPV client (ALPHA release) Post by: Sarchar on February 26, 2014, 10:51:06 AM Reserved
Title: Re: [ANN] pyspv 0.0.1-alpha - Python 3 Bitcoin SPV library Post by: bitjoint on February 26, 2014, 10:58:12 AM Congrats, this looks awesome...
watching PS: I hope this will include compatibility with 2.7 in the final version, loads of apps and webapps are still using 2.x Title: Re: [ANN] pyspv 0.0.1-alpha - Python 3 Bitcoin SPV library Post by: gdassori on December 09, 2014, 11:35:34 AM I can't believe this implementation was released so silently. I admit I'm still understanding how it works: I relied only on the easy pycoin lib, till today, and I was looking for a pythonic way of broadcasting transactions without rely on a third-party API or a running bitcoind, when I've met pyspv.
As far as I've seen, it looks like the most complete python bitcoin library available ever... why this thread is not hot as hell? Is pyspv discontinued for the sake of python-bitcoinlib fork by Jeff Garzik and, finally, Peter Todd, or the OP plan to mantain it as well? Title: Re: [ANN] pyspv 0.0.1-alpha - Python 3 Bitcoin SPV library Post by: fbueller on December 09, 2014, 09:25:12 PM Clicked notify on this thread, will be watching with interest. Implementing the same in PHP, I'm hoping to leverage electrum servers on different coins since Stratum supports callbacks.. Very handy and light way to monitor for transactions, and you can query multiple servers too.
Title: Re: [ANN] pyspv 0.0.1-alpha - Python 3 Bitcoin SPV library Post by: gdassori on December 10, 2014, 10:06:11 AM I've spent some time, trying to understand the library layout, but I suppose I'm missing something.
I run a working wallet instance (is embarrassingly easy, Sarchar did an amazing work) and wanted to add some keys into it, to do this as far I've understand, I need to instance some pyspv' keys objects, but since pyspv doesn't have BIP0032 support, I chosen to mantain my pycoin keychain. While I've managed the PublicKey class: from pycoin (where I already instantiated a BIP32Node to build a BIP0032 keychain) Code: >>> w.subwallets[1]['key'].sec() to pyspv (where 'test' is an already running pyspv instance on mainnet) Code: >>> pk = keys.PublicKey(b'\x02\xc1\x1b\x18<\xb2S\x8f\xb9\x142N\x1b\x9fY\xd5\x9a1\x1c\xd9@\xea\x9ag\rJU\xe7\x08\xb6\xf8\x07b') ..using the SEC repr of a pubkey. I can't do the same with the PrivateKey: passing both .secret_exponent https://github.com/sarchar/pyspv/blob/master/pyspv/keys.py#L188 Title: Re: [ANN] pyspv 0.0.1-alpha - Python 3 Bitcoin SPV library Post by: bertani on December 10, 2014, 11:32:19 AM I can't do the same with the PrivateKey: passing both .secret_exponential() or .serialize() objects as PrivateKey secret doesn't return the expected values (a privkey' wif match). What the PrivateKey class is expecting as 'secret' ? ??? Code: pyspv.keys.PrivateKey(secret_exp_as_long.to_bytes(32, "big")) Title: Re: [ANN] pyspv 0.0.1-alpha - Python 3 Bitcoin SPV library Post by: Sarchar on December 16, 2014, 05:16:53 AM I can't do the same with the PrivateKey: passing both .secret_exponential() or .serialize() objects as PrivateKey secret doesn't return the expected values (a privkey' wif match). What the PrivateKey class is expecting as 'secret' ? ??? Code: pyspv.keys.PrivateKey(secret_exp_as_long.to_bytes(32, "big")) Right, the private key class takes an array of bytes (= the private key in big endian format). Thanks for checking out pyspv, I haven't put much work into it since because its announcement went quite unnoticed :( Title: Re: [ANN] pyspv 0.0.1-alpha - Python 3 Bitcoin SPV library Post by: Martijnvdc on December 16, 2014, 06:37:12 PM That's very interesting... Will you keep it exclusive to Python 3? No 2.X port?
I'm asking, because most software out there is still Python 2.X only. I'll try it out tomorrow. :) I have a 32-bit VM (Arch Linux server) which i can fool around with. Title: Re: [ANN] pyspv 0.0.1-alpha - Python 3 Bitcoin SPV library Post by: Sarchar on December 17, 2014, 02:37:21 AM That's very interesting... Will you keep it exclusive to Python 3? No 2.X port? I'm asking, because most software out there is still Python 2.X only. I'll try it out tomorrow. :) I have a 32-bit VM (Arch Linux server) which i can fool around with. I personally won't be porting it to 2.x. I really don't have an interest in maintaining that backwards compatability, tbh. If someone wants to submit a patch (and possibly maintain a 2.x-focused branch), I'll likely merge it. Title: Re: [ANN] pyspv 0.0.1-alpha - Python 3 Bitcoin SPV library Post by: fl0x23 on December 08, 2018, 11:57:10 AM Does the client still work? I receive the following error message.
Code: Traceback (most recent call last): |