commit b5ba23dfe24c67676fc2284eed7912a14c941216
parent 57befcb34e1562f2c8cdde4856b2af3445faa7a9
Author: Antoine A <>
Date: Fri, 16 Jan 2026 14:57:20 +0100
common: add API implementation URN
Diffstat:
6 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/common/taler-api/src/api.rs b/common/taler-api/src/api.rs
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2025 Taler Systems SA
+ Copyright (C) 2025, 2026 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free Software
@@ -46,7 +46,7 @@ pub use axum::Router;
pub trait TalerApi: Send + Sync + 'static {
fn currency(&self) -> &str;
- fn implementation(&self) -> Option<&str>;
+ fn implementation(&self) -> &'static str;
fn check_currency(&self, amount: &Amount) -> ApiResult<()> {
let currency = self.currency();
if amount.currency.as_ref() != currency {
diff --git a/common/taler-api/src/api/revenue.rs b/common/taler-api/src/api/revenue.rs
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2025 Taler Systems SA
+ Copyright (C) 2025, 2026 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free Software
@@ -68,7 +68,7 @@ pub fn router<I: Revenue>(state: Arc<I>, auth: AuthMethod) -> Router {
name: "taler-revenue",
version: REVENUE_API_VERSION,
currency: state.currency(),
- implementation: state.implementation(),
+ implementation: Some(state.implementation()),
})
.into_response()
}),
diff --git a/common/taler-api/src/api/wire.rs b/common/taler-api/src/api/wire.rs
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2025 Taler Systems SA
+ Copyright (C) 2025, 2026 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free Software
@@ -194,7 +194,7 @@ pub fn router<I: WireGateway>(state: Arc<I>, auth: AuthMethod) -> Router {
name: "taler-wire-gateway",
version: WIRE_GATEWAY_API_VERSION,
currency: state.currency(),
- implementation: state.implementation(),
+ implementation: Some(state.implementation()),
support_account_check: state.support_account_check(),
})
.into_response()
diff --git a/common/taler-api/tests/common/mod.rs b/common/taler-api/tests/common/mod.rs
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2024-2025 Taler Systems SA
+ Copyright (C) 2024, 2025, 2026 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free Software
@@ -54,8 +54,8 @@ impl TalerApi for TestApi {
self.currency.as_ref()
}
- fn implementation(&self) -> Option<&str> {
- None
+ fn implementation(&self) -> &'static str {
+ "urn:net:taler:specs:taler-test-api:taler-rust"
}
}
diff --git a/taler-cyclos/src/api.rs b/taler-cyclos/src/api.rs
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2025 Taler Systems SA
+ Copyright (C) 2025, 2026 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free Software
@@ -88,8 +88,8 @@ impl TalerApi for CyclosApi {
self.currency.as_ref()
}
- fn implementation(&self) -> Option<&str> {
- Some("taler-cyclos")
+ fn implementation(&self) -> &'static str {
+ "urn:net:taler:specs:taler-cyclos:taler-rust"
}
}
diff --git a/taler-magnet-bank/src/api.rs b/taler-magnet-bank/src/api.rs
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2025 Taler Systems SA
+ Copyright (C) 2025, 2026 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free Software
@@ -79,8 +79,8 @@ impl TalerApi for MagnetApi {
CURRENCY.as_ref()
}
- fn implementation(&self) -> Option<&str> {
- Some("taler-magnet-bank")
+ fn implementation(&self) -> &'static str {
+ "urn:net:taler:specs:taler-magnet-bank:taler-rust"
}
}