January 2019
Beginner to intermediate
372 pages
11h 17m
English
We'll be using a driver to communicate with the MultiChain node. MultiChain provides a JSON-RPC server that can be used to perform any blockchain operations that is needed.
In our use case, we'll be using a Python driver called Savoir, which will connect to the JSON-RPC server of the MultiChain node and invoke the requisite functions:
from Savoir import Savoir
class MultichainClient(object):
def __init__(self, **kwargs):
self.rpcuser = kwargs.get('rpcuser', 'multichainrpc')
self.rpcpasswd = kwargs.get('rpcpasswd', 'HFzmag67bJg2f4YuExgVDqQK5VfnvXRS5SKrByuCgiXm')
self.rpchost = kwargs.get('rpchost', 'localhost')
self.rpcport = kwargs.get('rpcport', '4416')
self.chainname = kwargs.get('chainname', 'chain1')
We will ...