Predefined Types
Boolean
The Boolean type represents true/false values.
Byte
Byte.toByte (106.1)
- Description: Converts this numeric value to Byte, throwing an exception on overflow.
- Signature:
def toByte: Byte - Serialized as: Downcast
Byte.toShort (106.2)
- Description: Converts this numeric value to Short, throwing an exception on overflow.
- Signature:
def toShort: Short - Serialized as: Upcast
Byte.toInt (106.3)
- Description: Converts this numeric value to Int, throwing an exception on overflow.
- Signature:
def toInt: Int - Serialized as: Upcast
Byte.toLong (106.4)
- Description: Converts this numeric value to Long, throwing an exception on overflow.
- Signature:
def toLong: Long - Serialized as: Upcast
Byte.toBigInt (106.5)
- Description: Converts this numeric value to BigInt.
- Signature:
def toBigInt: BigInt - Serialized as: Upcast
Short
Short.toByte (106.1)
- Description: Converts this numeric value to Byte, throwing an exception on overflow.
- Signature:
def toByte: Byte - Serialized as: Downcast
Short.toShort (106.2)
- Description: Converts this numeric value to Short, throwing an exception on overflow.
- Signature:
def toShort: Short - Serialized as: Downcast
Short.toInt (106.3)
- Description: Converts this numeric value to Int, throwing an exception on overflow.
- Signature:
def toInt: Int - Serialized as: Downcast
Short.toLong (106.4)
- Description: Converts this numeric value to Long, throwing an exception on overflow.
- Signature:
def toLong: Long - Serialized as: Upcast
Short.toBigInt (106.5)
- Description: Converts this numeric value to BigInt.
- Signature:
def toBigInt: BigInt - Serialized as: Upcast
Int
Int.toByte (106.1)
- Description: Converts this numeric value to Byte, throwing an exception on overflow.
- Signature:
def toByte: Byte - Serialized as: Downcast
Int.toShort (106.2)
- Description: Converts this numeric value to Short, throwing an exception on overflow.
- Signature:
def toShort: Short - Serialized as: Downcast
Int.toInt (106.3)
- Description: Converts this numeric value to Int, throwing an exception on overflow.
- Signature:
def toInt: Int - Serialized as: Downcast
Int.toLong (106.4)
- Description: Converts this numeric value to Long, throwing an exception on overflow.
- Signature:
def toLong: Long - Serialized as: Upcast
Int.toBigInt (106.5)
- Description: Converts this numeric value to BigInt.
- Signature:
def toBigInt: BigInt - Serialized as: Upcast
Long
Long.toByte (106.1)
- Description: Converts this numeric value to Byte, throwing an exception on overflow.
- Signature:
def toByte: Byte - Serialized as: Downcast
Long.toShort (106.2)
- Description: Converts this numeric value to Short, throwing an exception on overflow.
- Signature:
def toShort: Short - Serialized as: Downcast
Long.toInt (106.3)
- Description: Converts this numeric value to Int, throwing an exception on overflow.
- Signature:
def toInt: Int - Serialized as: Downcast
Long.toLong (106.4)
- Description: Converts this numeric value to Long, throwing an exception on overflow.
- Signature:
def toLong: Long - Serialized as: Downcast
Long.toBigInt (106.5)
- Description: Converts this numeric value to BigInt.
- Signature:
def toBigInt: BigInt - Serialized as: Upcast
BigInt
BigInt.toBigInt (106.5)
- Description: Converts this numeric value to BigInt.
- Signature:
def toBigInt: BigInt - Serialized as: Downcast
GroupElement
GroupElement.getEncoded (7.2)
- Description: Returns an encoding of the point value.
- Signature:
def getEncoded: Coll[Byte] - Serialized as: PropertyCall
GroupElement.exp (7.3)
- Description: Exponentiates this GroupElement to the given number. Returns this group element raised to the power of k.
- Signature:
def exp(k: BigInt): GroupElement - Parameters:
kThe power - Serialized as: Exponentiate
GroupElement.multiply (7.4)
- Description: Performs the group operation (multiplication) with another element.
- Signature:
def multiply(other: GroupElement): GroupElement - Parameters:
otherThe other element of the group. - Serialized as: MultiplyGroup
GroupElement.negate (7.5)
- Description: Returns the inverse element in the group.
- Signature:
def negate: GroupElement - Serialized as: PropertyCall
SigmaProp
Values of SigmaProp type hold sigma propositions, which can be proved and verified using Sigma protocols. Each sigma proposition is represented as an expression where sigma protocol primitives such as ProveDlogand ProveDHTuple are used as constants, and special sigma protocol connectives like AND,OR, and THRESHOLD are used as operations.
The abstract syntax of sigma propositions is shown below.
| Set | Syntax | Mnemonic | Description | |
|---|---|---|---|---|
| := | boolean value as sigma proposition | |||
| knowledge of discrete logarithm of | ||||
| knowledge of Diffie-Hellman tuple | ||||
| knowledge of out of secrets | ||||
| knowledge of any one of secrets | ||||
| knowledge of all secrets |
Every well-formed tree of sigma proposition is a value of type , thus following the notation of the evaluation section we can define denotation of
The following methods can be called on all instances of type.
SigmaProp.propBytes (8.1)
- Description: Returns the serialized bytes of this sigma proposition represented as ErgoTree.
- Parameters:
- Result:
Coll[Byte] - Serialized as: SigmaPropBytes
SigmaProp.isProven (8.2)
- Description: Verifies that the sigma proposition is proven. (FRONTEND ONLY)
- Parameters:
- Result:
Boolean
For a full list of primitive operations on type, seeAppendix B
Box
Box.value (99.1)
- Description: Monetary value in nanoErgs.
- Parameters:
- Result:
- Serialized as: ExtractAmount
Box.propositionBytes (99.2)
- Description: Serialized bytes of the guarding script. This script must evaluate to true to spend the box.
- Parameters:
- Result:
- Serialized as: ExtractScriptBytes
Box.bytes (99.3)
- Description: Returns the serialized bytes of this box's content, including proposition bytes.
- Parameters:
- Result:
- Serialized as: ExtractBytes
Box.bytesWithoutRef (99.4)
- Description: Returns the serialized bytes of this box's content, excluding the transactionId and output index.
- Parameters:
- Result:
- Serialized as: ExtractBytesWithNoRef
Box.id (99.5)
- Description: Returns the Blake2b256 hash of this box's content (
blake2b256(bytes)). - Parameters:
- Result:
- Serialized as: ExtractId
Box.creationInfo (99.6)
- Description: Returns the height and transaction/output index where the box was created.
creationInfo._1is the block height, andcreationInfo._2is the transaction identifier concatenated with the box index. - Parameters:
- Result:
- Serialized as: ExtractCreationInfo
Box.getReg (99.7)
- Description: Extracts register
regIdby ID and expected typeT. ReturnsSome(value)if the register exists and has the specified type,Noneotherwise. - Parameters: // zero-based identifier of the register.
- Result:
- Serialized as: ExtractRegisterAs
Box.tokens (99.8)
- Description: Returns the collection of secondary tokens held in the box.
- Parameters:
- Result:
- Serialized as: PropertyCall
Box.R0 (99.9)
- Description:Register R0: Monetary value in nanoErgs. Use `ExtractAmount` (value property).
- Parameters:
- Result:
- Serialized as: ExtractRegisterAs
Box.R1 (99.10)
- Description:Register R1: Guarding script bytes. Use `ExtractScriptBytes` (propositionBytes property).
- Parameters:
- Result:
- Serialized as: ExtractRegisterAs
Box.R2 (99.11)
- Description:Register R2: Secondary tokens [(TokenId, Amount)]. Use `ExtractTokens` (tokens property).
- Parameters:
- Result:
- Serialized as: ExtractRegisterAs
Box.R3 (99.12)
- Description:Register R3: Box creation information (height, txId, index). Use `ExtractCreationInfo` (creationInfo property).
- Parameters:
- Result:
- Serialized as: ExtractRegisterAs
Box.R4 (99.13)
- Description:Optional register R4 for arbitrary data storage. Use `ExtractRegisterAs`.
- Parameters:
- Result:
- Serialized as: ExtractRegisterAs
Box.R5 (99.14)
- Description:Optional register R5 for arbitrary data storage. Use `ExtractRegisterAs`.
- Parameters:
- Result:
- Serialized as: ExtractRegisterAs
Box.R6 (99.15)
- Description:Optional register R6 for arbitrary data storage. Use `ExtractRegisterAs`.
- Parameters:
- Result:
- Serialized as: ExtractRegisterAs
Box.R7 (99.16)
- Description:Optional register R7 for arbitrary data storage. Use `ExtractRegisterAs`.
- Parameters:
- Result:
- Serialized as: ExtractRegisterAs
Box.R8 (99.17)
- Description:Optional register R8 for arbitrary data storage. Use `ExtractRegisterAs`.
- Parameters:
- Result:
- Serialized as: ExtractRegisterAs
Box.R9 (99.18)
- Description:Optional register R9 for arbitrary data storage. Use `ExtractRegisterAs`.
- Parameters:
- Result:
- Serialized as: ExtractRegisterAs
AvlTree
AvlTree.digest (100.1)
- Description: Returns the digest of the state represented by this tree (root hash bytes ++ tree height).
- Parameters:
- Result:
- Serialized as: PropertyCall
AvlTree.enabledOperations (100.2)
- Description: Returns the flags of enabled operations packed into a single byte.
- Parameters:
- Result:
- Serialized as: PropertyCall
isInsertAllowed == (enabledOperations & 0x01) != 0 isUpdateAllowed == (enabledOperations & 0x02) != 0 isRemoveAllowed == (enabledOperations & 0x04) != 0
AvlTree.keyLength (100.3)
- Description:
- Parameters:
- Result:
- Serialized as: PropertyCall
AvlTree.valueLengthOpt (100.4)
- Description:
- Parameters:
- Result:
- Serialized as: PropertyCall
AvlTree.isInsertAllowed (100.5)
- Description:
- Parameters:
- Result:
- Serialized as: PropertyCall
AvlTree.isUpdateAllowed (100.6)
- Description:
- Parameters:
- Result:
- Serialized as: PropertyCall
AvlTree.isRemovedAllowed (100.7)
- Description:
- Parameters:
- Result:
- Serialized as: PropertyCall
AvlTree.updateOperations (100.8)
- Description:
- Parameters:
- Result:
- Serialized as: MethodCall
AvlTree.contains (100.9)
- Description:
- Parameters:
- Result:
- Serialized as: MethodCall
AvlTree.get (100.10)
- Description:
- Parameters:
- Result:
- Serialized as: MethodCall
AvlTree.getMeny (100.11)
- Description:
- Parameters:
- Result:
- Serialized as: MethodCall
AvlTree.insert (100.12)
- Description:
- Parameters:
- Result:
- Serialized as: MethodCall
AvlTree.update (100.13)
- Description:
- Parameters:
- Result:
- Serialized as: MethodCall
AvlTree.remove (100.14)
- Description:
- Parameters:
- Result:
- Serialized as: MethodCall
AvlTree.updateDigest (100.15)
- Description:
- Parameters:
- Result:
- Serialized as: MethodCall
Header
Documentation for Header type methods will be added here.
PreHeader
Documentation for PreHeader type methods will be added here.
Context
Documentation for Context type methods will be added here.
Global
Documentation for Global type methods will be added here.
Coll
Documentation for Coll type methods will be added here.
Option
Documentation for Option type methods will be added here.