signer.go raw
1 package signer
2
3 // HasSigner returns true if window.nostr (NIP-07) is available.
4 func HasSigner() bool { panic("jsbridge") }
5
6 // HasMLS returns true if window.nostr.mls (Smesh Signer MLS) is available.
7 func HasMLS() bool { panic("jsbridge") }
8
9 // GetPublicKey requests the public key from the browser extension.
10 // Calls fn with hex pubkey on success, empty string on failure.
11 func GetPublicKey(fn func(string)) { panic("jsbridge") }
12
13 // SignEvent signs a serialized nostr event via NIP-07.
14 // Calls fn with the signed event JSON on success, empty string on failure.
15 func SignEvent(eventJSON string, fn func(string)) { panic("jsbridge") }
16
17 // Nip04Decrypt decrypts NIP-04 ciphertext via the browser extension.
18 func Nip04Decrypt(peerPubkey, ciphertext string, fn func(string)) { panic("jsbridge") }
19
20 // Nip04Encrypt encrypts plaintext via NIP-04 through the browser extension.
21 func Nip04Encrypt(peerPubkey, plaintext string, fn func(string)) { panic("jsbridge") }
22
23 // Nip44Decrypt decrypts NIP-44 ciphertext via the browser extension.
24 func Nip44Decrypt(peerPubkey, ciphertext string, fn func(string)) { panic("jsbridge") }
25
26 // Nip44Encrypt encrypts plaintext via NIP-44 through the browser extension.
27 func Nip44Encrypt(peerPubkey, plaintext string, fn func(string)) { panic("jsbridge") }
28