<p><code>bpub</code> <a href="https://github.com/blockcypher/blockcypher-python/blob/master/blockcypher/constants.py#L89" rel="noreferrer">appears to be</a> the extended private key prefix for the Blockcypher testnet.</p>

<p>Bitcoin addresses and private keys usually have a prefix to help differentiate the network/type of key.</p>

<p>The original <code>xpub</code> notation comes from BIP32, meaning <code>extended public key</code>. This expanded into <code>ypub</code> with BIP49, and finally <code>zpub</code> with BIP49+ (used in BIP84).</p>

<p>Various coins can define their own prefix by simply altering the bytes. Litecoin, for instance, often uses <code>Ltub</code>.</p>

<p>It works the same way as changing the address prefix, except you change four bytes, instead of one.</p>

CC BY-SA 4.0
2018-08-16T19:32:53.450Z
2018-08-16T19:32:53.450Z
Raghav Sood
<p>I've seen extended public keys such as the one below</p>

<pre><code>xpub661MyMwAqRbcFLCsW67CH9AgprkK2MbeLbmdMiBRWb1Wamm6GjGhTFQChvPmwQGQh78MMd8Eu7CLJ7FEuwhsomD66XC74VnfgHdEx1NFSKL
</code></pre>

<p>But now I've seen a bpub</p>

<pre><code>bpubgqxJY83YqBS1rgM392MqkPnaa7P8yBEkZ7pZksTUHjRxQRn8RzuL8ST1NYhAqgbM7f3SDzTTJifL1WuCYvVxHinLuhF4kFdnBNN34N4Y2et
</code></pre>

<p>What's the difference?</p>

CC BY-SA 4.0
2018-08-16T17:58:21.683Z
I don't recall this being defined in any (common) spec. Where are you seeing this?
Raghav Sood
CC BY-SA 4.0
2018-08-16T18:15:32.093Z
`bpub` is probably the prefix for extended public keys for an altcoin.
Ava Chow
CC BY-SA 4.0
2018-08-16T19:20:51.787Z
@RaghavSood I found it while trying to answer a question about pywallet - and thus extended keys.

https://github.com/Ballanxe/pegaso/blob/5e0cbf8439c175becd80beb92e9e1fb075b65a47/src/.env
arshbot
CC BY-SA 4.0
2018-08-16T19:21:29.007Z
@AndrewChow can you elaborate? What are prefixes? When do they apply? Why are they the same for some altcoins but not others?
arshbot
<cryptography><bip32-hd-wallets><xpub>
What's the difference between xpub and bpub?
arshbot
# What's the difference between xpub and bpub?

(Asked by: username_0 on 2018-08-16)

I've seen extended public keys such as the one below

```
xpub661MyMwAqRbcFLCsW67CH9AgprkK2MbeLbmdMiBRWb1Wamm6GjGhTFQChvPmwQGQh78MMd8Eu7CLJ7FEuwhsomD66XC74VnfgHdEx1NFSKL

```

But now I've seen a bpub

```
bpubgqxJY83YqBS1rgM392MqkPnaa7P8yBEkZ7pZksTUHjRxQRn8RzuL8ST1NYhAqgbM7f3SDzTTJifL1WuCYvVxHinLuhF4kFdnBNN34N4Y2et

```

What's the difference?

**Tags:** cryptography, bip32-hd-wallets, xpub

> **Comments:**
> **username_1**: I don't recall this being defined in any (common) spec. Where are you seeing this?  
> **username_2**: `bpub` is probably the prefix for extended public keys for an altcoin.  
> **username_0**: @username_1 I found it while trying to answer a question about pywallet - and thus extended keys.  https://github.com/Ballanxe/pegaso/blob/5e0cbf8439c175becd80beb92e9e1fb075b65a47/src/.env  
> **username_0**: @AndrewChow can you elaborate? What are prefixes? When do they apply? Why are they the same for some altcoins but not others?  

---

## 1 answers

### Answer by username_1 on 2018-08-16. Score: 6 | Accepted answer

`bpub` [appears to be](https://github.com/blockcypher/blockcypher-python/blob/master/blockcypher/constants.py#L89) the extended private key prefix for the Blockcypher testnet.

Bitcoin addresses and private keys usually have a prefix to help differentiate the network/type of key.

The original `xpub` notation comes from BIP32, meaning `extended public key`. This expanded into `ypub` with BIP49, and finally `zpub` with BIP49+ (used in BIP84).

Various coins can define their own prefix by simply altering the bytes. Litecoin, for instance, often uses `Ltub`.

It works the same way as changing the address prefix, except you change four bytes, instead of one.


---

