code: func GetBytesProposalPayloadForTx(payload *peer.ChaincodeProposalPayload, visibility []byte) ([]byte, error) {
  	// check for nil argument
  	if payload == nil {
  		return nil, errors.New("nil arguments")
  	}
  
  	// strip the transient bytes off the payload - this needs to be done no
  	// matter the visibility mode
  	cppNoTransient := &peer.ChaincodeProposalPayload{Input: payload.Input, TransientMap: nil}
  	cppBytes, err := GetBytesChaincodeProposalPayload(cppNoTransient)
  	if err != nil {
  		return nil, err
  	}
  
  	// currently the fabric only supports full visibility: this means that
  	// there are no restrictions on which parts of the proposal payload will
  	// be visible in the final transaction; this default approach requires
  	// no additional instructions in the PayloadVisibility field; however
  	// the fabric may be extended to encode more elaborate visibility
  	// mechanisms that shall be encoded in this field (and handled
  	// appropriately by the peer)
  
  	return cppBytes, nil
  }
docs: // GetBytesProposalPayloadForTx takes a ChaincodeProposalPayload and returns
  // its serialized version according to the visibility field