-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
including interface for nip07 (#403)
* including interface for nip07 * fix types for NIP-07 * including NIP-07 export to jsr * fix readme about nip07 * including in nip7 interface an output signature compatible with the event returned by the signer
- Loading branch information
1 parent
9f5984d
commit 88454de
Showing
7 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { EventTemplate, NostrEvent } from './core.ts' | ||
import { RelayRecord } from './index.ts' | ||
|
||
export interface Nip07 { | ||
getPublicKey(): Promise<string> | ||
signEvent(event: EventTemplate): Promise<NostrEvent> | ||
getRelays(): Promise<RelayRecord> | ||
nip04?: { | ||
encrypt(pubkey: string, plaintext: string): Promise<string> | ||
ecrypt(pubkey: string, ciphertext: string): Promise<string> | ||
} | ||
nip44?: { | ||
encrypt(pubkey: string, plaintext: string): Promise<string> | ||
decrypt(pubkey: string, ciphertext: string): Promise<string> | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters