Structure
OnionService
A successfully-created onion service, as returned by ADD_ONION.
struct OnionService
Overview
Value-type record carrying the service identifier, an optional private key (present iff OnionKeySpec.newV3(discardPrivateKey:) was called with discardPrivateKey: false), and the creation timestamp. Constructed by addOnion(key:ports:detach:) from the parsed ADD_ONION reply; callers can also construct one directly for tests or persisted state replay.
Per rend-spec-v3 §6, a v3 service identifier is a 56-character base32-encoded string (without the .onion suffix). Combine with onionAddress for the fully-qualified address clients dial.
Note
Conformance is Sendable. Deliberately not Hashable: privateKey carries secret material, and the creation timestamp would poison any hash.
Important
privateKey is secret material. Never log, diff, or serialise it to stdout. Persist only via Keychain (Apple) or an equivalent credential store.
Topics
Creating
Inspection