Packages

package dlc

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. sealed trait AcceptedDLCStatus extends DLCStatus
  2. sealed trait BroadcastedDLCStatus extends AcceptedDLCStatus
  3. case class CETSignatures(outcomeSigs: Vector[(OracleOutcome, ECAdaptorSignature)], refundSig: PartialSignature) extends DLCSignatures with Product with Serializable
  4. 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

  5. case class CallOption(individualCollateral: CurrencyUnit, totalCollateral: CurrencyUnit, numDigits: Int, strikePrice: Long, premium: CurrencyUnit, roundingIntervals: RoundingIntervals) extends OptionTemplate with Product with Serializable

    <invalid inheritdoc annotation>

  6. sealed trait ClaimedDLCStatus extends ClosedDLCStatus
  7. sealed trait ClosedDLCStatus extends BroadcastedDLCStatus
  8. 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

  9. sealed trait ContractDescriptorTemplate extends AnyRef
  10. 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

  11. 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.

  12. sealed trait DLCFundingInput extends AnyRef
  13. case class DLCFundingInputP2SHSegwit(inputSerialId: UInt64, prevTx: Transaction, prevTxVout: UInt32, sequence: UInt32, maxWitnessLen: UInt16, redeemScript: WitnessScriptPubKey) extends DLCFundingInput with Product with Serializable
  14. case class DLCFundingInputP2WPKHV0(inputSerialId: UInt64, prevTx: Transaction, prevTxVout: UInt32, sequence: UInt32) extends DLCFundingInput with Product with Serializable
  15. case class DLCFundingInputP2WSHV0(inputSerialId: UInt64, prevTx: Transaction, prevTxVout: UInt32, sequence: UInt32, maxWitnessLen: UInt16) extends DLCFundingInput with Product with Serializable
  16. sealed trait DLCMessage extends AnyRef
  17. case class DLCPayoutCurve(points: Vector[OutcomePayoutPoint]) extends Product with Serializable

    A DLC payout curve defined by piecewise interpolating points

  18. sealed trait DLCPayoutCurvePiece extends AnyRef

    A single piece of a larger piecewise function defined between left and right endpoints

  19. case class DLCPublicKeys(fundingKey: ECPublicKey, payoutAddress: BitcoinAddress) extends Product with Serializable
  20. sealed trait DLCSignatures extends AnyRef
  21. sealed abstract class DLCState extends AnyRef
  22. sealed trait DLCStatus extends AnyRef
  23. sealed trait DLCTemplate extends AnyRef
  24. 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

  25. 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

  26. 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.

  27. sealed trait EnumOracleInfo extends OracleInfo

    Specifies a set of oracles for an Enumerated Outcome DLC

  28. 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.

  29. case class EnumOracleSignature(oracle: EnumSingleOracleInfo, sig: SchnorrDigitalSignature) extends OracleSignatures with Product with Serializable

    Wraps a single oracle signature of an Enum event.

  30. 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

  31. 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.

  32. case class FundingSignatures(sigs: Vector[(TransactionOutPoint, ScriptWitnessV0)]) extends SeqWrapper[(TransactionOutPoint, ScriptWitnessV0)] with DLCSignatures with Product with Serializable
  33. case class LongCFD(individualCollateral: CurrencyUnit, totalCollateral: CurrencyUnit, numDigits: Int, strikePrice: Long, roundingIntervals: RoundingIntervals) extends CFDTemplate with Product with Serializable

    <invalid inheritdoc annotation>

  34. case class MultiOracleDLCTemplate(oracles: Vector[OracleAnnouncementTLV], oracleThreshold: Int, maxErrorExp: Int, minFailExp: Int, maximizeCoverage: Boolean, totalCollateral: CurrencyUnit, contractDescriptor: NumericContractDescriptor) extends DLCTemplate with Product with Serializable
  35. sealed trait MultiOracleInfo[+T <: SingleOracleInfo] extends OracleInfo with TLVSerializable[MultiOracleInfoTLV]

    Represents the oracle information for more than one oracle through multiple announcements.

  36. 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.

  37. 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.

  38. 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.

  39. sealed trait NumericOracleInfo extends OracleInfo

    Specifies a set of oracles for an Numeric Outcome DLC

  40. 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.

  41. case class NumericOracleSignatures(oracle: NumericSingleOracleInfo, sigs: Vector[SchnorrDigitalSignature]) extends OracleSignatures with Product with Serializable

    Wraps a set of oracle signatures of numeric digits.

  42. 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

  43. 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

  44. sealed trait OracleInfo extends TLVSerializable[OracleInfoTLV]

    Specifies the set of oracles and their corresponding announcements and parameters to be used in a DLC.

  45. 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).

  46. sealed trait OracleSignatures extends SeqWrapper[SchnorrDigitalSignature]

    Corresponds to a set of SchnorrDigitalSignatures given by a single oracle.

  47. case class OutcomeCETPair(outcome: OracleOutcome, wtx: WitnessTransaction) extends Product with Serializable

    An oracle outcome and it's corresponding CET

  48. case class OutcomePayoutConstant(leftEndpoint: OutcomePayoutEndpoint, rightEndpoint: OutcomePayoutEndpoint) extends DLCPayoutCurvePiece with Product with Serializable
  49. 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

  50. case class OutcomePayoutEndpoint(outcome: Long, payout: BigDecimal) extends OutcomePayoutPoint with Product with Serializable
  51. 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

  52. case class OutcomePayoutMidpoint(outcome: Long, payout: BigDecimal) extends OutcomePayoutPoint with Product with Serializable
  53. 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

  54. 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

  55. 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

  56. case class PutOption(individualCollateral: CurrencyUnit, totalCollateral: CurrencyUnit, numDigits: Int, strikePrice: Long, premium: CurrencyUnit, roundingIntervals: RoundingIntervals) extends OptionTemplate with Product with Serializable

    <invalid inheritdoc annotation>

  57. 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

  58. case class ShortCFD(individualCollateral: CurrencyUnit, totalCollateral: CurrencyUnit, numDigits: Int, strikePrice: Long, roundingIntervals: RoundingIntervals) extends CFDTemplate with Product with Serializable

    <invalid inheritdoc annotation>

  59. case class SigPointComputer(computeSigPoint: () => ECPublicKey) extends Product with Serializable
  60. sealed abstract class SigningVersion extends AnyRef
  61. case class SingleOracleDLCTemplate(oracle: OracleAnnouncementTLV, totalCollateral: CurrencyUnit, contractDescriptor: NumericContractDescriptor) extends DLCTemplate with Product with Serializable
  62. sealed trait SingleOracleInfo extends OracleInfo with TLVSerializable[OracleInfoV0TLV]

    Specifies a single oracles' information through an announcement

  63. case class SpendingInfoWithSerialId(spendingInfo: ScriptSignatureParams[InputInfo], serialId: UInt64) extends Product with Serializable

Value Members

  1. object CETCalculator
  2. object ContractDescriptor extends TLVDeserializable[ContractDescriptorTLV, ContractDescriptor]
  3. object ContractInfo extends TLVDeserializable[ContractInfoV0TLV, ContractInfo] with Serializable
  4. object ContractOraclePair
  5. object DLCFundingInput
  6. object DLCMessage
  7. object DLCPayoutCurve extends Serializable
  8. object DLCPayoutCurvePiece
  9. object DLCPublicKeys extends Serializable
  10. object DLCState extends StringFactory[DLCState]
  11. object DLCStatus
  12. object DLCTemplate
  13. object DLCTimeouts extends Factory[DLCTimeouts] with Serializable
  14. object DLCUtil
  15. object EnumContractDescriptor extends TLVDeserializable[ContractDescriptorV0TLV, EnumContractDescriptor] with Serializable
  16. object EnumSingleOracleInfo extends TLVDeserializable[OracleInfoV0TLV, EnumSingleOracleInfo] with Serializable
  17. object ExactMultiOracleInfo extends TLVDeserializable[OracleInfoV1TLV, ExactMultiOracleInfo[SingleOracleInfo]]
  18. object NumericContractDescriptor extends TLVDeserializable[ContractDescriptorV1TLV, NumericContractDescriptor] with Serializable
  19. object NumericMultiOracleInfo extends TLVDeserializable[OracleInfoV2TLV, NumericMultiOracleInfo] with Serializable
  20. object NumericOracleOutcome extends Serializable
  21. object NumericSingleOracleInfo extends Serializable
  22. object OracleInfo extends TLVDeserializable[OracleInfoTLV, OracleInfo]
  23. object OracleSignatures
  24. object OutcomePayoutEndpoint extends Serializable
  25. object OutcomePayoutMidpoint extends Serializable
  26. object OutcomePayoutPoint
  27. object RoundingIntervals extends Serializable
  28. object SigningVersion extends StringFactory[SigningVersion]
  29. object SingleOracleInfo extends TLVDeserializable[OracleInfoV0TLV, SingleOracleInfo]

Ungrouped