Browser Test Client
Testnet-only browser client for inspecting Kaspa x402 offers, checking public-node connectivity, and rehearsing exact-payment headers before a hosted demo gateway exists.
Safety Boundary
- The network is fixed to
kaspa:testnet-10; there is no mainnet selector. - Generated or imported private keys stay in browser memory. The page does not write key material to local storage, cookies, query strings, or the server.
- Reset clears the in-memory key, visible fields, and RPC connection state.
- The only signed data that should leave the page is a transaction you intentionally broadcast through the public node network.
- The apex domain hosts static files only. A hosted gateway or paid test resource belongs on a separate demo subdomain.
Runtime Status
Public HTTPS pages must use the listed wss:// endpoints. Local custom endpoints require a local preview opened with ?allow-custom-endpoints=1&endpoint=...; the field must match that local or private-network endpoint.
{}
Testnet Key
x402 Offer Builder
{}
Exact Mock Flow
Use this to rehearse the 402 retry envelope against a mock or local gateway. A real gateway must still verify and settle the transaction.
{}
Offer Compatibility Debug
Paste a PaymentRequired JSON object to see which entries are supported by this Kaspa binding and which entries a client would skip during selection.
{}
Developer Notes
- Run locally with
npm run site:serveand open/demo/. The local preview binds to the LAN; use the host IP from another device. Add?allow-custom-endpoints=1&endpoint=...only when testing a local or private-network node endpoint. - Fund generated addresses with testnet funds only. The page does not provide a faucet.
- The browser SDK is loaded from
/vendor/kaspa-wasm/2.0.0/kaspa-core/. The browser uses public WSS endpoints directly;npm run check:pnn-browserverifies resolver lookup from Node. Runtime spike metadata is available at/demo/pnn-spike.json. - The published TypeScript helpers are currently Node-oriented for header encoding and hashing. This page uses browser-native header encoding until a browser-safe package build is added.
- Public Node Network endpoints are shared test infrastructure. Treat outages, latency, and endpoint rotation as expected development failures.