
sigma.serialization.CaseObjectSerialization.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sigma-state_2.13 Show documentation
Show all versions of sigma-state_2.13 Show documentation
Interpreter of a Sigma-State language
The newest version!
package sigma.serialization
import sigma.ast.{Height, LastBlockUtxoRootHash, MinerPubkey, SType, Value, ValueCompanion}
case class CaseObjectSerialization[V <: Value[SType]](override val opDesc: ValueCompanion, obj: V)
extends ValueSerializer[V] {
override def serialize(obj: V, w: SigmaByteWriter): Unit = ()
override def parse(r: SigmaByteReader): V = {
opDesc match {
case Height => r.wasUsingBlockchainContext = true
case LastBlockUtxoRootHash => r.wasUsingBlockchainContext = true
case MinerPubkey => r.wasUsingBlockchainContext = true
case _ =>
}
obj
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy