Module misc

Module misc 

Source

Structs§

TermMap
DEPRECATED: ETF Term-based map wrapper (legacy) Use vecpak::PropListMap instead for the primary vecpak format. This struct is kept for backwards compatibility with legacy ETF code only.

Traits§

TermExt
DEPRECATED: Lightweight helpers for ETF Term manipulation (legacy) Use vecpak::VecpakExt trait instead for the primary vecpak format. This trait is kept for backwards compatibility with legacy ETF code only.
Typename
Trait for types that can provide their type name as a static string

Functions§

alphanumeric
ascii
Keep only ASCII characters considered printable for our use-case.
bcat
Concatenate multiple byte slices into a single Vec Example: bcat(&[b“bic:coin:balance:“, pk, b”:AMA“])
bin_to_bitvec
bitvec_to_bin
decode_base58_array
Decode base58 string to fixed-size byte array Returns None if decoding fails or size doesn’t match
decode_base58_hash
Decode base58 string to 32-byte hash
decode_base58_pk
Decode base58 string to 48-byte public key
eetf_list_of_binariesDeprecated
DEPRECATED: Encode a list of binary values as ETF term Use list_of_binaries_to_vecpak instead for new code.
format_duration
Creates string representation as bytes, compatible with Erlang’s :erlang.integer_to_binary/1 Format a duration into human-readable form following the requirements:
get_bits_percentage
Calculate percentage of true bits in a mask relative to total count
get_unix_millis_now
get_unix_nanos_now
get_unix_secs_now
hexdump
Produce a hex dump similar to hexdump -C for a binary slice.
is_alphanumeric
is_ascii_clean
list_of_binaries_to_vecpak
parse_list
Parse a list of ETF terms into structured data using the provided parser
pk_hexDeprecated
DEPRECATED: This function incorrectly uses base58 encoding Elixir uses raw binary pubkeys in keys, not base58 Use bcat() instead for building binary keys
serialize_list
Serialize a list of items into an ETF List term using the provided serializer
url
Trim trailing slash from url
url_with
Trim trailing slash on base and append path verbatim