Packages

package models

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. sealed trait AcceptedDLCStatus extends DLCStatus
  2. case class AdaptorPointCETPair(sigPoint: ECPublicKey, wtx: WitnessTransaction) extends Product with Serializable

    An adaptor point and it's corresponding CET

  3. case class CETSignatures(outcomeSigs: Vector[(ECPublicKey, ECAdaptorSignature)]) 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 SignedDLCStatus
  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. trait ContractDescriptorTemplate extends AnyRef
  10. sealed trait ContractInfo extends TLVSerializable[ContractInfoTLV]
  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. 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
  17. sealed trait DLCMessage extends AnyRef
  18. case class DLCPayoutCurve(pieces: OrderedDLCPayoutCurvePieces, serializationVersion: DLCSerializationVersion) extends TLVSerializable[PayoutFunctionV0TLV] with Product with Serializable

    A DLC payout curve defined by piecewise interpolating points

  19. sealed trait DLCPayoutCurvePiece extends TLVSerializable[PayoutCurvePieceTLV]
  20. trait DLCPoint extends AnyRef
  21. sealed trait DLCPolynomialPayoutCurvePiece extends DLCPayoutCurvePiece with TLVSerializable[PolynomialPayoutCurvePieceTLV]

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

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

  28. case class DisjointUnionContractInfo(contracts: Vector[SingleContractInfo]) extends ContractInfo with TLVSerializable[ContractInfoV1TLV] with Product with Serializable
  29. 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

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

  31. sealed trait EnumOracleInfo extends OracleInfo

    Specifies a set of oracles for an Enumerated Outcome DLC

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

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

    Wraps a single oracle signature of an Enum event.

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

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

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

    <invalid inheritdoc annotation>

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

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

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

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

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

  43. sealed trait NumericOracleInfo extends OracleInfo

    Specifies a set of oracles for an Numeric Outcome DLC

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

  45. sealed trait NumericOracleSignatures extends OracleSignatures
  46. 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

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

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

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

  50. sealed trait OracleInfo extends TLVSerializable[OracleInfoTLV]

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

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

  52. sealed trait OracleSignatures extends SeqWrapper[SchnorrDigitalSignature]

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

  53. case class OutcomePayoutConstant(leftEndpoint: OutcomePayoutPoint, rightEndpoint: OutcomePayoutPoint) extends DLCPolynomialPayoutCurvePiece with Product with Serializable
  54. 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

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

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

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

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

  59. case class PayoutAddress(address: BitcoinAddress, isExternal: Boolean) extends Product with Serializable
  60. case class PiecewisePolynomialEndpoint(outcome: Long, payout: BigDecimal) extends PiecewisePolynomialPoint with Product with Serializable
  61. case class PiecewisePolynomialMidpoint(outcome: Long, payout: BigDecimal) extends PiecewisePolynomialPoint with Product with Serializable
  62. sealed trait PiecewisePolynomialPoint extends DLCPoint
  63. case class PutOption(individualCollateral: CurrencyUnit, totalCollateral: CurrencyUnit, numDigits: Int, strikePrice: Long, premium: CurrencyUnit, roundingIntervals: RoundingIntervals) extends OptionTemplate with Product with Serializable

    <invalid inheritdoc annotation>

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

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

    <invalid inheritdoc annotation>

  66. sealed trait SignedDLCStatus extends AcceptedDLCStatus
  67. 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

  68. case class SingleOracleDLCTemplate(oracle: OracleAnnouncementTLV, totalCollateral: CurrencyUnit, contractDescriptor: NumericContractDescriptor) extends DLCTemplate with Product with Serializable
  69. sealed trait SingleOracleInfo extends OracleInfo with TLVSerializable[OracleInfoV0TLV]

    Specifies a single oracles' information through an announcement

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

Value Members

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

Ungrouped