pub enum NostrCommand {
Pair {
npub: String,
relay: String,
json: bool,
},
Fetch {
relay: String,
limit: usize,
json: bool,
},
Accept {
npub: String,
relay: String,
json: bool,
},
}Expand description
wire nostr … — speak Nostr (RFC-007). Uses this session’s secp transport
key (wire enroll nostr) to pair with + message peers over a Nostr relay.
Variants§
Pair
Send an encrypted pair-request (your signed agent card) to a peer’s npub over a Nostr relay (NIP-W1, no-SPAKE2). The peer accepts with the usual bilateral gate.
Fields
Fetch
Fetch + decrypt the events addressed to your npub from a Nostr relay (pair-requests, pair-acks, and wire messages).
Accept
Accept a pending pair-request from a peer’s npub (NIP-W1 bilateral gate): pull it, verify the card + its nostr binding (tying the npub to the wire identity), pin the peer VERIFIED, and send a pair-ack back over the relay.
Trait Implementations§
Source§impl Debug for NostrCommand
impl Debug for NostrCommand
Source§impl FromArgMatches for NostrCommand
impl FromArgMatches for NostrCommand
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Subcommand for NostrCommand
impl Subcommand for NostrCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for NostrCommand
impl RefUnwindSafe for NostrCommand
impl Send for NostrCommand
impl Sync for NostrCommand
impl Unpin for NostrCommand
impl UnsafeUnpin for NostrCommand
impl UnwindSafe for NostrCommand
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