singular-registry
LicenseApache-2.0
Safe HaskellNone
LanguageGHC2021

Singular.Registry.Blueprint.Load

Description

Loads a plutus.json blueprint produced by the Aiken compiler, selects validators by title prefix (extractScriptHash, extractCompiledCode). The shared compiled-code carrier is ApplicationCodes.

This is the loading-and-code-selection owner extracted from Singular.Registry.Blueprint; the public module re-exports it and is its only intended consumer surface.

Synopsis

Loading

loadBlueprint Source #

Arguments

:: FilePath

Path to the plutus.json file

-> IO (Either String Blueprint) 

Load and parse a CIP-57 blueprint from a file path.

Supplied application and token-policy code

data ApplicationCodes Source #

Supplied application and active-token-policy code for the shared identity adapters. The caller chooses the application; no application is built into the registry library.

Constructors

ApplicationCodes 

Fields

Script hash extraction

extractScriptHash Source #

Arguments

:: Text

Title prefix to match

-> Blueprint

Blueprint to search

-> Maybe Text 

Find the first validator whose title starts with the given prefix and return its hash.

Compiled code extraction

extractCompiledCode Source #

Arguments

:: Text

Title prefix to match

-> Blueprint

Blueprint to search

-> Maybe ShortByteString 

Find the first validator whose title starts with the given prefix and return its compiled script bytes as a ShortByteString. The hex-encoded compiledCode is decoded to raw bytes suitable for PlutusBinary.