Bitcoin Forum
April 26, 2024, 10:40:36 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: JSON-RPC step-by-step, help?  (Read 188 times)
Sinsix (OP)
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
October 20, 2019, 08:35:15 AM
 #1

Hello everyone.

Is there any step-by-step for JSON-RPC?

I have set up the .conf file:
server=1
rpcuser=bitcoin
rpcpassword=bitcoin

but I am completly lost what to do next, how to connect to it etc. Anyone?
1714128036
Hero Member
*
Offline Offline

Posts: 1714128036

View Profile Personal Message (Offline)

Ignore
1714128036
Reply with quote  #2

1714128036
Report to moderator
Be very wary of relying on JavaScript for security on crypto sites. The site can change the JavaScript at any time unless you take unusual precautions, and browsers are not generally known for their airtight security.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714128036
Hero Member
*
Offline Offline

Posts: 1714128036

View Profile Personal Message (Offline)

Ignore
1714128036
Reply with quote  #2

1714128036
Report to moderator
1714128036
Hero Member
*
Offline Offline

Posts: 1714128036

View Profile Personal Message (Offline)

Ignore
1714128036
Reply with quote  #2

1714128036
Report to moderator
1714128036
Hero Member
*
Offline Offline

Posts: 1714128036

View Profile Personal Message (Offline)

Ignore
1714128036
Reply with quote  #2

1714128036
Report to moderator
RHavar
Legendary
*
Offline Offline

Activity: 2557
Merit: 1886



View Profile
October 20, 2019, 03:52:44 PM
 #2

How are you trying to connect to it? Most programming language have a easy to use jsonrpc library, or even wrapper for bitcoin core api calls.

Check out gamblingsitefinder.com for a decent list/rankings of crypto casinos. Note: I have no affiliation or interest in it, and don't even agree with all the rankings ... but it's the only uncorrupted review site I'm aware of.
PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1610
Merit: 1899

Amazon Prime Member #7


View Profile
October 21, 2019, 10:59:26 PM
 #3


I have set up the .conf file:
server=1
rpcuser=bitcoin
rpcpassword=bitcoin
You need to change your rpcpassword to something random, and you should do the same for your rpcuser as well. If you don't, you will get robbed if you have any coin in your wallet used by bitcoin core.
BitMaxz
Legendary
*
Offline Offline

Activity: 3234
Merit: 2942


Block halving is coming.


View Profile WWW
October 21, 2019, 11:36:09 PM
 #4

There is a step by step tutorial on youtube that I think you can follow but it is Linux Based OS but you can follow the steps on how to do it.

Here's the videos: https://www.youtube.com/watch?v=cMM-t7azzJE&list=PLhWIQKZKupCawKJQBAEJc-Y4I30HQ6KBH


Also, check this for more guide on JSON-RPC from here https://bitcoin.org/en/developer-examples#testing-applications

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
PrimeNumber7
Copper Member
Legendary
*
Offline Offline

Activity: 1610
Merit: 1899

Amazon Prime Member #7


View Profile
October 22, 2019, 12:13:03 AM
 #5

I wrote a script in python to help you get started. You should be able to extrapolate the below into whatever you are trying to do

Code:
#warning: use at your own risk 

#dependencies
import requests
import json
import pandas as pd #this is technically not needed, but will probably be if you are to do any kind of analysis

#copy your rpcusername and rpcpassword from your bitcoin.conf file, and keep them inside the 'quotes'
rpcusername = ''
rpcpassword = ''
url = ('http://{0}:{1}@127.0.0.1:8332').format(rpcusername, rpcpassword)

#put the command you want to run here inside 'quotes'
command =

#put any parameters here, if you have none, put 'quotes' with no text ''
#if the parameter is an integer, do not use quotes, otherwise the parameters need to be in 'quotes'
params = ''

data = {'method':command, 'params':[params]}
result = requests.post(url, json=data).json()['result']
print(result)
100bitcoin
Sr. Member
****
Offline Offline

Activity: 860
Merit: 423


View Profile WWW
October 24, 2019, 06:56:47 PM
 #6

Hello everyone.

Is there any step-by-step for JSON-RPC?

I have set up the .conf file:
server=1
rpcuser=bitcoin
rpcpassword=bitcoin

but I am completly lost what to do next, how to connect to it etc. Anyone?

If you are using PHP, then make a JSON-RPC call to your node through cURL.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!