Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [bitcoin-cli]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
40 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
22 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
0answers
13 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
11 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
17 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
30 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
58 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
30 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
48 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
27 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
36 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
34 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
30 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
95 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
48 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
70 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
39 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
32 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
104 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
26 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
31 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
154 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
41 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
28 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
19 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
100 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
31 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
61 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
157 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
50 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
38 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
107 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
113 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
47 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
52 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
49 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
55 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
57 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
76 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
23 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
72 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(...
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(...
0
votes
1answer
27 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(...
1
vote
1answer
84 views

bitcoin-cli deriveaddresses always returns an error

I am copying and pasting the example from the bitcoin-cli help: deriveaddresses "wpkh([d34db33f/84h/0h/0h] ...
0
votes
1answer
44 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
324 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 ...