From 08efd45095cf3fa9f11bd90f7109d116d8345353 Mon Sep 17 00:00:00 2001 From: AdrianPaez Date: Mon, 4 Mar 2019 13:44:28 -0500 Subject: [PATCH] [spec] refs #6 - Add spec for POST /api/wallets --- spec.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/spec.yml b/spec.yml index 90f96f5..8206f8a 100644 --- a/spec.yml +++ b/spec.yml @@ -24,4 +24,31 @@ components: format: int64 message: type: string -paths: \ No newline at end of file +paths: + /api/wallets: + post: + summary: Create wallet method. + description: Should create a new wallet (address) in the blockchain. + + security: + - CsrfTokenAuth: [] + + responses: + '200': + description: The private key, public address and address context for the wallet created. + content: + application/json: + schema: + type: object + properties: + privateKey: + description: Private key, which will be used to sign transactions by the [POST] /api/sign + type: string + publicAddress: + description: Address which identifies the wallet in the blockchain + type: string + addressContext: + description: Any non security sensitive data associated with wallet. This context will be passed to [POST] /api/transactions/*. Can be empty. + type: string + default: + $ref : '#/components/schemas/genericError' \ No newline at end of file