ZapRequest

data class ZapRequest(val content: String, val relays: List<String>, val amount: Long?, val lnurl: String?, val to: PubKey, val eventId: ByteString?, val tags: List<Tag> = listOfNotNull( RelaysTag(relays), amount?.let(::AmountTag), lnurl?.let(::LnUrlTag), PubKeyTag(to), eventId?.let(::EventTag) )) : EventContent

Zap request. Event kind 9734, as defined in nip-57.

Constructors

Link copied to clipboard
constructor(content: String, relays: List<String>, amount: Long?, lnurl: String?, to: PubKey, eventId: ByteString?, tags: List<Tag> = listOfNotNull( RelaysTag(relays), amount?.let(::AmountTag), lnurl?.let(::LnUrlTag), PubKeyTag(to), eventId?.let(::EventTag) ))

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val amount: Long?
Link copied to clipboard
Link copied to clipboard
val eventId: ByteString?
Link copied to clipboard
open override val kind: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val tags: List<Tag>
Link copied to clipboard
val to: PubKey

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