package signer // HasSigner returns true if window.nostr (NIP-07) is available. func HasSigner() bool { panic("jsbridge") } // HasMLS returns true if window.nostr.mls (Smesh Signer MLS) is available. func HasMLS() bool { panic("jsbridge") } // GetPublicKey requests the public key from the browser extension. // Calls fn with hex pubkey on success, empty string on failure. func GetPublicKey(fn func(string)) { panic("jsbridge") } // SignEvent signs a serialized nostr event via NIP-07. // Calls fn with the signed event JSON on success, empty string on failure. func SignEvent(eventJSON string, fn func(string)) { panic("jsbridge") } // GetSharedSecret computes ECDH(user_seckey, peerPubkey) and returns // the shared secret as hex via fn. Used for IDB encryption key derivation. func GetSharedSecret(peerPubkey string, fn func(string)) { panic("jsbridge") } // Nip04Decrypt decrypts NIP-04 ciphertext via the browser extension. func Nip04Decrypt(peerPubkey, ciphertext string, fn func(string)) { panic("jsbridge") } // Nip04Encrypt encrypts plaintext via NIP-04 through the browser extension. func Nip04Encrypt(peerPubkey, plaintext string, fn func(string)) { panic("jsbridge") } // Nip44Decrypt decrypts NIP-44 ciphertext via the browser extension. func Nip44Decrypt(peerPubkey, ciphertext string, fn func(string)) { panic("jsbridge") } // Nip44Encrypt encrypts plaintext via NIP-44 through the browser extension. func Nip44Encrypt(peerPubkey, plaintext string, fn func(string)) { panic("jsbridge") } // --- Smesh management API (window.nostr.smesh) --- // IsInstalled checks whether the smesh signer extension is present. // Calls fn(true) if window.nostr.smesh exists. func IsInstalled(fn func(bool)) { panic("jsbridge") } // GetVaultStatus returns "none", "locked", or "unlocked". func GetVaultStatus(fn func(string)) { panic("jsbridge") } // CreateVault creates a new vault with the given password. func CreateVault(password string, fn func(bool)) { panic("jsbridge") } // UnlockVault unlocks the vault with the given password. func UnlockVault(password string, fn func(bool)) { panic("jsbridge") } // LockVault locks the vault. func LockVault(fn func()) { panic("jsbridge") } // ListIdentities returns a JSON array of identities. func ListIdentities(fn func(string)) { panic("jsbridge") } // AddIdentity imports an nsec into the vault. func AddIdentity(nsec string, fn func(bool)) { panic("jsbridge") } // NsecLogin sets up an in-memory identity from an nsec without vault crypto. func NsecLogin(nsec string, fn func(bool)) { panic("jsbridge") } // SwitchIdentity sets the active identity by pubkey. func SwitchIdentity(pubkey string, fn func(bool)) { panic("jsbridge") } // ExportVault re-encrypts the vault with the given password and returns it. func ExportVault(password string, fn func(string)) { panic("jsbridge") } // ImportVault imports an encrypted vault data string. func ImportVault(data string, fn func(bool)) { panic("jsbridge") } // RemoveIdentity removes an identity by pubkey. func RemoveIdentity(pubkey string, fn func(bool)) { panic("jsbridge") } // --- HD keychain --- // GenerateMnemonic generates a 12-word BIP39 mnemonic (preview only, not stored). func GenerateMnemonic(fn func(string)) { panic("jsbridge") } // ValidateMnemonic checks if a mnemonic is valid BIP39. func ValidateMnemonic(mnemonic string, fn func(bool)) { panic("jsbridge") } // CreateHDVault generates a mnemonic, creates an HD vault, derives the first identity. // Calls fn with the mnemonic on success, empty string on failure. func CreateHDVault(password, name string, fn func(string)) { panic("jsbridge") } // RestoreHDVault restores an HD vault from an existing mnemonic. func RestoreHDVault(password, mnemonic, name string, fn func(bool)) { panic("jsbridge") } // DeriveIdentity derives the next identity from the HD keychain. // Calls fn with the hex pubkey on success, empty string on failure. func DeriveIdentity(name string, fn func(string)) { panic("jsbridge") } // GetMnemonic returns the decrypted mnemonic if the vault is HD and unlocked. func GetMnemonic(fn func(string)) { panic("jsbridge") } // ProbeAccount derives the key at the given account index without adding it. // Calls fn with the hex pubkey, or empty string on failure. func ProbeAccount(index int, fn func(string)) { panic("jsbridge") } // IsHD returns true if the unlocked vault is HD-based. func IsHD(fn func(bool)) { panic("jsbridge") } // ResetExtension wipes the vault and all keys from the extension. func ResetExtension(fn func(bool)) { panic("jsbridge") }