object DLCTest extends DLCTest
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- DLCTest
- DLCTest
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
- sealed trait ContractParams extends AnyRef
- Definition Classes
- DLCTest
- case class DisjointUnionContractParams(singleParams: Vector[SingleContractParams]) extends ContractParams with Product with Serializable
- Definition Classes
- DLCTest
- case class EnumContractParams(numOutcomes: Int, oracleThreshold: Int, numOracles: Int) extends SingleContractParams with Product with Serializable
- Definition Classes
- DLCTest
- case class NumericContractParams(numDigits: Int, oracleThreshold: Int, numOracles: Int, paramsOpt: Option[OracleParamsV0TLV] = None) extends SingleContractParams with Product with Serializable
- Definition Classes
- DLCTest
- sealed trait SingleContractParams extends ContractParams
- Definition Classes
- DLCTest
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val acceptAddress: BitcoinAddress
- Definition Classes
- DLCTest
- val acceptAddress2: BitcoinAddress
- Definition Classes
- DLCTest
- val acceptChangeSPK: P2WPKHWitnessSPKV0
- Definition Classes
- DLCTest
- val acceptChangeSerialId: UInt64
- Definition Classes
- DLCTest
- val acceptFundingInputs: Vector[DLCFundingInput]
- Definition Classes
- DLCTest
- val acceptFundingPrivKey: ECPrivateKey
- Definition Classes
- DLCTest
- val acceptFundingTx: Transaction
- Definition Classes
- DLCTest
- val acceptFundingTx2: Transaction
- Definition Classes
- DLCTest
- val acceptFundingUtxos: Vector[SpendingInfoWithSerialId]
- Definition Classes
- DLCTest
- val acceptInput: CurrencyUnit
- Definition Classes
- DLCTest
- val acceptNestedSPK: MultiSignatureScriptPubKey
- Definition Classes
- DLCTest
- val acceptPayoutPrivKey: ECPrivateKey
- Definition Classes
- DLCTest
- val acceptPayoutSerialId: UInt64
- Definition Classes
- DLCTest
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def assertCorrectSigDerivation(offerSetup: SetupDLC, dlcOffer: TestDLCClient, acceptSetup: SetupDLC, dlcAccept: TestDLCClient, oracleSigs: Vector[OracleSignatures], outcome: OracleOutcome)(implicit ec: ExecutionContext): Future[Assertion]
- Definition Classes
- DLCTest
- val blockTimeToday: BlockTime
- Definition Classes
- DLCTest
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def computeNumericOracleSignatures(digits: Vector[Int], privKey: ECPrivateKey = oraclePrivKey, kVals: Vector[ECPrivateKey] = preCommittedKs): OrderedSchnorrSignatures
Computes an oracle signatures for the given outcome and oracle
Computes an oracle signatures for the given outcome and oracle
- Definition Classes
- DLCTest
- 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.
Deterministically chooses an outcome from the middle third of the interesting possible outcomes.
- Definition Classes
- DLCTest
- def constructAndSetupDLC(contractParams: ContractParams)(implicit ec: ExecutionContext): Future[(TestDLCClient, SetupDLC, TestDLCClient, SetupDLC, Vector[DLCOutcomeType])]
- Definition Classes
- DLCTest
- 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])
- Definition Classes
- DLCTest
- 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)
- Definition Classes
- DLCTest
- 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])
- Definition Classes
- DLCTest
- def constructEnumContractInfos(params: EnumContractParams, oracleShift: Int = 0): (SingleContractInfo, SingleContractInfo)
- Definition Classes
- DLCTest
- 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])
- Definition Classes
- DLCTest
- def constructNumericContractInfos(params: NumericContractParams, oracleShift: Int = 0): (SingleContractInfo, SingleContractInfo)
- Definition Classes
- DLCTest
- 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])
- Definition Classes
- DLCTest
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def executeForCase(contractIndex: Int, outcomeIndex: Long, contractParams: ContractParams)(implicit ec: ExecutionContext): Future[Assertion]
- Definition Classes
- DLCTest
- def executeForCase(outcomeIndex: Long, contractParams: ContractParams)(implicit ec: ExecutionContext): Future[Assertion]
- Definition Classes
- DLCTest
- def executeForCases(outcomeIndices: Vector[Long], contractParams: ContractParams)(implicit ec: ExecutionContext): Future[Assertion]
- Definition Classes
- DLCTest
- def executeForCasesInUnion(outcomeIndices: Vector[(Int, Long)], contractParams: ContractParams)(implicit ec: ExecutionContext): Future[Assertion]
- Definition Classes
- DLCTest
- def executeForOutcome(outcomeIndex: Long, dlcOffer: TestDLCClient, offerSetup: SetupDLC, dlcAccept: TestDLCClient, acceptSetup: SetupDLC, outcomes: Vector[DLCOutcomeType], contractIndex: Int = 0)(implicit ec: ExecutionContext): Future[Assertion]
- Definition Classes
- DLCTest
- def executeRefundCase(contractParams: ContractParams)(implicit ec: ExecutionContext): Future[Assertion]
- Definition Classes
- DLCTest
- val feeRate: SatoshisPerVirtualByte
- Definition Classes
- DLCTest
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- val fundOutputSerialId: UInt64
- Definition Classes
- DLCTest
- def genEnumOracleOutcome(chosenOracles: Vector[Int], contractInfo: SingleContractInfo, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long): EnumOracleOutcome
- Definition Classes
- DLCTest
- def genEnumOracleSignature(oracleInfo: EnumSingleOracleInfo, outcome: String, privKey: ECPrivateKey = oraclePrivKey, kVal: ECPrivateKey = preCommittedK): EnumOracleSignature
Computes an EnumOracleSignature for the given outcome and oracle
Computes an EnumOracleSignature for the given outcome and oracle
- Definition Classes
- DLCTest
- def genEnumOracleSignatures(chosenOracles: Vector[Int], contractInfo: SingleContractInfo, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long): Vector[EnumOracleSignature]
- Definition Classes
- DLCTest
- def genEnumOracleSignatures(outcome: EnumOracleOutcome): Vector[EnumOracleSignature]
- Definition Classes
- DLCTest
- def genNumericOracleOutcome(numDigits: Int, chosenOracles: Vector[Int], contractInfo: SingleContractInfo, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long, paramsOpt: Option[OracleParamsV0TLV]): NumericOracleOutcome
- Definition Classes
- DLCTest
- def genNumericOracleOutcome(chosenOracles: Vector[Int], contractInfo: ContractInfo, digits: Vector[Int], paramsOpt: Option[OracleParamsV0TLV]): NumericOracleOutcome
- Definition Classes
- DLCTest
- def genNumericOracleSignatures(numDigits: Int, chosenOracles: Vector[Int], contractInfo: SingleContractInfo, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long, paramsOpt: Option[OracleParamsV0TLV]): Vector[NumericOracleSignatures]
- Definition Classes
- DLCTest
- def genNumericOracleSignatures(outcome: NumericOracleOutcome): Vector[NumericOracleSignatures]
- Definition Classes
- DLCTest
- def genOracleOutcome(numOutcomesOrDigits: Int, isNumeric: Boolean, contractInfo: SingleContractInfo, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long, paramsOpt: Option[OracleParamsV0TLV]): OracleOutcome
- Definition Classes
- DLCTest
- def genOracleOutcomeAndSignatures(numOutcomesOrDigits: Int, isNumeric: Boolean, contractInfo: SingleContractInfo, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long, paramsOpt: Option[OracleParamsV0TLV]): (OracleOutcome, Vector[OracleSignatures])
- Definition Classes
- DLCTest
- def genOracleSignatures(numOutcomesOrDigits: Int, isNumeric: Boolean, contractInfo: SingleContractInfo, outcomes: Vector[DLCOutcomeType], outcomeIndex: Long, paramsOpt: Option[OracleParamsV0TLV]): Vector[OracleSignatures]
- Definition Classes
- DLCTest
- def genOracleSignatures(outcome: OracleOutcome): Vector[OracleSignatures]
- Definition Classes
- DLCTest
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val inputPrivKeyAccept: ECPrivateKey
- Definition Classes
- DLCTest
- val inputPrivKeyAccept2A: ECPrivateKey
- Definition Classes
- DLCTest
- val inputPrivKeyAccept2B: ECPrivateKey
- Definition Classes
- DLCTest
- val inputPrivKeyOffer: ECPrivateKey
- Definition Classes
- DLCTest
- val inputPrivKeyOffer2A: ECPrivateKey
- Definition Classes
- DLCTest
- val inputPrivKeyOffer2B: ECPrivateKey
- Definition Classes
- DLCTest
- val inputPubKeyAccept: ECPublicKey
- Definition Classes
- DLCTest
- val inputPubKeyAccept2A: ECPublicKey
- Definition Classes
- DLCTest
- val inputPubKeyAccept2B: ECPublicKey
- Definition Classes
- DLCTest
- val inputPubKeyOffer: ECPublicKey
- Definition Classes
- DLCTest
- val inputPubKeyOffer2A: ECPublicKey
- Definition Classes
- DLCTest
- val inputPubKeyOffer2B: ECPublicKey
- Definition Classes
- DLCTest
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noEmptySPKOutputs(tx: Transaction): Boolean
- Definition Classes
- DLCTest
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val offerAddress: BitcoinAddress
- Definition Classes
- DLCTest
- val offerAddress2: BitcoinAddress
- Definition Classes
- DLCTest
- val offerChangeSPK: P2WPKHWitnessSPKV0
- Definition Classes
- DLCTest
- val offerChangeSerialId: UInt64
- Definition Classes
- DLCTest
- val offerFundingInputs: Vector[DLCFundingInput]
- Definition Classes
- DLCTest
- val offerFundingPrivKey: ECPrivateKey
- Definition Classes
- DLCTest
- val offerFundingTx: Transaction
- Definition Classes
- DLCTest
- val offerFundingTx2: Transaction
- Definition Classes
- DLCTest
- val offerFundingUtxos: Vector[SpendingInfoWithSerialId]
- Definition Classes
- DLCTest
- val offerInput: CurrencyUnit
- Definition Classes
- DLCTest
- val offerNestedSPK: IfConditionalScriptPubKey
- Definition Classes
- DLCTest
- val offerPayoutPrivKey: ECPrivateKey
- Definition Classes
- DLCTest
- val offerPayoutSerialId: UInt64
- Definition Classes
- DLCTest
- val oraclePrivKey: ECPrivateKey
- Definition Classes
- DLCTest
- val oraclePrivKeys: Vector[ECPrivateKey]
- Definition Classes
- DLCTest
- val oraclePubKey: SchnorrPublicKey
- Definition Classes
- DLCTest
- val oraclePubKeys: Vector[SchnorrPublicKey]
- Definition Classes
- DLCTest
- val preCommittedK: ECPrivateKey
- Definition Classes
- DLCTest
- val preCommittedKs: Vector[ECPrivateKey]
- Definition Classes
- DLCTest
- val preCommittedKsPerOracle: Vector[Vector[ECPrivateKey]]
- Definition Classes
- DLCTest
- val preCommittedR: SchnorrNonce
- Definition Classes
- DLCTest
- val preCommittedRs: OrderedNonces
- Definition Classes
- DLCTest
- val preCommittedRsPerOracle: Vector[OrderedNonces]
- Definition Classes
- DLCTest
- 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.
Synchronously runs the test function on each paramsToTest in turn.
- Definition Classes
- DLCTest
- def setupDLC(dlcOffer: TestDLCClient, dlcAccept: TestDLCClient)(implicit ec: ExecutionContext): Future[(SetupDLC, SetupDLC)]
- Definition Classes
- DLCTest
- def setupDLC(dlcOffer: TestDLCClient, dlcAccept: TestDLCClient, fundingTxF: (Future[SetupDLC]) => Future[Transaction], publishTransaction: (Transaction) => Future[_])(implicit ec: ExecutionContext): Future[(SetupDLC, SetupDLC)]
- Definition Classes
- DLCTest
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tenRandomNums(numDigits: Int): Vector[Long]
- Definition Classes
- DLCTest
- val timeouts: DLCTimeouts
- Definition Classes
- DLCTest
- def toString(): String
- Definition Classes
- AnyRef → Any
- val totalInput: CurrencyUnit
- Definition Classes
- DLCTest
- def validateOutcome(outcome: DLCOutcome, dlcOffer: TestDLCClient, dlcAccept: TestDLCClient): Assertion
- Definition Classes
- DLCTest
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- object SingleContractParams
- Definition Classes
- DLCTest