/** * Defensive helper for attributing per-item results in a VP batch RPC * response back to the requested txids. The server promises 1:1 ordered * results, but we don't trust that promise — a server bug could duplicate, * skip, or scramble items, and silent attribution-by-array-index would * mask the bug. * * Lowercases all txids on both sides to absorb case mismatch (the FE * strips `0x` but doesn't otherwise normalize). * * @module tbv/core/clients/vault-provider/batchAttribution */ /** Per-item entry in a VP batch response. */ export interface BatchResultEntry { pegin_txid: string; result: T | null; error: string | null; } /** Output of {@link attributeBatchResults}. */ export interface BatchAttributionResult { /** Lowercase requested txid -> per-item envelope. */ byTxid: Map; /** Requested txids that did not appear in the response. */ missing: string[]; /** Echoed txids that were not in the request — logged + dropped. */ unexpected: string[]; /** Echoed txids that appeared more than once — first kept, rest dropped. */ duplicate: string[]; } /** * Attribute batch results to requested txids defensively. * * Both `requestedTxids` and the echoed `pegin_txid` field on each result * are lowercased before lookup. Duplicates and unexpected echoes are * surfaced so callers can flag the affected items as errored rather than * silently overwriting state. * * `requestedTxids` may contain duplicates; they are de-duplicated for the * purposes of map keys (each unique txid becomes a single map entry). */ export declare function attributeBatchResults(requestedTxids: string[], results: ReadonlyArray>): BatchAttributionResult; //# sourceMappingURL=batchAttribution.d.ts.map