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" properties: address: $ref: '#/components/schemas/TypeAddressString' unconfirmedCallbackURL: type: "string" format: "url" confirmedCallbackURL: type: "string" format: "url" 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" content: application/json: schema: $ref: '#/components/schemas/WatchedAddress' '400': $ref: '#/components/schemas/ApiResponseInvalidInput' '403': $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: - "watches" properties: watches: type: "array" items: $ref: '#/components/schemas/WatchedAddress' '403': $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' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '404': $ref: '#/components/schemas/ApiResponseNotFound' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /unwatch: post: 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 for the specified URLs or id." operationId: "deleteWatchedAddress" requestBody: description: "Bitcoin address that needs to be watched" required: true content: application/json: schema: type: "object" properties: address: $ref: '#/components/schemas/TypeAddressString' unconfirmedCallbackURL: type: "string" format: "url" confirmedCallbackURL: type: "string" format: "url" id: description: "id returned by the corresponding watch" type: "string" responses: '200': description: "successfully unwatched" content: application/json: schema: type: "object" properties: event: type: "string" address: $ref: '#/components/schemas/TypeAddressString' unconfirmedCallbackURL: type: "string" format: "url" confirmedCallbackURL: type: "string" format: "url" '400': $ref: '#/components/schemas/ApiResponseInvalidInput' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /watchxpub: post: tags: - "watching addresses" - "core features" summary: "Add a new xpub to be watched" description: "Inserts the xpub's Bitcoin addresses and callbacks in the DB and imports the addresses to the xpub Watching wallet." operationId: "addXpubWatch" requestBody: description: "Bitcoin xpub that needs to be watched" required: true content: application/json: schema: type: "object" required: - "label" - "pub32" - "path" - "nstart" - "unconfirmedCallbackURL" - "confirmedCallbackURL" properties: label: description: "Label for that xpub. Can be used, instead for xpub, for future references in xpub-related endpoints." type: "string" pub32: $ref: '#/components/schemas/TypeXpubString' path: description: "Derivation path to use when deriving addresses from xpub to be watched. Must use variable n in the path for the index." type: "string" nstart: description: "Index number to start watching from." type: "integer" 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' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /unwatchxpubbyxpub/{xpub}: get: parameters: - in: "path" name: "xpub" description: "Xpub address" required: true schema: $ref: '#/components/schemas/TypeXpubString' tags: - "watching addresses" - "core features" summary: "Stop watching a Bitcoin xpub address" description: "Updates the watched xpub Bitcoin address row in DB so that callbacks won't be called on tx confirmations for the provided xpub addresses." operationId: "deleteWatchedXpubByXpub" responses: '200': description: "successful operation" content: application/json: schema: type: "object" properties: event: type: "string" xpub: $ref: '#/components/schemas/TypeXpubString' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '404': $ref: '#/components/schemas/ApiResponseNotFound' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /unwatchxpubbylabel/{label}: get: parameters: - in: "path" name: "label" description: "Xpub label" required: true schema: type: "string" tags: - "watching addresses" - "core features" summary: "Stop watching a Bitcoin xpub address" description: "Updates the watched xpub Bitcoin address row in DB so that callbacks won't be called on tx confirmations for the provided xpub addresses." operationId: "deleteWatchedXpubByLabel" responses: '200': description: "successful operation" content: application/json: schema: type: "object" properties: event: type: "string" label: type: "string" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '404': $ref: '#/components/schemas/ApiResponseNotFound' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /getactivewatchesbyxpub/{xpub}: get: parameters: - in: "path" name: "xpub" description: "Xpub address" required: true schema: $ref: '#/components/schemas/TypeXpubString' tags: - "watching addresses" - "core features" summary: "Get list of watched-by-xpub Bitcoin addresses" description: "Returns the list of currently watched-by-xpub Bitcoin addresses and callback information." operationId: "listWatchedByXpubAddressByXpub" responses: '200': description: "successful operation" content: application/json: schema: type: "object" required: - "watches" properties: watches: type: "array" items: $ref: '#/components/schemas/WatchedByXpubAddress' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /getactivewatchesbylabel/{label}: get: parameters: - in: "path" name: "label" description: "Xpub label" required: true schema: type: "string" tags: - "watching addresses" - "core features" summary: "Get list of watched-by-xpub Bitcoin addresses by label" description: "Returns the list of currently watched-by-xpub Bitcoin addresses, by label, and callback information." operationId: "listWatchedByXpubAddressByLabel" responses: '200': description: "successful operation" content: application/json: schema: type: "object" required: - "watches" properties: watches: type: "array" items: $ref: '#/components/schemas/WatchedByXpubAddress' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /get_txns_by_watchlabel/{label}: get: parameters: - in: "path" name: "label" description: "Xpub label" required: true schema: type: "string" tags: - "transactions" - "core features" summary: "Get list of upto 10 transactions observed for addreses belonging to this label" description: "Get list of transactions observed for addreses belonging to this label" operationId: "get_txns_by_watchlabel" responses: '200': description: "successful operation" content: application/json: schema: type: "object" required: - "label_txns" properties: watches: type: "array" items: $ref: '#/components/schemas/WatchXPubTxn' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /get_txns_by_watchlabel/{label}/{count}: get: parameters: - in: "path" name: "label" description: "Xpub label" required: true schema: type: "string" - in: "path" name: "count" description: "Number of transactions to return" required: true schema: type: "number" tags: - "transactions" - "core features" summary: "Get list of transactions observed for addreses belonging to this label" description: "Get list of upto count number of transactions observed for addreses belonging to this label" operationId: "get_txns_by_watchlabel_count" responses: '200': description: "successful operation" content: application/json: schema: type: "object" required: - "label_txns" properties: watches: type: "array" items: $ref: '#/components/schemas/WatchXPubTxn' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /get_txns_spending: get: tags: - "transactions" - "core features" summary: "Get list of upto 10 spending wallet transactions" description: "Get list of upto 10 spending wallet transactions" operationId: "get_txns_spending" responses: '200': description: "successful operation" content: application/json: schema: type: "object" required: - "txns" properties: watches: type: "array" items: $ref: '#/components/schemas/TransactionsSpending' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /get_txns_spending/{count}/: get: parameters: - in: "path" name: "count" description: "Number of txns to return" required: true schema: type: "integer" tags: - "transactions" - "core features" summary: "Get list of upto count spending wallet transactions" description: "Get list of upto count wallets transactions" operationId: "get_txns_spending_count" responses: '200': description: "successful operation" content: application/json: schema: type: "object" required: - "txns" properties: watches: type: "array" items: $ref: '#/components/schemas/TransactionsSpending' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /get_txns_spending/{count}/{skip}: get: parameters: - in: "path" name: "count" description: "Number of txns to return" required: true schema: type: "integer" - in: "path" name: "skip" description: "Number of txns to skip (start from)" required: true schema: type: "integer" tags: - "transactions" - "core features" summary: "Get list of upto count spending wallet transactions, skipping over the first {skip} number of transactions" description: "Get list of upto count spending wallet transactions, skipping over the first {skip} number of transactions" operationId: "get_txns_spending_count_skip" responses: '200': description: "successful operation" content: application/json: schema: type: "object" required: - "txns" properties: watches: type: "array" items: $ref: '#/components/schemas/TransactionsSpending' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /get_unused_addresses_by_watchlabel/{label}/: get: parameters: - in: "path" name: "label" description: "Xpub label" required: true schema: type: "string" tags: - "watching addresses" - "core features" summary: "Get list of upto 10 unused derived addreses belonging to this label" description: "Gets an unused subset of addreses from the set of derived addresses belonging to this label" operationId: "get_unused_addresses_by_watchlabel" responses: '200': description: "successful operation" content: application/json: schema: type: "object" required: - "label_unused_addresses" properties: watches: type: "array" items: $ref: '#/components/schemas/UnusedWatchXPubAddress' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /get_unused_addresses_by_watchlabel/{label}/{count}: get: parameters: - in: "path" name: "label" description: "Xpub label" required: true schema: type: "string" - in: "path" name: "count" description: "Number of addresses to return" required: true schema: type: "integer" tags: - "watching addresses" - "core features" summary: "Get list of unused upto to {count} derived addreses belonging to this label" description: "Get list of unused upto to {count} derived addreses belonging to this label" operationId: "get_unused_addresses_by_watchlabel_count" responses: '200': description: "successful operation" content: application/json: schema: type: "object" required: - "label_unused_addresses" properties: watches: type: "array" items: $ref: '#/components/schemas/UnusedWatchXPubAddress' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /getactivexpubwatches: get: tags: - "watching addresses" - "core features" summary: "Get list of watched-by-xpub Bitcoin xpub" description: "Returns the list of currently watched xpub Bitcoin addresses and callback information." operationId: "listWatchedByXpubAddresses" responses: '200': description: "successful operation" content: application/json: schema: type: "object" required: - "id" - "pub32" - "label" - "derivation_path" - "last_imported_n" - "unconfirmedCallbackURL" - "confirmedCallbackURL" - "watching_since" properties: watches: type: "array" items: $ref: '#/components/schemas/WatchedXpub' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /watchtxid: post: tags: - "watching addresses" - "core features" summary: "Add a new txid to be watched" description: "Inserts the transaction id and callbacks in the DB and check number of confirmations when a new block is added. Will eventually execute callbacks when enough confirmations for the transaction. Useful when we want to be notified when a LN channel is ready to use." operationId: "addWatchedTxid" requestBody: description: "Bitcoin txid that needs to be watched" required: true content: application/json: schema: type: "object" required: - "txid" - "confirmedCallbackURL" - "xconfCallbackURL" - "nbxconf" properties: txid: $ref: '#/components/schemas/TypeHashString' unconfirmedCallbackURL: type: "string" format: "url" xconfCallbackURL: type: "string" format: "url" nbxconf: type: "integer" responses: '200': description: "successfully created" content: application/json: schema: $ref: '#/components/schemas/WatchedAddress' '400': $ref: '#/components/schemas/ApiResponseInvalidInput' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /getblockhash/{height}: get: parameters: - in: "path" name: "height" description: "Blockhash" required: true schema: type: "integer" tags: - "block" - "core features" summary: "Get block hash matching height provided." description: "Returns the block matching the height provided of the watching Bitcoin node." operationId: "getBlockHash" 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" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '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" '403': $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' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '404': $ref: '#/components/schemas/ApiResponseNotFound' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /getinstallation_info: get: tags: - "stats" summary: "Show installation info" description: "Returns detailed cyphernode installation information." operationId: "getInstallationInfo" responses: '200': description: "successful operation" content: application/json: schema: $ref: '#/components/schemas/InstallationInfo' '403': $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" '403': $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" '403': $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" '403': $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: $ref: '#/components/schemas/Balance' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: 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: - in: "path" name: "xpub" description: "Xpub address" required: true schema: $ref: '#/components/schemas/TypeXpubString' tags: - "spending wallet" - "core features" summary: "Get the xpub balance" description: "Returns the xpub balance, in BTC." operationId: "getXpubBalanceByXpub" responses: '200': description: "successful operation" content: application/json: schema: $ref: '#/components/schemas/Balance' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /getbalancebyxpublabel/{label}: get: parameters: - in: "path" name: "label" description: "Xpub label" required: true schema: type: "string" tags: - "spending wallet" - "core features" summary: "Get the xpub balance by its label" description: "Returns the xpub balance by its label, in BTC." operationId: "getXpubBalanceByLabel" responses: '200': description: "successful operation" content: application/json: schema: $ref: '#/components/schemas/Balance' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /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" 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' 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': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /validateaddress/{address}: get: parameters: - in: "path" name: "address" description: "address string to validate" required: true schema: type: "string" tags: - "bitcoin" - "core features" summary: "Get the detailed information about the given address" description: "Returns the detailed information about the given address" operationId: "validateAddress" responses: '200': description: "operation successful" content: application/json: schema: type: "object" required: - "isvalid" properties: isvalid: type: "boolean" address: $ref: '#/components/schemas/TypeAddressString' scriptPubKey: type: "string" isscript: type: "boolean" iswitness: type: "boolean" witness_version: type: "number" witness_program: type: "string" '403': $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" eventMessage: description: "Will be part of the published message on spend" type: "string" confTarget: type: "number" replaceable: type: "boolean" subtractfeefromamount: type: "boolean" responses: '200': description: "operation successful" content: application/json: schema: type: "object" required: - "status" - "hash" properties: status: type: "string" hash: $ref: '#/components/schemas/TypeHashString' details: type: "object" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '405': $ref: '#/components/schemas/ApiResponseInvalidInput' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /bumpfee: post: tags: - "spending wallet" - "core features" summary: "Bump the fees of an unconfirmed transaction" description: "Calls bumpfee RPC on the spending wallet with supplied info." operationId: "bumpfee" requestBody: description: "txid and confirmation target" required: true content: application/json: schema: type: "object" required: - "txid" properties: txid: $ref: '#/components/schemas/TypeHashString' confTarget: type: "number" responses: '200': description: "operation successful" content: application/json: schema: type: "object" required: - "txid" - "origfee" - "fee" - "errors" properties: txid: $ref: '#/components/schemas/TypeHashString' origfee: type: "number" fee: type: "number" errors: type: "array" items: type: "string" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '405': $ref: '#/components/schemas/ApiResponseInvalidInput' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /createbatcher: post: tags: - "spending wallet" - "core features" - "batching" summary: "Create a batching template, by setting a label and a default confTarget" description: "Inserts batcher information to the DB." operationId: "createbatcher" requestBody: description: "Batcher label and conf target" required: true content: application/json: schema: type: "object" properties: batcherLabel: type: "string" confTarget: type: "number" responses: '200': description: "operation successful" content: application/json: schema: type: "object" properties: result: type: "object" properties: batcherId: type: "number" error: type: "object" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '405': $ref: '#/components/schemas/ApiResponseInvalidInput' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /updatebatcher: post: tags: - "spending wallet" - "core features" - "batching" summary: "Update a batching template, by changing the label or the default confTarget" description: "Updates batcher information to the DB." operationId: "updatebatcher" requestBody: description: "Batcher id, batcher label and conf target" required: true content: application/json: schema: type: "object" properties: batcherId: type: "number" batcherLabel: type: "string" confTarget: type: "number" responses: '200': description: "operation successful" content: application/json: schema: type: "object" properties: result: type: "object" properties: batcherId: type: "number" batcherLabel: type: "string" confTarget: type: "number" error: type: "object" '403': $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" - "batching" 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, amount, batcherId, batcherLabel and webhookUrl" required: true content: application/json: schema: type: "object" required: - "address" - "amount" properties: address: $ref: '#/components/schemas/TypeAddressString' amount: type: "number" batcherId: type: "number" batcherLabel: type: "string" webhookUrl: type: "string" format: "url" responses: '200': description: "operation successful" content: application/json: schema: type: "object" properties: result: type: "object" properties: batcherId: type: "number" outputId: type: "number" nbOutputs: type: "number" oldest: type: "string" total: type: "number" error: type: "object" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '405': $ref: '#/components/schemas/ApiResponseInvalidInput' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /removefrombatch: post: tags: - "spending wallet" - "core features" - "batching" summary: "Removes a previously added output from the next batch" description: "Deletes output from the DB." operationId: "removeFromNextBatch" requestBody: description: "outputId returned by corresponding addtobatch" required: true content: application/json: schema: type: "object" required: - "outputId" properties: outputId: type: "number" responses: '200': description: "operation successful" content: application/json: schema: type: "object" properties: result: type: "object" properties: batcherId: type: "number" outputId: type: "number" nbOutputs: type: "number" oldest: type: "string" total: type: "number" error: type: "object" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '405': $ref: '#/components/schemas/ApiResponseInvalidInput' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /batchspend: post: tags: - "spending wallet" - "core features" - "batching" summary: "Spend previously added amounts/addresses in a batch" description: "Creates a batched transaction whose outputs are the previously unspent addtobatch calls for the batcher." operationId: "batchSpend" requestBody: description: "batcherId or batcherLabel with an optional confTarget to override the batcher's default" required: true content: application/json: schema: type: "object" properties: batcherId: type: "number" batcherLabel: type: "string" confTarget: type: "number" responses: '200': description: "operation successful" content: application/json: schema: type: "object" properties: result: type: "object" properties: batcherId: type: "number" confTarget: type: "number" nbOutputs: type: "number" oldest: type: "string" total: type: "number" txid: type: "string" hash: type: "string" details: type: "object" outputs: type: "object" error: type: "object" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '405': $ref: '#/components/schemas/ApiResponseInvalidInput' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /getbatcher: post: tags: - "spending wallet" - "core features" - "batching" summary: "Returns current state/summary of the requested batching template" description: "Get information from the batcher and recipient DB tables." operationId: "getBatcher" requestBody: description: "Optional batcherId or batcherLabel, default batcher if not supplied" required: true content: application/json: schema: type: "object" properties: batcherId: type: "number" batcherLabel: type: "string" responses: '200': description: "operation successful" content: application/json: schema: type: "object" properties: result: type: "object" properties: batcherId: type: "number" batcherLabel: type: "string" confTarget: type: "number" nbOutputs: type: "number" oldest: type: "string" total: type: "number" error: type: "object" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '405': $ref: '#/components/schemas/ApiResponseInvalidInput' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /getbatchdetails: post: tags: - "spending wallet" - "core features" - "batching" summary: "Returns current state and details of the requested batch, including all outputs" description: "Get detailed information from the batcher and recipient DB tables." operationId: "getBatcherDetails" requestBody: description: "Optional batcherId or batcherLabel and txid, default batcher if not supplied" required: true content: application/json: schema: type: "object" properties: batcherId: type: "number" batcherLabel: type: "string" txid: type: "string" responses: '200': description: "operation successful" content: application/json: schema: type: "object" properties: result: type: "object" properties: batcherId: type: "number" batcherLabel: type: "string" confTarget: type: "number" nbOutputs: type: "number" oldest: type: "string" total: type: "number" txid: type: "string" hash: type: "string" details: type: "object" outputs: type: "object" error: type: "object" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '405': $ref: '#/components/schemas/ApiResponseInvalidInput' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /listbatchers: get: tags: - "spending wallet" - "core features" - "batching" summary: "Get list of batchers, including the default batcher" description: "Returns the list of batch templates." operationId: "listBatchers" responses: '200': description: "successful operation" content: application/json: schema: type: "object" properties: result: type: "array" error: type: "object" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /bitcoin_estimatesmartfee: post: tags: - "core features" - "bitcoin" summary: "Returns current fee estimation computed by Bitcoin Core's estimatesmartfee" description: "Returns current fee estimation computed by Bitcoin Core's estimatesmartfee" operationId: "estimateSmartFee" requestBody: description: "Conf Target" required: true content: application/json: schema: type: "object" properties: confTarget: type: "number" responses: '200': description: "operation successful" content: application/json: schema: type: "object" properties: result: type: "object" properties: feerate: type: "number" blocks: type: "number" error: type: "object" id: type: "number" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '405': $ref: '#/components/schemas/ApiResponseInvalidInput' '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' '403': $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' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /deriveindex_bitcoind/{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: "Fast address derivation using configured xpub key and derivation path" description: "Fast address derivation 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: "array" items: $ref: '#/components/schemas/TypeAddressString' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /derivepubpath_bitcoind: post: tags: - "addresses" - "core features" summary: "Fast address derivation using supplied xpub key and derivation path" description: "Fast address derivation 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: "array" items: $ref: '#/components/schemas/TypeAddressString' '400': $ref: '#/components/schemas/ApiResponseInvalidInput' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /getmempoolinfo: get: tags: - "stats" - "core features" summary: "Show mempool info" description: "Returns detailed mempool information." operationId: "getmempoolinfo" responses: '200': description: "successful operation" content: application/json: schema: $ref: '#/components/schemas/MempoolInfo' '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '404': $ref: '#/components/schemas/ApiResponseNotFound' '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" '403': $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: - "label" - "description" properties: msatoshi: type: "integer" label: type: "string" description: type: "string" expiry: type: "integer" callbackUrl: type: "string" format: "url" 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" '403': $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" 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" '403': $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" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /ln_getconnectionstring: get: tags: - "lightning" - "optional features" summary: "Returns the connection string to the lightning node" description: "Returns the connection string to the lightning node" operationId: "lightningGetConnectionString" responses: '200': description: "successful operation" content: application/json: schema: type: "object" properties: connectstring: type: "string" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /ln_decodebolt11/{bolt11}: get: parameters: - in: "path" name: "bolt11" description: "BOLT11 string to decode" required: true schema: type: "string" tags: - "lightning" - "optional features" summary: "Get the detailed decoded bolt11 string info" description: "Returns the detailed decoded bolt11 string info" operationId: "getDecodedBolt11" responses: '200': description: "successful operation" content: application/json: schema: # TODO: describe response type: "object" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /ln_getinvoice/{label}: get: parameters: - in: "path" name: "label" description: "Xpub label" required: true schema: type: "string" tags: - "lightning" - "optional features" summary: "Get the LN invoice by its label" description: "Returns the LN invoice by its label." operationId: "getLnInvoiceByLabel" responses: '200': description: "successful operation" content: application/json: schema: # TODO: describe response type: "object" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /ln_connectfund: post: tags: - "lightning" - "optional features" summary: "Connect LN to a peer and fund a channel" description: "Connect LN node to a peer. Fund a channel. When channel is ready, callback will be called." operationId: "lightningConnectFund" requestBody: description: "Information to connect, fund channel and be called back." required: true content: application/json: schema: type: "object" required: - "peer" - "msatoshi" - "callbackUrl" properties: peer: type: "string" msatoshi: type: "integer" callbackUrl: type: "string" responses: '200': description: "successful operation" content: application/json: schema: type: "object" properties: result: type: "string" txid: $ref: '#/components/schemas/TypeHashString' channel_id: type: "string" message: type: "string" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /ln_listpeers: get: tags: - "lightning" - "optional features" summary: "Get lightning peer list" description: "Calls listpeers from lightningd. Returns the list of peers and the channels opened with them, even for currently offline peers." operationId: "lightningListPeers" responses: '200': description: "successful operation" content: application/json: schema: type: "object" properties: id: type: "string" connected: type: "boolean" netaddr: $ref: 'string' channels: type: "array" items: type: "string" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /ln_listfunds: get: tags: - "lightning" - "optional features" summary: "Get funds in Ln wallet" description: "Calls listfunds from lightningd. Returns list of funds in outputs and channels. Please check c-lightinig documentation for schema of outputs and channels" operationId: "lightningListFunds" responses: '200': description: "successful operation" content: application/json: schema: type: "array" items: type: object properties: outputs: type: "array" items: type: object channels: type: "array" items: type: object '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /ln_listpays: get: tags: - "lightning" - "optional features" summary: "Gets list of payments made" description: "Calls listpays from lightningd. Returns list of payments made. Please refer to c-lighting documentation for payload of pays." operationId: "lightningListPays" responses: '200': description: "successful operation" content: application/json: schema: type: object properties: pays: type: "array" items: type: object '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /ln_getroute/{nodeId}/{amount}/{riskFactor}: get: parameters: - in: "path" name: "nodeId" description: "Ln nodeId to find route to. Can be 66 character nodeId or nodeId with address and port" required: true schema: type: "string" - in: "path" name: "amount" description: "Amount in MSAT needed to pass through the route" required: true schema: type: "number" - in: "path" name: "riskFactor" description: "Randomization/Fee combination to use when finding route. Refer to c-lighthing docs for more details" required: false schema: type: "string" tags: - "lightning" - "optional features" summary: "Gets a viable payment route to nodeId for amount (satoshi)" description: "Calls getroute from lightningd. Returns an array of nodes presenting a possible route to nodeId based on the amount and risk factor supplied. Please refer to c-lighitings documentation for more details on riskfactor and returned payload schema" operationId: "lightningGetRoute" responses: '200': description: "successful operation" content: application/json: schema: type: object properties: route: type: "array" items: type: object '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /ln_withdraw: post: tags: - "lightning" - "optional features" summary: "Withdraw funds from c-lightning wallet to an address of choice." description: "Withdraw outputs from c-lightning wallet to a destination of choice with confirmation targeting fees. Can either supply `satoshi` in SATS (integer), BTC (8 point decimal) or set `all` to true to withdraw all outputs. Please refer to c-lightining documentation on returned payload" operationId: "LnWithdraw" requestBody: description: "Destination address, amounts and fees for withdraw" required: true content: application/json: schema: oneOf: - $ref: '#/components/schemas/LnWithdrawSatoshiAmountPayload' - $ref: '#/components/schemas/LnWithdrawAllPayload' responses: '200': description: "successful operation" content: application/json: schema: type: "object" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /ots_stamp: post: tags: - "ots" - "optional features" summary: "Stamp a hash using OTS" description: "Stamp supplied hash using OTS. Callback called when stamping is completed." operationId: "otsStamp" requestBody: description: "Information to stamp and callback." required: true content: application/json: schema: type: "object" required: - "hash" - "callbackUrl" properties: hash: $ref: '#/components/schemas/TypeHashString' callbackUrl: type: "string" responses: '200': description: "successful operation" content: application/json: schema: # TODO: describe response type: "object" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /ots_verify: post: tags: - "ots" - "optional features" summary: "Verify an OTS file with hash" description: "If base64 of the OTS file is not supplied, look for local OTS file named after the supplied hash suffixed with .ots." operationId: "otsVerify" requestBody: description: "JSON object containing hash and base64otsfile." required: true content: application/json: schema: type: "object" required: - "hash" properties: hash: $ref: '#/components/schemas/TypeHashString' base64otsfile: type: "string" responses: '200': description: "successful operation" content: application/json: schema: # TODO: describe response type: "object" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /ots_info: post: tags: - "ots" - "optional features" summary: "Get information about an OTS file" description: "If base64 of the OTS file is not supplied, look for local OTS file named after the supplied hash suffixed with .ots." operationId: "otsInfo" requestBody: description: "JSON object containing hash and/or base64otsfile." required: true content: application/json: schema: type: "object" properties: hash: $ref: '#/components/schemas/TypeHashString' base64otsfile: type: "string" responses: '200': description: "successful operation" content: application/json: schema: # TODO: describe response type: "object" '403': $ref: '#/components/schemas/ApiResponseNotAllowed' '503': description: "Resource temporarily unavailable" content: application/json: schema: $ref: '#/components/schemas/ApiResponseTemporarilyUnavailable' /ots_getfile/{hash}: get: parameters: - in: "path" name: "hash" description: "Stamped hash" required: true schema: type: "string" tags: - "ots" - "optional features" summary: "Get the OTS file of the stamped hash." description: "Returns the OTS file of the stamped hash." operationId: "getOtsFile" responses: '200': description: "successful operation" content: application/octet-stream: schema: type: string format: binary '403': $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" - "eventMessage" - "label" 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" label: description: "Label for this address that will be imported in Bitcoin Core" type: "string" estimatesmartfee2blocks: type: "string" estimatesmartfee6blocks: type: "string" estimatesmartfee36blocks: type: "string" estimatesmartfee144blocks: type: "string" watching_since: type: "string" eventMessage: type: "string" WatchedByXpubAddress: type: "object" required: - "id" - "address" - "imported" - "unconfirmedCallbackURL" - "confirmedCallbackURL" - "watching_since" - "derivation_path" - "pub32_index" properties: id: type: "string" address: $ref: '#/components/schemas/TypeAddressString' imported: type: "string" enum: ["0","1"] 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" watching_since: type: "string" derivation_path: type: "string" pub32_index: type: "string" UnusedWatchXPubAddress: type: "object" required: - "pub32_watch_id" - "pub32_label" - "pub32" - "address_pub32_index" - "address" properties: pub32_watch_id: type: "string" address: $ref: '#/components/schemas/TypeAddressString' pub32: $ref: '#/components/schemas/TypeXpubString' pub32_label: type: "string" address_pub32_index: type: "string" TransactionsSpending: type: "object" required: - "address" - "category" - "amount" - "label" - "vout" - "fee" - "confirmations" - "blockhash" - "blockindex" - "blocktime" - "txid" - "time" - "timereceived" - "comment" - "bip125-replaceable" - "abandoned" properties: address: $ref: '#/components/schemas/TypeAddressString' category: $ref: 'string' amount: type: "number" label: type: "string" vout: type: "integer" fee: type: "number" confirmations: type: "integer" blockhash: $ref: '#/components/schemas/TypeHashString' blockindex: $ref: 'number' blocktime: type: "number" txid: $ref: '#/components/schemas/TypeHashString' time: type: "number" timereceived: type: "number" comment: type: "string" bip125-replaceable: type: "string" abandoned: type: "boolean" WatchXPubTxn: type: "object" required: - "label" - "address" - "txid" - "confirmations" - "blockheight" - "v_out" - "amount" - "blockhash" - "blocktime" - "timereceived" properties: label: type: "string" address: $ref: '#/components/schemas/TypeAddressString' txid: $ref: '#/components/schemas/TypeHashString' confirmations: type: "integer" v_out: type: "integer" amount: type: "number" blockhash: $ref: '#/components/schemas/TypeHashString' blocktime: type: "number" timereceived: type: "number" WatchedXpub: type: "object" required: - "id" - "pub32" - "label" - "derivation_path" - "last_imported_n" - "unconfirmedCallbackURL" - "confirmedCallbackURL" - "watching_since" properties: id: type: "string" pub32: $ref: '#/components/schemas/TypeXpubString' label: type: "string" derivation_path: type: "string" last_imported_n: type: "string" 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" watching_since: type: "string" Balance: type: "object" required: - "balance" properties: balance: type: "number" Balances: type: "object" required: - "balances" properties: balances: type: "object" 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' InstallationInfo: type: "object" properties: api_versions: type: "array" items: type: "string" setup_version: type: "string" bitcoin_version: type: "string" features: type: "array" items: type: "object" properties: name: type: "string" label: type: "string" host: type: "string" docker: type: "string" networks: type: "array" items: type: "string" extra: type: "object" devmode: type: "boolean" 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' MempoolInfo: type: "object" properties: size: type: "integer" bytes: type: "integer" usage: type: "integer" maxmempool: type: "integer" mempoolminfee: type: "number" minrelaytxfee: type: "integer" TypeHexString: description: "variable length hex string" type: "string" pattern: "^[a-fA-F0-9]+$" TypeAddressString: description: "base58 or base32 check encoded address" type: "string" pattern: "^(bc1|tb1|bcrt1)[ac-hj-np-z02-9]{9,71}|[123mn][a-km-zA-HJ-NP-Z1-9]{26,33}$" TypeXpubString: description: "base58 check encoded xpub" type: "string" pattern: "^[a-km-zA-HJ-NP-Z1-9]{78,112}$" 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 LnWithdrawSatoshiAmountPayload: type: "object" properties: destination: type: string satoshi: type: number feerate: type: string enum: - urgent - normal - slow required: - destination - satoshi LnWithdrawAllPayload: type: "object" properties: destination: type: string all: type: boolean enum: - true feerate: type: string enum: - urgent - normal - slow required: - destination - all securitySchemes: BearerAuth: type: http scheme: bearer bearerFormat: JWT