BlockTimestamp
Companion for BlockTimestamp.
Attributes
- Source
- Model.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
BlockTimestamp.type
Members list
Value members
Concrete methods
Creates a BlockTimestamp from epoch milliseconds, rejecting negative values.
Creates a BlockTimestamp from epoch milliseconds, rejecting negative values.
Value parameters
- value
-
non-negative epoch milliseconds
Attributes
- Returns
-
Right(timestamp)on success, orLeft(error)if negative - Source
- Model.scala
Creates a BlockTimestamp from a java.time.Instant.
Creates a BlockTimestamp from a java.time.Instant.
Value parameters
- value
-
the instant to convert
Attributes
- Returns
-
Right(timestamp)on success, orLeft(error)on overflow or negative epoch - Source
- Model.scala
Creates a BlockTimestamp from epoch milliseconds, throwing on negative input.
Creates a BlockTimestamp from epoch milliseconds, throwing on negative input.
Value parameters
- value
-
non-negative epoch milliseconds
Attributes
- Returns
-
the corresponding block timestamp
- Throws
-
IllegalArgumentException
if the value is negative
- Source
- Model.scala
Concrete fields
The Unix epoch (0 milliseconds) timestamp.
Givens
Extensions
Extensions
Returns the timestamp as epoch milliseconds.
Converts the timestamp to a java.time.Instant.