k402
Testnet research software — unaudited, not for real value. Get set up on testnet-10 →
§ 0
Kaspa · x402 · private payments
Research demo: unaudited · single-party trusted setup (forgeable, drainable) · testnet-10 only · not for real value — details.

Pay a service privately

An agent can pay any kaspa-402 service without its funding wallet being linkable to what it buys. The payment settles from a Kaspa shielded pool — a Groth16 ZK privacy primitive on Kaspa L1 — so the address that pays shares nothing with the address that funded it.

This is privacy for agent commerce: the service still gets paid on-chain, per call, with no custodian — but an observer can’t tie the payment back to the payer’s treasury.

§ 1
Research demo · testnet-10. The honest status.

The shielded pool here is unaudited, runs a single-party trusted setup (so it is forgeable / drainable), and lives on kaspa:testnet-10 only. It is a proof of concept — not for real value. A mainnet version needs an MPC trusted-setup ceremony and a ZK audit.

Mainnet path · MPC ceremony: not started · ZK audit: not scheduled · the pool stays testnet-only until both are done.

§ 2
The loop, end to end. Recorded on testnet-10: mine → shield → withdraw (fresh address) → pay.
Terminal recording: a Kaspa mining reward is shielded, withdrawn to a fresh unlinkable address, and used to pay an x402 service.
Fig. 1 — recorded on testnet-10.
Transcript of the recording
  1. 1. mine — A Kaspa block reward lands at the miner’s address — ordinary, public, fully linkable.
  2. 2. shield — The reward is deposited into the shielded pool as a Groth16 commitment, joining the anonymity set.
  3. 3. withdraw — After a proof-of-innocence screen, the note is withdrawn to a fresh address that shares nothing with the miner.
  4. 4. pay — That fresh address pays the x402 service. The service is paid; the payer is unlinkable to where the funds were mined.
  5. ↳ deposit: the block reward is deposited into the shielded pool as a ZK commitment · tx e584f5dc1f14e565691baf976953d185b5ee3646d4f56ea9852cda4caa5b5be1
  6. ↳ screen: a governance-screened proof-of-innocence admits the note to the approved set · tx 89bd3865f98039ee2a08b426a1929ccb4888710d7e09fef21a156df7a7daf990
  7. ↳ withdraw: the note is withdrawn to a FRESH address with no link back to the miner · tx 54f733ee7daf9a702fcadc940420a3e95a5163316cc9e18b35cdda12a7ea6d05
  8. ↳ pay: the fresh address pays the x402 summarize service — HTTP 200, 1.787 KAS · tx ab3760ac37144d23290778eb18290a23fa42794a7bf15927a54d2150a7673982
§ 3
How it works. The only linkable moment is the deposit.

How it works

1 · mine

A Kaspa block reward lands at the miner’s address — ordinary, public, fully linkable.

2 · shield

The reward is deposited into the shielded pool as a Groth16 commitment, joining the anonymity set.

3 · withdraw

After a proof-of-innocence screen, the note is withdrawn to a fresh address that shares nothing with the miner.

4 · pay

That fresh address pays the x402 service. The service is paid; the payer is unlinkable to where the funds were mined.

After the deposit, the note is one of many in the pool. The withdrawal proves, in zero knowledge, that it corresponds to some unspent deposit in a governance-approved set, without revealing which. So the fresh payer address is indistinguishable among every note in the pool.

§ 4
Proof on testnet-10. Every step is a real on-chain transaction; links resolve on the testnet-10 API.

Proof on testnet-10

The payer kaspatest:qz33np6wakmg… was funded only by shielded-pool withdrawals — it has no shared history with the mining address.

Check it yourself

  1. Step 1
    Open the deposit transaction above: its output is the shielded pool's covenant; the input is the mining address.
  2. Step 2
    Open the withdraw transaction: its output address (the fresh payer) appears nowhere in the deposit's history — search it on the TN10 API and you find only pool withdrawals funding it.
  3. Step 3
    Open the pay transaction: the input is that fresh address, the output is the service's payTo for 1.787 KAS — the x402 payment the service accepted with HTTP 200.

What the demo pays for

The paid service is the k402 summarize endpoint listed in the directory: send text, get a summary, priced in KAS per call behind an HTTP 402. Integration is unchanged for the service — it never knows the payer came from a pool. On the agent's side the only difference is which wallet pays: fund a fresh key from shielded-pool withdrawals, then call payExact(wallet, url, …) exactly as in the setup guide.