Easily Support Custom Derivation Paths for Ledger and Trezor Wallets

Blocknative Ethereum Web3

While you can hold every private key in the palm on your hand, there are a staggering number of possible wallet addresses that can be generated from a seed phrase. And  advanced users may take advantage of these possibilities by using custom derivation paths on their hardware wallets to select new addresses. 

The ability to choose a custom derivation path is popular among developers (who need to access test nets) and whales (who have many accounts that they use to secure funds). And support for hardware wallets and custom derivation paths is a commonly requested feature for leading applications.

Having a native hardware wallet integration was the most requested feature for the 
Gnosis Safe multisig. Thanks to Blocknative, we were able to deliver an easy and trusted way to use a Ledger or Trezor device with a multisig using Onboard.js.

Lukas Schor, Product Manager For Gnosis Safe

The latest release of Onboard.js enhances our hardware support module, adding the ability to choose from common derivation paths or enter a custom derivation path. Read on to learn about what custom derivation paths are and why supporting them matters. 

What are Hierarchical Deterministic Wallet?

Hierarchical Deterministic (HD) wallets have the ability to derive many different addresses from a single seed phrase (based on BIP 32). This lets a user generate new key pairs and addresses without having to back up a private key. 

A view of Hierarchical Deterministic KeysA Diagram Of HD Keys From Web Of Trust

With a HD wallet, you only need to back up the seed phrase. And with that phrase, you can generate many different wallet addresses. 

What are Derivation Paths?

The derivation path refers to all of the possible key pairs that can be generated from the seed phrase. In the diagram above, you can see that there are many branches in which an address can be generated. 

Let's look at a typical derivation path: m/44'/1'/0'/0'/0. Each one of those numbers impacts the public/private key and address. To dig deeper into the technical aspects, read this post.

When connecting to a hardware wallet, users are given the choice of which derivation path to use. Usually, people will connect with the default path, since each branch leads to a different set of addresses. However, advanced users may use a different path. And the latest release of Onboard.js improves upon our hardware wallet support to add a new module that allows users to select a derivation path from a list of common paths or input their own custom path to access accounts on their hardware wallets:

Onboard.js Supports Custom Derivation Paths

With just a few lines of code, you can easily add support for custom derivation paths for Ledger and Trezor.

Easily Support Hardware Wallets and Custom Derivation Paths

To help developers can quickly support hardware wallets, we've filmed a quick start video for Onboard.js:

 

Once installed, users will be able to select either Ledger, Trezor, or Lattice as a wallet. When a user selects that, Onboard.js will display a web3 wallet check module that directs users to: 

  • plug in their hardware wallet
  • unlock it via the pin code
  • have the Ethereum app open on their device (Ledger)
  • select a standard or custom derivation path
  • wait while Onboard.js loads their accounts 
  • select their account

That's it. With just a few lines of code, you can add web3's most powerful connect wallet button to your DeFi or NFT Dapp and easily support hardware wallets in your project.

When you're ready, Blocknative can also help you improve UX with web3's most accurate ETH gas API or our Ethereum Simulation Platform. Contact our team today for a personalized demo!

Observe Ethereum

Blocknative's proven & powerful enterprise-grade infrastructure makes it easy for builders and traders to work with mempool data.

Visit ethernow.xyz

Want to keep reading?

Good choice! We have more articles.

blocknative-gas-estimator-extension-now-supports-multiple-blockchains!
Gas

Blocknative Gas Estimator Extension Now Supports Multiple Blockchains!

Big News: Blocknative Gas Estimator Extension Now Supports Multiple Blockchains! We're super..

understanding-blocknative's-gas-estimator:-why-do-some-predictions-show-the-same-values?
Gas

Understanding Blocknative's Gas Estimator: Why Do Some Predictions Show the Same Values?

Understanding Blocknative's Gas Estimator: Why Do Some Predictions Show the Same Values? If you've..

base-101:-how-gas-works-on-base
Gas

Base 101: How Gas Works On Base

Incubated and developed by the popular centralized exchange Coinbase, Base is an Ethereum Layer..

Connect with us. Build with us.

We love to connect with teams who are building with Blocknative. Tell us about your team and what you would like to learn.

"After first building our own infrastructure, we appreciate that mempool management is a difficult, expensive problem to solve at scale. That's why we partner with Blocknative to power the transaction notifications in our next-generation wallet."

Schedule a demo