<p>P2SH Bitcoin addresses are just Base58Check encoded script hashes. A P2SH transaction output will mention this same script hash. So if we're just interested in the balance of the P2SH address, we just Base58Check decode the P2SH Bitcoin address to the script hash it encodes, and look for UTXOs that have that same script hash.</p>
<p>You don't need the script or any public keys until you're trying to spend.</p>

CC BY-SA 4.0
2022-01-18T14:11:18.987Z
In some cases, the locking script will be complex and contain not only my public key, but possibly other public keys (multi-signature). And the browser doesn't seem to be able to match my public key with the script hash.
KHJUAF403456ZS3K564WAEF
CC BY-SA 4.0
2022-02-17T20:59:27.193Z
@KHJUAF403456ZS3K564WAEF Right, but addresses aren't identifiers of your public key. They identify the entire locking condition. If you have a multisig script that involves your key, that is a distinct address from a single-key script with just key, and they will be counted separately. Block explorers in general give a weird address-centric view of the chain, because they cannot do better. Your own actual wallet can tell you the balance if the actual funds you can access, regardless of how things are split into addresses.
Pieter Wuille
CC BY-SA 4.0
2022-01-18T13:41:20.397Z
2022-01-18T13:41:20.397Z
ieatpizza
<p>Suppose i have a Bitcoin address for the first time and Alice sends me 1 Bitcoin using P2SH. As far as I know, Bitcoin browsers will scan the entire blockchain. In this case, my public key is not present in the network, it is only present in the locking script and it is hashed.
So when i check my balance in Bitcoin browser, can i get a result?</p>

<public-key><p2sh>
How Bitcoin browsers update balance of an address?
KHJUAF403456ZS3K564WAEF
# How Bitcoin browsers update balance of an address?

(Asked by: username_0 on 2022-01-18)

Suppose i have a Bitcoin address for the first time and Alice sends me 1 Bitcoin using P2SH. As far as I know, Bitcoin browsers will scan the entire blockchain. In this case, my public key is not present in the network, it is only present in the locking script and it is hashed.
So when i check my balance in Bitcoin browser, can i get a result?

**Tags:** public-key, p2sh


---

## 1 answers

### Answer by username_1 on 2022-01-18. Score: 1

P2SH Bitcoin addresses are just Base58Check encoded script hashes. A P2SH transaction output will mention this same script hash. So if we're just interested in the balance of the P2SH address, we just Base58Check decode the P2SH Bitcoin address to the script hash it encodes, and look for UTXOs that have that same script hash.

You don't need the script or any public keys until you're trying to spend.

> **Comments:**
> **username_0**: In some cases, the locking script will be complex and contain not only my public key, but possibly other public keys (multi-signature). And the browser doesn't seem to be able to match my public key with the script hash.  
> **username_2**: @username_0 Right, but addresses aren't identifiers of your public key. They identify the entire locking condition. If you have a multisig script that involves your key, that is a distinct address from a single-key script with just key, and they will be counted separately. Block explorers in general give a weird address-centric view of the chain, because they cannot do better. Your own actual wallet can tell you the balance if the actual funds you can access, regardless of how things are split into addresses.  

---

