-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
External accounts implemented for issue #5640 #6143
Conversation
@tmashuang This is the followup of PR #6007 . Sorry I could not reopen the issue. |
@caffeinum I have implemented both Parity Signer, and ERC67 types of signing for external accounts in Metamask. |
Minor lint fix. Co-Authored-By: r001 <rob@nyar.eu>
… only in one window
ac2d7e5
to
7c37b8b
Compare
I would need some help with css styling: "Sign with" dropdown should be placed over "signature" input. The problem is that the "sign with" puts his dropdown under "signaturee" input because of some weird zIndex stuff. Also the dropdowns should be of equal size. And different screensizes should be applied to QR code size. The QR code should be sized as large as possible. |
Some additional tests would be also nice to have. |
@r001 why'd you close? |
@caffeinum you can find the new one here: PR #6267 |
This is the reopen of PR #6007.
External acccounts allow Metamask to track account whose private keys are stored on a safe device, and tx data and signatures are exchanged by using QR codes. This allows very safe account password storage.
This pull request enables users to create so called external accounts. This means that after applying this pull request in the "import account" menu there will be an "external" tab that enables importing an ethereum address. There is no local private key stored, but upon confirming a transaction a QR code is presented and the transaction can be signed by an external signer. And the signature can be provided in the signature input field. By providing the signature, the transaction will be signed, and published.
The way it works is the following:
signTransaction()
function is called.extToSign
array, which is monitored by the UI modal.js base component.extToSign
entryui/app/components/modals/modal.js
starts the external-sign-modal.js window, and displays QR code, and requests signature.To allow for external signatures, eth-keyring-controller package had to be updated, and eth-external-account-keyring package was created. So in the package.json my updated ones are the sources.
Eth-external-account-keyring is available at:
https://github.com/r001/eth-external-account-keyring
Install instructions for reference implementation of encoding/decoding QR code can be found at
https://github.com/r001/qr-encoding/blob/master/INSTALL.md
Modified signer that can create appropriate signature can be found at :
https://github.com/r001/dapptools/tree/ethsign-signature
To create signature use
ethsign tx --signature-only <tx options>...