Elixir wrapper for the Rust reticulum crate via Rustler, with a lightweight transport runtime and CLI tools.
Add to mix.exs:
def deps do
[
{:reticulum_ex, "~> 0.1"}
]
endDocs: https://hexdocs.pm/reticulum_ex
Create an identity and compute a destination name hash:
{:ok, id} = ReticulumEx.Identity.new_from_name("alice")
{:ok, priv_hex} = ReticulumEx.Identity.to_hex(id)
{:ok, pub_hex} = ReticulumEx.Identity.public_hex(id)
{:ok, name_hash_hex} = ReticulumEx.Destination.name_hash("example", "chat")Build an announce packet and HDLC-encode for wire transport:
{:ok, packet_bin} = ReticulumEx.Packet.announce(id)
{:ok, frame} = ReticulumEx.HDLC.encode(packet_bin)Start a transport and watch announces:
mix reticulum.watch --tcp reticulum.betweentheborders.com:4242Subscribe to link events or send data:
mix reticulum.link --tcp 127.0.0.1:4242
mix reticulum.send --tcp 127.0.0.1:4242 --dest <dest_hex> --data "hello"Run a simple node from a config (MeshChat/Sideband style):
mix reticulum.node_from_config --file ~/.reticulum/config{:ok, sig} = ReticulumEx.Crypto.sign(id, "data")
:ok = ReticulumEx.Crypto.verify(pub_hex, "data", sig)
{:ok, ct} = ReticulumEx.Crypto.encrypt_to(pub_hex, "secret")
{:ok, pt} = ReticulumEx.Crypto.decrypt_from_identity(id, ct)- Requires Rust toolchain and
protocduring build (Reticulum-rs uses tonic-build). - Set
RUST_LOG=info|debugto enable more runtime logs from the NIF.