Skip to content

InternetMaximalism/intmax2-gateway

intmax2-gateway

The INTMAX2 Gateway is designed to support the INTMAX2 Explorer, providing seamless and efficient access to blockchain data.

Setup

Before running any service, make sure to:

# Install dependencies
yarn

# Copy environment variables
cp .env.example .env

# Build shared packages
yarn build:shared

Development

Start the API or watcher service in development mode:

# rpc gateway
yarn workspace rpc-gateway

# prover gateway
yarn workspace prover-gateway

Deployment

Deployments are automated via Cloud Build when changes are pushed or merged into specific branches.

Branch Environment
dev Development
stage Staging(Testnet)
main Production(Mainnet)

Docker

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 start

Testing

The 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 coverage

X-API-KEY

The 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'))"

Docs

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.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published