import type { CoinModuleImpl, OptionalApiKey } from '../api/impl'; import type { Memo, TxData } from '../api/types'; import type { Context, CurrencyConfig } from '../config'; /** * What a module reports about the capabilities it does not implement, as a consumer sees it * through `withDefaults`. Meant to be asserted whole: * * ```ts * await expect(capabilityReport(createApi(), context)).resolves.toEqual({ * unsupported: ['call', 'craftRawTransaction', 'getRewards', 'getValidators', 'register'], * inconsistent: [], * }) * ``` * * One expectation then covers what a module's api test used to spell out method by method: * that each capability is absent, that reaching it raises `" is not supported"`, and * that `supports()` agrees. `toEqual` makes it exhaustive — a capability dropped or newly * implemented changes the list, so the test notices instead of silently still passing. * * It reads a module written either way: a `CoinModuleImpl` that omits its capabilities, or a * value built by spreading `notSupportedApi()`. Both are "not implemented" as far as * `supports()` is concerned, which is what this observes. */ export type CapabilityReport = { /** Capabilities the module does not implement, sorted, each verified to raise its error. */ unsupported: OptionalApiKey[]; /** * Capabilities `supports()` calls absent but which did not raise `" is not * supported"` when reached — a missing backfill, or an error naming another method. * Expected to be empty. */ inconsistent: OptionalApiKey[]; }; /** * Builds a {@link CapabilityReport} for a coin module. * * Only the capabilities `supports()` reports absent are actually invoked — a real * implementation is never called, so this never reaches the network. * * `getAccountInfo` is excluded: per ADR-045 its default is the `{ type: 'none' }` sentinel * rather than an error, so it is not a capability in the sense the rest of this list is. */ export declare function capabilityReport(impl: CoinModuleImpl, context: Context): Promise; //# sourceMappingURL=capabilities.d.ts.map