Enum Bolt11Bech32

Source
pub enum Bolt11Bech32 {}
Expand description

The bech32::Bech32 checksum algorithm, with extended max length suitable for BOLT11 invoices.

Trait Implementations§

Source§

impl Checksum for Bolt11Bech32

Source§

const CODE_LENGTH: usize = 7_089usize

Extend the max length from the 1023 bytes default.

Source§

const CHECKSUM_LENGTH: usize = 6usize

The number of characters in the checksum. Read more
Source§

const GENERATOR_SH: [Self::MidstateRepr; 5] = bech32::Bech32::GENERATOR_SH

The coefficients of the generator polynomial, except the leading monic term, in “big-endian” (highest-degree coefficients get leftmost bits) order, along with the 4 shifts of the generator. Read more
Source§

const TARGET_RESIDUE: Self::MidstateRepr = {transmute(0x00000001): <Bolt11Bech32 as bech32::Checksum>::MidstateRepr}

The residue, modulo the generator polynomial, that a valid codeword will have.
Source§

type MidstateRepr = <Bech32 as Checksum>::MidstateRepr

An unsigned integer type capable of holding a packed version of the generator polynomial (without its leading 1) and target residue (which will have the same width). Read more
Source§

fn sanity_check()

Sanity checks that the various constants of the trait are set in a way that they are consistent with each other. 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<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, 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.