UNPKG

@lodestar/api

Version:

A Typescript REST client for the Ethereum Consensus API

12 lines 450 B
import { createFastifyRoutes } from "../../utils/server/index.js"; import { getDefinitions } from "../routes.js"; export function getRoutes(config, methods) { return createFastifyRoutes(getDefinitions(config), methods); } export function registerRoutes(server, config, methods) { const routes = getRoutes(config, methods); for (const route of Object.values(routes)) { server.route(route); } } //# sourceMappingURL=index.js.map