decentralized-identity / universal-registrar

Universal Registrar implementation and drivers.
https://uniregistrar.io/
Apache License 2.0
79 stars 27 forks source link

Issues using Ebsi driver's update function #39

Open zennur opened 2 years ago

zennur commented 2 years ago

Hi,

I am having issues using the update function of ebsi driver.

Since, there is not much documentation on Ebsi, I thought I can ask from here. I'm able to create an ebsi did, which also returns a private key curve. When I try to use that private key for updating the did document, it gives an error saying "invalid hexlify value".

I'm definitely sure that I need to change the form of the private key somehow, but I don't know to which encoding.

Could you let me know?

Kindest regards

azuzi commented 2 years ago

@zennur seems like an issue with the driver. We will fix it asap. In the meantime, the required params look as follows.

{
  "secret": {
    "token": "......",
    "privateKey": {
        "kty": "EC",
        "crv": "secp256k1",
        "x": "Cq-JZGojY3Yx44qj3qx2Zor6alK08OZkvJ0YxOF-J0Q",
        "y": "PwXUpi3GZjJhJK395O1Muxj6Bnl3ZCmLQxi5Ccmc71o",
        "d": "eLbfm3XUCiqRnoTuy2ynn-Hp_28nBxlN-2zmGVs8FJU",
        "kid": "did:ebsi:zs2ZdGQwbM9H9ZcFV9CMjqU#keys-1"
      }
  }
 "didDocument":{..new_Did_Doc...}
 "identifier":"did:ebsi:xxxx"
 "options": {
  }
}

Or else privateKey can be in hex-encoded as follows:

"secret": {
    "token": "......",
    "privateKey": "............"
  }
zennur commented 2 years ago

Thank you for the answer @azuzi . I guess the status code 500 error is due to the driver problem then?