Skip to content
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

Create by clientspec API taking random chain IDs. There should be validation for keytype EcdsaSecp256k1VerificationKey2019 #109

Open
Vishwas1 opened this issue Oct 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Vishwas1
Copy link
Contributor

Request body

{
  "namespace": "testnet",
  "options": {
    "keyType": "EcdsaSecp256k1VerificationKey2019",
"walletAddress": "hid1tgvec6zd0j5t7y4qtj902wtgxjkm6w962yrfpm",
"publicKey": "zDyZ6YiJY1RRMehWuVTZhpMe35sJoTzzQ9sevLDdZdg51",
"chainId": "0x1"
  }
}

Response

{
  "did": "did:hid:testnet:hid1tgvec6zd0j5t7y4qtj902wtgxjkm6w962yrfpm",
  "registrationStatus": "UNREGISTRED",
  "metaData": {
    "didDocument": {
      "@context": [
        "https://www.w3.org/ns/did/v1"
      ],
      "id": "did:hid:testnet:hid1tgvec6zd0j5t7y4qtj902wtgxjkm6w962yrfpm",
      "controller": [
        "did:hid:testnet:hid1tgvec6zd0j5t7y4qtj902wtgxjkm6w962yrfpm"
      ],
      "alsoKnownAs": [],
      "verificationMethod": [
        {
          "id": "did:hid:testnet:hid1tgvec6zd0j5t7y4qtj902wtgxjkm6w962yrfpm#key-1",
          "type": "EcdsaSecp256k1VerificationKey2019",
          "controller": "did:hid:testnet:hid1tgvec6zd0j5t7y4qtj902wtgxjkm6w962yrfpm",
          "publicKeyMultibase": "zDyZ6YiJY1RRMehWuVTZhpMe35sJoTzzQ9sevLDdZdg51",
          "blockchainAccountId": "cosmos:0x1:hid1tgvec6zd0j5t7y4qtj902wtgxjkm6w962yrfpm"
        }
      ],
      "authentication": [],
      "assertionMethod": [],
      "keyAgreement": [],
      "capabilityInvocation": [],
      "capabilityDelegation": [],
      "service": []
    }
  }
}

Expected: this should faile since chainid is wrong as well as publickey multibase is not linked with the walletAddress passed in request body .

@Vishwas1 Vishwas1 added the bug Something isn't working label Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant