How do we use metamask in a Bitcoin domain system?

BTCDOMAIN
2 min readApr 25, 2023

--

A common question arises since MetaMask does not support Bitcoin: How do we use it with btcdomains.io and btcwallet.network? The answer is simple: we don’t. This may seem counterintuitive, but we don’t use MetaMask as a wallet. Instead, we utilize it as a signature tool.

When you click the “Connect Wallet” button in the top right corner of btcdomains.io, MetaMask will prompt you to sign the following message:

“Welcome to the secure sites, btcdomains.io and btcwallet.network! Please ensure you are visiting the correct URLs: btcdomains.io and btcwallet.network. Engaging in transactions or signing activities outside of these official sites may expose your private key and put your security at risk.”

Although MetaMask is not used as a wallet, it is still valuable for signing messages. We can obtain a random number from your signed message and use it as a seed to generate a pair of secret and public keys in the Bitcoin format.

In actual usage, Bitcoin does not require a secret key. All it needs is the signed message, which can be calculated directly from the seed. As a result, no actual secret key exists on your local device. By implementing this method, we maintain the same security level as MetaMask, ensuring that your information remains protected.

Our designer is currently busy, but to help explain this process, I’ve created a simple illustration:

An illustration for how we use metamask

This illustration demonstrates how we use MetaMask and why you need to sign the same message instead of a transaction every time you attempt to send BTC or create an inscription.

Lastly, remember not to sign the message unless you are using btcdomains.io and btcwallet.network. Otherwise, your secret key could be at risk.

Apr 25 2023

Jay Lee

--

--