Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: [CLOSED][25,000 bips] bounty: Find node.js rpc library that takes full url  (Read 555 times)

0 Members and 1 Guest are viewing this topic.

Offline toast


Banging my head against a silly task...

https://github.com/nmushegian/dnschain/blob/master/src/lib/nmc.coffee#L33

@peer is defined here:

https://github.com/nmushegian/dnschain/blob/master/src/lib/nmc.coffee#L23

Notice you give a host and a port separately (they are defined here, but there's no way to specify "/rpc"! https://github.com/nmushegian/dnschain/blob/master/src/lib/config.coffee#L57)

Here is how to test the interface with curl:
Code: [Select]
curl --user user --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params": [] }' http://127.0.0.1:9989/rpc

Here's a 5 minute setup guide to have both .p2p and DNSchain running:
https://github.com/nmushegian/dns/blob/master/setup.md
« Last Edit: May 10, 2014, 09:09:57 PM by toast »
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline gamey

  • Hero Member
  • *****
  • Posts: 2253
    • View Profile
Re: [25,000 bips] bounty: Find node.js rpc library that takes full url
« Reply #1 on: May 04, 2014, 12:28:30 AM »

What happens if you just append the /rpc to the host ? 
I speak for myself and only myself.

Offline toast

Re: [25,000 bips] bounty: Find node.js rpc library that takes full url
« Reply #2 on: May 04, 2014, 12:32:39 AM »
It doesn't work. Hard to debug because it just gives you 'undefined' for any sort of error. No documentation anywhere. Nodejs is a baby

Sent from my SCH-I535 using Tapatalk

Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline gamey

  • Hero Member
  • *****
  • Posts: 2253
    • View Profile
Re: [25,000 bips] bounty: Find node.js rpc library that takes full url
« Reply #3 on: May 04, 2014, 12:44:30 AM »


Hmmm.   Maybe URLs aren't part of json/rpc ?  So you need to wrap a http lib (request) around the json-rpc  ? 

I mean it is remote procedure call..  Nothing there really suggests a URL.  All the code I am working on with that has the same approach.

BTW, if you ever think nodejs seems like a good all purpose language to write regular code with nested loops... Think long and hard before you go down that path.  I have been using nodejs on a project and it is great for servers, but then we started using it for tools and oh Lord what a headache.
I speak for myself and only myself.

Offline toast

Re: [25,000 bips] bounty: Find node.js rpc library that takes full url
« Reply #4 on: May 04, 2014, 01:11:59 AM »
It's someone else's tool, it's a DNS server that can look things up on a blockchain. Both the http and non-http json rpc's are served on /rpc, or so says the client.


Here's a 5 minute setup guide to have both .p2p and DNSchain running:
https://github.com/nmushegian/dns/blob/master/setup.md
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

Offline toast

Closing this but giving half the bounty to Derrick S because he did a bit of work towards this and is going to be doing more with us soon.
Do not use this post as information for making any important decisions. The only agreements I ever make are informal and non-binding. Take the same precautions as when dealing with a compromised account, scammer, sockpuppet, etc.

 

Google+