-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import metamask web3j keys to Libp2p #140
Comments
What type of key is this? You can check the supported key types in the peer id spec |
The key is |
Do you know what is the type of the key? From what I can understand, it does not seem like any of the ones we support:
|
Sorry, @vasco-santos I am unable to understand this actually. i.e. the spec of this key. |
The libp2p spec accepts keys in the following formats:
From my understanding, the Ethereum key from You will need to get that into a libp2p valid key with https://github.com/libp2p/js-libp2p-crypto#cryptokeysmarshalpublickeykey-type and then use this in the peer-id |
|
It would be worth to make sure on the actual key type. You can try to generate keys using https://github.com/libp2p/js-libp2p-crypto#cryptokeysgeneratekeypairtype-bits and see the actual format of public key you would need. For marshalPublicKey you need one of |
I had found the solution. I don't know its perfect or not but I found it. S.p Thanks to @AztecProtocol for Idea is we are generating same peer id and ethereum address from same private Key. Since in metamask we dont have private key or public key access. From metamask we can sign message and send to the node. If signature match with public key then we can verify the request from particular peer is from the same owner of private id.
|
Hello,
How can I create a libp2p key from the metamask ethereum's public key
I tried:
I am getting error in the last line.
Help please.
The text was updated successfully, but these errors were encountered: