2022 Developer Survey is open! Take survey.

Questions tagged [bitcoin-cli]

should be used for questions related to the Bitcoin Core RPC client

Filter by
Sorted by
Tagged with
1 vote
1 answer
25 views

What does setting the "-server" flag do?

I'm running the GUI version of Bitcoin Core. But I want to also be able to interact with bitcoin-cli in my Windows console. Apparently I need to set the -server flag before running bitcoin-qt, or set ...
user avatar
3 votes
1 answer
45 views

Remove descriptor from a Bitcoin Core wallet

I had accidentally imported descriptors into a wallet that I didn't mean to import to in Bitcoin Core. From what I can tell, the only way I can remove this descriptor from that wallet is to delete the ...
user avatar
0 votes
2 answers
45 views

How can I manually connect a bitcoin network and create a bitcoin account?

I am not sure that I'm 100% technically correct, but I want to create a key value pair which is essentially my Bitcoin account. Please correct me if I am wrong. So what does it take me to make my ...
user avatar
0 votes
1 answer
32 views

Can I use the Bitcoin Core command line to confirm that the bitcoin I sent to an external address was confirmed and arrived? If so, how?

I understand that one can use a node to ensure that transactions have been confirmed. If I sent bitcoin from my wallet to a friend living in another country, how can I use the command line on the ...
user avatar
2 votes
1 answer
41 views

Bitcoin 22.x + doesn't decode addresses for multisig

anyone can suggest why addresses won't decode in newer versions? example: bitcoin-core 0.21 bitcoin-cli getrawtransaction 9297132b89461da9dee0364db49eeb1c32770550bc5b82e02f1cbaab01043aa3 1 { "...
user avatar
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
1 vote
1 answer
35 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
35 views

Disable Bitcoin core JSON-RPC server?

Is it possible to disable JSON-RPC server ? It seems like it's always on.
user avatar
  • 853
0 votes
0 answers
20 views

Is there a detailed documentation on RPC API bitcoin developer documentation

developer guide on https://developer.bitcoin.org/reference/rpc is not very detailed on mining section. Where can I find a detailed documentation with examples
user avatar
0 votes
1 answer
71 views

How to use Bitcoin Explorer (bx) for BIP39?

Creating an HD wallet as per BIP39, adapted from O'Reilly's Mastering Bitcoin by Andreas Antonopoulos Generate pseudo-random number as 32 hex characters $ bx seed > entropy Convert random number ...
user avatar
  • 395
0 votes
0 answers
24 views

How to get time left using command line during initial block download?

When using GUI version of Bitcoin Core, time left before initial block download has completed is displayed. Using bitcoin-cli, one can see verificationprogress, but is there a way to get time left ...
user avatar
1 vote
1 answer
73 views

Why can't Core CLI query wallet balance when loading block index or verifying blocks?

Why can't Core CLI query wallet balance until having loaded block index and verified blocks? It takes a few moments when running the test and sig nets, but when running the main net it is tough for my ...
user avatar
  • 330
1 vote
1 answer
122 views

Are OP_RETURN transactions not stored in chainstate database?

I'm running a bitcoin node on regtest. I'm writing scripts to interact with the chain-state database. For my purpose, I'm creating, signing and sending a transaction to my node (pretty much following ...
user avatar
1 vote
1 answer
149 views

Get transactions for address

I develop an application (BitBook, https://github.com/C-Otto/BitBook) that helps users track their coins. For this, whenever I reason about some address, I need to consider all transactions that take ...
user avatar
  • 248
2 votes
1 answer
118 views

What is the proper way to import a wallet from a file after removing it completely

Just wanted to ask a question about "importwallet" bitcoin-cli command. After starting my bitcoind daemon, created a wallet, protected with a passphrase and made a backup to a file: bitcoin-...
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
0 votes
0 answers
207 views

How to create a Bitcoin wallet on a local testnet using bitcoin-cli?

I am trying to implement a business process in scope of which test BTC is sent to a particular address from Java using code like public void sendBtc(BigDecimal btcAmount, String targetBtcAddress) { ...
user avatar
  • 51
1 vote
1 answer
51 views

Easiest way to communicate with Bitcoin core with terminal (not bitcoind and without bitcoin core's terminal)?

I have bitcoin core running. I installed it through bitcoin.org and installed via a dwg file. I want to use bitcoin-cli commands through my mac's terminal app. (not with bitcoin core's terminal). I ...
user avatar
  • 171
1 vote
1 answer
18 views

loadwallet takes too much and times out

Hardware is too old and wallet was too much unsynchronized. Loading the wallet took so much time, it timed out (pending missing console output).
user avatar
  • 330
0 votes
1 answer
57 views

Parse the output field of getrawtransaction to generate a common address hash

Consider the following coinbase transaction: https://www.blockchain.com/btc/tx/d70ae1131d433b655d0faeae1db4efa15bb4138f1e38e60a53073a58ea1dcc34 How we can retrieve the recipient address, i.e. ...
user avatar
  • 107
0 votes
2 answers
85 views

Insert a password to a wallet.dat file from windows cmd

Is there a way to insert a password to a wallet.dat file from windows cmd? I'm a newbie, so please be as specific as you can. That wallet.dat file needs rescan, which I want to make after I insert the ...
user avatar
  • 85
0 votes
0 answers
64 views

How best to check the balance for a specific address using the Bitcoin-CLI?

I am currently calculating the balance of addresses from "listunspent" $unspends = $btc->listunspent(6, 9999999, array($PARAMS['address']))['amount'] But I don't think this is the ...
user avatar
1 vote
2 answers
91 views

how would you test a bitcoind/bitcoin-cli without syncing?

I want to be able to test bitcoin without waiting literal days, is it possible to run a local node that doesnt require sync?
user avatar
0 votes
0 answers
35 views

and multiple pieces of witness data to an input

I found an address on the test chain with 1.3 btc. it was a p2sh-p2wsh address and wanted to unlock it. it didnt work with bitcoin-cli because it only accepts a string of hex encoded witness script. i ...
user avatar
  • 229
0 votes
0 answers
81 views

How to write down an entire Bitcoin Core wallet through text

I have unclear ideas and I write because I would like some good soul to clear them up. I'm looking for a way to be able to recover a wallet created with Bitcoin Core, having only a short sequence of ...
user avatar
0 votes
1 answer
50 views

How to properly monitor incoming transactions for a specific address with bitcoin-cli?

I would like to monitor incoming transactions for a single address using bitcoin-cli listreceivedbyaddress 1 false false <myaddress> My problem is the returned array will become longer and ...
user avatar
3 votes
1 answer
53 views

Import all wallet addresses efficiently for explorer

I'm trying to build an explorer and I need to pull information about the wallet address such as transactions. Do I have to loop through everything with importaddress or is there an easier way? I ...
user avatar
  • 31
0 votes
1 answer
53 views

What "Data" should be inserted into the argument field of the "createrawtransaction" rpc command

This resource states that "data": "hex",(string, required) A key-value pair. The key must be "data", the value is hex-encoded data. Questions It says that the field is &...
user avatar
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
-1 votes
1 answer
109 views

old paper wallet shows missing balance after import; hacked? Bug? Confused?

I have an old (2014) paper wallet I've deposited coins into over the years. I have another paper wallet that was generated around the same time, but wasn't used until last year. I just finished ...
user avatar
2 votes
1 answer
45 views

Algorithm behind Bitcoin Core's hashes/s metric

The call bitcoin-cli getmininginfo returns a metric networkhashps among others. It shows how many hashes the entire Bitcoin network generates per second. This metric however, is not directly stored ...
user avatar
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
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
1 answer
84 views

what is the difference in bitcoin core between ? getblocktemplate or generatetoaddress?

What is the difference between bitcoin-cli getblocktemplate '{"rules": ["segwit"]}' and bitcoin-cli generatetoaddress 11 "myaddress" as I understand both are for mining?...
user avatar
0 votes
2 answers
61 views

How do I set up bitcoind to track all address balances?

Bitcoind only stores information about addresses that you've added. How do I make it store balance and transaction information for all addresses so that given any address I've never seen before, I can ...
user avatar
0 votes
2 answers
97 views

How can I -abort ./bitcoind -reindex-chainstate?

I made files re-accessible. Now we could return to a later, already synchronized state with the files. I tried to put ./bitcoind -reindex-chainstate=0, also in a bitcoin.conf, also directly calling ...
user avatar
  • 1
0 votes
1 answer
125 views

determining the address a transaction comes from

Currently im trying to build an explorer and im stuck on the block/listing transactions. Currently this is my code. foreach($info['tx'] AS $key => $value){ $txinfo = callBTC("...
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
41 views

Why is the decription of listreceivedbyaddress misleading and contradictory to what says its name?

From bitcoin-cli --testnet help listreceivedbyaddress: listreceivedbyaddress ( minconf include_empty include_watchonly "address_filter" ) List balances by receiving address. The issue is ...
user avatar
0 votes
1 answer
98 views

How do I pass optional arguments in JSON to bitcoin-cli createwallet without using curl?

I need to create an encrypted blank wallet, and for this purpose I need to furnish bitcoin-cli --testnet createwallet testwallet with two more optional arguments. Let the passphrase be "...
user avatar
0 votes
1 answer
110 views

Why .bitcoin is at /root in Arch/Manjaro Linux?

I've installed bitcoin-core and downloaded the blockchain in Ubuntu. Now that I have switched to Manjaro Linux and installed bitcoin-core again, It creates the .bitcoin directory in /root/.bitcoin/ ...
user avatar
  • 13
0 votes
0 answers
52 views

How to merge the datadir with .bitcoin directory?

I changed the path of datadir in bitcoin.conf from .bitcoin directory to somewhere else. Now that I need to backup my blockchain data, I want to have both .bitcoin and blockchain data together. ...
user avatar
  • 13
1 vote
1 answer
102 views

How to get peer nodes information from bitcoin CLI?

I saw a feature called Node Window in the bitcoin GUI environment, that shows information about peer nodes, like User-Agent, Received (Data), Sent (Data), Ip, etc. How do I can get such information ...
user avatar
  • 13
5 votes
1 answer
821 views

How to make a taproot transaction with bitcoin-cli?

Can you give a simple step-by-step example for a taproot transaction with bitcoin-cli on Testnet?
user avatar
1 vote
0 answers
180 views

Low inbound connections and fixed getnetworkinfo score at 4

I spent hours researching for possible solutions, but couldn't find any. I set up my RPi4 bitcoin node about a month ago. It communicates through Tor (see torrc content). SOCKSPort 9050 Log notice ...
user avatar
  • 31
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
309 views

Creating a new address in a blank wallet

I'm testing v0.21.1 on linux. I create a new blank wallet with: bitcoin-cli createwallet "my_wallet" false true But when I try to create a new address with bitcoin-cli getnewaddress I get ...
user avatar
  • 1
0 votes
1 answer
53 views

Does electrum wallet "sit on top of" bitcoin-cli?

Does electrum wallet "sit on top of" bitcoin-cli? Or is it an abstraction of some other software? I have already learned that Electrum's gui is not a wrap around their cli and there are some ...
user avatar
3 votes
1 answer
441 views

How do I get the private key of an address in descriptor wallets? How to dumpprivkey?

When I run dumpprivkey from Bitcoin Core 0.21.1. I get the following error message: error code: -4 error message: This type of wallet does not support this command I came across achow's explanation ...
user avatar
0 votes
1 answer
51 views

listtransactions weird offset workflow

I need to extract last wallet transaction. But seems listtransaction has some wrong logic. When I perform this function listtransactions '*' 50 9 it just return me first records not last. In my case ...
user avatar

1
2 3 4 5
7