# 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.
Install multinodejs (opens new window).
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 (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.
Install multichaincli (opens new window).
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 (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', ... }
See also