spruceid / ssi

Core library for decentralized identity.
https://spruceid.dev
Apache License 2.0
187 stars 59 forks source link

Use enum for proof suites #489

Closed sbihel closed 1 year ago

sbihel commented 1 year ago

Based on #488

This allows to fail early when processing a Credential/Presentation, have a list of types in the code to use when listing the supported types in issuers or verifiers, and is just generally more idiomatic.

In the future we should separate types such as Credential to have a CredentialGenerics that accepts anything that implements ProofSuite so users can extend ssi with their own proof suite. I don't think it's necessary for now as I'm not aware of anyone not using the default types.