Packages

trait DLCTest extends AnyRef

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DLCTest
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. sealed trait ContractParams extends AnyRef
  2. case class DisjointUnionContractParams(singleParams: Vector[SingleContractParams]) extends ContractParams with Product with Serializable
  3. case class EnumContractParams(numOutcomes: Int, oracleThreshold: Int, numOracles: Int) extends SingleContractParams with Product with Serializable
  4. case class NumericContractParams(numDigits: Int, oracleThreshold: Int, numOracles: Int, paramsOpt: Option[OracleParamsV0TLV] = None) extends SingleContractParams with Product with Serializable
  5. sealed trait SingleContractParams extends ContractParams

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val acceptAddress: BitcoinAddress
  5. val acceptAddress2: BitcoinAddress
  6. val acceptChangeSPK: P2WPKHWitnessSPKV0
  7. val acceptChangeSerialId: UInt64
  8. val acceptFundingInputs: Vector[DLCFundingInput]
  9. val acceptFundingPrivKey: ECPrivateKey
  10. val acceptFundingTx: Transaction
  11. val acceptFundingTx2: Transaction
  12. val acceptFundingUtxos: Vector[SpendingInfoWithSerialId]
  13. val acceptInput: CurrencyUnit
  14. val acceptNestedSPK: MultiSignatureScriptPubKey
  15. val acceptPayoutPrivKey: ECPrivateKey
  16. val acceptPayoutSerialId: UInt64
  17. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  18. def assertCorrectSigDerivation(offerSetup: SetupDLC, dlcOffer: TestDLCClient, acceptSetup: SetupDLC, dlcAccept: TestDLCClient, oracleSigs: Vector[OracleSignatures], outcome: OracleOutcome)(implicit ec: ExecutionContext): Future[Assertion]
  19. val blockTimeToday: BlockTime
  20. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  21. def computeNumericOracleSignatures(digits: Vector[Int], privKey: ECPrivateKey = oraclePrivKey, kVals: Vector[ECPrivateKey] = preCommittedKs): OrderedSchnorrSignatures

    Computes an oracle signatures for the given outcome and oracle

  22. def computeNumericOutcome(numDigits: Int, desc: NumericContractDescriptor, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long): Vector[Int]

    Deterministically chooses an outcome from the middle third of the interesting possible outcomes.

  23. def constructAndSetupDLC(contractParams: ContractParams)(implicit ec: ExecutionContext): Future[(TestDLCClient, SetupDLC, TestDLCClient, SetupDLC, Vector[DLCOutcomeType])]
  24. def constructDLCClients(contractParams: ContractParams, offerFundingPrivKey: ECPrivateKey = this.offerFundingPrivKey, offerPayoutPrivKey: ECPrivateKey = this.offerPayoutPrivKey, acceptFundingPrivKey: ECPrivateKey = this.acceptFundingPrivKey, acceptPayoutPrivKey: ECPrivateKey = this.acceptPayoutPrivKey, offerFundingUtxos: Vector[SpendingInfoWithSerialId] = this.offerFundingUtxos, offerFundingInputs: Vector[DLCFundingInput] = this.offerFundingInputs, acceptFundingUtxos: Vector[SpendingInfoWithSerialId] = this.acceptFundingUtxos, acceptFundingInputs: Vector[DLCFundingInput] = this.acceptFundingInputs, feeRate: SatoshisPerVirtualByte = this.feeRate, timeouts: DLCTimeouts = this.timeouts)(implicit ec: ExecutionContext): (TestDLCClient, TestDLCClient, Vector[DLCOutcomeType])
  25. def constructDLCClientsFromInfos(offerInfo: ContractInfo, acceptInfo: ContractInfo, offerFundingPrivKey: ECPrivateKey = this.offerFundingPrivKey, offerPayoutPrivKey: ECPrivateKey = this.offerPayoutPrivKey, acceptFundingPrivKey: ECPrivateKey = this.acceptFundingPrivKey, acceptPayoutPrivKey: ECPrivateKey = this.acceptPayoutPrivKey, offerFundingUtxos: Vector[SpendingInfoWithSerialId] = this.offerFundingUtxos, offerFundingInputs: Vector[DLCFundingInput] = this.offerFundingInputs, acceptFundingUtxos: Vector[SpendingInfoWithSerialId] = this.acceptFundingUtxos, acceptFundingInputs: Vector[DLCFundingInput] = this.acceptFundingInputs, feeRate: SatoshisPerVirtualByte = this.feeRate, timeouts: DLCTimeouts = this.timeouts)(implicit ec: ExecutionContext): (TestDLCClient, TestDLCClient)
  26. def constructDisjointUnionDLCClients(contractParams: DisjointUnionContractParams, offerFundingPrivKey: ECPrivateKey = this.offerFundingPrivKey, offerPayoutPrivKey: ECPrivateKey = this.offerPayoutPrivKey, acceptFundingPrivKey: ECPrivateKey = this.acceptFundingPrivKey, acceptPayoutPrivKey: ECPrivateKey = this.acceptPayoutPrivKey, offerFundingUtxos: Vector[SpendingInfoWithSerialId] = this.offerFundingUtxos, offerFundingInputs: Vector[DLCFundingInput] = this.offerFundingInputs, acceptFundingUtxos: Vector[SpendingInfoWithSerialId] = this.acceptFundingUtxos, acceptFundingInputs: Vector[DLCFundingInput] = this.acceptFundingInputs, feeRate: SatoshisPerVirtualByte = this.feeRate, timeouts: DLCTimeouts = this.timeouts)(implicit ec: ExecutionContext): (TestDLCClient, TestDLCClient, Vector[DLCOutcomeType])
  27. def constructEnumContractInfos(params: EnumContractParams, oracleShift: Int = 0): (SingleContractInfo, SingleContractInfo)
  28. def constructEnumDLCClients(contractParams: EnumContractParams, offerFundingPrivKey: ECPrivateKey = this.offerFundingPrivKey, offerPayoutPrivKey: ECPrivateKey = this.offerPayoutPrivKey, acceptFundingPrivKey: ECPrivateKey = this.acceptFundingPrivKey, acceptPayoutPrivKey: ECPrivateKey = this.acceptPayoutPrivKey, offerFundingUtxos: Vector[SpendingInfoWithSerialId] = this.offerFundingUtxos, offerFundingInputs: Vector[DLCFundingInput] = this.offerFundingInputs, acceptFundingUtxos: Vector[SpendingInfoWithSerialId] = this.acceptFundingUtxos, acceptFundingInputs: Vector[DLCFundingInput] = this.acceptFundingInputs, feeRate: SatoshisPerVirtualByte = this.feeRate, timeouts: DLCTimeouts = this.timeouts)(implicit ec: ExecutionContext): (TestDLCClient, TestDLCClient, Vector[EnumOutcome])
  29. def constructNumericContractInfos(params: NumericContractParams, oracleShift: Int = 0): (SingleContractInfo, SingleContractInfo)
  30. def constructNumericDLCClients(contractParams: NumericContractParams, offerFundingPrivKey: ECPrivateKey = this.offerFundingPrivKey, offerPayoutPrivKey: ECPrivateKey = this.offerPayoutPrivKey, acceptFundingPrivKey: ECPrivateKey = this.acceptFundingPrivKey, acceptPayoutPrivKey: ECPrivateKey = this.acceptPayoutPrivKey, offerFundingUtxos: Vector[SpendingInfoWithSerialId] = this.offerFundingUtxos, offerFundingInputs: Vector[DLCFundingInput] = this.offerFundingInputs, acceptFundingUtxos: Vector[SpendingInfoWithSerialId] = this.acceptFundingUtxos, acceptFundingInputs: Vector[DLCFundingInput] = this.acceptFundingInputs, feeRate: SatoshisPerVirtualByte = this.feeRate, timeouts: DLCTimeouts = this.timeouts)(implicit ec: ExecutionContext): (TestDLCClient, TestDLCClient, Vector[UnsignedNumericOutcome])
  31. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  33. def executeForCase(contractIndex: Int, outcomeIndex: Long, contractParams: ContractParams)(implicit ec: ExecutionContext): Future[Assertion]
  34. def executeForCase(outcomeIndex: Long, contractParams: ContractParams)(implicit ec: ExecutionContext): Future[Assertion]
  35. def executeForCases(outcomeIndices: Vector[Long], contractParams: ContractParams)(implicit ec: ExecutionContext): Future[Assertion]
  36. def executeForCasesInUnion(outcomeIndices: Vector[(Int, Long)], contractParams: ContractParams)(implicit ec: ExecutionContext): Future[Assertion]
  37. def executeForOutcome(outcomeIndex: Long, dlcOffer: TestDLCClient, offerSetup: SetupDLC, dlcAccept: TestDLCClient, acceptSetup: SetupDLC, outcomes: Vector[DLCOutcomeType], contractIndex: Int = 0)(implicit ec: ExecutionContext): Future[Assertion]
  38. def executeRefundCase(contractParams: ContractParams)(implicit ec: ExecutionContext): Future[Assertion]
  39. val feeRate: SatoshisPerVirtualByte
  40. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  41. val fundOutputSerialId: UInt64
  42. def genEnumOracleOutcome(chosenOracles: Vector[Int], contractInfo: SingleContractInfo, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long): EnumOracleOutcome
  43. def genEnumOracleSignature(oracleInfo: EnumSingleOracleInfo, outcome: String, privKey: ECPrivateKey = oraclePrivKey, kVal: ECPrivateKey = preCommittedK): EnumOracleSignature

    Computes an EnumOracleSignature for the given outcome and oracle

  44. def genEnumOracleSignatures(chosenOracles: Vector[Int], contractInfo: SingleContractInfo, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long): Vector[EnumOracleSignature]
  45. def genEnumOracleSignatures(outcome: EnumOracleOutcome): Vector[EnumOracleSignature]
  46. def genNumericOracleOutcome(numDigits: Int, chosenOracles: Vector[Int], contractInfo: SingleContractInfo, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long, paramsOpt: Option[OracleParamsV0TLV]): NumericOracleOutcome
  47. def genNumericOracleOutcome(chosenOracles: Vector[Int], contractInfo: ContractInfo, digits: Vector[Int], paramsOpt: Option[OracleParamsV0TLV]): NumericOracleOutcome
  48. def genNumericOracleSignatures(numDigits: Int, chosenOracles: Vector[Int], contractInfo: SingleContractInfo, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long, paramsOpt: Option[OracleParamsV0TLV]): Vector[NumericOracleSignatures]
  49. def genNumericOracleSignatures(outcome: NumericOracleOutcome): Vector[NumericOracleSignatures]
  50. def genOracleOutcome(numOutcomesOrDigits: Int, isNumeric: Boolean, contractInfo: SingleContractInfo, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long, paramsOpt: Option[OracleParamsV0TLV]): OracleOutcome
  51. def genOracleOutcomeAndSignatures(numOutcomesOrDigits: Int, isNumeric: Boolean, contractInfo: SingleContractInfo, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long, paramsOpt: Option[OracleParamsV0TLV]): (OracleOutcome, Vector[OracleSignatures])
  52. def genOracleSignatures(numOutcomesOrDigits: Int, isNumeric: Boolean, contractInfo: SingleContractInfo, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long, paramsOpt: Option[OracleParamsV0TLV]): Vector[OracleSignatures]
  53. def genOracleSignatures(outcome: OracleOutcome): Vector[OracleSignatures]
  54. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  55. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  56. val inputPrivKeyAccept: ECPrivateKey
  57. val inputPrivKeyAccept2A: ECPrivateKey
  58. val inputPrivKeyAccept2B: ECPrivateKey
  59. val inputPrivKeyOffer: ECPrivateKey
  60. val inputPrivKeyOffer2A: ECPrivateKey
  61. val inputPrivKeyOffer2B: ECPrivateKey
  62. val inputPubKeyAccept: ECPublicKey
  63. val inputPubKeyAccept2A: ECPublicKey
  64. val inputPubKeyAccept2B: ECPublicKey
  65. val inputPubKeyOffer: ECPublicKey
  66. val inputPubKeyOffer2A: ECPublicKey
  67. val inputPubKeyOffer2B: ECPublicKey
  68. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  69. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  70. def noEmptySPKOutputs(tx: Transaction): Boolean
  71. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  72. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  73. val offerAddress: BitcoinAddress
  74. val offerAddress2: BitcoinAddress
  75. val offerChangeSPK: P2WPKHWitnessSPKV0
  76. val offerChangeSerialId: UInt64
  77. val offerFundingInputs: Vector[DLCFundingInput]
  78. val offerFundingPrivKey: ECPrivateKey
  79. val offerFundingTx: Transaction
  80. val offerFundingTx2: Transaction
  81. val offerFundingUtxos: Vector[SpendingInfoWithSerialId]
  82. val offerInput: CurrencyUnit
  83. val offerNestedSPK: IfConditionalScriptPubKey
  84. val offerPayoutPrivKey: ECPrivateKey
  85. val offerPayoutSerialId: UInt64
  86. val oraclePrivKey: ECPrivateKey
  87. val oraclePrivKeys: Vector[ECPrivateKey]
  88. val oraclePubKey: SchnorrPublicKey
  89. val oraclePubKeys: Vector[SchnorrPublicKey]
  90. val preCommittedK: ECPrivateKey
  91. val preCommittedKs: Vector[ECPrivateKey]
  92. val preCommittedKsPerOracle: Vector[Vector[ECPrivateKey]]
  93. val preCommittedR: SchnorrNonce
  94. val preCommittedRs: OrderedNonces
  95. val preCommittedRsPerOracle: Vector[OrderedNonces]
  96. def runTestsForParam[T](paramsToTest: Vector[T])(test: (T) => Future[Assertion])(implicit ec: ExecutionContext): Future[Assertion]

    Synchronously runs the test function on each paramsToTest in turn.

  97. def setupDLC(dlcOffer: TestDLCClient, dlcAccept: TestDLCClient)(implicit ec: ExecutionContext): Future[(SetupDLC, SetupDLC)]
  98. def setupDLC(dlcOffer: TestDLCClient, dlcAccept: TestDLCClient, fundingTxF: (Future[SetupDLC]) => Future[Transaction], publishTransaction: (Transaction) => Future[_])(implicit ec: ExecutionContext): Future[(SetupDLC, SetupDLC)]
  99. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  100. def tenRandomNums(numDigits: Int): Vector[Long]
  101. val timeouts: DLCTimeouts
  102. def toString(): String
    Definition Classes
    AnyRef → Any
  103. val totalInput: CurrencyUnit
  104. def validateOutcome(outcome: DLCOutcome, dlcOffer: TestDLCClient, dlcAccept: TestDLCClient): Assertion
  105. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  106. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  107. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  108. object SingleContractParams

Inherited from AnyRef

Inherited from Any

Ungrouped