From 6af2d5ddb7d3177da901233df93001b9c3552762 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 5 Feb 2022 17:31:01 +0100 Subject: specify /csr --- core/api-exchange.rst | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) (limited to 'core') diff --git a/core/api-exchange.rst b/core/api-exchange.rst index 810dca72..75ed171a 100644 --- a/core/api-exchange.rst +++ b/core/api-exchange.rst @@ -1409,6 +1409,74 @@ exchange. } +.. http:post:: /csr + + Obtain exchange-side input values in preparation for a + withdraw step for certain denomination cipher types, + specifically at this point for Clause-Schnorr blind + signatures. + + **Request:** The request body must be a `WithdrawPrepareRequest` object. + + **Response:** + + :http:statuscode:`200 OK`: + The request was successful, and the response is a `WithdrawPrepareResponse`. Note that repeating exactly the same request + will again yield the same response (assuming none of the denomination is expired). + :http:statuscode:`404 Not found`: + The denomination key is not known to the exchange. + :http:statuscode:`410 Gone`: + The requested denomination key is not yet or no longer valid. + It either before the validity start, past the expiration or was revoked. The response is a + `DenominationExpiredMessage`. Clients must evaluate + the error code provided to understand which of the + cases this is and handle it accordingly. + + **Details:** + + .. ts:def:: WithdrawPrepareRequest + + interface WithdrawPrepareRequest { + + nks: WithdrawPrepareDenomNonce[]; + + } + + .. ts:def:: WithdrawPrepareDenomNonce + + interface WithdrawPrepareDenomNonce { + + // Random client-side nonce + nonce: FIXME; + + // Hash of the public key of the denomination the + // request relates to. + denom_pub_hash: Hash; + } + + + .. ts:def:: WithdrawPrepareResponse + + interface WithdrawPrepareResponse { + // Responses for each request, in the same + // order that was used in the request. + ewvs: ExchangeWithdrawValue[]; + } + + .. ts:def:: ExchangeWithdrawValue + + interface ExchangeWithdrawValue { + + // CSR R0 value + r_pub_0: FIXME; + + // CSR R1 value + r_pub_1: FIXME; + } + + + + .. http:post:: /reserves/$RESERVE_PUB/withdraw Withdraw a coin of the specified denomination. Note that the client should -- cgit v1.2.3