package tezos-protocol-alpha

  1. Overview
  2. Docs
Tezos protocol alpha package

Install

Dune Dependency

Authors

Maintainers

Sources

tezos-18.0.tar.gz
sha256=dbc3b675aee59c2c574e5d0a771193a2ecfca31e7a5bc5aed66598080596ce1c
sha512=b97ed762b9d24744305c358af0d20f394376b64bfdd758dd4a81775326caf445caa57c4f6445da3dd6468ff492de18e4c14af6f374dfcbb7e4d64b7b720e5e2a

doc/tezos_raw_protocol_alpha/Tezos_raw_protocol_alpha/Script_timestamp/index.html

Module Tezos_raw_protocol_alpha.Script_timestampSource

Defines the internal Michelson representation for timestamps and basic operations that can be performed on it.

Sourcetype repr
Sourcetype t =
  1. | Timestamp_tag of repr

Representation of timestamps specific to the Michelson interpreter. A number of seconds since the epoch. t is made algebraic in order to distinguish it from the other type parameters of Script_typed_ir.ty.

Sourceval of_int64 : int64 -> t

Convert a number of seconds since the epoch to a timestamp.

Sourceval compare : t -> t -> int

Compare timestamps. Returns 1 if the first timestamp is later than the second one; 0 if they're equal and -1 othwerwise.

Sourceval to_notation : t -> string option

Convert a timestamp to RFC3339 notation if possible *

Sourceval to_num_str : t -> string

Convert a timestamp to a string representation of the seconds

Sourceval to_string : t -> string

Convert to RFC3339 notation if possible, or num if not

Sourceval of_string : string -> t option

Returns difference between timestamps as integral number of seconds in Michelson representation of numbers.

Sourceval add_delta : t -> Script_int.z Script_int.num -> t

Add a number of seconds to the timestamp.

Sourceval sub_delta : t -> Script_int.z Script_int.num -> t

Subtract a number of seconds from the timestamp.

OCaml

Innovation. Community. Security.