mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-08 16:28:49 +00:00
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
This commit is contained in:
committed by
GitHub
parent
9f5984d78d
commit
88454de628
16
nip07.ts
Normal file
16
nip07.ts
Normal file
@@ -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>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user