A bridge API that maps Initia blockchain data to Aptos-compatible formats.
pnpm install# Start the server
pnpm start
# Development mode
pnpm dev
# Start with custom options
pnpm start -- --port 4000 --cache-enabled true --cache-duration "10 minutes"
# Start with debug mode enabled (logs all requests)
pnpm start -- --debug-p, --port <number>- Port to run the server on (default: 3000)-c, --chain-id <string>- Chain ID for Initia (default: echelon-1)-e, --endpoint <url>- Indexer endpoint URL--cache-enabled <boolean>- Enable API response caching (default: true)--cache-duration <string>- Cache duration in plain English (default: "5 minutes")-d, --debug- Enable debug mode with request logging
/v1- Returns Initia node info in Aptos format/v1/blocks/by_height/:height- Returns block data by height in Aptos format/v1/accounts/:address/modules- Returns account modules
When caching is enabled, the following endpoints are available:
/api/cache/performance- Returns cache performance statistics/api/cache/index- Returns the current cache index/api/cache/clear- Clears the entire cache/api/cache/clear/:target- Clears a specific target
Run the tests with:
pnpm testRun tests with coverage:
pnpm test:coverage