Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: cfbtcman on September 02, 2019, 02:29:49 AM



Title: blockchain.com and RPC
Post by: cfbtcman on September 02, 2019, 02:29:49 AM
Hello,

I dont know if this is the right topic but here i go...

Id like to use blockchain.com RPC:

https://www.blockchain.com/el/api/json_rpc_api

This way o dont need to use a full-node right?

I never installed a node so my doubt is, to use blockchain.com RPC like in this example:

$ ./bitcoin-cli -rpcconnect=rpc.blockchain.info -rpcport=443 -rpcssl -rpcuser=YourWalletIdentifier -rpcpassword=YourPassword getinfo

I need to install bitcoind/bitcoin-cli or just bitcoin-cli ?


Title: Re: blockchain.com and RPC
Post by: achow101 on September 02, 2019, 02:47:10 PM
Please do not necropost. I have split your post into its own thread.



It looks like blockchain.com is supporting several out of date RPCs. Depending on the version of bitcoin-cli you are using, some commands may not work.

I need to install bitcoind/bitcoin-cli or just bitcoin-cli ?
You only need bitcoin-cli, but it is not a separate binary that you can download. bitcoin-cli is part of the standard Bitcoin Core installer package so you will also end up installing bitcoind too.


Title: Re: blockchain.com and RPC
Post by: cfbtcman on September 02, 2019, 11:10:53 PM

You only need bitcoin-cli, but it is not a separate binary that you can download. bitcoin-cli is part of the standard Bitcoin Core installer package so you will also end up installing bitcoind too.


Thank you for the answer.

You know if its possible to install bitcoind/bitcoin-cli without downloading any blocks/blockchain and only use bitcoind/bitcoin-cli to interact with blockchain.com node?


Title: Re: blockchain.com and RPC
Post by: achow101 on September 02, 2019, 11:48:24 PM
Thank you for the answer.

You know if its possible to install bitcoind/bitcoin-cli without downloading any blocks/blockchain and only use bitcoind/bitcoin-cli to interact with blockchain.com node?
Yes. By just not starting bitcoind, you won't download any blocks whatsoever.


Title: Re: blockchain.com and RPC
Post by: cfbtcman on September 03, 2019, 01:41:18 AM
Thank you for the answer.

You know if its possible to install bitcoind/bitcoin-cli without downloading any blocks/blockchain and only use bitcoind/bitcoin-cli to interact with blockchain.com node?
Yes. By just not starting bitcoind, you won't download any blocks whatsoever.

In the process of installation it dont start automatically ?


Title: Re: blockchain.com and RPC
Post by: achow101 on September 03, 2019, 02:20:06 AM
In the process of installation it dont start automatically ?
No, it does not. You have the option of starting it after installation (depending on your system), but you can just opt out of that (it's a checkbox). Bitcoin Core does not need to run during installation.


Title: Re: blockchain.com and RPC
Post by: cfbtcman on September 03, 2019, 03:21:53 AM
In the process of installation it dont start automatically ?
No, it does not. You have the option of starting it after installation (depending on your system), but you can just opt out of that (it's a checkbox). Bitcoin Core does not need to run during installation.

Id like to install it without GUI, its possible?


Title: Re: blockchain.com and RPC
Post by: achow101 on September 03, 2019, 02:24:18 PM
Id like to install it without GUI, its possible?
Yes. IIRC the only installer that has the option of starting after install is the Windows installer.

Even if it does start after install, just watch ps (on linux) or whatever task/activity/process manager comes with your OS and check that neither bitcoind nor bitcoin-qt is running. If it is, you can kill it and just delete the datadir. It takes a while to download the blockchain, so if you kill it within a few minutes of starting, it won't have downloaded much.

What OS are you trying to install on?


Title: Re: blockchain.com and RPC
Post by: cfbtcman on September 03, 2019, 07:20:54 PM
Ubuntu Server or Raspbian.

I read that there is some bitcoin.conf file you know if i need special configuration in that file to just connect blockchain.com RPC?



Title: Re: blockchain.com and RPC
Post by: achow101 on September 03, 2019, 10:08:07 PM
Ubuntu Server or Raspbian.
You can install the snap package (https://snapcraft.io/bitcoin-core) or  download the linux tarball (https://bitcoincore.org/en/download/) and extract it. Either way, the blockchain won't be downloaded nor will Bitcoin Core automatically start after installing.

I read that there is some bitcoin.conf file you know if i need special configuration in that file to just connect blockchain.com RPC?
The bitcoin.conf file is used to store command line arguments so you don't have to keep typing them. In order to use blockchain.com's RPC, you have to provide specific command line arguments. If you instead put them in a bitcoin.conf file that is in the default datadir location (~/.bitcoin), then using bitcoin-cli without command line options will use the options in the conf file. Otherwise there is no need for the bitcoin.conf file.


Title: Re: blockchain.com and RPC
Post by: cfbtcman on September 04, 2019, 12:56:40 AM
Humm, so bitcoin.conf is like one autoexec.bat, in this case i should install bitcoind and then i just need to use bitcoin-cli and thats all?


Title: Re: blockchain.com and RPC
Post by: achow101 on September 04, 2019, 06:15:57 PM
Humm, so bitcoin.conf is like one autoexec.bat, in this case i should install bitcoind and then i just need to use bitcoin-cli and thats all?
Yes.


Title: Re: blockchain.com and RPC
Post by: btj on September 04, 2019, 06:57:46 PM
Humm, so bitcoin.conf is like one autoexec.bat, in this case i should install bitcoind and then i just need to use bitcoin-cli and thats all?
Yes.

Using BITCOIND RPC require interacting with the Blockchain, and therefor downloading entire Blockchain is required before starting accepting Bitcoin Payments.

Or I am wrong ?

And the goal of OP from what I read, is to use RPC API in order to interact with the blockchain without the need to download it completely.

In this case, he is looking for a free API to handle that for him, so blockchain.com is good for that, you can also check coinpayments to accept more than 60+ cryptocurrencies.


Title: Re: blockchain.com and RPC
Post by: achow101 on September 04, 2019, 10:21:36 PM
Using BITCOIND RPC require interacting with the Blockchain, and therefor downloading entire Blockchain is required before starting accepting Bitcoin Payments.

Or I am wrong ?
You are wrong and it is clear you didn't read the thread at all. OP can use bitcoin-cli to interact with blockchain.com's RPC interface which they made to be compatible with Bitcoin Core's. Installing bitcoind does not run bitcoind nor does it download the blockchain. He isn't using bitcoind at all. bitcoin-cli doesn't need access to the blockchain either, it's just a dumb client.


Title: Re: blockchain.com and RPC
Post by: darkv0rt3x on September 05, 2019, 08:17:44 AM
Hi.

I also have a question about this interaction with blockchain.com interface.

The command syntax also expects an rpcuser and RPC password. Where we get this user and password? Or is it auto-generated in case it is not explicitly passed to the command?


Title: Re: blockchain.com and RPC
Post by: cfbtcman on September 05, 2019, 09:17:04 PM
Hi.

I also have a question about this interaction with blockchain.com interface.

The command syntax also expects an rpcuser and RPC password. Where we get this user and password? Or is it auto-generated in case it is not explicitly passed to the command?

You get that in the blockchain.com website, they supply you with one API key.