object ValueCoder
Utilities to serialize and de-serialize Values as they form part of transactions, nodes and contract instances
- Alphabetic
- By Inheritance
- ValueCoder
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- abstract class DecodeCid extends AnyRef
- final case class DecodeError(errorMessage: String) extends Product with Serializable
Error type for signalling errors occurring during decoding serialized values
Error type for signalling errors occurring during decoding serialized values
- errorMessage
description
- abstract class EncodeCid extends AnyRef
- final case class EncodeError(errorMessage: String) extends Product with Serializable
Error type for signalling errors occurring during encoding values
Error type for signalling errors occurring during encoding values
- errorMessage
description
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
- val CidDecoder: DecodeCid
- val NoCidDecoder: DecodeCid
- val UnsafeNoCidEncoder: EncodeCid
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def decodeIdentifier(id: Identifier): Either[DecodeError, Identifier]
Decode identifier from wire format
Decode identifier from wire format
- id
proto identifier
- returns
identifier
- def decodeValue(decodeCid: DecodeCid, version: TransactionVersion, bytes: ByteString): Either[DecodeError, Value]
- def decodeValue(decodeCid: DecodeCid, protoValue0: VersionedValue): Either[DecodeError, Value]
- def decodeVersionedValue(decodeCid: DecodeCid, protoValue0: VersionedValue): Either[DecodeError, VersionedValue]
Reads a serialized protobuf versioned value, checks if the value version is currently supported and converts the value to the type usable by engine/interpreter.
Reads a serialized protobuf versioned value, checks if the value version is currently supported and converts the value to the type usable by engine/interpreter.
- decodeCid
a function to decode stringified contract ids
- protoValue0
the value to be read
- returns
either error or [VersionedValue]
- def encodeIdentifier(id: Identifier): Identifier
Simple encoding to wire of identifiers
Simple encoding to wire of identifiers
- id
identifier value
- returns
wire format identifier
- def encodeValue(encodeCid: EncodeCid, valueVersion: TransactionVersion, v0: Value): Either[EncodeError, ByteString]
Serialize a Value to protobuf
Serialize a Value to protobuf
- encodeCid
a function to stringify contractIds (it's better to be invertible)
- valueVersion
version of value specification to encode to, or fail
- v0
value to be written
- returns
protocol buffer serialized values
- def encodeVersionedValue(encodeCid: EncodeCid, version: TransactionVersion, value: Value): Either[EncodeError, VersionedValue]
- def encodeVersionedValue(encodeCid: EncodeCid, versionedValue: VersionedValue): Either[EncodeError, VersionedValue]
Serializes VersionedValue to protobuf.
Serializes VersionedValue to protobuf.
- encodeCid
a function to stringify contractIds (it's better to be invertible)
- versionedValue
value to be written
- returns
protocol buffer serialized values
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object CidEncoder extends EncodeCid
- object DecodeError extends (String) => DecodeError with Serializable
- object EncodeError extends (String) => EncodeError with Serializable
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated