/* tslint:disable */
/* eslint-disable */
export function initLogger(level: LogLevel): void;
/**
 * Encrypt (NIP04)
 */
export function nip04Encrypt(secret_key: SecretKey, public_key: PublicKey, text: string): string;
/**
 * Decrypt (NIP04)
 */
export function nip04Decrypt(secret_key: SecretKey, public_key: PublicKey, encrypted_content: string): string;
/**
 * Encrypt (NIP44)
 */
export function nip44Encrypt(secret_key: SecretKey, public_key: PublicKey, content: string, version: NIP44Version): string;
/**
 * Decrypt (NIP44)
 */
export function nip44Decrypt(secret_key: SecretKey, public_key: PublicKey, payload: string): string;
export function nip57AnonymousZapRequest(data: ZapRequestData): Event;
export function nip57PrivateZapRequest(data: ZapRequestData, keys: Keys): Event;
export function nip57DecryptSentPrivateZapMessage(secret_key: SecretKey, public_key: PublicKey, private_zap: Event): Event;
export function nip57DecryptReceivedPrivateZapMessage(secret_key: SecretKey, private_zap: Event): Event;
export function extractRelayList(event: Event): RelayListItem[];
/**
 * Generate shared key
 *
 * **Important: use of a strong cryptographic hash function may be critical to security! Do NOT use
 * unless you understand cryptographical implications.**
 */
export function generateSharedKey(secret_key: SecretKey, public_key: PublicKey): Uint8Array;
/**
 * Run some stuff when the Wasm module is instantiated.
 *
 * Right now, it does the following:
 *
 * * Redirect Rust panics to JavaScript console.
 */
export function start(): void;
export function gitHashVersion(): string | undefined;
export enum AdmitStatus {
  Success = 0,
  Rejected = 1,
}
export enum Alphabet {
  A = 0,
  B = 1,
  C = 2,
  D = 3,
  E = 4,
  F = 5,
  G = 6,
  H = 7,
  I = 8,
  J = 9,
  K = 10,
  L = 11,
  M = 12,
  N = 13,
  O = 14,
  P = 15,
  Q = 16,
  R = 17,
  S = 18,
  T = 19,
  U = 20,
  V = 21,
  W = 22,
  X = 23,
  Y = 24,
  Z = 25,
}
export enum DataVendingMachineStatus {
  PaymentRequired = 0,
  Processing = 1,
  Error = 2,
  Success = 3,
  Partial = 4,
}
/**
 * Encrypted Secret Key version (NIP49)
 */
export enum EncryptedSecretKeyVersion {
  V2 = 0,
}
/**
 * Flag checks
 */
export enum FlagCheck {
  /**
   * Use `OR` logic operator
   */
  Any = 0,
  /**
   * Use `AND` logic operator
   */
  All = 1,
}
export enum HttpMethod {
  GET = 0,
  POST = 1,
  PUT = 2,
  PATCH = 3,
}
/**
 * Key security
 */
export enum KeySecurity {
  /**
   * The key has been known to have been handled insecurely (stored unencrypted, cut and paste unencrypted, etc)
   */
  Weak = 0,
  /**
   * The key has NOT been known to have been handled insecurely (stored encrypted, cut and paste encrypted, etc)
   */
  Medium = 1,
  /**
   * The client does not track this data
   */
  Unknown = 2,
}
/**
 * Standardized kind
 */
export enum KindStandard {
  /**
   * Metadata (NIP01 and NIP05)
   */
  Metadata = 0,
  /**
   * Short Text Note (NIP01)
   */
  TextNote = 1,
  /**
   * Contacts (NIP02)
   */
  ContactList = 2,
  /**
   * OpenTimestamps Attestations (NIP03)
   */
  OpenTimestamps = 3,
  /**
   * Event Deletion (NIP09)
   */
  EventDeletion = 4,
  /**
   * Repost (NIP18)
   */
  Repost = 5,
  /**
   * Generic Repost (NIP18)
   */
  GenericRepost = 6,
  /**
   * Comment (NIP22)
   */
  Comment = 7,
  /**
   * Reaction (NIP25)
   */
  Reaction = 8,
  /**
   * Badge Award (NIP58)
   */
  BadgeAward = 9,
  /**
   * Blossom Authorization
   */
  BlossomAuth = 10,
  /**
   * Channel Creation (NIP28)
   */
  ChannelCreation = 11,
  /**
   * Channel Metadata (NIP28)
   */
  ChannelMetadata = 12,
  /**
   * Channel Message (NIP28)
   */
  ChannelMessage = 13,
  /**
   * Channel Hide Message (NIP28)
   */
  ChannelHideMessage = 14,
  /**
   * Channel Mute User (NIP28)
   */
  ChannelMuteUser = 15,
  /**
   * Git Patch
   *
   * <https://github.com/nostr-protocol/nips/blob/master/34.md>
   */
  GitPatch = 16,
  /**
   * Git Issue
   *
   * <https://github.com/nostr-protocol/nips/blob/master/34.md>
   */
  GitIssue = 17,
  /**
   * Git Reply
   *
   * <https://github.com/nostr-protocol/nips/blob/master/34.md>
   */
  GitReply = 18,
  /**
   * Open Status of Git Patch or Issue
   *
   * <https://github.com/nostr-protocol/nips/blob/master/34.md>
   */
  GitStatusOpen = 19,
  /**
   * Applied / Merged Status of Git Patch or Resolved Status of Git Issue
   *
   * <https://github.com/nostr-protocol/nips/blob/master/34.md>
   */
  GitStatusApplied = 20,
  /**
   * Closed Status of Git Patch or Issue
   *
   * <https://github.com/nostr-protocol/nips/blob/master/34.md>
   */
  GitStatusClosed = 21,
  /**
   * Draft Status of Git Patch or Issue
   *
   * <https://github.com/nostr-protocol/nips/blob/master/34.md>
   */
  GitStatusDraft = 22,
  /**
   * Torrent
   *
   * <https://github.com/nostr-protocol/nips/blob/master/35.md>
   */
  Torrent = 23,
  /**
   * Torrent comment
   *
   * <https://github.com/nostr-protocol/nips/blob/master/35.md>
   */
  TorrentComment = 24,
  /**
   * Label
   *
   * <https://github.com/nostr-protocol/nips/blob/master/32.md>
   */
  Label = 25,
  /**
   * Wallet Service Info (NIP47)
   */
  WalletConnectInfo = 26,
  /**
   * Reporting (NIP56)
   */
  Reporting = 27,
  /**
   * Zap Private Message (NIP57)
   */
  ZapPrivateMessage = 28,
  /**
   * Zap Request (NIP57)
   */
  ZapRequest = 29,
  /**
   * Zap Receipt (NIP57)
   */
  ZapReceipt = 30,
  /**
   * Mute List
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  MuteList = 31,
  /**
   * Pin List
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  PinList = 32,
  /**
   * Bookmarks
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  Bookmarks = 33,
  /**
   * Communities
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  Communities = 34,
  /**
   * Public Chats
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  PublicChats = 35,
  /**
   * Blocked Relays
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  BlockedRelays = 36,
  /**
   * Search Relays
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  SearchRelays = 37,
  /**
   * Simple Groups
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  SimpleGroups = 38,
  /**
   * Interests
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  Interests = 39,
  /**
   * Emojis
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  Emojis = 40,
  /**
   * Follow Set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  FollowSet = 41,
  /**
   * Relay Set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  RelaySet = 42,
  /**
   * Bookmark Set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  BookmarkSet = 43,
  /**
   * Articles Curation Set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  ArticlesCurationSet = 44,
  /**
   * Videos Curation Set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  VideosCurationSet = 45,
  /**
   * Interest Set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  InterestSet = 46,
  /**
   * Emoji Set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  EmojiSet = 47,
  /**
   * Release Artifact Set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  ReleaseArtifactSet = 48,
  /**
   * Relay List Metadata (NIP65)
   */
  RelayList = 49,
  /**
   * Peer-to-peer Order events
   *
   * <https://github.com/nostr-protocol/nips/blob/master/69.md>
   */
  PeerToPeerOrder = 50,
  /**
   * Request to Vanish (NIP62)
   *
   * <https://github.com/nostr-protocol/nips/blob/master/62.md>
   */
  RequestToVanish = 51,
  /**
   * Client Authentication (NIP42)
   */
  Authentication = 52,
  /**
   * Wallet Connect Request (NIP47)
   */
  WalletConnectRequest = 53,
  /**
   * Wallet Connect Response (NIP47)
   */
  WalletConnectResponse = 54,
  WalletConnectNotification = 55,
  /**
   * Nostr Connect (NIP46)
   */
  NostrConnect = 56,
  /**
   * Live Event (NIP53)
   */
  LiveEvent = 57,
  /**
   * Live Event Message (NIP53)
   */
  LiveEventMessage = 58,
  /**
   * Profile Badges (NIP58)
   */
  ProfileBadges = 59,
  /**
   * Badge Definition (NIP58)
   */
  BadgeDefinition = 60,
  /**
   * Seal (NIP59)
   */
  Seal = 61,
  /**
   * Gift Wrap (NIP59)
   */
  GiftWrap = 62,
  /**
   * Private Direct message
   *
   * <https://github.com/nostr-protocol/nips/blob/master/17.md>
   */
  PrivateDirectMessage = 63,
  /**
   * Inbox Relays (NIP17)
   */
  InboxRelays = 64,
  /**
   * MLS Key Package Relays (NIP104)
   */
  MlsKeyPackageRelays = 65,
  /**
   * MLS Key Package (NIP104)
   */
  MlsKeyPackage = 66,
  /**
   * MLS Welcome (NIP104)
   */
  MlsWelcome = 67,
  /**
   * MLS Group Message (NIP104)
   */
  MlsGroupMessage = 68,
  /**
   * Long-form Text Note (NIP23)
   */
  LongFormTextNote = 69,
  /**
   * Git Repository Announcement
   *
   * <https://github.com/nostr-protocol/nips/blob/master/34.md>
   */
  GitRepoAnnouncement = 70,
  /**
   * Application-specific Data (NIP78)
   */
  ApplicationSpecificData = 71,
  /**
   * File Metadata (NIP94)
   */
  FileMetadata = 72,
  /**
   * HTTP Auth (NIP98)
   */
  HttpAuth = 73,
  /**
   * Set stall (NIP15)
   */
  SetStall = 74,
  /**
   * Set product (NIP15)
   */
  SetProduct = 75,
  /**
   * Job Feedback (NIP90)
   */
  JobFeedback = 76,
  /**
   * User Status
   *
   * <https://github.com/nostr-protocol/nips/blob/master/38.md>
   */
  UserStatus = 77,
  /**
   * Cashu Wallet
   *
   * <https://github.com/nostr-protocol/nips/blob/master/60.md>
   */
  CashuWallet = 78,
  /**
   * Cashu Wallet Unspent Proof
   *
   * <https://github.com/nostr-protocol/nips/blob/master/60.md>
   */
  CashuWalletUnspentProof = 79,
  /**
   * Cashu Wallet Spending History
   *
   * <https://github.com/nostr-protocol/nips/blob/master/60.md>
   */
  CashuWalletSpendingHistory = 80,
  /**
   * Code Snippet
   *
   * <https://github.com/nostr-protocol/nips/blob/master/C0.md>
   */
  CodeSnippet = 81,
  Poll = 82,
  PollResponse = 83,
}
export enum NIP44Version {
  V2 = 2,
}
/**
 * NIP47 Response Error codes
 */
export enum Nip47ErrorCode {
  /**
   *  The client is sending commands too fast.
   */
  RateLimited = 0,
  /**
   * The command is not known of is intentionally not implemented
   */
  NotImplemented = 1,
  /**
   * The wallet does not have enough funds to cover a fee reserve or the payment amount
   */
  InsufficientBalance = 2,
  /**
   * The payment failed. This may be due to a timeout, exhausting all routes, insufficient capacity or similar.
   */
  PaymentFailed = 3,
  /**
   * The invoice could not be found by the given parameters.
   */
  NotFound = 4,
  /**
   * The wallet has exceeded its spending quota
   */
  QuotaExceeded = 5,
  /**
   * This public key is not allowed to do this operation
   */
  Restricted = 6,
  /**
   * This public key has no wallet connected
   */
  Unauthorized = 7,
  /**
   * An internal error
   */
  Internal = 8,
  /**
   * Other error
   */
  Other = 9,
}
export enum RelayMetadata {
  Read = 0,
  Write = 1,
}
export enum RelayStatus {
  /**
   * Initialized
   */
  Initialized = 0,
  /**
   * Pending
   */
  Pending = 1,
  /**
   * Connecting
   */
  Connecting = 2,
  /**
   * Connected
   */
  Connected = 3,
  /**
   * Disconnected, will retry to connect again
   */
  Disconnected = 4,
  /**
   * Completely disconnected
   */
  Terminated = 5,
  /**
   * The relay has been banned.
   */
  Banned = 6,
  /**
   * Relay is sleeping
   */
  Sleeping = 7,
}
/**
 * Report
 *
 * <https://github.com/nostr-protocol/nips/blob/master/56.md>
 */
export enum Report {
  /**
   * Depictions of nudity, porn, etc
   */
  Nudity = 0,
  /**
   * Virus, trojan horse, worm, robot, spyware, adware, back door, ransomware, rootkit, kidnapper, etc.
   */
  Malware = 1,
  /**
   * Profanity, hateful speech, etc.
   */
  Profanity = 2,
  /**
   * Something which may be illegal in some jurisdiction
   */
  Illegal = 3,
  /**
   * Spam
   */
  Spam = 4,
  /**
   * Someone pretending to be someone else
   */
  Impersonation = 5,
  /**
   *  Reports that don't fit in the above categories
   */
  Other = 6,
}
export enum SaveEventStatus {
  /**
   * The event has been successfully saved into the database
   */
  Success = 0,
  /**
   * Ephemeral events aren't expected to be stored
   */
  Ephemeral = 1,
  /**
   * The event already exists
   */
  Duplicate = 2,
  /**
   * The event was deleted
   */
  Deleted = 3,
  /**
   * The event is expired
   */
  Expired = 4,
  /**
   * The event was replaced
   */
  Replaced = 5,
  /**
   * Attempt to delete a non-owned event
   */
  InvalidDelete = 6,
  /**
   * Other reason
   */
  Other = 7,
}
export enum SyncDirection {
  Up = 0,
  Down = 1,
  Both = 2,
}
/**
 * Transaction State
 */
export enum TransactionState {
  /**
   * Pending
   */
  Pending = 0,
  /**
   * Settled
   */
  Settled = 1,
  /**
   * Expired (for invoices)
   */
  Expired = 2,
  /**
   * Failed (for payments)
   */
  Failed = 3,
}
/**
 * Transaction Type
 */
export enum TransactionType {
  /**
   * Incoming payments
   */
  Incoming = 0,
  /**
   * Outgoing payments
   */
  Outgoing = 1,
}
export enum ZapType {
  /**
   * Public
   */
  Public = 0,
  /**
   * Private
   */
  Private = 1,
  /**
   * Anonymous
   */
  Anonymous = 2,
}

interface HandleNotification {
    handleEvent: (relayUrl: string, subscriptionId: string, event: Event) => Promise<boolean>;
    handleMsg: (relayUrl: string, message: RelayMessage) => Promise<boolean>;
}



interface AdmitPolicy {
    admitEvent: (event: Event) => Promise<AdmitStatus>;
}


export class AbortHandle {
  private constructor();
  free(): void;
  /**
   * Abort thread
   */
  abort(): void;
  /**
   * Check if thread is aborted
   */
  is_aborted(): boolean;
}
export class Aes256Gcm {
  free(): void;
  constructor(key: string, iv: string);
  key: string;
  iv: string;
}
/**
 * Groups of articles picked by users as interesting and/or belonging to the same category
 *
 * <https://github.com/nostr-protocol/nips/blob/master/51.md>
 */
export class ArticlesCuration {
  free(): void;
  constructor();
  coordinate: Coordinate[];
  event_ids: EventId[];
}
export class AtomicRelayServiceFlags {
  private constructor();
  free(): void;
  static new(flags: RelayServiceFlags): AtomicRelayServiceFlags;
  add(flags: RelayServiceFlags): void;
  remove(flags: RelayServiceFlags): void;
  /**
   * Check whether `RelayServiceFlags` are included in this one.
   */
  has(flags: RelayServiceFlags, check: FlagCheck): boolean;
  /**
   * Check if `READ` service is enabled
   */
  has_read(): boolean;
  /**
   * Check if `WRITE` service is enabled
   */
  has_write(): boolean;
  /**
   * Check if `PING` service is enabled
   */
  has_ping(): boolean;
}
/**
 * Uncategorized, "global" list of things a user wants to save
 *
 * <https://github.com/nostr-protocol/nips/blob/master/51.md>
 */
export class Bookmarks {
  free(): void;
  constructor();
  event_ids: EventId[];
  coordinate: Coordinate[];
  hashtags: string[];
  urls: string[];
}
/**
 * Signer for interaction with browser extensions (ex. Alby)
 *
 * <https://github.com/aljazceru/awesome-nostr#nip-07-browser-extensions>
 *
 * <https://github.com/nostr-protocol/nips/blob/master/07.md>
 */
export class BrowserSigner {
  free(): void;
  constructor();
  getPublicKey(): Promise<PublicKey>;
  signEvent(unsigned: UnsignedEvent): Promise<Event>;
  nip04Encrypt(public_key: PublicKey, plaintext: string): Promise<string>;
  nip04Decrypt(public_key: PublicKey, ciphertext: string): Promise<string>;
  nip44Encrypt(public_key: PublicKey, plaintext: string): Promise<string>;
  nip44Decrypt(public_key: PublicKey, ciphertext: string): Promise<string>;
}
export class Client {
  free(): void;
  constructor(signer?: NostrSigner | null);
  /**
   * Construct `ClientBuilder`
   */
  static builder(): ClientBuilder;
  /**
   * Auto authenticate to relays (default: true)
   *
   * <https://github.com/nostr-protocol/nips/blob/master/42.md>
   */
  automaticAuthentication(enable: boolean): void;
  /**
   * Get current nostr signer
   *
   * Rise error if it not set.
   */
  signer(): Promise<NostrSigner>;
  /**
   * Completely shutdown `Client`
   */
  shutdown(): Promise<void>;
  /**
   * Get relays with `READ` or `WRITE` flags
   */
  relays(): Promise<Relay[]>;
  /**
   * Get a previously added `Relay`
   */
  relay(url: string): Promise<Relay>;
  /**
   * Add new relay
   *
   * Relays added with this method will have both `READ` and `WRITE` flags enabled
   *
   * If the relay already exists, the flags will be updated and `false` returned.
   *
   * If are set pool subscriptions, the new added relay will inherit them. Use `subscribeTo` method instead of `subscribe`,
   * to avoid to set pool subscriptions.
   *
   * This method use previously set or default `Options` to configure the `Relay` (ex. set proxy, set min POW, set relay limits, ...).
   *
   * Connection is **NOT** automatically started with relay, remember to call `connect` method!
   */
  addRelay(url: string): Promise<boolean>;
  addRelayWithOpts(url: string, opts: RelayOptions): Promise<boolean>;
  /**
   * Add discovery relay
   *
   * If relay already exists, this method automatically add the `DISCOVERY` flag to it and return `false`.
   *
   * <https://github.com/nostr-protocol/nips/blob/master/65.md>
   */
  addDiscoveryRelay(url: string): Promise<boolean>;
  /**
   * Add read relay
   *
   * If relay already exists, this method add the `READ` flag to it and return `false`.
   *
   * If are set pool subscriptions, the new added relay will inherit them. Use `subscribe_to` method instead of `subscribe`,
   * to avoid to set pool subscriptions.
   */
  addReadRelay(url: string): Promise<boolean>;
  /**
   * Add write relay
   *
   * If relay already exists, this method add the `WRITE` flag to it and return `false`.
   */
  addWriteRelay(url: string): Promise<boolean>;
  /**
   * Remove and disconnect relay
   *
   * If the relay has `GOSSIP` flag, it will not be removed from the pool and its
   * flags will be updated (remove `READ`, `WRITE` and `DISCOVERY` flags).
   */
  removeRelay(url: string): Promise<void>;
  /**
   * Force remove and disconnect relay
   *
   * Note: this method will remove the relay, also if it's in use for the gossip model or other service!
   */
  forceRemoveRelay(url: string): Promise<void>;
  /**
   * Disconnect and remove all relays
   *
   * Some relays used by some services could not be disconnected with this method
   * (like the ones used for gossip).
   * Use [`Client::force_remove_all_relays`] to remove every relay.
   */
  removeAllRelays(): Promise<void>;
  /**
   * Disconnect and force remove all relays
   */
  forceRemoveAllRelays(): Promise<void>;
  /**
   * Connect to a previously added relay
   */
  connectRelay(url: string): Promise<void>;
  /**
   * Disconnect relay
   */
  disconnectRelay(url: string): Promise<void>;
  /**
   * Connect to all added relays
   *
   * Attempts to initiate a connection for every relay currently in
   * [`RelayStatus::Initialized`] or [`RelayStatus::Terminated`].
   * A background connection task is spawned for each such relay, which then tries
   * to establish the connection.
   * Any relay not in one of these two statuses is skipped.
   *
   * For further details, see the documentation of [`Relay::connect`].
   */
  connect(): Promise<void>;
  /**
   * Waits for relays connections
   *
   * Wait for relays connections at most for the specified `timeout`.
   * The code continues when the relays are connected or the `timeout` is reached.
   */
  waitForConnection(timeout: Duration): Promise<void>;
  /**
   * Try to establish a connection with the relays.
   *
   * Attempts to establish a connection for every relay currently in
   * [`RelayStatus::Initialized`] or [`RelayStatus::Terminated`]
   * without spawning the connection task if it fails.
   * This means that if the connection fails, no automatic retries are scheduled.
   * Use [`Client::connect`] if you want to immediately spawn a connection task,
   * regardless of whether the initial connection succeeds.
   *
   * For further details, see the documentation of [`Relay::try_connect`].
   */
  tryConnect(timeout: Duration): Promise<Output>;
  /**
   * Disconnect from all relays
   */
  disconnect(): Promise<void>;
  /**
   * Subscribe to filters
   *
   * If `gossip` is enabled (see `Options]) the events will be requested also to
   * NIP65 relays (automatically discovered) of public keys included in filters (if any).
   *
   * ### Auto-closing subscription
   *
   * It's possible to automatically close a subscription by configuring the `SubscribeAutoCloseOptions`.
   */
  subscribe(filter: Filter, opts?: SubscribeAutoCloseOptions | null): Promise<SubscribeOutput>;
  /**
   * Subscribe to filters with custom subscription ID
   *
   * If `gossip` is enabled (see `Options]) the events will be requested also to
   * NIP65 relays (automatically discovered) of public keys included in filters (if any).
   *
   * ### Auto-closing subscription
   *
   * It's possible to automatically close a subscription by configuring the `SubscribeAutoCloseOptions`.
   */
  subscribeWithId(id: string, filter: Filter, opts?: SubscribeAutoCloseOptions | null): Promise<Output>;
  /**
   * Subscribe to filters to specific relays
   *
   * ### Auto-closing subscription
   *
   * It's possible to automatically close a subscription by configuring the `SubscribeAutoCloseOptions`.
   */
  subscribeTo(urls: string[], filter: Filter, opts?: SubscribeAutoCloseOptions | null): Promise<SubscribeOutput>;
  /**
   * Subscribe to filters with custom subscription ID to specific relays
   *
   * ### Auto-closing subscription
   *
   * It's possible to automatically close a subscription by configuring the `SubscribeAutoCloseOptions`.
   */
  subscribeWithIdTo(urls: string[], id: string, filter: Filter, opts?: SubscribeAutoCloseOptions | null): Promise<Output>;
  /**
   * Unsubscribe
   */
  unsubscribe(subscription_id: string): Promise<void>;
  /**
   * Unsubscribe
   */
  unsubscribeAll(): Promise<void>;
  /**
   * Sync events with relays (negentropy reconciliation)
   *
   * If `gossip` is enabled (see `Options`) the events will be reconciled also with
   * NIP65 relays (automatically discovered) of public keys included in filters (if any).
   *
   * <https://github.com/hoytech/negentropy>
   */
  sync(filter: Filter, opts: SyncOptions): Promise<ReconciliationOutput>;
  /**
   * Fetch events from relays
   *
   * This is an auto-closing subscription and will be closed automatically on `EOSE`.
   *
   * # Gossip
   *
   * If `gossip` is enabled (see `Options`) the events will be requested also to
   * NIP65 relays (automatically discovered) of public keys included in filters (if any).
   */
  fetchEvents(filter: Filter, timeout: Duration): Promise<Events>;
  /**
   * Fetch events from specific relays
   *
   * This is an auto-closing subscription and will be closed automatically on `EOSE`.
   */
  fetchEventsFrom(urls: string[], filter: Filter, timeout: Duration): Promise<Events>;
  /**
   * Get events both from database and relays
   *
   * This is an auto-closing subscription and will be closed automatically on `EOSE`.
   *
   * You can obtain the same result by merging the `Events` from different type of sources.
   *
   * This method will be deprecated in the future!
   * This is a temporary solution for who still want to query events both from database and relays and merge the result.
   * The optimal solution is to execute a [`Client::sync`] to get all old events, [`Client::subscribe`] to get all
   * new future events, [`NostrDatabase::query`] to query events and [`Client::handle_notifications`] to listen-for/handle new events (i.e. to know when update the UI).
   * This will allow very fast queries, low bandwidth usage (depending on how many events the client have to reconcile) and a lower load on the relays.
   *
   * # Gossip
   *
   * If `gossip` is enabled (see [`Options::gossip`]) the events will be requested also to
   * NIP65 relays (automatically discovered) of public keys included in filters (if any).
   */
  fetchCombinedEvents(filter: Filter, timeout: Duration): Promise<Events>;
  /**
   * Send client message to a specific relay
   */
  sendMsgTo(urls: string[], msg: ClientMessage): Promise<Output>;
  /**
   * Send event
   *
   * Send event to all relays with `WRITE` flag.
   * If `gossip` is enabled (see `Options`) the event will be sent also to NIP65 relays (automatically discovered).
   */
  sendEvent(event: Event): Promise<SendEventOutput>;
  /**
   * Send event to specific relay
   */
  sendEventTo(urls: string[], event: Event): Promise<SendEventOutput>;
  /**
   * Signs the `EventBuilder` into an `Event` using the `NostrSigner`
   */
  signEventBuilder(builder: EventBuilder): Promise<Event>;
  /**
   * Take an `EventBuilder`, sign it by using the `NostrSigner` and broadcast to relays (check `send_event` method for more details)
   *
   * Rise an error if the `NostrSigner` is not set.
   */
  sendEventBuilder(builder: EventBuilder): Promise<SendEventOutput>;
  /**
   * Take an `EventBuilder`, sign it by using the `NostrSigner` and broadcast to specific relays.
   *
   * Rise an error if the `NostrSigner` is not set.
   */
  sendEventBuilderTo(urls: string[], builder: EventBuilder): Promise<SendEventOutput>;
  /**
   * Fetch the newest public key metadata from relays.
   *
   * Returns `None` if the `Metadata` of the `PublicKey` has not been found.
   *
   * Check `Client.fetchEvents` for more details.
   *
   * If you only want to consult cached data,
   * consider `client.database().profile(PUBKEY)`.
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  fetchMetadata(public_key: PublicKey, timeout: Duration): Promise<Metadata | undefined>;
  /**
   * Update metadata
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  setMetadata(metadata: Metadata): Promise<SendEventOutput>;
  /**
   * Send a private direct message
   *
   * If gossip is enabled, the message will be sent to the NIP17 relays (automatically discovered).
   * If gossip is not enabled will be sent to all relays with WRITE` relay service flag.
   *
   * <https://github.com/nostr-protocol/nips/blob/master/17.md>
   */
  sendPrivateMsg(receiver: PublicKey, message: string, rumor_extra_tags?: Tag[] | null): Promise<SendEventOutput>;
  /**
   * Send private direct message to specific relays
   *
   * <https://github.com/nostr-protocol/nips/blob/master/17.md>
   */
  sendPrivateMsgTo(urls: string[], receiver: PublicKey, message: string, rumor_extra_tags?: Tag[] | null): Promise<SendEventOutput>;
  /**
   * Construct Gift Wrap and send to relays
   *
   * Check `sendEvent` method to know how sending events works.
   *
   * <https://github.com/nostr-protocol/nips/blob/master/59.md>
   */
  giftWrap(receiver: PublicKey, rumor: UnsignedEvent, extra_tags?: Tag[] | null): Promise<SendEventOutput>;
  /**
   * Construct Gift Wrap and send to specific relays
   *
   * <https://github.com/nostr-protocol/nips/blob/master/59.md>
   */
  giftWrapTo(urls: string[], receiver: PublicKey, rumor: UnsignedEvent, extra_tags?: Tag[] | null): Promise<SendEventOutput>;
  /**
   * Unwrap Gift Wrap event
   *
   * Internally verify the `seal` event
   *
   * <https://github.com/nostr-protocol/nips/blob/master/59.md>
   */
  unwrapGiftWrap(gift_wrap: Event): Promise<UnwrappedGift>;
  /**
   * Handle notifications
   *
   * **This method spawn a task**, so ensure to keep up the app after calling this (if needed).
   *
   * To exit from the handle notifications loop, return `true` or call `abortable.abort();`.
   *
   * # Example
   * ```javascript
   * // Subscribe to filters
   * const filter = new Filter().author(keys.publicKey);
   * await client.subscribe([filter]);
   *
   * const handle = {
   *    // Handle event
   *    handleEvent: async (relayUrl, subscriptionId, event) => {
   *        console.log("Received new event from", relayUrl);
   *        if (event.kind == 4) {
   *            try {
   *                let content = nip04Decrypt(keys.secretKey, event.author, event.content);
   *                console.log("Message:", content);
   *                await client.sendDirectMsg(event.author, "Echo: " + content);
   *
   *                if (content == "stop") {
   *                    return true;
   *                }
   *            } catch (error) {
   *                console.log("Impossible to decrypt DM:", error);
   *            }
   *         }
   *     },
   *     // Handle relay message
   *     handleMsg: async (relayUrl, message) => {
   *         console.log("Received message from", relayUrl, message.asJson());
   *     }
   *  };
   *
   * let abortable = client.handleNotifications(handle);
   * // Optionally, call `abortable.abort();` when you need to stop handle notifications task
   * ```
   */
  handleNotifications(callback: HandleNotification): AbortHandle;
  readonly database: NostrDatabase;
}
export class ClientBuilder {
  free(): void;
  /**
   * New client builder
   */
  constructor();
  signer(signer: NostrSigner): ClientBuilder;
  database(database: NostrDatabase): ClientBuilder;
  /**
   * Set gossip store
   */
  gossip(gossip: NostrGossip): ClientBuilder;
  admitPolicy(policy: AdmitPolicy): ClientBuilder;
  opts(opts: ClientOptions): ClientBuilder;
  /**
   * Build `Client`
   *
   * This method **consumes** the `ClientBuilder`!
   */
  build(): Client;
}
export class ClientMessage {
  private constructor();
  free(): void;
  /**
   * Create new `EVENT` message
   */
  static event(event: Event): ClientMessage;
  /**
   * Create new `REQ` message
   */
  static req(subscription_id: string, filter: Filter): ClientMessage;
  /**
   * Create new `COUNT` message
   */
  static count(subscription_id: string, filter: Filter): ClientMessage;
  /**
   * Create new `CLOSE` message
   */
  static close(subscription_id: string): ClientMessage;
  /**
   * Create new `AUTH` message
   */
  static auth(event: Event): ClientMessage;
  /**
   * Deserialize `ClientMessage` from JSON string
   *
   * **This method NOT verify the event signature!**
   */
  static fromJson(json: string): ClientMessage;
  asJson(): string;
}
export class ClientOptions {
  free(): void;
  constructor();
  /**
   * Automatically start connection with relays (default: false)
   *
   * When set to `true`, there isn't the need of calling the connect methods.
   */
  autoconnect(val: boolean): ClientOptions;
  /**
   * Auto authenticate to relays (default: true)
   *
   * <https://github.com/nostr-protocol/nips/blob/master/42.md>
   */
  automaticAuthentication(enabled: boolean): ClientOptions;
  /**
   * Set custom relay limits
   */
  relayLimits(limits: RelayLimits): ClientOptions;
  /**
   * Set gossip options
   */
  gossip(opts: GossipOptions): ClientOptions;
}
export class Contact {
  free(): void;
  constructor(public_key: PublicKey, relay_url?: string | null, alias?: string | null);
  readonly alias: string | undefined;
  readonly publicKey: PublicKey;
  readonly relayUrl: string | undefined;
}
export class Coordinate {
  free(): void;
  constructor(kind: Kind, public_key: PublicKey, identifier?: string | null);
  /**
   * Parse coordinate from `<kind>:<pubkey>:[<d-tag>]` format, `bech32` or [NIP21](https://github.com/nostr-protocol/nips/blob/master/21.md) uri
   */
  static parse(coordinate: string): Coordinate;
  /**
   * Check if the coordinate is valid.
   *
   * Returns `false` if:
   * - the `Kind` is `replaceable` and the identifier is not empty
   * - the `Kind` is `addressable` and the identifier is empty
   */
  verify(): boolean;
  toString(): string;
  readonly kind: Kind;
  readonly publicKey: PublicKey;
  readonly identifier: string;
}
export class Duration {
  private constructor();
  free(): void;
  static fromSecs(secs: number): Duration;
  static fromMillis(millis: bigint): Duration;
  asSecs(): number;
  asMillis(): number;
}
/**
 * Emoji
 *
 * <https://github.com/nostr-protocol/nips/blob/master/51.md>
 */
export class EmojiInfo {
  free(): void;
  constructor(shortcode: string, url: string);
  shortcode: string;
  url: string;
}
/**
 * User preferred emojis and pointers to emoji sets
 *
 * <https://github.com/nostr-protocol/nips/blob/master/51.md>
 */
export class Emojis {
  free(): void;
  constructor();
  emojis: EmojiInfo[];
  coordinate: Coordinate[];
}
/**
 * Encrypted Secret Key
 */
export class EncryptedSecretKey {
  free(): void;
  /**
   * Encrypt secret key
   */
  constructor(secret_key: SecretKey, password: string, log_n: number, key_security: KeySecurity);
  static fromBech32(bech32: string): EncryptedSecretKey;
  /**
   * Get encrypted secret key version
   */
  version(): EncryptedSecretKeyVersion;
  /**
   * Get encrypted secret key security
   */
  keySecurity(): KeySecurity;
  /**
   * Decrypt secret key
   */
  asSecretKey(password: string): SecretKey;
  toBech32(): string;
}
export class Event {
  private constructor();
  free(): void;
  /**
   * Verify both `EventId` and `Signature`
   */
  verify(): boolean;
  /**
   * Verify if the `EventId` it's composed correctly
   */
  verifyId(): boolean;
  /**
   * Verify only event `Signature`
   */
  verifySignature(): boolean;
  /**
   * Check POW
   *
   * <https://github.com/nostr-protocol/nips/blob/master/13.md>
   */
  checkPow(difficulty: number): boolean;
  /**
   * Returns `true` if the event has an expiration tag that is expired.
   * If an event has no `Expiration` tag, then it will return `false`.
   *
   * <https://github.com/nostr-protocol/nips/blob/master/40.md>
   */
  isExpired(): boolean;
  /**
   * Returns `true` if the event has an expiration tag that is expired.
   * If an event has no `Expiration` tag, then it will return `false`.
   *
   * <https://github.com/nostr-protocol/nips/blob/master/40.md>
   */
  isExpiredAt(now: Timestamp): boolean;
  /**
   * Check if it's a protected event
   *
   * <https://github.com/nostr-protocol/nips/blob/master/70.md>
   */
  isProtected(): boolean;
  static fromJson(json: string): Event;
  asJson(): string;
  asPrettyJson(): string;
  readonly id: EventId;
  /**
   * Get event author (`pubkey` field)
   */
  readonly author: PublicKey;
  readonly createdAt: Timestamp;
  readonly kind: Kind;
  readonly tags: Tags;
  readonly content: string;
  readonly signature: string;
}
export class EventBuilder {
  free(): void;
  constructor(kind: Kind, content: string);
  /**
   * Add tags
   *
   * This method extend the current tags (if any).
   */
  tags(tags: Tag[]): EventBuilder;
  /**
   * Set a custom `created_at` UNIX timestamp
   */
  customCreatedAt(created_at: Timestamp): EventBuilder;
  /**
   * Set POW difficulty
   *
   * Only values `> 0` are accepted!
   */
  pow(difficulty: number): EventBuilder;
  /**
   * Allow self-tagging
   *
   * When this mode is enabled, any `p` tags referencing the author’s public key will not be discarded.
   */
  allow_self_tagging(): EventBuilder;
  /**
   * Deduplicate tags
   *
   * For more details check [`Tags::dedup`].
   */
  dedup_tags(): EventBuilder;
  /**
   * Build, sign and return event
   *
   * Check [`EventBuilder::build`] to learn more.
   *
   * **This method consumes the builder, so it will no longer be usable!**
   */
  sign(signer: NostrSigner): Promise<Event>;
  /**
   * Build, sign and return event using keys signer
   *
   * Check [`EventBuilder::build`] to learn more.
   *
   * **This method consumes the builder, so it will no longer be usable!**
   */
  signWithKeys(keys: Keys): Event;
  /**
   * Build an unsigned event
   *
   * By default, this method removes any `p` tags that match the author's public key.
   * To allow self-tagging, call [`EventBuilder::allow_self_tagging`] first.
   *
   * **This method consumes the builder, so it will no longer be usable!**
   */
  build(public_key: PublicKey): UnsignedEvent;
  /**
   * Profile metadata
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  static metadata(metadata: Metadata): EventBuilder;
  /**
   * Relay list metadata
   *
   * <https://github.com/nostr-protocol/nips/blob/master/65.md>
   */
  static relayList(relays: RelayListItem[]): EventBuilder;
  /**
   * Text note
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  static textNote(content: string): EventBuilder;
  /**
   * Text note reply
   *
   * This adds only that most significant tags, like:
   * - `p` tag with the author of the `reply_to` and `root` events;
   * - `e` tag of the `reply_to` and `root` events.
   *
   * Any additional necessary tag can be added with [`EventBuilder::tag`] or [`EventBuilder::tags`].
   *
   * <https://github.com/nostr-protocol/nips/blob/master/10.md>
   */
  static textNoteReply(content: string, reply_to: Event, root?: Event | null, relay_url?: string | null): EventBuilder;
  /**
   * Comment
   *
   * This adds only that most significant tags, like:
   * - `p` tag with the author of the `comment_to` event;
   * - the `a`/`e` and `k` tags of the `comment_to` event;
   * - `P` tag with the author of the `root` event;
   * - the `A`/`E` and `K` tags of the `root` event.
   *
   * Any additional necessary tag can be added with [`EventBuilder::tag`] or [`EventBuilder::tags`].
   *
   * <https://github.com/nostr-protocol/nips/blob/master/22.md>
   */
  static comment(content: string, comment_to: Event, root?: Event | null): EventBuilder;
  /**
   * Long-form text note (generally referred to as "articles" or "blog posts").
   *
   * <https://github.com/nostr-protocol/nips/blob/master/23.md>
   */
  static longFormTextNote(content: string): EventBuilder;
  /**
   * Contact/Follow list
   *
   * <https://github.com/nostr-protocol/nips/blob/master/02.md>
   */
  static contactList(list: Contact[]): EventBuilder;
  /**
   * Repost
   *
   * <https://github.com/nostr-protocol/nips/blob/master/18.md>
   */
  static repost(event: Event, relay_url?: string | null): EventBuilder;
  /**
   * Event deletion
   *
   * <https://github.com/nostr-protocol/nips/blob/master/09.md>
   */
  static delete(request: EventDeletionRequest): EventBuilder;
  /**
   * Add reaction (like/upvote, dislike/downvote or emoji) to an event
   */
  static reaction(event: Event, reaction: string): EventBuilder;
  /**
   * Create new channel
   *
   * <https://github.com/nostr-protocol/nips/blob/master/28.md>
   */
  static channel(metadata: Metadata): EventBuilder;
  /**
   * Channel metadata
   *
   * <https://github.com/nostr-protocol/nips/blob/master/28.md>
   */
  static channelMetadata(channel_id: EventId, relay_url: string | null | undefined, metadata: Metadata): EventBuilder;
  /**
   * Channel message
   *
   * <https://github.com/nostr-protocol/nips/blob/master/28.md>
   */
  static channelMsg(channel_id: EventId, relay_url: string, content: string): EventBuilder;
  /**
   * Hide message
   *
   * <https://github.com/nostr-protocol/nips/blob/master/28.md>
   */
  static hideChannelMsg(message_id: EventId, reason?: string | null): EventBuilder;
  /**
   * Mute channel user
   *
   * <https://github.com/nostr-protocol/nips/blob/master/28.md>
   */
  static muteChannelUser(pubkey: PublicKey, reason?: string | null): EventBuilder;
  /**
   * Authentication of clients to relays
   *
   * <https://github.com/nostr-protocol/nips/blob/master/42.md>
   */
  static auth(challenge: string, relay: string): EventBuilder;
  /**
   * Live Event
   *
   * <https://github.com/nostr-protocol/nips/blob/master/53.md>
   */
  static liveEvent(live_event: LiveEvent): EventBuilder;
  /**
   * Live Event Message
   *
   * <https://github.com/nostr-protocol/nips/blob/master/53.md>
   */
  static liveEventMsg(live_event_id: string, live_event_host: PublicKey, content: string, relay_url?: string | null): EventBuilder;
  /**
   * Reporting
   *
   * <https://github.com/nostr-protocol/nips/blob/master/56.md>
   */
  static report(tags: Tag[], content: string): EventBuilder;
  /**
   * Create **public** zap request event
   *
   * **This event MUST NOT be broadcasted to relays**, instead must be sent to a recipient's LNURL pay callback url.
   *
   * To build a **private** or **anonymous** zap request use `nip57PrivateZapRequest(...)` or `nip57AnonymousZapRequest(...)` functions.
   *
   * <https://github.com/nostr-protocol/nips/blob/master/57.md>
   */
  static publicZapRequest(data: ZapRequestData): EventBuilder;
  /**
   * Zap Receipt
   *
   * <https://github.com/nostr-protocol/nips/blob/master/57.md>
   */
  static zapReceipt(bolt11: string, preimage: string | null | undefined, zap_request: Event): EventBuilder;
  /**
   * Badge definition
   *
   * <https://github.com/nostr-protocol/nips/blob/master/58.md>
   */
  static defineBadge(badge_id: string, name: string | null | undefined, description: string | null | undefined, image: string | null | undefined, image_dimensions: ImageDimensions | null | undefined, thumbnails: Thumbnails[]): EventBuilder;
  /**
   * Badge award
   *
   * <https://github.com/nostr-protocol/nips/blob/master/58.md>
   */
  static awardBadge(badge_definition: Event, awarded_public_keys: PublicKey[]): EventBuilder;
  /**
   * Profile badges
   *
   * <https://github.com/nostr-protocol/nips/blob/master/58.md>
   */
  static profileBadges(badge_definitions: Event[], badge_awards: Event[], pubkey_awarded: PublicKey): EventBuilder;
  /**
   * Data Vending Machine (DVM) - Job Request
   *
   * <https://github.com/nostr-protocol/nips/blob/master/90.md>
   */
  static jobRequest(kind: Kind): EventBuilder;
  /**
   * Data Vending Machine (DVM) - Job Result
   *
   * <https://github.com/nostr-protocol/nips/blob/master/90.md>
   */
  static jobResult(job_request: Event, payload: string, millisats: number, bolt11?: string | null): EventBuilder;
  /**
   * Data Vending Machine (DVM) - Job Feedback
   *
   * <https://github.com/nostr-protocol/nips/blob/master/90.md>
   */
  static jobFeedback(data: JobFeedbackData): EventBuilder;
  /**
   * File metadata
   *
   * <https://github.com/nostr-protocol/nips/blob/master/94.md>
   */
  static fileMetadata(description: string, metadata: FileMetadata): EventBuilder;
  /**
   * HTTP Auth
   *
   * <https://github.com/nostr-protocol/nips/blob/master/98.md>
   */
  static httpAuth(data: HttpData): EventBuilder;
  /**
   * Set stall data
   *
   * <https://github.com/nostr-protocol/nips/blob/master/15.md>
   */
  static stallData(data: StallData): EventBuilder;
  /**
   * Set product data
   *
   * <https://github.com/nostr-protocol/nips/blob/master/15.md>
   */
  static productData(data: ProductData): EventBuilder;
  /**
   * Seal
   *
   * <https://github.com/nostr-protocol/nips/blob/master/59.md>
   */
  static seal(signer: NostrSigner, receiver_public_key: PublicKey, rumor: UnsignedEvent): Promise<EventBuilder>;
  /**
   * Gift Wrap from seal
   *
   * <https://github.com/nostr-protocol/nips/blob/master/59.md>
   */
  static giftWrapFromSeal(receiver: PublicKey, seal: Event, extra_tags?: Tag[] | null): Event;
  /**
   * Gift Wrap
   *
   * <https://github.com/nostr-protocol/nips/blob/master/59.md>
   */
  static giftWrap(signer: NostrSigner, receiver: PublicKey, rumor: UnsignedEvent, extra_tags?: Tag[] | null): Promise<Event>;
  /**
   * Private Direct message rumor
   *
   * <div class="warning">
   * This constructor compose ONLY the rumor for the private direct message!
   * NOT USE THIS IF YOU DON'T KNOW WHAT YOU ARE DOING!
   * </div>
   *
   * <https://github.com/nostr-protocol/nips/blob/master/17.md>
   */
  static privateMsgRumor(receiver: PublicKey, message: string): EventBuilder;
  /**
   * Private Direct message
   *
   * <https://github.com/nostr-protocol/nips/blob/master/17.md>
   */
  static privateMsg(signer: NostrSigner, receiver: PublicKey, message: string, rumor_extra_tags?: Tag[] | null): Promise<Event>;
  /**
   * Mute list
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static muteList(list: MuteList): EventBuilder;
  /**
   * Pinned notes
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static pinnedNotes(ids: EventId[]): EventBuilder;
  /**
   * Bookmarks
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static bookmarks(list: Bookmarks): EventBuilder;
  /**
   * Communities
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static communities(communities: Coordinate[]): EventBuilder;
  /**
   * Public chats
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static publicChats(chat: EventId[]): EventBuilder;
  /**
   * Blocked relays
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static blockedRelays(relays: string[]): EventBuilder;
  /**
   * Search relays
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static searchRelays(relays: string[]): EventBuilder;
  /**
   * Interests
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static interests(list: Interests): EventBuilder;
  /**
   * Emojis
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static emojis(list: Emojis): EventBuilder;
  /**
   * Follow set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static followSet(identifier: string, public_keys: PublicKey[]): EventBuilder;
  /**
   * Relay set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static relaySet(identifier: string, relays: string[]): EventBuilder;
  /**
   * Bookmark set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static bookmarksSet(identifier: string, list: Bookmarks): EventBuilder;
  /**
   * Article Curation set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static articlesCurationSet(identifier: string, list: ArticlesCuration): EventBuilder;
  /**
   * Videos Curation set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static videosCurationSet(identifier: string, video: Coordinate[]): EventBuilder;
  /**
   * Interest set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static interestSet(identifier: string, hashtags: string[]): EventBuilder;
  /**
   * Emoji set
   *
   * <https://github.com/nostr-protocol/nips/blob/master/51.md>
   */
  static emojiSet(identifier: string, emoji: EmojiInfo[]): EventBuilder;
  /**
   * Label
   *
   * <https://github.com/nostr-protocol/nips/blob/master/32.md>
   */
  static label(label_namespace: string, label: string): EventBuilder;
  /**
   * Git Repository Announcement
   *
   * <https://github.com/nostr-protocol/nips/blob/master/34.md>
   */
  static gitRepositoryAnnouncement(data: GitRepositoryAnnouncement): EventBuilder;
  /**
   * Git Issue
   *
   * <https://github.com/nostr-protocol/nips/blob/master/34.md>
   */
  static gitIssue(issue: GitIssue): EventBuilder;
}
/**
 * Event deletion request
 */
export class EventDeletionRequest {
  free(): void;
  constructor();
  /**
   * Event IDs
   */
  ids: EventId[];
  /**
   * Event coordinates
   */
  coordinates: Coordinate[];
  /**
   * Optional reason
   */
  get reason(): string | undefined;
  /**
   * Optional reason
   */
  set reason(value: string | null | undefined);
}
export class EventId {
  free(): void;
  constructor(pubkey: PublicKey, created_at: Timestamp, kind: Kind, tags: Tags, content: string);
  /**
   * Try to parse event ID from `hex`, `bech32` or [NIP21](https://github.com/nostr-protocol/nips/blob/master/21.md) uri
   */
  static parse(id: string): EventId;
  static fromSlice(bytes: Uint8Array): EventId;
  asBytes(): Uint8Array;
  toHex(): string;
  toBech32(): string;
  toNostrUri(): string;
}
export class Events {
  private constructor();
  free(): void;
  /**
   * Returns the number of events in the collection.
   */
  len(): bigint;
  /**
   * Returns the number of events in the collection.
   */
  isEmpty(): boolean;
  /**
   * Check if contains `Event`
   */
  contains(event: Event): boolean;
  /**
   * Merge events collections into a single one.
   *
   * Collection is converted to unbounded if one of the merge `Events` have a different hash.
   * In other words, the filters limit is respected only if the `Events` are related to the same
   * list of filters.
   */
  merge(other: Events): Events;
  /**
   * Get first `Event` (descending order)
   */
  first(): Event | undefined;
  /**
   * Convert collection to vector of events.
   */
  forEach(callbackfn: (event: Event) => void): void;
  /**
   * Convert collection to vector of events.
   */
  toVec(): Event[];
}
export class FailedOutputItem {
  private constructor();
  free(): void;
  url: string;
  error: string;
}
export class FileMetadata {
  free(): void;
  constructor(url: string, mime_type: string, hash: string);
  readonly urls: string;
  readonly mimeType: string;
  readonly hash: string;
  readonly aes256Gcm: Aes256Gcm | undefined;
  readonly size: number | undefined;
  readonly dim: ImageDimensions | undefined;
  readonly magnet: string | undefined;
  readonly blurhash: string | undefined;
}
export class Filter {
  free(): void;
  constructor();
  static fromJson(json: string): Filter;
  asJson(): string;
  asPrettyJson(): string;
  /**
   * Set event ID
   */
  id(id: EventId): Filter;
  /**
   * Set event IDs
   */
  ids(ids: EventId[]): Filter;
  /**
   * Remove event IDs
   */
  removeIds(ids: EventId[]): Filter;
  /**
   * Set author
   */
  author(author: PublicKey): Filter;
  /**
   * Set authors
   */
  authors(authors: PublicKey[]): Filter;
  /**
   * Remove authors
   */
  removeAuthors(authors: PublicKey[]): Filter;
  /**
   * Set kind
   */
  kind(kind: Kind): Filter;
  /**
   * Set kinds
   */
  kinds(kinds: Kind[]): Filter;
  /**
   * Remove kinds
   */
  removeKinds(kinds: Kind[]): Filter;
  /**
   * Set event
   */
  event(id: EventId): Filter;
  /**
   * Set events
   */
  events(ids: EventId[]): Filter;
  /**
   * Remove events
   */
  removeEvents(ids: EventId[]): Filter;
  /**
   * Set pubkey
   */
  pubkey(pubkey: PublicKey): Filter;
  /**
   * Set pubkeys
   */
  pubkeys(pubkeys: PublicKey[]): Filter;
  /**
   * Remove pubkeys
   */
  removePubkeys(pubkeys: PublicKey[]): Filter;
  /**
   * Set hashtag
   *
   * <https://github.com/nostr-protocol/nips/blob/master/12.md>
   */
  hashtag(hashtag: string): Filter;
  /**
   * Set hashtags
   *
   * <https://github.com/nostr-protocol/nips/blob/master/12.md>
   */
  hashtags(hashtags: string[]): Filter;
  /**
   * Remove hashtags
   *
   * <https://github.com/nostr-protocol/nips/blob/master/12.md>
   */
  removeHashtags(hashtags: string[]): Filter;
  /**
   * Set reference
   *
   * <https://github.com/nostr-protocol/nips/blob/master/12.md>
   */
  reference(v: string): Filter;
  /**
   * Set references
   *
   * <https://github.com/nostr-protocol/nips/blob/master/12.md>
   */
  references(v: string[]): Filter;
  /**
   * Remove references
   *
   * <https://github.com/nostr-protocol/nips/blob/master/12.md>
   */
  removeReferences(v: string[]): Filter;
  /**
   * Add identifier
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  identifier(identifier: string): Filter;
  /**
   * Set identifiers
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  identifiers(identifiers: string[]): Filter;
  /**
   * Remove identifiers
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  removeIdentifiers(identifiers: string[]): Filter;
  /**
   * Add coordinate
   *
   * Query for `a` tag.
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  coordinate(coordinate: Coordinate): Filter;
  /**
   * Set coordinates
   *
   * Query for `a` tags.
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  coordinates(coordinates: Coordinate[]): Filter;
  /**
   * Remove coordinates
   *
   * Remove `a` tags.
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  removeCoordinates(coordinates: Coordinate[]): Filter;
  /**
   * Set search field
   */
  search(value: string): Filter;
  /**
   * Remove search
   */
  removeSearch(): Filter;
  /**
   * Set since unix timestamp
   */
  since(since: Timestamp): Filter;
  /**
   * Remove since
   */
  removeSince(): Filter;
  /**
   * Set until unix timestamp
   */
  until(until: Timestamp): Filter;
  /**
   * Remove until
   */
  removeUntil(): Filter;
  /**
   * Set limit
   */
  limit(limit: number): Filter;
  /**
   * Remove limit
   */
  removeLimit(): Filter;
  customTag(tag: SingleLetterTag, value: string): Filter;
  customTags(tag: SingleLetterTag, values: string[]): Filter;
  removeCustomTags(tag: SingleLetterTag, values: string[]): Filter;
  /**
   * Check if `Filter` is empty
   */
  isEmpty(): boolean;
  /**
   * Determine if `Filter` match given `Event`.
   */
  matchEvent(event: Event): boolean;
}
export class GetBalanceResponse {
  private constructor();
  free(): void;
  /**
   * Balance amount in msats
   */
  balance: bigint;
}
export class GetInfoResponse {
  private constructor();
  free(): void;
  /**
   * The alias of the lightning node
   */
  get alias(): string | undefined;
  /**
   * The alias of the lightning node
   */
  set alias(value: string | null | undefined);
  /**
   * The color of the current node in hex code format
   */
  get color(): string | undefined;
  /**
   * The color of the current node in hex code format
   */
  set color(value: string | null | undefined);
  /**
   * Lightning Node's public key
   */
  get pubkey(): string | undefined;
  /**
   * Lightning Node's public key
   */
  set pubkey(value: string | null | undefined);
  /**
   * Active network
   */
  get network(): string | undefined;
  /**
   * Active network
   */
  set network(value: string | null | undefined);
  /**
   * Current block height
   */
  get block_height(): number | undefined;
  /**
   * Current block height
   */
  set block_height(value: number | null | undefined);
  /**
   * Most Recent Block Hash
   */
  get block_hash(): string | undefined;
  /**
   * Most Recent Block Hash
   */
  set block_hash(value: string | null | undefined);
  /**
   * Available methods for this connection
   */
  methods: string[];
  /**
   * List of supported notifications for this connection (optional)
   */
  notifications: string[];
}
/**
 * Git Issue
 */
export class GitIssue {
  free(): void;
  constructor(repository: Coordinate, content: string);
  /**
   * The repository address
   */
  repository: Coordinate;
  /**
   * The issue content (markdown)
   */
  content: string;
  /**
   * Subject
   */
  get subject(): string | undefined;
  /**
   * Subject
   */
  set subject(value: string | null | undefined);
  /**
   * Labels
   */
  labels: string[];
}
/**
 * Git Repository Announcement
 *
 * Git repositories are hosted in Git-enabled servers, but their existence can be announced using Nostr events,
 * as well as their willingness to receive patches, bug reports and comments in general.
 */
export class GitRepositoryAnnouncement {
  free(): void;
  constructor(id: string);
  /**
   * Repository ID (usually kebab-case short name)
   */
  id: string;
  /**
   * Human-readable project name
   */
  get name(): string | undefined;
  /**
   * Human-readable project name
   */
  set name(value: string | null | undefined);
  /**
   * Brief human-readable project description
   */
  get description(): string | undefined;
  /**
   * Brief human-readable project description
   */
  set description(value: string | null | undefined);
  /**
   * Webpage urls, if the git server being used provides such a thing
   */
  web: string[];
  /**
   * Urls for git-cloning
   */
  clone: string[];
  /**
   * Relays that this repository will monitor for patches and issues
   */
  relays: string[];
  /**
   * Earliest unique commit ID
   *
   * `euc` marker should be the commit ID of the earliest unique commit of this repo,
   * made to identify it among forks and group it with other repositories hosted elsewhere that may represent essentially the same project.
   * In most cases it will be the root commit of a repository.
   * In case of a permanent fork between two projects, then the first commit after the fork should be used.
   */
  get euc(): string | undefined;
  /**
   * Earliest unique commit ID
   *
   * `euc` marker should be the commit ID of the earliest unique commit of this repo,
   * made to identify it among forks and group it with other repositories hosted elsewhere that may represent essentially the same project.
   * In most cases it will be the root commit of a repository.
   * In case of a permanent fork between two projects, then the first commit after the fork should be used.
   */
  set euc(value: string | null | undefined);
  /**
   * Other recognized maintainers
   */
  maintainers: PublicKey[];
}
/**
 * Gossip options
 */
export class GossipOptions {
  private constructor();
  free(): void;
  /**
   * Set limits
   */
  limits(limits: GossipRelayLimits): GossipOptions;
}
/**
 * Max number of relays to use for gossip
 */
export class GossipRelayLimits {
  private constructor();
  free(): void;
  /**
   * Max number of **read** relays per user (default: 3)
   */
  read_relays_per_user: number;
  /**
   * Max number of **write** relays per user (default: 3)
   */
  write_relays_per_user: number;
  /**
   * Max number of **hint** relays per user (default: 1)
   */
  hint_relays_per_user: number;
  /**
   * Max number of **most used** relays per user (default: 1)
   */
  most_used_relays_per_user: number;
  /**
   * Max number of NIP-17 relays per user (default: 3)
   */
  nip17_relays: number;
}
export class HttpData {
  free(): void;
  constructor(url: string, method: HttpMethod);
  readonly urls: string;
  readonly method: HttpMethod;
  readonly payload: string | undefined;
}
export class Image {
  free(): void;
  constructor(url: string, dimensions?: ImageDimensions | null);
  url: string;
  get dimensions(): ImageDimensions | undefined;
  set dimensions(value: ImageDimensions | null | undefined);
}
export class ImageDimensions {
  free(): void;
  constructor(width: bigint, height: bigint);
  width: bigint;
  height: bigint;
}
/**
 * Topics a user may be interested in and pointers
 *
 * <https://github.com/nostr-protocol/nips/blob/master/51.md>
 */
export class Interests {
  free(): void;
  constructor();
  hashtags: string[];
  coordinate: Coordinate[];
}
/**
 * Data Vending Machine (DVM) - Job Feedback data
 *
 * <https://github.com/nostr-protocol/nips/blob/master/90.md>
 */
export class JobFeedbackData {
  free(): void;
  /**
   * Construct new Job Feedback
   */
  constructor(job_request: Event, status: DataVendingMachineStatus);
  /**
   * Add extra info
   */
  extra_info(info: string): JobFeedbackData;
  /**
   * Add payment amount
   */
  amount(millisats: bigint, bolt11?: string | null): JobFeedbackData;
  /**
   * Add payload
   */
  payload(payload: string): JobFeedbackData;
}
/**
 * Nostr keys
 */
export class Keys {
  free(): void;
  /**
   * Initialize nostr keys from secret key.
   */
  constructor(secret_key: SecretKey);
  /**
   * Parse secret key from `hex` or `bech32` and compose keys
   */
  static parse(secret_key: string): Keys;
  /**
   * Generate random keys
   *
   * This constructor use a random number generator that retrieves randomness from the operating system.
   *
   * Generate random keys **without** construct the `Keypair`.
   * This allows faster keys generation (i.e. for vanity pubkey mining).
   * The `Keypair` will be automatically created when needed and stored in a cell.
   */
  static generate(): Keys;
  /**
   * Derive keys from BIP-39 mnemonics (ENGLISH wordlist).
   *
   * <https://github.com/nostr-protocol/nips/blob/master/06.md>
   */
  static fromMnemonic(mnemonic: string, passphrase?: string | null, account?: number | null, typ?: number | null, index?: number | null): Keys;
  /**
   * Get public key
   */
  readonly publicKey: PublicKey;
  /**
   * Get secret key
   */
  readonly secretKey: SecretKey;
}
/**
 * TLVs to be added to the keysend payment
 */
export class KeysendTLVRecord {
  free(): void;
  constructor(tlv_type: bigint, value: string);
  /**
   * TLV type
   */
  tlv_type: bigint;
  /**
   * TLV value
   */
  value: string;
}
/**
 * Event Kind
 */
export class Kind {
  free(): void;
  constructor(kind: number);
  static fromStd(e: KindStandard): Kind;
  /**
   * Get as 16-bit unsigned integer
   */
  asU16(): number;
  asStd(): KindStandard | undefined;
  toString(): string;
  /**
   * Check if it's regular
   *
   * Regular means that event is expected to be stored by relays.
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  isRegular(): boolean;
  /**
   * Check if it's replaceable
   *
   * Replaceable means that, for each combination of `pubkey` and `kind`,
   * only the latest event MUST be stored by relays, older versions MAY be discarded.
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  isReplaceable(): boolean;
  /**
   * Check if it's ephemeral
   *
   * Ephemeral means that event is not expected to be stored by relays.
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  isEphemeral(): boolean;
  /**
   * Check if it's addressable
   *
   * Addressable means that, for each combination of `pubkey`, `kind` and the `d` tag's first value,
   * only the latest event MUST be stored by relays, older versions MAY be discarded.
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  isAddressable(): boolean;
  /**
   * Check if it's a NIP90 job request
   *
   * <https://github.com/nostr-protocol/nips/blob/master/90.md>
   */
  isJobRequest(): boolean;
  /**
   * Check if it's a NIP90 job result
   *
   * <https://github.com/nostr-protocol/nips/blob/master/90.md>
   */
  isJobResult(): boolean;
}
/**
 * List Invoice Request Params
 */
export class ListTransactionsRequest {
  free(): void;
  constructor();
  /**
   * Starting timestamp in seconds since epoch
   */
  get from(): Timestamp | undefined;
  /**
   * Starting timestamp in seconds since epoch
   */
  set from(value: Timestamp | null | undefined);
  /**
   * Ending timestamp in seconds since epoch
   */
  get until(): Timestamp | undefined;
  /**
   * Ending timestamp in seconds since epoch
   */
  set until(value: Timestamp | null | undefined);
  /**
   * Number of invoices to return
   */
  get limit(): bigint | undefined;
  /**
   * Number of invoices to return
   */
  set limit(value: bigint | null | undefined);
  /**
   * Offset of the first invoice to return
   */
  get offset(): bigint | undefined;
  /**
   * Offset of the first invoice to return
   */
  set offset(value: bigint | null | undefined);
  /**
   * If true, include unpaid invoices
   */
  get unpaid(): boolean | undefined;
  /**
   * If true, include unpaid invoices
   */
  set unpaid(value: boolean | null | undefined);
  /**
   * [`TransactionType::Incoming`] for invoices, [`TransactionType::Outgoing`] for payments, [`None`] for both
   */
  get transaction_type(): TransactionType | undefined;
  /**
   * [`TransactionType::Incoming`] for invoices, [`TransactionType::Outgoing`] for payments, [`None`] for both
   */
  set transaction_type(value: TransactionType | null | undefined);
}
export class LiveEvent {
  private constructor();
  free(): void;
  readonly id: string;
  readonly title: string | undefined;
  readonly summary: string | undefined;
  readonly image: Image | undefined;
  readonly hashtags: string[];
  readonly streaming: string | undefined;
  readonly recording: string | undefined;
  readonly starts: Timestamp | undefined;
  readonly ends: Timestamp | undefined;
  readonly status: LiveEventStatus | undefined;
  readonly currentPartecipants: number | undefined;
  readonly totalPartecipants: number | undefined;
  readonly relays: string[];
  readonly host: LiveEventHost | undefined;
  readonly speakers: User[];
  readonly participants: User[];
}
export class LiveEventHost {
  private constructor();
  free(): void;
  readonly publicKey: PublicKey;
  readonly relayUrl: string | undefined;
  readonly proof: string | undefined;
}
export class LiveEventStatus {
  private constructor();
  free(): void;
  static planned(): LiveEventStatus;
  static live(): LiveEventStatus;
  static ended(): LiveEventStatus;
  static custom(string: string): LiveEventStatus;
}
export class LogLevel {
  private constructor();
  free(): void;
  static trace(): LogLevel;
  static debug(): LogLevel;
  static info(): LogLevel;
  static warn(): LogLevel;
  static error(): LogLevel;
}
/**
 * Lookup Invoice Request Params
 */
export class LookupInvoiceRequest {
  free(): void;
  constructor();
  /**
   * Payment hash of invoice
   */
  get payment_hash(): string | undefined;
  /**
   * Payment hash of invoice
   */
  set payment_hash(value: string | null | undefined);
  /**
   * Bolt11 invoice
   */
  get invoice(): string | undefined;
  /**
   * Bolt11 invoice
   */
  set invoice(value: string | null | undefined);
}
export class LookupInvoiceResponse {
  private constructor();
  free(): void;
  /**
   * Transaction type
   */
  get transaction_type(): TransactionType | undefined;
  /**
   * Transaction type
   */
  set transaction_type(value: TransactionType | null | undefined);
  /**
   * Transaction state
   */
  get state(): TransactionState | undefined;
  /**
   * Transaction state
   */
  set state(value: TransactionState | null | undefined);
  /**
   * Bolt11 invoice
   */
  get invoice(): string | undefined;
  /**
   * Bolt11 invoice
   */
  set invoice(value: string | null | undefined);
  /**
   * Invoice's description
   */
  get description(): string | undefined;
  /**
   * Invoice's description
   */
  set description(value: string | null | undefined);
  /**
   * Invoice's description hash
   */
  get description_hash(): string | undefined;
  /**
   * Invoice's description hash
   */
  set description_hash(value: string | null | undefined);
  /**
   * Payment preimage
   */
  get preimage(): string | undefined;
  /**
   * Payment preimage
   */
  set preimage(value: string | null | undefined);
  /**
   * Payment hash
   */
  payment_hash: string;
  /**
   * Amount in millisatoshis
   */
  amount: bigint;
  /**
   * Fees paid in millisatoshis
   */
  fees_paid: bigint;
  /**
   * Creation timestamp in seconds since epoch
   */
  created_at: Timestamp;
  /**
   * Expiration timestamp in seconds since epoch
   */
  get expires_at(): Timestamp | undefined;
  /**
   * Expiration timestamp in seconds since epoch
   */
  set expires_at(value: Timestamp | null | undefined);
  /**
   * Settled timestamp in seconds since epoch
   */
  get settled_at(): Timestamp | undefined;
  /**
   * Settled timestamp in seconds since epoch
   */
  set settled_at(value: Timestamp | null | undefined);
}
/**
 * Make Invoice Request Params
 */
export class MakeInvoiceRequest {
  free(): void;
  constructor(amount: bigint);
  /**
   * Amount in millisatoshis
   */
  amount: bigint;
  /**
   * Invoice description
   */
  get description(): string | undefined;
  /**
   * Invoice description
   */
  set description(value: string | null | undefined);
  /**
   * Invoice description hash
   */
  get description_hash(): string | undefined;
  /**
   * Invoice description hash
   */
  set description_hash(value: string | null | undefined);
  /**
   * Invoice expiry in seconds
   */
  get expiry(): bigint | undefined;
  /**
   * Invoice expiry in seconds
   */
  set expiry(value: bigint | null | undefined);
}
export class MakeInvoiceResponse {
  private constructor();
  free(): void;
  /**
   * Bolt 11 invoice
   */
  invoice: string;
  /**
   * Invoice's payment hash
   */
  get payment_hash(): string | undefined;
  /**
   * Invoice's payment hash
   */
  set payment_hash(value: string | null | undefined);
  /**
   * Invoice's description
   */
  get description(): string | undefined;
  /**
   * Invoice's description
   */
  set description(value: string | null | undefined);
  /**
   * Invoice's description hash
   */
  get description_hash(): string | undefined;
  /**
   * Invoice's description hash
   */
  set description_hash(value: string | null | undefined);
  /**
   * Payment preimage
   */
  get preimage(): string | undefined;
  /**
   * Payment preimage
   */
  set preimage(value: string | null | undefined);
  /**
   * Amount in msats.
   */
  get amount(): bigint | undefined;
  /**
   * Amount in msats.
   */
  set amount(value: bigint | null | undefined);
  /**
   * Creation timestamp in seconds since epoch
   */
  get created_at(): Timestamp | undefined;
  /**
   * Creation timestamp in seconds since epoch
   */
  set created_at(value: Timestamp | null | undefined);
  /**
   * Expiration timestamp in seconds since epoch
   */
  get expires_at(): Timestamp | undefined;
  /**
   * Expiration timestamp in seconds since epoch
   */
  set expires_at(value: Timestamp | null | undefined);
}
export class Metadata {
  free(): void;
  constructor();
  static fromJson(json: string): Metadata;
  asJson(): string;
  asPrettyJson(): string;
  name(name: string): Metadata;
  getName(): string | undefined;
  displayName(display_name: string): Metadata;
  getDisplayName(): string | undefined;
  about(about: string): Metadata;
  getAbout(): string | undefined;
  website(url: string): Metadata;
  getWebsite(): string | undefined;
  picture(url: string): Metadata;
  getPicture(): string | undefined;
  banner(url: string): Metadata;
  getBanner(): string | undefined;
  nip05(nip05: string): Metadata;
  getNip05(): string | undefined;
  lud06(lud06: string): Metadata;
  getLud06(): string | undefined;
  lud16(lud16: string): Metadata;
  getLud16(): string | undefined;
}
/**
 * Multi Pay Invoice Request Params
 */
export class MultiPayInvoiceRequest {
  free(): void;
  constructor(invoices: PayInvoiceRequest[]);
  /**
   * Invoices to pay
   */
  invoices: PayInvoiceRequest[];
}
/**
 * Multi Pay Keysend Request Params
 */
export class MultiPayKeysendRequest {
  free(): void;
  constructor(keysends: PayKeysendRequest[]);
  /**
   * Keysends
   */
  keysends: PayKeysendRequest[];
}
/**
 * Things the user doesn't want to see in their feeds
 *
 * <https://github.com/nostr-protocol/nips/blob/master/51.md>
 */
export class MuteList {
  free(): void;
  constructor();
  public_keys: PublicKey[];
  hashtags: string[];
  event_ids: EventId[];
  words: string[];
}
/**
 * Nostr Wallet Connect client
 */
export class NWC {
  free(): void;
  /**
   * Compose new `NWC` client
   */
  constructor(uri: NostrWalletConnectURI);
  /**
   * Compose new `NWC` client with `NostrWalletConnectOptions`
   */
  static withOpts(uri: NostrWalletConnectURI, opts: NostrWalletConnectOptions): NWC;
  /**
   * Pay invoice
   */
  payInvoice(params: PayInvoiceRequest): Promise<PayInvoiceResponse>;
  /**
   * Pay keysend
   */
  payKeysend(params: PayKeysendRequest): Promise<PayKeysendResponse>;
  /**
   * Create invoice
   */
  makeInvoice(params: MakeInvoiceRequest): Promise<MakeInvoiceResponse>;
  /**
   * Lookup invoice
   */
  lookupInvoice(params: LookupInvoiceRequest): Promise<LookupInvoiceResponse>;
  /**
   * List transactions
   */
  listTransactions(params: ListTransactionsRequest): Promise<LookupInvoiceResponse[]>;
  /**
   * Get balance
   */
  getBalance(): Promise<bigint>;
  /**
   * Get info
   */
  getInfo(): Promise<GetInfoResponse>;
}
export class Nip19Coordinate {
  free(): void;
  constructor(coordinate: Coordinate, relays: string[]);
  static fromBech32(bech32: string): Nip19Coordinate;
  static fromNostrUri(uri: string): Nip19Coordinate;
  toBech32(): string;
  toNostrUri(): string;
  coordinate(): Coordinate;
  relays(): string[];
}
export class Nip19Event {
  free(): void;
  constructor(event_id: EventId, author: PublicKey | null | undefined, kind: Kind | null | undefined, relays: string[]);
  static fromEvent(event: Event): Nip19Event;
  static fromBech32(bech32: string): Nip19Event;
  static fromNostrUri(uri: string): Nip19Event;
  toBech32(): string;
  toNostrUri(): string;
  eventId(): EventId;
  author(): PublicKey | undefined;
  kind(): Kind | undefined;
  relays(): string[];
}
export class Nip19Profile {
  free(): void;
  /**
   * New NIP19 profile
   */
  constructor(public_key: PublicKey, relays: string[]);
  static fromBech32(bech32: string): Nip19Profile;
  static fromNostrUri(uri: string): Nip19Profile;
  toBech32(): string;
  toNostrUri(): string;
  publicKey(): PublicKey;
  relays(): string[];
}
export class NostrConnect {
  free(): void;
  /**
   * Construct Nostr Connect client
   */
  constructor(uri: NostrConnectURI, app_keys: Keys, timeout: Duration);
  /**
   * Get signer relays
   */
  relays(): string[];
  /**
   * Get `bunker` URI
   */
  bunkerUri(): Promise<NostrConnectURI>;
}
export class NostrConnectMetadata {
  free(): void;
  /**
   * New Nostr Connect Metadata
   */
  constructor(name: string);
  /**
   * URL of the website requesting the connection
   */
  url(url: string): NostrConnectMetadata;
  /**
   * Description of the `App`
   */
  description(description: string): NostrConnectMetadata;
  /**
   * List of URLs for icons of the `App`
   */
  icons(icons: string[]): NostrConnectMetadata;
  /**
   * Serialize as JSON string
   */
  asJson(): string;
}
export class NostrConnectURI {
  private constructor();
  free(): void;
  static parse(uri: string): NostrConnectURI;
  asString(): string;
}
/**
 * Nostr Database
 */
export class NostrDatabase {
  private constructor();
  free(): void;
  /**
   * Open/Create database with **unlimited** capacity
   */
  static indexeddb(name: string): Promise<NostrDatabase>;
  /**
   * Open/Create database with **limited** capacity
   */
  static indexeddbBounded(name: string, max_capacity: bigint): Promise<NostrDatabase>;
  /**
   * Save `Event` into store
   *
   * **This method assumes that `Event` was already verified**
   */
  save_event(event: Event): Promise<SaveEventStatus>;
  /**
   * Get [`Event`] by [`EventId`]
   */
  eventById(event_id: EventId): Promise<Event | undefined>;
  count(filter: Filter): Promise<bigint>;
  query(filter: Filter): Promise<Events>;
  /**
   * Wipe all data
   */
  wipe(): Promise<void>;
  metadata(public_key: PublicKey): Promise<Metadata | undefined>;
}
export class NostrGossip {
  private constructor();
  free(): void;
  /**
   * Construct a new in-memory gossip store
   */
  static inmemory(): NostrGossip;
}
export class NostrSigner {
  private constructor();
  free(): void;
  /**
   * Private keys
   */
  static keys(keys: Keys): NostrSigner;
  /**
   * NIP07
   */
  static nip07(signer: BrowserSigner): NostrSigner;
  /**
   * NIP46
   */
  static nip46(signer: NostrConnect): NostrSigner;
  /**
   * Get signer public key
   */
  publicKey(): Promise<PublicKey>;
  signEvent(unsigned: UnsignedEvent): Promise<Event>;
  nip04Encrypt(public_key: PublicKey, content: string): Promise<string>;
  nip04Decrypt(public_key: PublicKey, encrypted_content: string): Promise<string>;
  nip44Encrypt(public_key: PublicKey, content: string): Promise<string>;
  nip44Decrypt(public_key: PublicKey, content: string): Promise<string>;
}
/**
 * NWC options
 */
export class NostrWalletConnectOptions {
  free(): void;
  /**
   * New default NWC options
   */
  constructor();
  /**
   * Set NWC requests timeout (default: 10 secs)
   */
  timeout(timeout: Duration): NostrWalletConnectOptions;
}
export class NostrWalletConnectURI {
  free(): void;
  /**
   * Create new Nostr Wallet Connect URI
   */
  constructor(public_key: PublicKey, relays: string[], random_secret_key: SecretKey, lud16?: string | null);
  /**
   * Parse
   */
  static parse(uri: string): NostrWalletConnectURI;
  /**
   * App Pubkey
   */
  publicKey(): PublicKey;
  /**
   * URLs of the relays of choice where the `App` is connected and the `Signer` must send and listen for messages.
   */
  relays(): string[];
  /**
   * 32-byte randomly generated hex encoded string
   */
  secret(): SecretKey;
  /**
   * A lightning address that clients can use to automatically setup the lud16 field on the user's profile if they have none configured.
   */
  lud16(): string | undefined;
  asString(): string;
}
/**
 * Output
 *
 * Send or negentropy reconciliation output
 */
export class Output {
  private constructor();
  free(): void;
  /**
   * Set of relays that success
   */
  success: string[];
  /**
   * Map of relays that failed, with related errors.
   */
  failed: FailedOutputItem[];
}
/**
 * Pay Invoice Request
 */
export class PayInvoiceRequest {
  free(): void;
  constructor(invoice: string);
  /**
   * Optional id
   */
  get id(): string | undefined;
  /**
   * Optional id
   */
  set id(value: string | null | undefined);
  /**
   * Request invoice
   */
  invoice: string;
  /**
   * Optional amount in millisatoshis
   */
  get amount(): bigint | undefined;
  /**
   * Optional amount in millisatoshis
   */
  set amount(value: bigint | null | undefined);
}
export class PayInvoiceResponse {
  private constructor();
  free(): void;
  /**
   * Response preimage
   */
  preimage: string;
  /**
   * Fees paid
   */
  get fees_paid(): bigint | undefined;
  /**
   * Fees paid
   */
  set fees_paid(value: bigint | null | undefined);
}
/**
 * Pay Invoice Request Params
 */
export class PayKeysendRequest {
  free(): void;
  constructor(pubkey: string, amount: bigint);
  /**
   * Optional id
   */
  get id(): string | undefined;
  /**
   * Optional id
   */
  set id(value: string | null | undefined);
  /**
   * Amount in millisatoshis
   */
  amount: bigint;
  /**
   * Receiver's node id
   */
  pubkey: string;
  /**
   * Optional preimage
   */
  get preimage(): string | undefined;
  /**
   * Optional preimage
   */
  set preimage(value: string | null | undefined);
  /**
   * Optional TLVs to be added to the keysend payment
   */
  tlv_records: KeysendTLVRecord[];
}
export class PayKeysendResponse {
  private constructor();
  free(): void;
  /**
   * Response preimage
   */
  preimage: string;
  /**
   * Fees paid
   */
  get fees_paid(): bigint | undefined;
  /**
   * Fees paid
   */
  set fees_paid(value: bigint | null | undefined);
}
export class ProductData {
  free(): void;
  constructor(id: string, stall_id: string, name: string, currency: string);
  readonly id: string;
  readonly stallId: string;
  readonly name: string;
  readonly description: string | undefined;
  readonly images: string[] | undefined;
  readonly currency: string;
  readonly price: number;
  readonly quantity: number;
  readonly specs: (string[])[] | undefined;
  readonly shipping: ShippingCost[];
  readonly categories: string[] | undefined;
}
export class PublicKey {
  private constructor();
  free(): void;
  /**
   * Try to parse public key from `hex`, `bech32` or [NIP21](https://github.com/nostr-protocol/nips/blob/master/21.md) uri
   */
  static parse(public_key: string): PublicKey;
  /**
   * Get in hex format
   */
  toHex(): string;
  /**
   * Get in bech32 format
   */
  toBech32(): string;
  toNostrUri(): string;
}
export class Reconciliation {
  private constructor();
  free(): void;
  /**
   * The IDs that were stored locally
   */
  local: EventId[];
  /**
   * The IDs that were missing locally (stored on relay)
   */
  remote: EventId[];
  /**
   * Events that are **successfully** sent to relays during reconciliation
   */
  sent: EventId[];
  /**
   * Event that are **successfully** received from relay
   */
  received: EventId[];
}
/**
 * Reconciliation output
 */
export class ReconciliationOutput {
  private constructor();
  free(): void;
  report: Reconciliation;
  /**
   * Set of relays that success
   */
  success: string[];
  /**
   * Map of relays that failed, with related errors.
   */
  failed: FailedOutputItem[];
}
export class Relay {
  private constructor();
  free(): void;
  /**
   * Get relay url
   */
  url(): string;
  /**
   * Get status
   */
  status(): RelayStatus;
  /**
   * Get Relay Service Flags
   */
  flags(): AtomicRelayServiceFlags;
  /**
   * Check if relay is connected
   */
  isConnected(): boolean;
  /**
   * Get options
   */
  opts(): RelayOptions;
  /**
   * Get number of messages in queue
   */
  queue(): bigint;
  /**
   * Connect to the relay
   *
   * # Overview
   *
   * If the relay’s status is not [`RelayStatus::Initialized`] or [`RelayStatus::Terminated`],
   * this method returns immediately without doing anything.
   * Otherwise, the connection task will be spawned, which will attempt to connect to relay.
   *
   * This method returns immediately and doesn't provide any information on if the connection was successful or not.
   *
   * # Automatic reconnection
   *
   * By default, in case of disconnection, the connection task will automatically attempt to reconnect.
   * This behavior can be disabled by changing [`RelayOptions::reconnect`] option.
   */
  connect(): void;
  /**
   * Try to establish a connection with the relay.
   *
   * # Overview
   *
   * If the relay’s status is not [`RelayStatus::Initialized`] or [`RelayStatus::Terminated`],
   * this method returns immediately without doing anything.
   * Otherwise, attempts to establish a connection without spawning the connection task if it fails.
   * This means that if the connection fails, no automatic retries are scheduled.
   * Use [`Relay::connect`] if you want to immediately spawn a connection task,
   * regardless of whether the initial connection succeeds.
   *
   * Returns an error if the connection fails.
   *
   * # Automatic reconnection
   *
   * By default, in case of disconnection (after a first successful connection),
   * the connection task will automatically attempt to reconnect.
   * This behavior can be disabled by changing [`RelayOptions::reconnect`] option.
   */
  tryConnect(timeout: Duration): Promise<void>;
  /**
   * Disconnect from relay and set status to `Terminated`
   */
  disconnect(): void;
  /**
   * Ban relay and set status to `Banned`.
   *
   * A banned relay can't reconnect again.
   */
  ban(): void;
  /**
   * Send msg to relay
   */
  sendMsg(msg: ClientMessage): void;
  /**
   * Send multiple `ClientMessage` at once
   */
  batchMsg(msgs: ClientMessage[]): void;
  /**
   * Send event and wait for `OK` relay msg
   */
  sendEvent(event: Event): Promise<EventId>;
  /**
   * Subscribe to filters
   *
   * ### Auto-closing subscription
   *
   * It's possible to automatically close a subscription by configuring the `SubscribeOptions`.
   */
  subscribe(filter: Filter, opts: SubscribeOptions): Promise<string>;
  /**
   * Subscribe with custom subscription ID
   *
   * ### Auto-closing subscription
   *
   * It's possible to automatically close a subscription by configuring the `SubscribeOptions`.
   */
  subscribeWithId(id: string, filter: Filter, opts: SubscribeOptions): Promise<void>;
  /**
   * Unsubscribe
   */
  unsubscribe(id: string): Promise<void>;
  /**
   * Unsubscribe from all subscriptions
   */
  unsubscribeAll(): Promise<void>;
  /**
   * Fetch events
   */
  fetchEvents(filter: Filter, timeout: Duration, policy: ReqExitPolicy): Promise<Events>;
  /**
   * Count events
   */
  countEvents(filter: Filter, timeout: Duration): Promise<bigint>;
  /**
   * Sync events with relay (negentropy reconciliation)
   */
  sync(filter: Filter, opts: SyncOptions): Promise<Reconciliation>;
}
/**
 * Relay Limits
 */
export class RelayLimits {
  free(): void;
  /**
   * Construct with default limits
   */
  constructor();
  /**
   * Disable all limits
   */
  static disable(): RelayLimits;
  /**
   * Maximum size of normalised JSON, in bytes (default: 5MB)
   */
  messageMaxSize(max_size?: number | null): RelayLimits;
  /**
   * Maximum size of normalised JSON, in bytes (default: null)
   */
  eventMaxSize(max_size?: number | null): RelayLimits;
  /**
   * Maximum size per kind of normalised JSON, in bytes
   */
  eventMaxSizePerKind(kind: number, max_size?: number | null): RelayLimits;
  /**
   * Maximum number of tags allowed (default: 2_000)
   */
  eventMaxNumTags(max_num_tags?: number | null): RelayLimits;
  /**
   * Maximum number of tags per kind allowed
   */
  eventMaxNumTagsPerKind(kind: number, max_num_tags?: number | null): RelayLimits;
}
export class RelayListItem {
  free(): void;
  constructor(url: string, metadata?: RelayMetadata | null);
  url: string;
  get metadata(): RelayMetadata | undefined;
  set metadata(value: RelayMetadata | null | undefined);
}
export class RelayMessage {
  private constructor();
  free(): void;
  /**
   * Create new `EVENT` message
   */
  static event(subscription_id: string, event: Event): RelayMessage;
  /**
   * Create new `NOTICE` message
   */
  static notice(message: string): RelayMessage;
  /**
   * Create new `CLOSED` message
   */
  static closed(subscription_id: string, message: string): RelayMessage;
  /**
   * Create new `EOSE` message
   */
  static eose(subscription_id: string): RelayMessage;
  /**
   * Create new `OK` message
   */
  static ok(event_id: EventId, status: boolean, message: string): RelayMessage;
  /**
   * Create new `AUTH` message
   */
  static auth(challenge: string): RelayMessage;
  /**
   * Create new `EVENT` message
   */
  static count(subscription_id: string, count: number): RelayMessage;
  /**
   * Deserialize `RelayMessage` from JSON string
   *
   * **This method NOT verify the event signature!**
   */
  static fromJson(json: string): RelayMessage;
  asJson(): string;
}
/**
 * `Relay` options
 */
export class RelayOptions {
  free(): void;
  /**
   * New default relay options
   */
  constructor();
  /**
   * Set Relay Service Flags
   */
  flags(flags: RelayServiceFlags): RelayOptions;
  /**
   * Set read flag
   */
  read(read: boolean): RelayOptions;
  /**
   * Set write flag
   */
  write(write: boolean): RelayOptions;
  /**
   * Set ping flag
   */
  ping(ping: boolean): RelayOptions;
  /**
   * Enable/disable auto reconnection (default: true)
   */
  reconnect(reconnect: boolean): RelayOptions;
  /**
   * Retry connection time (default: 10 sec)
   */
  retry_interval(interval: Duration): RelayOptions;
  /**
   * Automatically adjust retry interval based on success/attempts (default: true)
   */
  adjust_retry_interval(adjust_retry_interval: boolean): RelayOptions;
  /**
   * Set custom limits
   */
  limits(limits: RelayLimits): RelayOptions;
}
export class RelayServiceFlags {
  free(): void;
  constructor();
  /**
   * Default flags: `READ`, `WRITE` and `PING`
   */
  static default(): RelayServiceFlags;
  static read(): RelayServiceFlags;
  static write(): RelayServiceFlags;
  static ping(): RelayServiceFlags;
  /**
   * Add `RelayServiceFlags` together.
   */
  add(other: RelayServiceFlags): void;
  /**
   * Remove `RelayServiceFlags` from this.
   */
  remove(other: RelayServiceFlags): void;
}
/**
 * Request (REQ) exit policy
 */
export class ReqExitPolicy {
  private constructor();
  free(): void;
  /**
   * Exit on EOSE
   */
  static exitOnEose(): ReqExitPolicy;
  /**
   * Wait to receive N events and then exit.
   */
  static waitForEvents(num: number): ReqExitPolicy;
  /**
   * After EOSE is received, keep listening for N more events that match the filter
   */
  static waitForEventsAfterEOSE(num: number): ReqExitPolicy;
  /**
   * After EOSE is received, keep listening for matching events for `Duration` more time
   */
  static waitDurationAfterEOSE(duration: Duration): ReqExitPolicy;
}
export class SecretKey {
  private constructor();
  free(): void;
  /**
   * Try to parse secret key from `hex` or `bech32`
   */
  static parse(secret_key: string): SecretKey;
  /**
   * Generate random secret key
   */
  static generate(): SecretKey;
  toHex(): string;
  toBech32(): string;
  /**
   * Encrypt secret key
   *
   * By default, `LOG_N` is set to `16` and `KeySecurity` to `Unknown`.
   * To use custom values check `EncryptedSecretKey` constructor.
   */
  encrypt(password: string): EncryptedSecretKey;
}
/**
 * Send event output
 */
export class SendEventOutput {
  private constructor();
  free(): void;
  /**
   * Event ID
   */
  id: EventId;
  /**
   * Set of relays that success
   */
  success: string[];
  /**
   * Map of relays that failed, with related errors.
   */
  failed: FailedOutputItem[];
}
export class ShippingCost {
  private constructor();
  free(): void;
  readonly id: string;
  readonly cost: number;
}
export class ShippingMethod {
  free(): void;
  constructor(id: string, cost: number);
  getShippingCost(): ShippingCost;
  readonly id: string;
  readonly name: string | undefined;
  readonly cost: number;
  readonly regions: string[];
}
export class SingleLetterTag {
  private constructor();
  free(): void;
  static lowercase(character: Alphabet): SingleLetterTag;
  static uppercase(character: Alphabet): SingleLetterTag;
  isLowercase(): boolean;
  isUppercase(): boolean;
}
export class StallData {
  free(): void;
  constructor(id: string, name: string, currency: string);
  readonly id: string;
  readonly name: string;
  readonly description: string | undefined;
  readonly currency: string;
  readonly shipping: ShippingMethod[];
}
/**
 * Auto-closing subscribe options
 */
export class SubscribeAutoCloseOptions {
  free(): void;
  constructor();
  /**
   * Close subscription when the policy is satisfied
   */
  exitPolicy(policy: ReqExitPolicy): SubscribeAutoCloseOptions;
  /**
   * Automatically close subscription after `Duration`
   */
  timeout(timeout?: Duration | null): SubscribeAutoCloseOptions;
  /**
   * Automatically close subscription if no notifications/events are received within the duration.
   */
  idleTimeout(timeout?: Duration | null): SubscribeAutoCloseOptions;
}
/**
 * Subscribe options
 */
export class SubscribeOptions {
  free(): void;
  constructor();
  /**
   * Set auto-close conditions
   */
  close_on(opts?: SubscribeAutoCloseOptions | null): SubscribeOptions;
}
/**
 * Subscribe output
 */
export class SubscribeOutput {
  private constructor();
  free(): void;
  /**
   * Subscription ID
   */
  id: string;
  /**
   * Set of relays that success
   */
  success: string[];
  /**
   * Map of relays that failed, with related errors.
   */
  failed: FailedOutputItem[];
}
export class SubscriptionId {
  free(): void;
  constructor(id: string);
  /**
   * Generate new random [`SubscriptionId`]
   */
  static generate(): SubscriptionId;
  get(): string;
}
export class SyncOptions {
  free(): void;
  /**
   * New default options
   */
  constructor();
  /**
   * Timeout to check if negentropy it's supported (default: 10 secs)
   */
  initialTimeout(timeout: Duration): SyncOptions;
  /**
   * Sync direction (default: down)
   */
  direction(direction: SyncDirection): SyncOptions;
  /**
   * Dry run
   *
   * Just check what event are missing: execute reconciliation but WITHOUT
   * getting/sending full events.
   */
  dry_run(): SyncOptions;
}
/**
 * Tag
 */
export class Tag {
  private constructor();
  free(): void;
  /**
   * Parse tag
   *
   * Return error if the tag is empty!
   */
  static parse(tag: string[]): Tag;
  /**
   * Get tag kind
   */
  kind(): string;
  /**
   * Return the **first** tag value (index `1`), if exists.
   */
  content(): string | undefined;
  /**
   * Get `SingleLetterTag`
   */
  singleLetterTag(): SingleLetterTag | undefined;
  /**
   * Get tag len
   */
  len(): bigint;
  /**
   * Get array of strings
   */
  asVec(): string[];
  /**
   * Consume tag and return array of strings
   */
  toVec(): string[];
  /**
   * Compose `["e", "<event-id">]`
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  static event(event_id: EventId): Tag;
  /**
   * Compose `["p", "<public-key>"]` tag
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  static publicKey(public_key: PublicKey): Tag;
  /**
   * Compose `["d", "<identifier>"]` tag
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  static identifier(identifier: string): Tag;
  /**
   * Compose `["a", "<coordinate>"]` tag
   *
   * <https://github.com/nostr-protocol/nips/blob/master/01.md>
   */
  static coordinate(coordinate: Coordinate, relay_url?: string | null): Tag;
  /**
   * Compose `["nonce", "<nonce>", "<difficulty>"]` tag
   *
   * <https://github.com/nostr-protocol/nips/blob/master/13.md>
   */
  static pow(nonce: bigint, difficulty: number): Tag;
  /**
   * Construct `["client", "<name>"]` tag
   *
   * <https://github.com/nostr-protocol/nips/blob/master/89.md>
   */
  static client(name: string): Tag;
  /**
   * Compose `["expiration", "<timestamp>"]` tag
   *
   * <https://github.com/nostr-protocol/nips/blob/master/40.md>
   */
  static expiration(timestamp: Timestamp): Tag;
  /**
   * Compose `["e", "<event-id>", "<report>"]` tag
   *
   * <https://github.com/nostr-protocol/nips/blob/master/56.md>
   */
  static eventReport(event_id: EventId, report: Report): Tag;
  /**
   * Compose `["p", "<public-key>", "<report>"]` tag
   *
   * <https://github.com/nostr-protocol/nips/blob/master/56.md>
   */
  static publicKeyReport(public_key: PublicKey, report: Report): Tag;
  /**
   * Compose `["r", "<relay-url>", "<metadata>"]` tag
   *
   * <https://github.com/nostr-protocol/nips/blob/master/65.md>
   */
  static relayMetadata(relay_url: string, metadata?: RelayMetadata | null): Tag;
  /**
   * Compose `["t", "<hashtag>"]` tag
   *
   * This will convert the hashtag to lowercase.
   */
  static hashtag(hashtag: string): Tag;
  /**
   * Compose `["r", "<value>"]` tag
   */
  static reference(reference: string): Tag;
  /**
   * Compose `["title", "<title>"]` tag
   */
  static title(title: string): Tag;
  /**
   * Compose image tag
   */
  static image(url: string, dimensions?: ImageDimensions | null): Tag;
  /**
   * Compose `["description", "<description>"]` tag
   */
  static description(description: string): Tag;
  /**
   * Protected event
   *
   * JSON: `["-"]`
   *
   * <https://github.com/nostr-protocol/nips/blob/master/70.md>
   */
  static protected(): Tag;
  /**
   * A short human-readable plaintext summary of what that event is about
   *
   * JSON: `["alt", "<summary>"]`
   *
   * <https://github.com/nostr-protocol/nips/blob/master/31.md>
   */
  static alt(summary: string): Tag;
  /**
   * Check if is a standard event tag with `root` marker
   */
  isRoot(): boolean;
  /**
   * Check if is a standard event tag with `reply` marker
   */
  isReply(): boolean;
  /**
   * Check if it's a protected event tag
   *
   * <https://github.com/nostr-protocol/nips/blob/master/70.md>
   */
  isProtected(): boolean;
}
export class Tags {
  private constructor();
  free(): void;
  static fromList(list: Tag[]): Tags;
  static parse(tags: (string[])[]): Tags;
  /**
   * Get number of tags
   */
  len(): bigint;
  /**
   * Check if contains no tags.
   */
  isEmpty(): boolean;
  /**
   * Get first tag
   */
  first(): Tag | undefined;
  /**
   * Get last tag
   */
  last(): Tag | undefined;
  /**
   * Get tag at index
   */
  get(index: bigint): Tag | undefined;
  /**
   * /// Get first tag that match tag kind
   */
  find(kind: string): Tag | undefined;
  /**
   * Get first tag that match tag kind.
   */
  filter(kind: string): Tag[];
  /**
   * Clone the object and return list of tags
   */
  asVec(): Tag[];
  /**
   * This method consume the object and return a list of tags
   */
  toVec(): Tag[];
  /**
   * Extract identifier (`d` tag), if exists.
   */
  identifier(): string | undefined;
  /**
   * Get timestamp expiration, if set
   */
  expiration(): Timestamp | undefined;
  /**
   * Extract public keys from `p` tags.
   *
   * This method extract ONLY supported standard variants
   */
  publicKeys(): PublicKey[];
  /**
   * Extract event IDs from `e` tags.
   *
   * This method extract ONLY supported standard variants
   */
  eventIds(): EventId[];
  /**
   * Extract coordinates from `a` tags.
   *
   * This method extract ONLY supported standard variants
   */
  coordinates(): Coordinate[];
  /**
   * Extract hashtags from `t` tags.
   *
   * This method extract ONLY supported standard variants
   */
  hashtags(): string[];
}
export class Thumbnails {
  free(): void;
  constructor(url: string, dimensions?: ImageDimensions | null);
  url: string;
  get dimensions(): ImageDimensions | undefined;
  set dimensions(value: ImageDimensions | null | undefined);
}
export class Timestamp {
  private constructor();
  free(): void;
  /**
   * Get UNIX timestamp (seconds)
   */
  static now(): Timestamp;
  static fromSecs(secs: number): Timestamp;
  /**
   * Get timestamp as seconds
   */
  asSecs(): number;
  /**
   * Convert `Timestamp` to human datetime
   */
  toHumanDatetime(): string;
}
export class UnsignedEvent {
  private constructor();
  free(): void;
  static fromJson(json: string): UnsignedEvent;
  asJson(): string;
  asPrettyJson(): string;
  /**
   * Sign an unsigned event
   */
  sign(signer: NostrSigner): Promise<Event>;
  /**
   * Sign an unsigned event with keys signer
   *
   * Internally: calculate event ID (if not set), sign it, compose and verify event.
   */
  signWithKeys(keys: Keys): Event;
  /**
   * Add signature to unsigned event
   *
   * Internally verify the event.
   */
  addSignature(sig: string): Event;
  readonly id: EventId | undefined;
  readonly pubkey: PublicKey;
  readonly createdAt: Timestamp;
  readonly kind: Kind;
  readonly tags: Tag[];
  readonly content: string;
}
/**
 * Unwrapped Gift Wrap
 *
 * <https://github.com/nostr-protocol/nips/blob/master/59.md>
 */
export class UnwrappedGift {
  private constructor();
  free(): void;
  /**
   * Unwrap Gift Wrap event
   *
   * Internally verify the `seal` event
   */
  static fromGiftWrap(signer: NostrSigner, gift_wrap: Event): Promise<UnwrappedGift>;
  /**
   * Get sender public key
   */
  readonly sender: PublicKey;
  /**
   * Get rumor
   */
  readonly rumor: UnsignedEvent;
}
export class User {
  free(): void;
  constructor(public_key: PublicKey, url?: string | null);
  publicKey: PublicKey;
  get url(): string | undefined;
  set url(value: string | null | undefined);
}
export class ZapRequestData {
  free(): void;
  constructor(public_key: PublicKey, relays: string[], message: string, amount?: number | null, lnurl?: string | null, event_id?: EventId | null, event_coordinate?: Coordinate | null);
  readonly publicKey: PublicKey;
  readonly relays: string[];
  readonly message: string;
  readonly amount: number | undefined;
  readonly lnurl: string | undefined;
  readonly eventId: EventId | undefined;
  readonly eventCoordinate: Coordinate | undefined;
}
/**
 * Load the WebAssembly module in the background, if it has not already been loaded.
 *
 * Returns a promise which will resolve once the other methods are ready.
 *
 * @returns {Promise<void>}
 */
 export function loadWasmAsync(): Promise<void>;

 export function loadWasmSync(): void;