package models
- Alphabetic
- Public
- Protected
Type Members
- sealed trait AcceptedDLCStatus extends DLCStatus
- case class AdaptorPointCETPair(sigPoint: ECPublicKey, wtx: WitnessTransaction) extends Product with Serializable
An adaptor point and it's corresponding CET
- case class CETSignatures(outcomeSigs: Vector[(ECPublicKey, ECAdaptorSignature)]) extends DLCSignatures with Product with Serializable
- sealed trait CFDTemplate extends ContractDescriptorTemplate
A template for creating a Contract For Difference DLC
A template for creating a Contract For Difference DLC
- See also
https://www.investopedia.com/terms/c/contractfordifferences.asp
- case class CallOption(individualCollateral: CurrencyUnit, totalCollateral: CurrencyUnit, numDigits: Int, strikePrice: Long, premium: CurrencyUnit, roundingIntervals: RoundingIntervals) extends OptionTemplate with Product with Serializable
<invalid inheritdoc annotation>
- sealed trait ClaimedDLCStatus extends ClosedDLCStatus
- sealed trait ClosedDLCStatus extends SignedDLCStatus
- sealed trait ContractDescriptor extends TLVSerializable[ContractDescriptorTLV]
Fully determines a set of payouts for a DLC.
Fully determines a set of payouts for a DLC. These payouts are normally from the point of view of the offerer, from which the accepter's payouts can be determined by subtracting from totalCollateral.
Payouts above totalCollateral may be subject to change as totalCollateral does not exist in a ContractDescriptor, which is reusable between DLCs.
- See also
https://github.com/discreetlogcontracts/dlcspecs/blob/a8876ed28ed33d5f7d5104f01aa2a8d80d128460/Messaging.md#version-1-contract_descriptor
- trait ContractDescriptorTemplate extends AnyRef
- sealed trait ContractInfo extends TLVSerializable[ContractInfoTLV]
- sealed trait ContractOraclePair extends AnyRef
A pair of ContractDescriptor and OracleInfo This type is meant to ensure consistentcy between various ContractDescriptor and OracleInfo so that you cannot have an incorrect pairing.
- sealed trait DLCFundingInput extends AnyRef
- case class DLCFundingInputP2SHSegwit(inputSerialId: UInt64, prevTx: Transaction, prevTxVout: UInt32, sequence: UInt32, maxWitnessLen: UInt16, redeemScript: WitnessScriptPubKey) extends DLCFundingInput with Product with Serializable
- case class DLCFundingInputP2WPKHV0(inputSerialId: UInt64, prevTx: Transaction, prevTxVout: UInt32, sequence: UInt32) extends DLCFundingInput with Product with Serializable
- case class DLCFundingInputP2WSHV0(inputSerialId: UInt64, prevTx: Transaction, prevTxVout: UInt32, sequence: UInt32, maxWitnessLen: UInt16) extends DLCFundingInput with Product with Serializable
- case class DLCHyperbolaPayoutCurvePiece(usePositivePiece: Boolean, translateOutcome: BigDecimal, translatePayout: BigDecimal, a: BigDecimal, b: BigDecimal, c: BigDecimal, d: BigDecimal, leftEndpoint: OutcomePayoutPoint, rightEndpoint: OutcomePayoutPoint) extends DLCPayoutCurvePiece with TLVSerializable[HyperbolaPayoutCurvePieceTLV] with Product with Serializable
- sealed trait DLCMessage extends AnyRef
- case class DLCPayoutCurve(pieces: OrderedDLCPayoutCurvePieces, serializationVersion: DLCSerializationVersion) extends TLVSerializable[PayoutFunctionV0TLV] with Product with Serializable
A DLC payout curve defined by piecewise interpolating points
- sealed trait DLCPayoutCurvePiece extends TLVSerializable[PayoutCurvePieceTLV]
- trait DLCPoint extends AnyRef
- sealed trait DLCPolynomialPayoutCurvePiece extends DLCPayoutCurvePiece with TLVSerializable[PolynomialPayoutCurvePieceTLV]
A single piece of a larger piecewise function defined between left and right endpoints
- case class DLCPublicKeys(fundingKey: ECPublicKey, payoutAddress: BitcoinAddress) extends Product with Serializable
- sealed trait DLCSignatures extends AnyRef
- sealed abstract class DLCState extends AnyRef
- sealed trait DLCStatus extends AnyRef
- sealed trait DLCTemplate extends AnyRef
- case class DLCTimeouts(contractMaturity: BlockTimeStamp, contractTimeout: BlockTimeStamp) extends NetworkElement with Product with Serializable
- contractMaturity
The CLTV in milliseconds when a signature is expected
- contractTimeout
The CLTV timeout in milliseconds after which the refund tx is valid
- case class DisjointUnionContractInfo(contracts: Vector[SingleContractInfo]) extends ContractInfo with TLVSerializable[ContractInfoV1TLV] with Product with Serializable
- case class EnumContractDescriptor(outcomeValueMap: Vector[(EnumOutcome, Satoshis)]) extends ContractDescriptor with TLVSerializable[ContractDescriptorV0TLV] with SeqWrapper[(EnumOutcome, Satoshis)] with Product with Serializable
The ContractDescriptor for enumerated outcome DLCs
- case class EnumMultiOracleInfo(threshold: Int, announcements: OrderedAnnouncements) extends ExactMultiOracleInfo[EnumSingleOracleInfo] with EnumOracleInfo with Product with Serializable
Represents the oracle information for more than one oracle where all oracles sign exactly corresponding messages from isomorphic Enums.
- sealed trait EnumOracleInfo extends OracleInfo
Specifies a set of oracles for an Enumerated Outcome DLC
- case class EnumOracleOutcome(oracles: Vector[EnumSingleOracleInfo], outcome: EnumOutcome) extends OracleOutcome with Product with Serializable
Corresponds to a CET in an Enumerated Outcome DLC where some set of
threshold
oracles have signed a given EnumOutcome. - case class EnumOracleSignature(oracle: EnumSingleOracleInfo, sig: SchnorrDigitalSignature) extends OracleSignatures with Product with Serializable
Wraps a single oracle signature of an Enum event.
- case class EnumSingleOracleInfo(announcement: OracleAnnouncementTLV) extends SingleOracleInfo with EnumOracleInfo with Product with Serializable
Specifies a single oracles' information for an Enumerated Outcome DLC through an announcement
- sealed trait ExactMultiOracleInfo[+T <: SingleOracleInfo] extends MultiOracleInfo[T] with TLVSerializable[OracleInfoV1TLV]
Represents the oracle information for more than one oracle where all oracles sign exactly corresponding messages.
- case class FundingSignatures(sigs: Vector[(TransactionOutPoint, ScriptWitnessV0)]) extends SeqWrapper[(TransactionOutPoint, ScriptWitnessV0)] with DLCSignatures with Product with Serializable
- case class LongCFD(individualCollateral: CurrencyUnit, totalCollateral: CurrencyUnit, numDigits: Int, strikePrice: Long, roundingIntervals: RoundingIntervals) extends CFDTemplate with Product with Serializable
<invalid inheritdoc annotation>
- case class MultiOracleDLCTemplate(oracles: Vector[OracleAnnouncementTLV], oracleThreshold: Int, maxErrorExp: Int, minFailExp: Int, maximizeCoverage: Boolean, totalCollateral: CurrencyUnit, contractDescriptor: NumericContractDescriptor) extends DLCTemplate with Product with Serializable
- sealed trait MultiOracleInfo[+T <: SingleOracleInfo] extends OracleInfo with TLVSerializable[MultiOracleInfoTLV]
Represents the oracle information for more than one oracle through multiple announcements.
- case class NumericContractDescriptor(outcomeValueFunc: DLCPayoutCurve, numDigits: Int, roundingIntervals: RoundingIntervals) extends ContractDescriptor with TLVSerializable[ContractDescriptorV1TLV] with Product with Serializable
The ContractDescriptor for enumerated outcome DLCs
The ContractDescriptor for enumerated outcome DLCs
Contains a deterministically compressed set of outcomes computed by interpolation of a given payout curve.
- case class NumericExactMultiOracleInfo(threshold: Int, announcements: OrderedAnnouncements) extends ExactMultiOracleInfo[NumericSingleOracleInfo] with NumericOracleInfo with Product with Serializable
Represents the oracle information for more than one oracle where all oracles sign exactly equal numeric outcomes.
- case class NumericMultiOracleInfo(threshold: Int, announcements: OrderedAnnouncements, maxErrorExp: Int, minFailExp: Int, maximizeCoverage: Boolean) extends MultiOracleInfo[NumericSingleOracleInfo] with TLVSerializable[OracleInfoV2TLV] with NumericOracleInfo with Product with Serializable
Represents the oracle information and parameters for more than one oracle where the oracles may be signing slightly different numeric outcomes.
- sealed trait NumericOracleInfo extends OracleInfo
Specifies a set of oracles for an Numeric Outcome DLC
- case class NumericOracleOutcome(oraclesAndOutcomes: Vector[(NumericSingleOracleInfo, UnsignedNumericOutcome)]) extends OracleOutcome with Product with Serializable
Corresponds to a CET in an Numeric Outcome DLC where some set of
threshold
oracles have each signed some NumericOutcome. - sealed trait NumericOracleSignatures extends OracleSignatures
- case class NumericOracleSignaturesSorted(oracle: NumericSingleOracleInfo, sortedSignatures: OrderedSchnorrSignatures) extends NumericOracleSignatures with Product with Serializable
Wraps a set of oracle signatures of numeric digits that are sorted by nonces
- case class NumericOracleSignaturesUnsorted(oracle: NumericSingleOracleInfo, sigs: Vector[SchnorrDigitalSignature]) extends NumericOracleSignatures with Product with Serializable
Numeric oracle signatures that are not sorted by their nonce.
Numeric oracle signatures that are not sorted by their nonce. This is needed for v0 attestations
- case class NumericSingleOracleInfo(announcement: OracleAnnouncementTLV) extends SingleOracleInfo with NumericOracleInfo with Product with Serializable
Specifies a single oracles' information for an Numeric Outcome DLC through an announcement
- sealed trait OptionTemplate extends ContractDescriptorTemplate
A template for doing an options contract DLC
A template for doing an options contract DLC
- See also
https://www.investopedia.com/terms/o/optionscontract.asp
- sealed trait OracleInfo extends TLVSerializable[OracleInfoTLV]
Specifies the set of oracles and their corresponding announcements and parameters to be used in a DLC.
- sealed trait OracleOutcome extends AnyRef
OracleOutcomes are in one-to-one correspondence with Contract Execution Transactions (CETs) and are defined by a set of oracles needed to execute with a given CET, representing a certain outcome and using a certain signature point (aka adaptor point).
- sealed trait OracleSignatures extends SeqWrapper[SchnorrDigitalSignature]
Corresponds to a set of SchnorrDigitalSignatures given by a single oracle.
- case class OutcomePayoutConstant(leftEndpoint: OutcomePayoutPoint, rightEndpoint: OutcomePayoutPoint) extends DLCPolynomialPayoutCurvePiece with Product with Serializable
- case class OutcomePayoutCubic(leftEndpoint: OutcomePayoutPoint, leftMidpoint: OutcomePayoutPoint, rightMidpoint: OutcomePayoutPoint, rightEndpoint: OutcomePayoutPoint) extends DLCPolynomialPayoutCurvePiece with Product with Serializable
A cubic between left and right endpoints defining a piece of a larger payout curve
- case class OutcomePayoutLine(leftEndpoint: OutcomePayoutPoint, rightEndpoint: OutcomePayoutPoint) extends DLCPolynomialPayoutCurvePiece with Product with Serializable
A Line between left and right endpoints defining a piece of a larger payout curve
- case class OutcomePayoutPoint(outcome: Long, payout: BigDecimal) extends DLCPoint with Product with Serializable
A point on a DLC payout curve to be used for interpolation
A point on a DLC payout curve to be used for interpolation
outcome: An element of the domain of possible events signed by the oracle payout: The payout to the local party corresponding to outcome
- case class OutcomePayoutPolynomial(points: Vector[OutcomePayoutPoint]) extends DLCPolynomialPayoutCurvePiece with Product with Serializable
A polynomial interpolating points and defining a piece of a larger payout curve
- case class OutcomePayoutQuadratic(leftEndpoint: OutcomePayoutPoint, midpoint: OutcomePayoutPoint, rightEndpoint: OutcomePayoutPoint) extends DLCPolynomialPayoutCurvePiece with Product with Serializable
A quadratic between left and right endpoints defining a piece of a larger payout curve.
A quadratic between left and right endpoints defining a piece of a larger payout curve. A quadratic equation defines a parabola: https://en.wikipedia.org/wiki/Quadratic_function
- case class PayoutAddress(address: BitcoinAddress, isExternal: Boolean) extends Product with Serializable
- case class PiecewisePolynomialEndpoint(outcome: Long, payout: BigDecimal) extends PiecewisePolynomialPoint with Product with Serializable
- case class PiecewisePolynomialMidpoint(outcome: Long, payout: BigDecimal) extends PiecewisePolynomialPoint with Product with Serializable
- sealed trait PiecewisePolynomialPoint extends DLCPoint
- case class PutOption(individualCollateral: CurrencyUnit, totalCollateral: CurrencyUnit, numDigits: Int, strikePrice: Long, premium: CurrencyUnit, roundingIntervals: RoundingIntervals) extends OptionTemplate with Product with Serializable
<invalid inheritdoc annotation>
- case class RoundingIntervals(intervalStarts: Vector[IntervalStart]) extends Product with Serializable
Specifies a list of intervals with corresponding rounding moduli.
Specifies a list of intervals with corresponding rounding moduli. In particular, each element (outcome, roundingMod) of intervalStarts represents the beginning of a new interval at outcome with new modulus roundingMod.
- See also
https://github.com/discreetlogcontracts/dlcspecs/blob/8ee4bbe816c9881c832b1ce320b9f14c72e3506f/NumericOutcome.md#rounding-intervals
- case class ShortCFD(individualCollateral: CurrencyUnit, totalCollateral: CurrencyUnit, numDigits: Int, strikePrice: Long, roundingIntervals: RoundingIntervals) extends CFDTemplate with Product with Serializable
<invalid inheritdoc annotation>
- sealed trait SignedDLCStatus extends AcceptedDLCStatus
- case class SingleContractInfo(totalCollateral: Satoshis, contractOraclePair: ContractOraclePair) extends ContractInfo with TLVSerializable[ContractInfoV0TLV] with Product with Serializable
Fully determines a DLC up to public keys and funding UTXOs to be used.
Fully determines a DLC up to public keys and funding UTXOs to be used.
Contains all contract and oracle information and provides an external facing interface which should be used in place of directly accessing ContractDescriptors or OracleInfos whenever possible to make future refactoring simpler and to make the code more modular.
This class also contains lazy vals for all expensive computations done regarding CETs during DLC setup and execution.
- See also
https://github.com/discreetlogcontracts/dlcspecs/blob/a8876ed28ed33d5f7d5104f01aa2a8d80d128460/Messaging.md#the-contract_info-type
- case class SingleOracleDLCTemplate(oracle: OracleAnnouncementTLV, totalCollateral: CurrencyUnit, contractDescriptor: NumericContractDescriptor) extends DLCTemplate with Product with Serializable
- sealed trait SingleOracleInfo extends OracleInfo with TLVSerializable[OracleInfoV0TLV]
Specifies a single oracles' information through an announcement
- case class SpendingInfoWithSerialId(spendingInfo: ScriptSignatureParams[InputInfo], serialId: UInt64) extends Product with Serializable
Value Members
- object ContractDescriptor extends TLVDeserializable[ContractDescriptorTLV, ContractDescriptor]
- object ContractInfo extends TLVDeserializable[ContractInfoTLV, ContractInfo]
- object ContractOraclePair
- object DLCFundingInput
- object DLCHyperbolaPayoutCurvePiece extends Serializable
- object DLCMessage
- object DLCPayoutCurve extends TLVDeserializable[PayoutFunctionV0TLV, DLCPayoutCurve] with Serializable
- object DLCPayoutCurvePiece
- object DLCPolynomialPayoutCurvePiece
- object DLCPublicKeys extends Serializable
- object DLCState extends StringFactory[DLCState]
- object DLCStatus
- object DLCTemplate
- object DLCTimeouts extends Factory[DLCTimeouts] with Serializable
- object DisjointUnionContractInfo extends TLVDeserializable[ContractInfoV1TLV, DisjointUnionContractInfo] with Serializable
- object EnumContractDescriptor extends TLVDeserializable[ContractDescriptorV0TLV, EnumContractDescriptor] with Serializable
- object EnumSingleOracleInfo extends TLVDeserializable[OracleInfoV0TLV, EnumSingleOracleInfo] with Serializable
- object ExactMultiOracleInfo extends TLVDeserializable[OracleInfoV1TLV, ExactMultiOracleInfo[SingleOracleInfo]]
- object NumericContractDescriptor extends TLVDeserializable[ContractDescriptorV1TLV, NumericContractDescriptor] with Serializable
- object NumericMultiOracleInfo extends TLVDeserializable[OracleInfoV2TLV, NumericMultiOracleInfo] with Serializable
- object NumericOracleOutcome extends Serializable
- object NumericSingleOracleInfo extends Serializable
- object OracleInfo extends TLVDeserializable[OracleInfoTLV, OracleInfo]
- object OracleSignatures
- object OutcomePayoutPoint extends Serializable
- object PiecewisePolynomialEndpoint extends Serializable
- object PiecewisePolynomialMidpoint extends Serializable
- object PiecewisePolynomialPoint
- object RoundingIntervals extends Serializable
- object SingleContractInfo extends TLVDeserializable[ContractInfoV0TLV, SingleContractInfo] with Serializable
- object SingleOracleInfo extends TLVDeserializable[OracleInfoV0TLV, SingleOracleInfo]