Questions tagged [bitcoin-cli]

The Bitcoin-Core wallet provides a Command-LIne-Interface (CLI) that can be used to retrieve information from the wallet or to perform certain actions.

This command-line interface is available in the "console" window that can be opened within the Bitcoin-Core graphical User Interface (GUI). The CLI is intended to be used interactively by a person typing commands. The CLI commands are mostly the same as the RPC commands that are available in the Remote Procedure Call (RPC) interface that is intended for use by other programs.

432 questions
10
votes
1 answer

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.
Ian Kelling
  • 271
  • 2
  • 6
3
votes
4 answers

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 idea is to: Call getrawtransaction for each vin, and…
inersha
  • 3,063
  • 1
  • 17
  • 41
2
votes
2 answers

How To Get Master Fingerprint

say I have master private key from dumpwallet command: extended private masterkey: tprv8ZgxMBicQKsPdcg8UJAGEEQM6zQgyxgXXXXXXXX from there, I derived child key using bx hd-private command $ xprv=tprv8ZgxMBicQKsPdcg8UJAGEEQM6zQgyxgXXXXXXXX $ bx…
crybo
  • 31
  • 4
2
votes
2 answers

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: Rewinding blocks... Why does it happen?
user6894661
  • 21
  • 1
  • 4
2
votes
2 answers

Interpreting results from "bitcoin-cli getmempoolinfo"

A bit of a conundrum interpreting the results from "bitcoin-cli getmempoolinfo". Straight from https://chainquery.com/bitcoin-api/getmempoolinfo: getmempoolinfo Returns details on the active state of the TX memory pool. Result: { "size": xxxxx, …
Pressed250
  • 351
  • 1
  • 8
2
votes
1 answer

Is there a way to give `bitcoin-cli` a different default conf directory instead of specifying it each time?

I have changed the configuration directory for bitcoind. However when I make a bitcion-cli request: bitcoin-cli getblockcount I get an error about RPC credentials using ~/.bitcoin/bitcoin/conf So for me to actually run the command with the correct…
tread
  • 176
  • 10
1
vote
2 answers

Why does bitcoin-cli not know about working directory of bitcoind?

I have a /ect/systemd/system/bitcoin.service with the following content and I am wondering, why bitcoin-cli getinfo tells me about a configuration file elsewhere: error: Could not locate RPC credentials. No authentication cookie could be found, and…
bomben
  • 518
  • 2
  • 4
  • 13
1
vote
3 answers

bitcoin-cli getnewaddress

can i customize my address start through getnewaddress? for example instead the address start with 1asdjIOAWJRA i write getnewaddress 1xxxx then it continues as it wish also what's the difference between addresses starting with 1 and addresses…
BTC involver
  • 39
  • 1
  • 7
1
vote
2 answers

bitcoin-cli JSON-serialized error output

Is there a way to make bitcoin-cli output JSON-serialized errors? For example if I do bitcoin-cli getblock foo the output is error code: -5 error message: Block not found I want the output to be something more like: { "error": { "code": -5, …
Chris Arnesen
  • 492
  • 4
  • 7
1
vote
2 answers

RPC getnewaddress error on v 0.20.0

I would like to new address generate with this command bitcoin-cli -testnet getnewaddress "adr1" "p2sh-segwit" but I get this msg: error message: Wallet file not specified (must request wallet RPC through /wallet/ uri-path). Try adding…
sollover
  • 13
  • 4
0
votes
0 answers

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 plethora of Bitcoin addresses already and so if…
Ethan
  • 11
  • 1
0
votes
1 answer

bitcoin-cli decodescript wrong output

If I try to get info in genesis block, there is 1 tx: "scriptPubKey": { "asm": "0496b538e853519c726a2c91e61ec11600ae1390813a627c66fb8be7947be63c52da7589379515d4e0a604f8141781e62294721166bf621e73a82cbf2342c858ee OP_CHECKSIG", "hex":…
0
votes
1 answer

How can I get the bitcoin amount of an bitcoin address which doesn't belong to my wallet?

I am trying to make a query about a bitcoin address's btc amount. As I've read, getreceivedbyaddress rpc command can only be used for the addresses of a wallet that one owns and that command is awallet command. I want to make a query about any…
Efe
  • 407
  • 2
  • 16
0
votes
1 answer

How is someone not able to steal my bitcoin with Dumpprivkey command?

In an online course the instructor told us that anyone can find the private key of a wallet by using dumpprivkey(address), address being the address that is created from the key (which is public in a transaction on the bitcoin chain).He said that…
Efe
  • 407
  • 2
  • 16
0
votes
2 answers

how to track sendtoaddress / sendmany in case of network failure

Suppose you call sendmany or sendtoaddress on bitcoind RPC. Suppose the transaction is created and send to the network, but RPC time out and sender process unable to read the txid. Suppose there are several send to same address with same btc…
Nick
  • 211
  • 2
  • 10
1
2