button-icon

Entrar

Entrar
Archi's Academy
    Cursos
    Cursos
    #
  • Projetos
    Projetos
  • Archi's Academy

    Trilhas

    #
  • Blog
    Blog
  • Precos
    Precos
  • Contato
    Contato
  • Para clubes universitarios
    Para clubes universitarios

BLACK FRIDAY

85% de desconto durante todo novembro

whatsapp
Entre em contato
Archi's Academy

Navegacao

  • Cursos
  • Projetos
  • Blog
  • Precos
  • Para clubes universitarios
  • Contato

Cursos

    Trilhas

    • Desenvolvimento Frontend
    • Desenvolvimento Backend
    • Garantia de Qualidade (QA)
    • Programacao com IA Agente e LLMs
    • Desenvolvimento Mobile
    • DevOps

    Legal

    • Politica de Privacidade
    • Termos de Servico

    Contato

    +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

    Pazartesi, Kas 29, 2021

    Pronto para transformar conhecimento em habilidades reais?

    Comece a construir com formacao guiada por projetos e ganhe experiencia pratica desde o primeiro dia.

    TOC

    Table of Content

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