pub struct NewInvoiceParams {
pub amount: u128,
pub description: Option<String>,
pub currency: Currency,
pub payment_preimage: Option<Hash256>,
pub payment_hash: Option<Hash256>,
pub expiry: Option<u64>,
pub fallback_address: Option<String>,
pub final_expiry_delta: Option<u64>,
pub udt_type_script: Option<Script>,
pub hash_algorithm: Option<HashAlgorithm>,
pub allow_mpp: Option<bool>,
pub allow_trampoline_routing: Option<bool>,
}Expand description
The parameter struct for generating a new invoice.
Fields§
§amount: u128The amount of the invoice.
description: Option<String>The description of the invoice.
currency: CurrencyThe currency of the invoice.
payment_preimage: Option<Hash256>The preimage to settle an incoming TLC payable to this invoice. If preimage is set, hash must be absent. If both preimage and hash are absent, a random preimage is generated.
payment_hash: Option<Hash256>The hash of the preimage. If hash is set, preimage must be absent. This condition indicates a ‘hold invoice’ for which the tlc must be accepted and held until the preimage becomes known.
expiry: Option<u64>The expiry time of the invoice, in seconds.
fallback_address: Option<String>The fallback address of the invoice.
final_expiry_delta: Option<u64>The final HTLC timeout of the invoice, in milliseconds. Minimal value is 16 hours, and maximal value is 14 days.
udt_type_script: Option<Script>The UDT type script of the invoice.
hash_algorithm: Option<HashAlgorithm>The hash algorithm of the invoice.
allow_mpp: Option<bool>Whether allow payment to use MPP
allow_trampoline_routing: Option<bool>Whether allow payment to use trampoline routing
Trait Implementations§
Source§impl Clone for NewInvoiceParams
impl Clone for NewInvoiceParams
Source§fn clone(&self) -> NewInvoiceParams
fn clone(&self) -> NewInvoiceParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Default for NewInvoiceParams
impl Default for NewInvoiceParams
Source§fn default() -> NewInvoiceParams
fn default() -> NewInvoiceParams
Source§impl<'de> Deserialize<'de> for NewInvoiceParams
impl<'de> Deserialize<'de> for NewInvoiceParams
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 NewInvoiceParams
impl JsonSchema for NewInvoiceParams
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