Add NSpec and SoapboxSigner

This commit is contained in:
Alex Gleason
2024-02-11 12:40:14 -06:00
parent 6210ad3c25
commit cb14b34309
9 changed files with 150 additions and 27 deletions

View File

@ -1,12 +0,0 @@
import type { Event, EventTemplate } from 'nostr-tools';
interface Nostr {
getPublicKey(): Promise<string>;
signEvent(event: EventTemplate): Promise<Event>;
nip04?: {
encrypt: (pubkey: string, plaintext: string) => Promise<string>;
decrypt: (pubkey: string, ciphertext: string) => Promise<string>;
};
}
export default Nostr;

View File

@ -1,7 +1,7 @@
import type Nostr from './nostr';
import type { NostrSigner } from 'nspec';
declare global {
interface Window {
nostr?: Nostr;
nostr?: NostrSigner;
}
}