Testnet

The testnet runs the same protocol as production webcash.org. Constant low difficulty (16 bits) -- CPU mines in seconds.

Testnet webcash have no value. For development and testing only.

Testnet API

Base URL

https://weby.cash/api/webcash/testnet/

All protocol endpoints work identically to production webcash.org. The testnet implements the same API at /api/v1/*. Difficulty target is fixed at 16 bits for fast CPU mining.

Health check

curl https://weby.cash/api/webcash/testnet/health_check

Check target

curl -s https://weby.cash/api/webcash/testnet/target | jq .

Use with webyc CLI

The webyc CLI supports --network testnet to target the weby.cash testnet.

# Setup a testnet wallet
webyc --network testnet setup
# Mine testnet webcash (CPU, completes in seconds)
webyc --network testnet mine
# Pay 50 testnet webcash
webyc --network testnet pay 50
# Check balance
webyc --network testnet check

Use with webycash-sdk

Set the network mode to NetworkMode::Testnet in the SDK.

// Rust
let client = WebcashClient::new(NetworkMode::Testnet);
// TypeScript
const client = new WebcashClient("testnet");
# Python
client = WebcashClient("testnet")

Local server with Docker Compose

Run a full testnet server locally for development and testing.

Start Redis and run the server

docker compose up redis cargo run -- --config config/testnet.toml

Or use the full Docker Compose stack

version: "3.8"
services:
  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"

  webycash-server:
    image: ghcr.io/webycash/webycash-server:latest
    environment:
      WEBCASH_DB: redis
      REDIS_URL: redis://redis:6379
      NETWORK_MODE: testnet
      BIND_ADDR: 0.0.0.0:9000
    ports:
      - "9000:9000"
    depends_on:
      - redis

Start

docker compose up -d

Point webyc to local server

webyc --server-url http://localhost:9000 mine

Verify

curl http://localhost:9000/api/v1/health_check