aries-cloudagent-python
aries-cloudagent-python copied to clipboard
DID Indy Resolver can not resolve Indy DID with additional namespace input
Hello development team,
As the title described, indy dids with namespace input e.g. did:indy:example:WRfXPg8dantKVubE3HX8pw seem not to be resolved by the Indy resolver.
I think the regex in messaging/valid.py does not match:
class IndyDID(Regexp):
"""Validate value against indy DID."""
EXAMPLE = "did:indy:sovrin:WRfXPg8dantKVubE3HX8pw"
PATTERN = re.compile(rf"^(did:(sov|indy):)?[{B58}]{{21,22}}$")
def __init__(self):
"""Initialize the instance."""
super().__init__(
IndyDID.PATTERN,
error="Value {input} is not an indy decentralized identifier (DID)",
)
The pattern is also later used in building the document and submitting Indy VDR requests.