# compute_reveal in tlsn_wasm::handler - Rust
Parses HTTP request/response transcripts and maps handlers to byte ranges.

Skip to main content

## compute_reveal

# Function compute_reveal

Source

    pub fn compute_reveal(
        sent: &[u8],
        recv: &[u8],
        handlers: JsValue,
    ) -> Result<JsValue, JsError>

Expand description

Parses HTTP request/response transcripts and maps handlers to byte ranges.

This is the WASM wrapper around `tlsn_sdk_core::compute_reveal`.

## §Arguments

- `sent` - Raw bytes of the HTTP request (sent data).
- `recv` - Raw bytes of the HTTP response (received data).
- `handlers` - Array of handler objects (deserialized from JS).

## §Returns

A `ComputeRevealOutput` object containing:

- `sentRanges` / `recvRanges`: byte ranges for `Prover.reveal()`
- `sentRangesWithHandlers` / `recvRangesWithHandlers`: ranges annotated with handlers
- `commit` (optional): ranges to hash-commit, with per-range algorithm