From a42a6a69879208f8960384e4ecf2426bc467e67e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 4 Apr 2020 17:22:51 +0200 Subject: update docs --- core/api-merchant.rst | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'core/api-merchant.rst') diff --git a/core/api-merchant.rst b/core/api-merchant.rst index b9dac413..e60ea8b0 100644 --- a/core/api-merchant.rst +++ b/core/api-merchant.rst @@ -25,6 +25,22 @@ Merchant Backend API .. contents:: Table of Contents + +-------------------- +Compatibility Checks +-------------------- + +.. http:get:: /config + + Return the protocol version and currency supported by this merchant backend. + This endpoint is deprecated, clients should migrate to the (identical) + /public/version API. + + **Response:** + + :status 200 OK: + The exchange accepted all of the coins. The body is a `VersionResponse`. + ------------------ Receiving Payments ------------------ @@ -973,6 +989,27 @@ The ``/public/*`` endpoints are publicly exposed on the internet and accessed both by the user's browser and their wallet. +.. http:get:: /public/config + + Return the protocol version and currency supported by this merchant backend. + + **Response:** + + :status 200 OK: + The exchange accepted all of the coins. The body is a `VersionResponse`. + + .. ts:def:: VersionResponse + + interface VersionResponse { + // libtool-style representation of the Merchant protocol version, see + // https://www.gnu.org/software/libtool/manual/html_node/Versioning.html#Versioning + // The format is "current:revision:age". + version: string; + + // Currency supported by this backend. + currency: string; + } + .. http:post:: /public/pay Pay for a proposal by giving a deposit permission for coins. Typically used by -- cgit v1.2.3