pub struct NegativeApprover();
Expand description
An approver that always declines, in case only the allowlist is used
Trait Implementations§
Source§impl Approve for NegativeApprover
impl Approve for NegativeApprover
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 NegativeApprover
impl Clone for NegativeApprover
Source§fn clone(&self) -> NegativeApprover
fn clone(&self) -> NegativeApprover
Returns a duplicate 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 NegativeApprover
impl SendSync for NegativeApprover
Auto Trait Implementations§
impl Freeze for NegativeApprover
impl RefUnwindSafe for NegativeApprover
impl Send for NegativeApprover
impl Sync for NegativeApprover
impl Unpin for NegativeApprover
impl UnwindSafe for NegativeApprover
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for T
impl<T> Downcast for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more