Packages

class ErgoProvingInterpreter extends ErgoInterpreter with ProverInterpreter

A class which is holding secrets and signing transactions. Signing a transaction means producing spending proofs for all of the input boxes of the transaction.

This interpreter also acts as a wallet, in the sense that it is a vault holding user's secrets.

There are two basic types of secrets, hierarchical deterministic keys corresponding to BIP-32 implementation, and also "primitive" keys, such as just secret exponent for a Schnorr signature scheme done in Ergo.

It is considered that there could be very many hierarchical deterministic keys (for example, if we are talking about an exchange there could be thousands of them), and not so many primitive keys. Optimizations are centered around this assumption.

Linear Supertypes
ProverInterpreter, AttributionCore, AttributionCommon, ProverUtils, ErgoInterpreter, ErgoLikeInterpreter, Interpreter, ScorexLogging, StrictLogging, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ErgoProvingInterpreter
  2. ProverInterpreter
  3. AttributionCore
  4. AttributionCommon
  5. ProverUtils
  6. ErgoInterpreter
  7. ErgoLikeInterpreter
  8. Interpreter
  9. ScorexLogging
  10. StrictLogging
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ErgoProvingInterpreter(secretKeys: IndexedSeq[SecretKey], params: ErgoLikeParameters, cachedHdPubKeysOpt: Option[IndexedSeq[ExtendedPublicKey]] = None)(implicit IR: IRContext)

    secretKeys

    - secrets used by the prover

    params

    - ergo network parameters at the moment of proving

    cachedHdPubKeysOpt

    - optionally, public keys corresponding to the BIP32-related secrets (to not to recompute them)

Type Members

  1. type CTX = ErgoLikeContext
    Definition Classes
    ErgoInterpreter → ErgoLikeInterpreter → Interpreter
  2. class CachedAttribute[T, U] extends Attribute[T, U]
    Definition Classes
    AttributionCore
  3. class CachedDynamicAttribute[T, U] extends CachedAttribute[T, U]
    Definition Classes
    AttributionCore
  4. class CachedParamAttribute[A, T, U] extends (A) ⇒ Attribute[T, U]
    Definition Classes
    AttributionCore
  5. class CircularAttribute[T, U] extends Attribute[T, U]
    Definition Classes
    AttributionCore
  6. class ConstantAttribute[T, U] extends Attribute[T, U]
    Definition Classes
    AttributionCommon
  7. class MutableCell[T] extends AnyRef
    Definition Classes
    Interpreter
  8. type ProofT = UncheckedTree
    Definition Classes
    ProverInterpreter → Interpreter

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. implicit val IR: IRContext
    Definition Classes
    ErgoLikeInterpreter → Interpreter
  5. def applyDeserializeContext(context: CTX, exp: Value[SType]): (BoolValue, CTX)
    Definition Classes
    Interpreter
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. macro def attr[T, U](f: (T) ⇒ U): CachedAttribute[T, U]
    Definition Classes
    AttributionCore
  8. def attrWithName[T, U](name: String, f: (T) ⇒ U): CachedAttribute[T, U]
    Definition Classes
    AttributionCore
  9. def bagForMultisig(context: CTX, ergoTree: ErgoTree, proof: Array[Byte], realSecretsToExtract: Seq[SigmaBoolean], simulatedSecretsToExtract: Seq[SigmaBoolean]): HintsBag
    Definition Classes
    ProverUtils
  10. val cachedHdPubKeysOpt: Option[IndexedSeq[ExtendedPublicKey]]
  11. def calcResult(context: special.sigma.Context, calcF: sigmastate.eval.IRContext.Ref[(sigmastate.eval.IRContext.Context) ⇒ Any]): SigmaProp
    Definition Classes
    Interpreter
  12. def checkExpiredBox(box: ErgoBox, output: ErgoBoxCandidate, currentHeight: ErgoLikeContext.Height): Boolean

    Checks that expired box is spent in a proper way

    Checks that expired box is spent in a proper way

    box

    - box being spent

    output

    - newly created box when storage fee covered, otherwise any output box

    currentHeight

    - current height of the blockchain (at the moment of spending)

    returns

    whether the box is spent properly according to the storage fee rule

    Attributes
    protected
    Definition Classes
    ErgoInterpreter
  13. macro def circular[T, U](init: U)(f: (T) ⇒ U): CircularAttribute[T, U]
    Definition Classes
    AttributionCore
  14. def circularWithName[T, U](name: String, init: U)(f: (T) ⇒ U): CircularAttribute[T, U]
    Definition Classes
    AttributionCore
  15. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  16. val computeCommitments: Strategy
    Definition Classes
    Interpreter
  17. def constant[T, U](name: String, u: ⇒ U): Attribute[T, U]
    Definition Classes
    AttributionCommon
  18. macro def constant[T, U](u: ⇒ U): Attribute[T, U]
    Definition Classes
    AttributionCommon
  19. val convertToUnchecked: (ProofTree) ⇒ UncheckedSigmaTree
    Definition Classes
    ProverInterpreter
  20. def convertToUnproven(sigmaTree: SigmaBoolean): UnprovenTree
    Definition Classes
    ProverInterpreter
  21. def deserializeMeasured(context: CTX, scriptBytes: Array[Byte]): (CTX, Value[SType])
    Definition Classes
    Interpreter
  22. macro def dynAttr[T, U](f: (T) ⇒ U): CachedDynamicAttribute[T, U]
    Definition Classes
    AttributionCore
  23. def dynAttrWithName[T, U](name: String, f: (T) ⇒ U): CachedDynamicAttribute[T, U]
    Definition Classes
    AttributionCore
  24. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  26. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  27. def fullReduction(ergoTree: ErgoTree, context: CTX, env: ScriptEnv): (SigmaBoolean, Long)
    Definition Classes
    Interpreter
  28. def generateCommitments(sigmaTree: SigmaBoolean): HintsBag
    Definition Classes
    ProverInterpreter
  29. def generateCommitments(ergoTree: ErgoTree, ctx: CTX): HintsBag
    Definition Classes
    ProverInterpreter
  30. def generateCommitmentsFor(sigmaTree: SigmaBoolean, generateFor: Seq[SigmaBoolean]): HintsBag
    Definition Classes
    ProverUtils
  31. def generateCommitmentsFor(ergoTree: ErgoTree, context: CTX, generateFor: Seq[SigmaBoolean]): HintsBag
    Definition Classes
    ProverUtils
  32. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  33. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  34. val hdKeys: IndexedSeq[ExtendedSecretKey]

    Only secrets corresponding to hierarchical deterministic scheme (BIP-32 impl)

  35. val hdPubKeys: IndexedSeq[ExtendedPublicKey]

    Only public keys corresponding to hierarchical deterministic scheme (BIP-32 impl)

  36. implicit def internalToDynamicAttribute[T, U](f: (T) ⇒ U): CachedDynamicAttribute[T, U]
    Definition Classes
    AttributionCore
  37. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  38. def log: Logger
    Attributes
    protected
    Definition Classes
    ScorexLogging
    Annotations
    @inline()
  39. val logger: Logger
    Attributes
    protected
    Definition Classes
    StrictLogging
  40. def markReal(hintsBag: HintsBag): Strategy
    Definition Classes
    ProverInterpreter
  41. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  43. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  44. macro def paramAttr[V, T, U](f: (V) ⇒ (T) ⇒ U): CachedParamAttribute[V, T, U]
    Definition Classes
    AttributionCore
  45. def paramAttrWithName[V, T, U](name: String, f: (V) ⇒ (T) ⇒ U): CachedParamAttribute[V, T, U]
    Definition Classes
    AttributionCore
  46. val polishSimulated: Strategy
    Definition Classes
    ProverInterpreter
  47. def propositionFromErgoTree(ergoTree: ErgoTree, context: CTX): SigmaPropValue
    Definition Classes
    Interpreter
  48. def prove(env: ScriptEnv, ergoTree: ErgoTree, context: CTX, message: Array[Byte], hintsBag: HintsBag): Try[CostedProverResult]
    Definition Classes
    ProverInterpreter
  49. def prove(ergoTree: ErgoTree, context: CTX, message: Array[Byte]): Try[CostedProverResult]
    Definition Classes
    ProverInterpreter
  50. def prove(ergoTree: ErgoTree, context: CTX, message: Array[Byte], hintsBag: HintsBag): Try[CostedProverResult]
    Definition Classes
    ProverInterpreter
  51. def prove(unprovenTree: UnprovenTree, message: Array[Byte], hintsBag: HintsBag): ProofT
    Attributes
    protected
    Definition Classes
    ProverInterpreter
  52. def proving(hintsBag: HintsBag): Strategy
    Definition Classes
    ProverInterpreter
  53. def publicKeys: Seq[SigmaBoolean]
    Definition Classes
    ProverInterpreter
  54. def reduceToCrypto(context: CTX, exp: Value[SType]): Try[ReductionResult]
    Definition Classes
    Interpreter
  55. def reduceToCrypto(context: CTX, env: ScriptEnv, exp: Value[SType]): Try[ReductionResult]
    Definition Classes
    Interpreter
  56. val secretKeys: IndexedSeq[SecretKey]
  57. val secrets: IndexedSeq[SigmaProtocolPrivateInput[_, _]]

    Interpreter's secrets, in form of sigma protocols private inputs

    Interpreter's secrets, in form of sigma protocols private inputs

    Definition Classes
    ErgoProvingInterpreter → ProverInterpreter
  58. def setPositions(uc: UnprovenConjecture): UnprovenConjecture
    Attributes
    protected
    Definition Classes
    ProverInterpreter
  59. def sign(unsignedTx: UnsignedErgoLikeTransaction, boxesToSpend: IndexedSeq[ErgoBox], dataBoxes: IndexedSeq[ErgoBox], stateContext: ErgoLikeStateContext): Try[ErgoLikeTransaction]

    Note

    requires unsignedTx and boxesToSpend have the same boxIds in the same order.

  60. def simulateAndCommit(hintsBag: HintsBag): Strategy
    Definition Classes
    ProverInterpreter
  61. def substDeserialize(context: CTX, updateContext: (CTX) ⇒ Unit, node: SValue): Option[SValue]
    Definition Classes
    ErgoLikeInterpreter → Interpreter
  62. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  63. def toString(): String
    Definition Classes
    AnyRef → Any
  64. def toValidScriptType(exp: SValue): BoolValue
    Definition Classes
    Interpreter
  65. def verify(env: ScriptEnv, exp: ErgoTree, context: CTX, proof: Array[Byte], message: Array[Byte]): Try[VerificationResult]

    Checks that given exp evaluates to true.

    Checks that given exp evaluates to true.

    env

    - environment to use during expression evaluation

    exp

    - expression to check

    context

    - expression evaluation context

    proof

    - cryptographic proof

    message

    - message

    Definition Classes
    ErgoInterpreter → Interpreter
  66. def verify(ergoTree: ErgoTree, context: CTX, proof: ErgoProvingInterpreter.ProofT, message: Array[Byte]): Try[VerificationResult]
    Definition Classes
    Interpreter
  67. def verify(env: ScriptEnv, ergoTree: ErgoTree, context: CTX, proverResult: ProverResult, message: Array[Byte]): Try[VerificationResult]
    Definition Classes
    Interpreter
  68. def verify(ergoTree: ErgoTree, context: CTX, proverResult: ProverResult, message: Array[Byte]): Try[VerificationResult]
    Definition Classes
    Interpreter
  69. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  70. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  71. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  72. def withNewExtendedSecret(secret: ExtendedSecretKey): (ErgoProvingInterpreter, ExtendedPublicKey)

    Produces updated instance of ErgoProvingInterpreter with a new secret included

    Produces updated instance of ErgoProvingInterpreter with a new secret included

    secret

    - new secret to add

    returns

    modified prover

  73. def withNewParameters(newParams: ErgoLikeParameters): ErgoProvingInterpreter

    Produces updated instance of ErgoProvingInterpreter with updated parameters

    Produces updated instance of ErgoProvingInterpreter with updated parameters

    newParams

    - updated parameters

    returns

    modified prover

Inherited from ProverInterpreter

Inherited from AttributionCore

Inherited from AttributionCommon

Inherited from ProverUtils

Inherited from ErgoInterpreter

Inherited from ErgoLikeInterpreter

Inherited from Interpreter

Inherited from ScorexLogging

Inherited from StrictLogging

Inherited from AnyRef

Inherited from Any

Ungrouped