UNPKG
@gateway.fm/gtw-dvf-client-js
Version:
latest (3.1.7)
3.1.7
3.1.6
3.1.5
DVF client js lib with gateway.fm rpc endpoints
github.com/gateway-fm/gtw-dvf-client-js
@gateway.fm/gtw-dvf-client-js
/
src
/
lib
/
dvf
/
generateRandomNonce.js
6 lines
(5 loc)
•
152 B
JavaScript
View Raw
1
2
3
4
5
6
// This is max nonce value accepted by sw.
const
nonceMax =
Math
.
pow
(
2
,
31
) -
1
module
.
exports
=
() =>
{
return
Math
.
ceil
(
Math
.
random
() * nonceMax) }