We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [bitcoin-cli]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
54 views

How do you run one daemon for multiple users?

I have installed Bitcoin v0.18.1 as user1. Everything is fine, but now I need to let user2 access the same run so he can use bitcoin-cli as well. However, once I log into the VM instance as user2 I ...
2
votes
1answer
19 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
0answers
28 views

Sent some testnet Bitcoin to Bitcoin Core wallet but balance is still zero

I got the testnet Bitcoin address with this command: bitcoin-cli -testnet getnewaddress And here is the Bitcoin address: 2NDtNjDbEiNiKDuAnwyKBmRPQ49NNpesdhE As you can see in blockchain there was a ...
2
votes
1answer
160 views

My first full node - no bitcoin.conf

So I am in the process of downloading the blocks after installing bitcoin on my ubuntu server. I have followed the guide on https://bitcoin.org/en/full-node. Everything is working correctly. Blocks ...
0
votes
0answers
12 views

Why is bitcoin-cli getunconfirmedbalance hanging?

Sometimes when I call bitcoin-cli getunconfirmedbalance, it is instance. Other times it takes 5-10 seconds. Other times it hangs for minutes and I just end up closing it. This is on Google Cloud using ...
1
vote
0answers
27 views

How to add money to my Bitcoin Wallet and send my first Raw Transaction with OP_RETURN using bitcoin-cli

Background So after reading these two articles (Learning Bitcoin from the Command Line and Mastering Bitcoin), I am trying to piece together how I can get my first transaction with OP_RETURN data ...
1
vote
1answer
47 views

Error Signing P2SH-P2WSH MultiSig - “Unable to sign input, invalid stack size (possibly missing key)”

I am trying to create and spend a P2SH-P2WSH transaction using bitcoin-cli but am getting "Unable to sign input, invalid stack size (possibly missing key)" when I try to sign the Multi-Sig transaction ...
1
vote
1answer
26 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]...
1
vote
1answer
27 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 ...
0
votes
0answers
20 views

bitcoin-cli getbalance does not match balance with bitcoin-cli listtransactions

version of bitcoin-cli 0.17.1 when I try bitcoin-cli getbalance I get balance 0.00010471 BTC when I try bitcoin-cli listtransactions "*" 1000000 >aaa.txt and then calculate SUM(receive) -...
1
vote
0answers
12 views

How to fill in the subtractFeeFromOuputs field in fundrawtransaction

I am attempting to use fundrawtransaction, but I am a bit confused on how to populate the subtractFeeFromOutputs field... "subtractFeeFromOutputs": [(json array, optional, default=empty array) A ...
1
vote
1answer
19 views

Calculate Miners Fee before Signing Raw Transaction?

I am attempting to automate the process of sending coins from multiple transactions to a single output and single change address using createrawtransaction I am a bit lost though, because how can I ...
0
votes
1answer
31 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?
1
vote
2answers
89 views

Bitcoin-cli -regtest getaccount, listaccounts, setaccount, method not found

I just setup bitcoind (0.18.1) and put it in regtest mode, I am trying to work with accounts, but the account commands are not found... setaccount jlroberts@mixerregtest:~$ bitcoin-cli -regtest ...
3
votes
0answers
32 views

How to segregate wallet from bitcoin core | Run multiple wallets in different servers on one centralized bitcoin node

I am running bitcoin full node in a centralized server. I have many web applications running in various places. I want to connect this web applications with centralized full bitcoin node. How to ...
1
vote
0answers
54 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
31 views

How do I determine the descriptor of a given Extended Public Key?

I am trying to run the bitcoin-cli getdescriptorinfo on a ypub... extended public key. Every time I do this I receive the message: error code: -5 error message: Invalid descriptor How can I ...
0
votes
2answers
40 views

how to track sendtoaddress / sendmany in case of network failure

Suppose you call sendmany or sendtoaddress on bitcoind RPC. Suppose the transaction is created and send to the network, but RPC time out and sender process unable to read the txid. Suppose there are ...
1
vote
2answers
35 views

Why does bitcoin-cli not know about working directory of bitcoind?

I have a /ect/systemd/system/bitcoin.service with the following content and I am wondering, why bitcoin-cli getinfo tells me about a configuration file elsewhere: error: Could not locate RPC ...
0
votes
2answers
40 views

bitcoin-cli getnewaddress

can i customize my address start through getnewaddress? for example instead the address start with 1asdjIOAWJRA i write getnewaddress 1xxxx then it continues as it wish also what's the difference ...
0
votes
1answer
110 views

Compiled version of bitcoind 0.18.1. “Could not connect to the server 127.0.0.1:8332”

When I use the official installed bitcoind 0.18.1 everything works fine. I can use the bitcoin-cli with any comands and don't get any errors. After that when I compiled 0.18.1 myself I can't use any ...
0
votes
1answer
49 views

bitcoincore additional questions

Following up from my previous question, I still have some questions left. Does it really work if I turn off the internet before doing getnewaddress? Will it really give me something real and can get ...
0
votes
1answer
94 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'...
0
votes
2answers
41 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 ...
0
votes
1answer
34 views

Correct way to use joinpsbt for manual coinjoin?

I am developing a feature in my app for "manual coinjoins" which follows this as inspiration: https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#Manual_CoinJoin_Workflow I am not an ...
1
vote
1answer
112 views

Bitcoin 0.18: how to send bitcoin from one address to another using Bitcoind?

To transfer bitcoin from one account to another address, we have used sendfrom method and which got deprecated in the latest version Bitcoin 0.18.0 Bitcoin sendfrom method On reading the document of ...
0
votes
1answer
29 views

Using importmulti to import a single address to keypool does not work

I create a wallet with private keys disabled. Then use importmulti like so: command curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importmulti", "params":[[{ "scriptPubKey": { "...
0
votes
0answers
37 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
179 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
22 views

How to import multi sig using importmulti correctly?

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

Viewing truly raw but decoded transaction data

I've previously been using bitcoin-cli decoderawtransaction to get human readable bitcoin transaction data but am just learning that it's not only decoding the raw transaction but also adding extra ...
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
34 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
21 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
124 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
33 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 "...
1
vote
1answer
86 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 ...
0
votes
1answer
186 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 ...
0
votes
1answer
53 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
49 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
114 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": "...
0
votes
2answers
129 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 ...
1
vote
1answer
53 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
58 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
54 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 ...
1
vote
1answer
67 views

How to combine separately signed inputs from different users?

With two separate signed raw transactions from two users, how would one go about 'batching' these manually (combining the inputs and outputs into a single transaction)? Is this a viable solution for ...
0
votes
1answer
61 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
82 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
24 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 ...