mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-27 01:25:49 +01:00
1013 lines
31 KiB
YAML
1013 lines
31 KiB
YAML
openapi: 3.0.0
|
|
info:
|
|
description: "Cyphernode API v0"
|
|
version: "0.1.0"
|
|
title: "Cyphernode API"
|
|
externalDocs:
|
|
description: "Find out more about Swagger"
|
|
url: "http://swagger.io"
|
|
servers:
|
|
- url: /v0
|
|
description: authoring
|
|
- url: http://localhost:8888/v0
|
|
description: local cyphernode
|
|
security:
|
|
- BearerAuth: []
|
|
tags:
|
|
- name: "cyphernode"
|
|
description: "Everything bitcoin"
|
|
externalDocs:
|
|
description: "Find out more"
|
|
url: "http://cyphernode.io"
|
|
- name: "openapi generator"
|
|
externalDocs:
|
|
description: "Find out more"
|
|
url: "https://github.com/OpenAPITools/openapi-generator"
|
|
- name: "watching addresses"
|
|
- name: "block"
|
|
- name: "transaction"
|
|
- name: "spending wallet"
|
|
- name: "addresses"
|
|
- name: "lightning"
|
|
- name: "open timestamps client"
|
|
- name: "core features"
|
|
- name: "optional features"
|
|
paths:
|
|
/watch:
|
|
post:
|
|
tags:
|
|
- "watching addresses"
|
|
- "core features"
|
|
summary: "Add a new Bitcoin address to be watched"
|
|
description: "Inserts the Bitcoin address and callbacks in the DB and imports the address to the Watching wallet."
|
|
operationId: "addWatchedAddress"
|
|
requestBody:
|
|
description: "Bitcoin address that needs to be watched"
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
required:
|
|
- "address"
|
|
- "confirmedCallbackURL"
|
|
- "unconfirmedCallbackURL"
|
|
properties:
|
|
address:
|
|
$ref: '#/components/schemas/TypeAddressString'
|
|
unconfirmedCallbackURL:
|
|
type: "string"
|
|
format: "url"
|
|
confirmedCallbackURL:
|
|
type: "string"
|
|
format: "url"
|
|
responses:
|
|
'200':
|
|
description: "successfully created"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/WatchedAddress'
|
|
'400':
|
|
$ref: '#/components/schemas/ApiResponseInvalidInput'
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/getactivewatches:
|
|
get:
|
|
tags:
|
|
- "watching addresses"
|
|
- "core features"
|
|
summary: "Get list of watched Bitcoin addresses"
|
|
description: "Returns the list of currently watched Bitcoin addresses and callback information."
|
|
operationId: "listWatchedAddress"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
required:
|
|
- "watched"
|
|
properties:
|
|
watches:
|
|
type: "array"
|
|
items:
|
|
$ref: '#/components/schemas/WatchedAddress'
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/unwatch/{address}:
|
|
get:
|
|
parameters:
|
|
- in: "path"
|
|
name: "address"
|
|
description: "Address"
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/TypeAddressString'
|
|
tags:
|
|
- "watching addresses"
|
|
- "core features"
|
|
summary: "Stop watching a Bitcoin address"
|
|
description: "Updates the watched Bitcoin address row in DB so that callbacks won't be called on tx confirmations for that address."
|
|
operationId: "deleteWatchedAddress"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
properties:
|
|
event:
|
|
type: "string"
|
|
address:
|
|
$ref: '#/components/schemas/TypeAddressString'
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'404':
|
|
$ref: '#/components/schemas/ApiResponseNotFound'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/getbestblockhash:
|
|
get:
|
|
tags:
|
|
- "block"
|
|
- "core features"
|
|
summary: "Get the best block hash."
|
|
description: "Returns the best block hash of the watching Bitcoin node."
|
|
operationId: "getBestBlockHash"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
required:
|
|
- "result"
|
|
properties:
|
|
result:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
error:
|
|
type: "string"
|
|
id:
|
|
type: "string"
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/getblockchaininfo:
|
|
get:
|
|
tags:
|
|
- "stats"
|
|
- "core features"
|
|
summary: "Show blockchain info"
|
|
description: "Returns detailed blockchain information."
|
|
operationId: "getBlockchainInfo"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/BlockchainInfo'
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'404':
|
|
$ref: '#/components/schemas/ApiResponseNotFound'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/getblockinfo/{blockHash}:
|
|
get:
|
|
parameters:
|
|
- in: "path"
|
|
name: "blockHash"
|
|
description: "Blockhash"
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
tags:
|
|
- "block"
|
|
- "core features"
|
|
summary: "Show block info"
|
|
description: "Returns detailed block information."
|
|
operationId: "getBlockInfo"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
properties:
|
|
result:
|
|
$ref: '#/components/schemas/Block'
|
|
error:
|
|
type: "string"
|
|
id:
|
|
type: "string"
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'404':
|
|
$ref: '#/components/schemas/ApiResponseNotFound'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/getbestblockinfo:
|
|
get:
|
|
tags:
|
|
- "block"
|
|
- "core features"
|
|
summary: "Get the best block info"
|
|
description: "Returns detailed block information for current best block."
|
|
operationId: "getBestBlockInfo"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
properties:
|
|
result:
|
|
$ref: '#/components/schemas/Block'
|
|
error:
|
|
type: "string"
|
|
id:
|
|
type: "string"
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/gettransaction/{transactionHash}:
|
|
get:
|
|
parameters:
|
|
- in: "path"
|
|
name: "transactionHash"
|
|
description: "Transaction id"
|
|
required: true
|
|
schema:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
tags:
|
|
- "transaction"
|
|
- "core features"
|
|
summary: "Get transaction info"
|
|
description: "Returns detailed transaction information."
|
|
operationId: "getTransactionInfo"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
properties:
|
|
result:
|
|
$ref: '#/components/schemas/Transaction'
|
|
error:
|
|
type: "string"
|
|
id:
|
|
type: "string"
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'404':
|
|
$ref: '#/components/schemas/ApiResponseNotFound'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/getbalance:
|
|
get:
|
|
tags:
|
|
- "spending wallet"
|
|
- "core features"
|
|
summary: "Get the spending wallet balance"
|
|
description: "Returns the spending wallet balance, in BTC."
|
|
operationId: "getSpendingWalletBalance"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
properties:
|
|
balance:
|
|
type: "number"
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/getnewaddress:
|
|
get:
|
|
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"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
properties:
|
|
address:
|
|
$ref: '#/components/schemas/TypeAddressString'
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/spend:
|
|
post:
|
|
tags:
|
|
- "spending wallet"
|
|
- "core features"
|
|
summary: "Spend some amount to some address"
|
|
description: "Calls sendtoaddress RPC on the spending wallet with supplied info."
|
|
operationId: "spend"
|
|
requestBody:
|
|
description: "Address and amount"
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
required:
|
|
- "address"
|
|
- "amount"
|
|
properties:
|
|
address:
|
|
$ref: '#/components/schemas/TypeAddressString'
|
|
amount:
|
|
type: "number"
|
|
responses:
|
|
'200':
|
|
description: "operation successful"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
required:
|
|
- "status"
|
|
- "hash"
|
|
properties:
|
|
status:
|
|
type: "string"
|
|
hash:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'405':
|
|
$ref: '#/components/schemas/ApiResponseInvalidInput'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/addtobatch:
|
|
post:
|
|
tags:
|
|
- "spending wallet"
|
|
- "core features"
|
|
summary: "Adds spending of some amount to some address to the next batch"
|
|
description: "Inserts output information in the DB. Used when batchspend is called later."
|
|
operationId: "spendInNextBatch"
|
|
requestBody:
|
|
description: "Address and amount"
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
required:
|
|
- "address"
|
|
- "amount"
|
|
properties:
|
|
address:
|
|
$ref: '#/components/schemas/TypeAddressString'
|
|
amount:
|
|
type: "number"
|
|
responses:
|
|
'200':
|
|
description: "operation successful"
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'405':
|
|
$ref: '#/components/schemas/ApiResponseInvalidInput'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/batchspend:
|
|
get:
|
|
tags:
|
|
- "spending wallet"
|
|
- "core features"
|
|
summary: "Spend previously amounts/addresses added with addtobatch"
|
|
description: "Creates a batched transaction whose outputs are the previously unspent addtobatch calls."
|
|
operationId: "batchSpend"
|
|
responses:
|
|
'200':
|
|
description: "operation successful"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
required:
|
|
- "status"
|
|
- "hash"
|
|
properties:
|
|
status:
|
|
type: "string"
|
|
hash:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
'400':
|
|
$ref: '#/components/schemas/ApiResponseInvalidInput'
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/deriveindex/{indexSpecifier}:
|
|
get:
|
|
parameters:
|
|
- in: "path"
|
|
name: "indexSpecifier"
|
|
description: "Index specifier. Either an integer or a range in the form n-m"
|
|
required: true
|
|
schema:
|
|
type: "string"
|
|
tags:
|
|
- "addresses"
|
|
- "core features"
|
|
summary: "Derive address(es) using configured xpub key and derivation path"
|
|
description: "Derives address(es) for supplied index. Must be used with derivation.pub32 and derivation.path properties in config.properties."
|
|
operationId: "deriveIndex"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
properties:
|
|
addresses:
|
|
type: "array"
|
|
items:
|
|
type: "object"
|
|
required:
|
|
- "address"
|
|
properties:
|
|
address:
|
|
$ref: '#/components/schemas/TypeAddressString'
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/derivepubpath:
|
|
post:
|
|
tags:
|
|
- "addresses"
|
|
- "core features"
|
|
summary: "Derive address(es) using supplied xpub key and derivation path"
|
|
description: "Derives address(es) for supplied pub32 and path. config.properties' derivation.pub32 and derivation.path are not used."
|
|
operationId: "derivePubPath"
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
required:
|
|
- "pub32"
|
|
- "path"
|
|
properties:
|
|
pub32:
|
|
description: "xpub/ypub/zpub/tpub/upub/vpub used to derive address(es)"
|
|
type: "string"
|
|
path:
|
|
description: "Derivation path including the index, in the form n or n-m (ex.: 0/44'/86 or 0/44'/62-77)"
|
|
type: "string"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
properties:
|
|
addresses:
|
|
type: "array"
|
|
items:
|
|
type: "object"
|
|
required:
|
|
- "address"
|
|
properties:
|
|
address:
|
|
$ref: '#/components/schemas/TypeAddressString'
|
|
'400':
|
|
$ref: '#/components/schemas/ApiResponseInvalidInput'
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/ln_getinfo:
|
|
get:
|
|
tags:
|
|
- "lightning"
|
|
- "optional features"
|
|
summary: "Get lightning node info"
|
|
description: "Calls getinfo from lightningd. Useful to let your users know where to connect to."
|
|
operationId: "lightningGetNodeInfo"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
properties:
|
|
id:
|
|
type: "string"
|
|
alias:
|
|
type: "string"
|
|
color:
|
|
$ref: '#/components/schemas/TypeInt32HexString'
|
|
version:
|
|
type: "string"
|
|
blockheight:
|
|
type: "integer"
|
|
network:
|
|
type: "string"
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/ln_create_invoice:
|
|
post:
|
|
tags:
|
|
- "lightning"
|
|
- "optional features"
|
|
summary: "Create lightning invoice"
|
|
description: "Returns a LN invoice. Label must be unique. Description will be used by your user for payment. Expiry is in seconds."
|
|
operationId: "lightningCreateInvoice"
|
|
requestBody:
|
|
description: "Information to create invoice"
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
required:
|
|
- "msatoshi"
|
|
- "label"
|
|
- "description"
|
|
- "expiry"
|
|
properties:
|
|
msatoshi:
|
|
type: "integer"
|
|
label:
|
|
type: "string"
|
|
description:
|
|
type: "string"
|
|
expiry:
|
|
type: "integer"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
properties:
|
|
payment_hash:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
expires_at:
|
|
type: "integer"
|
|
bolt11:
|
|
type: "string"
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/ln_pay:
|
|
post:
|
|
tags:
|
|
- "lightning"
|
|
- "optional features"
|
|
summary: "Pay lightning invoice"
|
|
description: "Make a LN payment. expected_msatoshi and expected_description are respectively the amount and description you gave your user for her to create the invoice; they must match the given bolt11 invoice supplied by your user."
|
|
operationId: "lightningPayInvoice"
|
|
requestBody:
|
|
description: "Information to pay invoice"
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
required:
|
|
- "bolt11"
|
|
- "expected_msatoshi"
|
|
- "expected_description"
|
|
properties:
|
|
bolt11:
|
|
type: "string"
|
|
expected_msatoshi:
|
|
type: "integer"
|
|
expected_description:
|
|
type: "string"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
properties:
|
|
id:
|
|
type: "integer"
|
|
payment_hash:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
msatoshi:
|
|
type: "integer"
|
|
msatoshi_sent:
|
|
type: "integer"
|
|
created_at:
|
|
type: "integer"
|
|
status:
|
|
type: "string"
|
|
payment_preimage:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
description:
|
|
type: "string"
|
|
getroute_tries:
|
|
type: "integer"
|
|
sendpay_tries:
|
|
type: "integer"
|
|
route:
|
|
type: "array"
|
|
items:
|
|
type: "object"
|
|
properties:
|
|
id:
|
|
type: "string"
|
|
channel:
|
|
type: "string"
|
|
msatoshi:
|
|
type: "integer"
|
|
delay:
|
|
type: "integer"
|
|
failures:
|
|
type: "array"
|
|
items:
|
|
type: "object"
|
|
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
/ln_newaddr:
|
|
get:
|
|
tags:
|
|
- "lightning"
|
|
- "optional features"
|
|
summary: "Generates new address from the lightning node"
|
|
description: "Returns a Bitcoin bech32 address to fund your LN wallet."
|
|
operationId: "lightningGetNewAddress"
|
|
responses:
|
|
'200':
|
|
description: "successful operation"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: "object"
|
|
properties:
|
|
address:
|
|
type: "string"
|
|
'401':
|
|
$ref: '#/components/schemas/ApiResponseNotAllowed'
|
|
'503':
|
|
description: "Resource temporarily unavailable"
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
|
components:
|
|
schemas:
|
|
WatchedAddress:
|
|
type: "object"
|
|
required:
|
|
- "address"
|
|
- "unconfirmedCallbackURL"
|
|
- "confirmedCallbackURL"
|
|
properties:
|
|
id:
|
|
type: "string"
|
|
event:
|
|
type: "string"
|
|
imported:
|
|
type: "string"
|
|
enum: ["0","1"]
|
|
inserted:
|
|
type: "string"
|
|
enum: ["0","1"]
|
|
address:
|
|
$ref: '#/components/schemas/TypeAddressString'
|
|
unconfirmedCallbackURL:
|
|
description: "Async callback in case of activity on address"
|
|
type: "string"
|
|
format: "url"
|
|
confirmedCallbackURL:
|
|
description: "Async callback in case of activity on address"
|
|
type: "string"
|
|
format: "url"
|
|
estimatesmartfee2blocks:
|
|
type: "string"
|
|
estimatesmartfee6blocks:
|
|
type: "string"
|
|
estimatesmartfee36blocks:
|
|
type: "string"
|
|
estimatesmartfee144blocks:
|
|
type: "string"
|
|
watching_since:
|
|
type: "string"
|
|
Block:
|
|
type: "object"
|
|
required:
|
|
- "address"
|
|
- "callback"
|
|
properties:
|
|
id:
|
|
type: "integer"
|
|
hash:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
confirmations:
|
|
type: "integer"
|
|
strippedsize:
|
|
type: "integer"
|
|
size:
|
|
type: "integer"
|
|
weight:
|
|
type: "integer"
|
|
height:
|
|
type: "integer"
|
|
version:
|
|
type: "integer"
|
|
versionHex:
|
|
$ref: '#/components/schemas/TypeInt32HexString'
|
|
merkleroot:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
tx:
|
|
type: "array"
|
|
items:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
time:
|
|
type: "integer"
|
|
mediantime:
|
|
type: "integer"
|
|
nonce:
|
|
type: "integer"
|
|
bits:
|
|
$ref: '#/components/schemas/TypeInt32HexString'
|
|
difficulty:
|
|
type: 'integer'
|
|
chainwork:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
nTx:
|
|
type: 'integer'
|
|
previousblockhash:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
nextblockhash:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
Transaction:
|
|
type: "object"
|
|
properties:
|
|
txid:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
hash:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
version:
|
|
type: "integer"
|
|
size:
|
|
type: "integer"
|
|
vsize:
|
|
type: "integer"
|
|
locktime:
|
|
type: "integer"
|
|
vin:
|
|
type: "array"
|
|
items:
|
|
$ref: '#/components/schemas/Input'
|
|
vout:
|
|
type: "array"
|
|
items:
|
|
$ref: '#/components/schemas/Output'
|
|
hex:
|
|
$ref: '#/components/schemas/TypeHexString'
|
|
blockhash:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
confirmations:
|
|
type: "integer"
|
|
time:
|
|
type: "integer"
|
|
blocktime:
|
|
type: "integer"
|
|
BlockchainInfo:
|
|
type: "object"
|
|
properties:
|
|
chain:
|
|
type: "string"
|
|
enum: ["test", "main"]
|
|
blocks:
|
|
type: "integer"
|
|
headers:
|
|
type: "integer"
|
|
bestblockhash:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
difficulty:
|
|
type: "number"
|
|
mediantime:
|
|
type: "integer"
|
|
verificationprogress:
|
|
type: "number"
|
|
initialblockdownload:
|
|
type: "boolean"
|
|
chainwork:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
size_on_disk:
|
|
type: "integer"
|
|
pruned:
|
|
type: "boolean"
|
|
warnings:
|
|
type: "string"
|
|
softforks:
|
|
type: "array"
|
|
items:
|
|
$ref: '#/components/schemas/TypeSoftFork'
|
|
bip9_softforks:
|
|
type: "object"
|
|
additionalProperties:
|
|
$ref: '#/components/schemas/TypeBip9SoftFork'
|
|
Input:
|
|
type: "object"
|
|
properties:
|
|
txid:
|
|
$ref: '#/components/schemas/TypeHashString'
|
|
vout:
|
|
type: "integer"
|
|
scriptSig:
|
|
type: "object"
|
|
properties:
|
|
asm:
|
|
type: "string"
|
|
hex:
|
|
$ref: '#/components/schemas/TypeHexString'
|
|
Output:
|
|
type: "object"
|
|
properties:
|
|
value:
|
|
type: "number"
|
|
n:
|
|
type: "integer"
|
|
scriptPubKey:
|
|
type: "object"
|
|
properties:
|
|
asm:
|
|
type: "string"
|
|
hex:
|
|
$ref: '#/components/schemas/TypeHexString'
|
|
reqSigs:
|
|
type: "integer"
|
|
type:
|
|
type: "string"
|
|
addresses:
|
|
type: "array"
|
|
items:
|
|
$ref: '#/components/schemas/TypeAddressString'
|
|
TypeHexString:
|
|
description: "variable length hex string"
|
|
type: "string"
|
|
pattern: "^[a-fA-F0-9]+$"
|
|
TypeAddressString:
|
|
description: "base58 check encoded address"
|
|
type: "string"
|
|
pattern: "^[a-km-zA-HJ-NP-Z1-9]{26,35}$"
|
|
TypeHashString:
|
|
description: "64 character hex string"
|
|
type: "string"
|
|
pattern: "^[a-fA-F0-9]{64}$"
|
|
TypeInt32HexString:
|
|
description: "8 character hex string"
|
|
type: "string"
|
|
pattern: "^([a-fA-F0-9][a-fA-F0-9]){1,4}$"
|
|
TypeSoftFork:
|
|
type: "object"
|
|
properties:
|
|
id:
|
|
type: "string"
|
|
version:
|
|
type: "integer"
|
|
reject:
|
|
type: "object"
|
|
properties:
|
|
status:
|
|
type: "boolean"
|
|
TypeBip9SoftFork:
|
|
type: "object"
|
|
properties:
|
|
status:
|
|
type: "string"
|
|
startTime:
|
|
type: "integer"
|
|
timeout:
|
|
type: "integer"
|
|
since:
|
|
type: "integer"
|
|
ApiResponseTemporarilyUnavailable:
|
|
type: "object"
|
|
properties:
|
|
reason:
|
|
type: "string"
|
|
ApiResponseNotAllowed:
|
|
description: Access token is missing or invalid
|
|
ApiResponseNotFound:
|
|
description: Not found
|
|
ApiResponseInvalidInput:
|
|
description: Invalid Input
|
|
securitySchemes:
|
|
BearerAuth:
|
|
type: http
|
|
scheme: bearer
|
|
bearerFormat: JWT
|