diff --git a/zenith-openrpc.json b/zenith-openrpc.json index 1ca7b4f..1ec071a 100644 --- a/zenith-openrpc.json +++ b/zenith-openrpc.json @@ -240,9 +240,18 @@ "name": "listreceived", "summary": "List received transactions", "description": "List transactions received by the given address.", - "tags": [{"$ref": "#/components/tags/draft"}], - "params": [], - "result": {} + "tags": [{"$ref": "#/components/tags/draft"}, {"$ref": "#/components/tags/wip"}], + "params": [{ "$ref": "#/components/contentDescriptors/Address"}], + "paramStructure": "by-position", + "result": { + "name": "Transactions", + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserTx" + } + } + } }, { "name": "sendmany", @@ -280,6 +289,15 @@ "schema": { "type": "integer" } + }, + "Address": { + "name": "Address identifier", + "summary": "The address identifier", + "description": "A string that identifies a specific address, either by its index or the address itself", + "required": true, + "schema": { + "type": "string" + } } }, "schemas": { @@ -319,11 +337,27 @@ "legacy": { "type": "string", "description": "Legacy Sapling address"}, "transparent": { "type": "string", "description": "Transparent address"} } + }, + "ZcashNote": { + "type": "object", + "properties": { + "txid": { "type": "string", "description": "Transaction ID"}, + "pool": { "type": "string", "description": "Orchard, Sapling, or Transparent" }, + "amount" : { "type": "number", "description": "The amount of the note in ZEC"}, + "amountZats": { "type": "integer", "description": "The amount of the note in zats"}, + "memo": { "type": "string", "description": "The memo corresponding to the note, if any"}, + "confirmed": { "type": "boolean", "description": "If the note is confirmed per the thresholds in the configuration"}, + "blockheight": { "type": "integer", "description": "The block height containing the transaction"}, + "blocktime": { "type": "integer", "description": "The transaction time in seconds since epoch"}, + "outindex": { "type": "integer", "description": "The Sapling output index, or the Orchard action index"}, + "change": { "type": "boolean", "description": "True if this output was received by a change address"} + } } }, "examples": {}, "tags": { - "draft": {"name": "Draft"} + "draft": {"name": "Draft"}, + "wip": {"name": "WIP"} }, "errors": { "ZebraNotAvailable": { @@ -341,6 +375,10 @@ "NoAddress": { "code": -32003, "message": "No addresses available for this account. Please create one first" + }, + "UnknownAddress": { + "code": -32004, + "message": "Address does not belong to the wallet" } } }