Struct vls_protocol_signer::approver::MemoApprover
source · pub struct MemoApprover<A: Approve> { /* private fields */ }Expand description
An approver that memorizes the last approval, and uses it for the next approval request.
If the request is for a different action, the memoized approval is cleared and the request is passed on to the delegate approver.
Implementations§
source§impl<A: Approve> MemoApprover<A>
impl<A: Approve> MemoApprover<A>
Trait Implementations§
source§impl<A: Approve> Approve for MemoApprover<A>
impl<A: Approve> Approve for MemoApprover<A>
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.
impl<A: Approve> SendSync for MemoApprover<A>
Auto Trait Implementations§
impl<A> !Freeze for MemoApprover<A>
impl<A> RefUnwindSafe for MemoApprover<A>where
A: RefUnwindSafe,
impl<A> Send for MemoApprover<A>
impl<A> Sync for MemoApprover<A>
impl<A> Unpin for MemoApprover<A>where
A: Unpin,
impl<A> UnwindSafe for MemoApprover<A>where
A: UnwindSafe,
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> Downcast for T
impl<T> Downcast for T
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