import { z } from 'zod'; import type { ApiSchemaFor } from '../schemas/index.js'; /** Exposed API to the P2P bootstrap node. */ export interface P2PBootstrapApi { /** * Returns the ENR for this node. */ getEncodedEnr(): Promise; /** * Returns ENRs for all nodes in the routing table. */ getRoutingTable(): Promise; } export const P2PBootstrapApiSchema: ApiSchemaFor = { getEncodedEnr: z.function().returns(z.string()), getRoutingTable: z.function().returns(z.array(z.string())), };