/**
 * Etherlink relay: monitor source for destination 42793, call EtherlinkRelayReceiver.relayMintOrUnlock.
 * Env: ETHERLINK_RELAY_BRIDGE, ETHERLINK_RPC_URL, ETHERLINK_RELAY_PRIVATE_KEY.
 */
import winston from 'winston';
import { EtherlinkRelayService } from './src/EtherlinkRelayService.js';

const logger = winston.createLogger({
  level: process.env.LOG_LEVEL || 'info',
  format: winston.format.simple(),
  transports: [new winston.transports.Console()],
});

const service = new EtherlinkRelayService(logger);
service.start().catch((err) => {
  logger.error('Failed to start', err);
  process.exit(1);
});
