20
votes
What is chainwork?
Pieter's answer is good, the chainwork value is the expected work amount in the chain, expressed as a 32 bytes integer, for the double SHA-256 hashes calculation work.
The chainwork is used to ...
15
votes
json-rpc via curl
I got it to work by adding the password to the --user value, separated with ":".
So the example becomes:
curl --user bitcoinrpc:xxxxxxxxxxxxxxx --data-binary '{"jsonrpc":"1.0","id":"curltext","method"...
15
votes
Accepted
What is chainwork?
The chainwork value is really just the total amount of work in the chain.
It is the total number of hashes that are expected to have been necessary to produce the current chain, in hexadecimal.
...
15
votes
Accepted
How to generate SegWit address
How do I generate a SegWit address using Bitcoin Core CLI?
You can use addwitnessaddress addr, where addr is an existing P2PKH or P2SH address of yours. It will construct a P2SH-P2WPKH or P2SH-P2WSH ...
12
votes
error : incorrect rpcuser or rpcpassword (authorization failed)
I was having the same problem and just managed to fix it now.
Since the file bitcoin.conf does not exist inside ~/.bitcoin, Just create one.
Here's what did:
vi ~/.bitcoin/bitcoin.conf
Enter ...
11
votes
How to check if the block chain is up to date using bitcoind or json-rpc?
Bitcoind no longer supports RPC calls. Try:
watch bitcoin-cli getblockchaininfo
When the displayed number of blocks equals the displayed number of headers, you're synced!
11
votes
Why is JSON-RPC over SSL "strongly discouraged"?
The RPC interface isn't designed to be used in any scenario which would require SSL, which would be access over the internet or other untrusted networks. It doesn't have the necessary denial of ...
10
votes
Accepted
rpcallowip=192.168.0.* ?? invalid configuration
You want to use 192.168.0.0/24. That's CIDR notation for 192.168.0.*.
10
votes
Accepted
How does the electrum wallet 'payto' command work
There is one more step to actually process the transaction, you have to broadcast it. What you have got is a signed transaction which you can save (& even send to someone else to broadcast).
The ...
8
votes
Accepted
How to get the immature balance of an account?
Using the listtransactions command, you can see your immature coinbase transactions listed with category immature.
listtransactions appears to include both spent and unspent transactions in general, ...
8
votes
Does bitcoind accept batch RPC calls?
Yes, this is supported. As specified by JSON-RPC 2.0, you can send in an array of requests, and receive an array of solutions.
8
votes
How to check if node is on TestNet or MainNet via `bitcoin-cli`?
Before version 0.16.0:
$ bitcoin-cli getinfo
{
"version": 120100,
"protocolversion": 70012,
"walletversion": 60000,
"balance": 0.00000000,
"blocks": 414105,
"timeoffset": -165,
"...
8
votes
How to check if an output has been spent?
If gettxout returns something, the output is unspent. If it returns nothing, the output either never existed or is spent.
You do not need -txindex for this.
8
votes
Accepted
Why does importmulti not support zpub and ypub?
The "xpub" format was defined by BIP32. It's a standard that specifies how to derive public keys from master public keys and seeds. Parts of it are widely adopted, some parts aren't. However, it does ...
7
votes
Add a Watch-only Wallet in Bitcoind
As of bitcoind v10, there is support for watch-only addresses. A bitcoin address is sufficient. The bitcoin-cli command is:
bitcoin-cli importaddress "address" ( "label" rescan )
Where "address" is ...
7
votes
Accepted
Determine address balance using bitcoin core
AFAIK, this can't be done in any reasonable way with Bitcoin Core and its derivatives.
The only way I know to do it with Bitcoin Core is to use importaddress or importmulti to add your address(es) to ...
6
votes
Accepted
Where can i get all the commands with descriptions for Bitcoind on my linux server?
These days the most thorough and handy guide for the Bitcoin Core RPC commands is the bitcoin.org developer reference page.
6
votes
listsinceblock parameter: target-confirmations
As per: https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list
We have,
[target-confirmations] intentionally does not affect the list of returned transactions, but only affects the ...
6
votes
How can an unconfirmed transaction be removed from the memory pool?
Try the removeprunedfunds RPC command. It
deletes the specified transaction from the wallet. … This will effect wallet balances.
6
votes
Accepted
How do I query a remote bitcoin node like RPC?
Excellent question, and welcome to the community!
Short Answer
Maybe.
Long answer
Yes, you can send queries to other nodes on the Bitcoin network. Note that these aren't RPC calls, but Bitcoin's ...
6
votes
Accepted
How to get a wallet address and set label via RPC?
You may have already read this, but make sure you read this if you want to know about how the accounts feature of the core client works: https://en.bitcoin.it/wiki/Accounts_explained. (It's somewhat ...
6
votes
Using PHP with RPC and cookie
Not sure if you're still looking for an answer, but I just stumbled upon this myself and for the benefit of anyone running into this.
Even though it's called cookie based authentication, you still ...
6
votes
Debug log for RPC access log
I found the way. I confirmed the logs are saved as I expected.
bitcoin.conf
debug=mempool
debug=rpc
6
votes
Accepted
bitcoin-cli could not locate RPC credentials
You are using bitcoin-cli incorrectly.
The command line arguments come before the RPC command. Anything that comes after the RPC command will be interpreted as arguments for the RPC, not arguments to ...
6
votes
Accepted
How Do HD Wallets Keep Track of all accounts?
In general, HD Wallets use the following logic for how many addresses to query, and when to stop:
Start with account 0, generate gap limit number of addresses (usually 20)
Check for any transactions ...
6
votes
Accepted
Can I send almost 1MB transaction?
Can I send almost 1MB transaction?
To be able to send a transaction that a miner will accept, that transaction has to be a standard transaction. As defined in policy.h
/** The maximum weight for ...
6
votes
Accepted
Why does Bitcoin Core support a transaction index but not an address index?
The transaction index exists because it is leftover from how Bitcoin Core used to work for validating new blocks and transactions. Prior to 0.8.0, Bitcoin Core maintained the transaction index, and ...
5
votes
How to get the number of the confirmed transactions from Bitcoin QT Rpc
You can use the RPC command "getrawtransaction" to receive a JSON response with information for that transaction including a "confirmations" field if that transaction has been included in a block (if ...
5
votes
Using bitcoind JSON-RPC, how to get transaction from input address?
The data you are looking for isn't actually included in the transaction that spends the UTXOs. Addresses are basically shorthand for a scriptPubKey, and scriptPubKeys are associated with outputs, not ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
json-rpc × 784bitcoind × 303
bitcoin-core × 201
bitcoin-cli × 74
api × 59
transactions × 56
php × 34
blockchain × 33
wallet × 32
client × 30
transaction-fees × 28
raw-transaction × 26
python × 21
development × 19
address × 15
security × 14
server × 14
bitcoin.conf × 14
authentication × 14
electrum × 13
multi-signature × 13
regtest × 13
testnet × 12
balance × 12
litecoin × 11