import { NostrEvent, UnsignedEvent } from "nostr-tools";
import { EventSet } from "../event-store/event-set.js";
import { EncryptedContentSigner } from "./encrypted-content.js";
/**
 * An internal event set to keep track of seals and rumors
 * This is intentially isolated from the main applications event store so to prevent seals and rumors from being leaked
 */
export declare const internalGiftWrapEvents: EventSet;
export type Rumor = UnsignedEvent & {
    id: string;
};
/** Used to store a reference to the seal event on gift wraps (downstream) or the seal event on rumors (upstream[]) */
export declare const SealSymbol: unique symbol;
/** Used to store a reference to the rumor on seals (downstream) */
export declare const RumorSymbol: unique symbol;
/** Used to store a reference to the parent gift wrap event on seals (upstream) */
export declare const GiftWrapSymbol: unique symbol;
/** Checks if an event is a rumor (normal event with "id" and no "sig") */
export declare function isRumor(event: any): event is Rumor;
/** Returns all the parent gift wraps for a seal event */
export declare function getSealGiftWrap(seal: NostrEvent): NostrEvent | undefined;
/** Returns all the parent seals for a rumor event */
export declare function getRumorSeals(rumor: Rumor): NostrEvent[];
/** Returns all the parent gift wraps for a rumor event */
export declare function getRumorGiftWraps(rumor: Rumor): NostrEvent[];
/** Checks if a seal event is locked */
export declare function isSealLocked(seal: NostrEvent): boolean;
/** Gets the rumor from a seal event */
export declare function getSealRumor(seal: NostrEvent): Rumor | undefined;
/** Returns the seal event in a gift-wrap event */
export declare function getGiftWrapSeal(gift: NostrEvent): NostrEvent | undefined;
/** Returns the unsigned rumor in the gift-wrap */
export declare function getGiftWrapRumor(gift: NostrEvent): Rumor | undefined;
/** Returns if a gift-wrap event or gift-wrap seal is locked */
export declare function isGiftWrapLocked(gift: NostrEvent): boolean;
/**
 * Unlocks a seal event and returns the rumor event
 * @throws {Error} If the author of the rumor event does not match the author of the seal
 */
export declare function unlockSeal(seal: NostrEvent, signer: EncryptedContentSigner): Promise<Rumor>;
/**
 * Unlocks and returns the unsigned seal event in a gift-wrap
 * @throws {Error} If the author of the rumor event does not match the author of the seal
 */
export declare function unlockGiftWrap(gift: NostrEvent, signer: EncryptedContentSigner): Promise<Rumor>;
export declare function lockGiftWrap(gift: NostrEvent): void;
