  An $E_{\gamma,{\rm jet}}\propto {E'_p}^{1.5}$ relationship with a small
scatter for current $\gamma$-ray burst (GRB) data was recently reported, where
$E_{\gamma,{\rm jet}}$ is the beaming-corrected $\gamma$-ray energy and $E'_p$
is the $\nu F_\nu$ peak energy in the local observer frame. By considering this
relationship for a sample of 12 GRBs with known redshift, peak energy, and
break time of afterglow light curves, we constrain the mass density of the
universe and the nature of dark energy. We find that the mass density
$\Omega_M=0.35\pm^{0.15}_{0.15}$ (at the $1\sigma$ confident level) for a flat
universe with a cosmological constant, and the $w$ parameter of an assumed
static dark-energy equation of state $w=-0.84\pm^{0.57}_{0.83}$ ($1\sigma$).
Our results are consistent with those from type Ia supernovae. A larger sample
established by the upcoming {\em Swift} satellite is expected to provide
further constraints.
