From 43b4eca8ec28fdb8e59704c54cf9f4b8c9cd1970 Mon Sep 17 00:00:00 2001 From: Daniel <10026790+dnlggr@users.noreply.github.com> Date: Wed, 20 Apr 2022 11:16:18 +0200 Subject: [PATCH] Add api docs --- docs/api/wallet-rpc.yaml | 89 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/docs/api/wallet-rpc.yaml b/docs/api/wallet-rpc.yaml index 56cf11d..e666755 100644 --- a/docs/api/wallet-rpc.yaml +++ b/docs/api/wallet-rpc.yaml @@ -343,6 +343,61 @@ paths: $ref: '#/components/responses/409-NoConfig' '503': $ref: '#/components/responses/503-ServiceUnavailable' + /wallet/{walletname}/taker/schedule: + post: + security: + - bearerAuth: [] + summary: create and run a schedule of transactions + operationId: runschedule + description: Creates and then starts a schedule of transactions. + parameters: + - name: walletname + in: path + description: name of wallet including .jmdat + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/RunScheduleRequest' + description: taker side schedule parameters + responses: + '202': + $ref: "#/components/responses/RunSchedule-202-OK" + '400': + $ref: '#/components/responses/400-BadRequest' + '401': + $ref: '#/components/responses/401-Unauthorized' + '404': + $ref: '#/components/responses/404-NotFound' + '409': + $ref: '#/components/responses/409-NoConfig' + '503': + $ref: '#/components/responses/503-ServiceUnavailable' + get: + security: + - bearerAuth: [] + summary: get the schedule that is currently running + operationId: getschedule + description: Get the current transaction schedule if one is running. + parameters: + - name: walletname + in: path + description: name of the wallet including .jmdat + required: true + schema: + type: string + responses: + '200': + $ref: "#/components/responses/GetSchedule-200-OK" + '400': + $ref: '#/components/responses/400-BadRequest' + '401': + $ref: "#/components/responses/401-Unauthorized" + '404': + $ref: '#/components/responses/404-NotFound' /wallet/{walletname}/taker/stop: get: security: @@ -545,7 +600,16 @@ components: destination: type: string example: "bcrt1qujp2x2fv437493sm25gfjycns7d39exjnpptzw" - + RunScheduleRequest: + type: object + required: + - destinations + properties: + destinations: + type: array + items: + type: string + example: "bcrt1qujp2x2fv437493sm25gfjycns7d39exjnpptzw" StartMakerRequest: type: object required: @@ -762,6 +826,17 @@ components: properties: seedphrase: type: string + GetScheduleResponse: + type: object + required: + - schedule + properties: + schedule: + type: array + items: + oneOf: + - type: string + - type: integer LockWalletResponse: type: object required: @@ -902,6 +977,18 @@ components: application/json: schema: $ref: "#/components/schemas/FreezeResponse" + RunSchedule-202-OK: + description: "schedule started successfully" + content: + application/json: + schema: + $ref: "#/components/schemas/GetScheduleResponse" + GetSchedule-200-OK: + description: "schedule retrieved successfully" + content: + application/json: + schema: + $ref: "#/components/schemas/GetScheduleResponse" YieldGenReport-200-OK: description: "get list of coinjoins taken part in as maker (across all wallets)" content: