package tlv
- Alphabetic
- Public
- Protected
Type Members
- sealed trait CETSignaturesTLV extends TLV
- case class CETSignaturesV0TLV(sigs: Vector[ECAdaptorSignature]) extends CETSignaturesTLV with Product with Serializable
- sealed trait ContractInfoTLV extends TLV
- case class ContractInfoV0TLV(outcomes: Vector[(String, Satoshis)]) extends ContractInfoTLV with Product with Serializable
- See also
https://github.com/discreetlogcontracts/dlcspecs/blob/master/Messaging.md#version-0-contract_info
- case class ContractInfoV1TLV(base: Int, numDigits: Int, totalCollateral: Satoshis, points: Vector[TLVPoint]) extends ContractInfoTLV with Product with Serializable
- See also
https://github.com/discreetlogcontracts/dlcspecs/blob/8ee4bbe816c9881c832b1ce320b9f14c72e3506f/NumericOutcome.md#curve-serialization
- case class DLCAcceptTLV(tempContractId: Sha256Digest, totalCollateralSatoshis: Satoshis, fundingPubKey: ECPublicKey, payoutSPK: ScriptPubKey, fundingInputs: Vector[FundingInputTLV], changeSPK: ScriptPubKey, cetSignatures: CETSignaturesTLV, refundSignature: ECDigitalSignature) extends TLV with Product with Serializable
- case class DLCOfferTLV(contractFlags: Byte, chainHash: DoubleSha256Digest, contractInfo: ContractInfoTLV, oracleInfo: OracleInfoTLV, fundingPubKey: ECPublicKey, payoutSPK: ScriptPubKey, totalCollateralSatoshis: Satoshis, fundingInputs: Vector[FundingInputTLV], changeSPK: ScriptPubKey, feeRate: SatoshisPerVirtualByte, contractMaturityBound: BlockTimeStamp, contractTimeout: BlockTimeStamp) extends TLV with Product with Serializable
- sealed trait DLCOutcomeType extends AnyRef
Represents a DLC event that could be signed by an oracle
- case class DLCSignTLV(contractId: ByteVector, cetSignatures: CETSignaturesTLV, refundSignature: ECDigitalSignature, fundingSignatures: FundingSignaturesTLV) extends TLV with Product with Serializable
- sealed trait DigitDecompositionEventDescriptorV0TLV extends NumericEventDescriptorTLV
Describes a large range event using numerical decomposition
- case class EnumEventDescriptorV0TLV(outcomes: Vector[NormalizedString]) extends EventDescriptorTLV with Product with Serializable
Describes an event over an enumerated set of outcomes
Describes an event over an enumerated set of outcomes
- outcomes
The set of possible outcomes
- See also
https://github.com/discreetlogcontracts/dlcspecs/blob/master/Oracle.md#simple-enumeration
- case class EnumOutcome(outcome: String) extends DLCOutcomeType with Product with Serializable
An outcome from an enumerated event type
- case class ErrorTLV(id: ByteVector, data: ByteVector) extends TLV with Product with Serializable
- sealed trait EventDescriptorTLV extends TLV
- sealed trait FundingInputTLV extends TLV
- case class FundingInputV0TLV(prevTx: Transaction, prevTxVout: UInt32, sequence: UInt32, maxWitnessLen: UInt16, redeemScriptOpt: Option[WitnessScriptPubKey]) extends FundingInputTLV with Product with Serializable
- sealed trait FundingSignaturesTLV extends TLV
- case class FundingSignaturesV0TLV(witnesses: Vector[ScriptWitnessV0]) extends FundingSignaturesTLV with Product with Serializable
- case class LnMessage[+T <: TLV](tlv: T) extends NetworkElement with Product with Serializable
Lightning Network message serialization is the same as TLV serialization except that the type is represented with a UInt16 instead of BigSizeUInt and length is omitted.
Lightning Network message serialization is the same as TLV serialization except that the type is represented with a UInt16 instead of BigSizeUInt and length is omitted.
The reason for the omission is that the message is expected to be encrypted by the LN transport layer and the length is included there in the unencrypted part of the packet.
The reason that LnMessage doesn't just do what TLV does (which is better) is because TLVs are newer and so we're stuck with the legacy format.
- case class LnMessageFactory[+T <: TLV](tlvFactory: TLVFactory[T]) extends Factory[LnMessage[T]] with Product with Serializable
- case class NormalizedString(str: String) extends NetworkElement with Product with Serializable
- sealed trait NumericEventDescriptorTLV extends EventDescriptorTLV
- sealed trait OracleAnnouncementTLV extends TLV
- case class OracleAnnouncementV0TLV(announcementSignature: SchnorrDigitalSignature, publicKey: SchnorrPublicKey, eventTLV: OracleEventV0TLV) extends OracleAnnouncementTLV with Product with Serializable
- sealed trait OracleEventTLV extends TLV
- case class OracleEventV0TLV(nonces: Vector[SchnorrNonce], eventMaturityEpoch: UInt32, eventDescriptor: EventDescriptorTLV, eventId: NormalizedString) extends OracleEventTLV with Product with Serializable
- sealed trait OracleInfoTLV extends TLV
- case class OracleInfoV0TLV(pubKey: SchnorrPublicKey, rValue: SchnorrNonce) extends OracleInfoTLV with Product with Serializable
- case class OracleInfoV1TLV(pubKey: SchnorrPublicKey, nonces: Vector[SchnorrNonce]) extends OracleInfoTLV with Product with Serializable
- case class PingTLV(numPongBytes: UInt16, ignored: ByteVector) extends TLV with Product with Serializable
- case class PongTLV(ignored: ByteVector) extends TLV with Product with Serializable
- case class RangeEventDescriptorV0TLV(start: Int32, count: UInt32, step: UInt16, unit: NormalizedString, precision: Int32) extends NumericEventDescriptorTLV with Product with Serializable
Describes a simple event over a range of numbers
Describes a simple event over a range of numbers
- start
The first number in the range
- count
The number of possible outcomes
- step
The increment between each outcome
- case class SignedDigitDecompositionEventDescriptor(base: UInt16, numDigits: UInt16, unit: NormalizedString, precision: Int32) extends DigitDecompositionEventDescriptorV0TLV with Product with Serializable
Represents a large range event that can be positive or negative
- sealed trait TLV extends NetworkElement with TLVUtil
- abstract class TLVDeserializable[T <: TLV, +U <: TLVSerializable[T]] extends Factory[U]
- sealed trait TLVFactory[+T <: TLV] extends Factory[T]
- sealed trait TLVParentFactory[T <: TLV] extends Factory[T]
- case class TLVPoint(outcome: Long, value: Satoshis, extraPrecision: Int, isEndpoint: Boolean) extends NetworkElement with Product with Serializable
- trait TLVSerializable[+T <: TLV] extends NetworkElement
- trait TLVUtil extends AnyRef
- case class UnknownTLV(tpe: BigSizeUInt, value: ByteVector) extends TLV with Product with Serializable
- case class UnsignedDigitDecompositionEventDescriptor(base: UInt16, numDigits: UInt16, unit: NormalizedString, precision: Int32) extends DigitDecompositionEventDescriptorV0TLV with Product with Serializable
Represents a large range event that is unsigned
- case class UnsignedNumericOutcome(digits: Vector[Int]) extends DLCOutcomeType with Product with Serializable
An outcome from a multi-nonce unsigned numeric event type.
An outcome from a multi-nonce unsigned numeric event type.
If digits.length is less than the the total number of digits to be signed by the oracle then this outcome represents all outcomes prefixed by the given digits.
Value Members
- object CETSignaturesV0TLV extends Factory[CETSignaturesV0TLV] with TLVFactory[CETSignaturesV0TLV] with Serializable
- object ContractInfoTLV extends Factory[ContractInfoTLV] with TLVParentFactory[ContractInfoTLV]
- object ContractInfoV0TLV extends Factory[ContractInfoV0TLV] with TLVFactory[ContractInfoV0TLV] with Serializable
- object ContractInfoV1TLV extends Factory[ContractInfoV1TLV] with TLVFactory[ContractInfoV1TLV] with Serializable
- object DLCAcceptTLV extends Factory[DLCAcceptTLV] with TLVFactory[DLCAcceptTLV] with Serializable
- object DLCOfferTLV extends Factory[DLCOfferTLV] with TLVFactory[DLCOfferTLV] with Serializable
- object DLCSignTLV extends Factory[DLCSignTLV] with TLVFactory[DLCSignTLV] with Serializable
- object DigitDecompositionEventDescriptorV0TLV extends Factory[DigitDecompositionEventDescriptorV0TLV] with TLVFactory[DigitDecompositionEventDescriptorV0TLV]
- object EnumEventDescriptorV0TLV extends Factory[EnumEventDescriptorV0TLV] with TLVFactory[EnumEventDescriptorV0TLV] with Serializable
- object ErrorTLV extends Factory[ErrorTLV] with TLVFactory[ErrorTLV] with Serializable
- object EventDescriptorTLV extends Factory[EventDescriptorTLV] with TLVParentFactory[EventDescriptorTLV]
- object FundingInputV0TLV extends Factory[FundingInputV0TLV] with TLVFactory[FundingInputV0TLV] with Serializable
- object FundingSignaturesV0TLV extends Factory[FundingSignaturesV0TLV] with TLVFactory[FundingSignaturesV0TLV] with Serializable
- object LnMessage extends Factory[LnMessage[TLV]] with Serializable
- object NormalizedString extends StringFactory[NormalizedString] with Serializable
- object OracleAnnouncementTLV extends Factory[OracleAnnouncementTLV] with TLVParentFactory[OracleAnnouncementTLV]
- object OracleAnnouncementV0TLV extends Factory[OracleAnnouncementV0TLV] with TLVFactory[OracleAnnouncementV0TLV] with Serializable
- object OracleEventV0TLV extends Factory[OracleEventV0TLV] with TLVFactory[OracleEventV0TLV] with Serializable
- object OracleInfoTLV extends Factory[OracleInfoTLV] with TLVParentFactory[OracleInfoTLV]
- object OracleInfoV0TLV extends Factory[OracleInfoV0TLV] with TLVFactory[OracleInfoV0TLV] with Serializable
- object OracleInfoV1TLV extends Factory[OracleInfoV1TLV] with TLVFactory[OracleInfoV1TLV] with Serializable
- object PingTLV extends Factory[PingTLV] with TLVFactory[PingTLV] with Serializable
- object PongTLV extends Factory[PongTLV] with TLVFactory[PongTLV] with Serializable
- object RangeEventDescriptorV0TLV extends Factory[RangeEventDescriptorV0TLV] with TLVFactory[RangeEventDescriptorV0TLV] with Serializable
- object TLV extends Factory[TLV] with TLVParentFactory[TLV]
- object TLVPoint extends Factory[TLVPoint] with Serializable
- object UnknownTLV extends Factory[UnknownTLV] with Serializable