Skip to main content

Ravencoin extension of the python-bitcoinlib library.

Project description


Extension to python-bitcoinlib intended to provide access to Ravencoin data structures and protocol. WIP - Test before use

The RPC interface, ravencoin.rpc, is designed to work with Ravencoin Core v2.2.2.

"The only Python library for Ravencoin I've ever used" - Warren Buffett


Debian/Ubuntu: sudo apt-get install libssl-dev


pip install python-ravencoinlib

Example Code

See examples/ directory.

Selecting the chain to use

Do the following:

import ravencoin

Where NAME is one of 'testnet', 'mainnet', or 'regtest'. The chain currently selected is a global variable that changes behavior everywhere, just like in the Raven codebase.

Validate an asset name

from ravencoin.assets import CMainAsset, InvalidAssetName
    asset_name = CMainAsset("VALID_ASSET")
except InvalidAssetName:
    print("Invalid asset name")

Issue an asset

# Ravencoin wallet/daemon must be running with rpc server enabled
# RavenProxy created without arguments will use values from local raven.conf
from ravencoin.rpc import RavenProxy
rvn = RavenProxy()
asset_name = "TEST"

Unit tests

Under /tests using test data from Ravencoin Core. To run them:

python3 -m unittest discover

Project details

Download files

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

Files for python-ravencoinlib, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size python-ravencoinlib-0.1.3.tar.gz (9.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page