wallet-selector
wallet-selector copied to clipboard
Add Support for Ledger Live in Wallet Selector
Description
Requires: WalleConnect v2. Check in on progress.
Damir Pjetlovic March 3, 2023 at 4:12 AM
As the March begins, we checked out if there’s any progress in WalletConnect update integration. So far WalletConnect V2 isn’t introduced in any of the PR’s. It would be nice if we had more details as at this moment we’re not aware if related work is happening.
Damir Pjetlovic January 4, 2023 at 1:37 AM
We’ve got the response from the Ledger Live team. Wallet Connect V2 is planned to be available in March.
Ammar Humackic December 14, 2022 at 4:22 AM
We reached out to the Ledger Live team on their Discord to get more details on the status of adding full support for NEAR accounts (adding, syncing, etc.) and to discuss on possible approach we can take for connecting. @Damir Pjetlovic shared his current findings there
Damir Pjetlovic December 13, 2022 at 3:59 AM
There’s been some progress with Near account integration, however, only WalletConnect v1.x, is supported in Ledger Live, but v2.x is needed in order to connect with wallet selector.
From the investigations, it was found that Ledger Live (walletconnect app) now supports WalletConnect v2.
The announcement can be found here: https://support.ledger.com/hc/en-us/articles/360018444599-Connecting-Ledger-Live-to-DApps-with-WalletConnect?docs=true
This would unblock further investigations and we can learn more about how the support for Ethereum has been handled in this app and see if other chains can be supported.
Although WalletConnect v2 is supported in this app only the eip155
related currencies are supported:
https://github.com/LedgerHQ/wallet-connect-live-app/#supported-currencies
These are the repositories that we need to have a look at first:
- WalletConnect ledger-live app: https://github.com/LedgerHQ/wallet-connect-live-app/
- Ledger-live desktop app: https://github.com/LedgerHQ/ledger-live/tree/develop/apps/ledger-live-desktop
- WalletConnect ledger-live app: https://github.com/LedgerHQ/wallet-connect-live-app
This app currently supports only eip155
namespace, the logic for creating a proposal to connect with WalletConnect handles only this namespace, the app needs to be modified to handle any (other) namespaces such as near
namespace.
From the investigation so far I was unable to find a way to get the publicKey
associated with the accountId
that is imported in Ledger Live.
The app above uses this Wallet API Client that offers a set of public APIs to communicate with Ledger Live but when fetching the account.list()
the publicKey
is not included this is a limitation because this key is required to create transactions that need to be signed on the wallet with the full access key.
- Ledger-live desktop app: https://github.com/LedgerHQ/ledger-live/tree/develop/apps/ledger-live-desktop
In Ledger Live Desktop the transactions for near
are built based on this code here: buildTransaction so they have a concept of mode
-s the supported modes are stake
| unstake
| witdhdraw
and the default one is send
which adds a transfer action by default. This means that for any kind of transaction, a transfer
action will be added.
Further investigation is needed to check what happens when we trigger the sign method when connected with a near
account even if we need to do it with hardcoded values for now.