From dcdf2e8304e01827e4bc85b7cd5fe27e53fbfc87 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Wed, 4 Sep 2024 09:17:12 -0500 Subject: [PATCH] Update to OpenRPC spec --- zenith-openrpc.json | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/zenith-openrpc.json b/zenith-openrpc.json index a6fc1c2..47a9da1 100644 --- a/zenith-openrpc.json +++ b/zenith-openrpc.json @@ -291,7 +291,7 @@ "name": "getnewaddress", "summary": "Add a new address", "description": "Derive a new address in the given account.", - "tags": [{"$ref": "#/components/tags/wip"}, {"$ref": "#/components/tags/draft"}], + "tags": [], "params": [ { "$ref": "#/components/contentDescriptors/AccountId"}, { "$ref": "#/components/contentDescriptors/Name"}, @@ -606,13 +606,18 @@ "name": "getoperationstatus", "summary": "Get the status of a Zenith operation", "description": "Get the status of the given operation", - "tags": [{"$ref": "#/components/tags/draft"}], - "params": [], + "tags": [{"$ref": "#/components/tags/wip"}, {"$ref": "#/components/tags/draft"}], + "params": [{ "$ref": "#/components/contentDescriptors/OperationId"}], + "paramStructure": "by-position", "result": { "name": "Operation status", "schema": { + "type": "string" } - } + }, + "errors": [ + { "$ref": "#/components/errors/OpNotFound" } + ] } ], "components": { @@ -670,7 +675,17 @@ "schema" : { "type": "string" } + }, + "OperationId": { + "name": "Operation ID", + "summary": "A unique identifier for Zenith operations", + "description": "A [UUID](http://en.wikipedia.org/wiki/UUID) assigned to an operation (like sending a transaction) that can be used to query Zenith to see the status and outcome of the operation.", + "required": true, + "schema" : { + "type": "string" + } } + }, "schemas": { "ZenithInfo": { @@ -776,6 +791,10 @@ "code": -32008, "message": "Wallet does not exist." }, + "OpNotFound": { + "code": -32009, + "message": "Operation ID not found." + }, "InternalError": { "code": -32010, "message": "Varies"