ZapReceipt

data class ZapReceipt(val to: PubKey, val eventId: ByteString?, val bolt11: String, val zapRequest: Event, val preimage: ByteString? = null, val tags: List<Tag> = listOfNotNull( PubKeyTag(to), eventId?.let(::EventTag), Bolt11Tag(bolt11), ZapReceiptDescriptionTag(zapRequest), preimage?.let(::PreimageTag), )) : EventContent

Zap receipt. Event kind 9735, as defined in nip-57.

Constructors

Link copied to clipboard
constructor(to: PubKey, eventId: ByteString?, bolt11: String, zapRequest: Event, preimage: ByteString? = null, tags: List<Tag> = listOfNotNull( PubKeyTag(to), eventId?.let(::EventTag), Bolt11Tag(bolt11), ZapReceiptDescriptionTag(zapRequest), preimage?.let(::PreimageTag), ))

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val eventId: ByteString?
Link copied to clipboard
open override val kind: Int
Link copied to clipboard
val preimage: ByteString? = null
Link copied to clipboard
open override val tags: List<Tag>
Link copied to clipboard
val to: PubKey
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open fun sign(sec: SecKey): Event

open fun sign(sec: SecKey, at: Instant): Event

Sign this content as created at at, truncated to the second. Signing the same content with the same key at the same second yields an event with the same id, which a relay stores once.

Link copied to clipboard
open override fun toJsonString(): String