AND logical conjunction
Meta information which can be attached to each argument of SMethod.
Meta information which can be attached to each argument of SMethod.
name of the argument
argument description.
NOTE: by-name argument is required for correct initialization order.
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.
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.
authenticated tree digest: root hash along with tree height
- allowed modifications. See AvlTreeFlags description for details
- all the elements under the tree have the same length
- if non-empty, all the values under the tree are of the same length
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
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
NOTE: by-name argument is required for correct initialization order.
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.
Convert SByteArray to SBigInt
Convert SByteArray to SLong
AND conjunction for sigma propositions
OR disjunction for sigma propositions
THRESHOLD connector for sigma propositions
Calculate Blake2b hash from input
Calculate Sha256 hash from input
An instance of this class is created in each STypeCompaion.coster
property implementation.
An instance of this class is created in each STypeCompaion.coster
property implementation.
SBox, SContext
Special interface to access CostingHandler.
Special interface to access CostingHandler.
Each STypeCompanion.coster
property optionally defines an instance of this interface to provide
access to Coster for its methods. If not specified (which is default) then generic costing mechanism
is not used for methods of the corresponding type. (e.g. SInt, SLong)
Construct a new authenticated dictionary with given parameters and tree root digest.
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)
ErgoTree operation to create a new SigmaProp value representing public key of discrete logarithm signature protocol.
Convert SByteArray to SGroupElement using CryptoConstants.dlogGroup.curve.decodePoint(bytes)
Down cast for Numeric types
Equals operation for SType todo: make EQ to really accept only values of the same type, now EQ(TrueLeaf, IntConstant(5)) is valid
Greater or equals operation for SInt
Greater operation for SInt
If conditional function.
If conditional function. Non-lazy - evaluate both branches.
- condition to check
- branch that will be used if condition is true
- branch that will be used if condition is false
Less or equals operation for SInt
Less operation for SInt
Convert SLong to SByteArray
Meta information connecting SMethod with ErgoTree.
Meta information connecting SMethod with ErgoTree.
optional recognizer and ErgoTree node builder.
Non-Equals operation for SType
Negation operation on numeric type T.
OR logical conjunction
Meta information which can be attached to SMethod.
Meta information which can be attached to SMethod.
human readable description of the method
one item for each argument
A tree node with three descendants
Base trait for all embeddable types.
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.)
Method info including name, arg type and result type.
Method info including name, arg type and result type.
Here stype.tDom - arg type and stype.tRange - result type.
methodId
should be unique among methods of the same objType.
Monomorphic type descriptor i.e.
Monomorphic type descriptor i.e. a type without generic parameters.
SGenericType
Marker trait for all numeric types.
Type description of optional values.
Type description of optional values. Instances of Option
are either constructed by Some
or by None
constructors.
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).
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.
Base trait for all types which have methods (and properties)
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))
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.
SInt, SGroupElement, SType
Type variable which is used in generic method/func signatures.
AND conjunction for sigma propositions
Base type for all AST nodes of sigma lang.
Base type for all companions of AST nodes of sigma lang.
OR disjunction for sigma propositions
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.
serialized ErgoTree with ConstantSegregationFlag set to 1.
zero based indexes in ErgoTree.constants array which should be replaced with new values
new values to be injected into the corresponding positions in ErgoTree.constants array
original scriptBytes array where only specified constants are replaced and all other bytes remain exactly the same
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.
A tree node with left and right descendants
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.
Up cast for Numeric types
XOR for two SByteArray
Similar to allOf, but performing logical XOR operation instead of &&
SInt division
Prover Step 7: Convert the tree to a string s for input to the Fiat-Shamir hash function.
Prover Step 7: Convert the tree to a string s for input to the Fiat-Shamir hash function. The conversion should be such that the tree can be unambiguously parsed and restored given the string. For each non-leaf node, the string should contain its type (OR or AND). For each leaf node, the string should contain the Sigma-protocol statement being proven and the commitment. The string should not contain information on whether a node is marked "real" or "simulated", and should not contain challenges, responses, or the real/simulated flag for any node.
SInt subtraction
SInt modulo
SInt multiplication
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.
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.
SInt addition
Any other type is implicitly subtype of this type.
Type of 256 bit integet values.
Type of 256 bit integet values. Implemented using java.math.BigInteger.
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.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.
sigmastate.lang.SigmaPredef
NOTE: this descriptor both type and type companion
Helper constuctor/extractor for tuples of two types.
Primitive type recognizer to pattern match on TypeCode
NOTE: this descriptor both type and type companion
The type with single inhabitant value ()