truffle-hdwallet-provider_privatekey

HD Wallet-enabled Web3 provider. Use it to sign transactions for addresses derived from private key.

Usage no npm install needed!

<script type="module">
  import truffleHdwalletProviderPrivatekey from 'https://cdn.skypack.dev/truffle-hdwallet-provider_privatekey';
</script>

README

truffle-hdwallet-provider_privatekey

HD Wallet-enabled Web3 provider. Use it to sign transactions for addresses derived from private key.

Install

$ npm i truffle-hdwallet-provider_privatekey --save

Requirements

Node >= 7.6

General Usage

You can use this provider wherever a Web3 provider is needed, not just in Truffle. For Truffle-specific usage, see next section.

var HDWalletProvider = require("truffle-hdwallet-provider_privatekey");

let privKey = 'xxxx';

const provider = new HDWalletProvider([privKey],'https://mainnet.infura.io/xxxxx');