import { CommonNip19DecodeResult, CommonNip19EncodeInput, CommonNip19EncodeResult, CommonActionResult, CommonFollowsResult, CommonProfileTarget, CommonProfileResult, CommonReaction, CommonReportTarget, CommonReportReason } from '@napplet/core'; /** * Napplet NAP common shim entrypoint. * * @module */ /** * Handle common.* messages from the shell via the central message listener. * Covers every NAP-COMMON result envelope. */ declare function handleCommonMessage(msg: { type: string; [key: string]: unknown; }): void; /** * Encode a supported public NIP-19 value. `nsec` is intentionally unsupported. * @param input Structured NIP-19 encode input * @returns Promise resolving to the shell encode result */ declare function encodeNip19(input: CommonNip19EncodeInput): Promise; /** * Decode a supported public NIP-19 value. `nsec` is intentionally unsupported. * @param value NIP-19 value to decode * @returns Promise resolving to normalized decoded fields */ declare function decodeNip19(value: string): Promise; /** * Resolve a profile by hex pubkey, npub, or nprofile. * @param target Profile target * @returns Promise resolving to latest profile data when available */ declare function getProfile(target: CommonProfileTarget): Promise; /** * Return the shell user's followed pubkeys as hex. * @returns Promise resolving to followed pubkeys */ declare function follows(): Promise; /** * Ask the shell to follow one or more npub targets. * @param pubkeys Npub targets to follow * @returns Promise resolving to the action result */ declare function follow(...pubkeys: string[]): Promise; /** * Ask the shell to unfollow one or more npub targets. * @param pubkeys Npub targets to unfollow * @returns Promise resolving to the action result */ declare function unfollow(...pubkeys: string[]): Promise; /** * React to a native Nostr event. * @param targetEventId Event id to react to * @param reaction Reaction content * @param customEmojiHref Optional custom emoji URL * @returns Promise resolving to the action result */ declare function react(targetEventId: string, reaction: CommonReaction, customEmojiHref?: string): Promise; /** * Report an event or pubkey with a NIP-56 reason. * @param target Structured report target * @param reason NIP-56 report reason * @param text Report text * @returns Promise resolving to the action result */ declare function report(target: CommonReportTarget, reason: CommonReportReason, text: string): Promise; /** * Install the common shim. Registration-only -- common actions are issued on * demand, not at install time. * * @returns cleanup function that clears pending requests */ declare function installCommonShim(): () => void; export { decodeNip19, encodeNip19, follow, follows, getProfile, handleCommonMessage, installCommonShim, react, report, unfollow };