Skip to Content
New: a threat-model-first guide to choosing your network defence, plus the nym-smoldvpn dVPN package and nym-swizzle sender hygiene.

Examples

Runnable examples in sdk/rust/nym-sdk/examples/. Each file is self-contained with step-by-step comments.

cargo run --example <NAME>
ExampleSourceWhat it demonstrates
Simplesimple.rsSend a message to yourself and print it
SURB Replysurb_reply.rsAnonymous replies using AnonymousSenderTag and send_reply()
Builderbuilder.rsUsing MixnetClientBuilder with ephemeral keys
Builder with Storagebuilder_with_storage.rsPersisting keys to disk with StoragePaths
Parallel Send/Receiveparallel_sending_and_receiving.rsUsing split_sender() for concurrent tasks
Sandbox Testnetsandbox.rsConnecting to the Sandbox testnet instead of mainnet
Bandwidth Credentialbandwidth.rsAcquiring a bandwidth credential for paid mixnet access
Custom Topologycustom_topology_provider.rsImplementing the TopologyProvider trait to filter or customise node selection
Overwrite Topologymanually_overwrite_topology.rsManually constructing a topology with hardcoded nodes
Control Requestscontrol_requests.rsSending service provider control requests (health, version, binary info)
Custom Storagemanually_handle_storage.rsImplementing custom storage backends for keys, gateways, and credentials
Last updated on