transactions: Bitcoin for Humans
transactions is a small python library to easily create and push transactions to the bitcoin network.
Installation
$ pip install transactions
Examples
Assuming the following cast of characters:
>>> alice = 'mhyCaF2HFk7CVwKmyQ8TahgVdjnHSr1pTv'
>>> bob = 'mqXz83H4LCxjf2ie8hYNsTRByvtfV43Pa7'
>>> carol = 'mtWg6ccLiZWw2Et7E5UqmHsYgrAi5wqiov'
Moving 10000 satoshis from alice to bob:
>>> from transactions import Transactions
>>> transactions = Transactions(testnet=True)
>>> tx = transactions.create(alice, (bob, 10000))
>>> tx_signed = transactions.sign(tx, 'alice master secret')
>>> transactions.push(tx_signed)
Moving 600 satoshis from bob to carol with a custom op_return:
>>> tx = transactions.create(bob, (carol, 600), op_return='HELLOFROMASCRIBE')
>>> tx_signed = transactions.sign(tx, 'bob master secret')
>>> transactions.push(tx_signed)
Check it out fbbd6407b8fc73169918b2fce7f07aff6a486a241c253f0f8eeb942937fbb970
With transactions all amounts are in satoshi and we currently only support BIP32 wallets (hierarchical deterministic wallets, aka “HD Wallets”).
Documentation
Contributing
Pull requests, feedback, and suggestions are welcome. Issues and pull requests are handled via github.
Background
This was developed by ascribe GmbH as part of the overall ascribe technology stack. https://www.ascribe.io
Copyright
This code is © 2015 ascribe GmbH.
Licensed under the Apache License, Version 2.0.
Metadata
Release files for transactions 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| transactions-0.2.0.tar.gz | 10.5 kB | Without provenance | Details |
Release files / transactions-0.2.0.tar.gz
| Download URL | transactions-0.2.0.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e94d9e3980c74b4c47f8e68d29afac22cfee9707738c83b2f8e8a1f48118999e
|
|
BLAKE2b-256 checksum How to use checksums |
1c1d1ce3ceaa3739666836ec5c58ffb8ea992831c8c3a90db4c49be6bf3f52ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for transactions 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.