You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
Are there common APIs? Do they line up with Metamask's, or will we need some custom wrappers?
Overview
Ledger and Trezor both use BIP32 Hierarchical Wallet Paths for BTC and ETH wallets. That means we do the enumerating of the BTC/ETH addresses for user selection. After that, we're only concerned with signing transactions. For Ethereum, that generally means we can use Web3.js, and insert a middleware called a Web3 subprovider that only answers to calls for signing transactions. For Bitcoin, we will need to ask for transactions to be signed, and there is a question of whether we can afford some UX advantages due to the need for P2SWKH tx's over normal ones.
Aside: Metamask. Last time I used Metamask with my Ledger, the experience was poor. Multiple repeating dialogs, general slowness. Nearly all DApps (Maker, Uniswap, etc) integrate "natively" with the hardware wallet API's, rather than letting Metamask handle it.
Ethereum
Web3.js has the concept of Web3 subproviders, which respond to ETH RPC calls (eth_sign).
Simple to integrate
Works with existing code (although we still have to move from Truffle-Web3 to Web3.js)
Ledger implements a web3-subprovider, which is a middleware over their own API.
Hardware wallets: Ledger, Trezor
Mobile wallets: WalletConnect
Are there common APIs? Do they line up with Metamask's, or will we need some custom wrappers?
Overview
Ledger and Trezor both use BIP32 Hierarchical Wallet Paths for BTC and ETH wallets. That means we do the enumerating of the BTC/ETH addresses for user selection. After that, we're only concerned with signing transactions. For Ethereum, that generally means we can use Web3.js, and insert a middleware called a Web3 subprovider that only answers to calls for signing transactions. For Bitcoin, we will need to ask for transactions to be signed, and there is a question of whether we can afford some UX advantages due to the need for P2SWKH tx's over normal ones.
Aside: Metamask. Last time I used Metamask with my Ledger, the experience was poor. Multiple repeating dialogs, general slowness. Nearly all DApps (Maker, Uniswap, etc) integrate "natively" with the hardware wallet API's, rather than letting Metamask handle it.
Ethereum
Bitcoin
What do their failure scenarios look like? (e.g., if the device gets unplugged/plugged back in)
We can generally detect failures using events of connect/disconnect for each wallet.
transport.on('disconnect')
Progress
The text was updated successfully, but these errors were encountered: