DataApi

scalus.builtin.DataApi
trait DataApi

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Data

Members list

Type members

Classlikes

object dataCborDecoder extends Decoder[Data]

CBOR decoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

CBOR decoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

Attributes

Supertypes
trait Decoder[Data]
class Object
trait Matchable
class Any
Self type
object dataCborEncoder extends Encoder[Data]

CBOR encoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

CBOR encoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

Attributes

Supertypes
trait Encoder[Data]
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

def fromCbor(bytes: Array[Byte]): Data

Decode a Data value from CBOR

Decode a Data value from CBOR

Attributes

def fromCbor(is: InputStream): Data

Decode a Data value from CBOR

Decode a Data value from CBOR

Attributes

Decode a Data value from CBOR

Decode a Data value from CBOR

Attributes

def fromJson(json: String): Data

Decode a Data value from JSON

Decode a Data value from JSON

Attributes

def toJson(data: Data, indent: Int): String

Encode a Data value to JSON

Encode a Data value to JSON

Attributes

Givens

Givens

given DataReadWriter: ReadWriter[Data]

JSON ReadWriter for the Data type.

JSON ReadWriter for the Data type.

Attributes

CBOR decoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

CBOR decoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

Attributes

CBOR encoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

CBOR encoder for the Data type. The encoding and decoding logic is based on the Cardano node implementation.

Attributes

Extensions

Extensions

extension [A <: Data](a: A)
inline def toJson: String

Encode a Data value to JSON

Encode a Data value to JSON

Attributes

extension [A <: Data](a: A)(implicit evidence$1: Writer[A])
inline def toJsonIndented: String

Encode a Data value to indented JSON

Encode a Data value to indented JSON

Attributes

extension [A <: Data](a: A)
def toCbor: Array[Byte]

Encode a Data value to CBOR.

Encode a Data value to CBOR.

Attributes

Encode a Data value to CBOR ByteString

Encode a Data value to CBOR ByteString

Attributes

extension (inline data: Data)
inline def field[A](inline expr: A => Any): Data
inline def toB: ByteString
inline def toBigInt: BigInt
inline def toByteString: ByteString
inline def toConstr: Pair[BigInt, List[Data]]
inline def toI: BigInt
inline def toList: List[Data]
inline def toMap: List[Pair[Data, Data]]