/cca

Carbon Chain Adapter For Python

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Carbon Chain Python Adapter

Description

Cca is JsonRPC wrapper for Carbon Chain Its heavy based on python-bitcoinrpc but adapted for Carbon Chain server, and replacing the httplib by requests

Installation

Cca can be installed from PyPi using pip. Enter the following command into terminal:

pip install cca

Alternatively you can clone this public repository by entering the following command into terminal.

git clone https://github.com/upscaletech/cca

Usage

Once you've download the code you should install needed libs

sudo pip install -r requirements.txt

Finally just use the carbon chain api documentacion and make calls to the wrapper. Remember to replace the rpc variables with the information of your specific chain

from Cca import Cca
rpcuser = 'carbonchainrpc'
rpcpasswd = 'YoUrLoNgRpCpAsSwOrD'
rpchost = 'localhost'
rpcport = '22335'
chainname = 'myChain'

api = Cca(rpcuser, rpcpasswd, rpchost, rpcport, chainname)
api.getinfo()

License

This package is distributed under BSD License. See LICENSE