[][src]Struct lnrpc::Invoice

pub struct Invoice {
    pub memo: String,
    pub r_preimage: Vec<u8>,
    pub r_hash: Vec<u8>,
    pub value: i64,
    pub value_msat: i64,
    pub settled: bool,
    pub creation_date: i64,
    pub settle_date: i64,
    pub payment_request: String,
    pub description_hash: Vec<u8>,
    pub expiry: i64,
    pub fallback_addr: String,
    pub cltv_expiry: u64,
    pub route_hints: Vec<RouteHint>,
    pub private: bool,
    pub add_index: u64,
    pub settle_index: u64,
    pub amt_paid: i64,
    pub amt_paid_sat: i64,
    pub amt_paid_msat: i64,
    pub state: i32,
    pub htlcs: Vec<InvoiceHtlc>,
    pub features: HashMap<u32, Feature>,
    pub is_keysend: bool,
}

Fields

memo: String

An optional memo to attach along with the invoice. Used for record keeping purposes for the invoice's creator, and will also be set in the description field of the encoded payment request if the description_hash field is not being used.

r_preimage: Vec<u8>

The hex-encoded preimage (32 byte) which will allow settling an incoming HTLC payable to this preimage. When using REST, this field must be encoded as base64.

r_hash: Vec<u8>

The hash of the preimage. When using REST, this field must be encoded as base64.

value: i64

The value of this invoice in satoshis

The fields value and value_msat are mutually exclusive.

value_msat: i64

The value of this invoice in millisatoshis

The fields value and value_msat are mutually exclusive.

settled: boolcreation_date: i64settle_date: i64payment_request: String

A bare-bones invoice for a payment within the Lightning Network. With the details of the invoice, the sender has all the data necessary to send a payment to the recipient.

description_hash: Vec<u8>

Hash (SHA-256) of a description of the payment. Used if the description of payment (memo) is too long to naturally fit within the description field of an encoded payment request. When using REST, this field must be encoded as base64.

expiry: i64fallback_addr: Stringcltv_expiry: u64route_hints: Vec<RouteHint>

Route hints that can each be individually used to assist in reaching the invoice's destination.

private: booladd_index: u64

The "add" index of this invoice. Each newly created invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all added invoices with an add_index greater than this one.

settle_index: u64

The "settle" index of this invoice. Each newly settled invoice will increment this index making it monotonically increasing. Callers to the SubscribeInvoices call can use this to instantly get notified of all settled invoices with an settle_index greater than this one.

amt_paid: i64amt_paid_sat: i64

The amount that was accepted for this invoice, in satoshis. This will ONLY be set if this invoice has been settled. We provide this field as if the invoice was created with a zero value, then we need to record what amount was ultimately accepted. Additionally, it's possible that the sender paid MORE that was specified in the original invoice. So we'll record that here as well.

amt_paid_msat: i64

The amount that was accepted for this invoice, in millisatoshis. This will ONLY be set if this invoice has been settled. We provide this field as if the invoice was created with a zero value, then we need to record what amount was ultimately accepted. Additionally, it's possible that the sender paid MORE that was specified in the original invoice. So we'll record that here as well.

state: i32

The state the invoice is in.

htlcs: Vec<InvoiceHtlc>features: HashMap<u32, Feature>is_keysend: bool

Indicates if this invoice was a spontaneous payment that arrived via keysend [EXPERIMENTAL].

Implementations

impl Invoice[src]

pub fn state(&self) -> InvoiceState[src]

Returns the enum value of state, or the default if the field is set to an invalid enum value.

pub fn set_state(&mut self, value: InvoiceState)[src]

Sets state to the provided enum value.

Trait Implementations

impl Clone for Invoice[src]

impl Debug for Invoice[src]

impl Default for Invoice[src]

impl Message for Invoice[src]

impl PartialEq<Invoice> for Invoice[src]

impl StructuralPartialEq for Invoice[src]

Auto Trait Implementations

impl RefUnwindSafe for Invoice

impl Send for Invoice

impl Sync for Invoice

impl Unpin for Invoice

impl UnwindSafe for Invoice

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]