pub trait Nip07Backend:
Send
+ Sync
+ 'static {
// Required method
fn request(
&self,
method: &'static str,
params: Value,
) -> BoxedFuture<'static, Result<Value, String>>;
}Expand description
The host transport to the page’s window.nostr.
method is the NIP-07 call (getPublicKey, signEvent, nip44.encrypt,
nip44.decrypt, nip04.encrypt, nip04.decrypt), params its arguments
as a JSON array; the result is whatever the extension resolved with.
Required Methods§
fn request( &self, method: &'static str, params: Value, ) -> BoxedFuture<'static, Result<Value, String>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".