import { Subscription } from '@napplet/core'; import { B as Badge, P as ProfileData, R as RelayPermission, Z as ZapReceipt } from '../value-types-KVWJqHA5.js'; /** * Napplet NAP identity shim entrypoint. * * @module */ /** * Handle identity.* result messages from the shell via the central message listener. */ declare function handleIdentityMessage(msg: { type: string; [key: string]: unknown; }): void; /** * Get the user's hex-encoded public key. * Always succeeds. Resolves to "" when no user/signer is connected. * * @returns Hex-encoded public key string, or "" */ declare function getPublicKey(): Promise; /** * Listen for shell-pushed user identity changes. * * @param handler Called with a hex pubkey, or "" when no user/signer is connected * @returns Subscription with close() to detach the handler */ declare function onChanged(handler: (pubkey: string) => void): Subscription; /** * Get the user's relay list (NIP-65). * * @returns Record mapping relay URLs to read/write permissions */ declare function getRelays(): Promise>; /** * Get the user's profile metadata (kind 0). * * @returns Profile data, or null if no profile found */ declare function getProfile(): Promise; /** * Get the user's follow list (kind 3 contact list). * * @returns Array of hex-encoded public keys */ declare function getFollows(): Promise; /** * Get entries from a user's categorized list. * * @param listType List category (e.g., "bookmarks", "interests", "pins") * @returns Array of list entry values */ declare function getList(listType: string): Promise; /** * Get zap receipts sent to the user. * * @returns Array of zap receipt objects */ declare function getZaps(): Promise; /** * Get the user's mute list (kind 10000). * * @returns Array of hex-encoded muted public keys */ declare function getMutes(): Promise; /** * Get the user's block list. * * @returns Array of hex-encoded blocked public keys */ declare function getBlocked(): Promise; /** * Get badges awarded to the user (NIP-58). * * @returns Array of badge objects */ declare function getBadges(): Promise; /** * Install the identity shim. * Identity change subscriptions are local fan-out over shell-pushed messages. * * @returns cleanup function that clears pending requests and change handlers */ declare function installIdentityShim(): () => void; export { getBadges, getBlocked, getFollows, getList, getMutes, getProfile, getPublicKey, getRelays, getZaps, handleIdentityMessage, installIdentityShim, onChanged };