Examples
Runnable examples in sdk/rust/nym-sdk/examples/. Each file is self-contained with step-by-step comments.
cargo run --example <NAME>| Example | Source | What it demonstrates |
|---|---|---|
| Simple | simple.rs | Send a message to yourself and print it |
| SURB Reply | surb_reply.rs | Anonymous replies using AnonymousSenderTag and send_reply() |
| Builder | builder.rs | Using MixnetClientBuilder with ephemeral keys |
| Builder with Storage | builder_with_storage.rs | Persisting keys to disk with StoragePaths |
| Parallel Send/Receive | parallel_sending_and_receiving.rs | Using split_sender() for concurrent tasks |
| Sandbox Testnet | sandbox.rs | Connecting to the Sandbox testnet instead of mainnet |
| Bandwidth Credential | bandwidth.rs | Acquiring a bandwidth credential for paid mixnet access |
| Custom Topology | custom_topology_provider.rs | Implementing the TopologyProvider trait to filter or customise node selection |
| Overwrite Topology | manually_overwrite_topology.rs | Manually constructing a topology with hardcoded nodes |
| Control Requests | control_requests.rs | Sending service provider control requests (health, version, binary info) |
| Custom Storage | manually_handle_storage.rs | Implementing custom storage backends for keys, gateways, and credentials |
Last updated on