code: func GetNonce(prop *peer.Proposal) ([]byte, error) {
  	if prop == nil {
  		return nil, errors.New("proposal is nil")
  	}
  
  	// get back the header
  	hdr, err := GetHeader(prop.Header)
  	if err != nil {
  		return nil, err
  	}
  
  	chdr, err := UnmarshalChannelHeader(hdr.ChannelHeader)
  	if err != nil {
  		return nil, err
  	}
  
  	if err = validateChannelHeaderType(chdr, []common.HeaderType{common.HeaderType_ENDORSER_TRANSACTION, common.HeaderType_CONFIG}); err != nil {
  		return nil, errors.WithMessage(err, "invalid proposal")
  	}
  
  	shdr, err := GetSignatureHeader(hdr.SignatureHeader)
  	if err != nil {
  		return nil, err
  	}
  
  	if hdr.SignatureHeader == nil {
  		return nil, errors.New("invalid signature header. cannot be nil")
  	}
  
  	return shdr.Nonce, nil
  }
docs: // GetNonce returns the nonce used in Proposal