Skip to main content

Crate libkeri_http

Crate libkeri_http 

Source
Expand description

KERI transport over HTTP, shared by libkeri consumers (libkeri-witness, libkeri-cli).

Layering: libkeri is the synchronous, network-free core (no threads, locks or async). This crate is the only place KERI-over-HTTP lives, so consumers do not each reimplement it. libkeri never depends on this crate.

Implemented so far: the CESR-over-HTTP codec (keripy app/httping.py) and an async client for OOBIs and witness receipts. Each KERI message travels as one HTTP request whose body is the message’s JSON and whose CESR-ATTACHMENT header carries its CESR attachments.

Re-exports§

pub use client::Client;
pub use client::ClientError;
pub use client::ReceiptResponse;

Modules§

client
Async HTTP client for talking to KERI witnesses and OOBI endpoints, the Rust counterpart of keripy’s httping + agenting.Receiptor HTTP calls. Plain async fns: the caller owns the runtime and the libkeri state.

Structs§

CesrRequest
One KERI message split for HTTP transport.

Enums§

CodecError

Constants§

CESR_ATTACHMENT_HEADER
Header carrying the CESR attachments for the JSON body (keripy httping.CESR_ATTACHMENT_HEADER).
CESR_CONTENT_TYPE
Content type for CESR-over-HTTP requests (keripy httping.CESR_CONTENT_TYPE in 1.1 and 1.2).
CESR_CONTENT_TYPE_V2
The same content type as keripy main (2.x) names it. keripy servers accept only their own name and answer 406 to the other.
CESR_DESTINATION_HEADER
Header naming the destination AID (keripy httping.CESR_DESTINATION_HEADER).
CESR_STREAM_CONTENT_TYPE
Content type keripy uses for CESR stream responses (OOBIs, receipts).

Functions§

join
Concatenate a message body and its attachments into a CESR stream.
split
Split a CESR stream of one or more KERI JSON messages (with text-domain attachments) into one CesrRequest per message, as keripy’s streamCESRRequests does before POSTing each one.