2022 Developer Survey is open! Take survey.

Questions tagged [json-rpc]

This tag should be used for questions relating to the Bitcoin Core/bitcoind JSON-RPC interface.

Filter by
Sorted by
Tagged with
0 votes
1 answer
9 views

Using bitcoind json-rpc with multiple wallets

Since some time bitcoind can have more wallets, there are commands: https://bitcoincore.org/en/doc/22.0.0/rpc/wallet/loadwallet/ and https://bitcoincore.org/en/doc/22.0.0/rpc/wallet/listwallets/ Does ...
user avatar
0 votes
1 answer
20 views

Will remote RPC under http expose the rpcusername and rpcpassword?

I'm confused with the examples of contacting bitcoin-cli as the examples always show sending user name:pass to http does this expose the name:pass? This command: (I modified the help example from ...
user avatar
1 vote
1 answer
170 views

Can I use the Bitcoin Core CLI to learn the block height at which a transaction was mined?

I am interested in figuring out at what height a transaction was mined, but I cannot find the right command to extract this information. Perhaps it's not possible? My Bitcoin Core was not involved as ...
user avatar
3 votes
0 answers
21 views

Problems with multiple wallets on RPC in bitcoin-core

I have been playing around a bit with Bitcoin Core (version 23.0), more specifically connecting to different wallets in Bitcoin Core through RPC in Python. I have found this library and tried to ...
user avatar
0 votes
1 answer
18 views

Same blockhash that appears more times in a bitcoind’s rpc call listsinceblock transaction returned json

Let's suppose that listsinceblocks return a json like this: { "transactions": [ { "involvesWatchonly": true, "account": "", "...
user avatar
1 vote
1 answer
30 views

Consider only deposits in a bitcoind’s RPC call listsinceblock transaction returned JSON

I have a JSON result of a bitcoind’s RPC call listsinceblock. There are 4 categories of transaction: "send" means transactions sent "receive" means non-coinbase transactions ...
user avatar
0 votes
1 answer
23 views

Can a receive transaction be 0 in a bitcoind’s rpc call listsinceblock transaction returned json?

Suppose that I want to check all the valid deposits of the results of bitcoind’s rpc call listsinceblock transactions, can I found a ‘receive’ transactions with ‘amount’ as 0? Should I consider that ...
user avatar
1 vote
0 answers
19 views

How to check whether bitcoin is deposited or not with RPC API?

I am developing a new feature in my website that raises a user's level when they deposit to a new bitcoin address. Using RPC API, I was successful in creating a new wallet address and printing it on ...
user avatar
0 votes
1 answer
17 views

What does getnewaddress return

The address generated by getnewaddress RPC is associated to a wallet that the user possesses or is it a random address not necessarily belonging to user ?
user avatar
0 votes
2 answers
53 views

RPC port 8332 not accessible after reboot

I have compiled and installed Bitcoin Core for the first time on Debian 11. Everything is up and running except that RPC port 8332 is not accessible after a reboot. I get the following error running ...
user avatar
0 votes
0 answers
19 views

Increase performance of RPC and ZeroMQ in bitcoin-core

I am interested in the possibility of increasing performance of my Bitcoin Core RPC and ZeroMQ subsystems. I know there is a setting for controlling the number of threads used by the RPC process, ...
user avatar
0 votes
1 answer
31 views

What does the Bitcoin Core RPC createmultisig do? Should it be deprecated?

What does the Bitcoin Core RPC createmultisig do? What would I use it for? Should it be deprecated?
user avatar
0 votes
2 answers
101 views

Generating bitcoin core -rpcauth argument using golang

We're developing a Blockchain deployment solution kotal, and generating -rpcauth argument from the supplied user name and password. The problem is when we try to use the same user and password using ...
user avatar
  • 853
1 vote
1 answer
31 views

Is it possible to set multiple JSON-RPC users?

I am passing multiple -rpcuser and -rpcpassword options, but the last user is the one that's working ! I was assuming that I can set multiple JSON-RPC users.
user avatar
  • 853
0 votes
0 answers
33 views

Bitcoin Core RPC in Online Shop - Wallet file not specified error when making purchase

I have my shop website connected to my server running Bitcoin core. If someone makes a purchase, the following error occurs. I don't know where to specify the wallet file as a purchase would happen ...
user avatar
  • 1
1 vote
1 answer
36 views

C-lightning configuration to use bitcoin blockchain data from another machine

I currently run a lightning node on umbrel on a raspberry pi. I want to experiment with c-lightning and want to run a new c-lightning node on my ubuntu laptop which utilizes the blockchain data from ...
user avatar
  • 41
1 vote
1 answer
118 views

Bitcoin RPC not reachable: Cant bind RPC server to IPV6

I tried every different combination in bitcoin.conf to make my bitcoin node (hosted in AWS protected behind VPN) reachable but nothing seems to work... Just to clear it out of the way, I opened the ...
user avatar
  • 113
1 vote
1 answer
76 views

How to generate a public key in wallet rpc commands

I'm trying to generate a public key associated with a wallet. How would I do this using the wallet rpc commands, I couldn't find a command in reference docs which does this. Thanks.
user avatar
  • 121
1 vote
1 answer
38 views

What is the correct syntax when specifying the utxos to be used in c-lightning's `withdraw`?

I tried to withdraw from one utxo with the following command: lightning-cli -k withdraw destination=bc1********** satoshi=******* feerate=normal utxos='["********":"0"]' and I got ...
user avatar
0 votes
1 answer
69 views

Is there any web3.py equivalent for Bitcoin?

Is there a good python library to connect to my locally running bitcoin node and query it? Such as view data block by block, txs, network difficulty at the time of each block, and other parameters? ...
user avatar
  • 33
1 vote
2 answers
85 views

Is the 'Remote' In 'Remote Procedural Call' something of a misnomer?

My understanding of an RPC is that Bitcoin-qt (client) will send an RPC to bitcoind (or an instance of bitcoind on another machine if the configuration settings are changed to make that happen) and ...
user avatar
2 votes
1 answer
58 views

RPC getblockstats call using genesis block

I am running a full node, bitcoin core 22. It is not in pruned mode. But when I try to run RPC getblockstats call I get this. $ bitcoin-cli getblockstats 0 ...
user avatar
0 votes
1 answer
117 views

How to run Bitcoin-Qt over RPC to another machine

I have a full node running bitcoind on computer A. On computer B I have bitcoin-cli setup to connect to computer A over RPC. Computer A is a headless machine. I don't want to re-download the chain ...
user avatar
  • 140
0 votes
1 answer
133 views

Get Address from pubkey scriptPubKey

Given that address is a "convenience" field, it makes sense that it is not provided by default in many transactions. However, it seems to be possible to extract address from hex. I am ...
user avatar
  • 127
0 votes
0 answers
19 views

JSON errors signing transaction

I am a beginner and have been having issues creating a rawtransaction. There is no error log so it's sometimes difficult to know where the error lies. I have this tx that I want to send on Testnet, ...
user avatar
1 vote
1 answer
58 views

Correct way to implement bitcoin:<address> URI handling in Gnome desktop

I run bitcoin-qt all the time, so I set the browser to handle bitcoin: URI with bitcoin-qt. Unfortunately that causes a new instance to be started, which fails coz it fails to get a lock on the ...
user avatar
  • 161
0 votes
1 answer
52 views

Weird Bitcoin RPC listreceivedbyaddress behaviour

Everything was done on regtest network. So I've generated a new address using getrawchangeaddress on wallet 2 and made a 0.1 BTC transaction from wallet 1 to wallet 2 and tried check this address ...
user avatar
  • 3
0 votes
2 answers
108 views

MerkleRoot requires transaction hash to build a merkle tree.... Is that the "hash" key/value within the getblocktemplate response or the "data"?

I've created a function for parsing Json Objects and values and just when I think nothing can stop me, just when I feel like I'm the king of the blockchain and I can finally join in on the mining race ...
user avatar
0 votes
1 answer
41 views

Not able to verify tor setup for RPC

I'm currently in chapter 14.1 (verify your tor setup) of the learning bitcoin from the command line course by blockchaincommons. I don't get my head around doing the actual RPC verification via ...
user avatar
  • 191
0 votes
1 answer
85 views

What exactly is the data required when creating a coinbase transaction? How do I insert the blocks height into the coinbase transaction?

Still trying to write a function to properly create a coinbase transaction and the only thing I can't seem to get a hold on is..... How to get the block height provided by getblocktemplate into the ...
user avatar
0 votes
1 answer
61 views

RPC interface MITM protection

When I connect to my bitcoind instance over RPC, I need a password for that, but no certificate. So how are man-in-the-middle attacks prevented on that connection?
user avatar
2 votes
1 answer
96 views

Validate raw transaction hex without broadcasting

I would like to check the validity of a raw transaction (i.e. whether it would be accepted by network nodes), without broadcasting the transaction to the network. I am interested in knowing what is ...
user avatar
  • 196
1 vote
1 answer
54 views

Flag -deprecatedrpc=addressess - Bitcoin core

How long do we will have the -deprecatedrpc=addressess flag for Bitcoin core. Is it just for the v22.0 or will it be available for all minor and patch releases until v23.0?
user avatar
0 votes
1 answer
45 views

Just to be sure, the downloads at bitcoincore.org are the safer ones?

(more than bitcoin.org?) And a few more questions regarding this: Why did they change the naming of the versions from 0.xx to xx.0? (latest update changed from 0.21 to 22.0). Why they did not add ...
user avatar
  • 1
1 vote
1 answer
122 views

I am getting an RPC error when trying to run any Bitcoin-cli commands on Ubuntu

I asked this question on AskUbuntu and was told to post it here. https://askubuntu.com/q/1373657/1519292 I am trying to follow the Mastering Bitcoin tutorial. After compiling Bitcoin Core, and ...
user avatar
  • 11
0 votes
1 answer
57 views

What's the difference between generateblock and generatetoaddress

Both commands generate blocks, and one specifies an address, what is the usage for each? Thanks!
user avatar
0 votes
1 answer
33 views

How to accept the payment with regtest?

I sent some BTC via the regtest network from one wallet to another, and I don't see it using getbalance, but I do see it if I use the command getbalances as untrusted_pending: { "mine": { ...
user avatar
2 votes
2 answers
181 views

Bitcoin-cli responding but not curl

According to the bitcoin documentation I can make curl calls to my bitcoin node. However, whenever I run a curl command like the following (as per the docs): curl --data-binary '{"jsonrpc": &...
user avatar
0 votes
0 answers
39 views

How to use `blockchain.scripthash.subscribe` from a tcp socket in Electrum server

As a personal exercise I want to write a minimal copy of BTCPayServer. I decided to use Electrum server instead of a node to fetch information from the network. My final goal is to be able to track ...
user avatar
  • 101
0 votes
1 answer
115 views

Pull Bitcoin node data from external public nodes using JSON-RPC

I read couple of blogs and responses on hosting server to expose data using JSON-RPC but wanted to confirm if there is a way to query node data that I am not hosting (not connecting via P1P) using ...
user avatar
  • 29
0 votes
0 answers
138 views

What is the default username and password for bitcoin the rpc deamon?

What is the default username and default password for the bitcoin rpc? I have a bitcoin daemon running, but there is no bitcoin.conf file. If I attempt to query the RPC, I get a 401 Unauthorized ...
user avatar
0 votes
1 answer
69 views

Get raw transaction from tx id without txindex=1

I'm trying to get the raw transaction hex string of a transaction that I know the id from. I would like to do that without using txindex=1. As I assume the transaction is unspent (and confirmed) I'm ...
user avatar
0 votes
1 answer
20 views

Is it possible to configure c-lightning cookie based auth to bitcoind as opposed to rpcuser/rpcpassword?

Is it possible to configure c-lightning cookie based authentication to bitcoind as opposed to rpcuser/rpcpassword? Does lightning.conf read the rpcuser/rpcpassword from bitcoin.conf? This question was ...
user avatar
1 vote
1 answer
110 views

Why does Bitcoin Core's RPC interface not use encryption?

As the Bitcoin Core docs state: Although Bitcoin Core's RPC interface does use authentication, it does not use encryption, so your login credentials are sent as clear text that can be read by anyone ...
user avatar
0 votes
1 answer
67 views

How do I use Bitcoin Core (fully synced) to "backtrack" a receive address?

I'm trying to "reverse-track" my current Bitcoin wallet to see its exact history on the blockchain, backwards. I have a fully synced Bitcoin Core installed. What command do I use in its ...
user avatar
  • 1
1 vote
0 answers
61 views

Add inputs and outputs to a transaction signed with sighash SINGLE | ANYONECANPAY

I created a transaction with one input and one output, and signed it using sighash SINGLE | ANYONECANPAY. Can I add further inputs and outputs with another wallet using bitcoin-cli?
user avatar
0 votes
1 answer
56 views

Fuzzing descriptor wallet RPCs

Is SQL injection a possibility while using JSON-RPC and Descriptor wallet RPCs? Consider one parameter in some descriptor wallet RPC is vulnerable and returns some data with SQL queries that shouldn't ...
user avatar
1 vote
0 answers
17 views

How to internally call another RPC command inside bitcoin core server?

I'm new to Bitcoin Core development, and I am trying to find a way to execute another RPC command from within a new RPC command I'm trying to add. I believe the Node interface has the executeRpc() ...
user avatar
  • 113
2 votes
0 answers
78 views

How to compute deposits from the output of listsinceblock?

I am writing a program that, given the JSON outputs from multiple separate RPC calls to listsinceblock, stores valid deposit transactions in a database and then computes the total deposit for every ...
user avatar
0 votes
1 answer
25 views

`addmultisigaddress` syntax for POST request

Copied the body part from https://bitcoincore.org/en/doc/0.21.0/rpc/wallet/addmultisigaddress/ and replaced addresses with 2 new addresses (regtest): POST / HTTP/1.1 Host: localhost:18333 ...
user avatar

1
2 3 4 5
16