Bolt11Invoice

Companion:
class
Source:
Bolt11Invoice.scala
trait Product
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

case class Bolt11Data(timestamp: TimestampSecond, taggedFields: List[TaggedField], signature: ByteVector)
case class Description(description: String) extends TaggedField

Description

Description

Value parameters:
description

a free-format string that will be included in the invoice

Source:
Bolt11Invoice.scala
case class DescriptionHash(hash: ByteVector32) extends TaggedField

Hash

Hash

Value parameters:
hash

hash that will be included in the invoice, and can be checked against the hash of a long description, an SKU, ...

Source:
Bolt11Invoice.scala
case class Expiry(bin: BitVector) extends TaggedField

Expiry Date

Expiry Date

Companion:
object
Source:
Bolt11Invoice.scala
object Expiry
Companion:
class
Source:
Bolt11Invoice.scala
case class ExtraHop(nodeId: PublicKey, shortChannelId: ShortChannelId, feeBase: MilliSatoshi, feeProportionalMillionths: Long, cltvExpiryDelta: CltvExpiryDelta)

Extra hop contained in RoutingInfoTag

Extra hop contained in RoutingInfoTag

Value parameters:
cltvExpiryDelta

node cltv expiry delta

feeBase

node fixed fee

feeProportionalMillionths

node proportional fee

nodeId

start of the channel

shortChannelId

channel id

Source:
Bolt11Invoice.scala
case class FallbackAddress(version: Byte, data: ByteVector) extends TaggedField

Fallback Payment that specifies a fallback payment address to be used if LN payment cannot be processed

Fallback Payment that specifies a fallback payment address to be used if LN payment cannot be processed

Companion:
object
Source:
Bolt11Invoice.scala
case class InvoiceFeatures(features: Features[Feature]) extends TaggedField

Features supported or required for receiving this payment.

Features supported or required for receiving this payment.

Source:
Bolt11Invoice.scala
case class MinFinalCltvExpiry(bin: BitVector) extends TaggedField

Min final CLTV expiry

Min final CLTV expiry

Companion:
object
Source:
Bolt11Invoice.scala
case class PaymentHash(hash: ByteVector32) extends TaggedField

Payment Hash

Payment Hash

Value parameters:
hash

payment hash

Source:
Bolt11Invoice.scala
case class PaymentMetadata(data: ByteVector) extends TaggedField

Additional metadata to attach to the payment.

Additional metadata to attach to the payment.

Source:
Bolt11Invoice.scala
case class PaymentSecret(secret: ByteVector32) extends TaggedField

Payment secret. This is currently random bytes used to protect against probing from the next-to-last node.

Payment secret. This is currently random bytes used to protect against probing from the next-to-last node.

Value parameters:
secret

payment secret

Source:
Bolt11Invoice.scala
case class RoutingInfo(path: List[ExtraHop]) extends TaggedField

Routing Info

Routing Info

Value parameters:
path

one or more entries containing extra routing information for a private route

Source:
Bolt11Invoice.scala
sealed trait TaggedField

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
Source:
Mirror.scala

The name of the type

The name of the type

Inherited from:
Mirror
Source:
Mirror.scala

Value members

Concrete methods

def apply(chainHash: ByteVector32, amount: Option[MilliSatoshi], paymentHash: ByteVector32, privateKey: PrivateKey, description: Either[String, ByteVector32], minFinalCltvExpiryDelta: CltvExpiryDelta, fallbackAddress: Option[String], expirySeconds: Option[Long], extraHops: List[List[ExtraHop]], timestamp: TimestampSecond, paymentSecret: ByteVector32, paymentMetadata: Option[ByteVector], features: Features[InvoiceFeature]): Bolt11Invoice

Checks if a serialized invoice is expired. Timestamp is compared to the System's current time.

Checks if a serialized invoice is expired. Timestamp is compared to the System's current time.

Value parameters:
input

valid serialized invoice

Returns:

true if the invoice has expired, false otherwise.

Source:
Bolt11Invoice.scala

Extracts the description from a serialized invoice that is expected to be valid. Throws an error if the invoice is not valid.

Extracts the description from a serialized invoice that is expected to be valid. Throws an error if the invoice is not valid.

Value parameters:
input

valid serialized invoice

Returns:

description as a String. If the description is a hash, returns the hash value as a String.

Source:
Bolt11Invoice.scala
def features2bits[T <: Feature](features: Features[T]): BitVector

This returns a bitvector with the minimum size necessary to encode the features, left padded to have a length (in bits) that is a multiple of 5.

This returns a bitvector with the minimum size necessary to encode the features, left padded to have a length (in bits) that is a multiple of 5.

Source:
Bolt11Invoice.scala
Value parameters:
input

bech32-encoded invoice

Returns:

a Bolt11 invoice

Source:
Bolt11Invoice.scala

This returns a bitvector with the minimum size necessary to encode the long, left padded to have a length (in bits) that is a multiple of 5.

This returns a bitvector with the minimum size necessary to encode the long, left padded to have a length (in bits) that is a multiple of 5.

Source:
Bolt11Invoice.scala