Struct vls_protocol_signer::approver::PositiveApprover
source · pub struct PositiveApprover();Expand description
An approver that always approves, for testing and for permissive mode.
NOTE - this version approves quietly, if the approval should be logged
with a warning use WarningPositiveApprover instead.
Trait Implementations§
source§impl Approve for PositiveApprover
impl Approve for PositiveApprover
source§fn approve_invoice(&self, _invoice: &Invoice) -> bool
fn approve_invoice(&self, _invoice: &Invoice) -> bool
Approve an invoice for payment
source§fn approve_keysend(&self, _payment_hash: PaymentHash, _amount_msat: u64) -> bool
fn approve_keysend(&self, _payment_hash: PaymentHash, _amount_msat: u64) -> bool
Approve a keysend (ad-hoc payment)
source§fn approve_onchain(
&self,
_tx: &Transaction,
_prev_outs: &[TxOut],
_unknown_indices: &[usize]
) -> bool
fn approve_onchain( &self, _tx: &Transaction, _prev_outs: &[TxOut], _unknown_indices: &[usize] ) -> bool
Approve an onchain payment to an unknown destination Read more
source§fn handle_proposed_invoice(
&self,
node: &Arc<Node>,
invoice: Invoice
) -> Result<bool, Status>
fn handle_proposed_invoice( &self, node: &Arc<Node>, invoice: Invoice ) -> Result<bool, Status>
Checks invoice for approval and adds to the node if needed and appropriate
source§fn handle_proposed_keysend(
&self,
node: &Arc<Node>,
payee: PublicKey,
payment_hash: PaymentHash,
amount_msat: u64
) -> Result<bool, Status>
fn handle_proposed_keysend( &self, node: &Arc<Node>, payee: PublicKey, payment_hash: PaymentHash, amount_msat: u64 ) -> Result<bool, Status>
Checks keysend for approval and adds to the node if needed and appropriate.
The payee is not validated yet.
source§fn handle_proposed_onchain(
&self,
node: &Arc<Node>,
tx: &Transaction,
segwit_flags: &[bool],
prev_outs: &[TxOut],
uniclosekeys: &[Option<(SecretKey, Vec<Vec<u8>>)>],
opaths: &[Vec<u32>]
) -> Result<bool, Status>
fn handle_proposed_onchain( &self, node: &Arc<Node>, tx: &Transaction, segwit_flags: &[bool], prev_outs: &[TxOut], uniclosekeys: &[Option<(SecretKey, Vec<Vec<u8>>)>], opaths: &[Vec<u32>] ) -> Result<bool, Status>
Checks onchain payment for unknown destinations and checks approval
for any such outputs.
Returns Ok(false) if any unknown destinations were not approved.
source§impl Clone for PositiveApprover
impl Clone for PositiveApprover
source§fn clone(&self) -> PositiveApprover
fn clone(&self) -> PositiveApprover
Returns a copy 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 moreimpl Copy for PositiveApprover
impl SendSync for PositiveApprover
Auto Trait Implementations§
impl RefUnwindSafe for PositiveApprover
impl Send for PositiveApprover
impl Sync for PositiveApprover
impl Unpin for PositiveApprover
impl UnwindSafe for PositiveApprover
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
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any.