hyperledger / aries-vcx

aries-vcx is set of crates to work with DIDs, DID Documents, DIDComm, Verifiable Credentials and Hyperledger Aries.
https://didcomm.org
Apache License 2.0
125 stars 83 forks source link

(refactor) small refactor to the new DIDExchange AnyXYZ wrappers #1249

Closed gmulhearn closed 4 months ago

gmulhearn commented 4 months ago

I started these changes mostly wanting to remove Deserialize trait from the AnyXYZ wrappers. As IMO trying to deserialize JSON back into AnyXYZ is dangerous; if both V1_0 & V1_1 variants are the same, then the serialized format is the same, so when deserializing serde cannot tell which variant it is, so it just picks the first one (misleading).

Also whilst i was here... i realised the Any wrappers were duplicating themselves alot, so i made a generic enum for it