How to use the @ledgerhq/web3-subprovider.default function in @ledgerhq/web3-subprovider

To help you get started, we’ve selected a few @ledgerhq/web3-subprovider examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MuzikaFoundation / muzika-platform / projects / core / common / providers / web3-wallet / ledger.provider.ts View on Github external
constructor(opts?: SubproviderOptions,
              providerUrl?: string) {
    opts = Object.assign({
      accountsLength: 5
    }, opts);

    const getTransport = () => TransportU2F.create();

    const ledger = createLedgerSubprovider(getTransport, opts);

    const rpcProvider = new RpcSubprovider({
      rpcUrl: providerUrl || DEFAULT_RPC_URL
    });

    this.engine = new ProviderEngine({pollingInterval: 10000});
    this.engine.addProvider(ledger);
    this.engine.addProvider(rpcProvider);
    this.engine.start(); // Required by the provider engine.
  }
github enslogin / Hackathon / packages / modules / ledger / lib / ledger.js View on Github external
window.provider = (config) => {

	const basicProvider = new ethers.providers.InfuraProvider(config.provider.network);

	const engine = new ProviderEngine();
	const getTransport = () => TransportU2F.create();
	const ledger = createLedgerSubprovider(getTransport, { accountsLength: 1 });
	engine.addProvider(ledger);
	engine.addProvider(new RpcSubprovider({ rpcUrl: '${basicProvider.baseUrl}/api' }));
	engine.start();
	return engine;
}
github OriginProtocol / origin-js / token / lib / ledger.js View on Github external
constructor(options, url) {
    const getTransport = () => TransportU2F.create()
    const ledger = createLedgerSubprovider(getTransport, options)

    this.engine = new ProviderEngine()
    this.engine.addProvider(ledger)
    this.engine.addProvider(new FiltersSubprovider())
    Web3.providers.HttpProvider.prototype.sendAsync = Web3.providers.HttpProvider.prototype.send
    this.engine.addProvider(new ProviderSubprovider(new Web3.providers.HttpProvider(url)))
    this.engine.start()
  }

@ledgerhq/web3-subprovider

Ledger Hardware Wallet Ethereum Web3 subprovider

Apache-2.0
Latest version published 4 years ago

Package Health Score

45 / 100
Full package analysis

Popular @ledgerhq/web3-subprovider functions