Questions tagged [bitcoin-cli]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
305 views

What is the difference between bitcoin core vs bitcoinj vs bitcoind vs bitcoinqt?

What is the difference between bitcoin-core vs bitcoinj vs bitcoind vs bitcoin-tx vs bitcoin-cli vs bitcoinqt? There are many github repo with different names around bitcoin. Can someone really help ...
7
votes
1answer
4k 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. ...
0
votes
1answer
229 views

bitcoin-cli not working

Whenever I try running some command like: bitcoin-cli getinfo The prompt just hangs and does not return anything, similar to SQL interface if you do not enter semicolon. Running only "bitcoin-cli" ...
5
votes
1answer
552 views

Bitcoin Core coin control via RPC (CLI)

Bitcoin Core introduced nice Coin Control feature accessible via the GUI client. To my surprise though, I don't see any obvious way how to make use of Coin Control via RPC/bitcoin-cli. How can I pick ...
2
votes
1answer
340 views

Bitcoind with -txindex=1 still no mempool transactions

I'm reading through Mastering Bitcoin and trying to follow along the examples. When I first initialized bitcoind, I set txindex=1 in my bitcoin.conf file. In a later example I was unable to ...
0
votes
1answer
338 views

bad-txns-nonstandard-inputs error after sendrawtransaction

I smashed my head over the table trying to send raw transaction and every time get the same error bad-txns-nonstandard-inputs. So, here is what I do: Get unspent transactions bitcoin-cli ...
1
vote
0answers
153 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 ...
15
votes
1answer
11k 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, ...
0
votes
1answer
46 views

Ubuntu Bitcoin-cli fee problem

I have installed full node on ubuntu server to make a bitcoin payment processor like Bitpay. I have generated new address for each invoice with $bitcoin->getnewaddress(); As a result, it created new ...
0
votes
3answers
263 views

Is there a rpc/cli method for payment protocol in bitcoin-core?

I have a full node running bitcoin-core 0.16 bitcoind (not bitcoin-qt). Today I tried and failed to pay a bitpay "secure" payment protocol uri invoice via the cli. The uri was in the form bitcoin:?r=...
1
vote
2answers
760 views

PHP functions not working in bitcoin JSON-RPC version 16 (bitcoin-cli is working properly)

Trying to implement Bitcoin JSON-RPC using Digital Ocean Ubuntu using bitcoin version 16. Here is my php code <?php require_once('easybitcoin.php'); $bitcoin = new Bitcoin('someusername', '...
3
votes
0answers
4k 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 ...
2
votes
3answers
403 views

Most efficient way to calculate fee from getrawtransaction?

I would to get the fee when I search for a transaction using getrawtransaction, but the JSON-RPC does not return this. https://chainquery.com/bitcoin-api/getrawtransaction So to achieve this, my ...
0
votes
1answer
1k views

Bitcoin-cli - error: couldn't connect to server: unknown (code -1)

I have read through a number of posts on here about this error but none seem to solve my problem. I am trying to use Altcoin-cli on my alt-coin (which is an exact clone of the bitcoin source) using my ...
0
votes
1answer
638 views

How to get bitcoin wallet name from bitcoin address

In http://bitcoinwhoswho.com/ , we can find wallet name from bitcoin address, how do they do so? Is there any signature of wallet name in bitcoin address or in transaction id?
1
vote
1answer
360 views

explain decoderawtransaction output fields and interpretation

I am trying to obtain information about a raw transaction in hex before it is broadcasted. This command multiple elements JSON formatted. I'd like a simpler explanation for them: txid - hash of the ...
3
votes
1answer
875 views

searchrawtransactions in bitcoin-cli returning “Method not found” error

some days ago I installed bitcoin core patched with the addrindex option ( btcdrak version ), after indexing the entire blockchain for 5 days, I tried to use the searchrawtransactions parameter on ...
0
votes
1answer
463 views

bitcoin-cli says transaction amount and balance are 0, but that's not the case

I imported a few TestNet addresses and sent some funds to one of them. When I run bitcoin-cli getaccount mvKoQLrzovNbgALa2D7prh9pagd2QUKpWo it responds with the account I named it to. I sent 1....
1
vote
1answer
323 views

Error sending SegWit transaction: error code: -26 using bitcoin-cli

I'm trying spend funds that were sent to an SegWit address I created with the bitcoin-cli addwitnessaddress <P2PKH address> command. The segwit address created was ...
0
votes
1answer
249 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 ...
0
votes
1answer
140 views

importprivkey in bitgold-cli not importing the expected address

I'm in the process of trying to import an existing paper wallet BTC private key into a Bitcoin Gold node I setup so that I can grab the BTG that was airdropped there, however whenever I try to ...
1
vote
2answers
1k views

bitcoin-cli getinfo error code: -28

OSX Sierra it seems all the other command bitcoin-cli working on my Mac, except, bitcoin-cli getinfo only always returns an error. $ bitcoin-cli getinfo error code: -28 error message: ...
2
votes
1answer
145 views

What does it mean when a confirmed transaction gets reversed?

I am using bitcoin-cli to do verification of transfer. From the wiki, it mentions that a transaction has a higher confidence in confirmation after 6 blocks deep. However, a block that is put into the ...
0
votes
1answer
619 views

bitcoin-cli importprivkey to the same user or different users

If i call the bitcoin-cli importprivkey multiple times, does it import the private key to the same user or to different users? In the bitcoin-cli importprivkey, it does not specify to which user ...
0
votes
1answer
684 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"...
1
vote
1answer
5k views

Could not locate RPC credentials Error

I am trying to follow the instructions in the following post: Check status of daemon When I try to run bitcoin-cli getblockchaininfo I get the following error: When I look for the configuration file....
2
votes
1answer
1k views

What Do SegWit Addresses Look Like?

Probably a question that has been asked a lot before, but how do I know if an address I generate with bitcoind and bitcoin-cli is SegWit? I take the following steps to (attempt to) generate a SegWit ...
0
votes
1answer
720 views

Get public key of SegWit address

I'm using bitcoin-cli and I need to get the public key of one of my SegWit addresses. My first attempt was to use 'validateaddress' command and take the 'scriptPubKey' field but that doesn't seem to ...
2
votes
1answer
3k views

How to find bitcoin balance via command line

I'm wondering how to find the balance a wallet for a full node on a command-line only linux box. bitcoin-cli doesn't seem to help here, and I'm not sure what else to try.
0
votes
3answers
2k views

CLI: Generate a new private key, unrelated to any existing wallet

I have a wallet on an offline computer, which has too many backups on connected computers. I would like to generate a totally new bitcoin address on the offline computer, and use it as a cold ...
0
votes
1answer
338 views

Share a common wallet.dat file between two servers

Note this is not duplicate of Is there a way to change the wallet.dat location without changing the entire data directory? I want to change wallet.dat file location. From the above link it seems to ...
1
vote
1answer
1k views

getrawtransaction seems to only work for certain transactions

I am working through mastering bitcoin. I am confused by getrawtransaction. I would like to look at the first transaction in block 277316. from bitcoinrpc.authproxy import AuthServiceProxy, ...
5
votes
2answers
696 views

Why are some Bitcoind commands comparatively slow?

For example, running bitcoin-cli getbalance <address> on an arbitrary, watch-only address takes around 6-7 seconds for a response. Is there any way to improve the response time? How do API ...
1
vote
0answers
158 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
2answers
2k views

Get hex string for a public address

If I want to watch a public address, I need the hex string for that address, because the importpubkey command only takes a hex input. How can I convert a base 58 address to a hex string using the ...
0
votes
0answers
233 views

bitcoin-cli closes immediately [on hold]

I have installed the BitcoinABC client on my computer, and tried to set up the node, with no success. This is how I run my server: start bitcoind.exe --server=1 --rpcuser=user --rpcpassword=password ...
2
votes
1answer
1k views

Transaction fee required by bitcoin-cli keeps increasing as I increase the fee

I am using bitcoin-0.13.0 and trying to send 0.035 btc to someone. ./bitcoin-cli [auth] sendtoaddress XXX 0.035 Error: This transaction requires a transaction fee of at least 0.00150835 because of ...
3
votes
2answers
2k 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'...
1
vote
2answers
360 views

Difference between account balance and the sum unspent transaction outputs

I have account in bitcoin-core (for example it's "maks") and there I have 0.00010884 BTC. getbalance "maks" 0.00010884 But when I get UTXO: listunspent 1 999999 [...array of addresses belongs to "...
1
vote
1answer
687 views

How much memory(RAM) is used by the mem pool 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 does each database take in ...
0
votes
1answer
235 views

Get OP_RETURN from bitcoin-cli

Is there a way to extract old OP_RETURN transactions from the commandline with bitcoin-cli or something? Something in the way of getAllOpRetFromBlock(345345) ...
2
votes
2answers
3k views

How to send btc from the specific address using bitcoin api?

I'd like to send bitcoin from the specific address to a address using bitcoin api. I used 'sendfrom' as follows. Each address "mqXhhivMPjeVvdVMR239EVDJiRGQUYcbDZ" and "...
1
vote
1answer
475 views

getblockcount is returning incorrect count

I am very new to bitcoin but finally managed to get it all installed and compiled. I am following along with Mastering Bitcoin. There is an example to use getrawtransaction as follows: bitcoin-cli ...
0
votes
1answer
609 views

Bitcoin Core 0.15 reindexing blockchain looks like its hanging?

and run bitcoind and bitcoin-cli from source so i can start messing around with some of the api calls and hopefully develop some cool stuff. Unfortuantely running bitcoind says i must reindex the ...
0
votes
1answer
212 views

Why, when sending BTC to my pruned node's generated wallet, the BTC aren't showing there?

:) I'm starting development on a PHP project that involves creating a Bitcoin server, creating and managing wallets, etc. I've created a selfish-node (550 MiB of the blockchain) on Ubuntu 14 with ...
1
vote
1answer
3k views

bitcoin-cli failed with error: incorrect rpcuser or rpcpassword

When I run this command bitcoind -testnet -printtoconsole -rpcuser=123456 -rpcpassword=123456 After bitcoind is up. I run this on the same Ubuntu 17.10 bitcoin-cli -testnet -rpcuser=123456 -...
2
votes
1answer
254 views

Encrypted bitcoin private key from bitcoin-cli

Hi I need to know the command which is used to generate encrypted bitcoin private key from bitcoin-cli (for a bitcoin address) so in future when that private key is used for import address in any ...
6
votes
1answer
2k views

What are the hex and asm field values in the JSON decoded from a raw transactions?

I used the command line bitcoin-cli decoderawtransaction <hex-value> and got back a JSON output (see below). However, I noticed there are hex and asm fields that are themselves hex values (at ...
0
votes
1answer
338 views

Bitcoind clear / reset my testnet to retest some things

I'm running bitcoind on centos and want to reset my testnet. I tested one way and now I want to test something else a different way. For example, I want to clear it so when I do: bitcoin-cli ...
1
vote
1answer
958 views

Spend Segwit address output

I want to create a segwit transaction using bitcoind on testnet2. For this I created a P2SH-P2WPKH address as mentioned here and sent coins to it. Now, how do I create a segwit transaction to spend ...