scoin / multichain-node

A simple wrapper for Multichain's JSON RPC api that parses your input.
MIT License
73 stars 54 forks source link

Not able to create streams #7

Closed iamdebu closed 7 years ago

iamdebu commented 7 years ago

I am trying to create stream using the below code:

"use strict"; let multichain = require("multichain-node")({ port: 6834, host: '127.18.0.4', user: "multichainrpc", pass: "sHMKQqLvPP3TgN5nRs7zmpqr75DkNeZ5ffMCoxMg84K" }); multichain.getInfo((err, info) => { if(err){ console.log(err) } //console.log(info); }); multichain.create((err, info) => { if(err){ console.log(err) } //console.log(info); })

But it is throwing the below issue:

TypeError: multichain.create is not a function at Object. (/home/gtoadmin/MultiChain/multichain-node/Node/CreateStream.js:14:12) at Module._compile (module.js:425:26) at Object.Module._extensions..js (module.js:432:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:311:12) at Function.Module.runMain (module.js:457:10) at startup (node.js:136:18) at node.js:972:3

Can you please help me out?

iamdebu commented 7 years ago

I was using wrong command.js file.