Add versioning and backend client-version answer.
MODIFY
WalletWasabi.Backend/Controllers/BlockchainController.cs
WalletWasabi.Backend/Controllers/BlockchainController.cs
@@ -17,7 +17,7 @@ namespace WalletWasabi.Backend.Controllers
/// To interact with the Bitcoin Blockchain.
/// </summary>
[Produces("application/json")]
- [Route("api/v1/btc/[controller]")]
+ [Route("api/v" + Helpers.Constants.BackendMajorVersion + "/btc/[controller]")]
public class BlockchainController : Controller
{
private IMemoryCache Cache { get; }

MODIFY
WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
WalletWasabi.Backend/Controllers/ChaumianCoinJoinController.cs
@@ -23,7 +23,7 @@ namespace WalletWasabi.Backend.Controllers
/// To interact with the Chaumian CoinJoin Coordinator.
/// </summary>
[Produces("application/json")]
- [Route("api/v1/btc/[controller]")]
+ [Route("api/v" + Helpers.Constants.BackendMajorVersion + "/btc/[controller]")]
public class ChaumianCoinJoinController : Controller
{
private static RPCClient RpcClient => Global.RpcClient;

MODIFY
WalletWasabi.Backend/Controllers/OffchainController.cs
WalletWasabi.Backend/Controllers/OffchainController.cs
@@ -13,7 +13,7 @@ namespace WalletWasabi.Backend.Controllers
/// To acquire offchain data.
/// </summary>
[Produces("application/json")]
- [Route("api/v1/btc/[controller]")]
+ [Route("api/v" + Helpers.Constants.BackendMajorVersion + "/btc/[controller]")]
public class OffchainController : Controller
{
private IMemoryCache Cache { get; }
@@ -52,5 +52,17 @@ namespace WalletWasabi.Backend.Controllers
return exchangeRates;
}
+
+ /// <summary>
+ /// Gets the latest version of the client.
+ /// </summary>
+ /// <returns>Version.</returns>
+ /// <response code="200">Version.</response>
+ [HttpGet("client-version")]
+ [ProducesResponseType(typeof(string), 200)]
+ public string GetClientVersion()
+ {
+ return Helpers.Constants.ClientVersion.ToString();
+ }
}
}

MODIFY
WalletWasabi.Gui/Tabs/AboutViewModel.cs
WalletWasabi.Gui/Tabs/AboutViewModel.cs
@@ -10,7 +10,7 @@ namespace WalletWasabi.Gui.Tabs
{
public AboutViewModel() : base("About")
{
- Version = new Version(0, 7);
+ Version = Helpers.Constants.ClientVersion;
}
public Version Version { get; }

Add versioning and backend client-version answer.