object DLCAdaptorPointComputer
Responsible for optimized computation of DLC adaptor point batches.
- Alphabetic
- By Inheritance
- DLCAdaptorPointComputer
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class AdditionTrieNode(preComputeTable: Vector[Vector[ECPublicKey]], depth: Int = 0, children: Vector[AdditionTrieNode] = Vector.empty, pointOpt: Option[SecpPoint] = None) extends Product with Serializable
This trie is used for computing adaptor points for a single oracle corresponding to digit prefixes while memoizing partial sums.
This trie is used for computing adaptor points for a single oracle corresponding to digit prefixes while memoizing partial sums.
For example the point corresponding to 0110 and 01111010 both begin with the 011 sub-sum.
This trie stores all already computed sub-sums and new points are computed by extending this Trie.
Note that this method should not be used if you have access to LibSecp256k1CryptoRuntime because calling CryptoUtil.combinePubKeys will outperform memoization in that case.
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def computeAdaptorPoints(contractInfo: SingleContractInfo): Vector[ECPublicKey]
Efficiently computes all adaptor points, in order, for a given ContractInfo.
Efficiently computes all adaptor points, in order, for a given ContractInfo.
- See also
https://medium.com/crypto-garage/optimizing-numeric-outcome-dlc-creation-6d6091ac0e47
- def computePoint(pubKey: SchnorrPublicKey, nonce: ECPublicKey, outcome: ByteVector): ECPublicKey
Computes: nonce + outcomeHash*pubKey where outcomeHash is as specified in the DLC spec.
Computes: nonce + outcomeHash*pubKey where outcomeHash is as specified in the DLC spec.
- See also
https://github.com/discreetlogcontracts/dlcspecs/blob/master/Oracle.md#signing-algorithm
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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 AdditionTrieNode extends Serializable