https://github.com/chainstack/multichaincli
A Python wrapper for MultiChain JSON-RPC API
https://github.com/chainstack/multichaincli
cli json-rpc multichain python
Last synced: about 2 months ago
JSON representation
A Python wrapper for MultiChain JSON-RPC API
- Host: GitHub
- URL: https://github.com/chainstack/multichaincli
- Owner: chainstack
- License: bsd-3-clause
- Fork: true (DXMarkets/Savoir)
- Created: 2018-10-02T12:46:20.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-02-27T15:20:45.000Z (about 7 years ago)
- Last Synced: 2025-10-26T12:48:13.067Z (5 months ago)
- Topics: cli, json-rpc, multichain, python
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# multichaincli
[](https://circleci.com/gh/chainstack/multichaincli/tree/master)
[](https://badge.fury.io/py/multichaincli)
_python binding for Multichain, supports version 2_
## Description
Its heavy based on [python-bitcoinrpc](https://github.com/jgarzik/python-bitcoinrpc) and [Savoir](https://github.com/DXMarkets/Savoir) but adapted for Multichain server, and replacing the httplib by [requests](http://docs.python-requests.org/en/master/)
## Installation
multichaincli can be installed from
[PyPi](https://pypi.python.org/pypi) using
[pip](https://pypi.python.org/pypi/pip). Enter the following command
into terminal:
pip install multichaincli
Alternatively you can clone this public repository by entering the following
command into terminal.
git clone https://github.com/chainstack/multichaincli
## Usage
Once you've download the code you should install needed libs
python setup.py develop
Finally just use the [multichain api documentacion](http://www.multichain.com/developers/json-rpc-api/) and make calls to the wrapper.
Remember to replace the rpc variables with the information of your specific chain
```python
from multichaincli import Multichain
rpcuser = 'multichainrpc'
rpcpasswd = 'YoUrLoNgRpCpAsSwOrD'
rpchost = 'localhost'
rpcport = '22335'
chainname = 'myChain'
mychain = Multichain(rpcuser, rpcpasswd, rpchost, rpcport, chainname)
mychain.getinfo()
```