BlockHeight

org.sigilaris.node.jvm.runtime.block.Model$package.BlockHeight
object BlockHeight

Companion for BlockHeight.

Attributes

Source
Model.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(value: BigNat): BlockHeight

Wraps a BigNat as a BlockHeight.

Wraps a BigNat as a BlockHeight.

Value parameters

value

the non-negative natural number

Attributes

Returns

the corresponding block height

Source
Model.scala
def fromLong(value: Long): Either[String, BlockHeight]

Converts a Long to a BlockHeight, failing if the value is negative.

Converts a Long to a BlockHeight, failing if the value is negative.

Value parameters

value

non-negative long value

Attributes

Returns

Right(height) on success, or Left(error) if negative

Source
Model.scala
def unsafeFromLong(value: Long): BlockHeight

Converts a Long to a BlockHeight, throwing on negative input.

Converts a Long to a BlockHeight, throwing on negative input.

Value parameters

value

non-negative long value

Attributes

Returns

the corresponding block height

Throws
IllegalArgumentException

if the value is negative

Source
Model.scala

Concrete fields

Height of the genesis block (zero).

Height of the genesis block (zero).

Attributes

Source
Model.scala

Givens

Givens

Attributes

Source
Model.scala

Attributes

Source
Model.scala

Extensions

Extensions

extension (height: BlockHeight)
def render: String

Renders the block height as a decimal string.

Renders the block height as a decimal string.

Attributes

Source
Model.scala

Unwraps the underlying BigNat.

Unwraps the underlying BigNat.

Attributes

Source
Model.scala