Add draft of listaddresses
This commit is contained in:
parent
4553f964f3
commit
675ca9d5e3
1 changed files with 67 additions and 2 deletions
|
@ -1,11 +1,12 @@
|
|||
{
|
||||
"openrpc": "1.0.0-rc1",
|
||||
"info": {
|
||||
"version": "0.1.0",
|
||||
"version": "0.7.0.0-beta",
|
||||
"title": "Zenith RPC",
|
||||
"description": "The RPC methods to interact with the Zenith Zcash wallet",
|
||||
"license": {
|
||||
"name": "MIT"
|
||||
"name": "MIT",
|
||||
"url": "https://choosealicense.com/licenses/mit/"
|
||||
}
|
||||
},
|
||||
"servers": [
|
||||
|
@ -146,6 +147,46 @@
|
|||
{ "$ref": "#/components/errors/ZebraNotAvailable" },
|
||||
{ "$ref": "#/components/errors/NoAccounts" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "listaddresses",
|
||||
"summary": "List existing addresses for an account ID",
|
||||
"description": "List existing addresses for the given account ID or provide an error if none",
|
||||
"tags": [{ "$ref": "#/components/tags/draft"} ],
|
||||
"result": {
|
||||
"name": "Addresses",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ZcashAddress"
|
||||
}
|
||||
}
|
||||
},
|
||||
"params": [{ "$ref": "#/components/contentDescriptors/AccountId"}],
|
||||
"paramStructure": "by-position",
|
||||
"examples": [
|
||||
{
|
||||
"name": "ListAddresses example",
|
||||
"summary": "Get list of addresses",
|
||||
"description": "Get the list of addresses available in Zenith for the given wallet ID",
|
||||
"params": [
|
||||
{
|
||||
"name": "accountId",
|
||||
"summary": "The integer ID of the account to use",
|
||||
"value": 1
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"name": "ListAddresses result",
|
||||
"value": [
|
||||
]
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"errors": [
|
||||
{ "$ref": "#/components/errors/NoAddress" }
|
||||
]
|
||||
}
|
||||
],
|
||||
"components": {
|
||||
|
@ -158,6 +199,15 @@
|
|||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"AccountId": {
|
||||
"name": "Account ID",
|
||||
"summary": "The account's internal index used for unique identification",
|
||||
"description": "An Integer value that uniquely identifies an account in Zenith",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"schemas": {
|
||||
|
@ -186,6 +236,17 @@
|
|||
"wallet": { "type": "integer", "description": "ID of the wallet this account belongs to"},
|
||||
"name": { "type": "string", "description": "User-friendly name of the account"}
|
||||
}
|
||||
},
|
||||
"ZcashAddress": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"index": { "type": "integer", "description": "Internal index for address"},
|
||||
"account": { "type": "integer", "description": "ID of the account this address belongs to"},
|
||||
"name": { "type": "string", "description": "User-friendly name of the address"},
|
||||
"ua": { "type": "string", "description": "Unified address"},
|
||||
"legacy": { "type": "string", "description": "Legacy Sapling address"},
|
||||
"transparent": { "type": "string", "description": "Transparent address"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"examples": {},
|
||||
|
@ -204,6 +265,10 @@
|
|||
"NoAccounts": {
|
||||
"code": -32002,
|
||||
"message": "No accounts available. Please create one first"
|
||||
},
|
||||
"NoAddress": {
|
||||
"code": -32003,
|
||||
"message": "No addresses available for this account. Please create one first"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue