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
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
docker-compose up generated-api
NOTES: This step could be skipped if it already ran.
npm i
npm run build
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
npm run start | bunyan
npm run start:dev | bunyan
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.