Questions tagged [bitcoin-cli]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
48 views

Signing multisig raw transaction is returning error “JSON value is not a string as expected”

I am trying to sign a multisig unsigned raw transaction but keep getting "JSON value is not a string as expected", I am stumped and have tried many variations. Can anyone point out what I am doing ...
2
votes
2answers
199 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.
1
vote
1answer
25 views

How to import multi sig using importmulti correctly?

I create a 2 of 2 with createmultisig using 02254aba14091e45a9067fbe5b225b3863d1c49650226d583dcede06a7c33f8613 and 02ad64a03b7fc53c02f68eac04743b819bfeeabe6ca7007f473dbaf7c3570f5dc9 pubkeys. I then ...
2
votes
1answer
51 views

Why is the field 'hash' necessary in a bitcoin transaction?

Using bitcoin-cli decoderawtransaction I see results like... { "txid": "d2183b3ea763f41a30ec5ba6fbf6e5f32e0ca6a5e8761249c533fe22190f71f1", "hash": "...
1
vote
0answers
38 views

bitcoin-cli is not using port specified in config

I have setup a bitcoin node in regtest mode with custom config and datadir. I start bittcoind with command: bitcoind -conf=bitcoin-demo.conf -regtest -datadir="testdatabtc" -daemon My bitcoin-...
0
votes
0answers
22 views

Bitcoin-cli transaction fee reset

How do you reset the txfee after you successfully did the transaction? I mean, getting it back to "automatic fee"?
0
votes
1answer
146 views

Bitcoin Core `getaddressesbyaccount` method not found (-32601)

On macOS Mojave I have a full bitcoin node synced using bitcoind. I want to get the public address of the default account (i.e. the empty string ""). So I run bitcoin-cli getaddressesbyaccount "" ...
0
votes
1answer
35 views

getmininginfo vs getblocktemplate

I am interested in the difficulty right now. That is, the miners are working a block right now and they have a target. Both of the RPC commands "getmininginfo" (or "getdifficulty") and "...
0
votes
1answer
208 views

How to properly use importmulti with coldcard wallet BIP84 xpub?

I have seen the HWI scripts but I am trying to do this while keeping my Coldcard airgapped. First I create a wallet in bitcoin core with private keys disabled. I dump the wallet summary onto the ...
1
vote
1answer
117 views

Bitcoin-cli cannot estimate fees

I am trying to send transaction using bitcoin-cli but I am constantly getting: admin@XXXX:~$ bitcoin-cli sendtoaddress "XXXXXXX" 0.1 "" "" false true 5 "ECONOMICAL" error code: -4 error message: Fee ...
1
vote
2answers
147 views

How can I accept Bitcoin as a payment without a 3rd party gateway

I want to create a website where users can pay with Bitcoin. However I want to create my own payment gateway because I do not want to rely on services like BitPay. I want a unique BTC address for ...
0
votes
1answer
56 views

importmulti with BIP84 derivation always fails

I have been trying to test importmulti with BIP84 derivation like so: bitcoin-cli -rpcwallet=BIP84Test importmulti '[{ "desc": "wpkh([18734cbe/84'/0'/0']...
0
votes
1answer
58 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:password@127.0.0.1:18332/ ...
1
vote
1answer
126 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": "...
1
vote
1answer
32 views

How to use deriveaddresses via a curl command

I am trying to use curl via SSH to utilize the deriveaddresses bitcoin-cli rpc command. let descriptor = "wpkh(...
1
vote
1answer
56 views

How to request a list of blocks using bitcoin-cli?

I'm trying to figure out how to use bitcoin-cli effectively to request a list of 50 blocks. As far as I am aware, bitcoin-cli getblock list does not work. Also how to best extract information out of ...
1
vote
0answers
36 views

how do I mark coins spent in invalid blocks as unspent?

I was just testing bitcoin (v17) in regtest mode with the local, built-in wallet. If I send money to an address (I don't own), generate 1, and then invalidate that block, the local wallet does not ...
2
votes
1answer
68 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 ...
0
votes
1answer
57 views

How to create the data parameter for a PSBT?

I am sure this is a dumb question but if using: bitcoin-cli walletcreatefundedpsbt "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]" How do you create the data parameter? Where does it ...
0
votes
1answer
69 views

Bitcoin core's estimatesmartfee gives same estimate on ECONOMICAL and CONSERVATIVE mode

I have observed this behavior several times before now, the commands bitcoin-cli estimatesmartfee 2 ECONOMICAL and bitcoin-cli estimatesmartfee 2 CONSERVATIVE give the same estimates. For example, ...
0
votes
2answers
4k 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/...
0
votes
2answers
91 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 ...
1
vote
1answer
25 views

How does the wallet prioritise keypool addresses imported via importmulti?

I want to use importmulti to import 100 addresses from an xpub descriptor. If I set keypool: true as one of the arguments the keys get added to the keypool. How does the wallet prioritise which keys ...
0
votes
1answer
81 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(...
0
votes
1answer
28 views

Issuing bitcoin-cli commands via terminal

I am having issues utilizing bitcoin-cli via terminal. For example: DIRECT-8A-HP-OfficeJet-4650:~ peter$ bitcoin-cli deriveaddresses "wpkh(...
0
votes
1answer
52 views

Check when transaction was added to the mempool?

I know how to check when a specific transaction was included in the block. But how do I check when my bitcoind node first saw it? I would like to estimate for how long the transaction stayed ...
1
vote
1answer
432 views

“mandatory-script-verify-flag-failed (signature must be zero for failed check(multi)sig operation)”

I forked the openwallet-android so that I could add my coin - (placeholders) placeh.io. The openwallet-android connects to electrumx server. I am able to get my chain to load correctly in electrumx ...
1
vote
1answer
381 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 ...
1
vote
1answer
2k views

Unable to make Bitcoind commands

I am attempting to make Bitcoin-RPC commands in the Windows 10 terminal using Bitcoind from the Bitcoin Core. However, whenever I start C:\Program Files\Bitcoin\daemon>bitcoind the terminal hangs ...
1
vote
1answer
46 views

Create a transaction spendable in a specific block height

I am new in Bitcoin and I try to create an address in Bitcoind and send a transaction that the amount will be spendable in a specific height of the blockchain. Here is what I have done: privateKey = ...
2
votes
2answers
497 views

Interpreting results from “bitcoin-cli getmempoolinfo”

A bit of a conundrum interpreting the results from "bitcoin-cli getmempoolinfo". Straight from https://chainquery.com/bitcoin-api/getmempoolinfo: getmempoolinfo Returns details on the active state ...
0
votes
0answers
35 views

banning nodes through bitcoin-cli in Windows

I'd like to use Greg Maxwell's banlist for my Bitcoin node in Windows. When I enter the commands however, I receive the following error message for every bitcoin-cli command: bitcoin\bin>bitcoin-...
0
votes
1answer
238 views

Bitcoin Core 0.17 sethdseed then dumpwallet how to recompute extended private masterkey?

Using bitcoin-cli -datadir=X sethdseed true "WIF_KEY" the current wallet within datadir is updated Then, using bitcoin-cli -datadir=X dumpwallet my_dump.txt shows a fresh new # extended private ...
0
votes
1answer
79 views

Bitcoin Core change derivation path with getnewaddress cmd 0.17

As I'm building a simple HD wallet, I would like to use bitcoin core regtest. My goal is to setup a testing flow where I could have constant seeded address each time I use bitcoin-testnet-box, so that ...
0
votes
0answers
17 views

Is their a way to use Bitcoin's Testnet/LN Testnet within CLI without downloading Bitcoind?

I'd like to start working with Bitcoin's & Lightning's Testnet but don't want to download bitcoind on my current computer.
0
votes
1answer
305 views

Method not found when I use bitcoin-cli to generate blocks under regtest mode [duplicate]

As the picture shows,I am really confuesd.
5
votes
2answers
2k views

bitcoin.rpc python library problem

I am working through Master Bitcoin. I got the bitcoin client up and running. I am now trying to access the client from python. In the example, there is a line that says from bitcoin.rpc import ...
1
vote
1answer
192 views

estimatesmartfee outputs very different results

Around block 564815 (2019-02-26 23:40 UTC), the mempool was empty. I noticed that my two nodes are giving very different estimates for transaction fees to be used: Node 1 Version: 17.1.0 Number of ...
0
votes
0answers
24 views

How to Send BTC from vmnode address to local address using privatekey in testnet?

I created two bitcoin address in VM nod as well as local and dump privatekey for both addresses by using "dumpprivkey" command. Is there any posibitity to send BTC from bitcoin address which is ...
1
vote
1answer
47 views

Does bitcoind store timestamp at which private key was imported?

If we import a private key using bitcoin-cli importprivkey <key>, is there anyway to find out when the import was done? I am hoping a timestamp is included.
1
vote
1answer
473 views

Run Bitcoin and BitcoinCash in same server

I use debian 9 I have compile 2 files: bitcoinCashd -version Bitcoin ABC Daemon version v0.16.2.0-6af5e93 bitcoind -version Bitcoin Core Daemon version v0.15.1 So i need run in same server. Can ...
0
votes
1answer
159 views

How do I backup my wallet with bitcoin-cli over RPC?

hendry@knuckles ~ $ bitcoin-cli backupwallet /home/hendry/backup.dat error code: -1 error message: boost::filesystem::status: Permission denied: "/home/hendry/backup.dat" Reddit couldn't help me ...
2
votes
2answers
783 views

Bitcoin sendfrom and sendtoaddress

I am using bitcoin daemon in my system to get and pass btc to users. So now I want to pass some btc to another users but I can not understand what is the difference between sendfrom and sendtoaddress. ...
0
votes
1answer
118 views

Can't use bitcoin-cli commands, error message says “could not connect” from localhost

I am simply trying to run bitcoin-cli getinfo on the same machine that my bitcoin node is running on (with bitcoind -daemon) my bitcoin.conf file is as follows: server='1' rpcuser='username' ...
1
vote
1answer
210 views

Passing a wallet to rpcwallet in bitcoind JSON RPC

I want to set a wallet as default wallet in the commands that run with json-rpc calls. the -rpcwallet=blah sets the blah wallet as the wallet which command will run on it; how can I simulate the ...
3
votes
1answer
74 views

Why bitcoind will shutdown after encryptwallet?

As mentioned in the bitcoin-cli document for encryptwallet command, bitcoin daemon will shut down after encrypting a new or unencrypted wallet. My question is about the reason for shutting the node ...
2
votes
1answer
987 views

Error parsing JSON in bitcoin-cli signrawtransactionwithkey

I have issues trying to sign a 2/3 multisig tx with the first private key. What am I doing something wrong or am I missing something for the arg? Command format: /usr/bin/bitcoin-cli -testnet ...
1
vote
1answer
38 views

Can not indentify accounts

I am trying to get balance of accounts and when running bitcoin-cli listaccounts I am getting the data look like this { "":0.81234545 } I wanted to know what is the "" and 0.81234545 and where my ...
1
vote
1answer
54 views

Get real fee per transaction

I am trying to get real fee per trasnaction. So I have an account whit balance 0.06940000 and have a second account with balance 0.00000000. To get current fee I have run the command bitcoin-cli ...
0
votes
1answer
136 views

Cant start bitcoind - “Block files have previously been pruned”

I installed bitcoin, following this instructions. I mostly used it with bitcoin-qt -testnet options, even made a few transactions in testnet. I am using the pruned mode. Now I want to run the ...