Original Bitcoin client/API calls list - Bitcoin Wiki

Bitcoin - The Currency of the Internet

A community dedicated to Bitcoin, the currency of the Internet. Bitcoin is a distributed, worldwide, decentralized digital money. Bitcoins are issued and managed without any central authority whatsoever: there is no government, company, or bank in charge of Bitcoin. You might be interested in Bitcoin if you like cryptography, distributed peer-to-peer systems, or economics. A large percentage of Bitcoin enthusiasts are libertarians, though people of all political philosophies are welcome.
[link]

Bitcoin - The Internet of Money

/btc was created to foster and support free and open Bitcoin discussion about cryptocurrency, Bitcoin news, and exclusive AMA (Ask Me Anything) interviews from top Bitcoin and cryptocurrency leaders. Bitcoin is the currency of the Internet. A distributed, worldwide, decentralized digital money. Unlike traditional currencies such as dollars, bitcoins are issued and managed without the need for any central authority whatsoever. Learn more about Bitcoin, Bitcoin Cash, cryptocurrency, and more.
[link]

bitcoin, bitcoincash, litecoin, address, generator, wallet, key

Vanitygen is a command-line vanity bitcoin address generator.
[link]

Power of the Command Line (bitcoin-cli, hwi, electrum, trezorctl)

I think some of the console tools available with HW wallets today are greatly under utilized. Here's a quick write-up on how to create and sign a TXN very similar to 43d27...1fc06 found on the SLIP-14 wallet. I'll be using TrezorCTL, Electrum, and HWI for the signing. I won't go much into the setup or install, but feel free to ask if you have questions about it. Note, you don't have to use all three of these. Any one will produce a valid signed TXN for broadcast. I just showed how to do it three ways. Whats more some of the Electrum and HWI steps are interchangeable.
ColdCard also has a utility called ckcc that will do the sign operation instead of HWI, but in many ways they are interchangeable. KeepKey and Ledger both have libraries for scripted signing but no one-shot, one-line console apps that I know of. But HWI and Electrum of course work on all four.

TrezorCTL

This is the what most would think of to use to craft and sign TXNs, and is definitely very simple. The signing uses a script called build_tx.py to create a JSON file that is then used by the btc sign-tx command. The whole process is basically:
  1. tools/build_tx.py | trezorctl btc sign-tx -
This just means, take the output of build_tx and sign it. To copy 43d27...1fc06, I wrote a small script to feed build_tx, so my process looks like:
  1. ~/input.sh | tools/build_tx.py | trezorctl btc sign-tx -
But it's all very simple. Note... I used TrezorCTL v0.12.2 but build_tx.py version 0.13.0 1.

input.sh

```

!/bin/bash

secho() { sleep 1; echo $*}
secho "Testnet" # coin name secho "tbtc1.trezor.io" # blockbook server and outpoint (below) secho "e294c4c172c3d87991b0369e45d6af8584be92914d01e3060fad1ed31d12ff00:0" secho "m/84'/1'/0'/0/0" # prev_out derivation to signing key secho "4294967293" # Sequence for RBF; hex(-3) secho "segwit" # Signature type on prev_out to use secho "" # NACK to progress to outs secho "2MsiAgG5LVDmnmJUPnYaCeQnARWGbGSVnr3" # out[0].addr secho "10000000" # out[1].amt secho "tb1q9l0rk0gkgn73d0gc57qn3t3cwvucaj3h8wtrlu" # out[1].addr secho "20000000" # out[1].amt secho "tb1qejqxwzfld7zr6mf7ygqy5s5se5xq7vmt96jk9x" # out[2].addr secho "99999694" # out[2].amt secho "" # NACK to progress to change secho "" # NACK to skip change secho "2" # txn.version secho "0" # txn.locktime ```

Electrum

Electrum is one of the better GUI wallets available, but it also has a pretty good console interface. Like before you need your Trezor with the SLIP-14 wallet loaded and paired to Electrum. I'll assume Electrum is up and running with the Trezor wallet loaded to make things simple.
Like with TrezorCTL, Electrum feeds on a JSON file, but unlike TrezorCTL it needs that JSON squished into the command line. This is a simple sed command, but I won't bore you with the details, but just assume that's done. So the process in Electrum (v4.0.3) looks like:
  1. electrum serialize (create psbt to sign)
  2. electrum --wallet signtransaction (sign said psbt)
Still pretty simple right! Below is the JSON I smushed for #1

txn.json

{ "inputs": [{ "prevout_hash":"e294c4c172c3d87991b0369e45d6af8584be92914d01e3060fad1ed31d12ff00", "prevout_n": 0, "value_sats": 129999867 }], "outputs": [{ "address": "2MsiAgG5LVDmnmJUPnYaCeQnARWGbGSVnr3", "value_sats": 10000000 },{ "address": "tb1q9l0rk0gkgn73d0gc57qn3t3cwvucaj3h8wtrlu", "value_sats": 20000000 },{ "address": "tb1qejqxwzfld7zr6mf7ygqy5s5se5xq7vmt96jk9x", "value_sats": 99999694 }]}

HWI

HWI is an unsung hero in my book. It's a very small clean and simple interface between HW wallets and Bitcoin Core. It currently supports a good range of HW wallets. It keeps itself narrowly focused on TXN signing and offloads most everything else to Bitcoin Core. Again, I'll assume you've imported your Trezor keypool into Core and done the requisite IBD and rescan. And if you don't have the RPC enabled, you can always clone these commands into the QT-console.
To sign our TXN in HWI (v1.1.2), we will first need to craft (and finalize) it in Bitcoin Core (0.21.1). Like in Electrum, we will have to use simple sed to smush some JSON into command arguments, but I'll assume you have that covered. It will take an inputs.json and an outputs.json named separately.
  1. bitcoin-cli createpsbt (create psbt)
  2. bitcoin-cli -rpcwallet= walletprocesspsbt (process psbt)
  3. hwi -f signtx (sign psbt)
  4. bitcoin-cli -rpcwallet= finalizepsbt (get a signed TXN from psbt)
A little more involved, but still nothing too bad. Plus this gives you the full power of Bitcoin Core including integrations with LND (lightning).

inputs.json

[{ "txid": "e294c4c172c3d87991b0369e45d6af8584be92914d01e3060fad1ed31d12ff00", "vout": 0 }]

outputs.json

[{ "2MsiAgG5LVDmnmJUPnYaCeQnARWGbGSVnr3": 0.10000000 },{ "tb1q9l0rk0gkgn73d0gc57qn3t3cwvucaj3h8wtrlu": 0.20000000 },{ "tb1qejqxwzfld7zr6mf7ygqy5s5se5xq7vmt96jk9x": 0.99999694 }]

Conclusion

This may all seem like very low level coding, but is surprisingly simple once you get a knack for it. Whats more, all these platforms support testnet which allows you to practice with valueless coins until you get the hang of it. And, like many things in bitcoin, this is all (mostly) python, which is one of the easier languages to learn.
Enjoy
Footnotes
1 - https://github.com/trezotrezor-firmware/issues/1296
submitted by brianddk to Bitcoin [link] [comments]

Power of the Command Line (bitcoin-cli, hwi, electrum, trezorctl)

I think some of the console tools available with HW wallets today are greatly under utilized. Here's a quick write-up on how to create and sign a TXN very similar to 43d27...1fc06 found on the SLIP-14 wallet. I'll be using TrezorCTL, Electrum, and HWI for the signing. I won't go much into the setup or install, but feel free to ask if you have questions about it. Note, you don't have to use all three of these. Any one will produce a valid signed TXN for broadcast. I just showed how to do it three ways. Whats more some of the Electrum and HWI steps are interchangeable.

TrezorCTL

This is the what most would think of to use to craft and sign TXNs, and is definitely very simple. The signing uses a script called build_tx.py to create a JSON file that is then used by the btc sign-tx command. The whole process is basically:
  1. tools/build_tx.py | trezorctl btc sign-tx -
This just means, take the output of build_tx and sign it. To copy 43d27...1fc06, I wrote a small script to feed build_tx, so my process looks like:
  1. ~/input.sh | tools/build_tx.py | trezorctl btc sign-tx -
But it's all very simple. Note... I used TrezorCTL v0.12.2 but build_tx.py version 0.13.0 1.

input.sh

```

!/bin/bash

secho() { sleep 1; echo $*}
secho "Testnet" # coin name secho "tbtc1.trezor.io" # blockbook server and outpoint (below) secho "e294c4c172c3d87991b0369e45d6af8584be92914d01e3060fad1ed31d12ff00:0" secho "m/84'/1'/0'/0/0" # prev_out derivation to signing key secho "4294967293" # Sequence for RBF; hex(-3) secho "segwit" # Signature type on prev_out to use secho "" # NACK to progress to outs secho "2MsiAgG5LVDmnmJUPnYaCeQnARWGbGSVnr3" # out[0].addr secho "10000000" # out[1].amt secho "tb1q9l0rk0gkgn73d0gc57qn3t3cwvucaj3h8wtrlu" # out[1].addr secho "20000000" # out[1].amt secho "tb1qejqxwzfld7zr6mf7ygqy5s5se5xq7vmt96jk9x" # out[2].addr secho "99999694" # out[2].amt secho "" # NACK to progress to change secho "" # NACK to skip change secho "2" # txn.version secho "0" # txn.locktime ```

Electrum

Electrum is one of the better GUI wallets available, but it also has a pretty good console interface. Like before you need your Trezor with the SLIP-14 wallet loaded and paired to Electrum. I'll assume Electrum is up and running with the Trezor wallet loaded to make things simple.
Like with TrezorCTL, Electrum feeds on a JSON file, but unlike TrezorCTL it needs that JSON squished into the command line. This is a simple sed command, but I won't bore you with the details, but just assume that's done. So the process in Electrum (v4.0.3) looks like:
  1. electrum serialize (create psbt to sign)
  2. electrum --wallet signtransaction (sign said psbt)
Still pretty simple right! Below is the JSON I smushed for #1

txn.json

{ "inputs": [{ "prevout_hash":"e294c4c172c3d87991b0369e45d6af8584be92914d01e3060fad1ed31d12ff00", "prevout_n": 0, "value_sats": 129999867 }], "outputs": [{ "address": "2MsiAgG5LVDmnmJUPnYaCeQnARWGbGSVnr3", "value_sats": 10000000 },{ "address": "tb1q9l0rk0gkgn73d0gc57qn3t3cwvucaj3h8wtrlu", "value_sats": 20000000 },{ "address": "tb1qejqxwzfld7zr6mf7ygqy5s5se5xq7vmt96jk9x", "value_sats": 99999694 }]}

HWI

HWI is an unsung hero in my book. It's a very small clean and simple interface between HW wallets and Bitcoin Core. It currently supports a good range of HW wallets. It keeps itself narrowly focused on TXN signing and offloads most everything else to Bitcoin Core. Again, I'll assume you've imported your Trezor keypool into Core and done the requisite IBD and rescan. And if you don't have the RPC enabled, you can always clone these commands into the QT-console.
To sign our TXN in HWI (v1.1.2), we will first need to craft (and finalize) it in Bitcoin Core (0.21.1). Like in Electrum, we will have to use simple sed to smush some JSON into command arguments, but I'll assume you have that covered. It will take an inputs.json and an outputs.json named separately.
  1. bitcoin-cli createpsbt (create psbt)
  2. bitcoin-cli -rpcwallet= walletprocesspsbt (process psbt)
  3. hwi -f signtx (sign psbt)
  4. bitcoin-cli -rpcwallet= finalizepsbt (get a signed TXN from psbt)
A little more involved, but still nothing too bad. Plus this gives you the full power of Bitcoin Core including integrations with LND (lightning).

inputs.json

[{ "txid": "e294c4c172c3d87991b0369e45d6af8584be92914d01e3060fad1ed31d12ff00", "vout": 0 }]

outputs.json

[{ "2MsiAgG5LVDmnmJUPnYaCeQnARWGbGSVnr3": 0.10000000 },{ "tb1q9l0rk0gkgn73d0gc57qn3t3cwvucaj3h8wtrlu": 0.20000000 },{ "tb1qejqxwzfld7zr6mf7ygqy5s5se5xq7vmt96jk9x": 0.99999694 }]

Conclusion

This may all seem like very low level coding, but is surprisingly simple once you get a knack for it. Whats more, all these platforms support testnet which allows you to practice with valueless coins until you get the hang of it. And, like many things in bitcoin, this is all (mostly) python, which is one of the easier languages to learn.
Enjoy
Footnotes
1 - https://github.com/trezotrezor-firmware/issues/1296
submitted by brianddk to TREZOR [link] [comments]

Power of the Command Line (bitcoin-cli, hwi, electrum, trezorctl) (x-post from /r/Bitcoin)

submitted by ASICmachine to CryptoCurrencyClassic [link] [comments]

Power of the Command Line (bitcoin-cli, hwi, electrum, trezorctl)

submitted by 5tu to BitcoinTechnology [link] [comments]

bitcoin-cli getinfo

What happened with that simple, elegant command? Why it dies not work? My config OK. Why bitcoin-cli throws me an http error????
submitted by m416415 to Bitcoin [link] [comments]

bitcoin-cli getinfo (x-post from /r/Bitcoin)

submitted by ASICmachine to CryptoCurrencyClassic [link] [comments]

Bitcoin JSON RPC API (bitcoin-cli) in your web browser! [new launch for core 0.18.0]

Very excited to announce the all-new https://ChainQuery.com
Entirely up to date with Bitcoin Core 0.18.0 and sporting sexy new navigation, advanced search, category filtering, and a great new UI.
ChainQuery includes full documentation on all 140 Bitcoin RPCs along with the unique ability to run commands in your browser for 27 commands and growing.
Bitcoin core 0.18.0 included a significant RPC update outlined below:
New RPCs added in 0.18.0:
Updated RPC's in 0.18.0:
Deprecated RPCs in 0.18.0:
All depecated RPC's from 0.18.0 onward can be found here: https://chainquery.com/bitcoin-cli#deprecated
Check it out and let me know what you think!
submitted by CoinCadence to Bitcoin [link] [comments]

It is possible to re-download a single block with bitcoin-cli?

I keep running into issues with the initial sync of the chain, it randomly fails, but I do not have any detectable hardware problems. I can restart the client, but eventually it hits a block that has a problem, and can go no further. Either it fills the debug.log with "invalid blocks" messages or the client errors with "database corruption"
I can get the client to ignore the bad blocks using invalidateblock, but doing a reconsiderblock immediately causes the client to error since it is not getting the block from the network and only using the bad one
How can I resolve this (without deleting the entire chain which I have tried multiple times now)? Is it possible to force the client to get the block again and ignore/delete the one on disk?
submitted by DaSpawn to btc [link] [comments]

Introducing bitclouds.sh Watchtower: Bitcoin CLI wallet for developers [LN, e2e backups,REST API]

Introducing bitclouds.sh Watchtower: Bitcoin CLI wallet for developers [LN, e2e backups,REST API] submitted by Reablaz to Bitcoin [link] [comments]

Is my wallet in rescan phase? No wat to check it via bitcoin-cli ?

Hello,
I'm trying to determine if my wallet on Bitcoin Core is rescanning for txs.
I would like to do a shell script to do this
Anyone has a way to do this via bitcoin-cli? It seems that there is no way but maybe there's something I'm missing.
Thanks in advice for help or suggestions.
submitted by danbadjar to Bitcoin [link] [comments]

Retrieving the Genesis block in Bitcoin with bitcoin-cli

Retrieving the Genesis block in Bitcoin with bitcoin-cli submitted by ilconcierge to Bitcoin [link] [comments]

Problems with bitcoind and bitcoin-cli

Hi, I have installed both bitcoin server and bitcoin client packages on my freebsd box. The bitcoind is running. But when I run bitcoin-cli help command I have the following error:
error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set. 
Now I have stopped the bitcoind process because in few minutes it has downloaded 3,1 GB of data. Because I am newbie I don't know what's happening. Is it normal ?
submitted by narcisistapato to btc [link] [comments]

Bitcoin-cli getrawmempool returns empty list

Hey guys, as the title suggests, when I run the command "bitcoin-cli getrawmempool", I get an empty list back. My node is up and running and the node is also up to date. When I checked the mempoolinfo, the maxmempool size is at it's default 300mb, but the size of the mempool itself is at 0. Do I need to configure something in order to store a mempool? Any help will be greatly appreciated. Thank you.
submitted by AltcoinAdvisor to btc [link] [comments]

Bitcoin Developer Network Bitcoin CLI sandbox

Bitcoin Developer Network Bitcoin CLI sandbox
Ever wanted to try your hand at some command line bitcoin action? We've set up a web-based bitcoin docker image configured in testing mode for future tutorials.

https://bitcoindev.network/bitcoin-cli-sandbox/

The Bitcoin Developer Network (BDN) aims to become a community-driven project looking at educating the next wave of Bitcoin developers. This is a public invitation for developers, authors, editors, proofreaders, enthusiasts and technical writers to get in touch so that we may reduce the barrier to entry in developing solutions at various layers of this technology.
Please get in touch at [[email protected]](mailto:[email protected])

https://preview.redd.it/7i7yxjrt35e21.png?width=2552&format=png&auto=webp&s=bec5428db8dbc01dfdfa9b38d770ccbeda902643


submitted by gr0kch8n to Bitcoin [link] [comments]

where can i get the latest version of command list of `bitcoin-cli`?

I tried command like getaccount, as listed in https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list.
but is deprecated when i use it in Bitcoin Core v0.17.0
> bitcoin-cli getaccount 18e9LCujZeNvdYh9WRcavPD2gizcNNB7rK error code: -32 error message: getaccount is deprecated and will be removed in V0.18. To use this command, start bitcoind with -deprecatedrpc=accounts. 
submitted by jasonzhouu to Bitcoin [link] [comments]

bitcoin-cli estimatefee 1 - 0.00133925 "2 blocks" - 0.88€ / 1.00 USD

submitted by HostFat to Bitcoin [link] [comments]

Where are bitcoind & bitcoin-cli after installing Bitcoin ABC on Mac OS?

I have installed Bitcoin ABC on my Mac, but I could not find bitcoind & bitcoin-cli. I could only launch its GUI version from /Applications/. However, I want more control such as running in regtest mode and interacting using bitcoin-cli.
submitted by sinoTrinity to btc [link] [comments]

bitcoin-cli how to get unconfirmed balance of single address? /r/Bitcoin

bitcoin-cli how to get unconfirmed balance of single address? /Bitcoin submitted by cryptoanalyticabot to cryptoall [link] [comments]

bitcoin-cli.com

submitted by danielsocials to Bitcoin [link] [comments]

Sending entire balance from old address to a new address in bitcoin CLI

Hi everyone,
Which command, in which format, should I be using if I want to clear my entire balance on an old address and send it to a new address? In other words, I want to send the total balance and deduct the transaction fee from it, instead of adding it to the transaction. I have tried the commands sendmany and sendfrom, but no success so far :( Anyone?
submitted by Pb2m55 to Bitcoin [link] [comments]

bitcoin-cli estimatefee 1 - 0.00133925 "2 blocks" - 0.88€ / 1.00 USD

submitted by HostFat to btc [link] [comments]

Why did bitcoin-cli sendtoaddress choose an astonomical fee?

Effectively paid twice for my purchase: https://blockchain.info/tx/affd0acebde6b91533782f5310cfdd710c8404a41740f9d0116036532e21fb44
submitted by combatopera to Bitcoin [link] [comments]

Bitcoin JSON-RPC Tutorial 5 - Your First Calls - YouTube VirtualCoin - YouTube How to install Bitcoin Core wallet in any Linux distribution How to mine bitcoins (solo mining) with the core client ... bitcoin - YouTube

Common operations Listing my bitcoin addresses. Listing the bitcoin addresses in your wallet is easily done via listreceivedbyaddress.It normally lists only addresses which already have received transactions, however you can list all the addresses by setting the first argument to 0, and the second one to true. Welcome Bitcoin and Lightning Network APIs in your web browser. Bitcoin CLI JSON RPC Version 0.18.0 Access the Bitcoin JSON Remote Procedure Call API (bitcoin-cli) in your web browser. Includes docs on all 127 RPCs, and the ability to call and receive responses for 24 RPCs (and growing). Bitcoin Core ist ein gemeinschaftliches, freies Software-Projekt, veröffentlicht unter der MIT-Lizenz. Release-Signaturen überprüfen Download über Torrent Quelltext Versionshistorie anzeigen. Bitcoin Core Release Signierschlüssel v0.8.6 - 0.9.2.1 v0.9.3 - 0.10.2 v0.11.0+ Oder wählen Sie Ihr Betriebssystem . Windows exe - zip. Mac OS X dmg - tar.gz. Linux (tgz) 64 bit. ARM Linux 64 bit ... Der Original Bitcoin Client ist der erste Bitcoin Client in der Geschichte des Netzwerks. Er ist zudem der offizielle Client des Bitcoin Projekts. Er ist lizenziert unter der MIT Lizenz und verfügbar für Windows, 32 und 64 Bit GNU/Linux basierende Betriebssysteme, sowie Mac OS X. . Der Client besitzt zwei ausführbare Dateien, ein GUI und ein Command Line Interface (CLI). bitcoin-cli getinfo bitcoin-cli listtransactions. To stop the bitcoin daemon, execute: bitcoin-cli stop History of official bitcoind (and predecessor) releases. Version Date Supported platforms Reference 0.16.0 2018-Feb-26 Windows32/64, Linux, ARM Linux, MacOS X 0.15.1 2017-Nov-11 Windows32/64, Linux, ARM Linux, MacOS X 0.15.0.1 2017-Sep-19 Windows32/64, Linux, ARM Linux, MacOS X 0.15.0 2017 ...

[index] [26175] [17320] [15345] [8608] [3875] [45482] [17241] [31902] [40701] [8728]

Bitcoin JSON-RPC Tutorial 5 - Your First Calls - YouTube

In this channel, you are going to find high-quality tutorials related to bitcoin and altcoins. *****UPDATE***** Solo mining has been removed from client. I'll keep the video up for how it used to work, it might still work for some alt coins (unsure) yo... Auf YouTube findest du großartige Videos und erstklassige Musik. Außerdem kannst du eigene Inhalte hochladen und mit Freunden oder mit der ganzen Welt teilen. Bitcoin JSON-RPC tutorial. Getting started with the bitcoin command line interface. My Book: https://www.amazon.com/Building-Bitcoin-Websites-Beginners-Devel... Bitcoin JSON-RPC tutorial. Making your first bitcoin JSON-RPC calls in PHP. My Book: https://www.amazon.com/Building-Bitcoin-Websites-Beginners-Development/d...

#