Added getbalances endpoint documentations

This commit is contained in:
kexkey
2020-01-23 14:57:16 -05:00
parent 7fb2bf82c6
commit 29378aa12e
2 changed files with 48 additions and 0 deletions

View File

@@ -592,7 +592,25 @@ Proxy response:
}
```
### Get spending wallet's extended balances (called by application)
Calls getbalances RPC on the spending wallet.
```http
GET http://cyphernode:8888/getbalances
```
Proxy response:
```json
{
"mine": {
"trusted": 1.29979716,
"untrusted_pending": 0.00000000,
"immature": 0.00000000
}
}
```
### Get a new Bitcoin address from spending wallet (called by application)

View File

@@ -958,6 +958,29 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
/getbalances:
get:
tags:
- "spending wallet"
- "core features"
summary: "Get the spending wallet extended balances"
description: "Returns the spending wallet extended balances, in BTC."
operationId: "getSpendingWalletBalances"
responses:
'200':
description: "successful operation"
content:
application/json:
schema:
$ref: '#/components/schemas/Balances'
'403':
$ref: '#/components/schemas/ApiResponseNotAllowed'
'503':
description: "Resource temporarily unavailable"
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
/getbalancebyxpub/{xpub}:
get:
parameters:
@@ -2026,6 +2049,13 @@ components:
properties:
balance:
type: "number"
Balances:
type: "object"
required:
- "balances"
properties:
balances:
type: "object"
Block:
type: "object"
required: