Skip to main content

SendPaymentWithRouterParams

Struct SendPaymentWithRouterParams 

Source
pub struct SendPaymentWithRouterParams {
    pub payment_hash: Option<Hash256>,
    pub router: Vec<RouterHop>,
    pub invoice: Option<String>,
    pub custom_records: Option<PaymentCustomRecords>,
    pub keysend: Option<bool>,
    pub udt_type_script: Option<Script>,
    pub dry_run: Option<bool>,
}
Expand description

Parameters for sending a payment with a specified router.

Fields§

§payment_hash: Option<Hash256>

the hash to use within the payment’s HTLC. If not set and keysend is set to true, a random hash will be generated. If not set and there is a payment_hash in the invoice, it will be used. Otherwise, payment_hash need to be set.

§router: Vec<RouterHop>

The router to use for the payment

§invoice: Option<String>

the encoded invoice to send to the recipient

§custom_records: Option<PaymentCustomRecords>

Some custom records for the payment which contains a map of u32 to Vec The key is the record type, and the value is the serialized data. Limits: the sum size of values can not exceed 2048 bytes.

For example:

"custom_records": {
   "0x1": "0x01020304",
   "0x2": "0x05060708",
   "0x3": "0x090a0b0c",
   "0x4": "0x0d0e0f10010d090a0b0c"
 }
§keysend: Option<bool>

keysend payment

§udt_type_script: Option<Script>

udt type script for the payment

§dry_run: Option<bool>

dry_run for payment, used for check whether we can build valid router and the fee for this payment, it’s useful for the sender to double check the payment before sending it to the network, default is false

Trait Implementations§

Source§

impl Debug for SendPaymentWithRouterParams

Source§

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

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

impl<'de> Deserialize<'de> for SendPaymentWithRouterParams

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 SendPaymentWithRouterParams

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 SendPaymentWithRouterParams

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

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