How to connect blockchain.com wallet to bcon.global gateway

Bcon Global
7 min readOct 31, 2023

--

Where to find the public key and which specification to choose. How to check the correctness of the keys and generated wallets.

What is the difference between SegWit and Legacy address?
Legacy address is the original BTC address while SegWit is the newer address format.

What is an Xpub?

Every child key pair generated can define an XPub (Extended Public Key). As the name suggests, an Xpub doesn’t contain information about private keys, but only public ones. This means that an Xpub will not give you access to the funds in a wallet, but it can be used to view the child wallet’s addresses, transactions, and balances. You can think of it as a read-only view of a wallet. Although the Xpub doesn’t give you spending abilities, only the possibility to view a wallet’s information, it’s highly risky to share the key with anyone.

What are Ypub and Zpub?

After the adoption of SegWit, theBIP49 standard was introduced giving origin to the Ypub. A Ypub key is the same as an Xpub key, but it follows the new standard and has an address type P2SH-P2WPKH. Ypub is for backward-compatible SegWit Wallets.

After the Xpub and Ypub, the newest Public Extended Key is called Zpub. Just as its predecessor the Zpub follows the BIP49 standard, but the address type is P2WPKH. Zpub is for native compatible SegWit wallets.

An easy way to differentiate between Xpubs, Ypubs and Zpubs is that Xpubs addresses always start with “1”, the Ypub addresses always start with “3”, whilst Zpub addresses always start with “bc1”.

For BTC:
Legacy (P2PKH): addresses start with a 1
Nested SegWit (P2SH): addresses start with a 3
Native SegWit (bech32): addresses start with bc1

When working with blockchain.com, we noticed one problem related to obtaining a public key. It consists in the fact that, regardless of the chosen specification, SegWit or Legacy, the blockchain.com show “Xpub” which applicable only to wallets of the Legacy type.
At the same time, regardless of the specification, the format of the public key does not change. In this case, it’s quite easy to make a mistake when generating wallets for Legacy using the public key from SegWit. Or vice versa.

And the following problem came out that due to the fact that the blockchain.com gives the wrong key generates the format wallets not SegWit, but Legacy. And your funds can go in an unknown direction.

If you make such a mistake, you can find yourself in a situation where it will be quite difficult to get your funds without certain technical knowledge and programs. At a minimum, using the functionality of the blockchain.com, you will not be able to find your money. In this article, we will tell you which keys should be connected to the Bcon.Global service and how to avoid common mistakes.

Where to find the public key

Create an account and log in to www.blockchain.com. Then click on the Profile Icon and go to the section indicated in the screenshot.

By default, you will have the SegWit specification selected. You need to switch it to Legacy.

Because at the time of writing the article, SegWit ( ZPUB ) will give you a public key of the Legacy ( XPUB ) format, which will lead to the generation of irregular wallets.

Then you should add new wallets. You can add a maximum of 15 wallets. We need this in order to check them in the future to see if the correct wallets will be generated using the found key.

After adding wallets, let's open our public key and copy it.

Public Key

Next, we will need to check whether the correct wallets are generated by the third-party service. I'm doing this just as an example to show how it works. If you just need to connect this wallet to the Bcon.Global gateway you don't have to read further, just insert the found public key when creating the “Store”. The main thing is to make sure that you copied the Legacy version.

Verifying public key and wallets

Next, we will need to check whether the correct wallets are generated by the third-party service. To do this, we will need your seed phrase to generate public and private keys based on it. Go to your profile again and follow the instructions on the screenshots.

According to the standard, this will be 12 words, but it could be more, copy everything, we will have to paste them in the next window. Never give your seed phrase to anyone.

Actually, if you are not sure about the service in which I will insert them to generate keys, you should not do this either. I'm doing this to show you how it works without downloading complex software.

Now we need Mnemonic Code Converter. Go to the following link:

And insert our seed phrase as shown in the screenshot. Next, based on your seed phrase, the service will generate public and private keys, as well as wallets, based on the specified specification.

Now see if the public key matches (it’s enough to check only the first few and last characters) with what you copied in blockchain.com.

Further, scrolling below you will see the generated wallets using this public key. Please check a few of them with those given to you by blockchain.com.

On blockchain.com, the first wallets will be at the very bottom. Scroll down.

Now we can be sure that we copied the correct public key. Now it can be used to connect to the non-custodial gateway Bcon.Global .

To be sure, do a test checkout on your website and see what wallet it gives you.

Special Notes

There are several features that need to be taken into account.

Our service Bcon.Global supports both SegWit and Legacy. But for SegWit, the public key should begin with “ZPUB”, and for Legacy with “XPUB”.

Unlike some other standards, Blockchain Wallet uses the "xpub" prefix for SegWit wallets instead of "zpub," which can be confusing. However, it is still an extended public key (xpub), not a private key.

The security and functionality of wallets are based on compliance with BIP (Bitcoin Improvement Proposals) standards. In this case, Blockchain Wallet has chosen to use "xpub" for public keys in the BIP-84 format (native SegWit) to simplify interaction with other wallets.

Therefore, despite the "xpub" prefix not aligning with the BIP-84 standard's "zpub" expectation, the xpub from Blockchain Wallet will work with other wallets and services expecting SegWit xpub.

Remember that with each new checkout and attempt to pay in BTC, the Bcon.Global service will issue a new wallet generated using the public key. At the same time, blockchain.com allows you to generate only 15 wallets and until they are used does not allow you to see others. This means that if the first 15 orders are not paid, then you will not see those transactions that went to the 16th wallet. But don’t worry, we at bcon.global have made it so that if after creating an invoice the wallet has not received funds in the wallet within 24 hours, then this wallet will be used again, and the system will issue it in the next order. Thus, even if some transactions went to wallets that blockchain.com does not allow you to see, do not worry, this money is still in your wallet. Moreover, you can restore your money through a seed phrase or private key in any other wallet that has wider functionality.

--

--

Bcon Global

Bcon Global is a non-custodial crypto gateway for receiving money directly to the wallet. Our site: https://bcon.global