I would like to convert user's Ethereum address for example(0xc5D3a7d27DbDe23A7FC5E53F1a6f17F38C03194F) to substrate based address in this case(5DXoin5qNbzKt88CxDtx86vmaCxhxYzEfEWXahTvwgYMf4Gq). I manage to do it via subkey although it is based on the mnemonic, is it possible for me to convert any public address in any network to substrate-based address? The reason to do this is to to allow users with existing address and infrastructure such as Metamask or Trezor can use Polkadot and other substrate-based chain.
Asked
Active
Viewed 859 times
4
-
1When you "convert" do you just use the same public key for both chains or something else? I know that Ethereum public address is not a full public key, only part of it, making it not contain enough data to simply remap – Mikko Ohtamaa Feb 04 '21 at 13:19
-
@MikkoOhtamaa I would assume that I dont since I only have the address but it is possible for users to manually export their full private key? – Afeez Aziz Feb 05 '21 at 00:31
-
Metamask integrations are coming. Legder is live, and AFAIK trezor cannot support the key format without major work that no one is doing at the moment (that I know of) What you want to do is derive a public key from a shared seed or at least a shared private key.subkey is the tool for you, yes :) – Nuke Feb 05 '21 at 06:29
-
Users can export their seed, BUT WITH NOTE that they *must* know what they are doing with regards to exposing that seed on a new application. For example, if you wanted to, you could use the same 12 words in metamask now, or any BIP32/39/42 compliment algorithm to get a valid public key from it. – Nuke Feb 05 '21 at 06:31
-
1@NukeManDan so are you saying at this moment, there is no way for me to convert ethereum public address to polkadot and vice versa without users using their private key? – Afeez Aziz Feb 09 '21 at 04:31
-
@AfeezAziz sorry for the delay - on further thought on your proposed use case, I suggest you are after the wrong things here. If you are after using MM and Trezor with Ethereum signing operations to interact with a generic substrate node, you are not going to be able to. I suggest you look at https://moonbeam.network/ for your needs. – Nuke Feb 15 '21 at 18:05
1 Answers
1
MetaMask is implementing a new feature called snaps: (Documentation).
Once this functionality becomes standard, it would become trivial to make a snap that manages keychains for Polkadot. For example, here is the FileCoin snap: https://github.com/Chainsafe/filsnap/

Pandapip1
- 730
- 5
- 15