You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1001 B
33 lines
1001 B
import { TDraftEvent, TRelayGroup, TTheme, TThemeSetting } from '@common/types' |
|
import { ElectronAPI } from '@electron-toolkit/preload' |
|
import { Event } from 'nostr-tools' |
|
|
|
declare global { |
|
interface Window { |
|
electron: ElectronAPI |
|
api: { |
|
system: { |
|
isEncryptionAvailable: () => Promise<boolean> |
|
} |
|
theme: { |
|
onChange: (cb: (theme: TTheme) => void) => void |
|
current: () => Promise<TTheme> |
|
themeSetting: () => Promise<TThemeSetting> |
|
set: (themeSetting: TThemeSetting) => Promise<void> |
|
} |
|
storage: { |
|
getRelayGroups: () => Promise<TRelayGroup[]> |
|
setRelayGroups: (relayGroups: TRelayGroup[]) => Promise<void> |
|
} |
|
nostr: { |
|
login: (nsec: string) => Promise<{ |
|
pubkey?: string |
|
reason?: string |
|
}> |
|
logout: () => Promise<void> |
|
getPublicKey: () => Promise<string | null> |
|
signEvent: (draftEvent: TDraftEvent) => Promise<Event | null> |
|
} |
|
} |
|
} |
|
}
|
|
|