Helius and px402
How px402 uses Privacy Rings and the Helius services, and what Helius can see.
Every paid call on px402 is one Helius Privacy Rings transfer in the Default Ring. Per Helius’s guarantees, the sender and recipient are public, the asset and amount are encrypted, and only the sender and recipient can decrypt them, each with their own viewing key. That last property is what lets an API payment be checked without a facilitator holding funds.
Devnet. px402 pins @heliuslabs/spr 0.9.0-alpha, an alpha SDK, and the matching 0.9.0 Rust crates. Check
Helius’s SDK page for its current releases.
What px402 uses
| From Helius | In px402 |
|---|---|
| Shielded address | Each provider’s receiver. It goes into the 402 challenge |
| Private transfer | The payment itself, one per paid call |
| Deposit and withdrawal | Funding an agent, and moving money out. Both public |
| Split and merge | More private outputs for parallel calls, and combining them again |
| Viewing keys and local sync | Balances for an agent; verification and earnings for a provider |
| Indexer lookup by signature | The gateway finds the shielded outputs of the transaction a claim names |
| Solana RPC | Confirmation, the block time and the transaction’s signers |
| Prover | Zero-knowledge proofs for private spends |
| TypeScript SDK | The open-source px402 SDK and CLI, the gateway’s verification and the hosted wallet |
| Rust SDK | The TVC enclave program |
A payment, built and verified
- 01Agent → Helius indexerThe agent fetches encrypted state and decrypts it on its own machine.
- 02Agent → Helius proverThe SDK verifies the prover is the attested enclave its policy allows, then sends the proof inputs.
- 03Helius prover → AgentThe proof comes back.
- 04Agent → SolanaThe agent signs as the only public signer and pays the fee.
- 05Agent → px402 gatewayThe agent signs a claim that binds the payment challenge to this transaction.
- 06px402 gateway → SolanaThe gateway checks the claim signer is the signer of the transaction, and that it is newer than the challenge.
- 07px402 gateway → Helius indexerIt fetches the shielded outputs and decrypts them locally with the provider's viewing key.
- 08px402 gatewayOne output must pay this receiver at least the price, in USDC.
How px402 uses it with care
- Local decryption. Helius offers two modes: local, or delegated, where a provider holds the viewing key. px402 decrypts locally and shares no viewing key for delegated decryption.
- An attested prover, or nothing. The SDK, the hosted wallet and the enclave program require the prover’s attestation, checked against the signed policy that the Rings SDK pins for the network. A prover that cannot attest receives nothing.
- The payer is bound to the claim. px402 never sets a separate
owneron a transfer, so the paying key is the single public signer. The claim must be signed by that key, so someone who copies a signature cannot claim it. - Parallel payments. The wallet serializes note selection, lets signing and confirmation overlap, and returns leased notes if a transfer is abandoned before signing. By default four transfers are built at once, based on measurements below.
- Two implementations that agree. The TypeScript SDK and the Rust enclave program share test vectors: addresses and claim proofs from TypeScript, a transaction from Rust, and a deposit instruction both must build identically.
- Retries instead of second payments. If the transfer is not indexed yet, or a Helius read fails or the gateway’s read budget is spent, the agent resends the same claim. It does not pay again.
What Helius can see
| Path | Which Helius key | What reaches Helius |
|---|---|---|
| Self-held agent | The agent owner’s own | The agent’s requests and IP address; proof inputs when it spends |
| Gateway verification | px402’s | Reads of the transactions being verified |
| Hosted agent | px402’s | px402’s requests for that agent; proof inputs when it spends |
| TVC agent | px402’s, a separate one when set | The enclave’s requests; proof inputs when it spends |
According to Helius’s wallet guide, generating a proof needs the transaction’s plaintext data and the wallet’s nullifier key, and the SDKs’ default prover is an attested AWS Nitro enclave. So encryption on chain does not mean the proving service never handles the amount: it processes it inside that enclave.
The agent’s spend key signs outside the prover. What Helius keeps, and how it uses it, is covered by its Terms of Service and Privacy Policy.
Measured on devnet
Small samples, from px402’s own runs.
| Measurement | Result |
|---|---|
| One paid call, end to end | About 4 s at p50 |
| Through the deployed stack, 3 of 3 calls | p50 6.0 s, p95 10.0 s |
| 20 concurrent calls from one wallet | p95 34 s |
| Solana fee of a paid call | 5,000 lamports |
| One verified demo payment | Verified in 2,117 ms, in the same slot the chain recorded |
Where the Rings roadmap matters
Helius describes Custom Rings with an anonymous mode that hides the sender and recipient on chain. px402 does not use it. Adopting it would change how a claim proves who paid, and nothing here should be read as hiding the payer today.