import { ReactNode } from "react"; import { Relay, Filter, Event as NostrEvent, Sub } from "nostr-tools"; type OnConnectFunc = (relay: Relay) => void; type OnDisconnectFunc = (relay: Relay) => void; type OnEventFunc = (event: NostrEvent) => void; type OnDoneFunc = () => void; type OnSubscribeFunc = (sub: Sub, relay: Relay) => void; interface NostrContextType { isLoading: boolean; debug?: boolean; connectedRelays: Relay[]; onConnect: (_onConnectCallback?: OnConnectFunc) => void; onDisconnect: (_onDisconnectCallback?: OnDisconnectFunc) => void; publish: (event: NostrEvent) => void; } export declare function NostrProvider({ children, relayUrls, debug, }: { children: ReactNode; relayUrls: string[]; debug?: boolean; }): JSX.Element; export declare function useNostr(): NostrContextType; export declare function useNostrEvents({ filter, enabled, }: { filter: Filter; enabled?: boolean; }): { isLoading: boolean; events: NostrEvent[]; onConnect: (_onConnectCallback?: OnConnectFunc | undefined) => void; connectedRelays: Relay[]; unsubscribe: () => void | void; onSubscribe: (_onSubscribeCallback: OnSubscribeFunc) => void; onEvent: (_onEventCallback: OnEventFunc) => void; onDone: (_onDoneCallback: OnDoneFunc) => void; }; export {};