{"_id":"@dexon-foundation/eth-ledger-bridge-keyring","_rev":"1-07a7335d433fc1f83b9d185f4f11b3b8","name":"@dexon-foundation/eth-ledger-bridge-keyring","dist-tags":{"latest":"0.2.0"},"versions":{"0.2.0":{"name":"@dexon-foundation/eth-ledger-bridge-keyring","version":"0.2.0","description":"A MetaMask compatible keyring, for ledger hardware wallets","main":"index.js","scripts":{"test":"mocha","lint":"eslint . --ext .js","lint:fix":"eslint --fix . --ext .js"},"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","dependencies":{"eth-sig-util":"^1.4.2","ethereumjs-tx":"^1.3.4","ethereumjs-util":"^5.1.5","events":"^2.0.0","hdkey":"0.8.0"},"devDependencies":{"acorn":"^6.0.4","assert":"^1.4.1","babel-eslint":"^8.0.0","babel-runtime":"^6.26.0","chai":"^4.1.2","chai-spies":"^1.0.0","eslint":"^5.0.0","eslint-plugin-chai":"0.0.1","eslint-plugin-json":"^1.2.0","eslint-plugin-mocha":"^5.0.0","mocha":"^5.0.4"},"gitHead":"3a4a310ebb1e03366919d106bfa956df79d410a8","_id":"@dexon-foundation/eth-ledger-bridge-keyring@0.2.0","_nodeVersion":"11.14.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-Bbk8dCouoUupzWgJgallleUWWgqsSQ+/WaiAn7x5C+ytSatrb4ZlJbrq0LS3sgTFEDAaWo8kZzxD30ezhAZMkA==","shasum":"1f5d927195948a350a55ab323b4b9970e76da41b","tarball":"https://registry.npmjs.org/@dexon-foundation/eth-ledger-bridge-keyring/-/eth-ledger-bridge-keyring-0.2.0.tgz","fileCount":9,"unpackedSize":94803,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcuXR/CRA9TVsSAnZWagAAsAUP/RStZva6POshFL9SGu8Z\njJ4Rp5MD/6QukCb/QqofNKwzrO0RLR8oXcHvnqiMvPPOKz2PPAAPEpwJxUwH\nm8acnKlnhZaaVEqDPazATk6j9eEPhDafw3HIqGvz3JBuKkAgP71mOQ6BFhuW\nSJaJdUyte1i8VlNATihbeSZ0m6CaWoo4F2Pq21UXHV6thDsaSMRxp/YWobKl\nOl95jprQi9IynnrwoSixxhuqofaJzuyrYz36n0ZJrlmlmcjLGzmKQ5/jh1A9\naYhqlpIH+El7UUsuszVq8yME0fREHiJmJGyJhBVPG2Q3FKgVC/JfCjDdkXGh\n1wYav305R9K3GUdo8/TErFMpHF0wPuMRQT7wMXIZ94qMINl3T3F5giSpgbwt\nmqFKaH6t/ZfrUEebXGen0mtv21JKGrjdRU+RrlpL1y0hQnXNWTZIvUecItfw\nCSRUcmzYfW/WXsVeHIeb+b2cxJ0T36MbBOY4SUrO2wdiO1fj+ZJuQmBxS958\nQDbxgQeAhhctXHZy3FGd8dveOUKB9msTwkNzgdiJMKE7B5SPO3Y0FmU2LCTn\nUsiZJzBoMufurTnT8b9pjGfB8MIHNhFKxrCGtaSu16hSfTdzk76JbzScuJnO\nmwdxbcous183hcOTMB4stHi90BnjpuQA8W6EjmUfq6byteJtC1f9Wkvt6t0A\n7NAE\r\n=ohXc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGSbr82wWxCneYyiwHV/TvTMueVcWzyE0T1jmahh3B1gIgSF7gHZ4hZcOK0ZHn/O0ag37Xoe4r+dLli548yGqbM3k="}]},"maintainers":[{"name":"chaoweichiu","email":"chaoweichiu@gmail.com"},{"name":"cobinhood-dev","email":"dev@cobinhood.com"},{"name":"boczeratul","email":"boczeratul@gmail.com"}],"_npmUser":{"name":"boczeratul","email":"boczeratul@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/eth-ledger-bridge-keyring_0.2.0_1555657855162_0.8899074496343702"},"_hasShrinkwrap":false}},"time":{"created":"2019-04-19T07:10:54.911Z","0.2.0":"2019-04-19T07:10:55.330Z","modified":"2022-04-05T04:12:32.731Z"},"maintainers":[{"name":"chaoweichiu","email":"chaoweichiu@gmail.com"},{"name":"cobinhood-dev","email":"dev@cobinhood.com"},{"name":"boczeratul","email":"boczeratul@gmail.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```\nnpm 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"}