OpenChannelRequest

Struct OpenChannelRequest 

Source
pub struct OpenChannelRequest {
Show 28 fields pub sat_per_vbyte: u64, pub node_pubkey: Vec<u8>, pub node_pubkey_string: String, pub local_funding_amount: i64, pub push_sat: i64, pub target_conf: i32, pub sat_per_byte: i64, pub private: bool, pub min_htlc_msat: i64, pub remote_csv_delay: u32, pub min_confs: i32, pub spend_unconfirmed: bool, pub close_address: String, pub funding_shim: Option<FundingShim>, pub remote_max_value_in_flight_msat: u64, pub remote_max_htlcs: u32, pub max_local_csv: u32, pub commitment_type: i32, pub zero_conf: bool, pub scid_alias: bool, pub base_fee: u64, pub fee_rate: u64, pub use_base_fee: bool, pub use_fee_rate: bool, pub remote_chan_reserve_sat: u64, pub fund_max: bool, pub memo: String, pub outpoints: Vec<OutPoint>,
}

Fields§

§sat_per_vbyte: u64

A manual fee rate set in sat/vbyte that should be used when crafting the funding transaction.

§node_pubkey: Vec<u8>

The pubkey of the node to open a channel with. When using REST, this field must be encoded as base64.

§node_pubkey_string: String
👎Deprecated

The hex encoded pubkey of the node to open a channel with. Deprecated now that the REST gateway supports base64 encoding of bytes fields.

§local_funding_amount: i64

The number of satoshis the wallet should commit to the channel

§push_sat: i64

The number of satoshis to push to the remote side as part of the initial commitment state

§target_conf: i32

The target number of blocks that the funding transaction should be confirmed by.

§sat_per_byte: i64
👎Deprecated

Deprecated, use sat_per_vbyte. A manual fee rate set in sat/vbyte that should be used when crafting the funding transaction.

§private: bool

Whether this channel should be private, not announced to the greater network.

§min_htlc_msat: i64

The minimum value in millisatoshi we will require for incoming HTLCs on the channel.

§remote_csv_delay: u32

The delay we require on the remote’s commitment transaction. If this is not set, it will be scaled automatically with the channel size.

§min_confs: i32

The minimum number of confirmations each one of your outputs used for the funding transaction must satisfy.

§spend_unconfirmed: bool

Whether unconfirmed outputs should be used as inputs for the funding transaction.

§close_address: String

Close address is an optional address which specifies the address to which funds should be paid out to upon cooperative close. This field may only be set if the peer supports the option upfront feature bit (call listpeers to check). The remote peer will only accept cooperative closes to this address if it is set.

Note: If this value is set on channel creation, you will not be able to cooperatively close out to a different address.

§funding_shim: Option<FundingShim>

Funding shims are an optional argument that allow the caller to intercept certain funding functionality. For example, a shim can be provided to use a particular key for the commitment key (ideally cold) rather than use one that is generated by the wallet as normal, or signal that signing will be carried out in an interactive manner (PSBT based).

§remote_max_value_in_flight_msat: u64

The maximum amount of coins in millisatoshi that can be pending within the channel. It only applies to the remote party.

§remote_max_htlcs: u32

The maximum number of concurrent HTLCs we will allow the remote party to add to the commitment transaction.

§max_local_csv: u32

Max local csv is the maximum csv delay we will allow for our own commitment transaction.

§commitment_type: i32

The explicit commitment type to use. Note this field will only be used if the remote peer supports explicit channel negotiation.

§zero_conf: bool

If this is true, then a zero-conf channel open will be attempted.

§scid_alias: bool

If this is true, then an option-scid-alias channel-type open will be attempted.

§base_fee: u64

The base fee charged regardless of the number of milli-satoshis sent.

§fee_rate: u64

The fee rate in ppm (parts per million) that will be charged in proportion of the value of each forwarded HTLC.

§use_base_fee: bool

If use_base_fee is true the open channel announcement will update the channel base fee with the value specified in base_fee. In the case of a base_fee of 0 use_base_fee is needed downstream to distinguish whether to use the default base fee value specified in the config or 0.

§use_fee_rate: bool

If use_fee_rate is true the open channel announcement will update the channel fee rate with the value specified in fee_rate. In the case of a fee_rate of 0 use_fee_rate is needed downstream to distinguish whether to use the default fee rate value specified in the config or 0.

§remote_chan_reserve_sat: u64

The number of satoshis we require the remote peer to reserve. This value, if specified, must be above the dust limit and below 20% of the channel capacity.

§fund_max: bool

If set, then lnd will attempt to commit all the coins under control of the internal wallet to open the channel, and the LocalFundingAmount field must be zero and is ignored.

§memo: String

An optional note-to-self to go along with the channel containing some useful information. This is only ever stored locally and in no way impacts the channel’s operation.

§outpoints: Vec<OutPoint>

A list of selected outpoints that are allocated for channel funding.

Implementations§

Source§

impl OpenChannelRequest

Source

pub fn commitment_type(&self) -> CommitmentType

Returns the enum value of commitment_type, or the default if the field is set to an invalid enum value.

Source

pub fn set_commitment_type(&mut self, value: CommitmentType)

Sets commitment_type to the provided enum value.

Trait Implementations§

Source§

impl Clone for OpenChannelRequest

Source§

fn clone(&self) -> OpenChannelRequest

Returns a duplicate 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 Debug for OpenChannelRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for OpenChannelRequest

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for OpenChannelRequest

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for OpenChannelRequest

Source§

fn eq(&self, other: &OpenChannelRequest) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for OpenChannelRequest

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
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
Source§

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

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

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>,

Source§

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>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more