Questions tagged [json-rpc]
A remote-procedure-call (RPC) interface provided by the Bitcoin Core wallet and it's companion software bitcoind. This RPC interface uses the Javascript Object Notation (JSON) serialization format for data and allows other software programs to interact with Bitcoin-Core.
879 questions
0
votes
2
answers
46
views
Connect to RPC with .cookie file using python-bitcoinrpc?
How do I connect to Bitcoin Core using python-bitcoinrpc and a ~/.bitcoin/.cookie file?
This issue commenter claims this is how to do it:
rpc_connection = AuthServiceProxy("http://%s:%[email protected]:...
0
votes
1
answer
70
views
How to find out bitcoin top 500 richest address from RPC API of Bitcoin Core?
There is no such API function in Bitcoin Core, so how do people get that kind of data?
2
votes
2
answers
125
views
Get all UTXOs from specific wallet via RPC
I am doing an automated custom transaction generator in Python for a test environment to generate a ground truth of transactions. This generator creates transactions via the createrawtransaction RPC ...
0
votes
1
answer
64
views
Error in sending transaction:Insufficient funds
import Client from "bitcoin-core";
import fs from "fs";
const client = new Client({
network: "regtest",
username: "alice",
password: "password",
...
-1
votes
1
answer
176
views
Mining in 2009 how to recover
I started mining in 2009, cpu based, and found on a old hdd bitcoin 0.3.24 thats from 2011
gat a adres and a private key, the adres starting with a 3 and a private key with 14 characters
How can I ...
1
vote
0
answers
63
views
What is the best way to check using bitcoin core RPC if a transaction is re-orged?
My current approach is to check the following:
fn is_orphaned(..) {
let res = get_raw_transaction(txid)
return confirmations == 0 && blockhash != null
}
Is the above way correct? And ...
0
votes
1
answer
65
views
How to load bitcoin wallet from any wallet in regtest mode
I’m starting to code some stuff and need to get balance from wallets I generate using bitcoinjs-lib. When I hit my bitcoin server which is running in regtest mode it says that the wallet isn’t loaded ...
1
vote
1
answer
55
views
What does lastsend and lastrecv in "getpeerinfo" rpc mean?
The Bitcoin Core RPC docs says lastsend as UNIX epoch time of last send, similarly for lastrecv. Does that mean last sent/received P2P message or transaction?
1
vote
0
answers
139
views
How do I install Electrum Personal Server with bitcoind v28.0 on a RPi4?
I run a Bitcoin Core v28.0 on a Raspberry Pi4 and tried to make Electrum Personal Server work.
I experienced several issues during installation and execution. Any help is very much appreciated. And ...
1
vote
0
answers
91
views
Three functional tests in`test_runner.py` fail with `JSONRPCException: Method not found (-32601)`
I'm building bitcoind on MacOS 14.7.1 and running the functional test test_runner.py. bitcoind was built minimally with:
cmake -B build \
-DBUILD_GUI=OFF \
-DWITH_BDB=OFF \
-DBUILD_BENCH=...
0
votes
1
answer
65
views
What is equivalent to walletcreatefundedpsbt but with an arbitrary funding wallet?
I'm interested in creating a swap application using HTLCs. The user connects their wallet to the frontend, places an order, and the backend matches the order with a maker and creates the HTLC ...
1
vote
1
answer
68
views
Functional test error when modifying RPC response: "RPC key returned that was not in doc"
I modified an RPC call response for a PR, but some functional tests are failing. The error I'm getting is:
File "/home/sliv3r/Documentos/Projectes/BitcoinCore/bitcoin/build/test/functional/...
1
vote
1
answer
344
views
What is the proper configuration and command to run bitcoincore and use RPC over LAN?
So, I'm trying to setup my node on a small computer I have lying around and, for practical reasons, I want to be able to do RPC requests to it from computers within my own LAN. Specifically I'm ...
0
votes
0
answers
155
views
What is the role of "Invalidateblock" RPC command and are there any possible transaction validation issues with regard to this?
I have been testing various RPC commands on bitcoin.
The "RPC API Reference" page well demonstrates almost all of the commands.
But by reading the source code (bitcoin v27.0), I noticed that ...
0
votes
2
answers
85
views
Is there a resource that describes the RPC API in more detail?
I'm trying to understand the API as it is provided by developer.bitcoin.org, but I don't quite understand what some of the commands actually do and require.
2
votes
0
answers
130
views
How to use local Bitcoin wallet with remote bitcoind node for transaction creation
I'm trying to manage a Bitcoin wallet on my local machine using bitcoin-cli, but my local node isn't and cannot be fully synced and can't be pruned due to the need for historical UTXO data to build ...
0
votes
1
answer
97
views
Local broadcast cannot be found in mempool
After sending a raw transaction (SendRawTransaction (raw_tx, 100000)) and after local broadcasting, the transaction does not show up on platforms such as mempool.space. What might be the reason?
-1
votes
1
answer
236
views
using curl to access the API
when I use a curl command to send json-rpc requst. I get prompted for a username and password but afterwards I get no response.
Do I need to run a full node in order to do Bitcoin mining?
2
votes
1
answer
77
views
BIP for submitpackage rpc call
Is there a BIP for submitpackage RPC call? I do see BIP-431 for TRUC, and cannot find one for submitpackage.
2
votes
0
answers
97
views
Clarity on rpc flag design to pass boolean arguments
I am working with RPCs flags that may have a boolean argument which is extracted using GetBoolArg and there are various ways to pass Boolean arguments. For example
-fastprune=1 // true
-fastprune=...
2
votes
0
answers
52
views
Identifying Test-Only RPC Arguments
I am trying to identify test-only rpc arguments in init.cpp and wanted to confirm if the test-only options are those with ArgsManager::DEBUG_ONLY with OptionsCategory::DEBUG_TEST, or ArgsManager::...
2
votes
1
answer
146
views
Most efficient way to check if utxos are consumed in mempool txs using core rpc and rust
I try to concurrently monitor a bunch of signed but non published transactions. I want to detect asap if any of the inputs into these bond transactions have been used in another transaction in my ...
2
votes
0
answers
68
views
Will Bitcoin Core still respond quickly to a rpc-call when new blocks come in fast?
I had my Core Lightning node crash a few times because Bitcoin Core didn't respond in time to a rpc-call. I found that this happens when new blocks are generated quickly, like below:
849683 2024-06-...
3
votes
1
answer
135
views
bitcoin-cli listtransactions fee amount is way off, why?
I am using the default signet network, my txid is 3923927eb3b6213bab5d0bee8364a87eafe357cb4d42ce6c587f0372735c7ff0.
bitcoin-cli listtransactions shows a fee of 0.00596777 when in reality the fee is 0....
1
vote
1
answer
203
views
"Error parsing JSON": how to use `testmempoolaccept` on Windows?
The documentation for bitcoin-cli testmempoolaccept suggests
bitcoin-cli testmempoolaccept '["0100000001abcd..."]'
but that throws Error parsing JSON. I have tried numerous variations of ...
0
votes
1
answer
78
views
Has There Been a Change in Bitcoin RPC's scriptPubKey Address Field
So I have not been very into Bitcoin for a long time. My seniors worked on Bitcoin RPC methods in my project back in 2018-2019. At that time, the response of getblock was fetched, then we fetched the ...
2
votes
1
answer
102
views
What does unbroadcastcount in getmempoolinfo mean?
What is the unbroadcastcount in getmempoolinfo? Does it track only the transactions from my wallet that are unbroadcasted? Or does it track all transactions that are not broadcasted which I may have ...
2
votes
0
answers
74
views
How can I sign custom tapscript leaf using bitcoind `walletprocesspsbt` rpc endpoint?
I have taproot output which can be spend through 3 different script paths. In general all of those script paths are some kind of multisig.
In my wallet I have key which is part of those multi-sigs. ...
1
vote
0
answers
74
views
scantxoutset timing out
I have extremely simple python code to use scantxoutset.
The problem is that when I debug in pycharm it keeps timing out.
rpc_connection = rpcConnector.rpcConnect()
json_req = [{"desc": &...
1
vote
1
answer
120
views
Question about nextblockhash in bitcoin block struct
In the book "Mastering Bitcoin" (3rd edition), on page 46, there is an element nextblockhash in the block struct after issuing a getblock command, anyone can explain it and how to use it. ...
3
votes
1
answer
240
views
How does the initialblockdownload field in the getblockchaininfo RPC work?
Let's say I have a fully synced node that returns "initialblockdownload": false. If I turn it off, will it show "initialblockdownload": true when I start the node again? In other ...
2
votes
1
answer
149
views
Using sendtoaddress is failing using json-rpc and I don't know why
The steps i followed are i first load the wallet in a different method which works, then i check the balance of the wallet in a different method which works, and then I call this sendbitcoin method(...
0
votes
0
answers
75
views
High end electrum servers directly reading blk.dat files
These days, high end electrum servers directly read blk.dat files straight from Bitcoin Core's blocks folder in the process of creating their initial internal indexes. I guess they also do in the ...
2
votes
1
answer
190
views
RPC Batch call abruptly stopped working
I've had this code that was working less than a week ago. No changes at all on my PC or in the code and it just abruptly stopped working
normal (single) RPC calls work fine but batch does not.
All ...
2
votes
0
answers
280
views
Bitcoin Core RPC server not working
I have downloaded and installed and got up and running a bitcoin core node, and it is running fine as far as people are connecting to it on port 8333 just fine. However I can't seem to connect to it ...
0
votes
1
answer
130
views
Create transaction and so on
Please explain to me what should be the procedure for working with a bitcoin-cli / RPC wallet.
For example:
Create a wallet
Get a new address
Sending BTC: creating a transaction, signing a ...
0
votes
1
answer
314
views
How I can install Bitcoin Core Light Node (not Full Node) on a CentOs server?
How I can install Bitcoin Core Light Node (not Full Node) on a CentOs server? That I can use it with bitcoind and bitcoind-cli and RPC (https://en.bitcoin.it/wiki/Original_Bitcoin_client/...
0
votes
1
answer
172
views
listreceivedbyaddress - wallet file not specified error
So to start I have very little experience and this may be a simple answer but I can't find it easily.
I suspect that I am using the wrong thing to achieve what I am trying to do.
I'm parsing out the ...
2
votes
1
answer
376
views
Importdescriptors not working (JSON parsing error)
I have been trying to setup a watch-only wallet on Bitcoin Core using the importdescriptors command. To put this into context, I'm trying to use the watch-only wallet on my online machine to create ...
0
votes
1
answer
81
views
Difference between savemempool vs getrawmempool information
Does the savemempool have any additional information than the getrawmempool with verbose=true output?
0
votes
1
answer
103
views
Modifying mempool with an external program
Is it possible to detect stamps/inscriptions/brc-20 txs from the rpc method getrawmempool with verbose true?
Is it possible to develop a small external utility that could access and modify the ...
3
votes
2
answers
472
views
Why won't bumpfee accept my new fee_rate?
On a regtest node, I'm trying to bumpfee a transaction that have 1 sat/vB fee. I want to bump the fee to 2 sat/vB, but the wallet complains, saying:
error code: -8
error message:
Insufficient total ...
3
votes
1
answer
178
views
Mnemonic from Node.js app not restoring in other wallets
I'm working on a Node.js app that makes RPC calls to my node, and I'm having trouble restoring a mnemonic created with bitcoinjs-lib, bip32, and bip39.
First, I create a blank wallet that accepts ...
1
vote
1
answer
196
views
Why is hosting a public bitcoind RPC node not more popular?
Seems like it would be a great way to expand the usability of Bitcoin, i.e. tell your friends to send their transactions to your node when they are not at home and then their client software only ...
0
votes
1
answer
1k
views
Is it real BTC or fake [duplicate]
All,
I received some BTC to my coinbase wallet after someone asked me to setup custom network using the below setting. I received the BTC but I couldn't transfer to any other wallet and the says ...
3
votes
2
answers
517
views
Bitcoin Core RPC for transactions of a new address without rescanning
I currently use the importaddress wallet RPC on Bitcoin Core to rescan the transaction history related to an address, which I then query using listtransactions. The address import takes about a hour ...
3
votes
1
answer
322
views
Is there a cache mechanism with getrawtransaction?
I am currently working on a script that parses every BTC transaction from the beginning of the blockchain. My goal is to record summaries about each transaction in database, after synthesizing it.
...
2
votes
1
answer
115
views
Retention and Accessibility of Disconnected Block and Transaction Data
In the context of a fully indexed, non-pruned Bitcoin Core node, I am exploring the duration and persistence of data related to disconnected blocks and their contained transactions due to a blockchain ...
0
votes
1
answer
201
views
bitcoin rpc submitblock merkle root + raw tx (bad-txnmrklroot)
I wanted to test the submitblock rpc call in regtest but I seem to have some issues with the transactions I try to submit.
I have the following raw transactions:
...
2
votes
1
answer
2k
views
How should I be using rpcbind and rpcallowip (bitcoin.conf)
I have been very confused on how to use the rpcbind and rpcallowip arguments for bitcoind. I have a bitcoin core node running on a raspberrypi and I want it to accept json-rpc calls from one of my ...