ssi.nostr
The browser.ssi subset for Nostr protocol. Requires ssi.nostr
along with ssi
to set permissions.
Required Permissions
['ssi', 'ssi.nostr']
Types
Preference
The preference values set by the user in about:selfsovereignindividual
.
Functions
getPrefs
Get the user’s preference values. Since this is obtained passively and is not something that the user explicitly takes action on, ssi.askConsent
is not called. The user controls whether or not to disclose it in the settings. Here, only values that are based on such assumptions would be returned.
generate
Generates Nostr key in the specified order. During the execution process, an internal authorization check is performed similar to browser.ssi.askConsent
.
sign
Pass in the message and get back the signature by Nostr secret key. You should always read the public key without using cache just before signing/encrypting/decrypting, as the user may change their primary key without notifying you. During the execution process, an internal authorization check is performed similar to browser.ssi.askConsent
.
encrypt
Pass in the plain text and get back the cipher text by Nostr secret key. You should always read the public key without using cache just before signing/encrypting/decrypting, as the user may change their primary key without notifying you. During the execution process, an internal authorization check is performed similar to browser.ssi.askConsent
.
decrypt
Pass in the cipher text and get back the plain text by Nostr secret key. You should always read the public key without using cache just before signing/encrypting/decrypting, as the user may change their primary key without notifying you. During the execution process, an internal authorization check is performed similar to browser.ssi.askConsent
.
Events
onPrimaryChanged
Fires when the primary key is changed.
onPrefEnabledChanged
Fires when the preference value of selfsovereignindividual.nostr.enabled
is changed.
This documentation is derived from ssi.nostr.json in gecko-dev-for-ssi.