validates string to be a non-negative integer and cuts leading zeros
Parameters
quantity: string
Returns string
Static timeToNonce
timeToNonce(date: ReadonlyDate): Nonce
Convert a point in time to a nonce used in the Lisk/RISE codec.
The nonce stores a UNIX timestamp as integer in seconds resolution.
Since we use a Long variable, we are not affected by the year 2038 problem.
The full range of possible Lisk/RISE timestamps (epoch in 2016 +/- 68 years)
is covered since we allow negative nonce values.
validates string to be a non-negative integer and cuts leading zeros