package tlv
- Alphabetic
- Public
- Protected
Type Members
- case class AmtToForwardTLV(amt: MilliSatoshis) extends TLV with Product with Serializable
- sealed trait CETSignaturesTLV extends DLCSetupPieceTLV
- case class CETSignaturesV0TLV(sigs: Vector[ECAdaptorSignature]) extends CETSignaturesTLV with Product with Serializable
- sealed trait ContractDescriptorTLV extends DLCSetupPieceTLV
- case class ContractDescriptorV0TLV(outcomes: Vector[(String, Satoshis)]) extends ContractDescriptorTLV with Product with Serializable
- See also
https://github.com/discreetlogcontracts/dlcspecs/blob/master/Messaging.md#version-0-contract_info
- case class ContractDescriptorV1TLV(numDigits: Int, payoutFunction: PayoutFunctionV0TLV, roundingIntervals: RoundingIntervalsV0TLV) extends ContractDescriptorTLV with Product with Serializable
- sealed trait ContractInfoTLV extends DLCSetupPieceTLV
- case class ContractInfoV0TLV(totalCollateral: Satoshis, contractDescriptor: ContractDescriptorTLV, oracleInfo: OracleInfoTLV) extends ContractInfoTLV with Product with Serializable
- case class ContractInfoV1TLV(totalCollateral: Satoshis, contractOraclePairs: Vector[(ContractDescriptorTLV, OracleInfoTLV)]) extends ContractInfoTLV with Product with Serializable
- case class DLCAcceptTLV(tempContractId: Sha256Digest, acceptCollateralSatoshis: Satoshis, fundingPubKey: ECPublicKey, payoutSPK: ScriptPubKey, payoutSerialId: UInt64, fundingInputs: Vector[FundingInputTLV], changeSPK: ScriptPubKey, changeSerialId: UInt64, cetSignatures: CETSignaturesTLV, refundSignature: ECDigitalSignature, negotiationFields: NegotiationFieldsTLV) extends DLCSetupTLV with Product with Serializable
- case class DLCOfferTLV(protocolVersionOpt: Option[Int], contractFlags: Byte, chainHash: DoubleSha256Digest, contractInfo: ContractInfoTLV, fundingPubKey: ECPublicKey, payoutSPK: ScriptPubKey, payoutSerialId: UInt64, offererCollateralSatoshis: Satoshis, fundingInputs: Vector[FundingInputTLV], changeSPK: ScriptPubKey, changeSerialId: UInt64, fundOutputSerialId: UInt64, feeRate: SatoshisPerVirtualByte, contractMaturityBound: BlockTimeStamp, contractTimeout: BlockTimeStamp) extends DLCSetupTLV with Product with Serializable
- sealed trait DLCOracleTLV extends TLV
- sealed trait DLCOutcomeType extends AnyRef
Represents a DLC event that could be signed by an oracle
- sealed trait DLCSerializationVersion extends AnyRef
We have various binary serializations in our codebase currently.
We have various binary serializations in our codebase currently. This is a product of trying to release a DLC wallet before the spec was finalized. Some of the binary level serialization for DLCs has changed since we initiallly deployed wallets.
- sealed trait DLCSetupPieceTLV extends TLV
- sealed trait DLCSetupTLV extends TLV
- case class DLCSignTLV(contractId: ByteVector, cetSignatures: CETSignaturesTLV, refundSignature: ECDigitalSignature, fundingSignatures: FundingSignaturesTLV) extends DLCSetupTLV 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 DLCOracleTLV
- sealed trait FundingInputTLV extends DLCSetupPieceTLV
- case class FundingInputV0TLV(inputSerialId: UInt64, prevTx: Transaction, prevTxVout: UInt32, sequence: UInt32, maxWitnessLen: UInt16, redeemScriptOpt: Option[WitnessScriptPubKey]) extends FundingInputTLV with Product with Serializable
- sealed trait FundingSignaturesTLV extends DLCSetupPieceTLV
- case class FundingSignaturesV0TLV(witnesses: Vector[ScriptWitnessV0]) extends FundingSignaturesTLV with Product with Serializable
- case class HyperbolaPayoutCurvePieceTLV(usePositivePiece: Boolean, translateOutcome: Signed16PTLVNumber, translatePayout: Signed16PTLVNumber, a: Signed16PTLVNumber, b: Signed16PTLVNumber, c: Signed16PTLVNumber, d: Signed16PTLVNumber) extends PayoutCurvePieceTLV with Product with Serializable
- case class InitTLV(globalFeatureBytes: ByteVector, featureBytes: ByteVector, initTLVs: Vector[TLV]) extends TLV with Product with Serializable
- See also
https://github.com/lightningnetwork/lightning-rfc/blob/master/01-messaging.md#the-init-message
- 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
- sealed trait MultiOracleInfoTLV extends OracleInfoTLV
- sealed trait NegotiationFieldsTLV extends DLCSetupPieceTLV
- case class NegotiationFieldsV1TLV(roundingIntervalsV0TLV: RoundingIntervalsV0TLV) extends NegotiationFieldsTLV with Product with Serializable
- case class NegotiationFieldsV2TLV(nestedNegotiationFields: Vector[NegotiationFieldsTLV]) extends NegotiationFieldsTLV with Product with Serializable
- case class NormalizedString(str: String) extends NetworkElement with Product with Serializable
- sealed trait NumericDLCOutcomeType extends DLCOutcomeType
- sealed trait NumericEventDescriptorTLV extends EventDescriptorTLV
- case class OldPayoutFunctionV0TLV(points: Vector[OldTLVPoint]) extends DLCSetupPieceTLV with Product with Serializable
- case class OldTLVPoint(outcome: Long, value: Satoshis, extraPrecision: Int, isEndpoint: Boolean) extends NetworkElement with Product with Serializable
- sealed trait OracleAnnouncementTLV extends DLCOracleTLV
- case class OracleAnnouncementV0TLV(announcementSignature: SchnorrDigitalSignature, publicKey: SchnorrPublicKey, eventTLV: OracleEventV0TLV) extends OracleAnnouncementTLV with Product with Serializable
- sealed trait OracleAttestmentTLV extends DLCOracleTLV
- case class OracleAttestmentV0TLV(eventId: NormalizedString, publicKey: SchnorrPublicKey, unsortedSignatures: Vector[SchnorrDigitalSignature], outcomes: Vector[NormalizedString]) extends OracleAttestmentTLV with Product with Serializable
- sealed trait OracleEventTLV extends DLCOracleTLV
- case class OracleEventV0TLV(nonces: Vector[SchnorrNonce], eventMaturityEpoch: UInt32, eventDescriptor: EventDescriptorTLV, eventId: NormalizedString) extends OracleEventTLV with Product with Serializable
- sealed trait OracleInfoTLV extends DLCSetupPieceTLV
- case class OracleInfoV0TLV(announcement: OracleAnnouncementTLV) extends OracleInfoTLV with Product with Serializable
- case class OracleInfoV1TLV(threshold: Int, oracles: OrderedAnnouncements) extends MultiOracleInfoTLV with Product with Serializable
- case class OracleInfoV2TLV(threshold: Int, oracles: OrderedAnnouncements, params: OracleParamsTLV) extends MultiOracleInfoTLV with Product with Serializable
- sealed trait OracleParamsTLV extends DLCSetupPieceTLV
- case class OracleParamsV0TLV(maxErrorExp: Int, minFailExp: Int, maximizeCoverage: Boolean) extends OracleParamsTLV with Product with Serializable
- case class OutgoingCLTVValueTLV(cltv: UInt32) extends TLV with Product with Serializable
- case class PaymentDataTLV(paymentSecret: PaymentSecret, msats: MilliSatoshis) extends TLV with Product with Serializable
- sealed trait PayoutCurvePieceTLV extends DLCSetupPieceTLV
- case class PayoutFunctionV0TLV(endpoints: OrderedTLVPoints, pieces: Vector[PayoutCurvePieceTLV], serializationVersion: DLCSerializationVersion) extends DLCSetupPieceTLV with Product with Serializable
- See also
https://github.com/discreetlogcontracts/dlcspecs/blob/8ee4bbe816c9881c832b1ce320b9f14c72e3506f/NumericOutcome.md#curve-serialization
- case class PingTLV(numPongBytes: UInt16, ignored: ByteVector) extends TLV with Product with Serializable
- case class PolynomialPayoutCurvePieceTLV(midpoints: Vector[TLVPoint]) extends PayoutCurvePieceTLV with Product with Serializable
- case class PongTLV(ignored: ByteVector) extends TLV with Product with Serializable
- case class RoundingIntervalsV0TLV(intervalStarts: Vector[(Long, Satoshis)]) extends DLCSetupPieceTLV with Product with Serializable
- case class SendOfferTLV(peer: NormalizedString, message: NormalizedString, offer: DLCOfferTLV) extends DLCSetupTLV with Product with Serializable
- case class ShortChannelIdTLV(scid: ShortChannelId) extends TLV with Product with Serializable
- case class Signed16PTLVNumber(sign: Boolean, withoutPrecision: Long, extraPrecision: Int) extends NetworkElement with Product with Serializable
- 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
- case class SignedNumericOutcome(positive: Boolean, digits: Vector[Int]) extends NumericDLCOutcomeType with Product with Serializable
An outcome from a multi-nonce signed numeric event type.
An outcome from a multi-nonce signed 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.
I.e. the Vector[Int] is always the most significant digits.
- 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) 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 NumericDLCOutcomeType 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.
I.e. the Vector[Int] is always the most significant digits.
- case class ValueIterator(value: ByteVector) extends Product with Serializable
Value Members
- object AmtToForwardTLV extends Factory[AmtToForwardTLV] with TLVFactory[AmtToForwardTLV] with Serializable
- object CETSignaturesV0TLV extends Factory[CETSignaturesV0TLV] with TLVFactory[CETSignaturesV0TLV] with Serializable
- object ContractDescriptorTLV extends Factory[ContractDescriptorTLV] with TLVParentFactory[ContractDescriptorTLV]
- object ContractDescriptorV0TLV extends Factory[ContractDescriptorV0TLV] with TLVFactory[ContractDescriptorV0TLV] with Serializable
- object ContractDescriptorV1TLV extends Factory[ContractDescriptorV1TLV] with TLVFactory[ContractDescriptorV1TLV] 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 DLCSerializationVersion extends StringFactory[DLCSerializationVersion]
- 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 HyperbolaPayoutCurvePieceTLV extends Factory[HyperbolaPayoutCurvePieceTLV] with TLVFactory[HyperbolaPayoutCurvePieceTLV] with Serializable
- object InitTLV extends Factory[InitTLV] with TLVFactory[InitTLV] with Serializable
- object LnMessage extends Factory[LnMessage[TLV]] with Serializable
- object NegotiationFieldsTLV extends Factory[NegotiationFieldsTLV] with TLVParentFactory[NegotiationFieldsTLV]
- object NegotiationFieldsV1TLV extends Factory[NegotiationFieldsV1TLV] with TLVFactory[NegotiationFieldsV1TLV] with Serializable
- object NegotiationFieldsV2TLV extends Factory[NegotiationFieldsV2TLV] with TLVFactory[NegotiationFieldsV2TLV] with Serializable
- case object NoNegotiationFieldsTLV extends NegotiationFieldsTLV with Product with Serializable
- object NoNegotiationFieldsTLVFactory extends Factory[NoNegotiationFieldsTLV.type] with TLVFactory[NoNegotiationFieldsTLV.type]
- object NormalizedString extends StringFactory[NormalizedString] with Serializable
- object OldTLVPoint extends Factory[OldTLVPoint] with Serializable
- object OracleAnnouncementTLV extends Factory[OracleAnnouncementTLV] with TLVParentFactory[OracleAnnouncementTLV]
- object OracleAnnouncementV0TLV extends Factory[OracleAnnouncementV0TLV] with TLVFactory[OracleAnnouncementV0TLV] with Serializable
- object OracleAttestmentTLV extends Factory[OracleAttestmentTLV] with TLVParentFactory[OracleAttestmentTLV]
- object OracleAttestmentV0TLV extends Factory[OracleAttestmentV0TLV] with TLVFactory[OracleAttestmentV0TLV] 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 OracleInfoV2TLV extends Factory[OracleInfoV2TLV] with TLVFactory[OracleInfoV2TLV] with Serializable
- object OracleParamsV0TLV extends Factory[OracleParamsV0TLV] with TLVFactory[OracleParamsV0TLV] with Serializable
- object OutgoingCLTVValueTLV extends Factory[OutgoingCLTVValueTLV] with TLVFactory[OutgoingCLTVValueTLV] with Serializable
- object PaymentDataTLV extends Factory[PaymentDataTLV] with TLVFactory[PaymentDataTLV] with Serializable
- object PayoutCurvePieceTLV extends Factory[PayoutCurvePieceTLV] with TLVParentFactory[PayoutCurvePieceTLV]
- object PayoutFunctionV0TLV extends Factory[PayoutFunctionV0TLV] with TLVFactory[PayoutFunctionV0TLV] with Serializable
- object PingTLV extends Factory[PingTLV] with TLVFactory[PingTLV] with Serializable
- object PolynomialPayoutCurvePieceTLV extends Factory[PolynomialPayoutCurvePieceTLV] with TLVFactory[PolynomialPayoutCurvePieceTLV] with Serializable
- object PongTLV extends Factory[PongTLV] with TLVFactory[PongTLV] with Serializable
- object RoundingIntervalsV0TLV extends Factory[RoundingIntervalsV0TLV] with TLVFactory[RoundingIntervalsV0TLV] with Serializable
- object SendOfferTLV extends Factory[SendOfferTLV] with TLVFactory[SendOfferTLV] with Serializable
- object ShortChannelIdTLV extends Factory[ShortChannelIdTLV] with TLVFactory[ShortChannelIdTLV] with Serializable
- object Signed16PTLVNumber extends Factory[Signed16PTLVNumber] with Serializable
- object TLV extends Factory[TLV] with TLVParentFactory[TLV]
- object TLVPoint extends Factory[TLVPoint] with Serializable
- object UnknownTLV extends Factory[UnknownTLV] with Serializable