<p>I think you could do what you are asking with an explorer API and rawtransactions, however you need to be careful when using rawtransactions as you could lose a lot of coins if you dont know what you are doing (see my note at the end).</p>

<p>Transactions are made of inputs and outputs.  Lets say you have 10 coins on address A, you could have two unspent transaction outputs (the 2 outputs from when you deposited the 10 coins), maybe one unspent output has 7 coins, and the other 3 coins (totaling 10).</p>

<p>If you want to send your friend 1 coin, you may take the available unspent transaction of 3 coins, send 1 coin to your friend, and 1.9999 coins (after fees of 0.0001) will be returned to you as "change".  Here is an example transaction <a href="https://chainz.cryptoid.info/btc/tx.dws?499936575.htm" rel="nofollow noreferrer">https://chainz.cryptoid.info/btc/tx.dws?499936575.htm</a>  You can see 1 previous output, becoming the input, and the two resulting outputs.</p>

<p>Your bitcoin-cli wallet needs the full blockchain, because the list of your unspent transactions is constructed from all the inputs and outputs.  However notice that the explorer I linked to also has an API and (if you request and are granted an API key) the following query will result in giving you all the inputs for that specific address;</p>

<p><a href="https://chainz.cryptoid.info/BTC/api.dws?q=unspent&amp;key=(YOUR_API_KEY)&amp;active=18mcGpg2e3Fj6djLxiCbdjgh3cD46VayLC" rel="nofollow noreferrer">https://chainz.cryptoid.info/BTC/api.dws?q=unspent&amp;key=(YOUR_API_KEY)&amp;active=18mcGpg2e3Fj6djLxiCbdjgh3cD46VayLC</a></p>

<p>You then would use the RPC console to:
1/ createrawtransaction
2/ signrawtransaction
3/ sendrawtransaction</p>

<p>Refer to the <a href="https://en.bitcoin.it/wiki/Raw_Transactions" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Raw_Transactions</a> Wiki for usage and other useful CLI commands around this topic.</p>

<p>WARNING: Note when using createrawtransaction you MUST MANUALLY CALCULATE TRANSACTION FEES AND CHANGE, if you fail to do this correctly change will be consumed as fees!!!</p>

<p>So now you can see how its possible (although extremely awkward!) to make and send transactions without a local copy of the blockchain.  In terms of how a Ledger works, I suspect they do steps 1/ createrawtransaction and 3/ sendrawtransaction in an un-secure environment, they just use the Ledger itself to do step 2/ signrawtransaction, as this is the only point at which private keys are needed.</p>

CC BY-SA 4.0
2020-01-25T13:14:25.857Z
2020-01-25T13:14:25.857Z
Scalextrix
<ol>
<li><p>Ledger wallet works because a significant amount of job is done on Third-party servers. The Ledger Desktop Application is communicating with these servers in order to obtain actual information about your wallet and available coins.</p></li>
<li><p>Generally, you cant use wallets without interacting with the blockchain. Core wallet or, <code>bitcoin-cli</code>, has a requirement that transaction index should be enabled in the client so the wallet can obtain the balances from the blockchain.</p></li>
<li><p>If you have Bitcoin Core running somewhere, you can use its RPC interface and call procedures remotely. Look here <a href="https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29</a> </p></li>
</ol>

CC BY-SA 4.0
2020-03-25T20:23:19.233Z
You do not need the transaction index (`-txindex`) to use the wallet; it's only required for `getrawtransaction`.
Pieter Wuille
CC BY-SA 4.0
2020-02-24T15:58:31.600Z
2020-02-24T15:58:31.600Z
Ilya Evdokimov
<p>I have successfully downloaded, compiled and installed bitcoin-cli from github.</p>

<p>I can send or receive bitcoins with sendtoaddress and getnewaddress methods.</p>

<p>It works great and i am happy to do that without install third party software (i do not trust them)</p>

<p>But i have a problem: I need to download the full blockchain files (with bitcoind) on my computer.</p>

<p>Is there a way to run sendtoaddress and getnewaddress methods with having only wallet.dat file on my computer ? I do not want to download the full blockchain files. Is it possible ?</p>

<p>How works ledger wallet key ? This small key does not contain a copy of the blockchain. And it works !</p>

<p>Thanks</p>

<bitcoin-core><client>
Send or receive bitcoins with bitcoin-cli without downloading full blockchain
Bob5421
# Send or receive bitcoins with bitcoin-cli without downloading full blockchain

(Asked by: username_0 on 2019-08-27)

I have successfully downloaded, compiled and installed bitcoin-cli from github.

I can send or receive bitcoins with sendtoaddress and getnewaddress methods.

It works great and i am happy to do that without install third party software (i do not trust them)

But i have a problem: I need to download the full blockchain files (with bitcoind) on my computer.

Is there a way to run sendtoaddress and getnewaddress methods with having only wallet.dat file on my computer ? I do not want to download the full blockchain files. Is it possible ?

How works ledger wallet key ? This small key does not contain a copy of the blockchain. And it works !

Thanks

**Tags:** bitcoin-core, client


---

## 2 answers

### Answer by username_1 on 2020-01-25. Score: 0

I think you could do what you are asking with an explorer API and rawtransactions, however you need to be careful when using rawtransactions as you could lose a lot of coins if you dont know what you are doing (see my note at the end).

Transactions are made of inputs and outputs. Lets say you have 10 coins on address A, you could have two unspent transaction outputs (the 2 outputs from when you deposited the 10 coins), maybe one unspent output has 7 coins, and the other 3 coins (totaling 10).

If you want to send your friend 1 coin, you may take the available unspent transaction of 3 coins, send 1 coin to your friend, and 1.9999 coins (after fees of 0.0001) will be returned to you as "change". Here is an example transaction <https://chainz.cryptoid.info/btc/tx.dws?499936575.htm> You can see 1 previous output, becoming the input, and the two resulting outputs.

Your bitcoin-cli wallet needs the full blockchain, because the list of your unspent transactions is constructed from all the inputs and outputs. However notice that the explorer I linked to also has an API and (if you request and are granted an API key) the following query will result in giving you all the inputs for that specific address;

<https://chainz.cryptoid.info/BTC/api.dws?q=unspent&key=(YOUR_API_KEY)&active=18mcGpg2e3Fj6djLxiCbdjgh3cD46VayLC>

You then would use the RPC console to:
1/ createrawtransaction
2/ signrawtransaction
3/ sendrawtransaction

Refer to the <https://en.bitcoin.it/wiki/Raw_Transactions> Wiki for usage and other useful CLI commands around this topic.

WARNING: Note when using createrawtransaction you MUST MANUALLY CALCULATE TRANSACTION FEES AND CHANGE, if you fail to do this correctly change will be consumed as fees!!!

So now you can see how its possible (although extremely awkward!) to make and send transactions without a local copy of the blockchain. In terms of how a Ledger works, I suspect they do steps 1/ createrawtransaction and 3/ sendrawtransaction in an un-secure environment, they just use the Ledger itself to do step 2/ signrawtransaction, as this is the only point at which private keys are needed.


---

### Answer by username_2 on 2020-02-24. Score: 0

1. Ledger wallet works because a significant amount of job is done on Third-party servers. The Ledger Desktop Application is communicating with these servers in order to obtain actual information about your wallet and available coins.
2. Generally, you cant use wallets without interacting with the blockchain. Core wallet or, `bitcoin-cli`, has a requirement that transaction index should be enabled in the client so the wallet can obtain the balances from the blockchain.
3. If you have Bitcoin Core running somewhere, you can use its RPC interface and call procedures remotely. Look here <https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29>

> **Comments:**
> **username_3**: You do not need the transaction index (`-txindex`) to use the wallet; it's only required for `getrawtransaction`.  

---

