Packages

package ast

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ast
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. 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

  2. case class Append[IV <: SType](input: Value[SCollection[IV]], col2: Value[SCollection[IV]]) extends Value[SCollection[IV]] with Transformer[SCollection[IV], SCollection[IV]] with Product with Serializable

    Puts the elements of other collection col2 after the elements of input collection (concatenation of two collections).

  3. case class Apply(func: Value[SType], args: IndexedSeq[Value[SType]]) extends Value[SType] with Product with Serializable

    ErgoTree node which represents application of function func to the given arguments.

    ErgoTree node which represents application of function func to the given arguments.

    func

    expression which evaluates to a function

    args

    arguments of the function application

  4. case class ApplyTypes(input: Value[SType], tpeArgs: Seq[SType]) extends Value[SType] with Product with Serializable

    Apply types for type parameters of input value.

  5. 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.

  6. abstract class ArithOpCompanion extends TwoArgumentOperationCompanion

    NOTE: by-name argument is required for correct initialization order.

  7. 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.

  8. 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

  9. 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

  10. case class BinXor(left: BoolValue, right: BoolValue) extends Value[SBoolean.type] with Relation[SBoolean.type, SBoolean.type] with Product with Serializable
  11. case class BitInversion[T <: SType](input: Value[T]) extends Value[T] with OneArgumentOperation[T, T] with Product with Serializable

    Not implemented in v4.x.

  12. 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.

  13. abstract class BitOpCompanion extends TwoArgumentOperationCompanion

    NOTE: by-name argument is required for correct initialization order.

  14. case class Block(bindings: Seq[Val], result: SValue) extends Value[SType] with Product with Serializable

    Frontend representation of a block of Val definitions.

    Frontend representation of a block of Val definitions. { val x = ...; val y = ... } This node is not part of ErgoTree and hence have Undefined opCode.

  15. sealed trait BlockItem extends Value[SType] with NotReadyValue[SType]
  16. case class BlockValue(items: IndexedSeq[BlockItem], result: SValue) extends Value[SType] with NotReadyValue[SType] with Product with Serializable

    The order of ValDefs in the block is used to assign ids to ValUse(id) nodes For all i: items(i).id == {number of ValDefs preceded in a graph} with respect to topological order.

    The order of ValDefs in the block is used to assign ids to ValUse(id) nodes For all i: items(i).id == {number of ValDefs preceded in a graph} with respect to topological order. Specific topological order doesn't really matter, what is important is to preserve semantic linkage between ValUse(id) and ValDef with the corresponding id. This convention allow to valid serializing ids because we always serializing and deserializing in a fixed well defined order.

  17. 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 either TrueProp or FalseProp values of SigmaProp type.

  18. trait BooleanTransformer[IV <: SType] extends Value[SBoolean.type] with Transformer[SCollection[IV], SBoolean.type]

    Transforms a collection of values to a boolean (see Exists, ForAll).

  19. trait BooleanTransformerCompanion extends ValueCompanion
  20. case class ByIndex[V <: SType](input: Value[SCollection[V]], index: Value[SInt.type], default: Option[Value[V]] = None) extends Value[V] with Transformer[SCollection[V], V] with NotReadyValue[V] with Product with Serializable

    The element of the collection or default value.

    The element of the collection or default value. If an index is out of bounds (i < 0 || i >= length) then default value is returned.

    V

    the type of elements

    input

    the zero-based indexed collection

    index

    the index of the requested element (zero-based)

    returns

    the element at the given index or default value if index is out or bounds

    Exceptions thrown

    ArrayIndexOutOfBoundsException if index < 0 or length <= index

  21. 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

  22. 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

  23. case class CalcBlake2b256(input: Value[SByteArray]) extends CalcHash with Product with Serializable

    Calculate Blake2b hash from input

  24. sealed abstract class CalcHash extends Value[SByteArray] with Transformer[SByteArray, SByteArray] with NotReadyValueByteArray
  25. case class CalcSha256(input: Value[SByteArray]) extends CalcHash with Product with Serializable

    Calculate Sha256 hash from input

  26. class CheckingSigmaBuilder extends StdSigmaBuilder

    Builder which does checking of constraints on the numeric arguments of binary operations.

  27. case class CompanionDesc(companion: ValueCompanion) extends OperationDesc with Product with Serializable

    Operation descriptor based on ValueCompanion.

  28. case class ConcreteCollection[V <: SType](items: Seq[Value[V]], elementType: V) extends EvaluatedValue[SCollection[V]] with EvaluatedCollection[V, SCollection[V]] with Product with Serializable

    ErgoTree node which converts a collection of expressions into a collection of data values.

    ErgoTree node which converts a collection of expressions into a collection of data values. Each data value of the resulting collection is obtained by evaluating the corresponding expression in items. All items must have the same type.

    items

    source collection of expressions

    elementType

    type descriptor of elements in the resulting collection

  29. abstract class Constant[+S <: SType] extends EvaluatedValue[S]

    Base class for all constant literals whose data value is already known and never changes.

    Base class for all constant literals whose data value is already known and never changes.

    See also

    ConstantNode

  30. case class ConstantNode[S <: SType](value: S.WrappedType, tpe: S) extends Constant[S] with Product with Serializable

    ErgoTree node which represents data literals, i.e.

    ErgoTree node which represents data literals, i.e. data values embedded in an expression.

    value

    data value of the underlying Scala type

    tpe

    type descriptor of the data value and also the type of the value represented by this node.

    See also

    Constant

  31. case class ConstantPlaceholder[S <: SType](id: Int, tpe: S) extends Value[S] with Product with Serializable

    Placeholder for a constant in ErgoTree.

    Placeholder for a constant in ErgoTree. Zero based index in ErgoTree.constants array.

  32. abstract class CostItem extends AnyRef

    An item in the cost accumulation trace of a sigma.ast.ErgoTree evaluation.

  33. sealed abstract class CostKind extends AnyRef

    Cost descriptor of a single operation, usually associated with OperationDesc.

  34. 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.

  35. 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)

  36. 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.

  37. 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)

  38. trait Deserialize[V <: SType] extends Value[V] with NotReadyValue[V]
  39. case class DeserializeContext[V <: SType](id: Byte, tpe: V) extends Value[V] with Deserialize[V] with Product with Serializable

    This ErgoTree operation work as macros (i.e.

    This ErgoTree operation work as macros (i.e. executed before ErgoTree reduction) and allows to inline arbitrary expression at the point where it is used in ErgoTree.

    This operation is executed before ErgoTree reduction as the following: 1) the context variable id is checked to have type Coll[Byte], if not, then this node remains in the ErgoTree which means the reduction will fail later. 2) the bytes collection is deserialized to expr: Value[V] using ValueSerializer.deserialize 3) this node is replaced with the deserialized expr

    This step are performed for each DeserializeContext node via single traverse of ErgoTree. The resulting ErgoTree is passed to reduction.

    NOTE, the original Coll[Byte] from context variables is available as getVar[Coll[Byte]](id)

    id

    identifier of the context variable

    tpe

    expected type of the deserialized script (i.e. expected type of expr).

  40. case class DeserializeRegister[V <: SType](reg: RegisterId, tpe: V, default: Option[Value[V]] = None) extends Value[V] with Deserialize[V] with Product with Serializable

    Extract register of SELF box as Coll[Byte], deserialize it into Value and inline into executing script.

    Extract register of SELF box as Coll[Byte], deserialize it into Value and inline into executing script. NOTE: it only applicable to SELF box

  41. 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

  42. 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

  43. case class ErgoTree extends Product with Serializable

    The root of ErgoScript IR.

    The root of ErgoScript IR. Serialized instances of this class are self sufficient and can be passed around. ErgoTreeSerializer defines top-level serialization format of the scripts. The interpretation of the byte array depend on the first header byte, which uses VLQ encoding up to 30 bits. Currently we define meaning for only first byte, which may be extended in future versions. 7 6 5 4 3 2 1 0 -------------------------


    Bit 7 == 1 if the header contains more than 1 byte (default == 0) Bit 6 - reserved for GZIP compression (should be 0) Bit 5 == 1 - reserved for context dependent costing (should be = 0) Bit 4 == 1 if constant segregation is used for this ErgoTree (default = 0) (see https://github.com/ScorexFoundation/sigmastate-interpreter/issues/264) Bit 3 == 1 if size of the whole tree is serialized after the header byte (default = 0) Bits 2-0 - language version (current version == 0)

    Currently we don't specify interpretation for the second and other bytes of the header. We reserve the possibility to extend header by using Bit 7 == 1 and chain additional bytes as in VLQ. Once the new bytes are required, a new version of the language should be created and implemented. That new language will give an interpretation for the new bytes.

    Consistency between fields is ensured by private constructor and factory methods in ErgoTree object. For performance reasons, ErgoTreeSerializer can be configured to perform additional constant segregation. In such a case after deserialization there may be more constants segregated. This is done for example to support caching optimization described in #264 mentioned above.

    The default behavior of ErgoTreeSerializer is to preserve original structure of ErgoTree and check consistency. In case of any inconsistency the serializer throws exception.

  44. trait EvaluatedCollection[T <: SType, C <: SCollection[T]] extends EvaluatedValue[C]

    Base type for evaluated tree nodes of Coll type.

  45. abstract class EvaluatedValue[+S <: SType] extends Value[S]

    Base class for ErgoTree nodes which represents a data value which has already been evaluated and no further evaluation (aka reduction) is necessary by the interpreter.

    Base class for ErgoTree nodes which represents a data value which has already been evaluated and no further evaluation (aka reduction) is necessary by the interpreter.

    See also

    Constant, ConcreteCollection, Tuple

  46. case class Exists[IV <: SType](input: Value[SCollection[IV]], condition: Value[SFunc]) extends Value[SBoolean.type] with BooleanTransformer[IV] with Product with Serializable

    Tests whether a predicate holds for at least one element of this collection.

    Tests whether a predicate holds for at least one element of this collection.

    input

    the collection to be tested

    condition

    the predicate used to test elements.

    returns

    true if the given condition is satisfied by at least one element of this collection, otherwise false

  47. 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
  48. sealed trait Extract[V <: SType] extends Value[V] with Transformer[SBox.type, V]
  49. case class ExtractAmount(input: Value[SBox.type]) extends Value[SLong.type] with Extract[SLong.type] with NotReadyValueLong with Product with Serializable

    Extracts the monetary value, in Ergo tokens (NanoErg unit of measure) from input Box.

  50. case class ExtractBytes(input: Value[SBox.type]) extends Value[SByteArray] with Extract[SByteArray] with NotReadyValueByteArray with Product with Serializable

    Extracts serialized bytes of this box's content, including proposition bytes.

  51. case class ExtractBytesWithNoRef(input: Value[SBox.type]) extends Value[SByteArray] with Extract[SByteArray] with NotReadyValueByteArray with Product with Serializable

    Extracts serialized bytes of this box's content, excluding transactionId and index of output.

  52. case class ExtractCreationInfo(input: Value[SBox.type]) extends Value[STuple] with Extract[STuple] with NotReadyValue[STuple] with Product with Serializable

    Tuple of height when block got included into the blockchain and transaction identifier with box index in the transaction outputs serialized to the byte array.

    Tuple of height when block got included into the blockchain and transaction identifier with box index in the transaction outputs serialized to the byte array.

    input

    box

  53. case class ExtractId(input: Value[SBox.type]) extends Value[SByteArray] with Extract[SByteArray] with NotReadyValueByteArray with Product with Serializable

    Extracts Blake2b256 hash of this box's content, basically equals to blake2b256(bytes)

  54. case class ExtractRegisterAs[V <: SType](input: Value[SBox.type], registerId: RegisterId, tpe: SOption[V]) extends Value[SOption[V]] with Extract[SOption[V]] with NotReadyValue[SOption[V]] with Product with Serializable

    See Box.getReg()

  55. case class ExtractScriptBytes(input: Value[SBox.type]) extends Value[SByteArray] with Extract[SByteArray] with NotReadyValueByteArray with Product with Serializable

    Extract serialized bytes of guarding script.

    Extract serialized bytes of guarding script. As a reminder, the script should be evaluated to true in order to open this box. (aka spend it in a transaction).

  56. case class Filter[IV <: SType](input: Value[SCollection[IV]], condition: Value[SFunc]) extends Value[SCollection[IV]] with Transformer[SCollection[IV], SCollection[IV]] with Product with Serializable

    Selects all elements of input collection which satisfy the condition.

    Selects all elements of input collection which satisfy the condition.

    input

    the collection to be filtered

    condition

    the predicate used to test elements.

    returns

    a new collection consisting of all elements of this collection that satisfy the given condition. The order of the elements is preserved.

  57. 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

  58. case class FixedCostItem(opDesc: OperationDesc, costKind: FixedCost) extends CostItem with Product with Serializable

    An item in the cost accumulation trace of a sigma.ast.ErgoTree evaluation.

    An item in the cost accumulation trace of a sigma.ast.ErgoTree evaluation. Represents cost of simple operation. Used for debugging, testing and profiling of costing.

    opDesc

    descriptor of the ErgoTree operation

    costKind

    kind of the cost to be added to accumulator

  59. trait FixedCostValueCompanion extends ValueCompanion

    Should be inherited by companion objects of operations with fixed cost kind.

  60. case class Fold[IV <: SType, OV <: SType](input: Value[SCollection[IV]], zero: Value[OV], foldOp: Value[SFunc]) extends Value[OV] with Transformer[SCollection[IV], OV] with Product with Serializable

    Applies a binary function to a start value and all elements of this collection, going left to right.

    Applies a binary function to a start value and all elements of this collection, going left to right.

    OV

    the result type of the binary operator.

    input

    the collection to iterate

    zero

    the start value.

    foldOp

    the binary function.

    returns

    the result of inserting foldOp between consecutive elements of this collection, going left to right with the start value zero on the left:

    foldOp(...foldOp(zero, x_1), x_2, ..., x_n)

    where x_1, ..., x_n are the elements of this collection. Returns zero if this collection is empty.

  61. case class ForAll[IV <: SType](input: Value[SCollection[IV]], condition: Value[SFunc]) extends Value[SBoolean.type] with BooleanTransformer[IV] with Product with Serializable

    Tests whether a predicate holds for all elements of this collection.

    Tests whether a predicate holds for all elements of this collection.

    input

    the collection to be tested

    condition

    the predicate used to test elements.

    returns

    true if this collection is empty or the given condition holds for all elements of this collection, otherwise false.

  62. case class FuncValue(args: IndexedSeq[(Int, SType)], body: Value[SType]) extends Value[SFunc] with NotReadyValue[SFunc] with Product with Serializable

    args

    parameters list, where each parameter has an id and a type.

    body

    expression, which refers function parameters with ValUse.

  63. 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

  64. 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

  65. case class GetVar[V <: SType](varId: Byte, tpe: SOption[V]) extends Value[SOption[V]] with NotReadyValue[SOption[V]] with Product with Serializable

    See sigma.Context.getVar() for detailed description.

  66. case class Ident(name: String, tpe: SType = NoType) extends Value[SType] with Product with Serializable

    Frontend node to represent variable names parsed in a source code.

    Frontend node to represent variable names parsed in a source code. Should be resolved during compilation to lambda argument, Val definition or compilation environment value.

  67. 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

  68. 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

  69. 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

  70. 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

  71. case class Lambda(tpeParams: Seq[STypeParam], args: IndexedSeq[(String, SType)], givenResType: SType, body: Option[Value[SType]]) extends Value[SFunc] with Product with Serializable

    Frontend implementation of lambdas.

    Frontend implementation of lambdas. Should be transformed to FuncValue.

  72. trait LazyCollection[V <: SType] extends Value[SCollection[V]] with NotReadyValue[SCollection[V]]
  73. case class LogicalNot(input: Value[SBoolean.type]) extends Value[SBoolean.type] with NotReadyValueBoolean with Product with Serializable
  74. trait LogicalTransformerCompanion extends ValueCompanion

    Base trait for companions of OR, AND and XorOf nodes.

  75. 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

  76. case class MapCollection[IV <: SType, OV <: SType](input: Value[SCollection[IV]], mapper: Value[SFunc]) extends Value[SCollection[OV]] with Transformer[SCollection[IV], SCollection[OV]] with Product with Serializable

    Builds a new collection by applying a function to all elements of this collection.

    Builds a new collection by applying a function to all elements of this collection.

    IV

    the element type of the input collection.

    OV

    the element type of the returned collection.

    input

    the collection to be mapped

    mapper

    the function to apply to each element.

    returns

    a new collection of type Coll[OV] resulting from applying the given function mapper to each element of this collection and collecting the results.

  77. trait MethodByNameUnapply extends MethodsContainer

    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

  78. case class MethodCall(obj: Value[SType], method: SMethod, args: IndexedSeq[Value[SType]], typeSubst: Map[STypeVar, SType]) extends Value[SType] with Product with Serializable

    Represents in ErgoTree an invocation of method of the object obj with arguments args.

    Represents in ErgoTree an invocation of method of the object obj with arguments args. The SMethod instances in STypeCompanions may have type STypeIdent in methods types, but valid ErgoTree should have SMethod instances specialized for specific types of obj and args using specializeFor. This means, if we save typeId, methodId, and we save all the arguments, we can restore the specialized SMethod instance. This work by induction, if we assume all arguments are monomorphic, then we can make MethodCall monomorphic. Thus, all ErgoTree instances are monomorphic by construction.

    obj

    object on which method will be invoked

    method

    method to be invoked

    args

    arguments passed to the method on invocation

    typeSubst

    a map of concrete type for each generic type parameter

  79. case class MethodCallLike(obj: Value[SType], name: String, args: IndexedSeq[Value[SType]], tpe: SType = NoType) extends Value[SType] with Product with Serializable

    Frontend node to represent potential method call in a source code.

    Frontend node to represent potential method call in a source code. Should be resolved during compilation to MethodCall. Cannot be serialized to ErgoTree.

  80. case class MethodDesc(method: SMethod) extends OperationDesc with Product with Serializable

    Operation descriptor based on SMethod.

  81. case class MethodIRInfo(irBuilder: Option[PartialFunction[(SigmaBuilder, SValue, SMethod, Seq[SValue], STypeSubst), SValue]], javaMethod: Option[RMethod], 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)

  82. sealed trait MethodsContainer extends AnyRef

    Base trait for all method containers (which store methods and properties)

  83. case class ModQ(input: Value[SBigInt.type]) extends Value[SBigInt.type] with NotReadyValue[SBigInt.type] with Product with Serializable
  84. 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
  85. abstract class ModQArithOpCompanion extends ValueCompanion
  86. trait MonoTypeMethods extends MethodsContainer
  87. 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
  88. 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

  89. case class NamedDesc(operationName: String) extends OperationDesc with Product with Serializable

    Operation descriptor based on name.

  90. 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.

  91. trait NotReadyValue[S <: SType] extends Value[S]
  92. trait NotReadyValueAvlTree extends Value[SAvlTree.type] with NotReadyValue[SAvlTree.type]
  93. trait NotReadyValueBigInt extends Value[SBigInt.type] with NotReadyValue[SBigInt.type]
  94. trait NotReadyValueBoolean extends Value[SBoolean.type] with NotReadyValue[SBoolean.type]
  95. trait NotReadyValueBox extends Value[SBox.type] with NotReadyValue[SBox.type]
  96. trait NotReadyValueByteArray extends Value[SByteArray] with NotReadyValue[SByteArray]
  97. trait NotReadyValueGroupElement extends Value[SGroupElement.type] with NotReadyValue[SGroupElement.type]
  98. trait NotReadyValueInt extends Value[SInt.type] with NotReadyValue[SInt.type]
  99. trait NotReadyValueLong extends Value[SLong.type] with NotReadyValue[SLong.type]
  100. trait NumericCastCompanion extends ValueCompanion

    Base class for Upcast and Downcast companion objects.

  101. 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

  102. sealed trait OneArgumentOperation[IV <: SType, OV <: SType] extends Value[OV] with NotReadyValue[OV]
  103. trait OneArgumentOperationCompanion extends ValueCompanion
  104. trait OpGroup[C <: ValueCompanion] extends AnyRef
  105. case class OperationCostInfo[C <: CostKind](costKind: C, opDesc: OperationDesc) extends Product with Serializable

    Operation costing descriptors combined together.

  106. abstract class OperationDesc extends AnyRef

    Each costable operation is described in one of the following ways: 1) using ValueCompanion - operation with separate node class 2) using SMethod - operation represented as method.

    Each costable operation is described in one of the following ways: 1) using ValueCompanion - operation with separate node class 2) using SMethod - operation represented as method. 3) using string name - intermediate sub-operation present in cost model, but which is not a separate operation of ErgoTree.

  107. 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

  108. case class OptionGet[V <: SType](input: Value[SOption[V]]) extends Value[V] with Transformer[SOption[V], V] with Product with Serializable

    Returns the option's value.

    Returns the option's value.

    Exceptions thrown

    java.util.NoSuchElementException if the option is empty.

    Note

    The option must be nonempty.

  109. case class OptionGetOrElse[V <: SType](input: Value[SOption[V]], default: Value[V]) extends Value[V] with Transformer[SOption[V], V] with Product with Serializable

    Returns the option's value if the option is nonempty, otherwise return the result of evaluating default.

    Returns the option's value if the option is nonempty, otherwise return the result of evaluating default. NOTE: the default is evaluated even if the option contains the value i.e. not lazily.

    default

    the default expression.

  110. case class OptionIsDefined[V <: SType](input: Value[SOption[V]]) extends Value[SBoolean.type] with Transformer[SOption[V], SBoolean.type] with Product with Serializable

    Returns false if the option is None, true otherwise.

  111. 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

  112. trait PerItemCostValueCompanion extends ValueCompanion

    Should be inherited by companion objects of operations with per-item cost kind.

  113. sealed trait Quadruple[IV1 <: SType, IV2 <: SType, IV3 <: SType, OV <: SType] extends Value[OV] with NotReadyValue[OV]

    A tree node with three descendants

  114. trait QuadrupleCompanion extends ValueCompanion
  115. sealed trait Relation[LIV <: SType, RIV <: SType] extends Value[SBoolean.type] with Triple[LIV, RIV, SBoolean.type] with NotReadyValueBoolean
  116. trait RelationCompanion extends ValueCompanion
  117. trait SCollection[T <: SType] extends SProduct with SGenericType

    Base class for descriptors of Coll[T] ErgoTree type for some elemType T.

  118. case class SCollectionType[T <: SType](elemType: T) extends SCollection[T] with Product with Serializable

    Descriptor of Coll[T] ErgoTree type for some elemType T.

  119. trait SEmbeddable extends SType

    Base trait for all embeddable types.

  120. 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.

  121. 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.)

  122. trait SLogical extends SType

    Base type for SBoolean and SSigmaProp.

  123. case class SMethod(objType: MethodsContainer, 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).

  124. trait SMonoType extends SType with STypeCompanion

    Monomorphic type descriptor i.e.

    Monomorphic type descriptor i.e. a type without generic parameters.

    See also

    SGenericType

  125. trait SNumericType extends SProduct with STypeCompanion

    Marker trait for all numeric types.

  126. trait SNumericTypeMethods extends MonoTypeMethods
  127. 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 by Some or by None constructors.

  128. 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).

  129. 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.

  130. trait SProduct extends SType

    Base trait for all types which have methods (and properties)

  131. case class STuple(items: IndexedSeq[SType]) extends SCollection[SAny.type] with Product with Serializable

    Type descriptor of tuple type.

  132. 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))

  133. 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.

  134. 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

  135. implicit final class STypeOps extends AnyVal
  136. case class STypeParam(ident: STypeVar, upperBound: Option[SType] = None, lowerBound: Option[SType] = None) extends Product with Serializable

    Represents a type parameter in a type system.

    Represents a type parameter in a type system.

    ident

    The identifier for this type parameter.

    upperBound

    The upper bound of this type parameter, if exists.

    lowerBound

    The lower bound of this type parameter, if exists.

    Note

    Type parameters with bounds are currently not supported.

  137. type STypeSubst = Map[STypeVar, SType]

    Type alias for a substitution of type variables with their corresponding types.

  138. 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.

  139. case class Select(obj: Value[SType], field: String, resType: Option[SType] = None) extends Value[SType] with Product with Serializable

    Frontend node to select a field from an object.

    Frontend node to select a field from an object. Should be transformed to SelectField

  140. case class SelectField(input: Value[STuple], fieldIndex: Byte) extends Value[SType] with Transformer[STuple, SType] with NotReadyValue[SType] with Product with Serializable

    Select tuple field by its 1-based index.

    Select tuple field by its 1-based index. E.g. input._1 is transformed to SelectField(input, 1)

  141. case class SeqCostItem(opDesc: OperationDesc, costKind: PerItemCost, nItems: Int) extends CostItem with Product with Serializable

    An item in the cost accumulation trace of a sigma.ast.ErgoTree evaluation.

    An item in the cost accumulation trace of a sigma.ast.ErgoTree evaluation. Represents cost of a sequence of operation. Used for debugging, testing and profiling of costing.

    opDesc

    descriptor of the ErgoTree operation

    costKind

    descriptor of the cost added to accumulator

    nItems

    number of items in the sequence

  142. case class SigmaAnd(items: Seq[SigmaPropValue]) extends SigmaPropValue with SigmaTransformer[SigmaPropValue, SigmaPropValue] with Product with Serializable

    AND conjunction for sigma propositions

  143. abstract class SigmaBuilder extends AnyRef

    Abstract interface of ErgoTree node builders.

    Abstract interface of ErgoTree node builders. Each method of the interface creates the corresponding ErgoTree node. The signatures of the methods reflect the constructors of the nodes. See the corresponding node classes for details.

  144. trait SigmaNode extends Product

    Base type for all AST nodes of ErgoTree.

  145. trait SigmaNodeCompanion extends AnyRef

    Base type for all companions of AST nodes of sigma lang.

  146. case class SigmaOr(items: Seq[SigmaPropValue]) extends SigmaPropValue with SigmaTransformer[SigmaPropValue, SigmaPropValue] with Product with Serializable

    OR disjunction for sigma propositions

  147. case class SigmaPropBytes(input: Value[SSigmaProp.type]) extends Value[SByteArray] with Transformer[SSigmaProp.type, SByteArray] with NotReadyValue[SByteArray] with Product with Serializable

    Extract serialized bytes of a SigmaProp value

  148. case class SigmaPropIsProven(input: Value[SSigmaProp.type]) extends Value[SBoolean.type] with Transformer[SSigmaProp.type, SBoolean.type] with NotReadyValueBoolean with Product with Serializable

    Represents execution of Sigma protocol that validates the given input SigmaProp.

  149. trait SigmaTransformer[IV <: SigmaPropValue, OV <: SigmaPropValue] extends SigmaPropValue
  150. trait SigmaTransformerCompanion extends ValueCompanion
  151. trait SimpleRelation[T <: SType] extends Value[SBoolean.type] with Relation[T, T]
  152. trait SimpleTransformerCompanion extends ValueCompanion
  153. case class SizeOf[V <: SType](input: Value[SCollection[V]]) extends Value[SInt.type] with Transformer[SCollection[V], SInt.type] with NotReadyValueInt with Product with Serializable

    The length of the collection (aka size).

  154. case class Slice[IV <: SType](input: Value[SCollection[IV]], from: Value[SInt.type], until: Value[SInt.type]) extends Value[SCollection[IV]] with Transformer[SCollection[IV], SCollection[IV]] with Product with Serializable

    Selects an interval of elements.

    Selects an interval of elements. The returned collection is made up of all elements x which satisfy the invariant:

    from <= indexOf(x) < until
    from

    the lowest index to include from this collection.

    until

    the lowest index to EXCLUDE from this collection.

  155. case class SourceContext(line: Int, column: Int, sourceLine: String) extends Product with Serializable
  156. class StdSigmaBuilder extends SigmaBuilder

    Standard implementation of SigmaBuilder interface in which most of the operations delegate common logic to equalityOp, comparisonOp and arithOp with default implementation.

    Standard implementation of SigmaBuilder interface in which most of the operations delegate common logic to equalityOp, comparisonOp and arithOp with default implementation. Note, each method of this class uses current value of currentSrcCtx dynamic variable to attach SourceContext to the created node. Thus, it is a responsibility of the caller to provide valid value of the currentSrcCtx variable. (See for example how this variable is used in SigmaParser.)

  157. 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

  158. trait TaggedVariable[T <: SType] extends Value[T] with NotReadyValue[T]

    Reference a context variable by id.

  159. case class TaggedVariableNode[T <: SType](varId: Byte, tpe: T) extends Value[T] with TaggedVariable[T] with Product with Serializable
  160. trait Transformer[IV <: SType, OV <: SType] extends Value[OV] with NotReadyValue[OV]

    Every operation is a transformer of some kind.

    Every operation is a transformer of some kind. This trait is used merely to simplify implementation and avoid copy-paste.

  161. class TransformingSigmaBuilder extends StdSigmaBuilder

    Builder which does automatic upcast of numeric arguments when necessary.

    Builder which does automatic upcast of numeric arguments when necessary. The upcast is implemented by inserting additional Upcast nodes. It also performs checking of constrains.

  162. 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 root tree using proof proof.

    Perform a lookup of key key in a tree with root tree using proof proof. Throws exception if proof is incorrect Return Some(bytes) of leaf with key key if it exists Return None if leaf with provided key does not exist.

  163. sealed trait Triple[LIV <: SType, RIV <: SType, OV <: SType] extends Value[OV] with NotReadyValue[OV]

    A tree node with left and right descendants

  164. case class Tuple(items: IndexedSeq[Value[SType]]) extends EvaluatedValue[STuple] with EvaluatedCollection[SAny.type, STuple] with Product with Serializable

    ErgoTree node which converts a collection of expressions into a tuple of data values of different types.

    ErgoTree node which converts a collection of expressions into a tuple of data values of different types. Each data value of the resulting collection is obtained by evaluating the corresponding expression in items. All items may have different types.

    items

    source collection of expressions

  165. trait TwoArgumentOperationCompanion extends ValueCompanion
  166. sealed trait TwoArgumentsOperation[LIV <: SType, RIV <: SType, OV <: SType] extends Value[OV] with Triple[LIV, RIV, OV]
  167. abstract class TypeBasedCost extends CostKind

    Descriptor of the cost which depends on type.

  168. case class TypeBasedCostItem(opDesc: OperationDesc, costKind: TypeBasedCost, tpe: SType) extends CostItem with Product with Serializable

    An item in the cost accumulation trace of a sigma.ast.ErgoTree evaluation.

    An item in the cost accumulation trace of a sigma.ast.ErgoTree evaluation. Represents cost of an operation which depends on type (e.g. type of arguments). Used for debugging, testing and profiling of costing.

    opDesc

    descriptor of the ErgoTree operation

    costKind

    type based cost descriptor added to accumulator

    tpe

    concrete type on this the operation is executed

    See also

    LE, GT

  169. case class UnparsedErgoTree(bytes: WrappedArray[Byte], error: ValidationException) extends Product with Serializable

    This is alternative representation of ErgoTree expression when it cannot be parsed due to error.

    This is alternative representation of ErgoTree expression when it cannot be parsed due to error. This is used by the nodes running old versions of code to recognize soft-fork conditions and skip validation of box propositions which are unparsable.

  170. 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

  171. trait Val extends Value[SType]
  172. case class ValDef(id: Int, tpeArgs: Seq[STypeVar], rhs: SValue) extends Value[SType] with BlockItem with Product with Serializable

    IR node for let-bound expressions let x = rhs which is ValDef, or let f[T] = rhs which is FunDef.

    IR node for let-bound expressions let x = rhs which is ValDef, or let f[T] = rhs which is FunDef. These nodes are used to represent ErgoTrees after common sub-expression elimination. This representation is more compact in serialized form.

    id

    unique identifier of the variable in the current scope.

  173. case class ValNode(name: String, givenType: SType, body: SValue) extends Value[SType] with Val with Product with Serializable
  174. case class ValUse[T <: SType](valId: Int, tpe: T) extends Value[T] with NotReadyValue[T] with Product with Serializable

    Special node which represents a reference to ValDef it was introduced as result of CSE.

  175. abstract class Value[+S <: SType] extends SigmaNode

    Base class for all ErgoTree expression nodes.

    Base class for all ErgoTree expression nodes.

    See also

    ErgoTree

  176. trait ValueCompanion extends SigmaNodeCompanion

    Base class for all companion objects which are used as operation descriptors.

  177. 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

  178. 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 &&

  179. case class ZKProofBlock(body: SigmaPropValue) extends BoolValue with Product with Serializable

    IR node to represent explicit Zero Knowledge scope in ErgoTree.

    IR node to represent explicit Zero Knowledge scope in ErgoTree. Compiler checks Zero Knowledge properties and issue error message is case of violations. ZK-scoping is optional, it can be used when the user want to ensure Zero Knowledge of specific set of operations. Usually it will require simple restructuring of the code to make the scope body explicit. Invariants checked by the compiler:

    • single ZKProof in ErgoTree in a root position
    • no boolean operations in the body, because otherwise the result may be disclosed
    • all the operations are over SigmaProp values

    For motivation and details see https://github.com/ScorexFoundation/sigmastate-interpreter/issues/236

Value Members

  1. val EmptySubst: Map[STypeVar, SType]

    Immutable and sharable empty substitution.

  2. def applySubst(tpe: SType, subst: STypeSubst): SType

    Applies a type substitution to a given type.

    Applies a type substitution to a given type.

    tpe

    the type to apply the substitution to

    subst

    the type substitution to apply

    returns

    the type after applying the substitution

  3. def msgType(t1: SType, t2: SType): Option[SType]

    Computes the most general type given two types.

    Computes the most general type given two types.

    t1

    the first type

    t2

    the second type

    returns

    the most general type if it exists, otherwise None

  4. def msgTypeOf(ts: Seq[SType]): Option[SType]

    Most Specific Generalized (MSG) type of ts.

    Most Specific Generalized (MSG) type of ts. Currently just the type of the first element as long as all the elements have the same type.

  5. def unifyTypeLists(items1: Seq[SType], items2: Seq[SType]): Option[STypeSubst]

    Performs pairwise type unification making sure each type variable is equally substituted in all items.

  6. def unifyTypes(t1: SType, t2: SType): Option[STypeSubst]

    Finds a substitution subst of type variables such that unifyTypes(applySubst(t1, subst), t2) shouldBe Some(emptySubst)

  7. object AND extends LogicalTransformerCompanion with Serializable
  8. object Append extends ValueCompanion with Serializable
  9. object Apply extends FixedCostValueCompanion with Serializable
  10. object ApplyTypes extends ValueCompanion with Serializable
  11. object ArithOp extends Serializable
  12. object AtLeast extends ValueCompanion with Serializable
  13. object AvlTreeConstant
  14. object BigIntArrayConstant
  15. object BigIntConstant
  16. object BinAnd extends RelationCompanion with FixedCostValueCompanion with Serializable
  17. object BinOr extends RelationCompanion with FixedCostValueCompanion with Serializable
  18. object BinXor extends RelationCompanion with FixedCostValueCompanion with Serializable
  19. object BitInversion extends OneArgumentOperationCompanion with Serializable
  20. object BitOp extends Serializable
  21. object Block extends ValueCompanion with Serializable
  22. object BlockItem
  23. object BlockValue extends ValueCompanion with Serializable
  24. object BoolArrayConstant
  25. object BoolToSigmaProp extends FixedCostValueCompanion with Serializable
  26. object BooleanConstant
  27. object BoxConstant
  28. object ByIndex extends FixedCostValueCompanion with Serializable
  29. object ByteArrayConstant
  30. object ByteArrayToBigInt extends SimpleTransformerCompanion with Serializable
  31. object ByteArrayToLong extends SimpleTransformerCompanion with Serializable
  32. object ByteConstant
  33. object CalcBlake2b256 extends SimpleTransformerCompanion with Serializable
  34. object CalcHash
  35. object CalcSha256 extends SimpleTransformerCompanion with Serializable
  36. case object CheckingSigmaBuilder extends CheckingSigmaBuilder with Product with Serializable

    Builder which performs checking of constraints on numeric operations.

  37. object CollectionConstant
  38. object ConcreteCollection extends FixedCostValueCompanion with Serializable
  39. object ConcreteCollectionBooleanConstant extends ValueCompanion
  40. object Constant extends FixedCostValueCompanion
  41. object ConstantPlaceholder extends ValueCompanion with Serializable
  42. object Constraints
  43. case object Context extends Value[SContext.type] with NotReadyValue[SContext.type] with ValueCompanion with Product with Serializable

    When interpreted evaluates to the singleton instance of sigma.Context.

    When interpreted evaluates to the singleton instance of sigma.Context. Corresponds to CONTEXT variable in ErgoScript which can be used like CONTEXT.headers.

  44. object CreateAvlTree extends ValueCompanion with Serializable
  45. object CreateProveDHTuple extends FixedCostValueCompanion with Serializable
  46. object CreateProveDlog extends FixedCostValueCompanion with Serializable
  47. object DecodePoint extends SimpleTransformerCompanion with FixedCostValueCompanion with Serializable
  48. case object DeserializationSigmaBuilder extends TransformingSigmaBuilder with Product with Serializable

    Builder of ErgoTree nodes which is used in deserializers.

  49. object DeserializeContext extends ValueCompanion with Serializable
  50. object DeserializeRegister extends ValueCompanion with Serializable
  51. object Downcast extends NumericCastCompanion with Serializable
  52. case object DynamicCost extends CostKind with Product with Serializable

    Cost of operation cannot be described using fixed set of parameters.

    Cost of operation cannot be described using fixed set of parameters. In this case the operation cost is a sum of sub-operation costs. See EQ, NEQ.

  53. object EQ extends RelationCompanion with Serializable
  54. object ErgoTree extends Serializable
  55. object Exists extends BooleanTransformerCompanion with Serializable
  56. object Exponentiate extends TwoArgumentOperationCompanion with FixedCostValueCompanion with Serializable
  57. object ExtractAmount extends SimpleTransformerCompanion with FixedCostValueCompanion with Serializable
  58. object ExtractBytes extends SimpleTransformerCompanion with Serializable
  59. object ExtractBytesWithNoRef extends SimpleTransformerCompanion with Serializable
  60. object ExtractCreationInfo extends SimpleTransformerCompanion with Serializable
  61. object ExtractId extends SimpleTransformerCompanion with Serializable
  62. object ExtractRegisterAs extends FixedCostValueCompanion with Serializable
  63. object ExtractScriptBytes extends SimpleTransformerCompanion with FixedCostValueCompanion with Serializable
  64. object FalseLeaf extends ConstantNode[SBoolean.type] with ValueCompanion

    ErgoTree node which represents false literal.

  65. object Filter extends ValueCompanion with Serializable
  66. object FixedCostItem extends Serializable
  67. object Fold extends ValueCompanion with Serializable
  68. object ForAll extends BooleanTransformerCompanion with Serializable
  69. object FunDef extends ValueCompanion
  70. object FuncValue extends FixedCostValueCompanion with Serializable
  71. object GE extends RelationCompanion with Serializable
  72. object GT extends RelationCompanion with Serializable
  73. object GetVar extends FixedCostValueCompanion with Serializable
  74. case object Global extends Value[SGlobal.type] with NotReadyValue[SGlobal.type] with FixedCostValueCompanion with Product with Serializable

    When interpreted evaluates to the singleton instance of sigma.SigmaDslBuilder.

    When interpreted evaluates to the singleton instance of sigma.SigmaDslBuilder. Corresponds to Global variable in ErgoScript which can be used like Global.groupGenerator.

  75. object GroupElementConstant
  76. case object GroupGenerator extends EvaluatedValue[SGroupElement.type] with ValueCompanion with Product with Serializable

    ErgoTree node that represents the operation of obtaining the generator of elliptic curve group.

    ErgoTree node that represents the operation of obtaining the generator of elliptic curve group. The generator g of the group is an element of the group such that, when written multiplicative form, every element of the group is a power of g.

  77. object HeaderConstant
  78. case object Height extends Value[SInt.type] with NotReadyValueInt with FixedCostValueCompanion with Product with Serializable

    When interpreted evaluates to a IntConstant built from Context.currentHeight

  79. object Ident extends ValueCompanion with Serializable
  80. object If extends QuadrupleCompanion with FixedCostValueCompanion with Serializable
  81. case object Inputs extends Value[SCollection[SBox.type]] with LazyCollection[SBox.type] with FixedCostValueCompanion with Product with Serializable

    When interpreted evaluates to a collection of BoxConstant built from Context.boxesToSpend

  82. object IntArrayConstant
  83. object IntConstant
  84. object JitCost extends Serializable
  85. object LE extends RelationCompanion with Serializable
  86. object LT extends RelationCompanion with Serializable
  87. object Lambda extends ValueCompanion with Serializable
  88. case object LastBlockUtxoRootHash extends Value[SAvlTree.type] with NotReadyValueAvlTree with ValueCompanion with Product with Serializable

    When interpreted evaluates to a AvlTreeConstant built from Context.lastBlockUtxoRoot

  89. object LogicalNot extends FixedCostValueCompanion with Serializable
  90. object LongArrayConstant
  91. object LongConstant
  92. object LongToByteArray extends SimpleTransformerCompanion with Serializable
  93. object MapCollection extends ValueCompanion with Serializable
  94. object MethodCall extends FixedCostValueCompanion with Serializable
  95. object MethodCallLike extends ValueCompanion with Serializable
  96. object MethodsContainer
  97. case object MinerPubkey extends Value[SByteArray] with NotReadyValueByteArray with ValueCompanion with Product with Serializable

    When interpreted evaluates to a ByteArrayConstant built from Context.minerPubkey

  98. object ModQ extends ValueCompanion with Serializable
  99. object ModQArithOp extends OpGroup[ModQArithOpCompanion] with Serializable
  100. object MultiplyGroup extends TwoArgumentOperationCompanion with FixedCostValueCompanion with Serializable
  101. object NEQ extends RelationCompanion with Serializable
  102. object Negation extends OneArgumentOperationCompanion with FixedCostValueCompanion with Serializable
  103. case 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.

  104. 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.

  105. object OR extends LogicalTransformerCompanion with Serializable
  106. object OperationInfo extends Serializable
  107. 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.

  108. object OptionGet extends SimpleTransformerCompanion with FixedCostValueCompanion with Serializable
  109. object OptionGetOrElse extends ValueCompanion with FixedCostValueCompanion with Serializable
  110. object OptionIsDefined extends SimpleTransformerCompanion with FixedCostValueCompanion with Serializable
  111. case object Outputs extends Value[SCollection[SBox.type]] with LazyCollection[SBox.type] with FixedCostValueCompanion with Product with Serializable

    When interpreted evaluates to a collection of BoxConstant built from Context.spendingTransaction.outputs

  112. object PreHeaderConstant
  113. object PropertyCall extends FixedCostValueCompanion
  114. case object SAny extends SPrimType with SMonoType with Product with Serializable

    Any other type is implicitly subtype of this type.

  115. case object SAnyMethods extends MonoTypeMethods with Product with Serializable

    Any other type is implicitly subtype of this type.

  116. case object SAvlTree extends SProduct with SPredefType with SMonoType with Product with Serializable

    Type descriptor of AvlTree type of ErgoTree.

  117. case object SAvlTreeMethods extends MonoTypeMethods with Product with Serializable

    Type descriptor of AvlTree type of ErgoTree.

  118. case 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.

  119. case object SBigIntMethods extends SNumericTypeMethods with Product with Serializable

    Methods of BigInt type.

    Methods of BigInt type. Implemented using java.math.BigInteger.

  120. case object SBoolean extends SPrimType with SEmbeddable with SLogical with SProduct with SMonoType with Product with Serializable

    Descriptor of ErgoTree type Boolean holding true or false values.

  121. case object SBooleanMethods extends MonoTypeMethods with Product with Serializable

    Methods of ErgoTree type Boolean.

  122. case object SBox extends SProduct with SPredefType with SMonoType with Product with Serializable

    Type descriptor of Box type of ErgoTree.

  123. case object SBoxMethods extends MonoTypeMethods with Product with Serializable

    Type descriptor of Box type of ErgoTree.

  124. case object SByte extends SPrimType with SEmbeddable with SNumericType with SMonoType with Product with Serializable

    Descriptor of ErgoTree type Byte - 8-bit signed integer.

  125. case object SByteMethods extends SNumericTypeMethods with Product with Serializable

    Methods of ErgoTree type Byte.

  126. object SCollection extends STypeCompanion
  127. object SCollectionMethods extends MethodsContainer with MethodByNameUnapply
  128. object SCollectionType extends Serializable
  129. case object SContext extends SProduct with SPredefType with SMonoType with Product with Serializable

    Type descriptor of Context type of ErgoTree.

  130. case object SContextMethods extends MonoTypeMethods with Product with Serializable

    Type descriptor of Context type of ErgoTree.

  131. object SFunc extends Serializable
  132. case 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 sigma.SigmaDslBuilder, which is an interface implemented by the singleton sigmastate.eval.CostingSigmaDslBuilder

    The 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

  133. case object SGlobalMethods extends MonoTypeMethods 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 sigma.SigmaDslBuilder, which is an interface implemented by the singleton sigmastate.eval.CostingSigmaDslBuilder

    The 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

  134. case 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

  135. case object SGroupElementMethods extends MonoTypeMethods with Product with Serializable

    Methods of type GroupElement.

  136. case object SHeader extends SProduct with SPredefType with SMonoType with Product with Serializable

    Type descriptor of Header type of ErgoTree.

  137. case object SHeaderMethods extends MonoTypeMethods with Product with Serializable

    Type descriptor of Header type of ErgoTree.

  138. case object SInt extends SPrimType with SEmbeddable with SNumericType with SMonoType with Product with Serializable

    Descriptor of ErgoTree type Int - 32-bit signed integer.

  139. case object SIntMethods extends SNumericTypeMethods with Product with Serializable

    Descriptor of ErgoTree type Int.

  140. case object SLong extends SPrimType with SEmbeddable with SNumericType with SMonoType with Product with Serializable

    Descriptor of ErgoTree type Long - 64-bit signed integer.

  141. case object SLongMethods extends SNumericTypeMethods with Product with Serializable

    Descriptor of ErgoTree type Long.

  142. object SMethod extends Serializable
  143. object SNumericType extends STypeCompanion
  144. object SNumericTypeMethods extends MethodsContainer
  145. object SOption extends STypeCompanion with Serializable
  146. object SOptionMethods extends MethodsContainer
  147. object SPair

    Helper constuctor/extractor for tuples of two types.

  148. case object SPreHeader extends SProduct with SPredefType with SMonoType with Product with Serializable

    Type descriptor of PreHeader type of ErgoTree.

  149. case object SPreHeaderMethods extends MonoTypeMethods with Product with Serializable

    Type descriptor of PreHeader type of ErgoTree.

  150. object SPrimType

    Primitive type recognizer to pattern match on TypeCode

  151. case object SShort extends SPrimType with SEmbeddable with SNumericType with SMonoType with Product with Serializable

    Descriptor of ErgoTree type Short - 16-bit signed integer.

  152. case object SShortMethods extends SNumericTypeMethods with Product with Serializable

    Methods of ErgoTree type Short.

  153. case 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.

  154. case object SSigmaPropMethods extends MonoTypeMethods with Product with Serializable

    Methods of type SigmaProp which represent sigma-protocol propositions.

  155. case 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

  156. case object SStringMethods extends MonoTypeMethods with Product with Serializable

    Methods of type String.

  157. object STuple extends STypeCompanion with Serializable
  158. object STupleMethods extends MethodsContainer
  159. object SType
  160. object STypeApply extends Serializable
  161. object STypeParam extends Serializable
  162. object STypeVar extends Serializable
  163. case object SUnit extends SPrimType with SMonoType with Product with Serializable

    The type with single inhabitant value ()

  164. case object SUnitMethods extends MonoTypeMethods with Product with Serializable

    The type with single inhabitant value ()

  165. object Select extends ValueCompanion with Serializable
  166. object SelectField extends FixedCostValueCompanion with Serializable
  167. case object Self extends Value[SBox.type] with NotReadyValueBox with FixedCostValueCompanion with Product with Serializable

    When interpreted evaluates to a BoxConstant built from context.boxesToSpend(context.selfIndex)

  168. object SeqCostItem extends Serializable
  169. object ShortArrayConstant
  170. object ShortConstant
  171. object SigmaAnd extends SigmaTransformerCompanion with Serializable
  172. object SigmaOr extends SigmaTransformerCompanion with Serializable
  173. object SigmaPredef
  174. object SigmaPropBytes extends PerItemCostValueCompanion with Serializable
  175. object SigmaPropConstant
  176. object SigmaPropIsProven extends ValueCompanion with Serializable
  177. object SimpleRelation
  178. object SizeOf extends SimpleTransformerCompanion with FixedCostValueCompanion with Serializable
  179. object Slice extends ValueCompanion with Serializable
  180. object SourceContext extends Serializable
  181. case object StdSigmaBuilder extends StdSigmaBuilder with Product with Serializable

    Standard builder which don't perform any additional transformations and checking.

  182. object StringConstant
  183. object SubstConstants extends ValueCompanion with Serializable
  184. object TaggedVariable extends ValueCompanion
  185. case object TransformingSigmaBuilder extends TransformingSigmaBuilder with Product with Serializable

    Builder of ErgoTree nodes which is used in SigmaCompiler.

  186. object TreeLookup extends QuadrupleCompanion with Serializable
  187. object TrueLeaf extends ConstantNode[SBoolean.type] with ValueCompanion

    ErgoTree node which represents true literal.

  188. object Tuple extends FixedCostValueCompanion with Serializable
  189. object TypeBasedCostItem extends Serializable
  190. object TypeCodes

    Encoding of types for serialization.

  191. object UnitConstant

    High-level interface to internal representation of Unit constants in ErgoTree.

  192. object Upcast extends NumericCastCompanion with Serializable
  193. object Val
  194. object ValDef extends ValueCompanion with Serializable
  195. object ValNode extends ValueCompanion with Serializable
  196. object ValUse extends FixedCostValueCompanion with Serializable
  197. object Value
  198. object ValueCompanion
  199. object Xor extends TwoArgumentOperationCompanion with Serializable
  200. object XorOf extends LogicalTransformerCompanion with Serializable
  201. object ZKProofBlock extends ValueCompanion with Serializable
  202. object syntax

    Contains global definitions which define syntactic extensions for working with classes of sigma.ast package.

Inherited from AnyRef

Inherited from Any

Ungrouped