mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2025-12-09 08:38:50 +00:00
* 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
17 lines
537 B
TypeScript
17 lines
537 B
TypeScript
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>
|
|
}
|
|
}
|