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.

  1. Install multinodejs.

  2. Configure the client to use host of the node RPC endpoint and the corresponding RPC user and pass:

    let multichain = require("multinodejs")({
        host: "nd-123-456-789.p2pify.com",
        protocol: "https",
        user: "user-name",
        pass: "pass-word-pass-word-pass-word"
    });
    
  3. 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.

  1. Install multichaincli.

  2. Configure the client to use host and port of the node RPC endpoint, the corresponding RPC username and password and network chainname:

    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)
    
  3. 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', ... }