Questions tagged [bitcoin-cli]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
411 views

Send bitcoin with bitcoin core without syncing to network

I want to use bitcoin-core just for sending bitcoin from my address to another destination address. i don't need the huge history information of blockchain. In fact, I want to run a light-weight ...
0
votes
2answers
2k views

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 ...
0
votes
1answer
101 views

Using importmulti to import a single address to keypool does not work

I create a wallet with private keys disabled. Then use importmulti like so: command curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importmulti", "params":[[{ "scriptPubKey": { "...
0
votes
2answers
456 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
275 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 ...
0
votes
1answer
536 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 ...
0
votes
1answer
40 views

Can I see which bitcoin node sent cli command

If I am running a bitcoin node, and for example I run a sendtoaddress cli command, is it easy for anybody to see what IP that command came from initially
0
votes
1answer
420 views

bitcoin-cli not working

Whenever I try running some command like: bitcoin-cli getinfo The prompt just hangs and does not return anything, similar to SQL interface if you do not enter semicolon. Running only "bitcoin-cli" ...
0
votes
1answer
973 views

createrawtransaction and fundrawtransaction

I use createrawtransaction for create a rawtransaction with [] "zero inputs" and one output. I use fundrawtransaction for populate rawtrasaction with inputs. {"method":"createrawtransaction","params"...
0
votes
1answer
747 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
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
13 views

Possible To --enable-wallet After Syncronization With Blockahin?

I am running bitcoind from the command line (--without-gui) and my system apparently does not have the correct Berkley DB version (4.8+). Therefore, I chose to run the program without the wallet ...
0
votes
1answer
37 views

Problem with bitcoin-cli -datadir flag

I moved my blockchain directory, including bitcoin.conf, to an external drive D:\Bitcoin. Bitcoin Core starts and runs normally using this path, however when I try to use the command line interface, ...
0
votes
1answer
42 views

Set bitcoin fee lower than minimum estimatesmartfee value

Currently when I broadcast transactions, I seem to be unable to do so with a fee below ~10^-4 bitcoin (~$2 at current exchange rate). Any 'conftarget' value between approximately 100 - 1000 yields the ...
0
votes
1answer
28 views

Importaddress and conf

I'm wondering if its possible to add imported addresses into the bitcoin conf file. So, rather than calling the cli with importaddress, I would add the address to the conf file, with say, ...
0
votes
1answer
35 views

In bitcoin-cli getpeerinf call what does “-1” mean as a “synced_headers” or “synced_blocks” value?

Sometimes I see this in getpeerinfo: "synced_headers": -1, "synced_blocks": -1, sometimes it's only synced blocks at -1. What does that mean?
0
votes
1answer
36 views

GetBlockChecked always returning genesis block?

currently I'm exploring Bitcoin source code and I tried to add custom function getblockvalue inside of blockchain.cpp. Purpose of function is to return sum of all transaction outputs inside of a ...
0
votes
1answer
64 views

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 ...
0
votes
1answer
92 views

Use Bitcoin RPC to send from many addresses to single address

I am looking into being able to send coins from specific addresses to a single output address using bitcoin-cli Is this possible? What RPC command would I use? Any chance of an example?
0
votes
2answers
90 views

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 ...
0
votes
1answer
275 views

Compiled version of bitcoind 0.18.1. “Could not connect to the server 127.0.0.1:8332”

When I use the official installed bitcoind 0.18.1 everything works fine. I can use the bitcoin-cli with any comands and don't get any errors. After that when I compiled 0.18.1 myself I can't use any ...
0
votes
1answer
59 views

bitcoincore additional questions

Following up from my previous question, I still have some questions left. Does it really work if I turn off the internet before doing getnewaddress? Will it really give me something real and can get ...
0
votes
1answer
81 views

Correct way to use joinpsbt for manual coinjoin?

I am developing a feature in my app for "manual coinjoins" which follows this as inspiration: https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#Manual_CoinJoin_Workflow I am not an ...
0
votes
1answer
733 views

Bitcoin Core `getaddressesbyaccount` method not found (-32601)

On macOS Mojave I have a full bitcoin node synced using bitcoind. I want to get the public address of the default account (i.e. the empty string ""). So I run bitcoin-cli getaddressesbyaccount "" ...
0
votes
1answer
179 views

Using importmulti with internal set to true does not add any change keys. What am I doing wrong?

First I call: curl --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createwallet", "params":["ColdWallet", true] }' -H 'content-type: text/plain;' http://user:password@127.0.0.1:18332/ ...
0
votes
1answer
559 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
407 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
240 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' ...
0
votes
2answers
176 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 ...
0
votes
1answer
175 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 ...
0
votes
2answers
505 views

Confirm transaction in regtest mode

I'm testing some wallet features on regtest. Here's the sequence so far: cash-cli -regtest generate 101 cash-cli -regtest getbalance 500.00000000 cash-cli -regtest getnewaddress newAddress1 ...
0
votes
1answer
804 views

How to broadcast transaction through Bitcoin-cli on public node

I have my Bitcoin WIF on a mobile application, and I want to use a Bitcoin-cli node running externally on a server to broadcast my transaction request from my mobile device. I cannot use SendToAddress ...
0
votes
1answer
56 views

which indicates the correct total received bitcoins, blockchan.info or bitcoind [closed]

I'm trying to see how much bitcoins I've received via bitcoind's one method, getreceivedbyaddress specifying a certain address, and after knowing the amount of bitcoins, I soon realized that such as ...
0
votes
1answer
269 views

How to get Coinbase Text for newly found block

Websites like blockchain.info and btc.com give Relayed By information to find who found the block. I can see coinbase text in the website https://coin.dance/blocks. Is it possible to get that ...
0
votes
3answers
393 views

Is there a rpc/cli method for payment protocol in bitcoin-core?

I have a full node running bitcoin-core 0.16 bitcoind (not bitcoin-qt). Today I tried and failed to pay a bitpay "secure" payment protocol uri invoice via the cli. The uri was in the form bitcoin:?r=...
0
votes
1answer
214 views

importprivkey in bitgold-cli not importing the expected address

I'm in the process of trying to import an existing paper wallet BTC private key into a Bitcoin Gold node I setup so that I can grab the BTG that was airdropped there, however whenever I try to ...
0
votes
1answer
948 views

bitcoin-cli importprivkey to the same user or different users

If i call the bitcoin-cli importprivkey multiple times, does it import the private key to the same user or to different users? In the bitcoin-cli importprivkey, it does not specify to which user ...
0
votes
1answer
52 views

Ubuntu Bitcoin-cli fee problem

I have installed full node on ubuntu server to make a bitcoin payment processor like Bitpay. I have generated new address for each invoice with $bitcoin->getnewaddress(); As a result, it created new ...
0
votes
1answer
2k views

Bitcoin-cli - error: couldn't connect to server: unknown (code -1)

I have read through a number of posts on here about this error but none seem to solve my problem. I am trying to use Altcoin-cli on my alt-coin (which is an exact clone of the bitcoin source) using my ...
0
votes
1answer
910 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 ...
0
votes
1answer
250 views

get utxo at a certain chain height

I have the reference client running with a complete transaction index. Is it possible to get all UTXO for a certain height of the chain either via bitcoin-cli or some other tool?
0
votes
1answer
420 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 ...
0
votes
1answer
260 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 ...
0
votes
1answer
425 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 ...
0
votes
1answer
511 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?
0
votes
1answer
295 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 ...
0
votes
1answer
147 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....
0
votes
1answer
394 views

Why do you have to search for TXIDs in little-endian?

I understand that when you double-sha256 some transaction data, it will give you the TXID for that transaction. This can then be used in future transaction data when you want to reference an existing ...
0
votes
0answers
22 views

bitcoin-cli sendmany but not shown explorer

I sent bitcoin to 93 people with sendmany function. It made a tx id = "abc7f3f878fe0fff59bd295ea1a7f86c4a13f1ea8bbd3eb52629f040d06069b4" but I couldn't show in bitcoin explorer. I ran ...
0
votes
0answers
19 views

How do I view the list of all existing Unspent Transaction Outputs, not just for my wallet, with Bitcoin Core utilities or any other software? [duplicate]

I'm preparing data for a research/analysis, and I'm a bit new to bitcoin-cli. I need to obtain data for the chart like this: https://www.blockchain.com/charts/utxo-count , with only difference that it ...