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 EcdsaSecp256k1RecoveryMethod2020 #108

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

Comments

@Vishwas1
Copy link
Contributor

Vishwas1 commented Oct 28, 2023

Call API /create

Request Body

{
  "namespace": "testnet",
  "options": {
    "keyType": "EcdsaSecp256k1RecoveryMethod2020",
"walletAddress": "0xc75A6dE1174A2175013964Bd26Cd066D09B879e4",
"chainId": "0x2313" // Random chain id
  }
}
  • Result: This is passing
{
  "did": "did:hid:testnet:0xc75A6dE1174A2175013964Bd26Cd066D09B879e4",
  "registrationStatus": "UNREGISTRED",
  "metaData": {
    "didDocument": {
      "@context": [
        "https://www.w3.org/ns/did/v1"
      ],
      "id": "did:hid:testnet:0xc75A6dE1174A2175013964Bd26Cd066D09B879e4",
      "controller": [
        "did:hid:testnet:0xc75A6dE1174A2175013964Bd26Cd066D09B879e4"
      ],
      "alsoKnownAs": [
        "did:hid:testnet:0xc75A6dE1174A2175013964Bd26Cd066D09B879e4"
      ],
      "verificationMethod": [
        {
          "id": "did:hid:testnet:0xc75A6dE1174A2175013964Bd26Cd066D09B879e4#key-1",
          "type": "EcdsaSecp256k1RecoveryMethod2020",
          "controller": "did:hid:testnet:0xc75A6dE1174A2175013964Bd26Cd066D09B879e4",
          "blockchainAccountId": "eip155:8979:0xc75A6dE1174A2175013964Bd26Cd066D09B879e4" // this is random chainid
        }
      ],
      "authentication": [
        "did:hid:testnet:0xc75A6dE1174A2175013964Bd26Cd066D09B879e4#key-1"
      ],
      "assertionMethod": [
        "did:hid:testnet:0xc75A6dE1174A2175013964Bd26Cd066D09B879e4#key-1"
      ],
      "keyAgreement": [],
      "capabilityInvocation": [
        "did:hid:testnet:0xc75A6dE1174A2175013964Bd26Cd066D09B879e4#key-1"
      ],
      "capabilityDelegation": [
        "did:hid:testnet:0xc75A6dE1174A2175013964Bd26Cd066D09B879e4#key-1"
      ]
    }
  }
}
  • Expected: This should fail
@Vishwas1 Vishwas1 added the bug Something isn't working label Oct 28, 2023
@Vishwas1 Vishwas1 changed the title Create by clientspec API taking random chain IDs. There should be validation Create by clientspec API taking random chain IDs. There should be validation for keytype EcdsaSecp256k1RecoveryMethod2020 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