From 0b7bf1db990dd66a28ba437c753d44fef0e94867 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Sat, 24 Aug 2024 08:59:26 -0500 Subject: [PATCH] Draft `getnewaccount` RPC --- zenith-openrpc.json | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/zenith-openrpc.json b/zenith-openrpc.json index 377ee1a..bd2afbb 100644 --- a/zenith-openrpc.json +++ b/zenith-openrpc.json @@ -190,14 +190,39 @@ "name": "getnewaccount", "summary": "Create a new account", "description": "Create a new account in the given wallet.", - "tags": [{"$ref": "#/components/tags/draft"}], - "params": [], + "tags": [{"$ref": "#/components/tags/draft"}, {"$ref": "#/components/tags/wip"}], + "params": [ + { "$ref": "#/components/contentDescriptors/Name"} + ], + "paramStructure": "by-position", "result": { "name": "Account", "schema": { "$ref": "#/components/contentDescriptors/AccountId" } - } + }, + "examples": [ + { + "name": "GetNewAccount example", + "summary": "Create an account", + "description": "Creates a new account with the given name", + "params": [ + { + "name": "Account name", + "summary": "The user-friendly name for the Account", + "value": "Personal" + } + ], + "result": { + "name": "GetNewAccount result", + "value": 1 + } + } + ], + "errors": [ + { "$ref": "#/components/errors/ZebraNotAvailable" }, + { "$ref": "#/components/errors/DuplicateName" } + ] }, { "name": "listaddresses",