Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

truffle-privatekey-provider

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

truffle-privatekey-provider

Private Key Web3 provider

  • 1.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
121
decreased by-19.33%
Maintainers
1
Weekly downloads
 
Created
Source

NPM

truffle-privatekey-provider

Private Key provider for Web3. Used to sign transactions by provider private key

Install

$ npm install truffle-privatekey-provider

Usage

Provider can be used either with Web3 only or in Truffle infrastructure

Web3 Usage

var PrivateKeyProvider = require("truffle-privatekey-provider");
var privateKey = "62537136911bca3a7e2b....";
var provider = new PrivateKeyProvider(privateKey, "http://localhost:8545");

Parameters:

  • privateKey: string. private key for account that would be used to sign transactions.
  • providerUri: string. URI of Ethereum client to send Web3 requests.

Truffle Usage

truffle.js

var PrivateKeyProvider = require("truffle-privatekey-provider");

var privateKey = "62537136911bca3a7e2b....";

module.exports = {
  networks: {
    rinkeby: {
      provider: () => new PrivateKeyProvider(privateKey, "https://rinkeby.infura.io/"),
      network_id: 4
    },
    ....
  }
};

Keywords

FAQs

Package last updated on 02 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc