# Tools

# Interaction tools

Interact with your MultiChain nodes using JSON-RPC API (opens new window).

Use curl (opens new window) or Postman (opens new window) to invoke MultiChain API methods (opens new window).

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 (opens new window).

  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"
});
  1. Invoke any methods from the MultiChain API specification (opens new window):
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 (opens new window).

  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)
  1. Invoke any methods from the MultiChain API specification (opens new window):
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', ... }