Every SDK entry point that touches the chain — the RPC client, the wallet, address encoding, key derivation — needs a network identifier to pick the right chain and the right address prefix. Get this wrong and you’ll derive addresses nobody can pay, or connect to a node that has never heard of your UTXOs.
The networks
| Network | Network id | Address prefix | Status |
|---|---|---|---|
| Mainnet | mainnet | kaspa: | Production |
| Testnet 10 | testnet-10 | kaspatest: | Active public testnet |
| Testnet 11 | testnet-11 | kaspatest: | Defunct |
| Testnet 12 | testnet-12 | kaspatest: | Covenants testnet |
Operator-run devnet (kaspadev:) and simnet (kaspasim:) also exist, for private chains and simulators respectively.
Use testnet-10 while developing. It’s the active public testnet and the network where hardforks are staged before mainnet — both Crescendo and Toccata ran on TN10 first.
Testnet-11 served as the 10 BPS testing ground pre-Crescendo; node support was dropped from rusty-kaspa releases starting v0.17.0 (March 2025).
Testnet-12 is the covenants testnet. It began as an experiment on a dedicated tn12 branch pre-Toccata, and its setup guide (testnet12.md) still describes cloning that branch — but the network is no longer branch-only: master assigns it a dedicated P2P port (16311) in NetworkId::default_p2p_port, alongside mainnet and TN10. Run it with --testnet --netsuffix=12.
Passing the identifier
use kaspa_wrpc_client::prelude::{NetworkId, NetworkType};
// Carries the suffix — this is what an RPC client needs. Testnet has no
// suffix-free form: NetworkId::new() panics for it, use with_suffix().
let network_id = NetworkId::with_suffix(NetworkType::Testnet, 10);
let mainnet = NetworkId::new(NetworkType::Mainnet);
// No suffix — enough for address encoding and key derivation.
let network_type = NetworkType::Testnet; const { RpcClient, Resolver, NetworkId, NetworkType } = kaspa;
// Most call sites take the plain string.
const rpc = new RpcClient({ resolver: new Resolver(), networkId: 'testnet-10' });
// Typed forms, when you want to hold a value without re-parsing it.
const networkId = new NetworkId('testnet-10');
const networkType = NetworkType.Testnet; from kaspa import NetworkId, NetworkType, Resolver, RpcClient
# Most call sites take the plain string.
client = RpcClient(resolver=Resolver(), network_id="testnet-10")
# Typed forms.
network_id = NetworkId("testnet-10") # .network_type, .suffix
network_type = NetworkType.TestnetThree forms turn up across the APIs:
- Plain strings (
"testnet-10") — what most call sites accept. Carries the suffix. NetworkId— typed, also carries the suffix. Useful when you want to hold a value without re-parsing it.NetworkType— just the base kind (Mainnet, Testnet, Devnet, Simnet). No suffix. Sufficient anywhere only the address prefix matters, since testnet-10 and testnet-11 share the samekaspatest:prefix. Not enough to pick a specific testnet for an RPC client.
Rule of thumb: pass a string or a NetworkId to anything that talks to the chain; NetworkType is fine for derivation and address encoding.
What changes between networks
- Address prefix. A key derived under mainnet produces
kaspa:...; the same key under testnet-10 produceskaspatest:.... The prefix is covered by the address checksum, so a mainnet address simply won’t parse as a testnet one. See Addresses. - Genesis and chain state. Each network has its own UTXO set. Funds on one don’t exist on another.
- Derivation. Testnets use their own BIP-44 network type, so the same mnemonic yields different keys.
- Resolver pool. A Resolver only returns nodes for the configured network id, and not every testnet has public nodes.
- Maturity depths and block rate. Coinbase maturity and block rate differ by network; the SDKs apply the right values automatically. See Network Parameters.
Running a testnet node
Same as running a mainnet node, plus network flags:
kaspad --testnet --netsuffix=10 --utxoindex TN10 is the default netsuffix, but the official guidance is to specify it explicitly. Data lands in its own subfolder under ~/.rusty-kaspa. Testnet-10 ports are P2P 16211, gRPC 16210, wRPC 17210 (borsh) / 18210 (json) — see Network Parameters.
Get test KAS
- Faucets. See the faucet list, which is the canonical list for this site.
- CPU mine it. Testnets are CPU-mineable with kaspa-miner, the miner the official docs recommend for testnets:
kaspa-miner --testnet --mining-address kaspatest:... -p 16210 -t 1against a local synced node. Mined coinbase outputs mature after 1,000 blocks. - Ask. Other testnet participants (e.g. the #testnet channel on the Kaspa Discord) can send test KAS.
Testnet coins have no value, and testnets are periodically reset or replaced — don’t build anything that assumes testnet state persists.
Switching networks at runtime
The RPC client can be retargeted between connections, but not while connected:
client.disconnect().await?;
// Rebuild the client with the new network id, then reconnect. await rpc.disconnect();
rpc.setNetworkId(new NetworkId('mainnet'));
await rpc.connect(); await client.disconnect()
client.set_network_id("mainnet")
await client.connect()Switching network doesn’t invalidate a wallet’s file store, but account addresses are network-specific — a key created under testnet-10 produces different addresses than the same key under mainnet.
See Also: Addresses, Network Parameters, Resolver