core
core copied to clipboard
Ledger integration
Ledger PR
Ledger integration
This PR expands the responsibility of the KeyringController to support the LedgerKeyring from @ledgerhq/metamask-keyring.
Description
Itemize the changes you have made into the categories below
-
BREAKING:
- NA
-
FIXED:
- NA
-
CHANGED:
KeyringController.signTypedMessage- Added support to check if the account is a ledger device and if so, propagate the signing request to the device.
-
REMOVED:
- NA
-
ADDED:
KeyringController.getLedgerKeyring- Method to retrieve the keyring for ledger.
KeyringController.connectLedgerHardware- Method to connect to a device using a
Transportobject.
- Method to connect to a device using a
KeyringController.unlockLedgerDefaultAccount- Method to retrieve the first account from the Ledger device.
KeyringController.openEthereumApp- Method to open the Ethereum app on the Ledger device
KeyringController.closeRunningApp- Method to close the current app on the Ledger device.
KeyringController.forgetLedger- Method to reset the state of the keyring.
-
DEPRECATED:
- NA
-
SECURITY:
- NA
Checklist
- [x] Tests are included if applicable
- [x] Any added code is fully documented
Issue
Progresses https://github.com/MetaMask/MetaMask-planning/issues/85
References
- https://github.com/MetaMask/controllers/pull/841
- https://github.com/MetaMask/controllers/pull/778
- @ledgerhq/metamask-keyring
- @ledgerhq/hw-transport
Thanks for the review @mcmire, I have added the explicit unit test to the methods you pointed out and improve the typing.
Hey @mcmire, I'll close this PR and open it again when the Ledger integration resume
This integration is currently stalled. We'll get back to it during Q12023