pub struct BuildRouterParams {
pub amount: Option<u128>,
pub udt_type_script: Option<Script>,
pub hops_info: Vec<HopRequire>,
pub final_tlc_expiry_delta: Option<u64>,
}Expand description
Parameters for building a payment router.
Fields§
§amount: Option<u128>the amount of the payment, the unit is Shannons for non UDT payment
If not set, the minimum routable amount 1 is used
udt_type_script: Option<Script>udt type script for the payment router
hops_info: Vec<HopRequire>A list of hops that defines the route. This does not include the source hop pubkey. A hop info is a tuple of pubkey and the channel(specified by channel funding tx) will be used. This is a strong restriction given on payment router, which means these specified hops and channels must be adapted in the router. This is different from hop hints, which maybe ignored by find path. If channel is not specified, find path algorithm will pick a channel within these two peers.
An error will be returned if there is no router could be build from given hops and channels
final_tlc_expiry_delta: Option<u64>the TLC expiry delta should be used to set the timelock for the final hop, in milliseconds
Trait Implementations§
Source§impl Clone for BuildRouterParams
impl Clone for BuildRouterParams
Source§fn clone(&self) -> BuildRouterParams
fn clone(&self) -> BuildRouterParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BuildRouterParams
impl Debug for BuildRouterParams
Source§impl<'de> Deserialize<'de> for BuildRouterParams
impl<'de> Deserialize<'de> for BuildRouterParams
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for BuildRouterParams
impl JsonSchema for BuildRouterParams
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more