https://github.com/ecency/vision-api
Ecency API proxy
https://github.com/ecency/vision-api
Last synced: 2 months ago
JSON representation
Ecency API proxy
- Host: GitHub
- URL: https://github.com/ecency/vision-api
- Owner: ecency
- License: mit
- Created: 2021-05-07T18:07:53.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2026-03-10T08:13:38.000Z (2 months ago)
- Last Synced: 2026-03-10T15:52:19.507Z (2 months ago)
- Language: TypeScript
- Homepage:
- Size: 15.4 MB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [Ecency vision][ecency_vision] – API
### Build instructions
##### Requirements
- node ^12.0.0
- yarn
##### Clone
`$ git clone https://github.com/ecency/vision-api`
`$ cd vision-api`
##### Install dependencies
`$ yarn`
##### Edit config file or define environment variables
`$ nano src/config.ts`
##### Environment variables
* `PRIVATE_API_ADDR` - private api endpoint
* `PRIVATE_API_AUTH` - private api auth
* `HIVESIGNER_SECRET` - hivesigner client secret
* `SEARCH_API_ADDR` - hivesearcher api endpoint
* `SEARCH_API_SECRET` - hivesearcher api auth token
* `CHAINSTACK_API_KEY` - Chainstack API key used to enumerate nodes and request balances directly from each network-specific endpoint.
* `CHAINZ_API_KEY` - Chainz API key used to perform balance lookups when the Chainz provider is requested.
* `BLOCKSTREAM_CLIENT_ID` - OAuth client identifier used to request temporary access tokens for the Blockstream Explorer Enterprise API fallback.
* `BLOCKSTREAM_CLIENT_SECRET` - OAuth client secret paired with the client identifier for generating Blockstream access tokens.
##### Start api in dev
`$ yarn start`
##### Pushing new code / Pull requests
- Make sure to branch off your changes from `main` branch.
- Make sure to run `yarn test` and add tests to your changes.
- Code on!
## Docker
You can use official `ecency/api:latest` image to run Vision locally, deploy it to staging or even production environment. The simplest way is to run it with following command:
```bash
docker run -it --rm -p 3000:3000 ecency/vision:latest
```
Configure the instance using following environment variables:
* `PRIVATE_API_ADDR`
* `PRIVATE_API_AUTH`
* `HIVESIGNER_SECRET`
* `SEARCH_API_ADDR`
* `SEARCH_API_SECRET`
* `CHAINSTACK_API_KEY`
* `CHAINZ_API_KEY`
* `BLOCKSTREAM_CLIENT_ID`
* `BLOCKSTREAM_CLIENT_SECRET`
```bash
docker run -it --rm -p 3000:3000 -e PRIVATE_API_ADDR=https://api.example.com -e PRIVATE_API_AUTH=verysecretpassword ecency/api:latest
```
### Swarm
You can easily deploy a set of vision instances to your production environment, using example `docker-compose.yml` file. Docker Swarm will automatically keep it alive and load balance incoming traffic between the containers:
```bash
docker stack deploy -c docker-compose.yml vision-api
```
## Issues
To report a non-critical issue, please file an issue on this GitHub project.
If you find a security issue please report details to: security@ecency.com
We will evaluate the risk and make a patch available before filing the issue.
[//]: # 'LINKS'
[ecency_vision]: https://ecency.com