From 4f4de458e969e482c039b0526c62376ff4749bb4 Mon Sep 17 00:00:00 2001
From: fiatjaf <fiatjaf@gmail.com>
Date: Sun, 26 May 2024 12:00:42 -0300
Subject: [PATCH] rename Nip07 to WindowNostr.

---
 README.md | 6 +++---
 index.ts  | 1 -
 nip07.ts  | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 82e2b594..ef5b6083 100644
--- a/README.md
+++ b/README.md
@@ -30,7 +30,7 @@ To get the secret key in hex format, use
 ```js
 import { bytesToHex, hexToBytes } from '@noble/hashes/utils' // already an installed dependency
 
-let skHex = bytesToHex(sk) 
+let skHex = bytesToHex(sk)
 let backToBytes = hexToBytes(skHex)
 ```
 
@@ -185,11 +185,11 @@ useFetchImplementation(require('node-fetch'))
 
 ### Including NIP-07 types
 ```js
-import { Nip07 } from 'nostr-tools/nip07'
+import type { WindowNostr } from 'nostr-tools/nip07'
 
 declare global {
   interface Window {
-    nostr?: Nip07;
+    nostr?: WindowNostr;
   }
 }
 ```
diff --git a/index.ts b/index.ts
index 5e2fb0e8..dd80f8bd 100644
--- a/index.ts
+++ b/index.ts
@@ -6,7 +6,6 @@ export * from './references.ts'
 
 export * as nip04 from './nip04.ts'
 export * as nip05 from './nip05.ts'
-export * as nip07 from './nip07.ts'
 export * as nip10 from './nip10.ts'
 export * as nip11 from './nip11.ts'
 export * as nip13 from './nip13.ts'
diff --git a/nip07.ts b/nip07.ts
index ed323633..de7c1bb5 100644
--- a/nip07.ts
+++ b/nip07.ts
@@ -1,7 +1,7 @@
 import { EventTemplate, NostrEvent } from './core.ts'
 import { RelayRecord } from './index.ts'
 
-export interface Nip07 {
+export interface WindowNostr {
   getPublicKey(): Promise<string>
   signEvent(event: EventTemplate): Promise<NostrEvent>
   getRelays(): Promise<RelayRecord>