Skip to main content

route_nip59_envelope

Function route_nip59_envelope 

Source
pub fn route_nip59_envelope(
    json: &str,
) -> Result<Nip59EnvelopeRoute, SoftchatError>
Expand description

Verify a bounded gift-wrap event and extract its account-routing hint.

This authenticates only the signed outer wrapper and its single canonical recipient tag. The selected account must still unwrap and authenticate every inner layer before exposing message content.

ยงErrors

Returns a stable event or envelope failure for malformed, forged, unsupported, or ambiguously routed input.