scalus.builtin

package scalus.builtin

Members list

Packages

Type members

Classlikes

class BLS12_381_G1_Element(val value: P1)

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class BLS12_381_G2_Element(val value: P2)

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class BLS12_381_MlResult(val value: PT)

Attributes

Supertypes
class Object
trait Matchable
class Any

CIP-122 + shifts & rotations from CIP-123

CIP-122 + shifts & rotations from CIP-123

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
class BuiltinArray[A]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object BuiltinArray

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
enum BuiltinList[+A]

A builtin list type corresponding to the Plutus Core builtin list.

A builtin list type corresponding to the Plutus Core builtin list.

This is the Scalus equivalent of BuiltinList in Plutus. It represents an immutable singly-linked list that can be used in Plutus smart contracts.

The list supports basic operations: checking emptiness, accessing head/tail, and prepending elements. These operations correspond directly to Plutus Core builtin functions.

Type parameters

A

the element type

Attributes

Companion
object
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object BuiltinList

Companion object for BuiltinList.

Companion object for BuiltinList.

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
case class BuiltinPair[A, B](fst: A, snd: B)

A builtin pair type corresponding to the Plutus Core builtin pair.

A builtin pair type corresponding to the Plutus Core builtin pair.

Value parameters

fst

the first element

snd

the second element

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final class BuiltinValue

MaryEraValue (CIP-0153) - multi-asset value representation for Cardano.

MaryEraValue (CIP-0153) - multi-asset value representation for Cardano.

This is a primitive opaque type in UPLC. The inner representation is hidden - use builtin operations to work with values:

  • insertCoin to insert/update token amounts
  • lookupCoin to lookup token amounts
  • unionValue to merge two values
  • valueContains to check if one value contains another
  • scaleValue to multiply all amounts by a scalar
  • valueData / unValueData for Data conversion

Invariants maintained by operations:

  • No empty inner maps (currency symbols with no tokens are removed)
  • No zero quantities (zero-amount tokens are removed)
  • Keys max 32 bytes (currency symbols and token names)
  • Quantities in signed 128-bit range

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
object BuiltinValue

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
object Builtins extends Builtins

Attributes

Companion
class
Supertypes
class Builtins
class Object
trait Matchable
class Any
Self type
Builtins.type
class Builtins(using ps: PlatformSpecific)

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Builtins
class ByteString

An immutable sequence of bytes.

An immutable sequence of bytes.

This class is used as a UPLC builtin type to represent binary data and it can be used in both onchain and offchain code.

Attributes

Note

methods of this class are only available offchain with the exception of == and !=. For onchain operations use the extension methods in the companion object

Companion
object
Supertypes
class Object
trait Matchable
class Any
object ByteString

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
ByteString.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
sealed abstract class Data

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class B
class Constr
class I
class List
class Map
object Data

Attributes

Companion
class
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Data.type
@FunctionalInterface
trait FromData[+A] extends Data => A, CompileDerivations

Attributes

Companion
object
Supertypes
trait Data => A
class Object
trait Matchable
class Any
object FromData

FromData[A] derivation

FromData[A] derivation

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
FromData.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

This is the platform specific part of the builtins. This is mostly cryptographic primitives that have different implementations on different platforms.

This is the platform specific part of the builtins. This is mostly cryptographic primitives that have different implementations on different platforms.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
@FunctionalInterface
trait ToData[-A] extends A => Data, CompileDerivations

Attributes

Companion
object
Supertypes
trait A => Data
class Object
trait Matchable
class Any
object ToData

ToData[A] derivation macros.

ToData[A] derivation macros.

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
ToData.type
final class uplcIntrinsic(value: String) extends StaticAnnotation

Attributes

Supertypes
trait StaticAnnotation
class Annotation
class Object
trait Matchable
class Any

Value members

Concrete methods

Provides access to platform-specific built-in functions.

Provides access to platform-specific built-in functions.

This is used to access cryptographic primitives and other platform-specific functionality that may vary between JVM, JS, and other platforms.

Attributes