OpenAgentID documentation
Source referencesRust module referenceopenagent-ws

openagent-ws · client

Declared module signatures, types, configuration, and source documentation.

Source: openagent-sdk/adapters/websocket/rust/src/client.rs. SHA-256: 5b7d51d6bb8196d5dd39e33066f06351acf39ffd8fc5c6515ab90244d02e4405.

This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.

client::OpenAgentWsClient

Client-side OAAP WebSocket connector.

Holds the client's identity material. Call connect to open a WebSocket, run the 4-step OAAP handshake, and receive an authenticated session.

pub struct OpenAgentWsClient {

}

Source line: 31.

client::OpenAgentWsClient::new

Creates a new client with the given identity.

pub fn new(did: impl Into<String>, signing_key: [u8; 32], verifying_key: [u8; 32]) -> Self;

Source line: 40.

client::OpenAgentWsClient::with_timeout

Overrides the per-step handshake timeout (default: 5s).

pub fn with_timeout(mut self, duration: Duration) -> Self;

Source line: 50.

client::OpenAgentWsClient::connect

Opens a WebSocket connection to url and runs the 4-step OAAP handshake.

Returns an [AuthenticatedSession] on success.

pub async fn connect(&self, url: &str) -> Result<AuthenticatedSession<WsStream>>;

Source line: 58.

On this page