Skip to Content
neatdocs
Reference

neat3-sdk/anon

createAnonFetch, an anonymized fetch backed by Anon-RPC. Browser only.

import { createAnonFetch, ANON_NETWORKS } from "neat3-sdk/anon";

Requires the optional peer @anon-rpc/browser-harness@0.4.0.

createAnonFetch

createAnonFetch({ network?, config?, bootstrapRpc? }): AnonFetch
OptionDefaultNotes
network"tor-js""nox", "nym", "tor-js" or "passthrough"
configPer networkNetwork-specific config. For tor-js, pass your own gateways
bootstrapRpcPer networkRPC used for the one, non-anonymized read of the specifier contract

Throws outside a browser (document is undefined).

Choose the network on purpose

The default is "tor-js", but its upstream demo gateway was down on Nov 6 2026. "nox" was the one that answered reliably. See private quotes for measured timings.

AnonFetch

FieldTypeMeaning
fetchFetchFnPass as anonFetch to CompetitiveFeeClient
readyPromise<void>Resolves once the network has bootstrapped. Earlier calls are buffered, not dropped
anonymousbooleanfalse for "passthrough"
close()() => voidStops the worker

Create one per network and reuse it. It is long-lived.

ANON_NETWORKS

The network table, taken from the Anon-RPC adopters.json5. Each entry has the on-chain specifier address, the bootstrapRpc it reads from, and an anonymous flag.

NetworkanonymousBootstrap read
noxyesSepolia
nymyesMainnet
tor-jsyesMainnet
passthroughnoMainnet

Use ANON_NETWORKS to validate a user-supplied network name, or to check anonymous before telling a user their reads are private.

On this page