Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Latest commit

 

History

History
67 lines (44 loc) · 1.69 KB

File metadata and controls

67 lines (44 loc) · 1.69 KB

GENERATED API WEB SERVER

ABOUT

Like generic api web server, this web server also helps to interact with Tezos Block Chain. Before setting up the express server, it calls Tezos Block chain to get the parameters schema of a smart contract (the smart contract address is retrieved from environment variable). This server supports the following features:

  • Forge operation
  • Inject transaction by passing raw transaction (forged operation) and signature
  • Send transactions, using Vault signer to sign the transactions.
  • Get the contract parameters schema
  • Get the contract storage (allow deep into complex object/map parameter)

NOTES: Please note that this web server DOES NOT SUPPORT BATCH TRANSACTIONS OPTION

Before running

Check if postgres database, rabbitMq and vault server are running. If not, you could start the services by using docker-compose.

docker-compose up -d postgres rabbitmq vault

Run with docker

docker-compose up generated-api

Run locally

Install dependencies and build the project

NOTES: This step could be skipped if it already ran.

npm i
npm run build

Install bunyan and nodemon

NOTES: This is optional. Bunyan helps to format the logs, so it is easier to read and nodemon helps auto recompile the code while you are in dev mode.

npm i -g bunyan nodemon

Run the project

npm run start | bunyan

Run in dev mode

npm run start:dev | bunyan

API DOCS

After running the server, access http://localhost:3333/api-docs/ to see the API's documentation.

NOTES: If you are running with docker, the port is 4444.