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

@umaprotocol/web3-subprovider

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@umaprotocol/web3-subprovider

Ledger Hardware Wallet Ethereum Web3 subprovider

  • 4.74.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
279
increased by15.29%
Maintainers
1
Weekly downloads
 
Created
Source

@ledgerhq/web3-subprovider

Library for Ledger Hardware Wallets.

Github, Ledger Devs Slack

API

Table of Contents

SubproviderOptions

Type: {networkId: number, path: string?, askConfirm: boolean?, accountsLength: number?, accountsOffset: number?}

Properties
  • networkId number
  • path string?
  • askConfirm boolean?
  • accountsLength number?
  • accountsOffset number?

createLedgerSubprovider

Create a HookedWalletSubprovider for Ledger devices.

Parameters
  • getTransport function (): Transport<any> gets lazily called each time the device is needed. It is a function that returns a Transport instance. You can typically give ()=>TransportU2F.create()
  • options SubproviderOptions?
Examples
import Web3 from "web3";
import createLedgerSubprovider from "@ledgerhq/web3-subprovider";
import TransportU2F from "@ledgerhq/hw-transport-u2f";
import ProviderEngine from "web3-provider-engine";
import RpcSubprovider from "web3-provider-engine/subproviders/rpc";
const engine = new ProviderEngine();
const getTransport = () => TransportU2F.create();
const ledger = createLedgerSubprovider(getTransport, {
accountsLength: 5
});
engine.addProvider(ledger);
engine.addProvider(new RpcSubprovider({ rpcUrl }));
engine.start();
const web3 = new Web3(engine);

Returns HookedWalletSubprovider

Keywords

FAQs

Package last updated on 19 Nov 2019

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