Skip to main content

uxn_tal/
protocol_parser.rs

1// Enhanced ProtocolParser that includes git support
2use uxn_tal_defined::v1::ProtocolParseResult;
3
4pub struct ProtocolParser;
5
6impl ProtocolParser {
7    /// Parse a uxntal protocol URL with automatic git URL enhancement
8    /// This shadows the base ProtocolParser::parse to provide git support automatically
9    pub fn parse(raw_url: &str) -> ProtocolParseResult {
10        crate::parse_uxntal_url(raw_url)
11    }
12
13    /// Render a ProtocolParseResult back into a uxntal URL
14    /// This exposes the render_url functionality from uxn_tal_defined
15    pub fn render_url(result: &ProtocolParseResult) -> String {
16        uxn_tal_defined::v1::ProtocolParser::render_url(result)
17    }
18}