Skip to content

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

Open
@Vishwas1

Description

@Vishwas1

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 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions