Packages

o

com.daml.lf.value

ValueCoder

object ValueCoder

Utilities to serialize and de-serialize Values as they form part of transactions, nodes and contract instances

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ValueCoder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. abstract class DecodeCid[Cid] extends AnyRef
  2. 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

  3. abstract class EncodeCid[-Cid] extends AnyRef
  4. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val CidDecoder: DecodeCid[ContractId]
  5. val NoCidDecoder: DecodeCid[Nothing]
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. def decodeIdentifier(id: Identifier): Either[DecodeError, Identifier]

    Decode identifier from wire format

    Decode identifier from wire format

    id

    proto identifier

    returns

    identifier

  9. def decodeValue[Cid](decodeCid: DecodeCid[Cid], version: TransactionVersion, bytes: ByteString): Either[DecodeError, Value[Cid]]
  10. def decodeValue[Cid](decodeCid: DecodeCid[Cid], protoValue0: VersionedValue): Either[DecodeError, Value[Cid]]
  11. def decodeVersionedValue[Cid](decodeCid: DecodeCid[Cid], protoValue0: VersionedValue): Either[DecodeError, VersionedValue[Cid]]

    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.

    Cid

    ContractId type

    decodeCid

    a function to decode stringified contract ids

    protoValue0

    the value to be read

    returns

    either error or [VersionedValue]

  12. def encodeIdentifier(id: Identifier): Identifier

    Simple encoding to wire of identifiers

    Simple encoding to wire of identifiers

    id

    identifier value

    returns

    wire format identifier

  13. def encodeValue[Cid](encodeCid: EncodeCid[Cid], valueVersion: TransactionVersion, v0: Value[Cid]): Either[EncodeError, ByteString]

    Serialize a Value to protobuf

    Serialize a Value to protobuf

    Cid

    ContractId type

    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

  14. def encodeVersionedValue[Cid](encodeCid: EncodeCid[Cid], version: TransactionVersion, value: Value[Cid]): Either[EncodeError, VersionedValue]
  15. def encodeVersionedValue[Cid](encodeCid: EncodeCid[Cid], versionedValue: VersionedValue[Cid]): Either[EncodeError, VersionedValue]

    Serializes VersionedValue to protobuf.

    Serializes VersionedValue to protobuf.

    Cid

    ContractId type

    encodeCid

    a function to stringify contractIds (it's better to be invertible)

    versionedValue

    value to be written

    returns

    protocol buffer serialized values

  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  18. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  19. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  26. def toString(): String
    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  30. object CidEncoder extends EncodeCid[ContractId]
  31. object DecodeError extends (String) => DecodeError with Serializable
  32. object EncodeError extends (String) => EncodeError with Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped