Nimiq for Gleam

Package Version Hex Docs

Various modules and helpers for working with Nimiq primitives in the Gleam programming language or as a CLI.

Installation

gleam add nimiq_gleam

CLI

Convert an address from any representation to user-friendly address format:

nimiq_gleam address 0000000000000000000000000000000000000000
# "NQ07 0000 0000 0000 0000 0000 0000 0000 0000"

Address module

import nimiq_gleam/address

pub fn main() {
  let formatted_addr =
    address.from_hex("0000000000000000000000000000000000000000")
    |> address.to_user_friendly_address()
  // = "NQ07 0000 0000 0000 0000 0000 0000 0000 0000"
}

Development

gleam format # Format the code
gleam test   # Run the tests
gleam run    # Run the cli
Search Document