[API BREAK] Use a nonce-generation function instead of a nonce

nit: don't see where this dependency was introduced