This repository includes the codebase for our reusable Institutional Edge Agent API.For more information, please visit our Github Page.
Run without Docker
Running Hyperledger Indy Node Pool.
Running MongoDB instance which is used for persistence on top of Indy-DLT to support stateless REST API.
Libindy v1.6.1 installed on your system.
NOTE: libindy creates a
.indy_clientdirectory in your home directory to store data. If API does not connect correctly to the pool, please remove this directory to allow for new configuration settings.Configuration either through environment variables or .env. Environment configuration is documented in
env-example.A
pool_transactions_genesisfile for the running pool. It can be generated using the tools in idchain-commons or, if running theidchain/test-pooldocker image, read from the test-pool container withdocker exec <CONTAINER_NAME> bash -c 'cat "/home/indy/.indy-cli/networks/$IDC_POOL_NAME/pool_transactions_genesis"' > pool_transactions_genesisThe high-level schema compiler situated at [idchain-schema-api]. Follow the instructions on the
README.mdof that repository on how to build and run the schema compiler HTTP api.
# install dependencies
npm install
# run the api
npm run dev
# for tests
npm testRun with Docker and Docker-Compose
This will build and run 4 services: Indy-Pool, MongoDB, Schema-Compiler, and this API.
Docker and Docker-Compose
Configuration either through environment variables or .env. Environment configuration is documented in
env-example.A
pool_transactions_genesisfile for the running pool. It can be generated using the tools in idchain-commons or, if running theidchain/test-pooldocker image, read from the test-pool container with# start the test-pool if it is not running already docker-compose up pool # read and output the pool_transactions_genesis docker exec api_pool_1 bash -c 'cat "/home/indy/.indy-cli/networks/$IDC_POOL_NAME/pool_transactions_genesis"' > pool_transactions_genesisThe docker image built using the idchain-commons repository.
# for normal deploy:
docker-compose up
# for live-reload:# need to specify --name, --service-ports, and --use-aliases# docker-compose run not apply these from docker-compose.yaml
docker-compose run --name idchain-api --service-ports --use-aliases -v $PWD:/home/indy/app api npm run dev
# while container is running, for tests:
docker exec -it -u indy idchain-api npm test