hyperledger-archives / aries-framework-dotnet

Aries Framework .NET for building multiplatform SSI services
https://wiki.hyperledger.org/display/aries
Apache License 2.0
84 stars 74 forks source link

Transaction Author Agreement support #65

Closed idr-spilling closed 4 years ago

idr-spilling commented 4 years ago

Short description of what this resolves:

Allow sending Transaction Author Agreement with ledger writes.

Changes proposed in this pull request:

All methods which result in a write to the ledger (eg. Schema, and Credential Definition creation) now accept a parameter for the TAA acceptance details.

tmarkovski commented 4 years ago

Hey Steve, thanks for this PR. I have some thoughts on this. The indy acceptance mechanism is intended to be solved using the ILedgerSigningService. You can provide a custom implementation of it that would append and sign any other request outside the main logic. This is the intention of it, at least. In addition to acceptance data, you can also append endorser data. It may be a good idea to provide examples of custom service for this, but this would be way I recommend this. Any thoughts on this?

idr-spilling commented 4 years ago

I see what you are saying and that would be a cleaner way to add the TAA. My only counter would be that it wouldn't lend itself well to solutions where the user wants to accept separately for each action (eg. the at_submission mechanism).

tmarkovski commented 4 years ago

The IAgentContext instance gets passed all the way to the signing service. You could use the State dictionary to pass custom data from your top level invocation method (e.g. CreateSchema) and use that as a decision/data carrier in your signing service. Would that solve the problem?

idr-spilling commented 4 years ago

Yes. That seems reasonable. I will close this PR. Thanks.