ssi-sdk icon indicating copy to clipboard operation
ssi-sdk copied to clipboard

Fix exchange.BuildPresentationSubmission to have a slightly different interface

Open nitro-neal opened this issue 1 year ago • 0 comments

Have the presentation claim's token format support signedVCBytes for the BuildPresentationSubmission function

currently:

testOutput, err := signing.ParseVerifiableCredentialFromJWT(string(signedVCBytes))
testOutputBytes, _ := json.Marshal(testOutput)

presentationClaim := exchange.PresentationClaim{
	Token:                         util.StringPtr(string(testOutputBytes)),
	JWTFormat:                     exchange.JWTVC.Ptr(),
	SignatureAlgorithmOrProofType: string(crypto.EdDSA),
}

presentationSubmissionBytes, err := exchange.BuildPresentationSubmission(holderSigner, *presentationDefinition, []exchange.PresentationClaim{presentationClaim}, exchange.JWTVPTarget)

we need the nested BuildPresentationSubmission function to handle raw signedVCBytes

nitro-neal avatar Aug 10 '22 00:08 nitro-neal