Token Service API
Token validation and verification service providing blockchain data validation utilities. Used internally by other platform services for transaction processing.
Service Architecture
| Protocol | Port | Description |
|---|---|---|
| gRPC | 9098 | Primary API (Tonic/Prost) |
| HTTP | 8088 | REST endpoints and health checks |
REST Endpoints
Health
| Method | Path | Description |
|---|---|---|
GET | /health | Health check |
GET | /healthz | Liveness probe |
GET | /metrics | Prometheus metrics |
Validation Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/validate/hex/:value | Validate hex string format |
GET | /api/validate/block-height/:height | Validate block height parameter |
GET | /api/validate/tx-count/:count | Validate transaction count |
Validate Hex String
GET /api/validate/hex/0xa1b2c3d4e5f6
X-API-Key: your-api-keyResponse
{
"valid": true,
"value": "0xa1b2c3d4e5f6",
"bytes": 6
}Validate Block Height
GET /api/validate/block-height/12345678
X-API-Key: your-api-keyResponse
{
"valid": true,
"height": 12345678
}Authentication
Protected endpoints require API key authentication:
X-API-Key: your-api-keyRate Limiting
The Token service enforces rate limiting of 1000 requests per minute per API key.
gRPC Service
The Token service primarily operates via gRPC for internal platform communication. Contact support for gRPC proto definitions if building custom integrations.
Error Codes
| Code | Description |
|---|---|
INVALID_HEX | Hex string format is invalid |
INVALID_BLOCK_HEIGHT | Block height is out of valid range |
RATE_LIMITED | Request rate limit exceeded |