{"_id":"@bctest/eth-ledger-bridge-keyring","_rev":"1-c30d45f4adb315d752a2f352761a3abd","name":"@bctest/eth-ledger-bridge-keyring","dist-tags":{"latest":"0.6.1"},"versions":{"0.6.1":{"name":"@bctest/eth-ledger-bridge-keyring","version":"0.6.1","description":"A MetaMask compatible keyring, for ledger hardware wallets","main":"index.js","engines":{"node":">=12.0.0"},"scripts":{"test":"mocha","lint":"eslint . --ext .js","lint:fix":"eslint --fix . --ext .js"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"repository":{"type":"git","url":"git+https://github.com/MetaMask/eth-ledger-bridge-keyring.git"},"keywords":["ethereum","keyring","ledger","metamask"],"author":{"name":"Bruno Barbieri"},"license":"ISC","bugs":{"url":"https://github.com/MetaMask/eth-ledger-bridge-keyring/issues"},"homepage":"https://github.com/MetaMask/eth-ledger-bridge-keyring#readme","resolutions":{"mocha/**/mkdirp":"^0.5.3"},"dependencies":{"eth-sig-util":"^2.0.0","@ethereumjs/tx":"^3.1.1","ethereumjs-tx":"^1.3.4","ethereumjs-util":"^7.0.9","events":"^2.0.0","hdkey":"0.8.0"},"devDependencies":{"@ethereumjs/common":"^2.2.0","@metamask/eslint-config":"^3.0.0","babel-eslint":"^10.1.0","chai":"^4.1.2","chai-spies":"^1.0.0","eslint":"^6.8.0","eslint-plugin-import":"^2.20.1","eslint-plugin-json":"^1.2.0","eslint-plugin-mocha":"^6.2.2","mocha":"^5.0.4"},"licenseText":"ISC License\n\nCopyright (c) 2020 MetaMask\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n","_id":"@bctest/eth-ledger-bridge-keyring@0.6.1","dist":{"shasum":"dd6002a4fcdf608eb2c77fd47bf4440c96d355c2","integrity":"sha512-FLEk0MvIEe55NO1aSAA8S6tKxcj0k3VuKCa6+6Yb8VEe+AowMicer4a5uqO3mnviLXDVn6wpKlG7INft2kWGYQ==","tarball":"https://registry.npmjs.org/@bctest/eth-ledger-bridge-keyring/-/eth-ledger-bridge-keyring-0.6.1.tgz","fileCount":6,"unpackedSize":24488,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwsImCRA9TVsSAnZWagAAlowP/iqiBKOjty8NOLDP4Dfi\nLSs+xgYKMGclBjqh38fOfs+UGhc/7KzYmuB+HAa4xgoPwQOS4AU4PpUounag\nTkGUaKkxHaspqZvRHQ4g2hRrvNyMlOxwnxSk5MkqgiMmzW88OD4AxH7DaZ68\nQeaWrFTVoPF4iNL2QF2bzlyK34bmNVF+va0q1dU2Pj2rtIqF6dg72eIrtu/K\nKk9Tp6aMhMWJyD95eQQvjN1RYmzjyNde/X9xMflmYfRuKHsdBVZcti6+RFyu\n/1RDJYcTpVICRNCPVIB3KC4whKlC8/TFPeIkHe/CURSq+kz7acV9F4jDEhNN\nFb2TRcS8pSBkVoGlViFJM6rvKDbFE9Dx71S01RUQ9+ZZNaB/60RYtvogmL95\nIxy3ze2J+OgR6OGF0l5iIvjpYTnGgug/05YJRgzQG+Y1KkWZFUsFeRielDug\npufRy+GZfVRQ6z5xP8QtgXeu8+PqdIkqcRixez6EtA7clyY1X18hd0gEmmJO\nvY0XuDeC1ItXQnNhlVHb7kGm/rHl13vQ0APvues4BLtmcEhxS9jsH2t18Cf5\neZMJAngnwbh+MRZT7JHP45KHTaSRxQ171tmGjwu/3OJfBlPd8v619o0r22G9\nATeq6c/5wY8JXCDAxv+VAn/OtyJ3fQDBqQvcO3i7lwFyopzKCCF1cwrjk7w2\n1Ycl\r\n=Qfd/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEtuAlhVF0G3yXeGukdAhk67/0fZ+0aU3qNwOpmAJh3qAiEA7AX6NkGRi+kZK3c1otIaLp6CpApJ1VtjstbiaeVKYwc="}]},"_npmUser":{"name":"binance-chain-npm","email":"bit-fe-ci@binance.com"},"directories":{},"maintainers":[{"name":"binance-chain-npm","email":"bit-fe-ci@binance.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eth-ledger-bridge-keyring_0.6.1_1623376422135_0.6813992913507365"},"_hasShrinkwrap":false}},"time":{"created":"2021-06-11T01:53:41.785Z","0.6.1":"2021-06-11T01:53:42.315Z","modified":"2022-04-04T18:02:32.387Z"},"maintainers":[{"name":"binance-chain-npm","email":"bit-fe-ci@binance.com"}],"description":"A MetaMask compatible keyring, for ledger hardware wallets","homepage":"https://github.com/MetaMask/eth-ledger-bridge-keyring#readme","keywords":["ethereum","keyring","ledger","metamask"],"repository":{"type":"git","url":"git+https://github.com/MetaMask/eth-ledger-bridge-keyring.git"},"author":{"name":"Bruno Barbieri"},"bugs":{"url":"https://github.com/MetaMask/eth-ledger-bridge-keyring/issues"},"license":"ISC","readme":"eth-ledger-bridge-keyring [![CircleCI](https://circleci.com/gh/MetaMask/eth-ledger-bridge-keyring.svg?style=svg)](https://circleci.com/gh/MetaMask/eth-ledger-bridge-keyring)\n==================\n\nAn implementation of MetaMask's [Keyring interface](https://github.com/MetaMask/eth-simple-keyring#the-keyring-class-protocol), that uses a Ledger hardware wallet for all cryptographic operations.\n\nIn most regards, it works in the same way as\n[eth-hd-keyring](https://github.com/MetaMask/eth-hd-keyring), but using a Ledger\ndevice. However there are a number of differences:\n\n- Because the keys are stored in the device, operations that rely on the device\n  will fail if there is no Ledger device attached, or a different Ledger device\n  is attached.\n\n- It does not support the `signMessage`, `signTypedData` or `exportAccount`\n  methods, because Ledger devices do not support these operations.\n\n- Because extensions have limited access to browser features, there's no easy way to interact wth the Ledger Hardware wallet from the MetaMask extension. This library implements a workaround to those restrictions by injecting (on demand) an iframe to the background page of the extension, (which is hosted [here](https://metamask.github.io/eth-ledger-bridge-keyring/index.html).\n\nThe iframe is allowed to interact with the Ledger device (since U2F requires SSL and the iframe is hosted under https) using the libraries from [LedgerJS](https://github.com/LedgerHQ/ledgerjs) *hw-app-eth* and *hw-transport-u2f* and establishes a two-way communication channel with the extension via postMessage.\n\nThe iframe code it's hosted in the same repo under the branch [gh-pages](https://github.com/MetaMask/eth-ledger-bridge-keyring/tree/gh-pages) and it's being served via github pages. In the future we might move it under the metamask.io domain.\n\nUsage\n-----\n\nIn addition to all the known methods from the [Keyring class protocol](https://github.com/MetaMask/eth-simple-keyring#the-keyring-class-protocol),\nthere are a few others:\n\n\n- **isUnlocked** : Returns true if we have the public key in memory, which allows to generate the list of accounts at any time\n\n- **unlock** : Connects to the Ledger device and exports the extended public key, which is later used to read the available ethereum addresses inside the Ledger account.\n\n- **setAccountToUnlock** : the index of the account that you want to unlock in order to use with the signTransaction and signPersonalMessage methods\n\n- **getFirstPage** : returns the first ordered set of accounts from the Ledger account\n\n- **getNextPage** : returns the next ordered set of accounts from the Ledger account based on the current page\n\n- **getPreviousPage** : returns the previous ordered set of accounts from the Ledger account based on the current page\n\n- **forgetDevice** : removes all the device info from memory so the next interaction with the keyring will prompt the user to connect the Ledger device and export the account information\n\nTesting\n-------\nRun the following command:\n\n```bash\nyarn test\n```\n\n\n\nAttributions\n-------\nThis code was inspired by [eth-ledger-keyring](https://github.com/jamespic/eth-ledger-keyring) and [eth-hd-keyring](https://github.com/MetaMask/eth-hd-keyring)\n","readmeFilename":"README.md"}