• Converts the compiled code of a UPLC program into a Script based on the specified script type, handling possible double-CBOR encoding.

    Parameters

    • cbor: string

      The script, possibly double-CBOR-encoded.

    • type: ScriptType

      The type of the script (Native, PlutusV1, or PlutusV2).

    Returns Core.Script

    • The Script created from the hex blob.
    • Throws an error if the script type is unsupported.