So far, there have been a few notable BNS integrations, including Hiro Wallet (now called Leather), Xverse Wallet, and the NFT marketplace, Gamma. However, a lot more integrations are needed to make the Stacks and Bitcoin ecosystems more user-friendly. This post will illustrate some of the possibilities.
It is now possible to use a BNS / .btc name to: 1) Send and receive BTC or STX, 2) Identify yourself on Web3 apps like Gamma.io, and 3) Bridge to a traditional TLD like .com. That’s a pretty good start.
In service of expanding the utility of BNS even more, let’s look at the different ways dApp developers can use BNS to make their applications more user-friendly.
1. Forward Resolution for Crypto Addresses
This is a feature that both Hiro and Xverse Wallets have implemented. BNS names can be used in place of addresses to send STX tokens.
So you don’t have to deal with long unreadable addresses–sending them over email, copying and pasting them, double checking to make sure there wasn’t a typo, etc.
Resolution is simplest for Stacks addresses because BNS names are held by Stacks accounts.
However, with custom TXT records, any crypto address can be linked to a BNS name including a Bitcoin address, a Lightning Network address, or even an Ethereum address.
2. Web3 Usernames
Using BNS names for dApp usernames is a simple, yet effective, way to improve user-experience.
Just imagine how difficult it would be to use a platform like Twitter if all the usernames looked like this: SP25RD2QZD9SZESKKYHRBREDHKGTYETD8BH3DT901.
And yet, that’s how most of the crypto space operates right now.
Gamma.io is a notable example of an application that has integrated BNS names for usernames:
3. Website Resolution or Bridge
While BNS names are typically used as usernames, they can also be used like domain names. Remember, almost any piece of information can be bound to a BNS name with a custom TXT record–including an IP address.
It is possible that web browsers will eventually resolve BNS names to IP addresses. But for now, a .btc address can simply be redirected to a .com or other TLD with the btc.us web bridge.
Browser wallets like Hiro Wallet or Xverse could also bake this functionality in–so that whenever you enter a .btc name into a web browser, it would redirect to the appropriate website.
4. Custom data in TXT fields: Endless possibilities
As we have mentioned throughout this post, almost any piece of information can be bound to a BNS name with custom TXT records.
For example, Hiro Wallet currently supports the below binding for Bitcoin addresses. This record enables sending and receiving Bitcoin with BNS names.
TXT records could also be used to bind things like links to avatar images on IPFS, bios, dApp-specific fields, etc.
The possibilities really are endless.
In closing, here are some resources for developers to get started with BNS:
Resources for Developers
- Getting Started With On-Chain Usernames on Stacks – Hiro Systems
- BNS package documentation and examples (for interacting with the smart contract directly) – Hiro Systems Github
- BNS API documentation (for interacting via the API) – Hiro Systems Github
- Deployed BNS smart contract on Stacks – Stacks Block Explorer
- Interact with BNS smart contract using sandbox interface – Stacks Block Explorer