Type Alias lightning_types::features::Bolt11InvoiceFeatures

source ·
pub type Bolt11InvoiceFeatures = Features<Bolt11InvoiceContext>;
Expand description

Features used within an invoice.

Aliased Type§

struct Bolt11InvoiceFeatures { /* private fields */ }

Implementations§

source§

impl Bolt11InvoiceFeatures

source

pub fn for_keysend(allow_mpp: bool) -> Bolt11InvoiceFeatures

Getting a route for a keysend payment to a private node requires providing the payee’s features (since they were not announced in a node announcement). However, keysend payments don’t have an invoice to pull the payee’s features from, so this method is provided for use when a Bolt11InvoiceFeatures is required in a route.

MPP keysend is not widely supported yet, so we parameterize support to allow the user to choose whether their router should find multi-part routes.

Trait Implementations§

source§

impl Base32Len for Bolt11InvoiceFeatures

source§

fn base32_len(&self) -> usize

Calculate the base32 serialized length
source§

impl FromBase32 for Bolt11InvoiceFeatures

source§

type Err = Error

The associated error which can be returned from parsing (e.g. because of bad padding).
source§

fn from_base32(field_data: &[u5]) -> Result<Bolt11InvoiceFeatures, Error>

Convert a base32 slice to Self.
source§

impl ToBase32 for Bolt11InvoiceFeatures

source§

fn write_base32<W: WriteBase32>( &self, writer: &mut W, ) -> Result<(), <W as WriteBase32>::Err>

Encode as base32 and write it to the supplied writer Implementations shouldn’t allocate.
source§

fn to_base32(&self) -> Vec<u5>

Convert Self to base32 vector