import { AddressPointer, EventPointer, ProfilePointer, decode } from "nostr-tools/nip19";
import { NostrEvent } from "nostr-tools";
export type DecodeResult = ReturnType<typeof decode>;
export type AddressPointerWithoutD = Omit<AddressPointer, "identifier"> & {
    identifier?: string;
};
/** Parse the value of an "a" tag into an AddressPointer */
export declare function parseCoordinate(a: string): AddressPointerWithoutD | null;
export declare function parseCoordinate(a: string, requireD: false): AddressPointerWithoutD | null;
export declare function parseCoordinate(a: string, requireD: true): AddressPointer | null;
export declare function parseCoordinate(a: string, requireD: false, silent: false): AddressPointerWithoutD;
export declare function parseCoordinate(a: string, requireD: true, silent: false): AddressPointer;
export declare function parseCoordinate(a: string, requireD: true, silent: true): AddressPointer | null;
export declare function parseCoordinate(a: string, requireD: false, silent: true): AddressPointerWithoutD | null;
/** Extra a pubkey from the result of nip19.decode */
export declare function getPubkeyFromDecodeResult(result?: DecodeResult): string | undefined;
/** Encodes the result of nip19.decode */
export declare function encodeDecodeResult(result: DecodeResult): "" | `nprofile1${string}` | `nevent1${string}` | `naddr1${string}` | `nsec1${string}` | `npub1${string}` | `note1${string}`;
/**
 * Gets an EventPointer form a common "e" tag
 * @throws
 */
export declare function getEventPointerFromETag(tag: string[]): EventPointer;
/**
 * Gets an EventPointer form a common "q" tag
 * @throws
 */
export declare function getEventPointerFromQTag(tag: string[]): EventPointer;
/**
 * Get an AddressPointer from a common "a" tag
 * @throws
 */
export declare function getAddressPointerFromATag(tag: string[]): AddressPointer;
/**
 * Gets a ProfilePointer from a common "p" tag
 * @throws
 */
export declare function getProfilePointerFromPTag(tag: string[]): ProfilePointer;
/** Checks if a pointer is an AddressPointer */
export declare function isAddressPointer(pointer: DecodeResult["data"]): pointer is AddressPointer;
/** Checks if a pointer is an EventPointer */
export declare function isEventPointer(pointer: DecodeResult["data"]): pointer is EventPointer;
/** Returns the coordinate string for an AddressPointer */
export declare function getCoordinateFromAddressPointer(pointer: AddressPointer): string;
/**
 * Returns an AddressPointer for a replaceable event
 * @throws
 */
export declare function getAddressPointerForEvent(event: NostrEvent, relays?: string[]): AddressPointer;
/** Returns an EventPointer for an event */
export declare function getEventPointerForEvent(event: NostrEvent, relays?: string[]): EventPointer;
/**
 * Returns a pointer for a given event
 * @throws
 */
export declare function getPointerForEvent(event: NostrEvent, relays?: string[]): DecodeResult;
/** Adds relay hints to a pointer object that has a relays array */
export declare function addRelayHintsToPointer<T extends {
    relays?: string[];
}>(pointer: T, relays?: Iterable<string>): T;
/** Gets the hex pubkey from any nip-19 encoded string */
export declare function normalizeToPubkey(str: string): string;
/** Converts hex to nsec strings into Uint8 secret keys */
export declare function normalizeToSecretKey(str: string | Uint8Array): Uint8Array;
/**
 * Merges two event points and keeps all relays
 * @throws if the ids are different
 */
export declare function mergeEventPointers(a: EventPointer, b: EventPointer): EventPointer;
/**
 * Merges two address pointers and keeps all relays
 * @throws if the kinds, pubkeys, or identifiers are different
 */
export declare function mergeAddressPointers(a: AddressPointer, b: AddressPointer): AddressPointer;
/**
 * Merges two profile pointers and keeps all relays
 * @throws if the pubkeys are different
 */
export declare function mergeProfilePointers(a: ProfilePointer, b: ProfilePointer): ProfilePointer;
