- Remove nos2x and NostrConnect support - Create new NostrAuthService using Alby (window.nostr NIP-07) - Replace useNostrConnect with useNostrAuth in all components - Update NostrRemoteSigner to use Alby for signing - Delete NostrConnect-related files (nostrconnect.ts, handlers, etc.) - Update documentation to reflect Alby-only authentication - Remove NOSTRCONNECT_BRIDGE environment variable - All TypeScript checks pass
31 lines
781 B
TypeScript
31 lines
781 B
TypeScript
// Type definitions for NIP-07 (Alby extension)
|
|
// Alby exposes window.nostr API for Nostr authentication and signing
|
|
declare global {
|
|
interface Window {
|
|
nostr?: {
|
|
getPublicKey(): Promise<string>
|
|
signEvent(event: {
|
|
kind: number
|
|
created_at: number
|
|
tags: string[][]
|
|
content: string
|
|
}): Promise<{
|
|
id: string
|
|
sig: string
|
|
kind: number
|
|
created_at: number
|
|
tags: string[][]
|
|
content: string
|
|
pubkey: string
|
|
}>
|
|
getRelays?(): Promise<Record<string, { read: boolean; write: boolean }>>
|
|
nip04?: {
|
|
encrypt(pubkey: string, plaintext: string): Promise<string>
|
|
decrypt(pubkey: string, ciphertext: string): Promise<string>
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
export {}
|