story-research-zapwall/types/nostr-window.d.ts
Nicolas Cantu fd26c42a17 Replace use.nsec.app with nos2x extension (NIP-07)
- Update NostrConnectService to use nos2x (window.nostr) by default
- Fallback to NostrConnect bridge only if nos2x is not available
- Update NostrRemoteSigner to use window.nostr.signEvent() for signing
- Add TypeScript definitions for NIP-07 window.nostr API
- Update documentation to reflect nos2x as primary authentication method
- Remove default use.nsec.app bridge URL
- All TypeScript checks pass
2025-12-27 23:48:16 +01:00

31 lines
713 B
TypeScript

// Type definitions for NIP-07 (nos2x extension)
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 {}