Support for Bitcoin Core labels for watched and new addresses

This commit is contained in:
kexkey
2021-08-08 14:47:28 -04:00
parent 80f17d9176
commit 2e60b91a6a
10 changed files with 170 additions and 18 deletions

View File

@@ -62,6 +62,9 @@ paths:
eventMessage:
description: "Will be part of the published message on confirmations"
type: "string"
label:
description: "Label for this address that will be imported in Bitcoin Core"
type: "string"
responses:
'200':
description: "successfully created"
@@ -1096,8 +1099,16 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
/getnewaddress:
/getnewaddress/{address_type}:
get:
parameters:
- in: "path"
name: "address_type"
description: "Address type"
required: false
schema:
type: "string"
enum: ["legacy", "p2sh-segwit", "bech32"]
tags:
- "spending wallet"
- "core features"
@@ -1114,6 +1125,57 @@ paths:
properties:
address:
$ref: '#/components/schemas/TypeAddressString'
address_type:
type: "string"
enum: ["legacy", "p2sh-segwit", "bech32"]
'403':
$ref: '#/components/schemas/ApiResponseNotAllowed'
'503':
description: "Resource temporarily unavailable"
content:
application/json:
schema:
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
/getnewaddress:
post:
tags:
- "spending wallet"
- "core features"
summary: "Generates a new address on the spending wallet"
description: "Generates a new address on the spending wallet. Useful to refill the spending wallet from cold wallet (ie Trezor)."
operationId: "getSpendingWalletNewAddress"
requestBody:
description: "Bitcoin address properties"
required: false
content:
application/json:
schema:
type: "object"
properties:
address_type:
type: "string"
enum: ["legacy", "p2sh-segwit", "bech32"]
label:
type: "string"
responses:
'200':
description: "successfully got an address"
content:
application/json:
schema:
type: "object"
required:
- "address"
properties:
address:
$ref: '#/components/schemas/TypeAddressString'
address_type:
type: "string"
enum: ["legacy", "p2sh-segwit", "bech32"]
label:
type: "string"
'400':
$ref: '#/components/schemas/ApiResponseInvalidInput'
'403':
$ref: '#/components/schemas/ApiResponseNotAllowed'
'503':
@@ -2491,6 +2553,7 @@ components:
- "unconfirmedCallbackURL"
- "confirmedCallbackURL"
- "eventMessage"
- "label"
properties:
id:
type: "string"
@@ -2512,6 +2575,9 @@ components:
description: "Async callback in case of activity on address"
type: "string"
format: "url"
label:
description: "Label for this address that will be imported in Bitcoin Core"
type: "string"
estimatesmartfee2blocks:
type: "string"
estimatesmartfee6blocks: