pub enum BoltExt {
Channel,
Bolt3,
Htlc,
ShutdownScript,
AnchorOutputs,
Policy,
Bip96,
}
Variants§
Channel
The channel itself
Bolt3
Main channel constructor
Htlc
HTLC payments
ShutdownScript
BOLT-9 feature: shutdown script
AnchorOutputs
BOLT-9 feature: anchor
Policy
The role of policy extension is to make sure that aggregate properties of the transaction (no of HTLCs, fees etc) does not violate channel policies – and adjust to these policies if needed
NB: Policy must always be applied after other extenders
Bip96
Deterministic transaction ordering
Trait Implementations§
source§impl ChannelConstructor<BoltExt> for BoltChannel
impl ChannelConstructor<BoltExt> for BoltChannel
source§impl ChannelExtension<BoltExt> for AnchorOutputs
impl ChannelExtension<BoltExt> for AnchorOutputs
source§impl ChannelExtension<BoltExt> for BoltChannel
impl ChannelExtension<BoltExt> for BoltChannel
source§impl ChannelExtension<BoltExt> for Htlc
impl ChannelExtension<BoltExt> for Htlc
source§impl Extension<BoltExt> for AnchorOutputs
impl Extension<BoltExt> for AnchorOutputs
fn identity(&self) -> BoltExt
source§fn update_from_local(&mut self, _message: &()) -> Result<(), Error>
fn update_from_local(&mut self, _message: &()) -> Result<(), Error>
Updates extension state from some local data
source§fn update_from_peer(&mut self, _: &Messages) -> Result<(), Error>
fn update_from_peer(&mut self, _: &Messages) -> Result<(), Error>
Updates extension state from the data taken from the message received
from the remote peer
fn load_state(&mut self, _state: &ChannelState)
fn store_state(&self, _state: &mut ChannelState)
source§fn state_change(
&mut self,
request: &<N as Nomenclature>::UpdateRequest,
message: &mut <N as Nomenclature>::PeerMessage
) -> Result<(), <N as Nomenclature>::Error>
fn state_change( &mut self, request: &<N as Nomenclature>::UpdateRequest, message: &mut <N as Nomenclature>::PeerMessage ) -> Result<(), <N as Nomenclature>::Error>
Perform a sate change and produce a message which should be communicated
to peers notifying them about the state change
source§impl Extension<BoltExt> for Bip96
impl Extension<BoltExt> for Bip96
fn identity(&self) -> BoltExt
source§fn update_from_local(&mut self, _message: &()) -> Result<(), Error>
fn update_from_local(&mut self, _message: &()) -> Result<(), Error>
Updates extension state from some local data
source§fn update_from_peer(&mut self, _: &Messages) -> Result<(), Error>
fn update_from_peer(&mut self, _: &Messages) -> Result<(), Error>
Updates extension state from the data taken from the message received
from the remote peer
fn load_state(&mut self, _state: &ChannelState)
fn store_state(&self, _state: &mut ChannelState)
source§fn state_change(
&mut self,
request: &<N as Nomenclature>::UpdateRequest,
message: &mut <N as Nomenclature>::PeerMessage
) -> Result<(), <N as Nomenclature>::Error>
fn state_change( &mut self, request: &<N as Nomenclature>::UpdateRequest, message: &mut <N as Nomenclature>::PeerMessage ) -> Result<(), <N as Nomenclature>::Error>
Perform a sate change and produce a message which should be communicated
to peers notifying them about the state change
source§impl Extension<BoltExt> for BoltChannel
impl Extension<BoltExt> for BoltChannel
fn identity(&self) -> BoltExt
source§fn update_from_local(&mut self, _message: &()) -> Result<(), Error>
fn update_from_local(&mut self, _message: &()) -> Result<(), Error>
Updates extension state from some local data
source§fn update_from_peer(&mut self, message: &Messages) -> Result<(), Error>
fn update_from_peer(&mut self, message: &Messages) -> Result<(), Error>
Updates extension state from the data taken from the message received
from the remote peer
fn load_state(&mut self, state: &ChannelState)
fn store_state(&self, state: &mut ChannelState)
source§fn state_change(
&mut self,
request: &<N as Nomenclature>::UpdateRequest,
message: &mut <N as Nomenclature>::PeerMessage
) -> Result<(), <N as Nomenclature>::Error>
fn state_change( &mut self, request: &<N as Nomenclature>::UpdateRequest, message: &mut <N as Nomenclature>::PeerMessage ) -> Result<(), <N as Nomenclature>::Error>
Perform a sate change and produce a message which should be communicated
to peers notifying them about the state change
source§impl Extension<BoltExt> for Htlc
impl Extension<BoltExt> for Htlc
fn identity(&self) -> BoltExt
source§fn update_from_local(&mut self, _message: &()) -> Result<(), Error>
fn update_from_local(&mut self, _message: &()) -> Result<(), Error>
Updates extension state from some local data
source§fn state_change(
&mut self,
request: &UpdateReq,
message: &mut Messages
) -> Result<(), Error>
fn state_change( &mut self, request: &UpdateReq, message: &mut Messages ) -> Result<(), Error>
Perform a sate change and produce a message which should be communicated
to peers notifying them about the state change
source§fn update_from_peer(&mut self, message: &Messages) -> Result<(), Error>
fn update_from_peer(&mut self, message: &Messages) -> Result<(), Error>
Updates extension state from the data taken from the message received
from the remote peer
fn load_state(&mut self, state: &ChannelState)
fn store_state(&self, state: &mut ChannelState)
source§impl Nomenclature for BoltExt
impl Nomenclature for BoltExt
type State = ChannelState
type Error = Error
type PeerMessage = Messages
type UpdateMessage = ()
type UpdateRequest = UpdateReq
source§impl Nomenclature for BoltExt
impl Nomenclature for BoltExt
type Constructor = BoltChannel
source§fn default_extenders() -> Vec<Box<dyn ChannelExtension<Self>>> ⓘ
fn default_extenders() -> Vec<Box<dyn ChannelExtension<Self>>> ⓘ
Returns set of default channel extenders
source§fn default_modifiers() -> Vec<Box<dyn ChannelExtension<Self>>> ⓘ
fn default_modifiers() -> Vec<Box<dyn ChannelExtension<Self>>> ⓘ
Returns set of default channel modifiers
source§fn update_from_peer(
channel: &mut Channel<Self>,
message: &Messages
) -> Result<(), Error>
fn update_from_peer( channel: &mut Channel<Self>, message: &Messages ) -> Result<(), Error>
Updates channel extension structure from peer message. Processed before
each of the registered extensions gets
Extension::update_from_peer
source§impl Ord for BoltExt
impl Ord for BoltExt
source§impl PartialEq<BoltExt> for BoltExt
impl PartialEq<BoltExt> for BoltExt
source§impl PartialOrd<BoltExt> for BoltExt
impl PartialOrd<BoltExt> for BoltExt
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl StrictDecode for BoltExt
impl StrictDecode for BoltExt
source§fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
fn strict_decode<D: Read>(d: D) -> Result<Self, Error>
Decode with the given
std::io::Read
instance; must either
construct an instance or return implementation-specific error type.source§fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
fn strict_deserialize(data: impl AsRef<[u8]>) -> Result<Self, Error>
Tries to deserialize byte array into the current type using
StrictDecode::strict_decode
. If there are some data remains in the
buffer once deserialization is completed, fails with
Error::DataNotEntirelyConsumed
. Use io::Cursor
over the buffer and
StrictDecode::strict_decode
to avoid such failures.source§fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
fn strict_file_load(path: impl AsRef<Path>) -> Result<Self, Error>
Reads data from file at
path
and reconstructs object from it. Fails
with Error::DataNotEntirelyConsumed
if file contains remaining
data after the object reconstruction.source§impl StrictEncode for BoltExt
impl StrictEncode for BoltExt
source§fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
fn strict_encode<E: Write>(&self, e: E) -> Result<usize, Error>
Encode with the given
std::io::Write
instance; must return result
with either amount of bytes encoded – or implementation-specific
error type.source§fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
fn strict_serialize(&self) -> Result<Vec<u8, Global>, Error>
Serializes data as a byte array using
StrictEncode::strict_encode
functionimpl Copy for BoltExt
impl Eq for BoltExt
impl StructuralEq for BoltExt
impl StructuralPartialEq for BoltExt
Auto Trait Implementations§
impl RefUnwindSafe for BoltExt
impl Send for BoltExt
impl Sync for BoltExt
impl Unpin for BoltExt
impl UnwindSafe for BoltExt
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.