pub struct TransportConfig {
pub ble_enabled: bool,
pub wifi_direct_enabled: bool,
pub internet_enabled: bool,
pub reticulum_enabled: bool,
pub nostr_enabled: bool,
pub nostr_sealing_enabled: bool,
pub nostr_cold_contact_enabled: bool,
pub binary_wire_enabled: bool,
}Expand description
Transport-specific configuration.
Fields§
§ble_enabled: boolWhether BLE transport is enabled.
wifi_direct_enabled: boolWhether Wi-Fi Direct transport is enabled.
internet_enabled: boolWhether Internet transport is enabled.
reticulum_enabled: boolWhether Reticulum mesh transport is enabled.
Defaults to false because Reticulum requires external infrastructure
(a running Reticulum daemon or RNode hardware).
nostr_enabled: boolWhether Nostr relay transport is enabled.
Defaults to false because Nostr requires relay configuration
and a secp256k1 keypair.
nostr_sealing_enabled: boolWhether outgoing Nostr frames are sealed into NIP-59 gift wraps.
Defaults to true. With it off, the transport publishes the legacy
kind-4 event whose content is the whole protocol envelope in cleartext —
both usernames, the app id, the metadata map, the content type and a
millisecond timestamp, readable by every relay, permanently. Turn it off
only to interoperate with a relay that rejects kind 1059 outright.
Send-side only, and never negotiated: inbound gift wraps are always unsealed and inbound legacy frames always parsed, so whatever this is set to, anything a peer sends us stays readable.
It does still affect outbound reachability, in the one direction the
receive path cannot cover. A peer on a build that predates sealing
subscribes with kinds: [4] only, so it is never handed our kind-1059
events and has no NIP-44 layer to open one with — leaving it on makes
such a peer unreachable over Nostr (visibly: no ACK returns, so the
send fails through the retry ladder rather than vanishing). That is the
second reason to turn this off, alongside a relay that rejects
kind 1059.
nostr_cold_contact_enabled: boolWhether this install publishes MLS key packages to the relays and resolves peers’ published packages.
Defaults to true, and takes effect only when nostr_enabled is on —
which is itself off by default, so nothing is published unless an app
deliberately turns Nostr on.
Buys cold first contact: a peer known only by username becomes reachable over Nostr with no prior key-package exchange over some other transport, which is otherwise impossible. It also bounds the sealing downgrade that follows a peer-key eviction, since a forgotten key is re-resolved on the next send instead of waiting for a fresh exchange.
What it costs is worth stating plainly. Publication is the first thing this SDK emits to a relay unprompted: a small set of addressable records sits at this install’s routing tag and is refreshed as slots are consumed, whether or not any message is ever sent. Their content is sealed — a scraper filtering on the kind alone reads nothing, which matters because an MLS key package carries its owner’s username in the leaf credential and cannot be stripped of it — but the existence of a record at a given tag, and the timing of its refreshes, are visible to every relay published to. Turn this off to keep the transport silent until it has traffic, at the price of cold contact.
binary_wire_enabled: boolWhether to negotiate and emit the compact binary wire codec.
Defaults to true. It only takes effect between two peers that both
advertise support (via their signed key package), so a mixed fleet
automatically stays on JSON. Decoding of binary frames is always on,
independent of this flag; this gates only advertising and emitting.
Trait Implementations§
Source§impl Clone for TransportConfig
impl Clone for TransportConfig
Source§fn clone(&self) -> TransportConfig
fn clone(&self) -> TransportConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TransportConfig
impl Debug for TransportConfig
Source§impl Default for TransportConfig
impl Default for TransportConfig
Source§impl<'de> Deserialize<'de> for TransportConfig
impl<'de> Deserialize<'de> for TransportConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for TransportConfig
impl RefUnwindSafe for TransportConfig
impl Send for TransportConfig
impl Sync for TransportConfig
impl Unpin for TransportConfig
impl UnsafeUnpin for TransportConfig
impl UnwindSafe for TransportConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more