commit 47b4c292a77493d6ea6e9c207632a087867e8025 parent ea7f2170ae9ee5e1d8de1fc74544280c17a55cc9 Author: Christian Grothoff <grothoff@gnunet.org> Date: Thu, 31 Aug 2023 19:35:38 +0200 do not let client choose salt Diffstat:
| M | core/api-merchant.rst | | | 18 | +++++++++++++++--- |
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/core/api-merchant.rst b/core/api-merchant.rst @@ -1355,12 +1355,12 @@ into any of the active bank accounts of an instance. **Request:** - The request must be an `AccountAddDetails`. + The request must have an `AccountAddDetails` body. **Response:** - :http:statuscode:`204 No content`: - Adding the account was successful. + :http:statuscode:`200 Ok`: + Adding the account was successful, we return the salt selected by the backend and the resulting wire hash in an `AccountAddResponse`. :http:statuscode:`404 Not found`: The merchant instance is unknown or it is not in our data. :http:statuscode:`409 Conflict`: @@ -1419,6 +1419,18 @@ into any of the active bank accounts of an instance. password: string; }; + .. ts:def:: AccountAddResponse + + interface AccountAddResponse { + + // Hash over the wire details (including over the salt). + h_wire: HashCode; + + // Salt used to compute h_wire. + salt: HashCode; + + } + .. http:patch:: [/instances/$INSTANCE]/private/accounts/$H_WIRE