Implements Phase 2 REST API foundation: - Unified gateway server with Axum web framework - Complete REST endpoints for all services: - Wallet (create, import, balance, sign, transactions) - RPC (blocks, transactions, network, mempool) - Storage (upload, download, pinning, CAR files) - DEX (markets, orders, pools, liquidity) - IBC (chains, channels, transfers, packets) - ZK (circuits, proofs, ceremonies) - Compiler (compile, ABI, analysis, validation) - Authentication (JWT + API key) - Rate limiting with tiered access - CORS, security headers, request tracing - Health check endpoints - OpenAPI documentation scaffolding
70 lines
1.9 KiB
TOML
70 lines
1.9 KiB
TOML
[package]
|
|
name = "synor-gateway"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "Unified REST API gateway for Synor blockchain services"
|
|
license = "MIT OR Apache-2.0"
|
|
repository = "https://github.com/synortech/synor"
|
|
keywords = ["blockchain", "api", "gateway", "rest"]
|
|
categories = ["web-programming", "api-bindings"]
|
|
|
|
[features]
|
|
default = ["openapi"]
|
|
openapi = ["dep:utoipa", "dep:utoipa-swagger-ui"]
|
|
full = ["openapi"]
|
|
|
|
[dependencies]
|
|
# Web framework
|
|
axum = { version = "0.7", features = ["macros", "ws"] }
|
|
axum-extra = { version = "0.9", features = ["typed-header"] }
|
|
tower = { version = "0.4", features = ["full"] }
|
|
tower-http = { version = "0.5", features = ["cors", "trace", "compression-gzip", "limit", "request-id", "timeout"] }
|
|
hyper = { version = "1.0", features = ["full"] }
|
|
hyper-util = { version = "0.1", features = ["full"] }
|
|
|
|
# Async runtime
|
|
tokio = { version = "1.35", features = ["full"] }
|
|
futures = "0.3"
|
|
|
|
# Serialization
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
|
|
# OpenAPI documentation
|
|
utoipa = { version = "4.2", features = ["axum_extras"], optional = true }
|
|
utoipa-swagger-ui = { version = "6.0", features = ["axum"], optional = true }
|
|
|
|
# Authentication & Security
|
|
jsonwebtoken = "9.2"
|
|
blake3 = "1.5"
|
|
base64 = "0.21"
|
|
uuid = { version = "1.6", features = ["v4", "serde"] }
|
|
|
|
# Rate limiting
|
|
governor = "0.6"
|
|
|
|
# Tracing & Metrics
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
|
|
metrics = "0.22"
|
|
metrics-exporter-prometheus = "0.13"
|
|
|
|
# Error handling
|
|
thiserror = "1.0"
|
|
anyhow = "1.0"
|
|
|
|
# Time
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
humantime = "2.1"
|
|
|
|
# Configuration
|
|
config = "0.14"
|
|
|
|
# Internal dependencies
|
|
# synor-rpc = { path = "../synor-rpc" }
|
|
# synor-crypto = { path = "../synor-crypto" }
|
|
# synor-database = { path = "../synor-database" }
|
|
|
|
[dev-dependencies]
|
|
tokio-test = "0.4"
|
|
reqwest = { version = "0.11", features = ["json"] }
|