Struct lightning_signer::node::node::Channel [−][src]
pub struct Channel { pub node: Arc<Node>, pub nonce: Vec<u8>, pub logger: Arc<dyn SyncLogger>, pub secp_ctx: Secp256k1<All>, pub keys: EnforcingSigner, pub setup: ChannelSetup, pub id0: ChannelId, pub id: Option<ChannelId>, }
Fields
node: Arc<Node>
nonce: Vec<u8>
logger: Arc<dyn SyncLogger>
secp_ctx: Secp256k1<All>
keys: EnforcingSigner
setup: ChannelSetup
id0: ChannelId
id: Option<ChannelId>
Implementations
impl Channel
[src]
impl Channel
[src]pub fn sign_counterparty_commitment_tx_phase2(
&self,
remote_per_commitment_point: &PublicKey,
commitment_number: u64,
feerate_per_kw: u32,
to_holder_value_sat: u64,
to_counterparty_value_sat: u64,
offered_htlcs: Vec<HTLCInfo2>,
received_htlcs: Vec<HTLCInfo2>
) -> Result<(Vec<u8>, Vec<Vec<u8>>), Status>
[src]
pub fn sign_counterparty_commitment_tx_phase2(
&self,
remote_per_commitment_point: &PublicKey,
commitment_number: u64,
feerate_per_kw: u32,
to_holder_value_sat: u64,
to_counterparty_value_sat: u64,
offered_htlcs: Vec<HTLCInfo2>,
received_htlcs: Vec<HTLCInfo2>
) -> Result<(Vec<u8>, Vec<Vec<u8>>), Status>
[src]Sign a counterparty commitment transaction after rebuilding it from the supplied arguments.
pub fn sign_holder_commitment_tx_phase2(
&self,
commitment_number: u64,
feerate_per_kw: u32,
to_holder_value_sat: u64,
to_counterparty_value_sat: u64,
offered_htlcs: Vec<HTLCInfo2>,
received_htlcs: Vec<HTLCInfo2>
) -> Result<(Vec<u8>, Vec<Vec<u8>>), Status>
[src]
pub fn sign_holder_commitment_tx_phase2(
&self,
commitment_number: u64,
feerate_per_kw: u32,
to_holder_value_sat: u64,
to_counterparty_value_sat: u64,
offered_htlcs: Vec<HTLCInfo2>,
received_htlcs: Vec<HTLCInfo2>
) -> Result<(Vec<u8>, Vec<Vec<u8>>), Status>
[src]Sign a holder commitment transaction after rebuilding it from the supplied arguments.
pub fn make_channel_parameters(&self) -> ChannelTransactionParameters
[src]
pub fn make_channel_parameters(&self) -> ChannelTransactionParameters
[src]Build channel parameters, used to further build a commitment transaction
pub fn get_shutdown_script(&self) -> Script
[src]
pub fn get_shutdown_script(&self) -> Script
[src]Get the shutdown script where our funds will go when we mutual-close
pub fn sign_mutual_close_tx_phase2(
&self,
to_holder_value_sat: u64,
to_counterparty_value_sat: u64,
counterparty_shutdown_script: Option<Script>
) -> Result<Signature, Status>
[src]
pub fn sign_mutual_close_tx_phase2(
&self,
to_holder_value_sat: u64,
to_counterparty_value_sat: u64,
counterparty_shutdown_script: Option<Script>
) -> Result<Signature, Status>
[src]Sign a mutual close transaction after rebuilding it from the supplied arguments
pub fn sign_delayed_sweep(
&self,
tx: &Transaction,
input: usize,
commitment_number: u64,
redeemscript: &Script,
htlc_amount_sat: u64
) -> Result<Signature, Status>
[src]
pub fn sign_delayed_sweep(
&self,
tx: &Transaction,
input: usize,
commitment_number: u64,
redeemscript: &Script,
htlc_amount_sat: u64
) -> Result<Signature, Status>
[src]Sign a delayed output that goes to us while sweeping a transaction we broadcast
pub fn sign_counterparty_htlc_sweep(
&self,
tx: &Transaction,
input: usize,
remote_per_commitment_point: &PublicKey,
redeemscript: &Script,
htlc_amount_sat: u64
) -> Result<Signature, Status>
[src]
pub fn sign_counterparty_htlc_sweep(
&self,
tx: &Transaction,
input: usize,
remote_per_commitment_point: &PublicKey,
redeemscript: &Script,
htlc_amount_sat: u64
) -> Result<Signature, Status>
[src]Sign TODO
pub fn sign_justice_sweep(
&self,
tx: &Transaction,
input: usize,
revocation_secret: &SecretKey,
redeemscript: &Script,
htlc_amount_sat: u64
) -> Result<Signature, Status>
[src]
pub fn sign_justice_sweep(
&self,
tx: &Transaction,
input: usize,
revocation_secret: &SecretKey,
redeemscript: &Script,
htlc_amount_sat: u64
) -> Result<Signature, Status>
[src]Sign a justice transaction on an old state that the counterparty broadcast
pub fn sign_channel_announcement(
&self,
announcement: &Vec<u8>
) -> (Signature, Signature)
[src]
pub fn sign_channel_announcement(
&self,
announcement: &Vec<u8>
) -> (Signature, Signature)
[src]Sign a channel announcement with both the node key and the funding key
pub fn network(&self) -> Network
[src]
impl Channel
[src]
impl Channel
[src]pub fn build_holder_commitment_info(
&self,
per_commitment_point: &PublicKey,
to_holder_value_sat: u64,
to_counterparty_value_sat: u64,
offered_htlcs: Vec<HTLCInfo2>,
received_htlcs: Vec<HTLCInfo2>
) -> Result<CommitmentInfo2, Status>
[src]
&self,
per_commitment_point: &PublicKey,
to_holder_value_sat: u64,
to_counterparty_value_sat: u64,
offered_htlcs: Vec<HTLCInfo2>,
received_htlcs: Vec<HTLCInfo2>
) -> Result<CommitmentInfo2, Status>
pub fn sign_counterparty_commitment_tx(
&self,
tx: &Transaction,
output_witscripts: &Vec<Vec<u8>>,
remote_per_commitment_point: &PublicKey,
channel_value_sat: u64,
payment_hashmap: &Map<[u8; 20], PaymentHash>,
commitment_number: u64
) -> Result<Vec<u8>, Status>
[src]
pub fn sign_counterparty_commitment_tx(
&self,
tx: &Transaction,
output_witscripts: &Vec<Vec<u8>>,
remote_per_commitment_point: &PublicKey,
channel_value_sat: u64,
payment_hashmap: &Map<[u8; 20], PaymentHash>,
commitment_number: u64
) -> Result<Vec<u8>, Status>
[src]Phase 1
pub fn sign_holder_commitment_tx(
&self,
tx: &Transaction,
funding_amount_sat: u64
) -> Result<Signature, Status>
[src]
&self,
tx: &Transaction,
funding_amount_sat: u64
) -> Result<Signature, Status>
pub fn sign_mutual_close_tx(
&self,
tx: &Transaction,
funding_amount_sat: u64
) -> Result<Signature, Status>
[src]
pub fn sign_mutual_close_tx(
&self,
tx: &Transaction,
funding_amount_sat: u64
) -> Result<Signature, Status>
[src]Phase 1
pub fn sign_holder_htlc_tx(
&self,
tx: &Transaction,
commitment_number: u64,
opt_per_commitment_point: Option<PublicKey>,
redeemscript: &Script,
htlc_amount_sat: u64
) -> Result<Signature, Status>
[src]
pub fn sign_holder_htlc_tx(
&self,
tx: &Transaction,
commitment_number: u64,
opt_per_commitment_point: Option<PublicKey>,
redeemscript: &Script,
htlc_amount_sat: u64
) -> Result<Signature, Status>
[src]Phase 1
pub fn sign_counterparty_htlc_tx(
&self,
tx: &Transaction,
remote_per_commitment_point: &PublicKey,
redeemscript: &Script,
htlc_amount_sat: u64
) -> Result<Signature, Status>
[src]
pub fn sign_counterparty_htlc_tx(
&self,
tx: &Transaction,
remote_per_commitment_point: &PublicKey,
redeemscript: &Script,
htlc_amount_sat: u64
) -> Result<Signature, Status>
[src]Phase 1
pub fn get_unilateral_close_key(
&self,
commitment_point: &Option<PublicKey>
) -> Result<SecretKey, Status>
[src]
&self,
commitment_point: &Option<PublicKey>
) -> Result<SecretKey, Status>
Trait Implementations
impl ChannelBase for Channel
[src]
impl ChannelBase for Channel
[src]fn get_channel_basepoints(&self) -> ChannelPublicKeys
[src]
fn get_per_commitment_point(&self, commitment_number: u64) -> PublicKey
[src]
fn get_per_commitment_secret(&self, commitment_number: u64) -> SecretKey
[src]
fn nonce(&self) -> Vec<u8>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl !UnwindSafe for Channel
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more