package dlc
- Alphabetic
- Public
- Protected
Type Members
- sealed trait AcceptedDLCStatus extends DLCStatus
- sealed trait BroadcastedDLCStatus extends AcceptedDLCStatus
- case class CETSignatures(outcomeSigs: Vector[(OracleOutcome, ECAdaptorSignature)], refundSig: PartialSignature) extends DLCSignatures with Product with Serializable
- sealed trait ClaimedDLCStatus extends ClosedDLCStatus
- sealed trait ClosedDLCStatus extends BroadcastedDLCStatus
- 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
- case class ContractInfo(totalCollateral: Satoshis, contractOraclePair: ContractOraclePair) extends 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
- 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(prevTx: Transaction, prevTxVout: UInt32, sequence: UInt32, maxWitnessLen: UInt16, redeemScript: WitnessScriptPubKey) extends DLCFundingInput with Product with Serializable
- case class DLCFundingInputP2WPKHV0(prevTx: Transaction, prevTxVout: UInt32, sequence: UInt32) extends DLCFundingInput with Product with Serializable
- case class DLCFundingInputP2WSHV0(prevTx: Transaction, prevTxVout: UInt32, sequence: UInt32, maxWitnessLen: UInt16) extends DLCFundingInput with Product with Serializable
- sealed trait DLCMessage extends AnyRef
- case class DLCPayoutCurve(points: Vector[OutcomePayoutPoint]) extends Product with Serializable
A DLC payout curve defined by piecewise interpolating points
- sealed trait DLCPayoutCurvePiece extends AnyRef
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
- 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 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: Vector[OracleAnnouncementTLV]) 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
- 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: Vector[OracleAnnouncementTLV]) 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: Vector[OracleAnnouncementTLV], 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. - case class NumericOracleSignatures(oracle: NumericSingleOracleInfo, sigs: Vector[SchnorrDigitalSignature]) extends OracleSignatures with Product with Serializable
Wraps a set of oracle signatures of numeric digits.
- 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 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: OutcomePayoutEndpoint, rightEndpoint: OutcomePayoutEndpoint) extends DLCPayoutCurvePiece with Product with Serializable
- case class OutcomePayoutCubic(leftEndpoint: OutcomePayoutEndpoint, leftMidpoint: OutcomePayoutMidpoint, rightMidpoint: OutcomePayoutMidpoint, rightEndpoint: OutcomePayoutEndpoint) extends DLCPayoutCurvePiece with Product with Serializable
A cubic between left and right endpoints defining a piece of a larger payout curve
- case class OutcomePayoutEndpoint(outcome: Long, payout: BigDecimal) extends OutcomePayoutPoint with Product with Serializable
- case class OutcomePayoutLine(leftEndpoint: OutcomePayoutEndpoint, rightEndpoint: OutcomePayoutEndpoint) extends DLCPayoutCurvePiece with Product with Serializable
A Line between left and right endpoints defining a piece of a larger payout curve
- case class OutcomePayoutMidpoint(outcome: Long, payout: BigDecimal) extends OutcomePayoutPoint with Product with Serializable
- sealed trait OutcomePayoutPoint extends AnyRef
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 isEndpoint: True if this point defines a boundary between pieces in the curve
- case class OutcomePayoutPolynomial(points: Vector[OutcomePayoutPoint]) extends DLCPayoutCurvePiece with Product with Serializable
A polynomial interpolating points and defining a piece of a larger payout curve
- case class OutcomePayoutQuadratic(leftEndpoint: OutcomePayoutEndpoint, midpoint: OutcomePayoutMidpoint, rightEndpoint: OutcomePayoutEndpoint) extends DLCPayoutCurvePiece 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 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
- sealed abstract class SigningVersion extends AnyRef
- sealed trait SingleOracleInfo extends OracleInfo with TLVSerializable[OracleInfoV0TLV]
Specifies a single oracles' information through an announcement
Value Members
- object CETCalculator
- object ContractDescriptor extends TLVDeserializable[ContractDescriptorTLV, ContractDescriptor]
- object ContractInfo extends TLVDeserializable[ContractInfoV0TLV, ContractInfo] with Serializable
- object ContractOraclePair
- object DLCFundingInput
- object DLCMessage
- object DLCPayoutCurve extends Serializable
- object DLCPayoutCurvePiece
- object DLCPublicKeys extends Serializable
- object DLCState extends StringFactory[DLCState]
- object DLCStatus
- object DLCTimeouts extends Factory[DLCTimeouts] 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 OutcomePayoutEndpoint extends Serializable
- object OutcomePayoutMidpoint extends Serializable
- object OutcomePayoutPoint
- object RoundingIntervals extends Serializable
- object SigningVersion extends StringFactory[SigningVersion]
- object SingleOracleInfo extends TLVDeserializable[OracleInfoV0TLV, SingleOracleInfo]