<h2>Addresses</h2>
<p>Transactions don't actually contain addresses.</p>
<p>A Bitcoin address is really more like an invoice reference number created by the intended recipient of the money.</p>
<p>The address value allows the senders wallet to construct a transaction that contains an output for that recipient. The output has a bitcoin script, a small program written in Bitcoin scripting language. This script is sometimes called the locking script and it ensures only the recipient can later spend that money. The script is created from the number we call an address.</p>
<p>So other nodes don't ever see actual addresses and don't need to check output addresses. They don't really care about outputs although they do keep a list of unspent outputs (UTXOs). It is only some time later (if ever) when that output is reference as an input to a later transaction that nodes will check the unlocking script produces the right values to satisfy the locking script.</p>
<h2>Funds</h2>
<p>The Bitcoin network doesn't keep track of your total funds or balance. Bitcoin nodes neither know or care about how much money you have. They only care about whether the coins being spent are genuine. Just like the owner of a coffee shop doesn't need to know your bank balance they just check the coins and banknotes you gave them look and feel real.</p>
<p>Bitcoin nodes check that the transaction inputs are not already spent. Each input should be a reference to a UTXO from some prior transaction.</p>

CC BY-SA 4.0
2022-05-02T18:11:34.993Z
So if I want to send BTC, I need the UTXO of the latest transaction + pubk/privk?
I can't just know my pubk/private key to send
kevin richard
CC BY-SA 4.0
2022-05-02T20:04:14.397Z
You can't send BTC you don't have. To create a transaction you need to know the private-key corresponding to a UTXO created in a transaction sometime in the past. You can then use that UTXO as an input in your new transaction. Your wallet creates an unlocking script for the input in the new transaction that provides the right values for the locking script of the UTXO in the earlier transaction. This very loosely corresponds to you only being able to spend coins you have possession of
RedGrittyBrick
CC BY-SA 4.0
2022-05-02T17:44:01.507Z
2022-05-02T20:00:06.560Z
2022-05-02T20:00:06.560Z
RedGrittyBrick
<p>when i send a transaction to a bitcoin node how can the node know that my address exists and where in the chain my address is? does it do a verification? how does it know that I have the funds knowing that it does not index the addresses</p>

CC BY-SA 4.0
2022-05-13T16:44:24.217Z
There is no concept known as "wallet" on the blockchain. Each address stands on its own, nothing associates them with each other except transaction history. The fact that a given set of addresses are grouped into an HD account-wallet is a secret known only to the wallet-client, except what can be deduced via transaction history.
HansBKK
<bitcoin-core>
How a bitcoin node knows where the last transaction of my wallet is
kevin richard
# How a bitcoin node knows where the last transaction of my wallet is

(Asked by: username_0 on 2022-05-02)

when i send a transaction to a bitcoin node how can the node know that my address exists and where in the chain my address is? does it do a verification? how does it know that I have the funds knowing that it does not index the addresses

**Tags:** bitcoin-core

> **Comments:**
> **username_1**: There is no concept known as "wallet" on the blockchain. Each address stands on its own, nothing associates them with each other except transaction history. The fact that a given set of addresses are grouped into an HD account-wallet is a secret known only to the wallet-client, except what can be deduced via transaction history.  

---

## 1 answers

### Answer by username_2 on 2022-05-02. Score: 1

## Addresses

Transactions don't actually contain addresses.

A Bitcoin address is really more like an invoice reference number created by the intended recipient of the money.

The address value allows the senders wallet to construct a transaction that contains an output for that recipient. The output has a bitcoin script, a small program written in Bitcoin scripting language. This script is sometimes called the locking script and it ensures only the recipient can later spend that money. The script is created from the number we call an address.

So other nodes don't ever see actual addresses and don't need to check output addresses. They don't really care about outputs although they do keep a list of unspent outputs (UTXOs). It is only some time later (if ever) when that output is reference as an input to a later transaction that nodes will check the unlocking script produces the right values to satisfy the locking script.

## Funds

The Bitcoin network doesn't keep track of your total funds or balance. Bitcoin nodes neither know or care about how much money you have. They only care about whether the coins being spent are genuine. Just like the owner of a coffee shop doesn't need to know your bank balance they just check the coins and banknotes you gave them look and feel real.

Bitcoin nodes check that the transaction inputs are not already spent. Each input should be a reference to a UTXO from some prior transaction.

> **Comments:**
> **username_0**: So if I want to send BTC, I need the UTXO of the latest transaction + pubk/privk? I can't just know my pubk/private key to send  
> **username_2**: You can't send BTC you don't have. To create a transaction you need to know the private-key corresponding to a UTXO created in a transaction sometime in the past. You can then use that UTXO as an input in your new transaction. Your wallet creates an unlocking script for the input in the new transaction that provides the right values for the locking script of the UTXO in the earlier transaction. This very loosely corresponds to you only being able to spend coins you have possession of  

---

