Browser Test Client
Testnet-only browser client for inspecting Kaspa x402 offers, checking public-node connectivity, and rehearsing exact or Alpha.10 batch payment headers. The hosted gateway at demo.kaspa-x402.org is the paid-canary-proven Alpha.10 Testnet-10 deployment; see the gateway reference for deployed evidence.
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. The hosted gateway and its paid test resources run on the separate
demo.kaspa-x402.orgsubdomain.
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
Alpha.10 Batch Requirements
Current Lane And Voucher
covenantId is the stable KIP-20 lineage; it does not locate the UTXO. The current outpoint and script must be persisted and advanced after every accepted claim or top-up.
The preview enforces 0 <= S <= A <= T and (T - S) + R <= V. A partial claim advances S and reduces V; A, T, the voucher signature, and covenantId stay unchanged.
{}
Mock Payment Retry
Use this to rehearse the selected 402 retry envelope. Exact uses a schema-only request authorization. Batch uses a schema-only voucher signature and shows the current lane plus a partial-claim successor. These placeholders are not valid settlement evidence.
{}
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 Kaspa testnet page lists a TN10 faucet at faucet-tn10.kaspanet.io; a local or private faucet is also suitable.
- 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.