SharedContactUrl

Utilities for encoding and parsing Meshtastic shared contact URLs.

Contact URLs use the format: https://meshtastic.org/v/#<base64url-encoded-proto>[?query-params]

Properties

Link copied to clipboard
const val PREFIX: String

Standard URL prefix for shared contacts.

Functions

Link copied to clipboard
fun encode(contact: SharedContact): String

Encodes a SharedContact proto into a shareable URL.

Link copied to clipboard
fun parse(url: String): SharedContact?

Parses a shared contact URL into a SharedContact. Returns null if the URL is malformed or payload fails to decode.