How to use the @ledgerhq/hw-app-eth.default function in @ledgerhq/hw-app-eth

To help you get started, we’ve selected a few @ledgerhq/hw-app-eth 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 cryppadotta / dotta-license / dot-abi-cli / bin / test-ledger-address.js View on Github external
const getAddress = async () => {
  console.log('Testing Ledger Hardware...');
  console.log('supported:', await Transport.isSupported());
  console.log('Devices:');
  console.log(await Transport.list());
  const transport = await Transport.create();
  const eth = new AppEth(transport);

  // note: this path matches MEWs: m/44'/60'/0'
  const result = await eth.getAddress("m/44'/60'/0'/0");
  return result;
};
getAddress().then(a => console.log(a));
github cryppadotta / dotta-license / dotlicense-cli / lib / experiments / get-ledger-address.js View on Github external
const getAddress = async () => {
  console.log('Testing Ledger Hardware...');
  console.log('supported:', await Transport.isSupported());
  console.log('Devices:');
  console.log(await Transport.list());
  const transport = await Transport.create();
  const eth = new AppEth(transport);

  // note: this path matches MEWs: m/44'/60'/0'
  const result = await eth.getAddress("m/44'/60'/0'/0");
  return result;
};
getAddress().then(a => console.log(a));
github floating / frame / main / signers / ledger / Ledger / index.js View on Github external
async getDevice () {
    if (this.pause) throw new Error('Device access is paused')
    if (Date.now() - this.lastUse < 300) await this.wait(300)
    await this.releaseDevice()
    this.pause = true
    this.currentDevice = new HID.HID(this.devicePath)
    this.currentTransport = new TransportNodeHid(this.currentDevice)
    return new Eth(this.currentTransport)
  }

@ledgerhq/hw-app-eth

Ledger Hardware Wallet Ethereum Application API

MIT
Latest version published 5 days ago

Package Health Score

84 / 100
Full package analysis