hypersign-protocol / hid-node

A permissionless blockchain network to manage digital identity and access rights
https://hypersign.id
Apache License 2.0
223 stars 23 forks source link

fix: added temporary validation for `EcdsaSecp256k1VerificationKey2019` VM type to allow duplicate `publicKeyMultibase` only when `blockchainAccountId`s are provided #349

Closed arnabghose997 closed 1 year ago

arnabghose997 commented 1 year ago

Closes: https://github.com/hypersign-protocol/hid-node/issues/348

Following Cases are covered in this PR:

Scenario Whether it should PASS or FAIL ?
Registering a DID with two VM of type EcdsaSecp256k1VerificationKey2019 with duplicate publicKeyMultibase and different blockchain account Id PASS
Registering a DID with two VM of type EcdsaSecp256k1VerificationKey2019 with duplicate publicKeyMultibase but one of them is without a blockchain account id PASS
Registering a DID with two VM of type EcdsaSecp256k1VerificationKey2019 with duplicate publicKeyMultibase and duplicate blockchainAccountId FAIL
Registering a DID with two VM of type EcdsaSecp256k1VerificationKey2019 with duplicate publicKeyMultibase and no blockchainAccountId in either of them FAIL
User tries to register a DID Document with duplicate publicKeyMultibase of type Ed25519VerificationKey2020 FAIL