mirror of
https://github.com/fullstack-cash/bch-api.git
synced 2026-09-21 16:52:04 -07:00
Updating README
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2021 Permissionless Software Foundation
|
Copyright (c) 2022 Permissionless Software Foundation developers
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -8,11 +8,12 @@ This is a REST API server, written in node.js JavaScript, using the [Express.js]
|
|||||||
|
|
||||||
While developers are encouraged to run and manage their own infrastructure, cloud-based infrastructure is available via [FullStack.cash](https://fullstack.cash). Free and paid tiers are available. You can use this REST API right away with the [bch-js](https://github.com/Permissionless-Software-Foundation/bch-js) JavaScript library.
|
While developers are encouraged to run and manage their own infrastructure, cloud-based infrastructure is available via [FullStack.cash](https://fullstack.cash). Free and paid tiers are available. You can use this REST API right away with the [bch-js](https://github.com/Permissionless-Software-Foundation/bch-js) JavaScript library.
|
||||||
|
|
||||||
This repository is intended to be paired with [bch-js](https://github.com/Permissionless-Software-Foundation/bch-js), an npm JavaScript library for building Bitcoin Cash apps. [Code examples](https://github.com/Permissionless-Software-Foundation/bch-js-examples) for common use-cases are available. And the [minimal-slp-wallet](https://www.npmjs.com/package/minimal-slp-wallet) is a front end JavaScript library that incorporates bch-js and provides basic wallet functionality.
|
This repository is intended to be paired with [bch-js](https://github.com/Permissionless-Software-Foundation/bch-js), an npm JavaScript library for building Bitcoin Cash apps. [Code examples](https://github.com/Permissionless-Software-Foundation/bch-js-examples) for common use-cases are available, and the [minimal-slp-wallet](https://www.npmjs.com/package/minimal-slp-wallet) is a front end JavaScript library that incorporates bch-js and provides basic wallet functionality.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Both bch-api and bch-js are part of the [Cash Stack](https://cashstack.info).
|
## Documentation
|
||||||
|
All the software above is part of the [Cash Stack](https://cashstack.info).
|
||||||
|
|
||||||
- [CashStack](https://cashstack.info) high-level documentation.
|
- [CashStack](https://cashstack.info) high-level documentation.
|
||||||
- [bch-api REST API reference](https://api.fullstack.cash/docs/)
|
- [bch-api REST API reference](https://api.fullstack.cash/docs/)
|
||||||
@@ -72,16 +73,16 @@ installation.
|
|||||||
|
|
||||||
- Run the Docker container with:
|
- Run the Docker container with:
|
||||||
|
|
||||||
`docker-compose up`
|
`docker-compose up -d`
|
||||||
|
|
||||||
## Rate Limits
|
## Rate Limits
|
||||||
Rate limiting of the REST API can be controlled in three different ways:
|
Rate limiting of the REST API can be controlled in three different ways:
|
||||||
- JWT tokens for individual users
|
- JWT tokens for individual users
|
||||||
- Basic Authentication tokens for company-wide usage.
|
- Basic Authentication tokens for organization-wide usage.
|
||||||
- Whitelisting for specific domain names
|
- Whitelisting for specific domain names
|
||||||
|
|
||||||
### JWT Tokens
|
### JWT Tokens
|
||||||
The rate limits for [api.fullstack.cash](https://api.fullstack.cash) are controlled by a JWT token. You can increase your rate limits by [purchasing a JWT token](https://fullstack.cash). If you're using bch-js, [check the readme for instructions on increasing rate limits](https://github.com/Permissionless-Software-Foundation/bch-js#api-key). For interacting with bch-api directly, you can then include the JWT token in the HTTP header like this:
|
The rate limits for [api.fullstack.cash](https://api.fullstack.cash) are controlled by a JWT token. You can increase your rate limits by [purchasing a JWT token](https://fullstack.cash). If you're using bch-js, [check the readme for instructions on increasing rate limits](https://github.com/Permissionless-Software-Foundation/bch-js#api-key). For interacting with bch-api directly (without bch-js), you can then include the JWT token in the HTTP header like this:
|
||||||
|
|
||||||
- `Authorization: Token <JWT token>`
|
- `Authorization: Token <JWT token>`
|
||||||
|
|
||||||
@@ -98,14 +99,14 @@ curl "https://bchn.fullstack.cash/v4/electrumx/balance/bitcoincash:qr69kyzha07dc
|
|||||||
For private installations, Basic Authentication can be used to give everyone in an organization access to higher rate limits, while restricting use by the public. More than one Basic Authentication password can be generated by using the colon `:` to separate entries in the `PRO_PASS` environment variable. See the [bash script](docker/mainnet/start-local-mainnet.sh) for an example.
|
For private installations, Basic Authentication can be used to give everyone in an organization access to higher rate limits, while restricting use by the public. More than one Basic Authentication password can be generated by using the colon `:` to separate entries in the `PRO_PASS` environment variable. See the [bash script](docker/mainnet/start-local-mainnet.sh) for an example.
|
||||||
|
|
||||||
### Whitelists
|
### Whitelists
|
||||||
Website domain names can be added to the `WHITELIST_DOMAINS` environment variable. Multiple domains can be separated with a comma `,`. Any web app making a request from that domain will be granted top-level rate limits.
|
Website domain names can be added to the `WHITELIST_DOMAINS` environment variable. Multiple domains can be separated with a comma `,`. Any web app making a request from that domain will be granted top-level rate limits. See the [bash script](docker/mainnet/start-local-mainnet.sh) for an example.
|
||||||
|
|
||||||
## Donate
|
## Donate
|
||||||
|
|
||||||
The open source software is developed and maintained by the [Permissionless Software Foundation](https://psfoundation.cash). If this library provides value to you, please consider making a donation to support the PSF developers:
|
The open source software is developed and maintained by the [Permissionless Software Foundation](https://psfoundation.cash). If this library provides value to you, please consider making a donation to support the PSF developers:
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="./psf-burn-qr.png" />
|
<img src="./diagrams/psf-burn-qr.png" />
|
||||||
<p>bitcoincash:qqsrke9lh257tqen99dkyy2emh4uty0vky9y0z0lsr</p>
|
<p>bitcoincash:qqsrke9lh257tqen99dkyy2emh4uty0vky9y0z0lsr</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -117,4 +118,3 @@ Copies of this repository will occasionally be uploaded and hosted on the Fileco
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
[MIT](./LICENSE.md)
|
[MIT](./LICENSE.md)
|
||||||
a
|
|
||||||
|
|||||||
Reference in New Issue
Block a user