feat: GET /api/v1/capabilities (client feature discovery)

Public, unauthenticated description of what this deployment offers, so the
wallet can adapt to the instance it's pointed at — grey out disabled chains and
features, and pick the right network. This is the client-facing half of the
open-core/feature-flag design: every capability is a config switch, surfaced
here. No secrets — only on/off flags and public network names.

Response: { version, chains: { btc/ltc/xmr/wow/grin: { enabled, network } },
features: { grin_relay, prices, nostr_identity, tips } }. UTXO chains carry
their configured network; CryptoNote/Grin report null. On the normal rate-limit
tier. Registered in openapi (system tag); 1 L1 test (public, well-shaped).
This commit is contained in:
jwinterm
2026-06-25 16:27:13 -04:00
parent c558e9d7bd
commit 1e2bdf3f16
6 changed files with 254 additions and 0 deletions
+5
View File
@@ -16,6 +16,7 @@ use utoipa::OpenApi;
),
paths(
crate::api::health::health,
crate::api::capabilities::capabilities,
crate::api::auth::pow_challenge,
crate::api::auth::extension_register,
crate::api::auth::check_restore,
@@ -59,6 +60,10 @@ use utoipa::OpenApi;
),
components(schemas(
crate::api::health::HealthResponse,
crate::api::capabilities::CapabilitiesResponse,
crate::api::capabilities::ChainCapabilities,
crate::api::capabilities::ChainCapability,
crate::api::capabilities::FeatureCapabilities,
crate::api::auth::AuthResponse,
crate::api::auth::UserInfo,
crate::api::auth::AssetPublicKey,