Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

60
Views
I want to interact with my smart contract using Ledger Nano X and javascript

I keep getting the error that 'TypeError: Eth is not a constructor' every time I try to instantiate. Not sure what the issue is, I am using nodejs and have tried to start a new directory and reinstall the library and it didn't work. Does anyone know how to fix this?

Here is my code:

import TransportNodeHid from "@ledgerhq/hw-transport-node-hid";
import Eth from "@ledgerhq/hw-app-eth";

async function lol() {
  const transport = await TransportNodeHid.default.create();
  const eth = new Eth(transport);
  const result = await eth.getAddress("44'/60'/0'/0/0");
  console.log(result);
}

lol();
7 months ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.