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
1
vote
1answer
27 views

Calculating fee rate of tx returned by fundrawtransaction

I'm passing an unfunded proposed tx and feeRate param to fundrawtransaction which gives me back the hex of the tx with inputs selected and its fee. I'm not passing a conf_target or estimate_mode. I ...
0
votes
1answer
20 views

How do I ask other nodes for their stale blocks?

I want data on as many stale blocks as possible. Is there a way to ask peer nodes to run "getchaintips" and get their results? Previously, I used Blockchain.info's API call for this, but it seems ...
0
votes
0answers
15 views

Parsing JSON in bitcoin-cli

I am learning the Bitcoin-cli, and when I run a command like getbalances, I get a JSON with "mine" and "watchonly". Is there a way i can only return the watchonly portion? My broader question is can I ...
0
votes
1answer
20 views

Will bitcoind import private keys for multi-sig descriptor with watch-only flag set to true?

I am importing a "warm" multi-sig quorum into bitcoind using importmulti like so: {"jsonrpc":"1.0","id":"curltest","method":"importmulti","params":[[{ "desc": "sh(multi(2,[eb2d2f9e/44'/1'/0']...
0
votes
2answers
21 views

How can I execute `getnewaddress` at my full node from a remote server?

I have a full node running on a digital ocean droplet. I have an app running at heroku, and I want to execute getnewaddress from this app. I'm trying to generate BTC addresses to which users can send ...
0
votes
0answers
8 views

How could be useful the softforks field that provides the RPC command getblockchaininfo?

When I execute the command getblockchaininfo I see useful information but I don't understand how to be useful the information that is displayed through field softforks, the example below: bitcoin-cli ...
3
votes
1answer
33 views

why is the header for the JSON RPC interface text/plain? vs application/json?

the bitcoin core docs call out that RPC HTTP requests must include a Content-Type header set to text/plain and all the example commands confirm this header. why is it text/plain instead of application/...
1
vote
2answers
55 views

Checking if transaction is RBF

A transaction can be RBF if itself is a RBF, or it spends outputs from a RBF transaction. Is there a way to use bitcoin RPC node to check if a transaction is spending outputs from a RBF transcation?
0
votes
0answers
20 views

Using multiple wallets on one “bitcoind” process

Please how do I implement the code below in php Create a wallet for each of the clients using: bitcoin-cli.exe createwallet When you want to perform any action on any wallet simply use: bitcoin-...
0
votes
0answers
27 views

How to strip witness data from block in json/hex format?

I have a JSON format block (Height:500000) here. As you can see here, it is a segwit block and its actual size is 1048581 and stripped size (without witness data) is 981404. I want to strip full node'...
0
votes
1answer
33 views

Is it possible to skip verification of blockchain data when using bitcoin core?

Because I need bitcoin core client only for JSON-RPC requests. Will I need pruned initialization or normal initialization of bitcoin core client for successfully running such requests? (I guess client ...
0
votes
1answer
37 views

Bitcoin Core JSONRPC only accept requests with 0.0.0.0 in configs

I've lunched a Bitcoin Core server, and trying to connect to it via JSON-RPC. This is my configuration settings: server=1 rpcuser=admin rpcpassword=password rpcport=1234 rpcallowip=94.183.32.151 ...
0
votes
0answers
32 views

How to calculate a candidate block for mining using bitcoind RPC (without getBlockTemplate) and having into acount MAX_BLOCK_SIGOPS

I'm trying to calculate candidate blocks without using getBlockTemplate. Im using the data returned by bitcoind RPC, but I can't find a reliable way to get the required signatures per transaction in ...
0
votes
0answers
16 views

why is getdescriptorinfo returning a “function needed” error with a sortedmulti descriptor?

When trying: bitcoin-cli getdescriptorinfo "wsh(sortedmulti(2,tpubDFck48zH8ZzteKKZCR9WMVBJwHZayhQmtCDyDRzHsU7VMTwEXohD23h1CBiizKtFtWck2fVegNDRM193nGx3VLs1RTSGNc1iePKpc1JvsS6/*,...
0
votes
1answer
41 views

`bitcoind` RPC: ask if syncing headers or blocks

Is there a way to know from bitcoind RPC if it's syncing headers or blocks? And is there a way to know the header sync progress? Even if not directly available, is it possible to derive header sync ...
0
votes
0answers
31 views

btc qt walletdump

I'd like to dump my entire btc qt wallet, while syncing, into an electrum wallet. I don't want to do it receiving address by receiving address. I already emptied out all my receiving addresses but ...
0
votes
0answers
73 views

Cannot open dump wallet file (code-8)

Is anybody familiar with this problem using btc qt debug console? Would like to dump wallet and sweep into electrum.
1
vote
1answer
39 views

blockstream API response

How do I determine if the current transaction is an outgoing or an incoming transaction from looking at the following API response? https://blockstream.info/api/address/...
1
vote
3answers
59 views

What are some good solutions for analyzing Bitcoin script patterns?

I'm interested in analyzing the Bitcoin blockchain for occurrences of particular scripts and spending patterns. What are some good solutions for this? An ideal solution would let me filter ...
1
vote
1answer
45 views

How to implement getrawmempool?

I’m trying to get all transaction ids in the memory pool as json array. I just finish downloading bitcoin core and do now know where to begin. Any help would be appreciated!!
1
vote
0answers
17 views

RPCConvertValues() call error

I'd like to call RPC programmatically, instead of using bitcoin-cli. when I call the function RPCConvertValues(), it always raise error RPCConvertValues() is defined here : https://github.com/...
2
votes
1answer
19 views

Non indexing bitcoin and output lookup

Using bitcoin's RPC and txindex=0 is it possible to tell the difference between an existing output being already spent and a non existing transaction output (or transaction id)? Looking at gettxout it'...
1
vote
1answer
43 views

Knowing if a public address is spendable by an HD seed?

I want to know if an address is spendable by an HD seed and for that purpose I am using the following command: > bitcoin-cli getaddressinfo 3LFc64RRd96ejjYvm14KaogBF9fmeNmePW | jq '.solvable' ...
1
vote
0answers
41 views

Manipulation of Bitcoin RPC with programmatically

I'd like to use Bitcoin source code(only RPC part) to manipulate with programmatically. I have bitcoind and bitcoin-cli installed in my local computer but I don't know how to write code for my ...
0
votes
0answers
37 views

UnhandledPromiseRejectionWarning: RpcError: Requested wallet does not exist or is not loaded

I run bitcoind default wallet path.but ı request getballance from nodejs api return; UnhandledPromiseRejectionWarning: RpcError: Requested wallet does not exist or is not loaded I use ...
1
vote
1answer
70 views

How to connect LND to bitcoind RPC with authentication cookie stored in a custom folder?

I configured bitcoind RPC to authenticate clients with an authentication cookie. However I cant figure out if it's possible to use this method with lnd while connecting to bitcoind RPC. I would like ...
0
votes
2answers
38 views

Unexpected behaviour Bitcoin RPC getbalance

I am seeing a smaller amount of BTC when I run ./bitcoin-cli getbalance compared to ./bitcoin-cli getbalance "" Here is the documentation on GetBalance from the BTC wiki, which highlights why I am ...
1
vote
1answer
19 views

getbalance says 0 for incoming TX even though 0-conf is allowed

> $bitcoin_rpc.getnewaddress("myaddress", "bech32") => "bc1q9kvfyjxtk9tvkzgpkf4x8zs42sddwlyanz3z6z" > $bitcoin_rpc.getbalance => 0.0 > $bitcoin_rpc.getbalance("*", 0) => 0.0 &...
0
votes
0answers
14 views

Move Bitcoin from account '' to default account

I am running Bitcoind and Bitcoin-cli for my RPC. When I run ./bitcoin-cli getbalance it does not return my correct balance, but when I run ./bitcoin-cli getbalance '' I can see all my funds. ...
1
vote
1answer
17 views

Fast way to get details of all transactions in a block

I would like to extract all transactions in history. What I'm presently doing is calling getrawtransaction and than decoderawtransaction for each transaction in the block. This works, except that the ...
1
vote
1answer
28 views

RPC errors raised by each command

Coming from this question, is there any comprehensive collection of what errors can each RPC command return? For example. Let's say I want to run getbestblockhash or getblockcount. I'm unsure about ...
2
votes
1answer
113 views

-fallbackfee option in sendtoaddress

I'm trying to send some bitcoins using bitcoin-cli API, but bitcoin core tells me that Fallbackfee is disabled. How can I set a value for fallbackfee? I've tried to specify it like bitcoin-cli ...
0
votes
1answer
50 views

Errors with `walletcreatefundedpsbt` & non-solvable UTXOs

I'm attempting to use walletcreatefundedpsbt with a watch-only wallet. With 2.0 BTC in the watch-only wallet, I attempt to create a psbt sending 0.2 BTC without specifying inputs and receive an "...
1
vote
1answer
217 views

Bitcoin JSON RPC not working on Remote IP

i cannot get it to work firstly i was able to use bitcoind in my vps (locally) but when i added rpcbind and allowip to my bitcoin.conf i cannot even use bitcoin-cli its giving me this error: error: ...
1
vote
1answer
49 views

What is the simplest command I could use to test that my wallet unlocking process works properly?

I simply want to unit test that my lock/unlock process works well on an encrypted wallet. What would be the easiest command I could send (that doesn't involve sending coins) to actually validate if ...
2
votes
2answers
143 views

Cannot call rpc api from other machine in same local network

cannot call rpc api from other machine in same local network There is a regtest node in my local network , I can call rpc api only from the node's machine,not my local machine. I know rpcallowip is ...
1
vote
0answers
60 views

TimeoutError: [WinError 10060] when trying to connect to bitcoin rpc from a pc on the same local area network

I have a laptop with win10 installed. It is now running a full bitcoin node perfectly. I am already able to make rpc requests from the laptop using python and get valid responses. The laptop is ...
0
votes
0answers
33 views

No addresses returned by getnodeaddresses RPC call

The issue I am attempting to use the getnodeaddresses RPC call to return all addresses known by a node in a docker network. I'm using the regtest environment. The RPC call returns an empty array ...
1
vote
1answer
37 views

Why is getdescriptorinfo returning an error “Invalid descriptor (code -5)”

I am using Bitcoin Core bitcoin-cli with getdescriptorinfo like so: curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdescriptorinfo", "params":["sh(multi(2,[3c60330a/1]...
0
votes
1answer
53 views

Why does Bitcoin RPC load wallet too slowly?

I'm trying to load old wallet (which I have not been opening for months) and it takes too much time (~minutes). In this time seems like I can't do any further requests to RPC. After this new calls to ...
1
vote
1answer
47 views

Electrum address syncronization

I need to periodically check the balance of a number of bitcoin addresses (a few tens or hundreds addresses). I noticed that Electrum may syncronize a thousand or more imported addresses in a matter ...
1
vote
0answers
46 views

Why do I get -4 error code from Bitcoin RPC

I'm directly dealing with Bitcoin RPC and my first step is loading wallet. At first I try to check listwallets to find the current wallet there. If not, trying to load wallet: Post body = {"method":"...
1
vote
1answer
54 views

Why can't a user import keys to the keypool for a blank wallet?

I am creating a blank wallet with the intention of adding keys to the keypool but get an error keys can only be imported to the keypool when private keys are disabled Why? It would be beneficial for ...
2
votes
1answer
30 views

Disable update of blocks locally with bitcoind cmdline option

I'm using blockchain2graph tool to import the Bitcoin blockchain into Neo4j. It uses JSONRPC calls to read block data. For this, I have to have the bitcoind service running. Is it possible to disable ...
0
votes
1answer
34 views

Bitcoin RPC estimatesmartfee argument keys necessary?

I am attempting to use a PHP RPC Wrapper to connect to bitcoind for RPC API calls, estimatesmartfee, more specifically. My question is, do I need to specify the argument keys, or just the values? ...
0
votes
1answer
51 views

Bitcoin RPC RegTest not validating addresses

I am attempting to use Bitcoin RPC in regtest mode, however, when I try to validate a bitcoin address with the following function public function validateAddress($address) { $command = new \...
0
votes
1answer
47 views

Use Bitcoin RPC to send from many addresses to single address

I am looking into being able to send coins from specific addresses to a single output address using bitcoin-cli Is this possible? What RPC command would I use? Any chance of an example?
0
votes
1answer
37 views

How to put comment when use sendrawtransaction in bitcoincore?

I use sendrawtransaction to submitt my transaction and I want to put comment or comment-to in transaction like sendtoaddress fields that store in the wallet and not sent with transactions. I think the ...
1
vote
0answers
68 views

Why am I getting error: “Signature must be zero for failed CHECK(MULTI)SIG operation” when using signrawtransactionwithkey

I am using descriptor based importmulti like so to import a 2 of 3 HD multisig cold storage wallet into my node: curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importmulti", "...
0
votes
0answers
40 views

Bitcoin rpc testnet balance and transaction not visible

I'm using bitcoind-0.15.0.1 version & My Wallet Address is: muweVvHKnK1bE88pUsrpSAPuWry1V1AmHZ But whenever checking balance with following command: bitcoin-cli getreceivedbyaddress '...

1
2 3 4 5
14