Instance Method
delOnion(_:)
Remove an ephemeral onion service by its service ID (DEL_ONION, control-spec.txt §3.28).
func delOnion(_ serviceID: String) async throws
Parameters
-
serviceID
-
The v3 service ID without the .onion suffix (56-character base32).
Mentioned In
Discussion
Sends DEL_ONION <serviceID> and consumes the reply. Reply 552 (“unrecognized entity”) is translated to TorError.invalidServiceID(_:) so callers can branch on typo-vs-real-failure; any other non-success reply becomes TorError.controlProtocolError(code:message:).
Throws
TorError.invalidServiceID(_:) for reply 552, TorError.controlProtocolError(code:message:) for other failures.
Note
Idempotent in the absence of the service — calling it twice back-to-back yields a 552 on the second call, which the caller may choose to ignore.