Skip to main content

parse_verify_route

Function parse_verify_route 

Source
fn parse_verify_route(
    route: &str,
) -> Option<Result<(Hash, HashMap<String, String>)>>
Expand description

Parses the LNURL-verify route /verify/{payment_hash} into the payment hash and the query parameters (?wait) of the request.

Returns None if the route is not shaped like the verify route at all, so that the caller falls through to the regular handler lookup and answers with a 404. Only the exact /verify/{payment_hash} shape is this endpoint, the same way the HTTP path registers it as an exact route: neither a route that merely starts with /verify nor one that appends further path segments may reach this unauthenticated handler.