Questions tagged [bitcoin-cli]

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

Filter by
Sorted by
Tagged with
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
751 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
448 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
913 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
553 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
394 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
293 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
157 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
146 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
720 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
768 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
773 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
360 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
752 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
162 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 ...
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
396 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
760 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
271 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
544 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
641 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
223 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
276 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
360 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
994 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 ...
1
vote
0answers
363 views

How can I run bitcoind and bitcoinclassicd on the same server? [closed]

I want to run full nodes for Bitcoin (bitcoind) and Bitcoin cash (bitcoinclassic). Here are the commands I'm using to run these nodes (I've renamed bitcoin classic tools to bitcoinclassic* and moved ...
1
vote
1answer
2k views

regtest method not found

I have alredy looked at a lot of other similar questions here but they didn't involve my case or the solutions provided did not work for me. I'm trying to work in regtest mode and I'm using bitcoin ...
1
vote
1answer
864 views

Bitcoind how to get my bitcoin cash [duplicate]

So our server has bitcond and we have bitcoin on it. How do we get our bitcoin cash?
1
vote
1answer
1k views

Why 'bitcoin-cli getreceivedbyaddress …' always returns 0?

I've already synchronized about 400.000 blocks, but every time I'm trying to get balance for specific address, e.g. first coinbase address - link: $ bitcoin-cli getreceivedbyaddress ...
1
vote
1answer
2k views

How to pass password with special characters to RPC API via curl?

When I set a simple password in my .conf file rpcuser=user rpcpassword=password I can contact my wallet using curl from the command line like so: $ curl --verbose --user 'user:password' --data-...
1
vote
0answers
501 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
1answer
626 views

Bitcoin Core telling me transaction is not “trusted”

I'm running a full node without the GUI, so I'm controlling it with bitcoin-cli. I sent bitcoin to another address, same as I always do, but this time I can't pull up the transaction on any of the ...
1
vote
0answers
235 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 ...
0
votes
1answer
429 views

Check if an address is new or has been used already

Say, I have an address. I can check if it's watch-only by calling validateaddress. Is there such an easy way to check it that address is new or has been used already?
1
vote
1answer
242 views

How can I run bitcoin-cli with disabled syncing?

I have synced about 200.000 blocks and that's enough for my purposes. So I want to use bitcoincli, but when it runs with enabled syncing (by default), my computer works to slow. How can I disable ...
3
votes
2answers
2k views

bitcoin-cli commands like createrawtransaction not working with json on command line

I am trying to create raw transaction using the createrawtransaction api on testnet using the Windows7 command line. I always get an "error parsing JSON": C:\Users\amjad>bitcoin-cli -testnet ...
2
votes
0answers
30 views

How do I get the addresses of input transactions using bitcoin-cli? [duplicate]

I noticed that the bitcoin-cli getrawtransaction does not show the addresses of input transactions. For example, I execute the following command. bitcoin-cli getrawtransaction ...
2
votes
0answers
168 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.
0
votes
1answer
1k views

bitcoin-cli can't connect to server

I'm trying to put up a simple system for some penetration tests. I have an Ubuntu server 16.04.1 with apache2 and bitcoin. all running "Hiddn service" through tor (and bitcoind proxied 127.0.0.1:9050)....