Author: Jeff Garzik 2014-03-15 16:47:53
Published on: 2014-03-15T16:47:53+00:00
Peter Todd, a Bitcoin core developer, has released v0.1 of his Python2/3 library for an easy interface to the bitcoin data structures and protocol. The approach is low-level and “ground up,” with a focus on providing tools to manipulate the internals of how Bitcoin works in a Pythonic way without straying far from the Bitcoin Core implementation. The current status of the library as of v0.1 is that the support for data-structures related to transactions, scripting, addresses, and keys are all quite usable and the API is probably not going to change that much. Bitcoin Core RPC support is included and automatically converts the JSON to/from Python objects when appropriate. EvalScript(), VerifyScript(), and SignatureHash() are all functional and pass all the Bitcoin Core unittests, as well as a few that are still yet to be merged. You will find some examples for signing pay2script-hash and p2sh txouts in the examples/ directory; Todd personally used the transaction signing functionality to make up a set of unittests related to OP_CODESEPARATOR and FindAndDelete() recently. Finally, his dust-b-gone script is another good example, specifically of the RPC functionality.
Updated on: 2023-06-08T15:02:27.750114+00:00