-
Hello, thanks again for all your help and advice. Having read up on the various discussion in this Github, I was able to create a private key and importing it as a DID. I just want to make sure what I'm doing is right.
This gives me this result:
There's two issues when I do that. The did works well and is able to be resolved when I use the address in the did identifier. But, when I use the public key it just doesn't work, Second, when I try to update one of these created DIDs, at first it seems to just freeze and not work. No matter how long I wait the transaction seems to never get sent. And then, when I try to send it again, I get the error
It looks like the already known error happens when a similar transaction is already on the blockchain. So, it seems like the first time the transaction is sent out on the blockchain, but I can't find it anywhere (etherscan or others), and not matter how long I wait it just doesn't seem to get resolved. Here is my sample code to update a did:
I am wondering if the two issues are related? Is there something abnormal in my did creation? It should be noted that when I import the private key in a wallet like Metamask, I get the exact same address as the one I compute. It's really just my Public Key that doesn't seem to be working properly. Maybe I'm missing/misunderstanding something as all of this is very new to me. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
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 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/0x0cd66a2d7d74c0e4299e692eedd6ed31158d15c8e39f8572d8cfd40c4385950f. I hope this helps |
Beta Was this translation helpful? Give feedback.
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 aSigningKey
like so:For the second issue, I can see the update for your DID on-chain: https://rinkeby.etherscan.io/tx/0x0cd66a2d7d74c0e4299e69…