ssi.nostr
The window.ssi subset for Nostr protocol.
Types
NostrDecryptType
Implementation list of Nostr encyption spec.
NostrEncryptType
Implementation list of Nostr encyption spec.
NostrGenerateType
Implementation list of Nostr generation spec.
NostrSignType
Implementation list of Nostr signature spec.
Functions
addEventListener()
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
.
decryptSync()
Callback type of decrypt
.
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
.
encryptSync()
Callback type of encrypt
.
generate()
Generates Nostr key in the specified order. During the execution process, an internal authorization check is performed similar to browser.ssi.askConsent
.
generateSync()
Callback type of generate
.
getPublicKey()
Return public key set as primary currently. During the execution process, an internal authorization check is performed similar to browser.ssi.askConsent
.
getPublicKeySync()
Callback type of getPublicKey
.
removeEventListener()
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
.
signSync()
Callback type of sign
.
This documentation is derived from window.ssi.type.ts in gecko-dev-for-ssi.