code: func CreateEnvelope(data []byte, header *common.Header, signer SignerIdentity) (*common.Envelope, error) {
  	payload := &common.Payload{
  		Header: header,
  		Data:   data,
  	}
  
  	payloadBytes, err := proto.Marshal(payload)
  	if err != nil {
  		return nil, errors.Wrap(err, "failed to marshal common.Payload")
  	}
  
  	signature, err := signer.Sign(payloadBytes)
  	if err != nil {
  		return nil, err
  	}
  
  	txEnvelope := &common.Envelope{
  		Payload:   payloadBytes,
  		Signature: signature,
  	}
  
  	return txEnvelope, nil
  }
docs: // CreateEnvelope creates a common.Envelope with given tx bytes, header, and Signer