import type { DownstreamCredential } from "../../credential/DownstreamCredential.js"; import type { FetchLike } from "../../handlers/HandlerRegistration.js"; import { type Sha256 } from "../JcsDigest.js"; import { type AdapterExecution, type AdapterReconciliation, type ProviderReconciliationResult, type ProviderResult } from "../EffectAdapter.js"; import type { BankingAction } from "./BankingAction.js"; import type { BankingTransport } from "./BankingAdapter.js"; export interface CoreBankingHttpOptions { readonly url: string; /** `{provider_reference}` is substituted; absent when the provider has no lookup. */ readonly lookupByReferenceUrl: string | null; /** `{idempotency_key}` is substituted; absent when the provider has no lookup. */ readonly lookupByKeyUrl: string | null; readonly credential: DownstreamCredential; readonly fetch: FetchLike; readonly source: string; } /** * The reference transport for the banking family: one HTTP call per action, * with the outcome mapping written out rather than inferred. * * | The provider says | This boundary reports | * | ---------------------------------------- | -------------------------------------------- | * | 2xx, a status meaning it took the request | `COMMITTED`, acknowledged, not yet confirmed | * | 2xx, a status meaning it posted | `COMMITTED`, then read back before confirming | * | a deterministic refusal with a body | `FAILED`, nothing was effected | * | anything else: no body, a timeout, a 5xx | indeterminate, and reconciliation owns it | * * An acknowledgement is never a confirmation, and the absence of an error is * never success: only a read-back whose projection matches what was * authorised confirms anything. */ export declare class CoreBankingHttpAdapter implements BankingTransport { private readonly options; constructor(options: CoreBankingHttpOptions); execute(execution: AdapterExecution): Promise; reconcile(context: AdapterReconciliation): Promise; /** Reads the effect back, by reference when the provider gave one, else by key. */ private readBack; private lookupUrl; /** * The digest of the material subset of the answer: the fields that say * what happened, and nothing else. A provider body is never hashed whole, * because it may carry anything, including things this process must not * retain. */ static materialDigest(response: { readonly status: string; readonly reference?: string | undefined; readonly reason_code?: string | undefined; readonly effect?: Record | undefined; }): Sha256; /** For a caller that holds a body it did not parse; the same subset rule. */ static digestOfText(text: string): Sha256; } //# sourceMappingURL=CoreBankingHttpAdapter.d.ts.map