/** * Pure helper for resolving a running runtime handle by wallet address. * * Extracted from `getRuntimeHandleByAddressOrRespond` in `src/index.ts` so * both the HTTP route layer (S4) and the gateway shim (S6) can share the * lookup logic without the respond-on-error side-effect. */ import type { RuntimeHandle } from "../../runtime/run.js"; /** * Discriminated result of a handle lookup. * * Use `found` to narrow: * - `true` → `runtimeId` and `handle` are available. * - `false` → `code` is always `"NOT_FOUND"` and `message` describes the miss. */ export type LookupResult = { found: true; runtimeId: string; handle: RuntimeHandle; } | { found: false; code: "NOT_FOUND"; message: string; }; /** * Find a running runtime by lowercased wallet address. * * Matches case-insensitively — wallet addresses from the runtime's strategy * config may differ in capitalisation from caller-supplied values. * * @param handles The live map maintained by the plugin (`runtimeHandles`). * @param address Wallet address to search for. Case is normalised internally. * @returns A discriminated union; never throws. */ export declare function findRuntimeHandleByAddress(handles: Map, address: string): LookupResult; //# sourceMappingURL=runtime-lookup.d.ts.map