iota_lib v0.0.1 Iota.Utils
This module provides various utility functions to handle IOTA’s quirks.
Link to this section Summary
Functions
Transforms a string of trytes returned by :trytes into a Transaction structure
Turns a tryte-encoded string into a list of trits. The string length has to be a multiple of 2
Returns a tryte-encoded version of string argument str. This will handle
any kind of string with valid characters
Converts a string containing the heptavigesimal representation of a tryte-encoded number into an integer
Link to this section Functions
as_transaction(String.t()) :: Iota.Transaction.t() | {atom(), String.t()}
Transforms a string of trytes returned by :trytes into a Transaction structure.
> Iota.Utils.as_transaction("AHEAJD...")
%Iota.Transaction{...}
Turns a tryte-encoded string into a list of trits. The string length has to be a multiple of 2.
> Iota.Utils.as_trits("CLOUD9")
[]
Returns a tryte-encoded version of string argument str. This will handle
any kind of string with valid characters.
Converts a string containing the heptavigesimal representation of a tryte-encoded number into an integer.
> Iota.Utils.trytes_to_int("9SISTERS")
205803034065