Allow programmatic launching of onion-service with user-provided HsIdKeypair
Currently, the only way to create an OnionService using your own keys is to manually insert them into your own separate Key Manager, and manually invoke all the relevant required machinery. I would like to simply use TorClient::create_onion_service (which takes an OnionServiceConfig). This leaves us with two options:
- add the HsIdKeypair to the OnionServiceConfig
- provide a Key Manager getter on TorClient
I'm not sure which alternative is better for arti, but adding the key as an optional parameter on the OnionServiceConfig seems to be the more idiomatic way to solve this problem.
EDIT: A third option has appeared! Add an additional experimental API on TorClient
which takes the HsIdKeypair
as an argument and have it internally do the KeyMgr
insertion.
Edited by morgan