Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [bitcoin-cli]

The tag has no usage guidance.

0
votes
1answer
11 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": "...
0
votes
2answers
37 views

How can I accept Bitcoin as a payment without a 3rd party gateway

I want to create a website where users can pay with Bitcoin. However I want to create my own payment gateway because I do not want to rely on services like BitPay. I want a unique BTC address for ...
1
vote
1answer
26 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
0answers
24 views

how do I mark coins spent in invalid blocks as unspent?

I was just testing bitcoin (v17) in regtest mode with the local, built-in wallet. If I send money to an address (I don't own), generate 1, and then invalidate that block, the local wallet does not ...
2
votes
1answer
31 views

Bitcoin Core What default values should I pass for some positional RPC params in sendtoaddress

I am trying to use the sendtoaddress rpc method of bitcoin core. From the documentation I read that I can pass "estimate_mode" parameter to estimate a fee. However as I believe json rpc follows ...
0
votes
1answer
32 views

How to create the data parameter for a PSBT?

I am sure this is a dumb question but if using: bitcoin-cli walletcreatefundedpsbt "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]" How do you create the data parameter? Where does it ...
1
vote
1answer
42 views

How to combine separately signed inputs from different users?

With two separate signed raw transactions from two users, how would one go about 'batching' these manually (combining the inputs and outputs into a single transaction)? Is this a viable solution for ...
0
votes
1answer
27 views

Bitcoin core's estimatesmartfee gives same estimate on ECONOMICAL and CONSERVATIVE mode

I have observed this behavior several times before now, the commands bitcoin-cli estimatesmartfee 2 ECONOMICAL and bitcoin-cli estimatesmartfee 2 CONSERVATIVE give the same estimates. For example, ...
0
votes
2answers
43 views

What is the best way to create a wallet with a blank keypool then add keys to it?

The scenario is this: User has a cold storage wallet and will import their cold storage xpub into Bitcoin Core using getdescriptorinfo and importmulti. User wants to only use the keys associated with ...
0
votes
1answer
15 views

How to list transactions of an address on omni layer

I want to do something like what omni explorer do (https://omniexplorer.info/). It can list all transactions of a specified
1
vote
1answer
16 views

How does the wallet prioritise keypool addresses imported via importmulti?

I want to use importmulti to import 100 addresses from an xpub descriptor. If I set keypool: true as one of the arguments the keys get added to the keypool. How does the wallet prioritise which keys ...
0
votes
1answer
32 views

How do you import an xprv using descriptors and importmulti?

I have figured out how to import an xpub, but when i use getdescriptorinfo on an xprv: getdescriptorinfo "wpkh(...
1
vote
1answer
19 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(...
0
votes
1answer
19 views

Issuing bitcoin-cli commands via terminal

I am having issues utilizing bitcoin-cli via terminal. For example: DIRECT-8A-HP-OfficeJet-4650:~ peter$ bitcoin-cli deriveaddresses "wpkh(...
1
vote
1answer
20 views

bitcoin-cli deriveaddresses always returns an error

I am copying and pasting the example from the bitcoin-cli help: deriveaddresses "wpkh([d34db33f/84h/0h/0h] ...
0
votes
1answer
22 views

Check when transaction was added to the mempool?

I know how to check when a specific transaction was included in the block. But how do I check when my bitcoind node first saw it? I would like to estimate for how long the transaction stayed ...
1
vote
1answer
108 views

Can a BIP39 12-word mnemonic be used to restore a wallet through bitcoin-cli?

I could not find documentation on using a 12-word BIP39 Mnemonic to restore a wallet through bitcoin-cli. It seems that importprivkey might be the right RPC call but when I provide the 12 words, it ...
1
vote
1answer
32 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 = ...
0
votes
0answers
28 views

banning nodes through bitcoin-cli in Windows

I'd like to use Greg Maxwell's banlist for my Bitcoin node in Windows. When I enter the commands however, I receive the following error message for every bitcoin-cli command: bitcoin\bin>bitcoin-...
0
votes
1answer
68 views

Bitcoin Core 0.17 sethdseed then dumpwallet how to recompute extended private masterkey?

Using bitcoin-cli -datadir=X sethdseed true "WIF_KEY" the current wallet within datadir is updated Then, using bitcoin-cli -datadir=X dumpwallet my_dump.txt shows a fresh new # extended private ...
0
votes
1answer
34 views

Bitcoin Core change derivation path with getnewaddress cmd 0.17

As I'm building a simple HD wallet, I would like to use bitcoin core regtest. My goal is to setup a testing flow where I could have constant seeded address each time I use bitcoin-testnet-box, so that ...
0
votes
0answers
13 views

Is their a way to use Bitcoin's Testnet/LN Testnet within CLI without downloading Bitcoind?

I'd like to start working with Bitcoin's & Lightning's Testnet but don't want to download bitcoind on my current computer.
0
votes
1answer
110 views
0
votes
1answer
55 views

litecoin-cli: how to get block's txs?

Hi I am querying via rpc litecoin-cli. There are some differences from bitcoin-cli that I immediately found and can't figure out how to know : txs, outs, ins fees/txs: min, mid, max of the block? ...
1
vote
1answer
96 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 ...
0
votes
1answer
97 views

How find own address in testnet using bitcoin-cli?

I have bitcoin-core installed, I am running it in testnet mode. Now if I want to fund my wallet, I need to know the receiving address. How do find my receiving address, so that I can fund it and then ...
0
votes
1answer
91 views

Bitcoin curl no reply

Hi I have made a curl to my server but get no reply . What am a missing rpcuser=rpcusername rpcpassword=rpcpassword rpcauth=rpcusername:generatedkey daemon=1 server=1 rpcport=8332 rpcbind=0.0....
0
votes
0answers
19 views

How to Send BTC from vmnode address to local address using privatekey in testnet?

I created two bitcoin address in VM nod as well as local and dump privatekey for both addresses by using "dumpprivkey" command. Is there any posibitity to send BTC from bitcoin address which is ...
1
vote
1answer
40 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.
0
votes
1answer
47 views

How do I backup my wallet with bitcoin-cli over RPC?

hendry@knuckles ~ $ bitcoin-cli backupwallet /home/hendry/backup.dat error code: -1 error message: boost::filesystem::status: Permission denied: "/home/hendry/backup.dat" Reddit couldn't help me ...
0
votes
1answer
86 views

Can't use bitcoin-cli commands, error message says “could not connect” from localhost

I am simply trying to run bitcoin-cli getinfo on the same machine that my bitcoin node is running on (with bitcoind -daemon) my bitcoin.conf file is as follows: server='1' rpcuser='username' ...
1
vote
1answer
98 views

Passing a wallet to rpcwallet in bitcoind JSON RPC

I want to set a wallet as default wallet in the commands that run with json-rpc calls. the -rpcwallet=blah sets the blah wallet as the wallet which command will run on it; how can I simulate the ...
3
votes
1answer
47 views

Why bitcoind will shutdown after encryptwallet?

As mentioned in the bitcoin-cli document for encryptwallet command, bitcoin daemon will shut down after encrypting a new or unencrypted wallet. My question is about the reason for shutting the node ...
0
votes
2answers
51 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 ...
2
votes
1answer
512 views

Error parsing JSON in bitcoin-cli signrawtransactionwithkey

I have issues trying to sign a 2/3 multisig tx with the first private key. What am I doing something wrong or am I missing something for the arg? Command format: /usr/bin/bitcoin-cli -testnet ...
0
votes
2answers
74 views

how to split transactions based on send and receive Json rpc bitcoin

I am creating new wallet for bitcoin and want to know how we can get the separate list of send and receive transactions using JSON rpc. I cant see any method for json rpc that give list of send and ...
1
vote
2answers
84 views

Specified data directory does not exist - but it does…

anyone ever had a similar issue where the directory exists but bitcoin-cli isn't recognizing it? Perhaps this is related to me setting the folder up as a symlink to my external HDD? Thank you! ...
0
votes
1answer
90 views

Cant start bitcoind - “Block files have previously been pruned”

I installed bitcoin, following this instructions. I mostly used it with bitcoin-qt -testnet options, even made a few transactions in testnet. I am using the pruned mode. Now I want to run the ...
1
vote
1answer
44 views

Bitcoin-cli how to createrawtransaction without spending entire input?

Is there any possible way to create a raw transaction using Bitcoin-cli createrawtransaction API that doesn't require spending the entire input? What I'm doing now is consuming that entire input ...
1
vote
1answer
150 views

Bitcoin-cli createrawtransaction with 3 outputs example

Is this possible to do? I am trying to create a transaction with 1 input that will have 3 outputs. I tried: bitcoin-cli createrawtransaction "[{\"txid\":\"...
0
votes
1answer
99 views

Bitcoin-cli getbalance returning negative value

I am running: bitcoin-cli getbalance username 1 It is returning -37.01 How is it possible for an account to be negative? Is this a bug or do I need to add stricter security when performing a send to ...
2
votes
2answers
422 views

Bitcoin sendfrom and sendtoaddress

I am using bitcoin daemon in my system to get and pass btc to users. So now I want to pass some btc to another users but I can not understand what is the difference between sendfrom and sendtoaddress. ...
1
vote
0answers
20 views

Label Sent Bitcoin Transaction [duplicate]

Is it possible to add a label to a sent bitcoin transaction using the bitcoin-cli?
1
vote
1answer
46 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
245 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
36 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
0answers
19 views

Paying to one address using inputs from multiple addresses under same seed

I am using bitcoin core and I was wondering. If I make a bitcoin payment using bitcoin-cli which has about 50 addresses registered to it. If the payment is for 1 BTC and I pay from the address A1 (let'...
1
vote
1answer
284 views

RPC Command to send from multiple accounts to one account (default - “”) in same wallet

I have small amounts in multiple accounts in the same wallet. I want to send all of them to default account (usually named as ""). Is their any RPC command available for this scenario? Thanks in ...
1
vote
0answers
22 views

Is there a “print to file” parameter or its equivalent for bitcoin-cli; so that results from the daemon are recorded

Is there any way to "print to file" the queried results of the bitcoin-cli. This would be most helpful in my basic cross platform integration of a program I am making with QB64.
0
votes
1answer
209 views

Manage multiple users wallets for web wallet service

This already summaries the issue I'm currently trying to figure out to calculate the transaction fee to prevent negative balance. (testnet) I tried using createrawtransaction answered. When I tried ...