pub struct IpcClient { /* private fields */ }Expand description
IPC client for daemon communication
Implementations§
Source§impl IpcClient
impl IpcClient
Sourcepub fn new_with_token(socket_path: PathBuf, auth_token: String) -> Self
pub fn new_with_token(socket_path: PathBuf, auth_token: String) -> Self
Create a new IPC client with an explicit auth token.
Sourcepub fn new_for_cli(
socket_path: PathBuf,
client_token: Option<String>,
) -> Result<Self>
pub fn new_for_cli( socket_path: PathBuf, client_token: Option<String>, ) -> Result<Self>
CLI client carrying a per-client grant token for external secret access.
Sourcepub fn with_context(
self,
client_token: Option<String>,
origin: Option<Origin>,
) -> Self
pub fn with_context( self, client_token: Option<String>, origin: Option<Origin>, ) -> Self
Override the per-client grant token and origin label. Intended for embedders that construct the daemon token explicitly (tests, hosts).
Sourcepub fn with_capability(self, capability: Option<String>) -> Self
pub fn with_capability(self, capability: Option<String>) -> Self
Attach an installation-capability secret (WBS-505).
Sourcepub fn new_for_native_host(socket_path: PathBuf) -> Result<Self>
pub fn new_for_native_host(socket_path: PathBuf) -> Result<Self>
Browser native-messaging host client. Presents the installation capability when it has been provisioned (the daemon mints it on its first start; a host running before that has none and the daemon’s legacy window applies).
Sourcepub async fn send(&self, msg: IpcMessage) -> Result<IpcMessage>
pub async fn send(&self, msg: IpcMessage) -> Result<IpcMessage>
Send a message and wait for response. The connection negotiates the v1 SECURED session (WBS-509/510/511) before the envelope is sent: HKDF directional keys over the auth token + session randoms, AAD- bound frames, strictly-increasing counters, and bounded reads.
Sourcepub async fn call_service(&self, op: VaultOp) -> Result<VaultOpResult>
pub async fn call_service(&self, op: VaultOp) -> Result<VaultOpResult>
One application-service call (WBS-408): send ServiceCall { op } and
unwrap the ServiceResult outcome. Typed service errors surface as
ProtocolError::Service.