Skip to content

Connect to NEAR Ledger app from browser

License

MIT, Apache-2.0 licenses found

Licenses found

MIT
LICENSE
Apache-2.0
LICENSE-APACHE
Notifications You must be signed in to change notification settings

near/near-ledger-js

near-ledger-js

A JavaScript library for communication with Ledger Hardware Wallet.

Example usage

  import { createClient, getSupportedTransport } from "near-ledger-js";
  
  const transport = await getSupportedTransport();
  transport.setScrambleKey("NEAR");
  
  transport.on('disconnect', () => {...});

In an onClick handler:

  const client = await createClient(transport);
  // If no error thrown, ledger is available. NOTE: U2F transport will still get here even if device is not present 

To see debug logging for getSupportedTransport(), import setDebugLogging() and call setDebugLogging(true) before using the package.

How to run demo project

  1. yarn to install dependencies
  2. yarn start to start local server with Parcel
  3. Open https://localhost:1234 in your browser
  4. Open browser console
  5. Try examples shown on the page

License

This repository is distributed under the terms of both the MIT license and the Apache License (Version 2.0). See LICENSE and LICENSE-APACHE for details.

About

Connect to NEAR Ledger app from browser

Resources

License

MIT, Apache-2.0 licenses found

Licenses found

MIT
LICENSE
Apache-2.0
LICENSE-APACHE

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 9