erc8128 — Signed HTTP Requests with Ethereum
Rust implementation of ERC-8128: authenticate HTTP requests using HTTP Message Signatures (RFC 9421) with Ethereum accounts.
Two core operations:
- [
sign_request] — sign an outgoing HTTP request - [
verify_request] — verify an incoming signed HTTP request
Chain-specific signature verification (EOA / ERC-1271) is pluggable
via the [Verifier] trait.
Examples
use erc8128::{Request, SignOptions, sign_request};
# async fn example(signer: impl erc8128::Signer) -> Result<(), erc8128::Erc8128Error> {
let request = Request {
method: "GET",
url: "https://api.example.com/resource",
headers: &[],
body: None,
};
let signed = sign_request(&request, &signer, &SignOptions::default()).await?;
# Ok(())
# }