alastria / alastriaID-truffle-contracts

Alastria ID truffle Smart Contracts
MIT License
2 stars 5 forks source link

To complex to getPublicKeyStatus() #23

Closed ghost closed 2 years ago

ghost commented 3 years ago

The second parameter is supposed to be the hash of the public key, but it is the encodedPacked hash of the string, witch is not standard outside solidity. The other methods are computing this hash internally and the parameter is the public key as string memory.

It's odd to have to manually convert the string to bytes, then the bytes to string, add the "0x" and then hash it.

xdaniortega commented 3 years ago

Hi! I'll have a look. From my point of view this could be solved by changing the way public keys are managed. As you said, right now they're defined as string memory and should be defined as bytes32.

VictorNS69 commented 2 years ago

For the moment it has been decided to use a string as input argument.

It is still pending the study of using strings or bytes32 in all the public key registry.

VictorNS69 commented 2 years ago

A new implementation for the PublicKeyRegistry is under consideration