Skip to main content

Crate weft_client

Crate weft_client 

Source
Expand description

Native v2 Weft client: descriptor-trusted Iroh transport and thread_api::Remote::discover.

The application supplies the HTTP client, descriptor trust keys, and credential. This crate does not read HEDDLE_HOME or mint credentials. Admin RPCs that still live only on Weft (weftctl) are not shipped here.

Modules§

contract
Frozen Thread-oriented contract; endpoint support is negotiated.
rpc
Typed operations derived from the protobuf method descriptors.

Structs§

ConnectionOptions
Explicit inputs for a hosted connection. Files, environment, TLS policy, credential storage and trust-anchor selection belong to the application.
DescriptorKeyring
Trust anchors come from the application, including key rotation policy.
HostedClient
A direct Weft connection. The application retains operation IDs, credentials, observed versions and stream checkpoints; reconnect never retries a mutation.
VerifiedEndpointDescriptor
Endpoint descriptor after two-layer root attestation, expiry, ALPN, and address validation.

Enums§

Credentials
Caller-selected authority. No variant discovers credentials or mints a key. Bearer-only service and anonymous tiers stay distinct from signed callers. Public-readable methods still carry proof for Signed callers. Only the host may classify a verified bearer as anonymous; this client never strips an account credential or retries it as public after authorization fails.

Functions§

descriptor_url
fetch_endpoint_descriptor
Fetch /.well-known/heddle/iroh-endpoint as a JSON descriptor set and verify it against the application’s root keyring.
verify_descriptor_set_body
Parse a JSON endpoint-descriptor set and verify it. A protobuf body fails closed at the JSON parser.