mirror of
https://github.com/aljazceru/cyphernode.git
synced 2026-01-31 10:14:35 +01:00
OpenAPI stuff for batching
This commit is contained in:
108
doc/API.v0.md
108
doc/API.v0.md
@@ -2,9 +2,9 @@
|
||||
|
||||
## Current API
|
||||
|
||||
### Watch a Bitcoin Address (called by application)
|
||||
### Watch a Bitcoin Address (called by your application)
|
||||
|
||||
Inserts the address and callbacks in the DB and imports the address to the Watching wallet. The callback URLs and event message are optional. If eventMessage is not supplied, tx_confirmation for that watch will not be published. Event message should be in base64 format to avoid dealing with escaping special characters.
|
||||
Inserts the address, webhook URLs and eventMessage in the DB and imports the address to the Watching wallet. The webhook URLs (callbackURLs) and event message are optional. If eventMessage is not supplied, the event will not be published to the tx_confirmation topic on confirmations. Event message should be in base64 format to avoid dealing with escaping special characters. The same address can be watched by different requests with different webhook URLs.
|
||||
|
||||
```http
|
||||
POST http://cyphernode:8888/watch
|
||||
@@ -31,12 +31,18 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Un-watch a previously watched Bitcoin Address (called by application)
|
||||
### Un-watch a previously watched Bitcoin Address (called by your application)
|
||||
|
||||
Updates the watched address row in DB so that callbacks won't be called on tx confirmations for that address.
|
||||
Updates the watched address row in DB so that webhooks won't be called on tx confirmations for that address. You can POST the URLs to make sure you unwatch the good watcher, since there may be multiple watchers on the same address with different webhook URLs. You can also, more conveniently, supply the watch id to unwatch.
|
||||
|
||||
```http
|
||||
GET http://cyphernode:8888/unwatch/2N8DcqzfkYi8CkYzvNNS5amoq3SbAcQNXKp
|
||||
or
|
||||
POST http://192.168.111.152:8080/unwatch
|
||||
with body...
|
||||
{"address":"2N8DcqzfkYi8CkYzvNNS5amoq3SbAcQNXKp","unconfirmedCallbackURL":"192.168.111.233:1111/callback0conf","confirmedCallbackURL":"192.168.111.233:1111/callback1conf"}
|
||||
or
|
||||
{"id":3124}
|
||||
```
|
||||
|
||||
Proxy response:
|
||||
@@ -44,11 +50,13 @@ Proxy response:
|
||||
```json
|
||||
{
|
||||
"event": "unwatch",
|
||||
"address": "2N8DcqzfkYi8CkYzvNNS5amoq3SbAcQNXKp"
|
||||
"address": "2N8DcqzfkYi8CkYzvNNS5amoq3SbAcQNXKp",
|
||||
"unconfirmedCallbackURL": "192.168.133.233:1111/callback0conf",
|
||||
"confirmedCallbackURL": "192.168.133.233:1111/callback1conf"
|
||||
}
|
||||
```
|
||||
|
||||
### Get a list of Bitcoin addresses being watched (called by application)
|
||||
### Get a list of Bitcoin addresses being watched (called by your application)
|
||||
|
||||
Returns the list of currently watched addresses and callback information.
|
||||
|
||||
@@ -61,17 +69,19 @@ Proxy response:
|
||||
```json
|
||||
{
|
||||
"watches": [
|
||||
{
|
||||
"id":"291",
|
||||
"address":"2N8DcqzfkYi8CkYzvNNS5amoq3SbAcQNXKp",
|
||||
"imported":"1",
|
||||
"unconfirmedCallbackURL":"192.168.133.233:1111/callback0conf",
|
||||
"confirmedCallbackURL":"192.168.133.233:1111/callback1conf",
|
||||
"watching_since":"2018-09-06 21:14:03",
|
||||
"eventMessage":"eyJib3VuY2VfYWRkcmVzcyI6IjJNdkEzeHIzOHIxNXRRZWhGblBKMVhBdXJDUFR2ZTZOamNGIiwibmJfY29uZiI6MH0K"}
|
||||
{
|
||||
"id":"291",
|
||||
"address":"2N8DcqzfkYi8CkYzvNNS5amoq3SbAcQNXKp",
|
||||
"imported":"1",
|
||||
"unconfirmedCallbackURL":"192.168.133.233:1111/callback0conf",
|
||||
"confirmedCallbackURL":"192.168.133.233:1111/callback1conf",
|
||||
"watching_since":"2018-09-06 21:14:03",
|
||||
"eventMessage":"eyJib3VuY2VfYWRkcmVzcyI6IjJNdkEzeHIzOHIxNXRRZWhGblBKMVhBdXJDUFR2ZTZOamNGIiwibmJfY29uZiI6MH0K"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Get a list of txns from a watched label
|
||||
|
||||
Returns the list of transactions not spend(txns) from watched label.
|
||||
@@ -126,7 +136,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Watch a Bitcoin xpub/ypub/zpub/tpub/upub/vpub extended public key (called by application)
|
||||
### Watch a Bitcoin xpub/ypub/zpub/tpub/upub/vpub extended public key (called by your application)
|
||||
|
||||
Used to watch the transactions related to an xpub. It will first derive 100 addresses using the provided xpub, derivation path and index information. It will add those addresses to the watching DB table and add those addresses to the Watching-by-xpub wallet. The watching process will take care of calling the provided callbacks when a transaction occurs. When a transaction is seen, Cyphernode will derive and start watching new addresses related to the xpub, keeping a 100 address gap between the last used address in a transaction and the last watched address of that xpub. The label can be used later, instead of the whole xpub, with unwatchxpub* and and getactivewatchesby*.
|
||||
|
||||
@@ -151,7 +161,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Un-watch a previously watched Bitcoin xpub by providing the xpub (called by application)
|
||||
### Un-watch a previously watched Bitcoin xpub by providing the xpub (called by your application)
|
||||
|
||||
Updates the watched address rows in DB so that callbacks won't be called on tx confirmations for the provided xpub and related addresses.
|
||||
|
||||
@@ -168,7 +178,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Un-watch a previously watched Bitcoin xpub by providing the label (called by application)
|
||||
### Un-watch a previously watched Bitcoin xpub by providing the label (called by your application)
|
||||
|
||||
Updates the watched address rows in DB so that callbacks won't be called on tx confirmations for the provided xpub and related addresses.
|
||||
|
||||
@@ -185,7 +195,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Watch a TXID (called by application)
|
||||
### Watch a TXID (called by your application)
|
||||
|
||||
Used to watch a transaction. Will call the 1-conf callback url after the transaction has been mined. Will call the x-conf callback url after the transaction has x confirmations.
|
||||
|
||||
@@ -209,7 +219,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get a list of Bitcoin xpub being watched (called by application)
|
||||
### Get a list of Bitcoin xpub being watched (called by your application)
|
||||
|
||||
Returns the list of currently watched xpub and callback information.
|
||||
|
||||
@@ -235,7 +245,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get a list of Bitcoin addresses being watched by provided xpub (called by application)
|
||||
### Get a list of Bitcoin addresses being watched by provided xpub (called by your application)
|
||||
|
||||
Returns the list of currently watched addresses related to the provided xpub and callback information.
|
||||
|
||||
@@ -262,7 +272,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get a list of Bitcoin addresses being watched by provided xpub label (called by application)
|
||||
### Get a list of Bitcoin addresses being watched by provided xpub label (called by your application)
|
||||
|
||||
Returns the list of currently watched addresses related to the provided xpub label and callback information.
|
||||
|
||||
@@ -367,7 +377,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get the blockchain information (called by application)
|
||||
### Get the blockchain information (called by your application)
|
||||
|
||||
Returns the blockchain information of the Bitcoin node. Used for example by the welcome app to get syncing progression.
|
||||
|
||||
@@ -431,7 +441,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get the Block Hash from Height (called by application)
|
||||
### Get the Block Hash from Height (called by your application)
|
||||
|
||||
Returns the best block hash matching height provided.
|
||||
|
||||
@@ -449,7 +459,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get the Best Block Hash (called by application)
|
||||
### Get the Best Block Hash (called by your application)
|
||||
|
||||
Returns the best block hash of the watching Bitcoin node.
|
||||
|
||||
@@ -467,7 +477,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get Block Info (called by application)
|
||||
### Get Block Info (called by your application)
|
||||
|
||||
Returns block info for the supplied block hash.
|
||||
|
||||
@@ -506,7 +516,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get the Best Block Info (called by application)
|
||||
### Get the Best Block Info (called by your application)
|
||||
|
||||
Returns best block info: calls getblockinfo with bestblockhash.
|
||||
|
||||
@@ -545,7 +555,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get a transaction details (node's getrawtransaction) (called by application)
|
||||
### Get a transaction details (node's getrawtransaction) (called by your application)
|
||||
|
||||
Calls getrawtransaction RPC for the supplied txid.
|
||||
|
||||
@@ -662,7 +672,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get spending wallet's balance (called by application)
|
||||
### Get spending wallet's balance (called by your application)
|
||||
|
||||
Calls getbalance RPC on the spending wallet.
|
||||
|
||||
@@ -678,7 +688,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get spending wallet's extended balances (called by application)
|
||||
### Get spending wallet's extended balances (called by your application)
|
||||
|
||||
Calls getbalances RPC on the spending wallet.
|
||||
|
||||
@@ -700,7 +710,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get a new Bitcoin address from spending wallet (called by application)
|
||||
### Get a new Bitcoin address from spending wallet (called by your application)
|
||||
|
||||
Calls getnewaddress RPC on the spending wallet. Used to refill the spending wallet from cold wallet (ie Trezor). Will derive the default address type (set in your bitcoin.conf file, p2sh-segwit if not specified) or you can supply the address type like the following examples.
|
||||
|
||||
@@ -725,7 +735,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Spend coins from spending wallet (called by application)
|
||||
### Spend coins from spending wallet (called by your application)
|
||||
|
||||
Calls sendtoaddress RPC on the spending wallet with supplied info. Can supply an eventMessage to be published on successful spending. eventMessage should be base64 encoded to avoid dealing with escaping special characters.
|
||||
|
||||
@@ -757,7 +767,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Bump transaction's fees (called by application)
|
||||
### Bump transaction's fees (called by your application)
|
||||
|
||||
Calls bumpfee RPC on the spending wallet with supplied info.
|
||||
|
||||
@@ -780,7 +790,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Add an output to the next batched transaction (called by application)
|
||||
### Add an output to the next batched transaction (called by your application)
|
||||
|
||||
Inserts output information in the DB. Used when batchspend is called later.
|
||||
|
||||
@@ -792,7 +802,7 @@ with body...
|
||||
|
||||
Proxy response: EMPTY
|
||||
|
||||
### Spend a batched transaction with outputs added with addtobatch (called by application)
|
||||
### Spend a batched transaction with outputs added with addtobatch (called by your application)
|
||||
|
||||
Calls sendmany RPC on spending wallet with the unspent "addtobatch" inserted outputs. Will be useful during next bull run.
|
||||
|
||||
@@ -809,7 +819,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get derived address(es) using path in config and provided index (called by application)
|
||||
### Get derived address(es) using path in config and provided index (called by your application)
|
||||
|
||||
Derives addresses for supplied index. Must be used with derivation.pub32 and derivation.path properties in config.properties.
|
||||
|
||||
@@ -833,7 +843,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get derived address(es) using provided path and index (called by application)
|
||||
### Get derived address(es) using provided path and index (called by your application)
|
||||
|
||||
Derives addresses for supplied pub32 and path. config.properties' derivation.pub32 and derivation.path are not used.
|
||||
|
||||
@@ -866,7 +876,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get info from Lightning Network node (called by application)
|
||||
### Get info from Lightning Network node (called by your application)
|
||||
|
||||
Calls getinfo from lightningd. Useful to let your users know where to connect to.
|
||||
|
||||
@@ -901,7 +911,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Create a Lightning Network invoice (called by application)
|
||||
### Create a Lightning Network invoice (called by your application)
|
||||
|
||||
Returns a LN invoice. Label must be unique. Description will be used by your user for payment. Expiry is in seconds and optional. If msatoshi is not supplied, will use "any" (ie donation invoice). callbackUrl is optional.
|
||||
|
||||
@@ -923,7 +933,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Pay a Lightning Network invoice (called by application)
|
||||
### Pay a Lightning Network invoice (called by your application)
|
||||
|
||||
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. If the bolt11 invoice doesn't contain an amount, then the expected_msatoshi supplied here will be used as the paid amount.
|
||||
|
||||
@@ -962,7 +972,7 @@ Proxy response:
|
||||
|
||||
```
|
||||
|
||||
### Get a new Bitcoin address from the Lightning Network node (to fund it) (called by application)
|
||||
### Get a new Bitcoin address from the Lightning Network node (to fund it) (called by your application)
|
||||
|
||||
Returns a Bitcoin bech32 address to fund your LN wallet.
|
||||
|
||||
@@ -1098,7 +1108,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get the list of peers, with channels, from Lightning Network node (called by application)
|
||||
### Get the list of peers, with channels, from Lightning Network node (called by your application)
|
||||
|
||||
Calls listpeers from lightningd. Returns the list of peers and the channels opened with them, even for currently offline peers.
|
||||
|
||||
@@ -1389,7 +1399,7 @@ Proxy response:
|
||||
"txid": "6b38....b0c3b"
|
||||
}
|
||||
```
|
||||
### Stamp a hash on the Bitcoin blockchain using OTS (called by application)
|
||||
### Stamp a hash on the Bitcoin blockchain using OTS (called by your application)
|
||||
|
||||
Will stamp the supplied hash to the Bitcoin blockchain using OTS. Cyphernode will curl the callback when the OTS stamping is complete.
|
||||
|
||||
@@ -1543,7 +1553,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Add an output to the next batched transaction (called by application)
|
||||
### Add an output to the next batched transaction (called by your application)
|
||||
|
||||
Inserts output information in the DB. Used when batchspend is called later.
|
||||
|
||||
@@ -1574,7 +1584,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Remove an output from the next batched transaction (called by application)
|
||||
### Remove an output from the next batched transaction (called by your application)
|
||||
|
||||
Removes a previously added output scheduled for the next batch.
|
||||
|
||||
@@ -1599,7 +1609,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Spend a batched transaction with outputs previously added with addtobatch (called by application)
|
||||
### Spend a batched transaction with outputs previously added with addtobatch (called by your application)
|
||||
|
||||
Calls the sendmany RPC on spending wallet with the unspent "addtobatch" inserted outputs. Will execute default batcher if no batcherId/batcherLabel supplied and default confTarget if no confTarget supplied.
|
||||
|
||||
@@ -1645,7 +1655,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get batcher (called by application)
|
||||
### Get batcher (called by your application)
|
||||
|
||||
Will return current state/summary of the requested batching template.
|
||||
|
||||
@@ -1675,9 +1685,9 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get batch details (called by application)
|
||||
### Get batch details (called by your application)
|
||||
|
||||
Will return current state and details of the requested batch, including all outputs. A batch is the combinatio of a batcher and an optional txid. If no txid is supplied, will return current non-yet-executed batch.
|
||||
Will return current state and details of the requested batch, including all outputs. A batch is the combination of a batcher and an optional txid. If no txid is supplied, will return current non-yet-executed batch.
|
||||
|
||||
```http
|
||||
POST http://cyphernode:8888/getbatchdetails
|
||||
@@ -1720,7 +1730,7 @@ Proxy response:
|
||||
}
|
||||
```
|
||||
|
||||
### Get a list of existing batch templates (called by application)
|
||||
### Get a list of existing batch templates (called by your application)
|
||||
|
||||
Will return a list of batch templates. batcherId 1 is a default batcher created at installation time.
|
||||
|
||||
|
||||
@@ -146,6 +146,61 @@ paths:
|
||||
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:
|
||||
@@ -1181,16 +1236,115 @@ paths:
|
||||
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 and amount"
|
||||
description: "Address, amount, batcherId, batcherLabel and webhookUrl"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
@@ -1204,9 +1358,90 @@ paths:
|
||||
$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':
|
||||
@@ -1218,13 +1453,28 @@ paths:
|
||||
schema:
|
||||
$ref: '#/components/schemas/ApiResponseTemporarilyUnavailable'
|
||||
/batchspend:
|
||||
get:
|
||||
post:
|
||||
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."
|
||||
- "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"
|
||||
@@ -1232,18 +1482,232 @@ paths:
|
||||
application/json:
|
||||
schema:
|
||||
type: "object"
|
||||
required:
|
||||
- "status"
|
||||
- "hash"
|
||||
properties:
|
||||
status:
|
||||
type: "string"
|
||||
hash:
|
||||
$ref: '#/components/schemas/TypeHashString'
|
||||
'400':
|
||||
$ref: '#/components/schemas/ApiResponseInvalidInput'
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user