Questions tagged [bitcoin-cli]

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

61 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
1answer
187 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 ...
3
votes
0answers
60 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 ...
3
votes
0answers
5k views

bitcoin-cli - "error: couldn't connect to server" [solved as per comment]

I have bitcoind 0.13.1 running on a Raspberry Pi. I can see it on the bitcoin network using bitnodes.21.co but I can't connect to it locally with bitcoin-cli. My bitcoin.conf is: rpcuser=xxx ...
3
votes
0answers
170 views

Electrum via command-line: can generic blockchain info be requested?

For example can I ask the Electrum client via it's API what the height or version of the latest block is? Looking through the docs all I currently see is wallet commands.
3
votes
1answer
1k views

bitcoin-cli very slow to respond to RPC calls (Raspberry Pi)

Running Bitcoin 0.11 on Raspberry Pi 2 (Quad core 900MHz 1GB RAM, 128GB Flash Drive for blockchain, 8GB SD Card for OS and software). Blockchain is fully synced, 13 connections. In htop, I see I'm ...
2
votes
0answers
92 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 ...
2
votes
0answers
53 views

How to manually compute a descriptors checksum?

In the docs it says: The checksum for a descriptor without one can be computed using the getdescriptorinfo RPC. I would like to build a recovery tool where many descriptors are imported, calling ...
2
votes
0answers
489 views

vout value in createrawtransaction

I have been following the Bitcoin Core tutorial on creating a simple raw transaction from an offline computer using the CLI. The part on createrawtransaction indicates that the raw transaction should ...
2
votes
0answers
666 views

Mempool filled with 14KB transactions, tons of inputs, 0.15 mBTC fee

With the blockchain experiencing extremely high transaction volumes (most blocks at the 1MB size limit), I am interested in studying the "backlog" of transactions in the memory pool on my own full ...
1
vote
0answers
35 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?
1
vote
1answer
50 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 ...
1
vote
0answers
11 views

locktime in getrawtransaction method in bitcoin-cli

what is different between Time, BlockTime and Locktime in " Getrawtransaction " method in bitcoin CLI? Actually I want to know that is locktime. Please help me :)
1
vote
0answers
78 views

listreceivedbyaddress does not return any information about change addresses, is there any alternative?

listreceivedbyaddress does not return info about change addresses (m/84'/1'/0'/1/*) , only about receiving addresses (m/84'/1'/0'/0/*). I've found out that getreceivedbyaddress "address" ...
1
vote
1answer
141 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....
1
vote
0answers
36 views

CLI tool to sign a transaction using a private key in an offline computer

My Problem Consider an offline computer that has a list of private keys for bitcoin addresses. The computer has some flavor of Linux installed on it, so it can run common CLI tools and Python scripts. ...
1
vote
0answers
74 views

Can a 0 confirmation Bitcoin Core change output be spent?

I have a Bitcoin Core wallet which has a utxo which I spent from, in a transaction where around 1% was sent to an external wallet address, with the ~99% change output remaining in the wallet, sent to ...
1
vote
0answers
160 views

Getting "N5boost10filesystem16filesystem_errorE" error when running bitcoin-cli

Backstory I'm running Bitcoin Core 0.20.1 on a Raspberry Pi 4 (running Raspberry Pi OS standard). It's just a standard install of Bitcoin Core, I built from source and installed into /home/pi/.bitcoin ...
1
vote
1answer
345 views

bitcoin-cli how to verify balance

I've read that addresses alone are a "confusing" way to think about "where" bitcoins "are". Nonetheless I was formerly (2018) able to correlate what I got from bitcoin-...
1
vote
1answer
159 views

listunspent rpc/cli command doesn't seem to list unspent unconfirmed transactions for watch-only addresses

I am unable to list unspent unconfirmed transactions for watch-only addresses. Once the transaction gets at least 1 confirmation it gets included in the returned result. This is the command I am ...
1
vote
0answers
21 views

RPCConvertValues() call error

I'd like to call RPC programmatically, instead of using bitcoin-cli. when I call the function RPCConvertValues(), it always raise error RPCConvertValues() is defined here : https://github.com/...
1
vote
0answers
301 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
0answers
100 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", "...
1
vote
0answers
327 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-...
1
vote
0answers
53 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 ...
1
vote
2answers
545 views

Specified data directory does not exist - but it does...

anyone ever had a similar issue where the directory exists but bitcoin-cli isn't recognizing it? Perhaps this is related to me setting the folder up as a symlink to my external HDD? Thank you! ...
1
vote
0answers
21 views

Paying to one address using inputs from multiple addresses under same seed

I am using bitcoin core and I was wondering. If I make a bitcoin payment using bitcoin-cli which has about 50 addresses registered to it. If the payment is for 1 BTC and I pay from the address A1 (let'...
1
vote
1answer
750 views

RPC Command to send from multiple accounts to one account (default - "") in same wallet

I have small amounts in multiple accounts in the same wallet. I want to send all of them to default account (usually named as ""). Is their any RPC command available for this scenario? Thanks in ...
1
vote
0answers
22 views

Is there a "print to file" parameter or its equivalent for bitcoin-cli; so that results from the daemon are recorded

Is there any way to "print to file" the queried results of the bitcoin-cli. This would be most helpful in my basic cross platform integration of a program I am making with QB64.
1
vote
0answers
162 views

getblockchaininfo timeout using API only

Thanks in advance. If I call getblockchaininfo through bitcoin-cli it just works. It might take a while but it works all the time. If I call it from within a Python Script from bitcoin.rpc import ...
1
vote
0answers
195 views

Bitcoin-cli using getblock to retrieve historical data

I have recently set up a bitcoin node using bitcoind and want to perform some historical queries on the blockchain using getblock with verbosity set to 2. I am using the default bitcoin.conf file but ...
1
vote
0answers
181 views

Bitcoin RPC - settxfee specific amount rather than based off transaction size?

How am I able to use the "sendfrom" command with a specific amount of 0.0005 BTC as fees no matter how small or big the transaction is in bytes? settxfee is based off fees per bytes.
1
vote
0answers
565 views

"Error: Invalid RPC method" when i try to create block in regtest mode

I use Ubuntu. After i run bitcoind -regtest -daemon I tried to create blocks by running command: bitcoin-cli -regtest generate 101 And it returned error like this: Error: Invalid RPC method ...
1
vote
0answers
269 views

Transaction instantly rejected trying to send from bitcoin-cli

Trying to send bitcoins with this command: bitcoin-cli sendfrom accountdos 1HC...kgT 0.03233376 1 I get this error immediately: The transaction was rejected! This might happen if some of the coins in ...
1
vote
1answer
113 views

How can I pass Multiple addresses in Move command

I have to pass multiple addresses in move command but I am not able to pass as it is not accepting more than one wallet address Is there is any another way to move the balance to multiple addresses.
0
votes
1answer
41 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("...
0
votes
1answer
31 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 ...
0
votes
1answer
50 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/ ...
0
votes
0answers
30 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. ...
0
votes
0answers
30 views

Need to configure Bitcoin RPC bitcoin.conf for production ecosystem

hello I'm building a little exchange website and need a simple solution to integrate via api, I'm looking for something that allows bitcoin payments to be sent to bitcoin addresses for users who will ...
0
votes
0answers
30 views

bitcoin-cli sendmany but not shown explorer

I sent bitcoin to 93 people with sendmany function. It made a tx id = "abc7f3f878fe0fff59bd295ea1a7f86c4a13f1ea8bbd3eb52629f040d06069b4" but I couldn't show in bitcoin explorer. I ran ...
0
votes
0answers
34 views

How do I get the signature and how do I apply it onto my transaction using bitcoin-cli?

Guide link: https://comit.network/blog/2018/06/23/connect-all-the-blockchains/ For context I'm following a guide I found online about how to create a HTLC (Hash-time lock contract) and have it work ...
0
votes
1answer
89 views

-regtest generate 101 not working

when I type bitcoin-cli -regtest generate 101 in the powershell it gives me this error: PS C:\Program Files\Bitcoin\daemon> ./bitcoin-cli -regtest generate 101 error code: -32601 error message: I ...
0
votes
0answers
26 views

Allowip block local cli command?

I am new to bitcoin node, recently I tried to running my node with rpcbind and rpcallowip, with the setting of rpcbind and rpcallowip, I am not able to stop the node with locall cli... error: server ...
0
votes
1answer
67 views

Difference between createmultisig and addmultisigaddress on v 0.20.0?

What is difference between createmultisig and addmultisigaddress? I ran 2 methods for 2 same bitcoin address on bitcoin-cli but gives different addresses as multisig to me. the results are as follows: ...
0
votes
0answers
13 views

Transactions with Bitcoin Mockup/Method

As I haven't got many resources I am unable to test this method however before I spend the time investing in servers and such, I would like to show my idea as to how I will be handling a payments ...
0
votes
0answers
28 views

Bitcoin-cli transaction viewing

I am attempting to create my own Bitcoin API for a website I have been building over the recent years and I need some sort of transaction system to handle payments with Bitcoin. I currently own a ...
0
votes
0answers
60 views

Problems Setting a Transaction Fee on a Per Transaction Basis Bitcoind

I've spent hours and hours trying to find a solution to this problem, with no success. Using Bitcoin Core on a Linux machine, so using bitcoin-cli to process commands back to the daemon. Here's what ...
0
votes
1answer
68 views

Will bitcoind import private keys for multi-sig descriptor with watch-only flag set to true?

I am importing a "warm" multi-sig quorum into bitcoind using importmulti like so: {"jsonrpc":"1.0","id":"curltest","method":"importmulti","params":[[{ "desc": "sh(multi(2,[eb2d2f9e/44'/1'/0']...
0
votes
1answer
112 views

bitcoin-cli decodescript wrong output

If I try to get info in genesis block, there is 1 tx: "scriptPubKey": { "asm": "...
0
votes
0answers
139 views

Getting blockhash using bitcoin-cli command in shell

Currently, my node is syncing blocks and tip(height) is 230000. At this point, if I use command bitcoin-cli getblockhash 230000, the return information will be successful but, if I use bitcoin-cli ...