Different addresses from the same seed ethers v 6.15 vs Metamask #5048
Replies: 4 comments
-
I think the issue is with derivation paths. My above function generate paths like:
Too much depth |
Beta Was this translation helpful? Give feedback.
-
This can be used as workaround
|
Beta Was this translation helpful? Give feedback.
-
The password is definitely used as a separate source of entropy. But there is a function in ethers by provided to match the MetaMask derivation path. Keep in mind there are two standards. To match MetaMask, use There should be no issue with depth, but you must match a path to get a matching private key. |
Beta Was this translation helpful? Give feedback.
-
Moving to discussions. :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Ethers Version
6.15
Search Terms
derive address metamask
Describe the Problem
I discovered that using the same seed phrase with Ethers and MetaMask results in different addresses for child nodes. Here’s the code I use to generate multiple child addresses:
Initially, I thought the discrepancy might be due to the password, which could be acting as additional user-provided entropy. However, I tested it without the password, and it still produced different addresses compared to MetaMask.
Code Snippet
Contract ABI
Errors
Environment
node.js (v12 or newer)
Environment (Other)
No response
Beta Was this translation helpful? Give feedback.
All reactions