code: func CreateSignedEnvelopeWithTLSBinding(txType common.HeaderType, channelID string, signer crypto.LocalSigner, dataMsg proto.Message, msgVersion int32, epoch uint64, tlsCertHash []byte) (*common.Envelope, error) {
  	payloadChannelHeader := MakeChannelHeader(txType, msgVersion, channelID, epoch)
  	payloadChannelHeader.TlsCertHash = tlsCertHash
  	var err error
  	payloadSignatureHeader := &common.SignatureHeader{}
  
  	if signer != nil {
  		payloadSignatureHeader, err = signer.NewSignatureHeader()
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	data, err := proto.Marshal(dataMsg)
  	if err != nil {
  		return nil, errors.Wrap(err, "error marshaling")
  	}
  
  	paylBytes := MarshalOrPanic(
  		&common.Payload{
  			Header: MakePayloadHeader(payloadChannelHeader, payloadSignatureHeader),
  			Data:   data,
  		},
  	)
  
  	var sig []byte
  	if signer != nil {
  		sig, err = signer.Sign(paylBytes)
  		if err != nil {
  			return nil, err
  		}
  	}
  
  	env := &common.Envelope{
  		Payload:   paylBytes,
  		Signature: sig,
  	}
  
  	return env, nil
  }
docs: // CreateSignedEnvelopeWithTLSBinding creates a signed envelope of the desired
  // type, with marshaled dataMsg and signs it. It also includes a TLS cert hash
  // into the channel header