| License | Apache-2.0 |
|---|---|
| Safe Haskell | None |
| Language | GHC2021 |
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
- loadBlueprint :: FilePath -> IO (Either String Blueprint)
- data ApplicationCodes = ApplicationCodes {
- ncApplication :: ShortByteString
- ncWitness :: ShortByteString
- extractScriptHash :: Text -> Blueprint -> Maybe Text
- extractCompiledCode :: Text -> Blueprint -> Maybe ShortByteString
Loading
Arguments
| :: FilePath | Path to the |
| -> 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
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
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.