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

Creation of a Verifiable Presentation proof can be parameterized #1014

Open troyronda opened 4 years ago

troyronda commented 4 years ago

See example

// 'challenge' and 'domain' protect against replay attacks
"challenge": "1f44d55f-f161-4938-a659-f8026467f126",
"domain": "4jt78h47fh47",

I see that a VC has a method to create a Presentation from itself. https://godoc.org/github.com/hyperledger/aries-framework-go/pkg/doc/verifiable#Credential.Presentation

How do we add arguments for the Proof? (@kdimak)

kdimak commented 4 years ago

Hey @troyronda ! I can see the following flow here: 1) call Credential.Presentation() to create VP with composed VC. 2) add a proof to the VP using Presentaion.AddLinkedDataProof(). It accepts LinkedDataProofContext where we can pass proof parameters. Currently, challenge and domain are not included. I can add them to this issue's PR.