Closed mcandre closed 12 years ago
Have you setup bitcoin to listen for rpc commands or are you able to make any other api calls?
getInfo seems to work, but because the API is sparse and JavaScript doesn't print objects well, I have no idea what getInfo and other commands take as input or what they give as output. I know that they use callbacks, but not much beyond that.
For me, getInfo(function (err, data) { console.log("Data: " + data); }); prints "Data: Object", which isn't very useful at all.
Another source of confusion: Are the RPC credentials meant for some global Bitcoin server or to connect to my local server?
Yet another source of confusion: If I have my Bitcoin GUI working and set to a specific Bitcoin wallet, how do I set a bitcoind server to use that wallet? I'm guessing that I should use setAccount, but I have no idea of the syntax nor the semantics for such an operation.
Cheers,
Andrew Pennebaker www.yellosoft.us
On Wed, Feb 1, 2012 at 9:26 PM, Sean < reply@reply.github.com
wrote:
Have you setup bitcoin to listen for rpc commands or are you able to make any other api calls?
Reply to this email directly or view it on GitHub: https://github.com/jb55/node-bitcoin/issues/6#issuecomment-3771583
Most of your confusion stems from a lack of understanding about how Bitcoin and the Bitcoin client works, please don't create any more issues that are not directly related to node-bitcoin
.
If I have my Bitcoin GUI working and set to a specific Bitcoin wallet, how do I set a bitcoind server to use that wallet?
You can't have have two clients accessing the same wallet at the same time, I believe there is a lockfile created by the bitcoin client to prevent that.
console.log("Data: " + data); }); prints "Data: Object", which isn't very useful at all.
Try just printing the object by itself so it's not casted to a string:
console.log(data)
Another source of confusion: Are the RPC credentials meant for some global Bitcoin server or to connect to my local server?
Local server.
When I try your sample code, I get an error.
Example:
Trace: