Author

Topic: rpc.blockchain.info help rpc calls (Read 1130 times)

jr. member
Activity: 55
Merit: 1
May 26, 2014, 11:35:20 AM
#7
The regular API is simpler than the RPC API, but it only allows you to download blockchain data in a different format. Verifying a message is a bit more complicated and requires input (the message and signature), so it isn't available in that API. I suspect that there's an issue with the way you integrated the C# wrapper (which is for RPC), and I don't think the RPC API is accessible via web at all, though I may be mistaken on that count.

From looking at the documentation for Bitnet (which seems a bit old, using RPC version 1.0, though I may not have found the right one), I'm not sure it supports SSL, or the verifymessage command. Have you tried using "http://" and port 80 to see if it works without SSL?

Well I'm trying to do this all online, not running bitcoind on my computer, and I think that's where the problem is.  I've also tried it without bitnet.

If I have to do it running bitcoind on my computer, then I'll have to approach things differently (which is fine).
hero member
Activity: 508
Merit: 500
Techwolf on #bitcoin and Reddit
May 24, 2014, 11:53:37 PM
#6
The regular API is simpler than the RPC API, but it only allows you to download blockchain data in a different format. Verifying a message is a bit more complicated and requires input (the message and signature), so it isn't available in that API. I suspect that there's an issue with the way you integrated the C# wrapper (which is for RPC), and I don't think the RPC API is accessible via web at all, though I may be mistaken on that count.

From looking at the documentation for Bitnet (which seems a bit old, using RPC version 1.0, though I may not have found the right one), I'm not sure it supports SSL, or the verifymessage command. Have you tried using "http://" and port 80 to see if it works without SSL?
jr. member
Activity: 55
Merit: 1
May 24, 2014, 10:54:57 PM
#5
You don't need bitcoind for blocchain.info's RPC API, that was just to verify that everything (aside from your code) works. Something about the wrapper or the way you're performing the web request is causing your problem.

Their API does support the "verifymessage" command, scroll down to the bottom of the documentation page for the info:
Quote

    Method: verifymessage
    Parameters: (String bitcoinaddress, String signature, String message)
    Description: Verifies the signature and message matches the bitcoin address provided (See signmessage)
    Returns: Boolean


Also, you may want to take a look at this thread for verifying messages offline (without bitcoind), with libraries for several different languages: https://bitcointalksearch.org/topic/verifying-a-signed-message-without-a-bitcoin-client-installed-222992

Thanks, but there's a difference between blockchain's rpc API and regular api
var json = client.DownloadString("http://blockchain.info/address/" + address + "?format=json");
That one always works


hero member
Activity: 508
Merit: 500
Techwolf on #bitcoin and Reddit
May 24, 2014, 08:56:19 PM
#4
You don't need bitcoind for blocchain.info's RPC API, that was just to verify that everything (aside from your code) works. Something about the wrapper or the way you're performing the web request is causing your problem.

Their API does support the "verifymessage" command, scroll down to the bottom of the documentation page for the info:
Quote

    Method: verifymessage
    Parameters: (String bitcoinaddress, String signature, String message)
    Description: Verifies the signature and message matches the bitcoin address provided (See signmessage)
    Returns: Boolean


Also, you may want to take a look at this thread for verifying messages offline (without bitcoind), with libraries for several different languages: https://bitcointalksearch.org/topic/verifying-a-signed-message-without-a-bitcoin-client-installed-222992
jr. member
Activity: 55
Merit: 1
May 23, 2014, 11:30:15 PM
#3
Ok, that worked in dos, but I think where i'm getting confused is do I have to run bitcoind on my computer?
I thought this would be like a webapi call, not needing my computer.

Basically I want to verify a message using the verifymessage command.  But I want to do this in javascript in a web api call.  But this isn't a webapi call I guess? I'm guess that I'll need to run this on command line.

I've been using blockchain's api, but they don't have verifymessage in the web api commands.  Are there any free apis that have this?
hero member
Activity: 508
Merit: 500
Techwolf on #bitcoin and Reddit
May 23, 2014, 06:20:26 PM
#2
I just wanna do a get info

sorry this is c# wrapper, but
                        string host = "rpc.blockchain.info";
                        string port = "443";
                        string user = "xxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx";
                        string pwd = "myPasswordForBlockChain";

                    BitnetClient bc = new BitnetClient("https://" + host + ":" + port);
                    bc.Credentials = new NetworkCredential(user, pwd);
                    var jj = bc.GetInfo();

This is with the wrapper suggested, I also tried it without the wrapper and my own web request and it failed.

this is the response i get back:
{"error":{"message":"JSON-RPC method [getinfo] with 0 parameters not found.","code":-32601},"jsonrpc":"2.0"}

I really just want to use the verifymessage call, but I couldn't find a public API that did this.
And I don't want to run bitcoinqt or whatever on my machine.

Have you tried the getinfo command from a bitcoind instance to make sure it isn't an issue with your wrapper?

From blockchain.info's RPC API documentation:
Quote
$ ./bitcoind -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo
jr. member
Activity: 55
Merit: 1
May 23, 2014, 06:10:53 PM
#1
I just wanna do a get info

sorry this is c# wrapper, but
                        string host = "rpc.blockchain.info";
                        string port = "443";
                        string user = "xxxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx";
                        string pwd = "myPasswordForBlockChain";

                    BitnetClient bc = new BitnetClient("https://" + host + ":" + port);
                    bc.Credentials = new NetworkCredential(user, pwd);
                    var jj = bc.GetInfo();

This is with the wrapper suggested, I also tried it without the wrapper and my own web request and it failed.

this is the response i get back:
{"error":{"message":"JSON-RPC method [getinfo] with 0 parameters not found.","code":-32601},"jsonrpc":"2.0"}

I really just want to use the verifymessage call, but I couldn't find a public API that did this.
And I don't want to run bitcoinqt or whatever on my machine.
Jump to: