Genesis Blockchain API
All endpoints are RESTful and use application/json
.
Rate limit: Max 30 requests/min per IP.
Authentication: API key required for sub-wallet creation and API-based transfers.
Security: Always use HTTPS. Verify signatures client-side if possible.
🔐 Login (Mnemonic)
Endpoint: POST /api/advanced/login
Body:
{ "mnemonic": "word1 word2 ... word12" }
Response: Wallet info: address, publicKey, balance, createdAt
No API key required. Useful for mobile apps or direct user login.
➕ Create Wallet (API)
Endpoint: POST /api/advanced/wallet/create
Header: X-API-KEY
of a business wallet
Response: Newly created wallet with keys & mnemonic
Only wallets with IsBusiness = true
can create sub-wallets.
✅ Wallet Validation
POST /api/advanced/validate-wallet
{ "walletAddress": "GNS...", "privateKey": "..." }
Response: 200 OK or 401 Unauthorized
📂 Wallets by API Key
GET /api/advanced/wallets
Header: X-API-KEY
Query param: ?includeMain=true
(optional)
Response: All wallets created by this API key
💰 Check Balance
GET /api/advanced/balance/{walletAddress}
Response: { "balance": 105.75 }
📤 Send Transfer
POST /api/advanced/send
Headers: X-API-KEY
(if applicable)
{ "senderAddress": "GNS...", "receiverAddress": "GNS...", "amount": 10, "signature": "SHA256(sender-receiver-amount-privateKey)" }
⚠️ Sender must have ≥ MinGnsForApiKeyUsage.
🔎 Transfer Details
GET /api/advanced/transfer/by-hash/{blockHash}
Response: Transfer metadata + confirmation status
🧱 Block Details
GET /api/advanced/block/{hashOrId}
Response: Block info + transfer + confirmations
🎁 Estimate Reward
GET /api/advanced/reward-estimate?amount=100&minerCount=5
Response: total and per-miner reward
🔁 Transfer Confirmations
GET /api/advanced/transfer-confirmations/by-hash/{hash}
Response: Number of confirmations
📜 Transfer History
GET /api/advanced/transfers/{walletAddress}?limit=20
Header: X-API-KEY
required if sub-wallet
📡 Webhook Endpoint
System POSTs to /api/webhook
on confirmed transfer
>{ "transferId": 123, "hash": "...", "amount": 50, "sender": "...", "receiver": "...", "timestamp": "..." }
🧪 Webhook Test
POST /api/advanced/webhook-test
Body: Test URL
Purpose: Simulate a webhook delivery