// OfferCredential sends to the holder what the issuer can offer
// TODO support payment decorator
OfferCredential sends to the holder what the issuer can offer
TODO support payment decorator
// OfferCredential sends to the holder what the issuer can offer // TODO support payment decorator
func (c *Client) OfferCredentialV2(
	connectionID string, 
	credentialPreview CredentialPreviewV2, 
	credentialDefinitionID string, 
	comment string, 
) (CredentialExchangeRecordResult, error) {
	var offer = credentialOfferRequestV2{
		CredentialDefinitionID: credentialDefinitionID,
		ConnectionID:           connectionID,
		CredentialPreview:      credentialPreview,
		Comment:                comment,
		Filter: Filter{
			DIF: map[string]string{},
			Indy: IndyFilter{
				CredentialDefinitionID: credentialDefinitionID,
			},
		},
		Trace:      c.tracing,
		AutoRemove: !c.preserveExchangeRecords,
		AutoIssue:  c.autoRespondCredentialOffer,
	}
	var credentialExchangeRecord CredentialExchangeRecordResult
	err := c.post("/issue-credential-2.0/send-offer", nil, offer, &credentialExchangeRecord)
	if err != nil {
		return CredentialExchangeRecordResult{}, err
	}
	return credentialExchangeRecord, nil
}
func ( c * Client ) OfferCredentialV2 ( connectionID string , credentialPreview CredentialPreviewV2 , credentialDefinitionID string , comment string , ) ( CredentialExchangeRecordResult , error ) { var offer = credentialOfferRequestV2 { CredentialDefinitionID : credentialDefinitionID , ConnectionID : connectionID , CredentialPreview : credentialPreview , Comment : comment , Filter : Filter { DIF : map [ string ] string { } , Indy : IndyFilter { CredentialDefinitionID : credentialDefinitionID , } , } , Trace : c . tracing , AutoRemove : ! c . preserveExchangeRecords , AutoIssue : c . autoRespondCredentialOffer , } var credentialExchangeRecord CredentialExchangeRecordResult err := c . post ( " " , nil , offer , & credentialExchangeRecord ) if err != nil { return CredentialExchangeRecordResult { } , err } return credentialExchangeRecord , nil }
OfferCredential sends to the holder what the issuer can offer
TODO support payment decorator
OfferCredential sends to the holder what the issuer can offer TODO support payment decorator
// required // required // optional // optional