Skip to content

General question about importing private keys for did:ethr #783

Answered by mirceanis
Ajmasta asked this question in Q&A
Discussion options

You must be logged in to vote

You are doing everything almost perfectly, kudos!

The issue with the public key can be fixed by using a compressed public key, since that's what did:ethr requires.
You can get a did:ethr from a SigningKey like so:

  const keyPair = new SigningKey(privateBytes);
  const identifier = `did:ethr:rinkeby:${keyPair.compressedPublicKey}`;
  // It's useful to also get the address at this point since it must be funded to be able to update DID
  const address = computeAddress(keyPair.publicKey);
  console.log(`send Rinkeby ETH to ${address} to be able to update ${identifier}`);

For the second issue, I can see the update for your DID on-chain: https://rinkeby.etherscan.io/tx/0x0cd66a2d7d74c0e4299e69…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Ajmasta
Comment options

@mirceanis
Comment options

@Ajmasta
Comment options

Answer selected by Ajmasta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants