Skip to main content

OpenChannelWithExternalFundingParams

Struct OpenChannelWithExternalFundingParams 

Source
pub struct OpenChannelWithExternalFundingParams {
Show 15 fields pub pubkey: Pubkey, pub funding_amount: u128, pub public: Option<bool>, pub funding_udt_type_script: Option<Script>, pub shutdown_script: Script, pub funding_lock_script: Script, pub funding_lock_script_cell_deps: Option<Vec<CellDep>>, pub commitment_delay_epoch: Option<EpochNumberWithFraction>, pub commitment_fee_rate: Option<u64>, pub funding_fee_rate: Option<u64>, pub tlc_expiry_delta: Option<u64>, pub tlc_min_value: Option<u128>, pub tlc_fee_proportional_millionths: Option<u128>, pub max_tlc_value_in_flight: Option<u128>, pub max_tlc_number_in_flight: Option<u64>,
}
Expand description

Parameters for opening a channel with external funding.

Fields§

§pubkey: Pubkey

The identity public key of the peer to open a channel with. The peer must already be connected through the connect_peer rpc first.

§funding_amount: u128

The amount of CKB or UDT to fund the channel with.

§public: Option<bool>

Whether this is a public channel (will be broadcasted to network, and can be used to forward TLCs), an optional parameter, default value is true.

§funding_udt_type_script: Option<Script>

The type script of the UDT to fund the channel with, an optional parameter.

§shutdown_script: Script

The script used to receive the channel balance when the channel is closed. This is REQUIRED for external funding.

§funding_lock_script: Script

The lock script that controls the funding cells. The node will collect cells with this lock script to build the funding transaction. The user must be able to sign for this lock script.

§funding_lock_script_cell_deps: Option<Vec<CellDep>>

Optional extra cell deps required by funding_lock_script. This is useful for custom wallet lock scripts whose deps are not part of the genesis defaults.

§commitment_delay_epoch: Option<EpochNumberWithFraction>

The delay time for the commitment transaction, must be an EpochNumberWithFraction in u64 format, an optional parameter, default value is 1 epoch, which is 4 hours.

§commitment_fee_rate: Option<u64>

The fee rate for the commitment transaction, an optional parameter.

§funding_fee_rate: Option<u64>

The fee rate for the funding transaction, an optional parameter.

§tlc_expiry_delta: Option<u64>

The expiry delta to forward a tlc, in milliseconds, default to 4 hours, which is 4 * 60 * 60 * 1000 milliseconds Expect it >= 2/3 commitment_delay_epoch. This parameter can be updated with rpc update_channel later.

§tlc_min_value: Option<u128>

The minimum value for a TLC our side can send, an optional parameter, default is 0, which means we can send any TLC is larger than 0. This parameter can be updated with rpc update_channel later.

§tlc_fee_proportional_millionths: Option<u128>

The fee proportional millionths for a TLC, proportional to the amount of the forwarded tlc. The unit is millionths of the amount. default is 1000 which means 0.1%. This parameter can be updated with rpc update_channel later.

§max_tlc_value_in_flight: Option<u128>

The maximum total value of in-flight TLCs our side will accept from the peer, an optional parameter. This parameter can not be updated after channel is opened.

§max_tlc_number_in_flight: Option<u64>

The maximum number of in-flight TLCs our side will accept from the peer, an optional parameter, default is 125 This parameter can not be updated after channel is opened.

Trait Implementations§

Source§

impl Clone for OpenChannelWithExternalFundingParams

Source§

fn clone(&self) -> OpenChannelWithExternalFundingParams

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for OpenChannelWithExternalFundingParams

Source§

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

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

impl<'de> Deserialize<'de> for OpenChannelWithExternalFundingParams

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for OpenChannelWithExternalFundingParams

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl Serialize for OpenChannelWithExternalFundingParams

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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