//#region src/utils/text.d.ts /** * Decodes blockchain event attributes from various formats to strings * Handles both string and Uint8Array inputs from Tendermint events * @param x - The attribute value to decode (string or Uint8Array) * @returns Decoded string value */ declare const decodeAttr: (x: Uint8Array | string) => string; /** Minimal shape of an ABCI event, compatible with both CometBFT 0.37 and 0.38 response types */ type ModeTaggedEvent = { attributes: readonly { key: Uint8Array | string; value: Uint8Array | string; }[]; }; /** Values Cosmos SDK 0.50+ stamps on `finalize_block_events` to mark their origin (baseapp.go) */ type BlockEventMode = "BeginBlock" | "EndBlock"; /** * Checks whether a finalize_block event carries the given `mode` attribute. * The SDK emits `mode=BeginBlock` / `mode=EndBlock`; the snake_case spellings * are accepted as well so forks that lowercase the value keep working. * @param event - Event with an attributes array * @param mode - Which phase of the block the event must belong to * @returns true when the event has a matching `mode` attribute */ declare const hasBlockEventMode: (event: ModeTaggedEvent, mode: BlockEventMode) => boolean; /** * Returns a URL that is safe to log: the password part of any credentials is masked. * Strings that do not parse as a URL are returned unchanged. */ declare const redactUrl: (url: string) => string; //#endregion export { BlockEventMode, ModeTaggedEvent, decodeAttr, hasBlockEventMode, redactUrl }; //# sourceMappingURL=text.d.mts.map