This repository provides a Math & Utils modules which export the following functions.
Math module
isqrt-nat -> natpower-nat * nat -> natfactorial-nat -> natmin-nat * nat -> natmax-nat * nat -> natlog_10-nat -> nat
Utils module
Address.is_implicit-address -> boolBytes.Packed.is_internal_address-bytes -> boolBytes.Packed.is_internal_address_implicit-bytes -> bool optionBytes.Helpers.bytes_to_list-bytes -> bytes listBytes.Helpers.bytes_from_list-bytes list -> bytesBytes.Helpers.read_nb_bytes-nat -> bytes -> bytes * bytesBytes.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