aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.d.ts
blob: a6cb432428bbd6f40510c711fa0aa7a0ed8ad74a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/// <reference types="@sveltejs/kit" />

declare const grecaptcha: {
  ready(callback: () => void): void;
  execute(siteKey: string, options: { action: string }): Promise<string>;
};

declare class NDEFReader {
  constructor();
  scan(): Promise<void>;
  write(data: any): Promise<void>;
  addEventListener(type: string, listener: (event: any) => void): void;
  removeEventListener(type: string, listener: (event: any) => void): void;
}

interface Window {
  nostr?: {
    getPublicKey(): Promise<string>;
    signEvent(event: any): Promise<any>;
    nip04?: {
      encrypt(pubkey: string, plaintext: string): Promise<string>;
      decrypt(pubkey: string, ciphertext: string): Promise<string>;
    };
  };
  maplibregl?: any;
  AndroidNotch?: {
    getInsetTop(success: (px: number) => void, error: (err: any) => void): void;
    getInsetBottom(success: (px: number) => void, error: (err: any) => void): void;
    getInsetRight(success: (px: number) => void, error: (err: any) => void): void;
    getInsetLeft(success: (px: number) => void, error: (err: any) => void): void;
  };
}