API Reference
Webcash protocol endpoint documentation. This is the protocol API used by webcash.org and implemented by the weby.cash testnet.
Base URLs
https://webcash.orghttps://weby.cash/api/webcash/testnetThe testnet implements the same protocol as production webcash.org. All endpoints behave identically.
Authentication
The webcash protocol is permissionless. No API keys, no accounts, no authentication.
Bearer secrets (the full e…:secret:… string) serve as both identity and authorization.
Anyone who knows the secret can spend that webcash.
Endpoints
/api/v1/targetCurrent mining difficulty target. Returns the number of leading zero bits required for a valid proof-of-work.
Response
{
"difficulty_target": 28,
"epoch": 42,
"mining_amount": "200.0",
"mining_subsidy_amount": "200.0",
"ratio": 1.0
}/api/v1/mining_reportSubmit a mining proof-of-work. The preimage must hash to a value with the required number of leading zero bits. On success, the claimed secret webcash output is created.
Request body
{
"preimage": "sha256_preimage_hex...",
"legalese": {
"terms": true
}
}Response
{
"status": "ok",
"amount": "200.0"
}/api/v1/replaceReplace (split/merge) secret webcash strings. The fundamental transfer operation. Inputs are consumed, new secret outputs are created. Total input amount must equal total output amount.
Request body
{
"webcashes": ["e10:secret:abc123..."],
"new_webcashes": [
"e7:secret:def456...",
"e3:secret:ghi789..."
],
"legalese": {
"terms": true
}
}Response
{
"status": "ok"
}/api/v1/health_checkServer health and readiness check.
Response
{
"status": "ok",
"difficulty_target": 28,
"epoch": 42
}/api/v1/burnPermanently destroy a secret webcash string. Removes it from circulation. Irreversible.
Request body
{
"webcash": "e10:secret:abc123..."
}Response
{
"status": "ok",
"amount": "10.0"
}/api/v1/statsPublic server statistics. Total supply, circulation, mining epoch, and historical data.
Response
{
"total_mined": "1000000.0",
"total_burned": "500.0",
"circulation": "999500.0",
"epoch": 42,
"difficulty_target": 28,
"total_replace_count": 85432
}