Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bht2016/transactions

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

114 Commits
114 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

https://readthedocs.org/projects/transactions/badge/?version=latest

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

https://transactions.readthedocs.org/

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.

About

📟 transactions: Bitcoin for humans

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 99.6%
  • Dockerfile 0.4%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.