Skip to content

Commit

Permalink
rename Nip07 to WindowNostr.
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed May 26, 2024
1 parent 88454de commit 4f4de45
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```

Expand Down Expand Up @@ -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;
}
}
```
Expand Down
1 change: 0 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion nip07.ts
Original file line number Diff line number Diff line change
@@ -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>
Expand Down

0 comments on commit 4f4de45

Please sign in to comment.