pub struct Handler { /* private fields */ }Expand description
A handler for lightspark remote signing webhook events.
Implementations§
Source§impl Handler
impl Handler
Sourcepub fn new(signer: LightsparkSigner, validator: Box<dyn Validation>) -> Self
pub fn new(signer: LightsparkSigner, validator: Box<dyn Validation>) -> Self
Create a new handler.
§Arguments
signer- A LightsparkSigner instance, which will be used to sign messages.validator- A Validation instance, which will be used to determine whether to sign messages.
pub fn handle_remote_signing_webhook_msg( &self, event: &WebhookEvent, ) -> Result<Option<Response>, Error>
pub fn handle_request_invoice_payment_hash( &self, event: &WebhookEvent, ) -> Result<Response, Error>
pub fn handle_decline_to_sign_messages( &self, event: &WebhookEvent, ) -> Result<Response, Error>
pub fn handle_ecdh(&self, event: &WebhookEvent) -> Result<Response, Error>
pub fn handle_sign_invoice( &self, event: &WebhookEvent, ) -> Result<Response, Error>
pub fn handle_release_payment_preimage( &self, event: &WebhookEvent, ) -> Result<Response, Error>
pub fn handle_get_per_commitment_point( &self, event: &WebhookEvent, ) -> Result<Response, Error>
pub fn handle_release_per_commitment_secret( &self, event: &WebhookEvent, ) -> Result<Response, Error>
pub fn handle_derive_key_and_sign( &self, event: &WebhookEvent, ) -> Result<Response, Error>
Auto Trait Implementations§
impl Freeze for Handler
impl !RefUnwindSafe for Handler
impl Send for Handler
impl Sync for Handler
impl Unpin for Handler
impl !UnwindSafe for Handler
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