Questions tagged [bitcoin-cli]

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

Filter by
Sorted by
Tagged with
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 ...
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
756 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
269 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) ...
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
2k views

bitcoin.rpc python library problem

I am working through Master Bitcoin. I got the bitcoin client up and running. I am now trying to access the client from python. In the example, there is a line that says from bitcoin.rpc import ...
1
vote
1answer
542 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 ...
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: ...
0
votes
1answer
638 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 ...
5
votes
2answers
2k views

64: too-long-mempool-chain

I am using bitcoind json rpc api to send bitcoin to multiple bitcoin addresses. I am using sendrawtransaction. When i have 24 unconfirmed payments sent from my account, i can't send anymore because i ...
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....
1
vote
1answer
992 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 ...
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, ...
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 ...
0
votes
1answer
358 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
3answers
2k views

curl returns empty output when json-rpc

I am not able to get JSON-RPC response via curl. It seems like is not accepting requests. My bitcoin.conf rpcuser=USER rpcpassword=PASS server=1 rpcport=9332 Running daemon $ bitcoind -conf=~/....
5
votes
1answer
594 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 ...
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
2answers
421 views

RPC Wallet API methods “getblockhashes” was removed?

I'm testing RPC wallet API methods of Bitcoin 0.13.2, and I realized the method getblockhashes (method returns an array of block hashes for a specified block range ex: between two timestamp) cannot be ...
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
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?
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
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
29 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 ...
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 ...
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.
2
votes
2answers
2k views

How can I import an existing Blockchain.info wallet to bitcoin-cli?

I manage several accounts which I created via Blockchain.info for my webapp. I'm migrating to bitcoin-cli instead of using their API due to the high amount of calls I have to make. I'm a bitcoin-cli ...
0
votes
1answer
227 views

Get outpoint for a transaction

I'm trying to get the outpoint for a transaction but I don't find how to. The pages here and here look like saying that the outpoint must have 36 characters, of what 32 are the TXID and 4 are the ...
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 ...
1
vote
1answer
187 views

GetRawTransaction not returning time

I am trying to write a quick blockchain explorer so that I can lookup transactions on my own server rather than using a 3rd party service - consider this an exercise more than a production service. I ...
3
votes
1answer
911 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 ...
6
votes
1answer
2k views

Can you list receiving addresses in bitcoin-cli?

In bitcoin-qt, there are interfaces for seeing "receiving addresses" which have been generated in the past. I don't see any way to do that in bitcoin-cli.
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)....
1
vote
1answer
625 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
1answer
233 views

bitcoin-cli sendrawtransaction gives odd error 16

When I submit the tx below with bitcoin-cli sendrawtransaction I get the error 16: mandatory-script-verify-flag-failed (Script evaluated without error but finished with a false/empty top stack ...
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
1answer
394 views

Is it possible to read every transaction my node relays?

I'd like to add every valid transaction my node receives to my own database. At the moment, I'm using getrawmempool every second to find new transactions, and then getting the data for them using ...
0
votes
1answer
139 views

How bitcoin node server establishes outbound connections to other full nodes

I installed bitcoin-core (https://bitcoin.org) on my server and run it as testnet. After that I tried to create a new testnet address "miYAFfw8xFEj2VCKKsMCu5L4uCEvC73xh5" at this page: http://tpfaucet....
1
vote
1answer
412 views

How to get more chain tips from getchaintips?

I've just restarted my node. When I run getchaintips, it only gives me 48 tips (the lowest being at a height of 402,609). Does getchaintips only return a limited number of branch tips? If so, is it ...
2
votes
2answers
2k views

Bitcoind error -28

The following CLI command: $ bitcoin-cli getblockcount Gives the following error message: error code: -28 error message: Activating best chain... Any idea what is error code: -28?
2
votes
0answers
433 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
1answer
524 views

createrawtransaction online

createrawtransaction is a bitcoin-cli command that generates a raw transaction given one ore more transaction ids and a list of Outputs, which are the destination amounts that will receive the funds. ...