From 0d3dccf8ababeeb832cd34465211eea5b8b088d9 Mon Sep 17 00:00:00 2001 From: notanatol Date: Tue, 12 Mar 2024 12:16:25 -0600 Subject: [PATCH] feat: openapi specs --- openapi/SwarmCommon.yaml | 6 ++++++ openapi/SwarmDebug.yaml | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/openapi/SwarmCommon.yaml b/openapi/SwarmCommon.yaml index eccb03e9946..0566ea56b83 100644 --- a/openapi/SwarmCommon.yaml +++ b/openapi/SwarmCommon.yaml @@ -969,6 +969,12 @@ components: schema: type: string + WalletTxResponse: + properties: + transactionHash: + $ref: "#/components/schemas/TransactionHash" + type: object + parameters: GasPriceParameter: diff --git a/openapi/SwarmDebug.yaml b/openapi/SwarmDebug.yaml index 11d7b1a5fdb..5dd9db02869 100644 --- a/openapi/SwarmDebug.yaml +++ b/openapi/SwarmDebug.yaml @@ -689,6 +689,42 @@ paths: $ref: "SwarmCommon.yaml#/components/responses/500" default: description: Default response + + "/wallet/withdraw/{coin}": + get: + summary: Allows withdrawals of BZZ or xDAI to provided (whitelisted) address + tags: + - Wallet + parameters: + - in: query + name: amount + required: true + schema: + $ref: "#/components/schemas/BigInt" + - in: query + name: address + required: true + schema: + $ref: "#/components/schemas/EthereumAddress" + - in: path + name: coin + required: true + schema: + $ref: "#/components/schemas/SwarmAddress" + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/WalletTxResponse' + description: OK + "400": + $ref: "SwarmCommon.yaml#/components/responses/400" + description: Amount greater than ballance or coin is other than BZZ/xDAI + "500": + $ref: "SwarmCommon.yaml#/components/responses/500" + default: + description: Default response "/transactions": get: