This repository provides a Math
& Utils
modules which export the following functions.
Math
module
isqrt
-nat -> nat
power
-nat * nat -> nat
factorial
-nat -> nat
min
-nat * nat -> nat
max
-nat * nat -> nat
log_10
-nat -> nat
Utils
module
Address.is_implicit
-address -> bool
Bytes.Packed.is_internal_address
-bytes -> bool
Bytes.Packed.is_internal_address_implicit
-bytes -> bool option
Bytes.Helpers.bytes_to_list
-bytes -> bytes list
Bytes.Helpers.bytes_from_list
-bytes list -> bytes
Bytes.Helpers.read_nb_bytes
-nat -> bytes -> bytes * bytes
Bytes.Conversion.bytes_to_nat
-bytes -> nat
This repository is meant to provide extra features related to the native type Bytes
.
This library introduces a bytes_to_nat
function that allows to convert bytes to nat.
This library introduces a is_implicit_account
function that allows to discriminate
KT1 addersses and tz1 addresses. This function is available on the native type
address
and also on native type bytes
(usefull when an address
value is packed into bytes, with the Byte.pack
function).
A makefile is provided to launch tests.
make test