PaymentRequest

data class PaymentRequest(val network: Network, val timestamp: Instant, val amount: Option<BitcoinAmount> = None, val paymentHash: String, val taggedFields: List<TaggedField> = emptyList(), val signature: ByteString, val hash: ByteString)(source)

A request for payment, as per BOLT-11

Constructors

Link copied to clipboard
constructor(network: Network, timestamp: Instant, amount: Option<BitcoinAmount> = None, paymentHash: String, taggedFields: List<TaggedField> = emptyList(), signature: ByteString, hash: ByteString)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val amount: Option<BitcoinAmount>

The optional amount that this request is asking for

Link copied to clipboard
val description: Option<String>

Short description of purpose of payment (UTF-8), e.g. '1 cup of coffee' or 'ナンセンス 1杯'

Link copied to clipboard
val descriptionHash: Option<String>

SHA2 256-bit hash of the original description. Usually set when the description is too long to store in the invoice itself.

Link copied to clipboard

Expiry time as defined in tagged fields. Default is 1 hour if no duration tag is present

Link copied to clipboard
val hash: ByteString

Checksum for this request

Link copied to clipboard

In which Bitcoin network this request is valid

Link copied to clipboard
val payeeNodePublicKey: ByteString

Recovers the payee node public key from the signature

Link copied to clipboard

Hash of the request pre-image

Link copied to clipboard
val signature: ByteString

Signature provided by the requesting node

Link copied to clipboard

List of all the raw tagged fields in the request

Link copied to clipboard

When the request was created