🔗 Kenostod Blockchain

Complete API Documentation

📖 Overview

Kenostod is a revolutionary blockchain platform featuring the native cryptocurrency KENO. It implements proof-of-work mining, secure transactions with digital signatures, and includes six innovative features that address real-world pain points in blockchain technology.

Base URL

https://your-deployment.repl.co

API Endpoints

All endpoints return JSON responses. The API supports CORS for cross-origin requests.

✨ Six Revolutionary Features

Kenostod introduces features that Bitcoin, Ethereum, and Solana don't have:

⛓️ Blockchain APIs

GET /api/chain

Description: Get the entire blockchain

Response:

[
  {
    "timestamp": 1640000000000,
    "transactions": [],
    "previousHash": "0",
    "hash": "00abc...",
    "nonce": 12345,
    "difficulty": 2
  }
]
GET /api/chain/latest

Description: Get the latest block

Response:

{
  "timestamp": 1640000000000,
  "transactions": [],
  "previousHash": "00abc...",
  "hash": "00def...",
  "nonce": 12345
}
GET /api/chain/height

Description: Get blockchain height

Response:

{
  "height": 42
}
GET /api/valid

Description: Check if blockchain is valid

Response:

{
  "valid": true
}
GET /api/supply

Description: Get token supply information

Response:

{
  "totalMinted": 1000,
  "totalBurned": 50,
  "circulatingSupply": 950
}

💸 Transaction APIs

POST /api/transaction/simple ⚠️ DEV ONLY

Description: Send a transaction (server-side signing)

⚠️ SECURITY WARNING: This endpoint accepts private keys from clients and is ONLY for development/testing. It is automatically disabled in production environments. Never use this with real wallets or funds!

Request Body:

{
  "fromAddress": "04abc...",
  "privateKey": "ee3b69...",  // ⚠️ Never send real private keys!
  "toAddress": "04def...",
  "amount": 10,
  "fee": 1,
  "message": "Payment for services" // optional
}

Response:

{
  "success": true,
  "message": "Transaction created successfully! You have 5 minutes to cancel it.",
  "transactionHash": "89616db...",
  "reversalWindow": {
    "seconds": 300,
    "expiresAt": "2025-10-24T06:14:45.847Z"
  }
}

Production Alternative: Use client-side signing and submit to /api/transaction endpoint.

GET /api/balance/:address

Description: Get wallet balance

Response:

{
  "address": "04abc...",
  "balance": 100
}
GET /api/transactions/:address

Description: Get all transactions for an address

Response:

{
  "address": "04abc...",
  "transactions": [...],
  "count": 5
}

🔄 Transaction Reversal REVOLUTIONARY

Kenostod's unique 5-minute reversal window allows users to cancel transactions before they're mined into a block.

GET /api/pending/:address

Description: View pending transactions that can be cancelled

Response:

{
  "address": "04abc...",
  "pendingTransactions": [
    {
      "hash": "89616db...",
      "fromAddress": "04abc...",
      "toAddress": "04def...",
      "amount": 10,
      "fee": 1,
      "reversalWindowExpiry": "2025-10-24T06:14:45.847Z"
    }
  ],
  "count": 1
}
POST /api/transaction/cancel

Description: Cancel a pending transaction

Request Body:

{
  "transactionHash": "89616db...",
  "senderAddress": "04abc..."
}

Response:

{
  "message": "Transaction cancelled successfully!",
  "transaction": {
    "hash": "89616db...",
    "fromAddress": "04abc...",
    "toAddress": "04def...",
    "amount": 10,
    "fee": 1
  }
}

⏰ Scheduled Payments REVOLUTIONARY

Native support for recurring and future-dated transactions.

POST /api/scheduled/create

Description: Create a scheduled payment

Request Body:

{
  "fromAddress": "04abc...",
  "privateKey": "ee3b69...",
  "toAddress": "04def...",
  "amount": 50,
  "fee": 1,
  "scheduleType": "recurring",  // "once" or "recurring"
  "executeAt": "2025-10-25T10:00:00Z",
  "interval": "daily",  // "daily", "weekly", "monthly" (for recurring)
  "endDate": "2025-12-31T23:59:59Z"  // optional, for recurring
}

Response:

{
  "success": true,
  "message": "Scheduled payment created successfully!",
  "scheduleId": "sched_abc123..."
}
GET /api/scheduled/:address

Description: View scheduled payments

Response:

{
  "address": "04abc...",
  "scheduledTransactions": [...],
  "count": 3
}
POST /api/scheduled/cancel

Description: Cancel a scheduled payment

Request Body:

{
  "scheduleId": "sched_abc123...",
  "senderAddress": "04abc..."
}

👥 Social Recovery REVOLUTIONARY

Guardian-based wallet recovery system that protects private keys.

POST /api/recovery/setup

Description: Set up social recovery guardians

Request Body:

{
  "walletAddress": "04abc...",
  "guardians": ["04def...", "04ghi...", "04jkl..."],
  "threshold": 2  // number of guardians needed for recovery
}
POST /api/recovery/initiate

Description: Initiate wallet recovery

Request Body:

{
  "lostWalletAddress": "04abc...",
  "newWalletAddress": "04xyz...",
  "guardianAddress": "04def..."
}
POST /api/recovery/approve

Description: Approve a recovery request (as guardian)

Request Body:

{
  "recoveryId": "rec_abc123...",
  "guardianAddress": "04def..."
}
GET /api/recovery/:address

Description: View recovery setup and pending requests

⭐ Reputation System REVOLUTIONARY

Decentralized rating system for building trust.

POST /api/reputation/rate

Description: Rate a transaction or user

Request Body:

{
  "raterAddress": "04abc...",
  "ratedAddress": "04def...",
  "transactionHash": "89616db...",  // optional
  "rating": 5,  // 1-5 stars
  "comment": "Great transaction, fast and reliable!"
}
GET /api/reputation/:address

Description: Get reputation score and reviews

Response:

{
  "address": "04abc...",
  "averageRating": 4.5,
  "totalRatings": 10,
  "trustLevel": "High",
  "ratings": [...]
}

🗳️ Community Governance REVOLUTIONARY

Token-weighted voting on network parameters.

POST /api/governance/propose

Description: Create a governance proposal

Request Body:

{
  "proposerAddress": "04abc...",
  "proposalType": "mining_reward",  // "mining_reward", "difficulty", "min_fee"
  "newValue": 150,
  "description": "Increase mining reward to 150 KENO",
  "votingDuration": 604800000  // 7 days in milliseconds
}
POST /api/governance/vote

Description: Vote on a proposal

Request Body:

{
  "proposalId": "prop_abc123...",
  "voterAddress": "04abc...",
  "vote": "yes"  // "yes" or "no"
}
GET /api/governance/proposals

Description: View all governance proposals

GET /api/governance/proposal/:id

Description: View specific proposal details

⛏️ Mining

POST /api/mine

Description: Mine a new block

Request Body:

{
  "minerAddress": "04abc..."
}

Response:

{
  "message": "Block mined successfully!",
  "balance": 100,
  "blockHeight": 3
}
GET /api/difficulty

Description: Get current mining difficulty

Response:

{
  "difficulty": 2
}

🔑 Test Wallets

Use these pre-generated wallets for testing:

Wallet 1

Property Value
Address 04b6a0b893704436390333a2ad5d37a164678a9542799f44b6bdfac88476ae8bc79d62c57ae387f7dd6ec2fc582956927c54514e219d501961598e765e55a9e83a
Private Key ee3b69dd5f88b8c25f3e4b44ef1707b2cde6c03a3911478fa8a11579269bb2dc

Wallet 2

Property Value
Address 0477733462078bfe987ed76909896ff6b8be1bad4234383b1ff6ee93e16f97768b30f657ec275d2e8cbbcf4749b1576bf4b0727f47c1a2f610fd9f9c92535b9a9f
Private Key 5c032b80f6fb11e9e1afb4fa2c6cf1c0d8c4f0e4e5e7c8d9a0b1c2d3e4f5a6b7

🚀 Getting Started

Visit the Simple Test Interface to try out the blockchain features!

All API endpoints are available at the base URL of this deployment.