QueryRoutesRequest

Struct QueryRoutesRequest 

Source
pub struct QueryRoutesRequest {
Show 19 fields pub pub_key: String, pub amt: i64, pub amt_msat: i64, pub final_cltv_delta: i32, pub fee_limit: Option<FeeLimit>, pub ignored_nodes: Vec<Vec<u8>>, pub ignored_edges: Vec<EdgeLocator>, pub source_pub_key: String, pub use_mission_control: bool, pub ignored_pairs: Vec<NodePair>, pub cltv_limit: u32, pub dest_custom_records: HashMap<u64, Vec<u8>>, pub outgoing_chan_id: u64, pub last_hop_pubkey: Vec<u8>, pub route_hints: Vec<RouteHint>, pub blinded_payment_paths: Vec<BlindedPaymentPath>, pub dest_features: Vec<i32>, pub time_pref: f64, pub outgoing_chan_ids: Vec<u64>,
}

Fields§

§pub_key: String

The 33-byte hex-encoded public key for the payment destination

§amt: i64

The amount to send expressed in satoshis.

The fields amt and amt_msat are mutually exclusive.

§amt_msat: i64

The amount to send expressed in millisatoshis.

The fields amt and amt_msat are mutually exclusive.

§final_cltv_delta: i32

An optional CLTV delta from the current height that should be used for the timelock of the final hop. Note that unlike SendPayment, QueryRoutes does not add any additional block padding on top of final_ctlv_delta. This padding of a few blocks needs to be added manually or otherwise failures may happen when a block comes in while the payment is in flight.

Note: must not be set if making a payment to a blinded path (delta is set by the aggregate parameters provided by blinded_payment_paths)

§fee_limit: Option<FeeLimit>

The maximum number of satoshis that will be paid as a fee of the payment. This value can be represented either as a percentage of the amount being sent, or as a fixed amount of the maximum fee the user is willing the pay to send the payment. If not specified, lnd will use a default value of 100% fees for small amounts (<=1k sat) or 5% fees for larger amounts.

§ignored_nodes: Vec<Vec<u8>>

A list of nodes to ignore during path finding. When using REST, these fields must be encoded as base64.

§ignored_edges: Vec<EdgeLocator>
👎Deprecated

Deprecated. A list of edges to ignore during path finding.

§source_pub_key: String

The source node where the request route should originated from. If empty, self is assumed.

§use_mission_control: bool

If set to true, edge probabilities from mission control will be used to get the optimal route.

§ignored_pairs: Vec<NodePair>

A list of directed node pairs that will be ignored during path finding.

§cltv_limit: u32

An optional maximum total time lock for the route. If the source is empty or ourselves, this should not exceed lnd’s --max-cltv-expiry setting. If zero, then the value of --max-cltv-expiry is used as the limit.

§dest_custom_records: HashMap<u64, Vec<u8>>

An optional field that can be used to pass an arbitrary set of TLV records to a peer which understands the new records. This can be used to pass application specific data during the payment attempt. If the destination does not support the specified records, an error will be returned. Record types are required to be in the custom range >= 65536. When using REST, the values must be encoded as base64.

§outgoing_chan_id: u64
👎Deprecated

Deprecated, use outgoing_chan_ids. The channel id of the channel that must be taken to the first hop. If zero, any channel may be used.

§last_hop_pubkey: Vec<u8>

The pubkey of the last hop of the route. If empty, any hop may be used.

§route_hints: Vec<RouteHint>

Optional route hints to reach the destination through private channels.

§blinded_payment_paths: Vec<BlindedPaymentPath>

An optional blinded path(s) to reach the destination. Note that the introduction node must be provided as the first hop in the route.

§dest_features: Vec<i32>

Features assumed to be supported by the final node. All transitive feature dependencies must also be set properly. For a given feature bit pair, either optional or remote may be set, but not both. If this field is nil or empty, the router will try to load destination features from the graph as a fallback.

Note: must not be set if making a payment to a blinded route (features are provided in blinded_payment_paths).

§time_pref: f64

The time preference for this payment. Set to -1 to optimize for fees only, to 1 to optimize for reliability only or a value inbetween for a mix.

§outgoing_chan_ids: Vec<u64>

The channel ids of the channels allowed for the first hop. If empty, any channel may be used.

Implementations§

Source§

impl QueryRoutesRequest

Source

pub fn dest_features( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(i32) -> Option<FeatureBit>>

Returns an iterator which yields the valid enum values contained in dest_features.

Source

pub fn push_dest_features(&mut self, value: FeatureBit)

Appends the provided enum value to dest_features.

Trait Implementations§

Source§

impl Clone for QueryRoutesRequest

Source§

fn clone(&self) -> QueryRoutesRequest

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 QueryRoutesRequest

Source§

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

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

impl Default for QueryRoutesRequest

Source§

fn default() -> Self

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

impl Message for QueryRoutesRequest

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 QueryRoutesRequest

Source§

fn eq(&self, other: &QueryRoutesRequest) -> 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 QueryRoutesRequest

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