// IssueCredential issues a credential to the holder
IssueCredential issues a credential to the holder
// IssueCredential issues a credential to the holder
func (c *Client) IssueCredential(
	connectionID string, 
	credentialPreview CredentialPreview, 
	comment string, 
	credentialDefinitionID string, 
	issuerDID string, 
	schemaID string, 
) (CredentialExchangeRecord, error) {
	var credentialExchange CredentialExchangeRecord
	var request = issueCredentialRequest{
		CredentialDefinitionID: credentialDefinitionID,
		ConnectionID:           connectionID,
		IssuerDID:              issuerDID,
		Comment:                comment,
		CredentialPreview:      credentialPreview,
		SchemaID:               schemaID,
		Trace:                  c.tracing,
		AutoRemove:             !c.preserveExchangeRecords,
	}
	err := c.post("/issue-credential/send", nil, request, &credentialExchange)
	if err != nil {
		return CredentialExchangeRecord{}, err
	}
	return credentialExchange, nil
}
func ( c * Client ) IssueCredential ( connectionID string , credentialPreview CredentialPreview , comment string , credentialDefinitionID string , issuerDID string , schemaID string , ) ( CredentialExchangeRecord , error ) { var credentialExchange CredentialExchangeRecord var request = issueCredentialRequest { CredentialDefinitionID : credentialDefinitionID , ConnectionID : connectionID , IssuerDID : issuerDID , Comment : comment , CredentialPreview : credentialPreview , SchemaID : schemaID , Trace : c . tracing , AutoRemove : ! c . preserveExchangeRecords , } err := c . post ( " " , nil , request , & credentialExchange ) if err != nil { return CredentialExchangeRecord { } , err } return credentialExchange , nil }
IssueCredential issues a credential to the holder
IssueCredential issues a credential to the holder
// required // required // optional // optional // optional // optional