/** * @pwngh/economy-lab * * Copyright (c) Preston Neal * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */ import type { Store } from '../ports.js'; /** * Server side of the HTTP store adapter: a {@link Request} -> {@link Response} function * answering each request against the backing {@link Store}. * * Success sends `{ ok: true, body }`; a thrown handler sends `{ ok: false, error }` with the * message, always HTTP 200. The client re-throws on that shape, so a failed call rolls its * transaction back like an in-process call would. * * @see {@link https://economy-lab-docs.pages.dev/economy/reference/http-service/ HTTP service} for * the request protocol and route map. */ export declare function createStoreServer(backing: Store): (request: Request) => Promise;