Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

palimpsest-envelope

Sealed execution context — immutable after construction. The envelope captures every input that affects a fetch, enabling deterministic replay and verification.

ExecutionEnvelope

#![allow(unused)]
fn main() {
impl ExecutionEnvelope {
    pub fn seed(&self) -> CrawlSeed;
    pub fn timestamp(&self) -> CaptureInstant;
    pub fn target_url(&self) -> &Url;
    pub fn request_headers(&self) -> &[(String, String)];
    pub fn dns_snapshot(&self) -> &DnsSnapshot;
    pub fn tls_fingerprint(&self) -> Option<&TlsFingerprint>;
    pub fn browser_config(&self) -> Option<&BrowserConfig>;
    pub fn content_hash(&self) -> ContentHash;
}
}

No setter methods. Immutable after build().

EnvelopeBuilder

#![allow(unused)]
fn main() {
impl EnvelopeBuilder {
    pub fn new() -> Self;
    pub fn seed(self, seed: CrawlSeed) -> Self;
    pub fn timestamp(self, ts: CaptureInstant) -> Self;
    pub fn target_url(self, url: Url) -> Self;
    pub fn header(self, name: String, value: String) -> Self;
    pub fn headers(self, headers: Vec<(String, String)>) -> Self;
    pub fn dns_snapshot(self, dns: DnsSnapshot) -> Self;
    pub fn tls_fingerprint(self, tls: TlsFingerprint) -> Self;
    pub fn browser_config(self, config: BrowserConfig) -> Self;
    pub fn build(self) -> Result<ExecutionEnvelope, EnvelopeError>;
}
}

EnvelopeError

#![allow(unused)]
fn main() {
pub enum EnvelopeError {
    MissingSeed,
    MissingTimestamp,
    MissingTargetUrl,
    MissingDnsSnapshot,
}
}

Supporting Types

#![allow(unused)]
fn main() {
pub struct DnsSnapshot { pub host: String, pub addrs: Vec<String>, pub ttl: u32 }
pub struct TlsFingerprint { pub protocol: String, pub cipher: String, pub cert_chain_hash: String }
pub struct BrowserConfig { pub viewport_width: u32, pub viewport_height: u32, pub user_agent: String, pub js_enabled: bool }
}
  • palimpsest-core — provides CrawlSeed, CaptureInstant, ContentHash
  • palimpsest-fetch — consumes envelopes for fetch execution
  • palimpsest-artifact — serializes envelopes as WARC++ records