import type { CurrencyConfig } from '../config'; import type { CoinModuleImpl, OptionalApiKey } from './impl'; import type { CoinModuleApi, Memo, MemoNotSupported, TxData, TxDataNotSupported } from './types'; /** * What {@link withDefaults} returns: the full consumer contract, plus `supports()`. * * `getAccountInfo` is narrowed to required. It is the one managed capability that * {@link CoinModuleApi} itself declares optional, and `withDefaults` always supplies it — so * callers can invoke it without a non-null assertion, and read `type` to tell a real answer from * the `{ type: 'none' }` sentinel. */ export type WithDefaultsResult = CoinModuleApi & Required, 'getAccountInfo'>> & { supports: (method: OptionalApiKey) => boolean; }; /** * Widens a {@link CoinModuleImpl} authoring value to the full {@link CoinModuleApi} * consumer contract by backfilling the capability methods the author omitted, and attaches * a `supports()` introspection helper. * * Default per omitted method: * - `getAccountInfo` → a `{ type: 'none' }` sentinel (ADR-045): having no extra account * metadata is an answer, so callers get one instead of an exception. * - every other capability → `notSupported(name)`, which throws `" is not supported"`. * * Properties the authoring object carries beyond the API surface are preserved. * * A capability method is considered implemented only when the author supplied a real * function — a `notSupported()` stub is treated as if the method had been omitted. */ export declare function withDefaults>(impl: CoinModuleImpl & Extra): WithDefaultsResult & Extra; //# sourceMappingURL=withDefaults.d.ts.map