👝 Wallets #100
Replies: 8 comments 2 replies
-
@ccali11 Something I stumbled on through other node work – MetaMask currently doesn't support programmatic switching of the RPC URL for default chains (mainnet, goerli, etc.). You can see developer requests to remove their restriction here. We are interested because we'll have a use-case to switch the mainnet RPC URL to Casimir nodes, say if we want to pursue block building from our application. Here is an important issue to track. Related issues here, here, and a related EIP discussion here. Here is a sample request that would fail the MetaMask check (pretending Alchemy is Casimir). async function addCasimirNode(provider: EthersProvider) {
if (provider.request) {
return await provider.request({
method: 'wallet_addEthereumChain',
params: [{
chainId: '0x1',
chainName: 'Ethereum (Casimir)',
rpcUrls: [`https://eth-mainnet.alchemyapi.io/v2/${import.meta.env.PUBLIC_ALCHEMY_KEY}`],
blockExplorerUrls: ['https://etherscan.io']
}],
})
}
} We can, on the other hand, make the user complete the same steps manually, as MetaMask allows user-(in-wallet)-added custom RPC networks with default chains. See here. |
Beta Was this translation helpful? Give feedback.
-
Another example, this time using a non-default chain, so you can see how MetaMask looks when it works how we want it to work. async function addBinanceNode(provider: EthersProvider) {
if (provider.request) {
return await provider.request({
method: 'wallet_addEthereumChain',
params: [{
chainId: '0x38',
chainName: 'Binance Smart Chain',
nativeCurrency: { name: 'BNB', symbol: 'BNB', decimals: 18 },
rpcUrls: ['https://bsc-dataseed.binance.org/'],
blockExplorerUrls: ['https://bscscan.com/']
}]
})
}
} |
Beta Was this translation helpful? Give feedback.
-
Ledger + Trezor Bitcoin App Address TypesNoting that it is worth considering which addresses users are expecting to use their ledger device with Casimir. Specifically, there are multiple types of addresses to consider: legacy (1), p2sh (segwit), bech32 (native segwit), etc. In my Ledger Live account, I only have one account and it is listed as "Native Segwit", but if I try to get the legacy address via Casimir, it will return me a legacy address. That could be confusing to the user, so we may want to give them the options to select which type of bitcoin address to choose. |
Beta Was this translation helpful? Give feedback.
-
IoTeX UpdateChatted with IoTeX team in discord. They informed me the Desktop Wallet will soon be deprecated and to build for Metamask and Iopay Mobile. Thinking we integrate Iopay Mobile via WalletConnect given that it is a mobile wallet. When I asked them which staking methods to use with a web3 client library (e.g., ethers), they suggested taking a look at this IIP, but acknowledged they don't have any good examples of how to do this and that adding it to their documentation is in their backlog. |
Beta Was this translation helpful? Give feedback.
-
Coinbase Wallet UpdateNoticing a few things to look into:
|
Beta Was this translation helpful? Give feedback.
-
Ledger Wallet Update
We may need to just rely on old package from LedgerHQ monorepo (from #1 above) for now to get address and balance, but no transactions for now. Will revisit for sure, but let me know if we want to prioritize @shanejearley |
Beta Was this translation helpful? Give feedback.
-
Sounds great Chris — good to move beyond it for the near term until we need BTC transactions. Thanks for noting.
… On Feb 3, 2023, at 14:50, Chris Cali ***@***.***> wrote:
Ledger Wallet Update
Building bitcoin transactions is not all that well documented for this library (hw-app-btc), so I asked around on the Ledger Discord and they said that library is old and pointed me to use this (app-bitcoin-new)
The app-bitcoin-new library was a little wonky (discussed with @shanejearley and he noticed the package is just not published or setup well for download and also very incomplete-looking and only ever had one commit back in March.
Used npm install 'https://gitpkg.now.sh/LedgerHQ/app-bitcoin-new/bitcoin_client_js?develop' to try and incorporate this in the project and use the methods they outline in that repo, but to no success. I keep getting the build error (see screenshot below), and tried the following three things:
include the dependency in vite config optimizeDeps
exclude the dependency in vite config optimizeDeps
cloning down the repository locally (got a 500 error, so not good)
We may need to just rely on old package from LedgerHQ monorepo (from #1 above) for now to get address and balance, but no transactions for now. Will revisit for sure, but let me know if we want to prioritize @shanejearley
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
Beta Was this translation helpful? Give feedback.
-
Trezor UpdateWhile it looks like Ledger allows you to select the Goerli Testnet App on the device itself before then connecting to the application, Trezor does not offer this sequence of steps. Instead, there is simply the Trezor Suite app that does not offer/require user to select which application they are choosing. Each time I try to connect using TrezorConnect library, it defaults to my Mainnet Ethereum account(s)/address(es), which is a different set of addresses than my Goerli Testnet account/address. My cursory research leads me to believe that we would have to programmatically alter the derivation path to account for selecting the Goerli Testnet because I noticed that Ropsten (and other testnets have different derivation paths), but then again Ledger does not seem to require different derivation paths to connect to the respective/intended applications (Mainnet vs. Testnet). This is an issue that is not critical for mainnet deployment, but would be critical for Goerli testnet deployment if we want to offer the user the ability to connect Trezor wallet. |
Beta Was this translation helpful? Give feedback.
-
Notes on wallets
Beta Was this translation helpful? Give feedback.
All reactions