decentralized-identity / veramo

A JavaScript Framework for Verifiable Data
https://veramo.io
Apache License 2.0
415 stars 129 forks source link

[proposal] Matching identifiers by alias should not depend on the provider #1215

Closed mirceanis closed 9 months ago

mirceanis commented 11 months ago

There are a few methods that use or can use a combination of alias and provider when filtering DIDs: didManagerGet didManagerGetOrCreate didManagerGetByAlias AbstractDIDStore.getDID

The assumptions that lead to this design no longer hold true and alias should behave uniformly, no matter the provider used.

Describe the solution you'd like These methods should not require a provider when querying. didManagerCreate and didManagerImport using an alias that already exists should fail, no matter the provider used. didManagerGetOrCreate using an alias should fail if the requested provider is different than the provider of an existing identifier matching the alias.

Additional context The changes would also involve @veramo/data-store and @veramo/data-store-json This would be a BREAKING CHANGE, since the interface definitions would be different at least for the DID stores and the behavior of some the DIDManager methods as well.