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 sdk entrypoint. * * @module */ /** * @napplet/nap/identity -- SDK helpers wrapping window.napplet.identity. * * These convenience functions delegate to `window.napplet.identity.*` at call time. * The shim must be imported somewhere to install the global. */ /** * Get the user's hex-encoded public key. * * @returns Hex-encoded public key string * * @example * ```ts * import { identityGetPublicKey } from '@napplet/nap/identity'; * * const pubkey = await identityGetPublicKey(); * ``` */ declare function identityGetPublicKey(): Promise; /** * Listen for shell-pushed user identity changes. * * @returns Subscription with close() to detach the handler * * @example * ```ts * import { identityOnChanged } from '@napplet/nap/identity'; * * const sub = identityOnChanged((pubkey) => { * console.log(pubkey || 'signed out'); * }); * ``` */ declare function identityOnChanged(handler: (pubkey: string) => void): Subscription; /** * Get the user's relay list (NIP-65). * * @returns Record mapping relay URLs to read/write permissions * * @example * ```ts * import { identityGetRelays } from '@napplet/nap/identity'; * * const relays = await identityGetRelays(); * ``` */ declare function identityGetRelays(): Promise>; /** * Get the user's profile metadata (kind 0). * * @returns Profile data, or null if no profile found * * @example * ```ts * import { identityGetProfile } from '@napplet/nap/identity'; * * const profile = await identityGetProfile(); * if (profile) console.log(profile.name); * ``` */ declare function identityGetProfile(): Promise; /** * Get the user's follow list (kind 3 contact list). * * @returns Array of hex-encoded public keys * * @example * ```ts * import { identityGetFollows } from '@napplet/nap/identity'; * * const follows = await identityGetFollows(); * ``` */ declare function identityGetFollows(): Promise; /** * Get entries from a user's categorized list. * * @param listType List category (e.g., "bookmarks", "interests", "pins") * @returns Array of list entry values * * @example * ```ts * import { identityGetList } from '@napplet/nap/identity'; * * const bookmarks = await identityGetList('bookmarks'); * ``` */ declare function identityGetList(listType: string): Promise; /** * Get zap receipts sent to the user. * * @returns Array of zap receipt objects * * @example * ```ts * import { identityGetZaps } from '@napplet/nap/identity'; * * const zaps = await identityGetZaps(); * ``` */ declare function identityGetZaps(): Promise; /** * Get the user's mute list (kind 10000). * * @returns Array of hex-encoded muted public keys * * @example * ```ts * import { identityGetMutes } from '@napplet/nap/identity'; * * const mutes = await identityGetMutes(); * ``` */ declare function identityGetMutes(): Promise; /** * Get the user's block list. * * @returns Array of hex-encoded blocked public keys * * @example * ```ts * import { identityGetBlocked } from '@napplet/nap/identity'; * * const blocked = await identityGetBlocked(); * ``` */ declare function identityGetBlocked(): Promise; /** * Get badges awarded to the user (NIP-58). * * @returns Array of badge objects * * @example * ```ts * import { identityGetBadges } from '@napplet/nap/identity'; * * const badges = await identityGetBadges(); * ``` */ declare function identityGetBadges(): Promise; export { identityGetBadges, identityGetBlocked, identityGetFollows, identityGetList, identityGetMutes, identityGetProfile, identityGetPublicKey, identityGetRelays, identityGetZaps, identityOnChanged };