hyperledger-archives / aries-framework-go

Hyperledger Aries Framework Go provides packages for building Agent / DIDComm services.
https://wiki.hyperledger.org/display/ARIES/aries-framework-go
Apache License 2.0
240 stars 161 forks source link

Export Signing and Verifier Suite interface #1605

Closed rolsonquadras closed 4 years ago

rolsonquadras commented 4 years ago

The Signing and Verifier signature suite interfaces are not exported and they are part of APIs exported to the consumers.

  1. Signing - The interface type for Suite field in LinkedDataProofContext is unexported - https://github.com/hyperledger/aries-framework-go/blob/c043ad2f2e922bb2605ce13b253920cd28d0cc1d/pkg/doc/verifiable/linked_data_proof.go#L87
  2. Verify - https://github.com/hyperledger/aries-framework-go/blob/c043ad2f2e922bb2605ce13b253920cd28d0cc1d/pkg/doc/verifiable/credential.go#L575

These need to exported as it'll help consumers to create variables and work with switch/if-else without redefining the interfaces.

kdimak commented 4 years ago

I don't have a clear opinion on that. On one hand, this will be more useful for e.g. variables declaration as @rolsonquadras described. On another hand, we don't expose interfaces for re-use by other packages I think. @troyronda what's your vision regarding this?

rolsonquadras commented 4 years ago

If you are referring to provider in services/client, then they are expected to be passed from framework.context() - https://github.com/hyperledger/aries-framework-go/blob/397839f21ed4dd9e54e908a4a737702b42070d0b/cmd/aries-agent-rest/startcmd/start.go#L589-L595.