diff --git a/docs/api/endpoints.md b/docs/api/endpoints.md new file mode 100644 index 0000000..77d9695 --- /dev/null +++ b/docs/api/endpoints.md @@ -0,0 +1,74 @@ +# RustChain API Reference + +Comprehensive guide to all public endpoints for the RustChain attestation network. + +## Base URL +`https://50.28.86.131` + +--- + +## 🔐 Attestation & Consensus + +### `POST /attest/challenge` +Request a new nonce for hardware attestation. +- **Request:** `{}` +- **Response:** `{"nonce": "string"}` + +### `POST /attest/submit` +Submit hardware fingerprint and entropy for validation. +- **Payload:** +```json +{ + "miner": "RTC...", + "nonce": "nonce_from_challenge", + "device": { "arch": "modern", "cores": 8 }, + "fingerprint": { "checks": { ... } } +} +``` +- **Response:** `{"ok": true, "status": "accepted"}` + +--- + +## 💰 Wallet & Ledger + +### `GET /balance/
` +Check the confirmed RTC balance of a wallet. +- **Response:** `{"balance_rtc": 12.5, "miner_id": "RTC..."}` + +### `GET /wallet/balance?miner_id=