Blueprint

scalus.cardano.blueprint.Blueprint
See theBlueprint companion class
object Blueprint

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Blueprint.type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def fromJson(json: String): Blueprint

Parses a CIP-57 compliant Blueprint from a JSON string.

Parses a CIP-57 compliant Blueprint from a JSON string.

Value parameters

json

the JSON string representing a blueprint

Attributes

Returns

the parsed Blueprint

Throws
com.github.plokhotnyuk.jsoniter_scala.core.JsonReaderException

if the JSON is invalid or doesn't conform to the CIP-57 schema

def fromJson(inputStream: InputStream): Blueprint

Parses a CIP-57 compliant Blueprint from a java.io.InputStream.

Parses a CIP-57 compliant Blueprint from a java.io.InputStream.

Value parameters

inputStream

the input stream containing JSON data representing a blueprint

Attributes

Returns

the parsed Blueprint

Throws
com.github.plokhotnyuk.jsoniter_scala.core.JsonReaderException

if the JSON is invalid or doesn't conform to the CIP-57 schema

def plutusV3[Datum : HasTypeDescription, Redeemer : HasTypeDescription](title: String, description: String, version: String, license: Option[String], compiled: PlutusV3[Data => Unit]): Blueprint

Creates a CIP-57 compliant Blueprint from a compiled validator with datum and redeemer type descriptions.

Creates a CIP-57 compliant Blueprint from a compiled validator with datum and redeemer type descriptions.

The returned Blueprint contains a single validator with automatically derived schemas for the datum and redeemer types.

Type parameters

Datum

the type of the datum, must have a HasTypeDescription instance

Redeemer

the type of the redeemer, must have a HasTypeDescription instance

Value parameters

compiled

the compiled validator script

description

the description of the validator

license

optional license identifier (e.g., Some("Apache-2.0"))

title

the title of the validator

version

the version of the blueprint (e.g., "1.0.0")

Attributes

Returns

a Blueprint with a single validator

def plutusV3[Param : HasTypeDescription, Datum : HasTypeDescription, Redeemer : HasTypeDescription](title: String, description: String, version: String, license: Option[String], compiled: PlutusV3[Param => Data => Unit]): Blueprint

Creates a CIP-57 compliant Blueprint from a parameterized compiled validator with datum and redeemer type descriptions.

Creates a CIP-57 compliant Blueprint from a parameterized compiled validator with datum and redeemer type descriptions.

The returned Blueprint contains a single validator with automatically derived schemas for the parameter, datum, and redeemer types. Use this method when your validator requires parameters to be applied before deployment.

Type parameters

Datum

the type of the datum, must have a HasTypeDescription instance

Param

the type of the validator parameter, must have a HasTypeDescription instance

Redeemer

the type of the redeemer, must have a HasTypeDescription instance

Value parameters

compiled

the compiled parameterized validator script

description

the description of the validator

license

optional license identifier (e.g., Some("Apache-2.0"))

title

the title of the validator

version

the version of the blueprint (e.g., "1.0.0")

Attributes

Returns

a Blueprint with a single validator including parameter schema

def plutusV3[Redeemer : HasTypeDescription](title: String, description: String, version: String, license: Option[String], compiled: PlutusV3[Data => Unit]): Blueprint

Creates a CIP-57 compliant Blueprint from a compiled validator with only a redeemer type description.

Creates a CIP-57 compliant Blueprint from a compiled validator with only a redeemer type description.

The returned Blueprint contains a single validator with an automatically derived schema for the redeemer type. Use this method for validators that don't use datum (e.g., minting policies, staking validators).

Type parameters

Redeemer

the type of the redeemer, must have a HasTypeDescription instance

Value parameters

compiled

the compiled validator script

description

the description of the validator

license

optional license identifier (e.g., Some("Apache-2.0"))

title

the title of the validator

version

the version of the blueprint (e.g., "1.0.0")

Attributes

Returns

a Blueprint with a single validator (no datum schema)

def plutusV3[Param : HasTypeDescription, Redeemer : HasTypeDescription](title: String, description: String, version: String, license: Option[String], compiled: PlutusV3[Param => Data => Unit]): Blueprint

Creates a CIP-57 compliant Blueprint from a parameterized compiled validator with only a redeemer type description (no datum).

Creates a CIP-57 compliant Blueprint from a parameterized compiled validator with only a redeemer type description (no datum).

The returned Blueprint contains a single validator with automatically derived schemas for the parameter and redeemer types. Use this method for parameterized validators that don't use datum (e.g., parameterized minting policies).

Type parameters

Param

the type of the validator parameter, must have a HasTypeDescription instance

Redeemer

the type of the redeemer, must have a HasTypeDescription instance

Value parameters

compiled

the compiled parameterized validator script

description

the description of the validator

title

the title of the validator

Attributes

Returns

a Blueprint with a single validator including parameter schema but no datum schema

Deprecated methods

def apply(title: String, description: String, validatorScript: PlutusScript): Blueprint

Returns a CIP-57 compliant Blueprint based on the provided validator script.

Returns a CIP-57 compliant Blueprint based on the provided validator script.

The returned Blueprint always contains only 1 validator.

To specify the redeemer and datum schemas, use Application instead.

Value parameters

description

the description of the "blueprintee" contact

title

the title of the "blueprintee" contract

validatorScript

the script of the validator

Attributes

Deprecated
[Since version 0.14.1] Use plutusV* methods

Givens

Givens

given given_JsonValueCodec_Blueprint: JsonValueCodec[Blueprint]