pub struct PreBunkerClient {
pub remote_signer_pubkey: PublicKey,
pub relay_url: RelayUrl,
pub connect_secret: Option<String>,
pub local_signer: Arc<KeySigner>,
pub timeout: Duration,
}
Expand description
This is a Remote Signer setup that has not yet discovered the user’s PublicKey As a result, it cannot implement Signer yet.
Fields§
§remote_signer_pubkey: PublicKey
The pubkey of the bunker
relay_url: RelayUrl
The relay the bunker is listening at
connect_secret: Option<String>
The connect secret
local_signer: Arc<KeySigner>
Our local identity
timeout: Duration
Timeout
Implementations§
Source§impl PreBunkerClient
impl PreBunkerClient
Sourcepub fn new(
remote_signer_pubkey: PublicKey,
relay_url: RelayUrl,
connect_secret: Option<String>,
new_password: &str,
timeout: Duration,
) -> Result<PreBunkerClient, Error>
pub fn new( remote_signer_pubkey: PublicKey, relay_url: RelayUrl, connect_secret: Option<String>, new_password: &str, timeout: Duration, ) -> Result<PreBunkerClient, Error>
Create a new BunkerClient, generating a fresh local identity
Sourcepub fn new_from_url(
url: &str,
new_password: &str,
timeout: Duration,
) -> Result<PreBunkerClient, Error>
pub fn new_from_url( url: &str, new_password: &str, timeout: Duration, ) -> Result<PreBunkerClient, Error>
Create a new nip46 client from a URL.
This connects to the relay, but does not contact the bunker yet. Use connect()
to
initiate contact with the bunker.
Sourcepub async fn initialize(&mut self) -> Result<BunkerClient, Error>
pub async fn initialize(&mut self) -> Result<BunkerClient, Error>
Connect to the relay and bunker, learn our user’s PublicKey, and return a full BunkerClient which impl Signer
Trait Implementations§
Source§impl Debug for PreBunkerClient
impl Debug for PreBunkerClient
Source§impl<'de> Deserialize<'de> for PreBunkerClient
impl<'de> Deserialize<'de> for PreBunkerClient
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PreBunkerClient
impl RefUnwindSafe for PreBunkerClient
impl Send for PreBunkerClient
impl Sync for PreBunkerClient
impl Unpin for PreBunkerClient
impl UnwindSafe for PreBunkerClient
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