Computing the Mean and the Variance of the Posterior in NUTS

How can one compute the mean and the variance of the posterior distribution via NUTS?

You can use the summary utility as in the bayesian regression tutorial.