pub struct EstablishedChannel {
pub params: ChannelParameters,
pub funding_proofs: Vec<Proof>,
}Expand description
An established Spilman payment channel Contains all channel components after funding transaction is complete
Fields§
§params: ChannelParametersChannel parameters (includes shared_secret)
funding_proofs: Vec<Proof>Locked proofs (2-of-2 multisig with expiry-based refund)
Implementations§
Source§impl EstablishedChannel
impl EstablishedChannel
Sourcepub fn new(
params: ChannelParameters,
funding_proofs: Vec<Proof>,
) -> Result<Self, Error>
pub fn new( params: ChannelParameters, funding_proofs: Vec<Proof>, ) -> Result<Self, Error>
Create new established channel
Sourcepub async fn check_funding_token_state<M>(
&self,
mint_connection: &M,
) -> Result<ProofState, Error>where
M: MintConnection + ?Sized,
pub async fn check_funding_token_state<M>(
&self,
mint_connection: &M,
) -> Result<ProofState, Error>where
M: MintConnection + ?Sized,
Check the state of the funding token using NUT-07
Since all funding proofs are spent together (they’re all inputs to the commitment transaction), checking any one of them is sufficient to determine if the funding token has been spent. This method checks the first funding proof and returns its state.
Returns the state (UNSPENT, PENDING, or SPENT) of the funding token.
Trait Implementations§
Source§impl Clone for EstablishedChannel
impl Clone for EstablishedChannel
Source§fn clone(&self) -> EstablishedChannel
fn clone(&self) -> EstablishedChannel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for EstablishedChannel
impl RefUnwindSafe for EstablishedChannel
impl Send for EstablishedChannel
impl Sync for EstablishedChannel
impl Unpin for EstablishedChannel
impl UnsafeUnpin for EstablishedChannel
impl UnwindSafe for EstablishedChannel
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