diff --git a/README.md b/README.md index d647004..5d4969c 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,10 @@ The following features set this repository apart from rest.bitcoin.com: You can test a live demo of the REST API by running the [bch-js examples](https://github.com/Permissionless-Software-Foundation/bch-js-examples). Rate limits are 20 requests per minute, but you can increase them to 100 with a [paid account](https://fullstack.cash/pricing). -You can run bootstrap your own REST server by downloading and installing the infrastructure listed on the [CashStrap](https://fullstack.cash/cashstrap). +You can bootstrap your own REST API server by downloading and installing the infrastructure listed on the [CashStrap](https://fullstack.cash/cashstrap) page. + +### Configure bch-js +The live servers can be used by [bch-js](https://github.com/christroutner/bch-js) by settings the `restURL` config property to one of these servers: - BCHN Mainnet REST API server: https://bchn.fullstack.cash/v3/ - ABC Mainnet REST API server: https://abc.fullstack.cash/v3/ diff --git a/generic-network-diagram.png b/generic-network-diagram.png index a30866c..4800f82 100644 Binary files a/generic-network-diagram.png and b/generic-network-diagram.png differ diff --git a/src/routes/v3/blockbook.js b/src/routes/v3/blockbook.js index aafd7a6..1ef0983 100644 --- a/src/routes/v3/blockbook.js +++ b/src/routes/v3/blockbook.js @@ -96,18 +96,6 @@ class Blockbook { } } - /** - * @api {get} /blockbook/balance/{addr} Get balance for a single address. - * @apiName Balance for a single address - * @apiGroup Blockbook - * @apiDescription Returns an object with balance and details about an address. - * - * - * @apiExample Example usage: - * curl -X GET "https://api.fullstack.cash/v3/blockbook/balance/bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf" -H "accept: application/json" - * - */ - // GET handler for single balance async balanceSingle (req, res, next) { try { const address = req.params.address @@ -165,18 +153,6 @@ class Blockbook { } } - /** - * @api {post} /blockbook/balance Get balance for an array of addresses. - * @apiName Balance for an array of addresses - * @apiGroup Blockbook - * @apiDescription Return balances and details for an array of addresses. - * Limited to 20 items per request. - * - * @apiExample Example usage: - * curl -X POST "https://api.fullstack.cash/v3/blockbook/balance" -H "accept: application/json" -H "Content-Type: application/json" -d '{"addresses":["bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf","bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf"]}' - * - * - */ // POST handler for bulk queries on address details async balanceBulk (req, res, next) { try { @@ -284,17 +260,6 @@ class Blockbook { } } - /** - * @api {get} /blockbook/utxos/{addr} Get utxos for a single address. - * @apiName UTXOs for a single address - * @apiGroup Blockbook - * @apiDescription Returns an object with UTXOs associated with an address. - * - * - * @apiExample Example usage: - * curl -X GET "https://api.fullstack.cash/v3/blockbook/utxos/bitcoincash:qr69kyzha07dcecrsvjwsj4s6slnlq4r8c30lxnur3" -H "accept: application/json" - * - */ // GET handler for single balance async utxosSingle (req, res, next) { try { @@ -352,18 +317,6 @@ class Blockbook { } } - /** - * @api {post} /blockbook/utxos Get UTXOs for an array of addresses. - * @apiName UTXOs for an array of addresses - * @apiGroup Blockbook - * @apiDescription Return UTXOs associate with an array of addresses. - * Limited to 20 items per request. - * - * @apiExample Example usage: - * curl -X POST "https://api.fullstack.cash/v3/blockbook/utxos" -H "accept: application/json" -H "Content-Type: application/json" -d '{"addresses":["bitcoincash:qr69kyzha07dcecrsvjwsj4s6slnlq4r8c30lxnur3","bitcoincash:qzy8wnj0dz927eu6kvh8v2pqsr5w8jh33ys757tdtq"]}' - * - * - */ // POST handler for bulk queries on address utxos async utxosBulk (req, res, next) { try { @@ -461,17 +414,6 @@ class Blockbook { } } - /** - * @api {get} /blockbook/tx/{txid} Get details for a single transaction. - * @apiName Details for a single transaction - * @apiGroup Blockbook - * @apiDescription Returns an object with details for a single transaction - * - * - * @apiExample Example usage: - * curl -X GET "https://api.fullstack.cash/v3/blockbook/tx/6181c669614fa18039a19b23eb06806bfece1f7514ab457c3bb82a40fe171a6d" -H "accept: application/json" - * - */ // GET handler for single transaction details. async txSingle (req, res, next) { try { @@ -514,18 +456,6 @@ class Blockbook { } } - /** - * @api {post} /blockbook/tx Get details for an array of transactions. - * @apiName Details for an array of transactions - * @apiGroup Blockbook - * @apiDescription Return details for an array of transactions. - * Limited to 20 items per request. - * - * @apiExample Example usage: - * curl -X POST "https://api.fullstack.cash/v3/blockbook/tx" -H "accept: application/json" -H "Content-Type: application/json" -d '{"txids":["6181c669614fa18039a19b23eb06806bfece1f7514ab457c3bb82a40fe171a6d","6181c669614fa18039a19b23eb06806bfece1f7514ab457c3bb82a40fe171a6d"]}' - * - * - */ // POST handler for bulk queries on tx details async txBulk (req, res, next) { try {