import { Bindings, Atom } from '@mettascript/core'; /** Gateway query payloads use MeTTa source strings on the wire. */ interface QueryRequest { readonly space: string; readonly pattern: string; } interface QueryResponse { /** Each solution as a flat list of `[varName, atomSource]` pairs. */ readonly bindings: ReadonlyArray>; } /** Shared MeTTa source wire-codec helpers for gateway clients and servers. */ declare const encodePattern: (a: Atom) => string; declare const decodeBindings: (resp: QueryResponse) => Bindings[]; /** Async browser-to-gateway transport, for example a Connect-web client. */ interface GatewayTransport { query(req: QueryRequest): Promise; } /** Browser-side async DAS access. Limitation: kernel `match` is synchronous while gateway transport * is async, so call this directly instead of `(match &das ...)`. */ declare function queryDas(transport: GatewayTransport, space: string, pattern: Atom): Promise; export { type GatewayTransport, type QueryRequest, type QueryResponse, decodeBindings, encodePattern, queryDas };