Issue #1617 - Complete Postman collection for RustChain Node API
This directory contains a complete Postman collection and environment configuration for testing and documenting the RustChain Node API. The collection is organized by functionality with example responses for each endpoint.
| File | Description |
|---|---|
RustChain_API.postman_collection.json |
Complete Postman collection with all endpoints |
RustChain_Environment.postman_environment.json |
Environment variables configuration |
validate_postman_collection.py |
Validation script and checklist |
README.md |
This documentation file |
- Open Postman (v10.0 or later recommended)
- Click File → Import
- Select
RustChain_API.postman_collection.json - Collection will appear in the sidebar
- Click File → Import
- Select
RustChain_Environment.postman_environment.json - Click the environment dropdown (top right)
- Select RustChain API Environment
Update the following environment variables:
| Variable | Description | Example |
|---|---|---|
base_url |
RustChain node URL | https://rustchain.org |
miner_id |
Your miner ID/wallet | eafc6f14eab6d5c5362fe651e5e6c23581892a37RTC |
admin_key |
Admin API key (secret) | your-admin-key |
wallet_address |
Your wallet address | your-walletRTC |
recipient_address |
Recipient wallet for transfers | recipient-walletRTC |
The collection is organized into logical folders:
RustChain API - Complete Collection
├── 01_Health_Status
│ ├── Health Check
│ └── Readiness Probe
├── 02_Epoch_Network
│ ├── Current Epoch
│ ├── Network Statistics
│ ├── Active Miners
│ └── Hall of Fame
├── 03_Fee_Pool
│ └── Fee Pool Statistics
├── 04_Wallet_Balance
│ ├── Miner Balance
│ └── Lottery Eligibility
├── 05_Explorer
│ └── Block Explorer
├── 06_Attestation
│ └── Submit Attestation
├── 07_Wallet_Transfers
│ ├── Admin Transfer
│ └── Signed Transfer
└── 08_Withdrawals
└── Withdrawal Request
| Method | Endpoint | Description |
|---|---|---|
| GET | /health |
Node health check |
| GET | /ready |
Readiness probe |
| GET | /epoch |
Current epoch, slot, enrolled miners |
| GET | /api/stats |
Network statistics |
| GET | /api/miners |
Active miners with attestation data |
| GET | /api/hall_of_fame/leaderboard |
Hall of Fame leaderboard |
| GET | /api/fee_pool |
RIP-301 fee pool statistics |
| GET | /wallet/balance?miner_id=X |
Miner balance lookup |
| GET | /lottery/eligibility?miner_id=X |
Epoch eligibility check |
| GET | /explorer |
Block explorer HTML page |
| Method | Endpoint | Description |
|---|---|---|
| POST | /attest/submit |
Submit hardware attestation |
| POST | /wallet/transfer |
Admin transfer |
| POST | /wallet/transfer/signed |
Ed25519 signed transfer |
| POST | /withdraw/request |
Withdrawal request |
curl -sk https://rustchain.org/health | jq .Expected response:
{
"ok": true,
"uptime_s": 58480,
"version": "2.2.1-rip200",
"backup_age_hours": 13.65,
"db_rw": true,
"tip_age_slots": 0
}curl -sk https://rustchain.org/epoch | jq .Expected response:
{
"epoch": 91,
"slot": 13227,
"enrolled_miners": 20,
"blocks_per_epoch": 144,
"epoch_pot": 1.5,
"total_supply_rtc": 8388608
}curl -sk "https://rustchain.org/wallet/balance?miner_id=eafc6f14eab6d5c5362fe651e5e6c23581892a37RTC" | jq .Expected response:
{
"amount_i64": 150500000,
"amount_rtc": 150.5,
"miner_id": "eafc6f14eab6d5c5362fe651e5e6c23581892a37RTC"
}curl -sk -X POST https://rustchain.org/attest/submit \
-H "Content-Type: application/json" \
-H "X-Admin-Key: YOUR_ADMIN_KEY" \
-d '{
"miner_id": "your_miner_id",
"proof": {
"clock_skew": {"mean_ppm": 15.2, "std_ppm": 3.1},
"cache_timing": {"l1_latency_ns": 4.2, "l2_latency_ns": 12.5},
"simd_identity": {"has_avx2": false, "has_altivec": true},
"thermal_entropy": {"jitter_score": 0.85},
"instruction_jitter": {"fpu_jitter": 0.023, "int_jitter": 0.018},
"behavioral_heuristics": {"vm_detected": false, "hypervisor": null, "cpu_vendor": "Freescale"}
},
"signature": "base64_signature"
}' | jq .Run the validation script to verify the collection structure:
# Make executable
chmod +x validate_postman_collection.py
# Run validation
python3 validate_postman_collection.py
# Run with live API tests (optional)
python3 validate_postman_collection.py --live-testThe script will:
- Validate JSON syntax
- Check collection structure
- Verify environment variables
- Generate endpoint checklist
- Optionally test live endpoints
Use this checklist to verify all endpoints:
- GET
/health- Returns node health status - GET
/ready- Returns readiness status
- GET
/epoch- Returns current epoch info - GET
/api/stats- Returns network statistics - GET
/api/miners- Returns active miners list - GET
/api/hall_of_fame/leaderboard- Returns leaderboard
- GET
/api/fee_pool- Returns fee pool statistics
- GET
/wallet/balance?miner_id=X- Returns miner balance - GET
/lottery/eligibility?miner_id=X- Returns eligibility status
- GET
/explorer- Returns HTML explorer page
- POST
/attest/submit- Submits hardware attestation
- POST
/wallet/transfer- Executes admin transfer - POST
/wallet/transfer/signed- Executes signed transfer
- POST
/withdraw/request- Creates withdrawal request
| Variable | Type | Description |
|---|---|---|
base_url |
default | RustChain node base URL |
miner_id |
default | Your miner identifier |
admin_key |
secret | Admin API key for authenticated endpoints |
| Variable | Type | Description |
|---|---|---|
wallet_address |
default | Your wallet address |
recipient_address |
default | Recipient for transfers |
tx_payload |
default | Base64-encoded transaction payload |
signature |
secret | Ed25519 signature |
attestation_proof |
default | Hardware attestation proof JSON |
environment |
default | Environment name (production/staging) |
api_version |
default | API version string |
Test public endpoints first to verify connectivity:
- Health Check
- Readiness Probe
- Epoch Info
For authenticated endpoints, add a pre-request script to generate timestamps:
// Generate timestamp for nonce
pm.environment.set("timestamp", Math.floor(Date.now() / 1000));Store responses in variables for use in subsequent requests:
// Save miner_id from response
const jsonData = pm.response.json();
pm.environment.set("miner_id", jsonData.miner_id);Add test scripts to validate responses:
// Test status code
pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});
// Test response body
pm.test("Node is healthy", function () {
const jsonData = pm.response.json();
pm.expect(jsonData.ok).to.be.true;
});| Code | Meaning | Resolution |
|---|---|---|
| 400 | Bad Request | Check request body format |
| 401 | Unauthorized | Verify X-Admin-Key header |
| 404 | Not Found | Check miner_id or endpoint URL |
| 429 | Rate Limited | Wait and retry |
| 500 | Server Error | Contact node operator |
{
"error": "ERROR_CODE",
"message": "Human-readable error description",
"detail": "Additional error details (optional)"
}| Endpoint Type | Limit |
|---|---|
| Public endpoints | 100 requests/minute |
| Attestation | 1 per 10 minutes per miner |
| Transfers | 10 per minute per wallet |
- Never commit admin keys or signatures to version control
- Use Postman's secret type for sensitive variables
- Consider using Postman vault for team sharing
- Rotate admin keys periodically
- Ensure Postman v10.0 or later
- Verify JSON syntax:
python3 -m json.tool RustChain_API.postman_collection.json - Re-download the collection file
- Ensure environment is selected (top-right dropdown)
- Check variable names match exactly (case-sensitive)
- Verify variable values don't have extra whitespace
- Verify admin key is correct
- Check X-Admin-Key header is being sent
- Ensure environment is active
The RustChain node uses self-signed certificates. In Postman:
- Go to Settings → General
- Disable "SSL certificate verification"
- Or use
curl -skfor CLI testing
To add new endpoints:
- Add request to appropriate folder (or create new folder)
- Include example responses (success and error cases)
- Update this README with endpoint details
- Run validation script to verify structure
| Version | Date | Changes |
|---|---|---|
| 1.0.0 | 2026-03-11 | Initial complete collection (Issue #1617) |
This Postman collection is part of the RustChain project documentation.
Issue: rustchain-bounties #1617
Status: Complete
Validated: Yes