Closed onmax closed 3 years ago
As far as I know, the part of the proxy address in the DID should be a hexadecimal string (0-9 and a-f). what do you think @DrankoLQ @nmanero ?
After talking with @carlospastormatut and reviewing the documentation, we can conclude that the proxy part of the DID will not have the 0x
so the code here https://github.com/alastria/alastria-identity-JSON-objects/blob/master/validators/did/index.js#L28 is wrong.
The proxyAddress in the validator is being checked for string (
0-9a-zA-Z
) but as far as I know proxyAddress is an hexadecimal value, so the regex should be0-9a-fA-F
. The code I am referring to is: https://github.com/alastria/alastria-identity-JSON-objects/blob/master/validators/did/index.js#L28Also, as a side note, it will be also nice to check if proxyAddress is 40 characters long. Because the proxyAddress is 42 character long but we are not putting the 0x at the beggining. You can check the length of the proxyAddress here