// ProposeCredential tells the issuer what the holder hopes to receive
ProposeCredential tells the issuer what the holder hopes to receive
// ProposeCredential tells the issuer what the holder hopes to receive
func (c *Client) ProposeCredentialV2(
	connectionID string, 
	credentialPreview CredentialPreviewV2, 
	comment string, 
	credentialDefinitionID string, 
	issuerDID string, 
	schemaID string, 
) (CredentialExchangeRecordResult, error) {
	var response CredentialExchangeRecordResult
	var request = credentialProposalRequestV2{
		ConnectionID:      connectionID,
		Comment:           comment,
		CredentialPreview: credentialPreview,
		Filter: Filter{
			DIF: map[string]string{},
			Indy: IndyFilter{
				CredentialDefinitionID: credentialDefinitionID,
				IssuerDID:              issuerDID,
				SchemaID:               schemaID,
			},
		},
		Trace:      c.tracing,
		AutoRemove: !c.preserveExchangeRecords,
	}
	err := c.post("/issue-credential-2.0/send-proposal", nil, request, &response)
	if err != nil {
		return CredentialExchangeRecordResult{}, err
	}
	return response, nil
}
func ( c * Client ) ProposeCredentialV2 ( connectionID string , credentialPreview CredentialPreviewV2 , comment string , credentialDefinitionID string , issuerDID string , schemaID string , ) ( CredentialExchangeRecordResult , error ) { var response CredentialExchangeRecordResult var request = credentialProposalRequestV2 { ConnectionID : connectionID , Comment : comment , CredentialPreview : credentialPreview , Filter : Filter { DIF : map [ string ] string { } , Indy : IndyFilter { CredentialDefinitionID : credentialDefinitionID , IssuerDID : issuerDID , SchemaID : schemaID , } , } , Trace : c . tracing , AutoRemove : ! c . preserveExchangeRecords , } err := c . post ( " " , nil , request , & response ) if err != nil { return CredentialExchangeRecordResult { } , err } return response , nil }
ProposeCredential tells the issuer what the holder hopes to receive
ProposeCredential tells the issuer what the holder hopes to receive
// required // required // optional // optional // optional // optional