pub struct WarningPositiveApprover();
Expand description

An approver that always approves, for testing and for permissive mode.

NOTE - this version generates a warning to the log so the user is aware of the automatic approvals.

Trait Implementations§

source§

impl Approve for WarningPositiveApprover

source§

fn approve_invoice(&self, invoice: &Invoice) -> bool

Approve an invoice for payment
source§

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

Approve an onchain payment to an unknown destination Read more
source§

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>

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>

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 WarningPositiveApprover

source§

fn clone(&self) -> WarningPositiveApprover

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Copy for WarningPositiveApprover

source§

impl SendSync for WarningPositiveApprover

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AsAny for T
where T: Any,

§

fn as_any(&self) -> &(dyn Any + 'static)

§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

§

fn type_name(&self) -> &'static str

Gets the type name of self
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for T
where T: AsAny + ?Sized,

§

fn is<T>(&self) -> bool
where T: AsAny,

Returns true if the boxed type is the same as T. Read more
§

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,

Forward to the method defined on the type Any.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V