Abiky (OP)
Legendary
Offline
Activity: 3192
Merit: 1362
www.Crypto.Games: Multiple coins, multiple games
|
|
October 21, 2016, 12:41:03 AM |
|
I'm trying to figure out how to send remote RPC calls from within my PC to a remote BTC full node. All I know is that I can set the RPC port, username and password, but when I try to access it via a web browser (by typing its ip address) and put in the login details, I get an error message. So how exactly does this work? I just want to be able to control a remote full node from my PC just by specifying the commands like: getpeerinfo and dumpprivkey. Is there something that I may have missed? Please help, as I'm a little confused with this.
|
|
|
|
|
|
"In a nutshell, the network works like a distributed
timestamp server, stamping the first transaction to spend a coin. It
takes advantage of the nature of information being easy to spread but
hard to stifle." -- Satoshi
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
achow101
Staff
Legendary
Offline
Activity: 3388
Merit: 6635
Just writing some code
|
|
October 21, 2016, 12:45:45 AM |
|
The RPC calls work in the same way other HTTP APIs work where you have to provide data. You must use HTTP post requests. It isn't something you access through the browser.
You can use the bitcoin-cli program which will do everything for you and you use it like you do with the debug console. Or you can get some program that can do HTTP post requests (e.g. curl) and then send a JSON encoded HTTP Post request to call an RPC command. The bitcoind will respond with the output.
|
|
|
|
OgNasty
Donator
Legendary
Offline
Activity: 4732
Merit: 4248
Leading Crypto Sports Betting & Casino Platform
|
|
October 21, 2016, 02:02:19 AM |
|
This video shows how easy it is to use the provided tools with python to handle calls locally. I don't think using dumpprivkey from remote nodes would be considered the best security practice. https://www.youtube.com/watch?v=3xAO4K7FC6E
|
..Stake.com.. | | | ▄████████████████████████████████████▄ ██ ▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ ██ ▄████▄ ██ ▀▀▀▀▀▀▀▀▀▀ ██████████ ▀▀▀▀▀▀▀▀▀▀ ██ ██████ ██ ██████████ ██ ██ ██████████ ██ ▀██▀ ██ ██ ██ ██████ ██ ██ ██ ██ ██ ██ ██████ ██ █████ ███ ██████ ██ ████▄ ██ ██ █████ ███ ████ ████ █████ ███ ████████ ██ ████ ████ ██████████ ████ ████ ████▀ ██ ██████████ ▄▄▄▄▄▄▄▄▄▄ ██████████ ██ ██ ▀▀▀▀▀▀▀▀▀▀ ██ ▀█████████▀ ▄████████████▄ ▀█████████▀ ▄▄▄▄▄▄▄▄▄▄▄▄███ ██ ██ ███▄▄▄▄▄▄▄▄▄▄▄▄ ██████████████████████████████████████████ | | | | | | ▄▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▄ █ ▄▀▄ █▀▀█▀▄▄ █ █▀█ █ ▐ ▐▌ █ ▄██▄ █ ▌ █ █ ▄██████▄ █ ▌ ▐▌ █ ██████████ █ ▐ █ █ ▐██████████▌ █ ▐ ▐▌ █ ▀▀██████▀▀ █ ▌ █ █ ▄▄▄██▄▄▄ █ ▌▐▌ █ █▐ █ █ █▐▐▌ █ █▐█ ▀▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▀█ | | | | | | ▄▄█████████▄▄ ▄██▀▀▀▀█████▀▀▀▀██▄ ▄█▀ ▐█▌ ▀█▄ ██ ▐█▌ ██ ████▄ ▄█████▄ ▄████ ████████▄███████████▄████████ ███▀ █████████████ ▀███ ██ ███████████ ██ ▀█▄ █████████ ▄█▀ ▀█▄ ▄██▀▀▀▀▀▀▀██▄ ▄▄▄█▀ ▀███████ ███████▀ ▀█████▄ ▄█████▀ ▀▀▀███▄▄▄███▀▀▀ | | | ..PLAY NOW.. |
|
|
|
franky1
Legendary
Online
Activity: 4214
Merit: 4475
|
|
October 21, 2016, 03:12:07 AM |
|
RPC calls are primarily used for your webserver or other applications to get data from YOUR bitcoin client. if YOUR bitcoin client is not set up to accept the connection from an application, then it wont work if you just want to get data from "the web". then use the API calls from some bitcoin explorers such as blockchain.info/api https://blockexplorer.com/api-refhttp://blockr.io/documentation/apibut this is not for full wallet access of those websites, just the block data stuff but as someone said. opening general access to things like dumpprivkey on YOUR client is bad due to hackers then possibly trying to get at your client to grab your keys. however i have a strange feeling you are subtly asking this question in the OP, not learn how to set up YOUR client to allow a connection, but how to remotely 'hack' into any client to grab a privkey of a client without them having to open it up to full remote access. thus subtly asking how to create a hacking tool
|
I DO NOT TRADE OR ACT AS ESCROW ON THIS FORUM EVER. Please do your own research & respect what is written here as both opinion & information gleaned from experience. many people replying with insults but no on-topic content substance, automatically are 'facepalmed' and yawned at
|
|
|
CrazyCraig
Sr. Member
Offline
Activity: 501
Merit: 340
Bye Felisha!
|
|
October 21, 2016, 03:32:08 AM Last edit: October 23, 2016, 04:29:05 AM by CrazyCraig |
|
I'm trying to figure out how to send remote RPC calls from within my PC to a remote BTC full node. All I know is that I can set the RPC port, username and password, but when I try to access it via a web browser (by typing its ip address) and put in the login details, I get an error message. So how exactly does this work? I just want to be able to control a remote full node from my PC just by specifying the commands like: getpeerinfo and dumpprivkey. Is there something that I may have missed? Please help, as I'm a little confused with this. Also make sure your firewall isn't blocking the RPC outbound port.
|
|
|
|
Abiky (OP)
Legendary
Offline
Activity: 3192
Merit: 1362
www.Crypto.Games: Multiple coins, multiple games
|
|
October 22, 2016, 10:43:52 PM |
|
The RPC calls work in the same way other HTTP APIs work where you have to provide data. You must use HTTP post requests. It isn't something you access through the browser.
You can use the bitcoin-cli program which will do everything for you and you use it like you do with the debug console. Or you can get some program that can do HTTP post requests (e.g. curl) and then send a JSON encoded HTTP Post request to call an RPC command. The bitcoind will respond with the output.
Great! Thanks for the information. I thought that it was something that could be accessed via the web browser by simply adding the necessary details. Just wanted to know more about this since I want to make my own Bitcoin web application. This video shows how easy it is to use the provided tools with python to handle calls locally. I don't think using dumpprivkey from remote nodes would be considered the best security practice. https://www.youtube.com/watch?v=3xAO4K7FC6EThanks for the video, mate. It will be of great use to me since I'm very familiar with using Python. My purpose would be more of making a web application using JavaScript that would send RPC calls to the Bitcoin daemon in order to make wallet addresses, deposit BTC, and more (it would be more of like an RPG game). But still, the video above would be very useful for me in case I decide to make a local application from within Python. @everyone Thanks guys for all your help. All of this material has greatly helped me into clearing most of my doubts regarding making RPC calls remotely in order to make my own apps with them.
|
|
|
|
CrazyCraig
Sr. Member
Offline
Activity: 501
Merit: 340
Bye Felisha!
|
|
October 23, 2016, 04:29:44 AM |
|
The RPC calls work in the same way other HTTP APIs work where you have to provide data. You must use HTTP post requests. It isn't something you access through the browser.
You can use the bitcoin-cli program which will do everything for you and you use it like you do with the debug console. Or you can get some program that can do HTTP post requests (e.g. curl) and then send a JSON encoded HTTP Post request to call an RPC command. The bitcoind will respond with the output.
Great! Thanks for the information. I thought that it was something that could be accessed via the web browser by simply adding the necessary details. Just wanted to know more about this since I want to make my own Bitcoin web application. This video shows how easy it is to use the provided tools with python to handle calls locally. I don't think using dumpprivkey from remote nodes would be considered the best security practice. https://www.youtube.com/watch?v=3xAO4K7FC6EThanks for the video, mate. It will be of great use to me since I'm very familiar with using Python. My purpose would be more of making a web application using JavaScript that would send RPC calls to the Bitcoin daemon in order to make wallet addresses, deposit BTC, and more (it would be more of like an RPG game). But still, the video above would be very useful for me in case I decide to make a local application from within Python. @everyone Thanks guys for all your help. All of this material has greatly helped me into clearing most of my doubts regarding making RPC calls remotely in order to make my own apps with them. Not a problem. If you need help with anything reach out.
|
|
|
|
Sorrowfox
|
|
October 23, 2016, 06:08:08 AM |
|
As an analogy, RPC works as a function call. Like a function call, when an RPC is made, the calling arguments are passed to the remote machine and the caller waits for a response to be returned from the remote machine.The client machine makes a procedure call that sends a request which included program number, version number, procedure number & etc to the server and waits. The thread is blocked from processing until either a reply is received, or it times out. When the request arrives, the remote machine calls a dispatch routine that performs the requested service, and sends the reply back to the client procedure. After the RPC call is completed, the client program continues.
|
|
|
|
Abiky (OP)
Legendary
Offline
Activity: 3192
Merit: 1362
www.Crypto.Games: Multiple coins, multiple games
|
|
October 24, 2016, 04:31:06 PM |
|
As an analogy, RPC works as a function call. Like a function call, when an RPC is made, the calling arguments are passed to the remote machine and the caller waits for a response to be returned from the remote machine.The client machine makes a procedure call that sends a request which included program number, version number, procedure number & etc to the server and waits. The thread is blocked from processing until either a reply is received, or it times out. When the request arrives, the remote machine calls a dispatch routine that performs the requested service, and sends the reply back to the client procedure. After the RPC call is completed, the client program continues.
Good to know. Thanks a lot mate for this useful explanation about RPC calls. With this, I would be able to make my own Bitcoin apps that would use Bitcoin's functions like creating multi-sig addresses, viewing peer stats, and more. It would be more of like an RPG game where it pays you satoshi after a minimum amount has been reached. You could also choose to buy upgrades for your character, and many more using Bitcoin. Basically, I find Python a lot easier for this but I would also look into making an online wallet for an altcoin, as most alts have the same RPC commands as Bitcoin.
|
|
|
|
katiecbell
|
|
October 25, 2016, 05:23:13 AM |
|
The RPC calls work in the same way other HTTP APIs work where you have to provide data. You must use HTTP post requests. It isn't something you access through the browser.
You can use the bitcoin-cli program which will do everything for you and you use it like you do with the debug console. Or you can get some program that can do HTTP post requests (e.g. curl) and then send a JSON encoded HTTP Post request to call an RPC command. The bitcoind will respond with the output.
Do yo mean we cannot access through browser at all ? This your explanation sounds too technical, I like request you to put in more possible explanation so that everyone whether tech savvy or not will easily get how RPC calls work...
|
|
|
|
qwik2learn
|
|
October 25, 2016, 05:33:39 AM |
|
The RPC calls work in the same way other HTTP APIs work where you have to provide data. You must use HTTP post requests. It isn't something you access through the browser.
You can use the bitcoin-cli program which will do everything for you and you use it like you do with the debug console. Or you can get some program that can do HTTP post requests (e.g. curl) and then send a JSON encoded HTTP Post request to call an RPC command. The bitcoind will respond with the output.
Great! Thanks for the information. I thought that it was something that could be accessed via the web browser by simply adding the necessary details. Just wanted to know more about this since I want to make my own Bitcoin web application. Hey, what do you know! achow101 has written some code that you could re-use for your project! https://bitcointalk.org/index.php?topic=1458929.0It's great stuff, don't miss it! Maybe you could tip us both for the time that it saved you.
|
|
|
|
Abiky (OP)
Legendary
Offline
Activity: 3192
Merit: 1362
www.Crypto.Games: Multiple coins, multiple games
|
|
October 31, 2016, 06:49:09 PM |
|
Great. Thanks mate! This might be very useful for the little project I'm working on. It will consist of several Raspberry Pis with different power sources in order to determine the most efficient energy solution. Some of those Pis will be used for Bitcoin app development, but the majority would be for crypto currency mining and full nodes for them too. It is good to know about new stuff everyday. P.S. If I had some BTC, I would send you a tip, but right now I'm all out since I have invested most of the BTC into ICOs.
|
|
|
|
|