/** * @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 { Anchor } from '../ports.js'; export interface HttpAnchorConfig { /** * The external log or store each sealed checkpoint is POSTed to. It must live outside the * ledger's database, or the anchor proves nothing. */ url: string; /** * Supplies the `fetch` implementation. Defaults to the global `fetch`, which avoids any * node-specific dependency. Tests pass a stand-in. */ fetch?: typeof fetch; } /** * Builds the {@link Anchor} that POSTs one sealed checkpoint to an external endpoint over HTTP, * the row as plain JSON. A network error or a non-2xx response throws a retryable * `PROVIDER.FAILURE`; the seal logs it and moves on, and the checkpoint id rides an * `Idempotency-Key` header so a later re-anchor of the same row dedupes at the receiver. */ export declare function httpAnchor(config: HttpAnchorConfig): Anchor;