<p>When you generate an address offline, it will be a valid (= correct checksum) address, which you have the private key to.</p>
<p>If you enter that address in a block explorer, it'll notice it's a valid address, search its database for transactions, not find any, and tell you so. It doesn't know or care whether anyone has the private key to this address, all it knows is the address is valid, and is not involved in any transactions.</p>
<p>If you change a character in the address, it becomes invalid (you've invalidated its checksum), which the block explorer can detect and tell you.</p>

CC BY-SA 4.0
2023-08-21T22:37:19.730Z
2023-08-21T22:37:19.730Z
Pieter Wuille
<p>I've created two addresses using the nodejs javascript library 'bitcoinjs-lib' version 5.2.0.
In both cases if I enter them into blockchain.com, they show a zero balance with zero transactions. I would expect no result to come back at all, and if I change one character in the middle of the address I get what I would have expected from the beginning, 'no address found'. Is this library compromised?</p>
<p>Code snippet for the curious:</p>
<pre><code> const bitcoin = require('bitcoinjs-lib');

// Generate a new key pair
const keyPair = bitcoin.ECPair.makeRandom();
const privateKey = keyPair.toWIF();
const { address } = bitcoin.payments.p2pkh({ pubkey: keyPair.publicKey });

console.log('Private Key:', privateKey);
console.log('Address:', address);
</code></pre>

CC BY-SA 4.0
2023-08-22T12:27:31.017Z
I’ve voted to close this question as a duplicate, because the other one is asking about exactly the same conundrum but is older, has a more speaking title, and has more comprehensive answers.
Murch
<transactions><private-key><address-generation><blockchain-explorer>
Why are unused offline generated addresses showing up on blockchain.com
nunya07
# Why are unused offline generated addresses showing up on blockchain.com

(Asked by: username_0 on 2023-08-21)

I've created two addresses using the nodejs javascript library 'bitcoinjs-lib' version 5.2.0.
In both cases if I enter them into blockchain.com, they show a zero balance with zero transactions. I would expect no result to come back at all, and if I change one character in the middle of the address I get what I would have expected from the beginning, 'no address found'. Is this library compromised?

Code snippet for the curious:

```
 const bitcoin = require('bitcoinjs-lib');

// Generate a new key pair
const keyPair = bitcoin.ECPair.makeRandom();
const privateKey = keyPair.toWIF();
const { address } = bitcoin.payments.p2pkh({ pubkey: keyPair.publicKey });

console.log('Private Key:', privateKey);
console.log('Address:', address);

```

**Tags:** transactions, private-key, address-generation, blockchain-explorer

> **Comments:**
> **username_1**: I’ve voted to close this question as a duplicate, because the other one is asking about exactly the same conundrum but is older, has a more speaking title, and has more comprehensive answers.  

---

## 1 answers

### Answer by username_2 on 2023-08-21. Score: 2

When you generate an address offline, it will be a valid (= correct checksum) address, which you have the private key to.

If you enter that address in a block explorer, it'll notice it's a valid address, search its database for transactions, not find any, and tell you so. It doesn't know or care whether anyone has the private key to this address, all it knows is the address is valid, and is not involved in any transactions.

If you change a character in the address, it becomes invalid (you've invalidated its checksum), which the block explorer can detect and tell you.


---

