/** * @typedef {import("@onflow/typedefs").Event} Event */ /** * @typedef {object} SubscribeObject * @property {Function} subscribe - The subscribe function. */ /** * @callback SubscriptionCallback * @returns {Event} */ /** * @description - Subscribe to events * @param {string} key - A valid event name * @returns {SubscribeObject} * * @example * import * as fcl from "@blocto/fcl" * fcl.events(eventName).subscribe((event) => console.log(event)) */ export function events(key: string): SubscribeObject; export type Event = import("@onflow/typedefs").Event; export type SubscribeObject = { /** * - The subscribe function. */ subscribe: Function; }; export type SubscriptionCallback = () => Event;