Milestone 3: RPC server, ZIP-320 #104
1 changed files with 67 additions and 2 deletions
|
@ -1,11 +1,12 @@
|
||||||
{
|
{
|
||||||
"openrpc": "1.0.0-rc1",
|
"openrpc": "1.0.0-rc1",
|
||||||
"info": {
|
"info": {
|
||||||
"version": "0.1.0",
|
"version": "0.7.0.0-beta",
|
||||||
"title": "Zenith RPC",
|
"title": "Zenith RPC",
|
||||||
"description": "The RPC methods to interact with the Zenith Zcash wallet",
|
"description": "The RPC methods to interact with the Zenith Zcash wallet",
|
||||||
"license": {
|
"license": {
|
||||||
"name": "MIT"
|
"name": "MIT",
|
||||||
|
"url": "https://choosealicense.com/licenses/mit/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"servers": [
|
"servers": [
|
||||||
|
@ -146,6 +147,46 @@
|
||||||
{ "$ref": "#/components/errors/ZebraNotAvailable" },
|
{ "$ref": "#/components/errors/ZebraNotAvailable" },
|
||||||
{ "$ref": "#/components/errors/NoAccounts" }
|
{ "$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": {
|
"components": {
|
||||||
|
@ -158,6 +199,15 @@
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "integer"
|
"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": {
|
"schemas": {
|
||||||
|
@ -186,6 +236,17 @@
|
||||||
"wallet": { "type": "integer", "description": "ID of the wallet this account belongs to"},
|
"wallet": { "type": "integer", "description": "ID of the wallet this account belongs to"},
|
||||||
"name": { "type": "string", "description": "User-friendly name of the account"}
|
"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": {},
|
"examples": {},
|
||||||
|
@ -204,6 +265,10 @@
|
||||||
"NoAccounts": {
|
"NoAccounts": {
|
||||||
"code": -32002,
|
"code": -32002,
|
||||||
"message": "No accounts available. Please create one first"
|
"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