pub struct BrowserSignerProxy { /* private fields */ }Expand description
Nostr Browser Signer Proxy
Proxy to use Nostr Browser signer (NIP-07) in native applications.
Implementations§
Source§impl BrowserSignerProxy
impl BrowserSignerProxy
Sourcepub fn new(options: BrowserSignerProxyOptions) -> Self
pub fn new(options: BrowserSignerProxyOptions) -> Self
Construct a new browser signer proxy
Sourcepub fn is_started(&self) -> bool
pub fn is_started(&self) -> bool
Indicates whether the server is currently running.
Sourcepub fn is_session_active(&self) -> bool
pub fn is_session_active(&self) -> bool
Checks if there is an open browser tap ready to respond to requests by verifying the time since the last pending request.
Trait Implementations§
Source§impl Clone for BrowserSignerProxy
impl Clone for BrowserSignerProxy
Source§fn clone(&self) -> BrowserSignerProxy
fn clone(&self) -> BrowserSignerProxy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BrowserSignerProxy
impl Debug for BrowserSignerProxy
Source§impl NostrSigner for BrowserSignerProxy
impl NostrSigner for BrowserSignerProxy
Source§fn backend(&self) -> SignerBackend<'_>
fn backend(&self) -> SignerBackend<'_>
Signer backend
Source§fn get_public_key(&self) -> BoxedFuture<'_, Result<PublicKey, SignerError>>
fn get_public_key(&self) -> BoxedFuture<'_, Result<PublicKey, SignerError>>
Get signer public key
Source§fn sign_event(
&self,
unsigned: UnsignedEvent,
) -> BoxedFuture<'_, Result<Event, SignerError>>
fn sign_event( &self, unsigned: UnsignedEvent, ) -> BoxedFuture<'_, Result<Event, SignerError>>
Sign an unsigned event
Source§fn nip04_encrypt<'a>(
&'a self,
public_key: &'a PublicKey,
content: &'a str,
) -> BoxedFuture<'a, Result<String, SignerError>>
fn nip04_encrypt<'a>( &'a self, public_key: &'a PublicKey, content: &'a str, ) -> BoxedFuture<'a, Result<String, SignerError>>
NIP04 encrypt (deprecate and unsecure)
Source§fn nip04_decrypt<'a>(
&'a self,
public_key: &'a PublicKey,
encrypted_content: &'a str,
) -> BoxedFuture<'a, Result<String, SignerError>>
fn nip04_decrypt<'a>( &'a self, public_key: &'a PublicKey, encrypted_content: &'a str, ) -> BoxedFuture<'a, Result<String, SignerError>>
NIP04 decrypt
Source§fn nip44_encrypt<'a>(
&'a self,
public_key: &'a PublicKey,
content: &'a str,
) -> BoxedFuture<'a, Result<String, SignerError>>
fn nip44_encrypt<'a>( &'a self, public_key: &'a PublicKey, content: &'a str, ) -> BoxedFuture<'a, Result<String, SignerError>>
NIP44 encrypt
Source§fn nip44_decrypt<'a>(
&'a self,
public_key: &'a PublicKey,
payload: &'a str,
) -> BoxedFuture<'a, Result<String, SignerError>>
fn nip44_decrypt<'a>( &'a self, public_key: &'a PublicKey, payload: &'a str, ) -> BoxedFuture<'a, Result<String, SignerError>>
NIP44 decrypt
Auto Trait Implementations§
impl Freeze for BrowserSignerProxy
impl !RefUnwindSafe for BrowserSignerProxy
impl Send for BrowserSignerProxy
impl Sync for BrowserSignerProxy
impl Unpin for BrowserSignerProxy
impl !UnwindSafe for BrowserSignerProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more