Login
Register
All Activity
Questions
Unanswered
Tags
Users
Ask a Question
Welcome to the Developer Q&A for the
MultiChain
blockchain platform.
Please feel free to ask questions about the platform to receive answers from the MultiChain developers or other members of the community.
Related questions
Connect rpc to a node in my ubuntu server from local machine using node js
Connect via RPC to multichain node
Node.js module to talk to multichain CLI
Need help to connect a HTML page with Multichain-node
How to view the image in offchain data on second node
4,157
questions
4,370
answers
5,718
comments
Most popular tags
multichain
streams
assets
stream
transactions
json-rpc
blockchain
wallet
permissions
error
address
raw-transactions
asset
mining
node
api
issue
multichain-explorer
nodes
connect
multichaind
multisig
transaction
smart-filters
metadata
private-key
atomic-exchange
multichain-cli
multichain-web-demo
data
connection
performance
blocks
demo
web
json
database
storage
native-currency
bitcoin
private-blockchain
network
fee
smart-contracts
wallets
signrawtransaction
off-chain
exchange
multiple-nodes
getnewaddress
Connect to a node in nodejs
+3
votes
I am creating an application where I am issuing assets to an address by filling up a form but to issue that I need to connect to that chain first. How can we connect to that chain in node js?
Thanks in advance.
nodejs
connect
multichain-cli
chain
asked
Jul 18, 2017
by
Dimple Kanwar
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1 Answer
+2
votes
Hi,
I am not thoroughly clear what you are asking, but you should look up the following JSON RPC API libraries that work with Node.js:
1.
https://www.npmjs.com/package/bitcoin-promise
2.
https://github.com/freewil/node-bitcoin
R.
answered
Jul 18, 2017
by
Rosevelt
But in these link,I don't see chain name with which we are connecting in the connection configuration.
What I am trying to do is:
I am creating a chain in a particular data directory using multichain-util
then, I am starting that chain in background
Then, I am calling all the multichain-cli commands from UI.
How can I connect my UI application with that chain which I created in above steps? Or do we always have to use RPC to connect? What is the demo application and chain are on the same machine, then also shall I use RPC?Where do we specify chain name?
You mean you want to call the multichain-cli commands from the UI of your application? Then you should use RPC to connect to the chain from your application (using one of those links for a node.js app) even if the application and chain are on the same machine - this is the interface Multichain provides for applications to access the blockchain.
As for the chain name, it is not necessary to specify one, since each blockchain runs on unique ports (so there would not be conflict even if you are running multiple on a node).
R.
Thanks.
If I create a multichain network on one machine, I get the RPC username and rpcpassword. If another machine wants to connect to that network, Which RPC credentials should be used? or the first machine has to share the RPC username and rpcpassword with the another machine?
Each node has its own different RPC credentials.
Please
log in
or
register
to add a comment.
...