Questions tagged [bitcoin-cli]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
420 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 ...
1
vote
1answer
29 views

What RPCs can I use to transform an address to a paying script? [closed]

What RPC(s) can I use to transform an address to a paying script (0014<addr>)?
1
vote
1answer
87 views

Permission denied when attempting to backup wallet using backupwallet

When I call bitcoin@raspberrypi:~ $ bitcoin-cli backupwallet "backup.dat", I get the following error: error code: -4 error message: Error: Wallet backup failed! ~/.bitcoin/debug.log shows ...
1
vote
1answer
35 views

How is a multisig transaction transferred between multiple signers?

I'm trying to learn more about doing multisig transactions. The examples I've seen show the signing of the transaction with 2-of-3, or 3-of-3, where the signatures are added, essentially, at the same ...
1
vote
1answer
61 views

How do I start -testnet in -deprecatedrpc to test a script?

I hope all is well during our COVID-19 pandemic. My question: How do I start "bitcoind -testnet" in "-deprecatedrpc=signtransaction" mode? Do I simply start it the same way without ...
1
vote
1answer
55 views

Unable to make custom Bitcoin command

I'm writing a thesis on Bitcoin system and as a part of my assignment i have to explore Bitcoin-core source code. I 've downloaded the code, compiled it and manage to run it. However, I wanted to ...
1
vote
1answer
184 views

Why keys generated in Bitcoin Core mismatch that from online generators despite using the same seed?

I have the following problem in Bitcoin Core. With this command: echo carpet begin bacon master draft fortune food cherry cage axis vault clown | \ bx mnemonic-to-seed | \ bx hd-new -v 70615956 | \ ...
1
vote
1answer
193 views

Calculate Miners Fee before Signing Raw Transaction?

I am attempting to automate the process of sending coins from multiple transactions to a single output and single change address using createrawtransaction I am a bit lost though, because how can I ...
1
vote
1answer
182 views

Viewing truly raw but decoded transaction data

I've previously been using bitcoin-cli decoderawtransaction to get human readable bitcoin transaction data but am just learning that it's not only decoding the raw transaction but also adding extra ...
1
vote
1answer
303 views

When I use importmulti with an xprv it never imports the private keys. What am I doing wrong?

When I call: bitcoin-cli getdescriptorinfo "pkh(tprv8iDvhA6eaMDbRuH3D2DTNuH6N6LvMTVrcv7z6sVxyyYvThSaCSa3i3qFVqUgVL4NbVkACxjx3KPWLoP5jvDU3i16hjTnzEFnZuqsnTJ5F4n/*)" it returns: { "descriptor": "...
1
vote
1answer
691 views

estimatesmartfee outputs very different results

Around block 564815 (2019-02-26 23:40 UTC), the mempool was empty. I noticed that my two nodes are giving very different estimates for transaction fees to be used: Node 1 Version: 17.1.0 Number of ...
1
vote
1answer
321 views

Check number of active peers a node has

I saw here that you can run bitcoin-cli getinfo to see the total number of connections that a node you're running is connected to. Is there a way to get this information remotely? For example, say I ...
1
vote
2answers
691 views

Run Bitcoin and BitcoinCash in same server [closed]

I use debian 9 I have compile 2 files: bitcoinCashd -version Bitcoin ABC Daemon version v0.16.2.0-6af5e93 bitcoind -version Bitcoin Core Daemon version v0.15.1 So i need run in same server. Can ...
1
vote
2answers
808 views

Walletnotify hits twice, immediately

So I've read most of what is tagged with walletnotify, but haven't found a solution. I know walletnotify is supposed to run twice, one for the unconfirmed transaction and again, when it reaches 1 ...
1
vote
1answer
675 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 ...
1
vote
1answer
990 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 ...
1
vote
1answer
3k 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
1answer
197 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 ...
1
vote
1answer
252 views

Is there a way to get the memory pool in order of newest first?

I'm trying to list out the results of getrawmempool by newest transactions first. Here's what I've got: getrawmempool returns the memory pool in order of transaction hash, so I'm using PHP to sort ...
1
vote
1answer
36 views

How to get info for public address from bitcoin-cli + local db? (Can it be done without creating a wallet?)

I just started running my own full node. IBD is finished, and I'm now learning how to use bitcoin-cli. First I would like to extract all the available information for one or more public addresses ...
1
vote
1answer
25 views

Setting the fee rate on regtest, or, quickly generating full blocks

I'm setting up some automated testing for a lightning wallet. At the heart of my tests is a bitcoind instance running in regtest mode. I need to be able to set the fee rate - both the fee rate ...
1
vote
1answer
28 views

Where are getnetworkinfo localservicesnames explained?

Bitcoin-cli getnetworkinfo returns a list of human readable localservicesnames. Where can one find more info about them?
1
vote
1answer
119 views

Change difficulty using bitcoin-cli/bitcoind in regtest mode

Is there an RPC command which would allow me to generate blocks under a given difficulty? For instance, I would like to do something like this: bitcoind -daemon -regtest bitcoin-cli -regtest ...
1
vote
1answer
120 views

Bitcoin Core private key import

I would like to import the private keys from a multisig paper wallet to Bitcoin Core. My aim is to convert the paper wallet to an electronic wallet and to be able to export the corresponding wallet....
1
vote
2answers
73 views

How to raise the bad-txns-vout-negative error?

I wanted to replicate the bad-txns-vout-negative error scenario. I tried the following but getting 'Amount out of range' only: Here is the command i tried: bitcoin-cli -named createrawtransaction ...
1
vote
1answer
223 views

Bitcoin core 0.19.1 RPC, 'sendtoaddress' not working!

Suppose this scenario: There are 2 wallets called wallet1 and wallet1 on the same node in testnet blockchain. wallet1 balance: 0.001 BTC wallet2 balance: 0 BTC I am trying to send 0.001 BTCs from ...
1
vote
1answer
281 views

How to reduce number of inputs in bitcoin transaction?

We have a bitcoin node running on a server which we use to generate addresses to receive small payments from the users. We receive tons of small payments daily right now and then we are using the same ...
1
vote
1answer
183 views

The result of bitcoin-cli getpeerinfo command

When I type bitcoin-cli getpeerinfo in shell, conspicuous property of the result are addr and addrlocal addrbind. 14.xx is my address and others are peer's address. I know that Bitcoin client can do ...
1
vote
1answer
174 views

Error Signing P2SH-P2WSH MultiSig - “Unable to sign input, invalid stack size (possibly missing key)”

I am trying to create and spend a P2SH-P2WSH transaction using bitcoin-cli but am getting "Unable to sign input, invalid stack size (possibly missing key)" when I try to sign the Multi-Sig transaction ...
1
vote
1answer
808 views

bitcoind and bitcoin-cli and bitcoin-qt

following the hackernoon for full node btc, https://hackernoon.com/a-complete-beginners-guide-to-installing-a-bitcoin-full-node-on-linux-2018-edition-cb8e384479ea i have some small questions, is there'...
1
vote
1answer
214 views

Bitcoin 0.18: how to send bitcoin from one address to another using Bitcoind?

To transfer bitcoin from one account to another address, we have used sendfrom method and which got deprecated in the latest version Bitcoin 0.18.0 Bitcoin sendfrom method On reading the document of ...
1
vote
1answer
125 views

How to import multi sig using importmulti correctly?

I create a 2 of 2 with createmultisig using 02254aba14091e45a9067fbe5b225b3863d1c49650226d583dcede06a7c33f8613 and 02ad64a03b7fc53c02f68eac04743b819bfeeabe6ca7007f473dbaf7c3570f5dc9 pubkeys. I then ...
1
vote
1answer
168 views

How to request a list of blocks using bitcoin-cli?

I'm trying to figure out how to use bitcoin-cli effectively to request a list of 50 blocks. As far as I am aware, bitcoin-cli getblock list does not work. Also how to best extract information out of ...
1
vote
1answer
54 views

How to use deriveaddresses via a curl command

I am trying to use curl via SSH to utilize the deriveaddresses bitcoin-cli rpc command. let descriptor = "wpkh(...
1
vote
1answer
132 views

Create a transaction spendable in a specific block height

I am new in Bitcoin and I try to create an address in Bitcoind and send a transaction that the amount will be spendable in a specific height of the blockchain. Here is what I have done: privateKey = ...
1
vote
1answer
57 views

Does bitcoind store timestamp at which private key was imported?

If we import a private key using bitcoin-cli importprivkey <key>, is there anyway to find out when the import was done? I am hoping a timestamp is included.
1
vote
2answers
100 views

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 ...
1
vote
1answer
81 views

Get real fee per transaction

I am trying to get real fee per trasnaction. So I have an account whit balance 0.06940000 and have a second account with balance 0.00000000. To get current fee I have run the command bitcoin-cli ...
1
vote
1answer
570 views

Estimate smart fee returns an error

I am trying to get current fee for per transaction. So running command bitcoin-cli estimatesmartfee 6 i am getting response lookl ike this { "errors": [ "Insufficient data or no feerate found"...
1
vote
1answer
39 views

Can not indentify accounts

I am trying to get balance of accounts and when running bitcoin-cli listaccounts I am getting the data look like this { "":0.81234545 } I wanted to know what is the "" and 0.81234545 and where my ...
1
vote
1answer
851 views

bitcoin-cli not stopping bitcoind

I tried stopping bitcoind using bitcoin-cli stop and got the following error. bitcoin-cli stop error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is ...
1
vote
1answer
1k views

“mandatory-script-verify-flag-failed (signature must be zero for failed check(multi)sig operation)”

I forked the openwallet-android so that I could add my coin - (placeholders) placeh.io. The openwallet-android connects to electrumx server. I am able to get my chain to load correctly in electrumx ...
1
vote
2answers
1k 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', '...
1
vote
1answer
664 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 ...
1
vote
1answer
297 views

bitcoin.conf does nothing for RPC calls

My problem i that I'm trying to communicate my python code with bitcoin-cli (Bitcoin ABC) and I'm suppose to set rpcuser, and rpcpassword on bitcoin.conf file on .bitcoin folder. Right? Well, when I ...
1
vote
2answers
4k 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 -...
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
2answers
458 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
1answer
305 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
801 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 ...