/** * Ecosystem-wide revert decoder. * * A revert from a nested call bubbles its raw bytes up unchanged, but a * custom error can only be NAMED if its 4-byte selector is known to the * decoder. Decoding with just the called contract's ABI therefore misses * errors raised by children (vault -> adapter -> underlying protocol -> * token). Selectors hash the error signature alone, not the emitting * contract, so one merged dictionary decodes any call depth. * * This module unions every error fragment from the ABIs shipped with the * SDK, plus widely-deployed standards (OpenZeppelin v5, Solidity built-ins), * deduped by selector. `formatContractError` uses it as a fallback after * the called contract's own interface; apps can also call * `describeRevertData` directly on raw revert bytes (e.g. from viem). * * Adding a new ABI to `constants/abis.ts` and to `SHIPPED_ABIS` below is * the only wiring a future adapter needs. */ import { Interface } from "ethers"; /** Merged Interface of every custom error the SDK knows about. */ export declare const ERROR_DICTIONARY: Interface; /** * Decode raw revert bytes into a human-readable reason, regardless of how * deep in the call tree they were raised. Handles, in order: custom errors * known to the dictionary, `Error(string)` requires, and `Panic(uint256)`. * Returns null when the data is empty or matches nothing, so the caller * can fall back to its own message (keeping the raw selector visible). */ export declare function describeRevertData(data: string): string | null;