{"_id":"@dexon-foundation/eth-trezor-keyring","_rev":"1-984591ce5865cadb5ee99866200e24d4","name":"@dexon-foundation/eth-trezor-keyring","dist-tags":{"latest":"0.4.0"},"versions":{"0.4.0":{"name":"@dexon-foundation/eth-trezor-keyring","version":"0.4.0","description":"A MetaMask compatible keyring, for trezor 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-trezor-keyring.git"},"keywords":["ethereum","keyring","trezor","metamask"],"author":{"name":"Bruno Barbieri"},"license":"ISC","bugs":{"url":"https://github.com/metamask/eth-trezor-keyring/issues"},"homepage":"https://github.com/metamask/eth-trezor-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","trezor-connect":"^7.0.1"},"devDependencies":{"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":"4067432e92e59168e62cb4834bd3d0de6b5481e1","_id":"@dexon-foundation/eth-trezor-keyring@0.4.0","_nodeVersion":"11.14.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-of+7XCg+vNRcbYjVvvAQOLzLxLkW6Hh8WIrZPOZs6t6aqEiCmO/LB6P/0/gZUbtmEhvkZTmzwvi6UDHmz7r2HA==","shasum":"e3013cf448db23915bce62b0f9c2b5e24ec040c6","tarball":"https://registry.npmjs.org/@dexon-foundation/eth-trezor-keyring/-/eth-trezor-keyring-0.4.0.tgz","fileCount":10,"unpackedSize":87666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcuXUXCRA9TVsSAnZWagAAPlUP/R/yYgVuwaF73r2FCO45\ne7MnFEIYqyT9+KszAomKaUEyBihh52yFEq2ey8ifUzI3EesvKm0pNPSJgnoB\nNL8gBd4oSI8SRs0yQ5ua3fa5kbSOO9OZMq0Xw7qQlJTCquoqu/T576GxSrpK\n08VwLxIv4piY9GNxx9snAVKY2CK7sF/IHq9GX80uW+H9RlmOAME8SOJZtljC\nnzQ4Q1O1lNTUePorY7LCfKBy6HcOB1Gy3k1SWXIS3cPX/KjRYYLvULIhJm+O\nDMLOcI0iFcHqvSNIU61isQ6b0r8/aaMh3nZ3fq6n1Lj6CsY5zHqUyRami8pQ\nUdp/wm2qV8CKX1m++ybvzSi0Qa9xuRvtO35mSq59IpvxiPY1bWBQoSpDj/ux\nWZD95irZlttwr7CPL4//6L6amhAHk5VUYbdXVURxbMrHB9Cmi8ffnwVxKHrK\nF7qEENKuZpVAD0ro14+6MumLz66JdzVHf12TpkCG5yfrYb/ddEDF9CH4BeAJ\n1dfYDjpspQIvo0w8SFQus0qC7LrPJTkHuK1jOFb/0C70D3vWiLqr2CL3Yo23\nyRTsq6UR/Fqj6q6OwnNdogzbZOX28NHJLV0xj+GWBZ5U+n2XWkNRertY2k39\npfF57Q1obwfHBBwvergL4usGAoWMpxK4uShVKpvUOUfZAMGs4DwrLOlkVfWu\nnumD\r\n=8gfb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBIpaHpKuj7CFw21zouJF2yO95MyLAFKCz+1BHRK693TAiBBiP6S6d3p+dTx/+IsBgRy+6f+UJza0Uipjtaf/qYXfg=="}]},"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-trezor-keyring_0.4.0_1555658006756_0.5048299243189074"},"_hasShrinkwrap":false}},"time":{"created":"2019-04-19T07:13:26.587Z","0.4.0":"2019-04-19T07:13:26.910Z","modified":"2022-04-05T04:12:32.891Z"},"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 trezor hardware wallets","homepage":"https://github.com/metamask/eth-trezor-keyring#readme","keywords":["ethereum","keyring","trezor","metamask"],"repository":{"type":"git","url":"git+https://github.com/metamask/eth-trezor-keyring.git"},"author":{"name":"Bruno Barbieri"},"bugs":{"url":"https://github.com/metamask/eth-trezor-keyring/issues"},"license":"ISC","readme":"eth-trezor-keyring [![CircleCI](https://circleci.com/gh/MetaMask/eth-trezor-keyring.svg?style=svg)](https://circleci.com/gh/MetaMask/eth-trezor-keyring)\n==================\n\nAn implementation of MetaMask's [Keyring interface](https://github.com/MetaMask/eth-simple-keyring#the-keyring-class-protocol), that uses a TREZOR hardware\nwallet 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 TREZOR\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 TREZOR device attached, or a different TREZOR device\n  is attached.\n- It does not support the `signMessage`, `signTypedData` or `exportAccount`\n  methods, because TREZOR devices do not support these operations.\n- The method `signPersonalMessage` requires the firmware version 2.0.7+ for TREZOR Model T and 1.6.2+ on TREZOR ONE\n\nUsing\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 TREZOR device and exports the extended public key, which is later used to read the available ethereum addresses inside the trezor 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 TREZOR account\n\n- **getNextPage** : returns the next ordered set of accounts from the TREZOR account based on the current page\n\n- **getPreviousPage** : returns the previous ordered set of accounts from the TREZOR 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 TREZOR 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"}