The INTMAX2 Gateway is designed to support the INTMAX2 Explorer, providing seamless and efficient access to blockchain data.
Before running any service, make sure to:
# Install dependencies
yarn
# Copy environment variables
cp .env.example .env
# Build shared packages
yarn build:sharedStart the API or watcher service in development mode:
# rpc gateway
yarn workspace rpc-gateway
# prover gateway
yarn workspace prover-gatewayDeployments are automated via Cloud Build when changes are pushed or merged into specific branches.
| Branch | Environment |
|---|---|
dev |
Development |
stage |
Staging(Testnet) |
main |
Production(Mainnet) |
Build and run the project in a Docker container:
docker build -f docker/Dockerfile -t intmax2-gateway .
docker run --rm -p 3000:3000 --env-file .env intmax2-gateway workspace rpc-gateway startThe project uses Vitest for testing. Run tests with the following commands:
# Run all tests
yarn test
# Run tests in watch mode
yarn test --watch
# Run tests with coverage report
yarn coverageThe API uses API keys for authentication and rate limiting. To generate a secure API key for development or production use:
node -e "console.log('ak_' + require('crypto').randomBytes(32).toString('base64url'))"See the documentation for details on available endpoints and how to use the API. This guide will help you integrate INTMAX2 blockchain data into your applications.