@momics/iroh-http-shared
v0.5.2
Published
Shared TypeScript layer for iroh-http — no native dependencies
Readme
@momics/iroh-http-shared
Pre-v1.0. APIs may change between minor releases.
Shared TypeScript layer for iroh-http. Pure TypeScript, no native dependencies. This is a transitive dependency of the platform adapters (Node.js, Deno, Tauri) and is not intended for direct import.
What's inside
IrohNode: the node class exposed by all adapters (fetch(),serve(),connect(),sessions(),browse(),advertise())IrohAdapter/Bridge: the interface each platform adapter implements (nextChunk,sendChunk,finishBody, raw FFI fetch/serve)IrohSession: a WebTransport-compatible QUIC session with bidirectional streams, unidirectional streams, and datagramsmakeReadable(): wraps a Rust body handle in aReadableStreampipeToWriter(): drains aReadableStreaminto a Rust body handlemakeFetch(): wraps raw FFI fetch in web-standardfetch()signaturemakeServe(): wraps raw FFI serve in Deno-styleserve()signaturePublicKey/SecretKey: key classes with base32 encoding, async sign/verifyIrohError: structured error hierarchy with error codes
License
MIT OR Apache-2.0
