object CostingSigmaDslBuilder extends CostingSigmaDslBuilder
Default singleton instance of Global object, which implements global ErgoTree functions.
- Alphabetic
- By Inheritance
- CostingSigmaDslBuilder
- CostingSigmaDslBuilder
- TestSigmaDslBuilder
- SigmaDslBuilder
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
BigInt(n: BigInteger): BigInt
Create DSL big integer from existing
java.math.BigInteger
Create DSL big integer from existing
java.math.BigInteger
- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
-
def
Box(ebox: ErgoBox): Box
Wraps the given ErgoBox into SigmaDsl value of type Box.
Wraps the given ErgoBox into SigmaDsl value of type Box.
- ebox
the value to be wrapped
- Definition Classes
- CostingSigmaDslBuilder
- See also
-
def
Colls: CollBuilder
Access to collection operations.
Access to collection operations.
- Definition Classes
- TestSigmaDslBuilder → SigmaDslBuilder
-
def
CostModel: CostModel
Access to cost model (aka CostTable) parameters.
Access to cost model (aka CostTable) parameters.
- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
-
val
Costing: CostedBuilder
Access to operations used in cost computation.
Access to operations used in cost computation.
- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
-
def
GroupElement(p: ECPoint): GroupElement
Create DSL's group element from existing
org.bouncycastle.math.ec.ECPoint
.Create DSL's group element from existing
org.bouncycastle.math.ec.ECPoint
.- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder
-
def
Monoids: MonoidBuilder
Access to Monoid operations
Access to Monoid operations
- Definition Classes
- TestSigmaDslBuilder → SigmaDslBuilder
-
def
SigmaProp(sigmaTree: SigmaBoolean): SigmaProp
Wraps the given sigma proposition into SigmaDsl value of type SigmaProp.
Wraps the given sigma proposition into SigmaDsl value of type SigmaProp.
- Definition Classes
- CostingSigmaDslBuilder
-
val
__curve__: X9ECParameters
- Definition Classes
- TestSigmaDslBuilder
-
val
__g__: SecP256K1Point
- Definition Classes
- TestSigmaDslBuilder
-
def
allOf(conditions: Coll[Boolean]): Boolean
- returns
true if all the elements in collection are true.
- Definition Classes
- TestSigmaDslBuilder → SigmaDslBuilder
- Annotations
- @NeverInline()
-
def
allZK(props: Coll[SigmaProp]): SigmaProp
Returns a sigma proposition which is proven when ALL the propositions in the
conditions
are proven.Returns a sigma proposition which is proven when ALL the propositions in the
conditions
are proven.- returns
AND sigma protocol proposition
- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
-
def
anyOf(conditions: Coll[Boolean]): Boolean
Returns true if at least one element in the
conditions
is true, otherwise false.Returns true if at least one element in the
conditions
is true, otherwise false.- Definition Classes
- TestSigmaDslBuilder → SigmaDslBuilder
- Annotations
- @NeverInline()
-
def
anyZK(props: Coll[SigmaProp]): SigmaProp
Returns a sigma proposition which is proven when at least one of the propositions in the
conditions
is proven.Returns a sigma proposition which is proven when at least one of the propositions in the
conditions
is proven.- returns
OR sigma protocol proposition
- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
atLeast(bound: Int, props: Coll[SigmaProp]): SigmaProp
Logical threshold operation.
Logical threshold operation. AtLeast has two inputs: integer
bound
and a collection of
propssame as in anyZK/allZK.
- bound
number of props which should be proven in order to satisfy verifier
- props
a collection of sigma propositions of which at least the
bound
number should be proved.- returns
THRESHOLD sigma protocol proposition wrapped in SigmaProp value.
- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
-
def
avlTree(treeData: AvlTreeData): AvlTree
Wraps the given tree data into SigmaDsl value of type AvlTree.
Wraps the given tree data into SigmaDsl value of type AvlTree.
- Definition Classes
- CostingSigmaDslBuilder
-
def
avlTree(operationFlags: Byte, digest: Coll[Byte], keyLength: Int, valueLengthOpt: Option[Int]): CAvlTree
Construct a new authenticated dictionary with given parameters and tree root digest.
Construct a new authenticated dictionary with given parameters and tree root digest.
- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
-
def
blake2b256(bytes: Coll[Byte]): Coll[Byte]
Calculate Blake2b256 hash from the input
bytes
.Calculate Blake2b256 hash from the input
bytes
.- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
-
def
byteArrayToBigInt(bytes: Coll[Byte]): BigInt
Convert big-endian
bytes
representation (Coll[Byte]) to the corresponding BigInt value.Convert big-endian
bytes
representation (Coll[Byte]) to the corresponding BigInt value.- bytes
collection of bytes in big-endian format
- Definition Classes
- TestSigmaDslBuilder → SigmaDslBuilder
- Annotations
- @NeverInline()
-
def
byteArrayToLong(bytes: Coll[Byte]): Long
Convert big-endian
bytes
representation (Coll[Byte]) to the corresponding Long value.Convert big-endian
bytes
representation (Coll[Byte]) to the corresponding Long value.- Definition Classes
- TestSigmaDslBuilder → SigmaDslBuilder
- Annotations
- @NeverInline()
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
decodePoint(encoded: Coll[Byte]): GroupElement
Decodes the given bytes to the corresponding GroupElement using default serialization.
Decodes the given bytes to the corresponding GroupElement using default serialization.
- encoded
serialized bytes of some GroupElement value
- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
- See also
GroupElementSerializer
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
groupGenerator: GroupElement
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.
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.
- returns
the generator of this Dlog group
- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
-
def
groupIdentity: GroupElement
- returns
the identity of the Dlog group used in ErgoTree
- Definition Classes
- CostingSigmaDslBuilder
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
longToByteArray(l: Long): Coll[Byte]
Converts Long value
l
to the big-endian bytes representation.Converts Long value
l
to the big-endian bytes representation.- Definition Classes
- TestSigmaDslBuilder → SigmaDslBuilder
- Annotations
- @NeverInline()
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
proveDHTuple(g: GroupElement, h: GroupElement, u: GroupElement, v: GroupElement): SigmaProp
Creates a new SigmaProp value representing sigma proposition of the Diffie Hellman signature protocol.
Creates a new SigmaProp value representing sigma proposition of the Diffie Hellman signature protocol. Common input: (g,h,u,v)
- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
-
def
proveDlog(ge: GroupElement): SigmaProp
Creates a new SigmaProp value representing public key of the discrete logarithm signature protocol.
Creates a new SigmaProp value representing public key of the discrete logarithm signature protocol.
- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
-
def
sha256(bytes: Coll[Byte]): Coll[Byte]
Calculate Sha256 hash from the input
bytes
.Calculate Sha256 hash from the input
bytes
.- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
-
def
sigmaProp(b: Boolean): SigmaProp
Creates trivial sigma proposition with the given underlying Boolean value.
Creates trivial sigma proposition with the given underlying Boolean value.
- b
boolean value to be wrapped into SigmaProp
- returns
sigma proposition with can be combined with other SigmaProp values
- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
-
def
substConstants[T](scriptBytes: Coll[Byte], positions: Coll[Int], newValues: Coll[T])(implicit cT: RType[T]): Coll[Byte]
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
- Definition Classes
- CostingSigmaDslBuilder → TestSigmaDslBuilder → SigmaDslBuilder
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toAvlTreeData(p: AvlTree): AvlTreeData
Extract
sigmastate.AvlTreeData
from DSL'sAvlTree
type.Extract
sigmastate.AvlTreeData
from DSL'sAvlTree
type.- Definition Classes
- CostingSigmaDslBuilder
-
def
toBigInteger(n: BigInt): BigInteger
Extract
java.math.BigInteger
from DSL'sBigInt
typeExtract
java.math.BigInteger
from DSL'sBigInt
type- Definition Classes
- TestSigmaDslBuilder → SigmaDslBuilder
- Annotations
- @NeverInline() @Internal()
-
def
toECPoint(ge: GroupElement): ECPoint
Extract
org.bouncycastle.math.ec.ECPoint
from DSL'sGroupElement
type.Extract
org.bouncycastle.math.ec.ECPoint
from DSL'sGroupElement
type.- Definition Classes
- TestSigmaDslBuilder
- Annotations
- @NeverInline() @Internal()
-
def
toErgoBox(b: Box): ErgoBox
Extracts ErgoBox from the given Box instance.
Extracts ErgoBox from the given Box instance. This is inverse to the Box method.
- Definition Classes
- CostingSigmaDslBuilder
-
def
toSigmaBoolean(p: SigmaProp): SigmaBoolean
Extract
sigmastate.Values.SigmaBoolean
from DSL'sSigmaProp
type.Extract
sigmastate.Values.SigmaBoolean
from DSL'sSigmaProp
type.- Definition Classes
- CostingSigmaDslBuilder
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
implicit
val
validationSettings: SigmaValidationSettings
- Definition Classes
- CostingSigmaDslBuilder
-
def
verifyZK(proof: ⇒ SigmaProp): Boolean
- Definition Classes
- TestSigmaDslBuilder → SigmaDslBuilder
- Annotations
- @NeverInline()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
xor(l: Coll[Byte], r: Coll[Byte]): Coll[Byte]
Returns a byte-wise XOR of the two collections of bytes.
Returns a byte-wise XOR of the two collections of bytes.
- Definition Classes
- TestSigmaDslBuilder → SigmaDslBuilder
- Annotations
- @NeverInline()
-
def
xorOf(conditions: Coll[Boolean]): Boolean
Similar to
allOf
, but performing logical XOR operation between all conditions.Similar to
allOf
, but performing logical XOR operation between all conditions.- Definition Classes
- TestSigmaDslBuilder → SigmaDslBuilder
- Annotations
- @NeverInline()