Socket
Socket
Sign inDemoInstall

truffle-caver-provider

Package Overview
Dependencies
5
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    truffle-caver-provider

HD Wallet-enabled provider for Klaytn network


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

truffle-caver-provider

HD Wallet-enabled provider. This source was forked from truffle-hdwallet-provider and modified to work with Klaytn network. Use it to sign transactions for addresses derived from a 12 or 24 word mnemonic or any private key.

Install

$ npm install truffle-caver-provider

Requirements

Node >= 7.6
Web3 1.0.0-beta.37

Truffle Usage

You can easily use this within a Truffle configuration. For instance:

truffle-config.js

const CaverProvider = require("truffle-caver-provider");

const mnemonic = "mountains supernatural bird ...";

module.exports = {
  networks: {
    development: {
      host: "localhost",
      port: 8545,
      network_id: "*" // Match any network id
    },
    baobab: {
      // must be a thunk, otherwise truffle commands may hang in CI
      provider: () =>
        new CaverProvider(mnemonic, "https://api.baobab.klaytn.net:8651"),
      network_id: '1001', //Klaytn baobab testnet's network id
      gas: ‘2000000’,
      gasPrice: ‘25000000000’,
    }
  }
};

You can also use private key.

truffle-config.js

const CaverProvider = require("truffle-caver-provider");

const privateKey = "0x...";

module.exports = {
  networks: {
    baobab: {
      provider: () =>
        new CaverProvider(privateKey, "https://api.baobab.klaytn.net:8651"),
      network_id: '1001', //Klaytn baobab testnet's network id
      gas: ‘2000000’,
      gasPrice: ‘25000000000’,
    }
  }
};

FAQs

Last updated on 02 Jul 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc