Milestone 3: RPC server, ZIP-320 #104
1 changed files with 62 additions and 1 deletions
|
@ -91,10 +91,59 @@
|
||||||
{ "$ref": "#/components/errors/ZebraNotAvailable" },
|
{ "$ref": "#/components/errors/ZebraNotAvailable" },
|
||||||
{ "$ref": "#/components/errors/NoWallets" }
|
{ "$ref": "#/components/errors/NoWallets" }
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "listaccounts",
|
||||||
|
"tags": [ { "$ref": "#/components/tags/wallet" }],
|
||||||
|
"result": {
|
||||||
|
"name": "Accounts",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/ZcashAccount"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"params": [{ "$ref": "#/components/contentDescriptors/WalletId"}],
|
||||||
|
"paramStructure": "by-position",
|
||||||
|
"examples": [
|
||||||
|
{
|
||||||
|
"name": "ListAccounts example",
|
||||||
|
"summary": "Get list of accounts",
|
||||||
|
"description": "Get the list of accounts available in Zenith for the given wallet ID",
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "walletId",
|
||||||
|
"summary": "The integer ID of the wallet to use",
|
||||||
|
"value": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"name": "ListAccounts result",
|
||||||
|
"value": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"errors": [
|
||||||
|
{ "$ref": "#/components/errors/ZebraNotAvailable" },
|
||||||
|
{ "$ref": "#/components/errors/NoAccounts" }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"components": {
|
"components": {
|
||||||
"contentDescriptors": {},
|
"contentDescriptors": {
|
||||||
|
"WalletId": {
|
||||||
|
"name": "Wallet ID",
|
||||||
|
"summary": "The wallet's internal index used for unique identification",
|
||||||
|
"description": "An Integer value that uniquely identifies a wallet in Zenith",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"schemas": {
|
"schemas": {
|
||||||
"ZenithInfo": {
|
"ZenithInfo": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
@ -113,6 +162,14 @@
|
||||||
"birthday": { "type": "integer", "description": "Wallet's birthday height" },
|
"birthday": { "type": "integer", "description": "Wallet's birthday height" },
|
||||||
"lastSync": { "type": "integer", "description": "Last block the wallet is synced to" }
|
"lastSync": { "type": "integer", "description": "Last block the wallet is synced to" }
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"ZcashAccount": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"index": { "type": "integer", "description": "Internal index for account"},
|
||||||
|
"wallet": { "type": "integer", "description": "ID of the wallet this account belongs to"},
|
||||||
|
"name": { "type": "string", "description": "User-friendly name of the account"}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"examples": {},
|
"examples": {},
|
||||||
|
@ -128,6 +185,10 @@
|
||||||
"NoWallets": {
|
"NoWallets": {
|
||||||
"code": -32001,
|
"code": -32001,
|
||||||
"message": "No wallets available. Please create one first"
|
"message": "No wallets available. Please create one first"
|
||||||
|
},
|
||||||
|
"NoAccounts": {
|
||||||
|
"code": -32002,
|
||||||
|
"message": "No accounts available. Please create one first"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue