code wiki / (root) / nx_price_extract.nx

nx_price_extract.nx

buildroot/runtime/nx_price_extract.nx

2323 B61 linesdepth 2pulls 2 transitivereach 6 importersview sourcekind librarytopic price
docsdependenciesstructsconstsfunctions

about

nx_price_extract.nx -- the Nishi BROWSER's price detector: find the price on a rendered shopping page so the "before you buy" check (nx_purchase) can show what you have vs what it costs. Sovereign, deterministic (no JS, no scraping libraries): scan the page text for $-amounts and take the largest (the product price, usually -- vs $9.99 shipping). Reuses the same exact money-parsing as nx_doc_extract. The browser feeds this its rendered DOM text (nx_html_to_text / nx_dom_query). Honest scope: "largest $-amount" heuristic; currency/locale + labelled-price selection are later rungs. No floats, no hardware writes. license_tier: ORIGINAL

dependencies 1 imports · 3 importers

nx_syscalls.nx nx_price_extract.nx nx_browser_buyguard.nx nx_browser_buyguard_gate.nx nx_purchase_gate.nx

imports: nx_syscalls.nx

imported by: nx_browser_buyguard.nxnx_browser_buyguard_gate.nxnx_purchase_gate.nx

structs

none

consts

none

functions

9func px_dig(c: i64) -> i64
called by 1: px_parse_at
16func px_parse_at(text: *u8, n: i64, i: i64) -> i64
called by 1: px_find_price calls 1: px_dig
50func px_find_price(text: *u8, n: i64) -> i64
called by 3: bgw_scanmainmain calls 1: px_parse_at