Skip to main content

A simple library to store/retrieve information in bitcoin transactions using OP_RETURN.

Project description

A library to read/write data to bitcoin transactions as nulldata outputs.

Installation

pip install btctxstore

python usage

Store data in bitcoin blockchain in new transaction with nulldata output. Prints txid of transaction with stored data.

import json
from btctxstore import BtcTxStore
api = BtcTxStore()

privatekeys = json.dumps([privatekey_in_wif_format])
txid = api.store(hexdata, privatekeys, changeaddress)
print txid

Read data stored in bitcoin blockchain as nulldata output. Prints stored data in hex format.

from btctxstore import BtcTxStore
api = BtcTxStore()

hexdata = api.retrieve(txid)
print hexdata

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

btctxstore-1.0.0.tar.gz (7.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page