MultiChain tooling
Deprecation notice
Consortium networks have been deprecated. This guide is for historical reference.
Interaction tools
Interact with your MultiChain nodes using JSON-RPC API.
Use curl or Postman to invoke MultiChain API methods.
The example below demonstrates how to get basic network information:
$ curl -H "Content-Type: application/json" \
-u user-name:pass-word-pass-word-pass-word
-d '{"method":"getinfo","params":[],"id":1}' \
https://nd-123-456-789.p2pify.com
{"result":{"version":"2.0","nodeversion":20000901,"protocolversion":20004,"chainname":"nw-123-456-7", ...}
Development tools
JavaScript
Work with MultiChain from your JavaScript application.
-
Install multinodejs.
-
Configure the client to use
host
of the node RPC endpoint and the corresponding RPCuser
andpass
:let multichain = require("multinodejs")({ host: "nd-123-456-789.p2pify.com", protocol: "https", user: "user-name", pass: "pass-word-pass-word-pass-word" });
-
Invoke any methods from the MultiChain API specification:
multichain.getInfo((err, info) => { if (err) { throw err; } console.log(info); });
The example code above should output basic network information:
{ version: '2.0', nodeversion: 20000901, protocolversion: 20004, chainname: 'nw-123-456-7', ... }
Python
Work with MultiChain from your Python application.
-
Install multichaincli.
-
Configure the client to use
host
andport
of the node RPC endpoint, the corresponding RPCusername
andpassword
and networkchainname
:from multichaincli import Multichain host = "nd-123-456-789.p2pify.com" port = "80" username = "user-name" password = "pass-word-pass-word-pass-word" chainname = "nw-123-456-7" multichain = Multichain(username, password, host, port, chainname)
-
Invoke any methods from the MultiChain API specification:
info = multichain.getinfo() print(info)
The example code above should output basic network information:
{'version': '2.0', 'nodeversion': 20000901, 'protocolversion': 20004, 'chainname': 'nw-123-456-7', ... }
Updated about 2 months ago