button-icon

Login

Login
Archi's Academy
    Courses
    Courses
    #
  • Projects
    Projects
  • Archi's Academy

    Tracks

    #
  • Blogs
    Blogs
  • Pricing
    Pricing
  • Contact
    Contact
  • For Student Clubs
    For Student Clubs

BLACK FRIDAY

85% Discount for all November

whatsapp
Get in touch
Archi's Academy

Navigation

  • Courses
  • Projects
  • Blogs
  • Pricing
  • For Student Clubs
  • Contact Us

Courses

    Tracks

    • Frontend Development
    • Backend Development
    • Quality Assurance
    • Agentic AI Coding & LLMs
    • Mobile Development
    • DevOps

    Legal

    • Privacy Policy
    • Terms of Service

    Contact

    +1 (217) 200 90 93
    Suite No: 8, 400 Emmet Street
    Kissimmee, Florida 34741 USA
    [email protected]

    Copyright © Tech Career Yazılım Danışmanlık A.Ş. 2026

    instagramlinkedingithubyoutubexfacebook
    visamastercardstripeiyzicoamerican-express
    ETBIS
    1. Home›
    2. Blog›
    3. Wallet Providers: HDWalletProvider

    Blockchain

    Wallet Providers: HDWalletProvider

    Let’s start with understanding wallets.
    Wallets are applications that allow you to interact with your Ethereum account. Think of it like a bankless internet banking application. Your wallet allows you to read your balance, send transactions and connect to apps.
    Your wallet is only a tool for managing your coin account. That means you can swap wallet providers at any time.
    Wallets don’t have custody of your funds, you do have. They’re just a tool for managing what’s really yours.

    Wallet Provider

    “An entity that provides a virtual currency wallet (i.e., a means (software application or another mechanism) for holding, storing, and transferring coins or other assets). A wallet holds the user’s private keys, which allow the user to spend virtual currency allocated to the virtual currency address in the blockchain."

    HDWalletProvider

    HD Wallet-enabled Web3 provider. Use it to sign transactions for addresses derived from a 12 or 24-word mnemonic.
    Another benefit of using HDWalletProvider is that it helps to send our private and public key information along with our code while developing smart contracts, and it allows us to make deployments on the code without the need for another application.
    Spending money maliciously from someone’s wallet is prevented by signing the transactions. In this case, we have a key pair; public and private. The public key is used as our wallet’s address and is freely shareable, while the private key is used to sign transactions. This means we can only spend money in a wallet if we have the associated private key.

    General Usage

    By default, the HDWalletProvider will use the address of the first address that's generated from the mnemonic. If you pass in a specific index, it'll use that address instead.

    Customize

    You can customize hdwallet-provider with the options below.

    Parameters:

    WalletProvider-1.png
    This provider can be used wherever a Web3 provider is needed. It can be used not only with Truffle but also with other development environments.
    Here we have an example:
    const HDWalletProvider = require("@truffle/hdwallet-provider");
    const Web3 = require("web3");
    const mnemonicPhrase = "mountains supernatural bird..."; // 12 word mnemonic
    
    provider = new HDWalletProvider({
      mnemonic: mnemonicPhrase,
      providerOrUrl: "http://localhost:8545",
      addressIndex: 5
    });
    
    
    That was all about HDWalletProviders. Drop a like and share it if you found it informative.
    By the way, if you want to learn more, we are going to start our Blockchain course soon.
    Meet you in the next blog, have a good day!
    archis-trainee

    Seher Saylık

    Monday, Nov 29, 2021

    Ready to turn insights into real skills?

    Start building with guided, project-based training and gain hands-on experience from day one.

    TOC

    Table of Content

    • 01Wallet Provider
    • 02HDWalletProvider
    • 03General Usage
    • 04Customize
    • 05Parameters: