sigmastate
package sigmastate
- Alphabetic
- By Inheritance
- sigmastate
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
AND(input: Value[SCollection[SBoolean.type]]) extends Value[SBoolean.type] with Transformer[SCollection[SBoolean.type], SBoolean.type] with NotReadyValueBoolean with Product with Serializable
AND logical conjunction
-
case class
ArgInfo(name: String, description: String) extends Product with Serializable
Meta information which can be attached to each argument of SMethod.
Meta information which can be attached to each argument of SMethod.
- name
name of the argument
- description
argument description.
-
case class
ArithOp[T <: SType](left: Value[T], right: Value[T], opCode: OpCode) extends Value[T] with TwoArgumentsOperation[T, T, T] with NotReadyValue[T] with Product with Serializable
Represents binary operation with the given opCode.
-
abstract
class
ArithOpCompanion extends TwoArgumentOperationCompanion
NOTE: by-name argument is required for correct initialization order.
-
case class
AtLeast(bound: Value[SInt.type], input: Value[SCollection[SSigmaProp.type]]) extends Value[SSigmaProp.type] with Transformer[SCollection[SSigmaProp.type], SSigmaProp.type] with NotReadyValue[SSigmaProp.type] with Product with Serializable
Logical threshold.
Logical threshold. AtLeast has two inputs: integer bound and children same as in AND/OR. The result is true if at least bound children are true.
-
case class
AvlTreeData(digest: ADDigest, treeFlags: AvlTreeFlags, keyLength: Int, valueLengthOpt: Option[Int] = None) extends Product with Serializable
Type of data which efficiently authenticates potentially huge dataset having key-value dictionary interface.
Type of data which efficiently authenticates potentially huge dataset having key-value dictionary interface. Only root hash of dynamic AVL+ tree, tree height, key length, optional value length, and access flags are stored in an instance of the datatype.
Please note that standard hash function from CryptoConstants is used, and height is stored along with root hash of the tree, thus
digest
size is always CryptoConstants.hashLength + 1 bytes.- digest
authenticated tree digest: root hash along with tree height
- treeFlags
- allowed modifications. See AvlTreeFlags description for details
- keyLength
- all the elements under the tree have the same length
- valueLengthOpt
- if non-empty, all the values under the tree are of the same length
- case class AvlTreeFlags(insertAllowed: Boolean, updateAllowed: Boolean, removeAllowed: Boolean) extends Product with Serializable
-
case class
BinAnd(left: BoolValue, right: BoolValue) extends Value[SBoolean.type] with Relation[SBoolean.type, SBoolean.type] with Product with Serializable
Logical AND with lazy right argument which is evaluated only if left == true.
Logical AND with lazy right argument which is evaluated only if left == true. If left argument is false, the right is guaranteed to NOT be evaluated
-
case class
BinOr(left: BoolValue, right: BoolValue) extends Value[SBoolean.type] with Relation[SBoolean.type, SBoolean.type] with Product with Serializable
Logical OR with lazy right argument which is evaluated only if left == false.
Logical OR with lazy right argument which is evaluated only if left == false. If left argument is true, the right is guaranteed to NOT be evaluated
- case class BinXor(left: BoolValue, right: BoolValue) extends Value[SBoolean.type] with Relation[SBoolean.type, SBoolean.type] with Product with Serializable
-
case class
BitInversion[T <: SType](input: Value[T]) extends Value[T] with OneArgumentOperation[T, T] with Product with Serializable
Not implemented in v4.x.
-
case class
BitOp[T <: SType](left: Value[T], right: Value[T], opCode: OpCode) extends Value[T] with TwoArgumentsOperation[T, T, T] with NotReadyValue[T] with Product with Serializable
ErgoTree node which represents a binary bit-wise operation with the given opCode.
-
abstract
class
BitOpCompanion extends TwoArgumentOperationCompanion
NOTE: by-name argument is required for correct initialization order.
-
case class
BoolToSigmaProp(value: BoolValue) extends SigmaPropValue with Product with Serializable
Embedding of Boolean values to SigmaProp values.
Embedding of Boolean values to SigmaProp values. As an example, this operation allows boolean experesions to be used as arguments of
atLeast(..., sigmaProp(boolExpr), ...)
operation. During execution results to eitherTrueProp
orFalseProp
values of SigmaProp type. -
case class
ByteArrayToBigInt(input: Value[SByteArray]) extends Value[SBigInt.type] with Transformer[SByteArray, SBigInt.type] with NotReadyValueBigInt with Product with Serializable
Convert SByteArray to SBigInt
-
case class
ByteArrayToLong(input: Value[SByteArray]) extends Value[SLong.type] with Transformer[SByteArray, SLong.type] with NotReadyValueLong with Product with Serializable
Convert SByteArray to SLong
-
case class
CAND(children: Seq[SigmaBoolean]) extends SigmaConjecture with Product with Serializable
AND conjunction for sigma propositions
- case class CAndUncheckedNode(challenge: Challenge, children: Seq[UncheckedSigmaTree]) extends UncheckedConjecture with Product with Serializable
- case class CAndUnproven(proposition: CAND, challengeOpt: Option[Challenge] = None, simulated: Boolean, children: Seq[ProofTree], position: NodePosition = NodePosition.CryptoTreePrefix) extends UnprovenConjecture with Product with Serializable
-
case class
COR(children: Seq[SigmaBoolean]) extends SigmaConjecture with Product with Serializable
OR disjunction for sigma propositions
- case class COrUncheckedNode(challenge: Challenge, children: Seq[UncheckedSigmaTree]) extends UncheckedConjecture with Product with Serializable
- case class COrUnproven(proposition: COR, challengeOpt: Option[Challenge] = None, simulated: Boolean, children: Seq[ProofTree], position: NodePosition = NodePosition.CryptoTreePrefix) extends UnprovenConjecture with Product with Serializable
-
case class
CTHRESHOLD(k: Int, children: Seq[SigmaBoolean]) extends SigmaConjecture with Product with Serializable
THRESHOLD connector for sigma propositions
- case class CThresholdUncheckedNode(challenge: Challenge, children: Seq[UncheckedSigmaTree], k: Integer, polynomialOpt: Option[GF2_192_Poly]) extends UncheckedConjecture with Product with Serializable
-
case class
CThresholdUnproven(proposition: CTHRESHOLD, challengeOpt: Option[Challenge] = None, simulated: Boolean, k: Integer, children: Seq[ProofTree], polynomialOpt: Option[GF2_192_Poly], position: NodePosition = NodePosition.CryptoTreePrefix) extends UnprovenConjecture with Product with Serializable
Unproven threshold k-out-n conjecture.
Unproven threshold k-out-n conjecture. k secrets will be proven, (n-k) simulated. For details on challenge and polynomial used in this case, see [CramerDamgardSchoenmakers94].
-
case class
CalcBlake2b256(input: Value[SByteArray]) extends CalcHash with Product with Serializable
Calculate Blake2b hash from
input
- sealed abstract class CalcHash extends Value[SByteArray] with Transformer[SByteArray, SByteArray] with NotReadyValueByteArray
-
case class
CalcSha256(input: Value[SByteArray]) extends CalcHash with Product with Serializable
Calculate Sha256 hash from
input
-
sealed abstract
class
CostKind extends AnyRef
Cost descriptor of a single operation, usually associated with sigmastate.interpreter.OperationDesc.
-
case class
CreateAvlTree(operationFlags: ByteValue, digest: Value[SByteArray], keyLength: IntValue, valueLengthOpt: Value[SIntOption]) extends AvlTreeValue with Product with Serializable
Construct a new authenticated dictionary with given parameters and tree root digest.
-
case class
CreateProveDHTuple(gv: Value[SGroupElement.type], hv: Value[SGroupElement.type], uv: Value[SGroupElement.type], vv: Value[SGroupElement.type]) extends SigmaPropValue with Product with Serializable
ErgoTree operation to create a new SigmaProp value representing public key of Diffie Hellman signature protocol.
ErgoTree operation to create a new SigmaProp value representing public key of Diffie Hellman signature protocol. Common input: (g,h,u,v)
-
case class
CreateProveDlog(value: Value[SGroupElement.type]) extends SigmaPropValue with Product with Serializable
ErgoTree operation to create a new SigmaProp value representing public key of discrete logarithm signature protocol.
-
case class
DecodePoint(input: Value[SByteArray]) extends Value[SGroupElement.type] with Transformer[SByteArray, SGroupElement.type] with NotReadyValueGroupElement with Product with Serializable
Convert SByteArray to SGroupElement using CryptoConstants.dlogGroup.curve.decodePoint(bytes)
-
case class
Downcast[T <: SNumericType, R <: SNumericType](input: Value[T], tpe: R) extends Value[R] with Transformer[T, R] with Product with Serializable
Down cast for Numeric types
-
case class
EQ[S <: SType](left: Value[S], right: Value[S]) extends Value[SBoolean.type] with SimpleRelation[S] with Product with Serializable
Equals operation for SType todo: make EQ to really accept only values of the same type, now EQ(TrueLeaf, IntConstant(5)) is valid
- case class Exponentiate(left: Value[SGroupElement.type], right: Value[SBigInt.type]) extends Value[SGroupElement.type] with TwoArgumentsOperation[SGroupElement.type, SBigInt.type, SGroupElement.type] with NotReadyValueGroupElement with Product with Serializable
-
case class
FixedCost(cost: JitCost) extends CostKind with Product with Serializable
Descriptor of the simple fixed cost.
Descriptor of the simple fixed cost.
- cost
given cost of the operation
-
case class
GE[T <: SType](left: Value[T], right: Value[T]) extends Value[SBoolean.type] with SimpleRelation[T] with Product with Serializable
Greater or equals operation for SInt
-
case class
GT[T <: SType](left: Value[T], right: Value[T]) extends Value[SBoolean.type] with SimpleRelation[T] with Product with Serializable
Greater operation for SNumericType values
-
case class
If[T <: SType](condition: Value[SBoolean.type], trueBranch: Value[T], falseBranch: Value[T]) extends Value[T] with Quadruple[SBoolean.type, T, T, T] with Product with Serializable
If conditional function.
If conditional function. Non-lazy - evaluate both branches.
- condition
- condition to check
- trueBranch
- branch that will be used if condition is true
- falseBranch
- branch that will be used if condition is false
-
final
case class
JitCost extends AnyVal with Product with Serializable
Represents cost estimation computed by JITC interpreter.
Represents cost estimation computed by JITC interpreter. The JITC costs use 10x more accurate scale comparing to block cost values.
- See also
toBlockCost
-
case class
LE[T <: SType](left: Value[T], right: Value[T]) extends Value[SBoolean.type] with SimpleRelation[T] with Product with Serializable
Less or equals operation for SInt
-
case class
LT[T <: SType](left: Value[T], right: Value[T]) extends Value[SBoolean.type] with SimpleRelation[T] with Product with Serializable
Less operation for SInt
- case class LogicalNot(input: Value[SBoolean.type]) extends Value[SBoolean.type] with NotReadyValueBoolean with Product with Serializable
-
trait
LogicalTransformerCompanion extends ValueCompanion
Base trait for companions of OR, AND and XorOf nodes.
-
case class
LongToByteArray(input: Value[SLong.type]) extends Value[SByteArray] with Transformer[SLong.type, SByteArray] with NotReadyValueByteArray with Product with Serializable
Convert SLong to SByteArray
-
trait
MethodByNameUnapply extends STypeCompanion
Defines recognizer method which allows the derived object to be used in patterns to recognize method descriptors by method name.
Defines recognizer method which allows the derived object to be used in patterns to recognize method descriptors by method name.
- See also
SCollecton
-
case class
MethodIRInfo(irBuilder: Option[PartialFunction[(SigmaBuilder, SValue, SMethod, Seq[SValue], STypeSubst), SValue]], javaMethod: Option[Method], invokeDescsBuilder: Option[InvokeDescBuilder]) extends Product with Serializable
Meta information connecting SMethod with ErgoTree.
Meta information connecting SMethod with ErgoTree. The optional builder is used by front-end ErgoScript compiler to replace method calls with ErgoTree nodes. In many cases SMethod.MethodCallIrBuilder builder is used. However there are specific cases where more complex builders are used, see for example usage of
withIRInfo
in the declaration of SCollection.GetOrElseMethod.- irBuilder
optional method call recognizer and ErgoTree node builder. When the partial function is defined on a tuple (builder, obj, m, args, subst) it transforms it to a new ErgoTree node, which is then used in the resuting ErgoTree coming out of the ErgoScript compiler.
- javaMethod
Java Method which should be used to evaluate sigmastate.lang.Terms.MethodCall node of ErgoTree.
- invokeDescsBuilder
optional builder of additional type descriptors (see extraDescriptors)
- case class ModQ(input: Value[SBigInt.type]) extends Value[SBigInt.type] with NotReadyValue[SBigInt.type] with Product with Serializable
- case class ModQArithOp(left: Value[SBigInt.type], right: Value[SBigInt.type], opCode: OpCode) extends Value[SBigInt.type] with NotReadyValue[SBigInt.type] with Product with Serializable
- abstract class ModQArithOpCompanion extends ValueCompanion
- case class MultiplyGroup(left: Value[SGroupElement.type], right: Value[SGroupElement.type]) extends Value[SGroupElement.type] with TwoArgumentsOperation[SGroupElement.type, SGroupElement.type, SGroupElement.type] with NotReadyValueGroupElement with Product with Serializable
-
case class
NEQ[S <: SType](left: Value[S], right: Value[S]) extends Value[SBoolean.type] with SimpleRelation[S] with Product with Serializable
Non-Equals operation for SType
-
case class
Negation[T <: SType](input: Value[T]) extends Value[T] with OneArgumentOperation[T, T] with Product with Serializable
Negation operation on numeric type T.
Negation operation on numeric type T. See ExactNumeric instance for the corresponding type T.
-
case class
NodePosition(positions: Seq[Int]) extends Product with Serializable
Data type which encodes position of a node in a tree.
Data type which encodes position of a node in a tree.
Position is encoded like following (the example provided is for CTHRESHOLD(2, Seq(pk1, pk2, pk3 && pk4)) :
0 / | \ / | \ 0-0 0-1 0-2 /| / | / | / | 0-2-0 0-2-1
So a hint associated with pk1 has a position "0-0", pk4 - "0-2-1" .
Please note that "0" prefix is for a crypto tree. There are several kinds of trees during evaluation. Initial mixed tree (ergoTree) would have another prefix.
- positions
- positions from root (inclusive) in top-down order
-
trait
NumericCastCompanion extends ValueCompanion
Base class for Upcast and Downcast companion objects.
-
case class
OR(input: Value[SCollection[SBoolean.type]]) extends Value[SBoolean.type] with Transformer[SCollection[SBoolean.type], SBoolean.type] with NotReadyValueBoolean with Product with Serializable
OR logical conjunction
- sealed trait OneArgumentOperation[IV <: SType, OV <: SType] extends Value[OV] with NotReadyValue[OV]
- trait OneArgumentOperationCompanion extends ValueCompanion
- trait OpGroup[C <: ValueCompanion] extends AnyRef
-
case class
OperationInfo(opDesc: Option[ValueCompanion], description: String, args: Seq[ArgInfo]) extends Product with Serializable
Meta information which can be attached to SMethod.
Meta information which can be attached to SMethod.
- opDesc
optional operation descriptor
- description
human readable description of the method
- args
one item for each argument
-
case class
PerItemCost(baseCost: JitCost, perChunkCost: JitCost, chunkSize: Int) extends CostKind with Product with Serializable
Cost of operation over collection of the known length.
Cost of operation over collection of the known length. See for example Exists, MapCollection.
- baseCost
cost of operation factored out of the loop iterations
- perChunkCost
cost associated with each chunk of items
- chunkSize
number of items in a chunk
- trait ProofTree extends Product
- trait ProofTreeConjecture extends ProofTree
- trait ProofTreeLeaf extends ProofTree
-
sealed
trait
Quadruple[IV1 <: SType, IV2 <: SType, IV3 <: SType, OV <: SType] extends Value[OV] with NotReadyValue[OV]
A tree node with three descendants
- trait QuadrupleCompanion extends ValueCompanion
- sealed trait Relation[LIV <: SType, RIV <: SType] extends Value[SBoolean.type] with Triple[LIV, RIV, SBoolean.type] with NotReadyValueBoolean
- trait RelationCompanion extends ValueCompanion
-
trait
SCollection[T <: SType] extends SProduct with SGenericType
Base class for descriptors of
Coll[T]
ErgoTree type for some elemType T. -
case class
SCollectionType[T <: SType](elemType: T) extends SCollection[T] with Product with Serializable
Descriptor of
Coll[T]
ErgoTree type for some elemType T. -
trait
SEmbeddable extends SType
Base trait for all embeddable types.
-
case class
SFunc(tDom: IndexedSeq[SType], tRange: SType, tpeParams: Seq[STypeParam] = Nil) extends SType with SGenericType with Product with Serializable
Type descriptor of lambda types.
-
trait
SGenericType extends AnyRef
Base trait implemented by all generic types (those which has type parameters, e.g.
Base trait implemented by all generic types (those which has type parameters, e.g. Coll[T], Option[T], etc.)
-
trait
SLogical extends SType
Base type for SBoolean and SSigmaProp.
-
case class
SMethod(objType: STypeCompanion, name: String, stype: SFunc, methodId: Byte, costKind: CostKind, irInfo: MethodIRInfo, docInfo: Option[OperationInfo], costFunc: Option[MethodCostFunc]) extends Product with Serializable
Represents method descriptor.
Represents method descriptor.
- objType
type or type constructor descriptor
- name
method name
- stype
method signature type, where
stype.tDom
- argument type and
stype.tRange- method result type.
- methodId
method code, it should be unique among methods of the same objType.
- costKind
cost descriptor for this method
- irInfo
meta information connecting SMethod with ErgoTree (see MethodIRInfo)
- docInfo
optional human readable method description data
- costFunc
optional specification of how the cost should be computed for the given method call (See ErgoTreeEvaluator.calcCost method).
-
trait
SMonoType extends SType with STypeCompanion
Monomorphic type descriptor i.e.
Monomorphic type descriptor i.e. a type without generic parameters.
- See also
SGenericType
-
trait
SNumericType extends SProduct
Marker trait for all numeric types.
-
case class
SOption[ElemType <: SType](elemType: ElemType) extends SProduct with SGenericType with Product with Serializable
Type description of optional values.
Type description of optional values. Instances of
Option
are either constructed bySome
or byNone
constructors. -
trait
SPredefType extends SType
Base trait for all pre-defined types which are not necessary primitive (e.g.
Base trait for all pre-defined types which are not necessary primitive (e.g. Box, AvlTree).
-
trait
SPrimType extends SType with SPredefType
Base trait for all primitive types (aka atoms) which don't have internal type items.
Base trait for all primitive types (aka atoms) which don't have internal type items. All primitive types can occupy a reserved interval of codes from 1 to MaxPrimTypeCode.
-
trait
SProduct extends SType
Base trait for all types which have methods (and properties)
-
case class
STuple(items: IndexedSeq[SType]) extends SCollection[SAny.type] with Product with Serializable
Type descriptor of tuple type.
-
sealed
trait
SType extends SigmaNode
Every type descriptor is a tree represented by nodes in SType hierarchy.
Every type descriptor is a tree represented by nodes in SType hierarchy. In order to extend type family: - Implement concrete class derived from SType - Implement serializer (see SCollectionSerializer) and register it in STypeSerializer.table Each SType is serialized to array of bytes by: - emitting typeCode of each node (see special case for collections below) - then recursively serializing subtrees from left to right on each level - for each collection of primitive type there is special type code to emit single byte instead of two bytes Types code intervals - (1 .. MaxPrimTypeCode) // primitive types - (CollectionTypeCode .. CollectionTypeCode + MaxPrimTypeCode) // collections of primitive types - (MaxCollectionTypeCode ..) // Other types Collection of non-primitive type is serialized as (CollectionTypeCode, serialize(elementType))
-
case class
STypeApply(name: String, args: IndexedSeq[SType] = IndexedSeq()) extends SType with Product with Serializable
Used by ErgoScript compiler IR and eliminated during compilation.
Used by ErgoScript compiler IR and eliminated during compilation. It is not used in ErgoTree.
-
trait
STypeCompanion extends AnyRef
Basic interface for all type companions.
Basic interface for all type companions. This is necessary to make distinction between concrete type descriptor of a type like Coll[Int] and generic descriptor of Coll[T] type constructor. Some simple types like Int, GroupElement inherit from both SType and STypeCompanion.
- See also
SInt, SGroupElement, SType
-
case class
STypeVar(name: String) extends SType with Product with Serializable
Type variable which is used in generic method/func signatures.
Type variable which is used in generic method/func signatures. Used by ErgoScript compiler IR and eliminated during compilation. It is not used in ErgoTree.
-
case class
SigmaAnd(items: Seq[SigmaPropValue]) extends SigmaPropValue with SigmaTransformer[SigmaPropValue, SigmaPropValue] with Product with Serializable
AND conjunction for sigma propositions
-
trait
SigmaConjecture extends SigmaBoolean
Basic trait for inner nodes of crypto-trees, so AND/OR/THRESHOLD sigma-protocol connectives
-
trait
SigmaNode extends Product
Base type for all AST nodes of sigma lang.
-
trait
SigmaNodeCompanion extends AnyRef
Base type for all companions of AST nodes of sigma lang.
-
case class
SigmaOr(items: Seq[SigmaPropValue]) extends SigmaPropValue with SigmaTransformer[SigmaPropValue, SigmaPropValue] with Product with Serializable
OR disjunction for sigma propositions
-
trait
SigmaProofOfKnowledgeLeaf[SP <: SigmaProtocol[SP], S <: SigmaProtocolPrivateInput[SP, _]] extends SigmaBoolean with SigmaProtocolCommonInput[SP]
Basic trait for leafs of crypto-trees, such as ProveDlog and ProveDiffieHellman instances
- trait SigmaTransformer[IV <: SigmaPropValue, OV <: SigmaPropValue] extends SigmaPropValue
- trait SigmaTransformerCompanion extends ValueCompanion
- trait SimpleRelation[T <: SType] extends Value[SBoolean.type] with Relation[T, T]
-
case class
SubstConstants[T <: SType](scriptBytes: Value[SByteArray], positions: Value[SIntArray], newValues: Value[SCollection[T]]) extends Value[SByteArray] with NotReadyValueByteArray with Product with Serializable
Transforms serialized bytes of ErgoTree with segregated constants by replacing constants at given positions with new values.
Transforms serialized bytes of ErgoTree with segregated constants by replacing constants at given positions with new values. This operation allow to use serialized scripts as pre-defined templates. The typical usage is "check that output box have proposition equal to given script bytes, where minerPk (constants(0)) is replaced with currentMinerPk". Each constant in original scriptBytes have SType serialized before actual data (see ConstantSerializer). During substitution each value from newValues is checked to be an instance of the corresponding type. This means, the constants during substitution cannot change their types.
- scriptBytes
serialized ErgoTree with ConstantSegregationFlag set to 1.
- positions
zero based indexes in ErgoTree.constants array which should be replaced with new values
- newValues
new values to be injected into the corresponding positions in ErgoTree.constants array
- returns
original scriptBytes array where only specified constants are replaced and all other bytes remain exactly the same
-
case class
TreeLookup(tree: Value[SAvlTree.type], key: Value[SByteArray], proof: Value[SByteArray]) extends Value[SOption[SByteArray]] with Quadruple[SAvlTree.type, SByteArray, SByteArray, SOption[SByteArray]] with Product with Serializable
Perform a lookup of key
key
in a tree with roottree
using proofproof
.Perform a lookup of key
key
in a tree with roottree
using proofproof
. Throws exception if proof is incorrect Return Some(bytes) of leaf with keykey
if it exists Return None if leaf with provided key does not exist. -
sealed
trait
Triple[LIV <: SType, RIV <: SType, OV <: SType] extends Value[OV] with NotReadyValue[OV]
A tree node with left and right descendants
-
abstract
class
TrivialProp extends SigmaBoolean with Product1[Boolean]
Represents boolean values (true/false) in SigmaBoolean tree.
Represents boolean values (true/false) in SigmaBoolean tree. Participates in evaluation of CAND, COR, THRESHOLD connectives over SigmaBoolean values. See CAND.normalized, COR.normalized and AtLeast.reduce.
- trait TwoArgumentOperationCompanion extends ValueCompanion
- sealed trait TwoArgumentsOperation[LIV <: SType, RIV <: SType, OV <: SType] extends Value[OV] with Triple[LIV, RIV, OV]
-
abstract
class
TypeBasedCost extends CostKind
Descriptor of the cost which depends on type.
- trait UncheckedConjecture extends UncheckedSigmaTree with ProofTreeConjecture
- case class UncheckedDiffieHellmanTuple(proposition: ProveDHTuple, commitmentOpt: Option[FirstDiffieHellmanTupleProverMessage], challenge: Challenge, secondMessage: SecondDiffieHellmanTupleProverMessage) extends UncheckedLeaf[ProveDHTuple] with Product with Serializable
- trait UncheckedLeaf[SP <: SigmaBoolean] extends UncheckedSigmaTree with ProofTreeLeaf
- case class UncheckedSchnorr(proposition: ProveDlog, commitmentOpt: Option[FirstDLogProverMessage], challenge: Challenge, secondMessage: SecondDLogProverMessage) extends UncheckedLeaf[ProveDlog] with Product with Serializable
- sealed trait UncheckedSigmaTree extends UncheckedTree
- sealed trait UncheckedTree extends ProofTree
- sealed trait UnprovenConjecture extends UnprovenTree with ProofTreeConjecture
- case class UnprovenDiffieHellmanTuple(proposition: ProveDHTuple, commitmentOpt: Option[FirstDiffieHellmanTupleProverMessage], randomnessOpt: Option[BigInteger], challengeOpt: Option[Challenge] = None, simulated: Boolean, position: NodePosition = NodePosition.CryptoTreePrefix) extends UnprovenLeaf with Product with Serializable
- sealed trait UnprovenLeaf extends UnprovenTree with ProofTreeLeaf
- case class UnprovenSchnorr(proposition: ProveDlog, commitmentOpt: Option[FirstDLogProverMessage], randomnessOpt: Option[BigInteger], challengeOpt: Option[Challenge] = None, simulated: Boolean, position: NodePosition = NodePosition.CryptoTreePrefix) extends UnprovenLeaf with Product with Serializable
-
sealed
trait
UnprovenTree extends ProofTree
A node of a sigma-tree used by the prover.
A node of a sigma-tree used by the prover. See ProverInterpreter comments and the ErgoScript white-paper https://ergoplatform.org/docs/ErgoScript.pdf , Appendix A, for details
-
case class
Upcast[T <: SNumericType, R <: SNumericType](input: Value[T], tpe: R) extends Value[R] with Transformer[T, R] with Product with Serializable
Up cast for Numeric types
-
case class
VersionContext(activatedVersion: Byte, ergoTreeVersion: Byte) extends Product with Serializable
Represent currently activated protocol version and currently executed ErgoTree version.
Represent currently activated protocol version and currently executed ErgoTree version.
This parameters, once set in DynamicVariable can be accessed everywhere on the current thread.
- activatedVersion
Currently activated script version == Block.headerVersion - 1
- ergoTreeVersion
version of the currently executed ErgoTree
-
case class
Xor(left: Value[SByteArray], right: Value[SByteArray]) extends Value[SByteArray] with TwoArgumentsOperation[SByteArray, SByteArray, SByteArray] with NotReadyValueByteArray with Product with Serializable
XOR for two SByteArray
-
case class
XorOf(input: Value[SCollection[SBoolean.type]]) extends Value[SBoolean.type] with Transformer[SCollection[SBoolean.type], SBoolean.type] with NotReadyValueBoolean with Product with Serializable
Similar to allOf, but performing logical XOR operation instead of
&&
Value Members
-
def
Divide[T <: SNumericType](left: Value[T], right: Value[T]): Value[T]
SInt division
- def Max[T <: SNumericType](left: Value[T], right: Value[T]): Value[T]
- def Min[T <: SNumericType](left: Value[T], right: Value[T]): Value[T]
-
def
Minus[T <: SNumericType](left: Value[T], right: Value[T]): Value[T]
SInt subtraction
- def MinusModQ(left: Value[SBigInt.type], right: Value[SBigInt.type]): Value[SBigInt.type]
-
def
Modulo[T <: SNumericType](left: Value[T], right: Value[T]): Value[T]
SInt modulo
-
def
Multiply[T <: SNumericType](left: Value[T], right: Value[T]): Value[T]
SInt multiplication
-
def
Plus[T <: SNumericType](left: Value[T], right: Value[T]): Value[T]
SInt addition
- def PlusModQ(left: Value[SBigInt.type], right: Value[SBigInt.type]): Value[SBigInt.type]
- object AND extends LogicalTransformerCompanion with Serializable
- object ArithOp extends Serializable
- object AtLeast extends ValueCompanion with Serializable
- object AvlTreeData extends Serializable
- object AvlTreeFlags extends Serializable
- object BinAnd extends RelationCompanion with FixedCostValueCompanion with Serializable
- object BinOr extends RelationCompanion with FixedCostValueCompanion with Serializable
- object BinXor extends RelationCompanion with FixedCostValueCompanion with Serializable
- object BitInversion extends OneArgumentOperationCompanion with Serializable
- object BitOp extends Serializable
- object BoolToSigmaProp extends FixedCostValueCompanion with Serializable
- object ByteArrayToBigInt extends SimpleTransformerCompanion with Serializable
- object ByteArrayToLong extends SimpleTransformerCompanion with Serializable
- object CAND extends Serializable
- object COR extends Serializable
- object CalcBlake2b256 extends SimpleTransformerCompanion with Serializable
- object CalcHash
- object CalcSha256 extends SimpleTransformerCompanion with Serializable
- object ConjectureType extends Enumeration
- object CreateAvlTree extends ValueCompanion with Serializable
- object CreateProveDHTuple extends FixedCostValueCompanion with Serializable
- object CreateProveDlog extends FixedCostValueCompanion with Serializable
-
object
DataValueComparer
Implementation of data equality for two arbitrary ErgoTree data types.
Implementation of data equality for two arbitrary ErgoTree data types.
- object DecodePoint extends SimpleTransformerCompanion with FixedCostValueCompanion with Serializable
- object Downcast extends NumericCastCompanion with Serializable
-
object
DynamicCost extends CostKind with Product with Serializable
Cost of operation cannot be described using fixed set of parameters.
- object EQ extends RelationCompanion with Serializable
- object Exponentiate extends TwoArgumentOperationCompanion with FixedCostValueCompanion with Serializable
- object FiatShamirTree
- object GE extends RelationCompanion with Serializable
- object GT extends RelationCompanion with Serializable
- object If extends QuadrupleCompanion with FixedCostValueCompanion with Serializable
- object JitCost extends Serializable
- object LE extends RelationCompanion with Serializable
- object LT extends RelationCompanion with Serializable
- object LogicalNot extends FixedCostValueCompanion with Serializable
- object LongToByteArray extends SimpleTransformerCompanion with Serializable
- object ModQ extends ValueCompanion with Serializable
- object ModQArithOp extends OpGroup[ModQArithOpCompanion] with Serializable
- object MultiplyGroup extends TwoArgumentOperationCompanion with FixedCostValueCompanion with Serializable
- object NEQ extends RelationCompanion with Serializable
- object Negation extends OneArgumentOperationCompanion with FixedCostValueCompanion with Serializable
- object NoProof extends UncheckedTree with Product with Serializable
-
object
NoType extends SType with Product with Serializable
Special type to represent untyped values.
Special type to represent untyped values. Interpreter raises an error when encounter a Value with this type. All Value nodes with this type should be elimitanted during typing. If no specific type can be assigned statically during typing, then either error should be raised or type SAny should be assigned which is interpreted as dynamic typing.
- object NodePosition extends Serializable
-
object
NumericCastCostKind extends TypeBasedCost
Cost of: 1) converting numeric value to the numeric value of the given type, i.e.
Cost of: 1) converting numeric value to the numeric value of the given type, i.e. Byte -> Int NOTE: the cost of BigInt casting is the same in JITC (comparing to AOTC) to simplify implementation.
- object OR extends LogicalTransformerCompanion with Serializable
- object OperationInfo extends Serializable
-
object
Operations
WARNING: This file is generated by GenInfoObjects tool.
WARNING: This file is generated by GenInfoObjects tool. Don't edit it directly, use the tool instead to regenerate. The operations are alphabetically sorted.
-
object
SAny extends SPrimType with Product with Serializable
Any other type is implicitly subtype of this type.
-
object
SAvlTree extends SProduct with SPredefType with SMonoType with Product with Serializable
Type descriptor of
AvlTree
type of ErgoTree. -
object
SBigInt extends SPrimType with SEmbeddable with SNumericType with SMonoType with Product with Serializable
Type of 256 bit integet values.
Type of 256 bit integet values. Implemented using java.math.BigInteger.
-
object
SBoolean extends SPrimType with SEmbeddable with SLogical with SProduct with SMonoType with Product with Serializable
Descriptor of ErgoTree type
Boolean
holdingtrue
orfalse
values. -
object
SBox extends SProduct with SPredefType with SMonoType with Product with Serializable
Type descriptor of
Box
type of ErgoTree. -
object
SByte extends SPrimType with SEmbeddable with SNumericType with SMonoType with Product with Serializable
Descriptor of ErgoTree type
Byte
- 8-bit signed integer. - object SCollection extends STypeCompanion with MethodByNameUnapply
- object SCollectionType extends Serializable
-
object
SContext extends SProduct with SPredefType with SMonoType with Product with Serializable
Type descriptor of
Context
type of ErgoTree. - object SFunc extends Serializable
-
object
SGlobal extends SProduct with SPredefType with SMonoType with Product with Serializable
This type is introduced to unify handling of global and non-global (i.e.
This type is introduced to unify handling of global and non-global (i.e. methods) operations. It unifies implementation of global operation with implementation of methods and avoids code duplication (following DRY principle https://en.wikipedia.org/wiki/Don%27t_repeat_yourself). The WrappedType is
special.sigma.SigmaDslBuilder
, which is an interface implemented by the singleton sigmastate.eval.CostingSigmaDslBuilderThe Constant(...) tree node of this type are not allowed, as well as using it in register and context variables (aka ContextExtension)
When new methods are added to this type via a soft-fork, they will be serialized as part of ErgoTree using MethodCallSerializer, where SGlobal.typeCode will be used.
- See also
sigmastate.lang.SigmaPredef
-
object
SGroupElement extends SProduct with SPrimType with SEmbeddable with SMonoType with Product with Serializable
Descriptor of ErgoTree type
GroupElement
.Descriptor of ErgoTree type
GroupElement
. NOTE: this descriptor both type and type companion -
object
SHeader extends SProduct with SPredefType with SMonoType with Product with Serializable
Type descriptor of
Header
type of ErgoTree. -
object
SInt extends SPrimType with SEmbeddable with SNumericType with SMonoType with Product with Serializable
Descriptor of ErgoTree type
Int
- 32-bit signed integer. -
object
SLong extends SPrimType with SEmbeddable with SNumericType with SMonoType with Product with Serializable
Descriptor of ErgoTree type
Long
- 64-bit signed integer. - object SMethod extends Serializable
- object SNumericType extends STypeCompanion
- object SOption extends STypeCompanion with Serializable
-
object
SPair
Helper constuctor/extractor for tuples of two types.
-
object
SPreHeader extends SProduct with SPredefType with SMonoType with Product with Serializable
Type descriptor of
PreHeader
type of ErgoTree. -
object
SPrimType
Primitive type recognizer to pattern match on TypeCode
-
object
SShort extends SPrimType with SEmbeddable with SNumericType with SMonoType with Product with Serializable
Descriptor of ErgoTree type
Short
- 16-bit signed integer. -
object
SSigmaProp extends SProduct with SPrimType with SEmbeddable with SLogical with SMonoType with Product with Serializable
Descriptor of ErgoTree type
SigmaProp
which represent sigma-protocol propositions. -
object
SString extends SProduct with SMonoType with Product with Serializable
Descriptor of type
String
which is not used in ErgoTree, but used in ErgoScript.Descriptor of type
String
which is not used in ErgoTree, but used in ErgoScript. NOTE: this descriptor both type and type companion - object STuple extends STypeCompanion with Serializable
- object SType
- object STypeApply extends Serializable
- object STypeVar extends Serializable
-
object
SUnit extends SPrimType with Product with Serializable
The type with single inhabitant value
()
-
object
SigSerializer extends LazyLogging
Contains implementation of signature (aka proof) serialization.
Contains implementation of signature (aka proof) serialization.
- See also
toProofBytes, parseAndComputeChallenges
- object SigmaAnd extends SigmaTransformerCompanion with Serializable
- object SigmaOr extends SigmaTransformerCompanion with Serializable
- object SimpleRelation
- object SubstConstants extends ValueCompanion with Serializable
- object TreeLookup extends QuadrupleCompanion with Serializable
- object TrivialProp
- object Upcast extends NumericCastCompanion with Serializable
- object Values
- object VersionContext extends Serializable
- object Xor extends TwoArgumentOperationCompanion with Serializable
- object XorOf extends LogicalTransformerCompanion with Serializable
- object util