Skip to main content

Questions tagged [bitcoin-cli]

The Bitcoin-Core wallet provides a Command-LIne-Interface (CLI) that can be used to retrieve information from the wallet or to perform certain actions.

Filter by
Sorted by
Tagged with
6 votes
1 answer
3k 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 ...
U2F0b3NoaVNhdHVyZGF5's user avatar
0 votes
1 answer
93 views

What can I expirement with BitcoinCore on my own?

I have a simple faculty assignment where I have to do some experiments with transactions or experiment with the Bitcoin protocol or maybe with wallet code. Work on that assignment shouldn't last more ...
ddavi031's user avatar
  • 479
5 votes
2 answers
1k views

Why does importmulti not support zpub and ypub?

As far as I can tell importmulti does not work with zpub/ypub. Why not? FWIW I prefer only to deal with xpubs, but I am curious.
Fontaine's user avatar
  • 488
3 votes
1 answer
3k 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-...
aicastell's user avatar
  • 133
1 vote
2 answers
698 views

Do I need to download the entire blockchain in order to use bitcoin-cli?

I want to try and compile and run bitcoin-cli locally. Do I need to download the entire blockchain first?
Niklas Rosencrantz's user avatar
1 vote
1 answer
2k views

Can a BIP39 12-word mnemonic be used to restore a wallet through bitcoin-cli?

I could not find documentation on using a 12-word BIP39 Mnemonic to restore a wallet through bitcoin-cli. It seems that importprivkey might be the right RPC call but when I provide the 12 words, it ...
Dave Scotese's user avatar
0 votes
1 answer
251 views

Using importmulti with internal set to true does not add any change keys. What am I doing wrong?

First I call: curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createwallet", "params":["ColdWallet", true] }' -H 'content-type: text/plain;' http://user:[email protected]:18332/ ...
Fontaine's user avatar
  • 488
15 votes
1 answer
12k views

How to generate SegWit address

How do I generate a SegWit address using Bitcoin Core CLI? Also will I be able to redeem those outputs and send them to a "legacy" address? If so, will this second transaction be accepted by older, ...
Paul's user avatar
  • 361
7 votes
2 answers
4k views

How to check if an output has been spent?

Using an rpc client (e.g. bitcoin-cli), for a given transaction and index of an output of it, how can I tell if the output is currently an utxo, or if it has already been spent? In the latter case, I'...
shx2's user avatar
  • 803
5 votes
2 answers
2k 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?
RobinLinus's user avatar
4 votes
1 answer
2k views

How much memory (RAM) is used by the mempool and UTXO pool?

I know I can set -dbcache=<MB> when starting bitcoind. Does this effect how much RAM is allocated for the UTXOPool or UTXOPool + mempool? How can I know how much RAM each database takes? If the ...
amanusk's user avatar
  • 643
4 votes
1 answer
2k views

How do I create a taproot multisig address requiring 21 of 210 keys to spend?

I understand that prior to taproot activation, m-of-n multisig addresses had an "n" max limit of 20 keys. I also saw the 998/999 tapscript multisig transaction that recently caused issues ...
FractalEncrypt's user avatar
4 votes
2 answers
4k 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 ...
dcfg's user avatar
  • 404
3 votes
1 answer
310 views

Create Custom script from bitcoind

I'm able to create multisig with bitcoin-cli with addmultisigaddress bitcoin-cli addmultisigaddress 2 '["'$ADDR_MITT_1'","'$ADDR_MITT_2'","'$ADDR_MITT_3'"]' But How can I add extra OP like CLTV or ...
monkeyUser's user avatar
1 vote
1 answer
2k views

regtest method not found

I have alredy looked at a lot of other similar questions here but they didn't involve my case or the solutions provided did not work for me. I'm trying to work in regtest mode and I'm using bitcoin ...
Ivano Donadi's user avatar
1 vote
1 answer
493 views

Is it possible to read every transaction my node relays?

I'd like to add every valid transaction my node receives to my own database. At the moment, I'm using getrawmempool every second to find new transactions, and then getting the data for them using ...
inersha's user avatar
  • 3,175
14 votes
5 answers
10k views

bitcoin-cli not found on OSX

I have a Qt testnet3 node synched and running on my mac. In the terminal, when simply trying: $ bitcoin-cli getinfo or $ ./bitcoin-cli getinfo I get: -bash: bitcoin-cli: command not found ...
user avatar
10 votes
1 answer
7k views

How to sign bitcoin transaction with 'bitcoind' and non-bitcoind-wallet private key?

I want to create and sign bitcoin transaction using only 'bitcoind' and 'bitcoin-cli'. I can create a transaction using createrawtransaction RPC API, but signing it using 'signrawtransaction' fails. ...
KostaZ's user avatar
  • 261
10 votes
1 answer
6k views

Can you list receiving addresses in bitcoin-cli?

In bitcoin-qt, there are interfaces for seeing "receiving addresses" which have been generated in the past. I don't see any way to do that in bitcoin-cli.
Ian Kelling's user avatar
9 votes
2 answers
2k views

How to detect a fork with bitcoin-cli?

I'm keeping a simple log of blocks, and storing them in an array. When a new block arrives, I add it to the array. Let's say this is my block chain array: E <- tip D C B A Now, say a new ...
inersha's user avatar
  • 3,175
7 votes
4 answers
14k views

bitcoin-cli could not locate RPC credentials

I'm running a bitcoind 0.16 and it seem working, blockchain in sync etc.. I've used the "new" rpcauth, which is non deprecated so kind of referennce as explained here: https://github.com/bitcoin/...
Daniele Dellafiore's user avatar
6 votes
1 answer
265 views

What is better, pre-existing Bitcoin-core API bindings for python or custom wrapper functions

How advisable is using the following code to query the bitcoin core as compared to using some python RPC library. import os btc_prefix = 'bitcoin-cli ' def getblockcount(btc_prefix): print("in ...
Shabahat M. Ayubi's user avatar
6 votes
2 answers
6k views

64: too-long-mempool-chain

I am using bitcoind json rpc api to send bitcoin to multiple bitcoin addresses. I am using sendrawtransaction. When i have 24 unconfirmed payments sent from my account, i can't send anymore because i ...
Adrian's user avatar
  • 59
4 votes
2 answers
3k views

running live and test node simultaneously

it took me 4 days to fully synchronize my node, but its finally running and i can create wallets etc.. I wanted to experiment with some transactions on testnet, so need to either change my config or ...
Sonic Soul's user avatar
3 votes
2 answers
1k views

How to get info for public address from bitcoin-cli + local db? (Can it be done without creating a wallet?)

I just started running my own full node. IBD is finished, and I'm now learning how to use bitcoin-cli. First I would like to extract all the available information for one or more public addresses ...
kjo's user avatar
  • 145
3 votes
1 answer
872 views

What does score tell me in getnetworkinfo?

Using bitcoin-cli getnetworkinfo; Or, going into Help>Debug>Console in bitcoin-qt and typing getnetworkinfo; What does localaddresses:score tell me?
Willtech's user avatar
  • 3,279
3 votes
1 answer
2k views

Why 'bitcoin-cli getreceivedbyaddress ...' always returns 0?

I've already synchronized about 400.000 blocks, but every time I'm trying to get balance for specific address, e.g. first coinbase address - link: $ bitcoin-cli getreceivedbyaddress ...
Sergey Potekhin's user avatar
3 votes
1 answer
503 views

Why does getblocktemplate use priority for transaction selection?

I don't know how getblocktemplate works exactly, but it seems to include transactions based on priority. Selecting transactions based on priority isn't the most profitable method for building a block ...
inersha's user avatar
  • 3,175
2 votes
1 answer
291 views

Bitcoin Core What default values should I pass for some positional RPC params in sendtoaddress

I am trying to use the sendtoaddress rpc method of bitcoin core. From the documentation I read that I can pass "estimate_mode" parameter to estimate a fee. However as I believe json rpc follows ...
Paras's user avatar
  • 181
2 votes
2 answers
3k views

Question on getaccountaddress, getnewaddress, getAddressesByAccount

I would like to get some feedback. I am new to the bitcoin development and I don't want to misunderstand something important before I start designing the application. I am working on bitcoin online-...
Serdar Ulutas's user avatar
2 votes
2 answers
292 views

Bitcoin-cli 0.19.1 Wallet not Sending from Addresses with Closest Amount?

I have a weird issue that I thought was fixed a few years back with Bitcoin wallet to reduce fees. I guess not, or I am missing something... My wallet received a transaction for the amount of 0....
Duetschpire's user avatar
1 vote
1 answer
790 views

Can somebody show me a working gettxoutproof / verifytxoutproof pair?

Can somebody please show me a working gettxoutproof / verifytxoutproof pair, I am looking for the input used on bitcoin-cli or console window in Bitcoin Core to make this happen, and the outputs. For ...
Willtech's user avatar
  • 3,279
1 vote
1 answer
474 views

When I use importmulti with an xprv it never imports the private keys. What am I doing wrong?

When I call: bitcoin-cli getdescriptorinfo "pkh(tprv8iDvhA6eaMDbRuH3D2DTNuH6N6LvMTVrcv7z6sVxyyYvThSaCSa3i3qFVqUgVL4NbVkACxjx3KPWLoP5jvDU3i16hjTnzEFnZuqsnTJ5F4n/*)" it returns: { "descriptor": "...
Fontaine's user avatar
  • 488
1 vote
1 answer
410 views

How to calculate a bitcoin transaction hash of a coinbase transaction in 2022?

According to all internet sources i have found, the hash/ID of a transaction is the result of the double_sha256 algorithm that takes all raw data of the transaction. I tried to calculate it in Python ...
Vluedo404's user avatar
1 vote
1 answer
1k views

bitcoind and bitcoin-cli and bitcoin-qt

following the hackernoon for full node btc, https://hackernoon.com/a-complete-beginners-guide-to-installing-a-bitcoin-full-node-on-linux-2018-edition-cb8e384479ea i have some small questions, is there'...
BTC involver's user avatar
1 vote
2 answers
318 views

How to get total transactions on the network with RPC

I have seen no concrete answer to this question anywhere. I assume it is possible to get the total number of successful transactions on the bitcoin network using bitcoin-cli command because most ...
uwem's user avatar
  • 23
1 vote
1 answer
2k views

How to delete a specific wallet in bitcoind

I accidentally created a new wallet with $ bitcoin-cli -testnet createwallet help { "name": "help", "warning": "" } Now I would like to delete it without ...
Wieland Gmeiner's user avatar
1 vote
2 answers
1k views

Bitcoin curl no reply

Hi I have made a curl to my server but get no reply . What am a missing rpcuser=rpcusername rpcpassword=rpcpassword rpcauth=rpcusername:generatedkey daemon=1 server=1 rpcport=8332 rpcbind=0.0.0....
BKCapri's user avatar
  • 111
1 vote
1 answer
499 views

Why keys generated in Bitcoin Core mismatch that from online generators despite using the same seed?

I have the following problem in Bitcoin Core. With this command: echo carpet begin bacon master draft fortune food cherry cage axis vault clown | \ bx mnemonic-to-seed | \ bx hd-new -v 70615956 | \ ...
wic's user avatar
  • 123
0 votes
1 answer
260 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 ...
AncientTides's user avatar
0 votes
1 answer
195 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. ...
sci9's user avatar
  • 107
0 votes
2 answers
745 views

What is the best way to create a wallet with a blank keypool then add keys to it?

The scenario is this: User has a cold storage wallet and will import their cold storage xpub into Bitcoin Core using getdescriptorinfo and importmulti. User wants to only use the keys associated with ...
Fontaine's user avatar
  • 488
0 votes
1 answer
727 views

How do you import an xprv using descriptors and importmulti?

I have figured out how to import an xpub, but when i use getdescriptorinfo on an xprv: getdescriptorinfo "wpkh(...
Fontaine's user avatar
  • 488
0 votes
1 answer
1k views

createrawtransaction and fundrawtransaction

I use createrawtransaction for create a rawtransaction with [] "zero inputs" and one output. I use fundrawtransaction for populate rawtrasaction with inputs. {"method":"createrawtransaction","params"...
user avatar