morley-1.19.0: Developer tools for the Michelson Language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Morley.Micheline.Binary.Internal

Contents

Description

Defines binary encoding primitives which mimic Tezos' binary encoding.

Synopsis

Documentation

newtype DynamicSize a Source #

Constructors

DynamicSize 

Fields

Encode

buildNatural :: Integer -> Builder Source #

Build a binary representation of a Zarith natural. This function is partial, only defined for nonnegative Integers.

The reason it's not defined to accept a Natural is mostly to avoid fromIntegral/toInteger conversions at the use sites, since not all libraries, notably cryptonite, support Natural.

Decode