The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [bitcoin-cli]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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
753 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
352 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
733 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 ...
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
381 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
733 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
256 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
518 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
631 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
218 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
266 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
351 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
985 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
360 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
1k 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
862 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
494 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
611 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
232 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
417 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
235 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
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 ...
2
votes
0answers
165 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)....
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 ...
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
220 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
186 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 ...
2
votes
1answer
488 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. ...
1
vote
1answer
230 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 ...
1
vote
1answer
390 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
137 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
399 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
429 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 ...
6
votes
2answers
1k views

How to detect a fork with bitcoin-cli?

I'm keeping a simple log of blocks, and storing them in an array. When a new block arrives, I add it to the array. Let's say this is my block chain array: E <- tip D C B A Now, say a new ...
2
votes
1answer
353 views

Why does getblocktemplate use priority for transaction selection?

I don't know how getblocktemplate works exactly, but it seems to include transactions based on priority. Selecting transactions based on priority isn't the most profitable method for building a block ...