Attributes
- Companion
- class
- Graph
-
- Supertypes
-
trait Producttrait Mirrorclass Objecttrait Matchableclass Any
- Self type
-
DeBruijnedProgram.type
Members list
Type members
Classlikes
A program read from the CBOR byte string at the start of some bytes.
A program read from the CBOR byte string at the start of some bytes.
Value parameters
- afterCborByteString
-
the bytes after the CBOR byte string. These are not the bytes after the program inside the byte string, which ProgramFlatCodec.DecodeResult holds.
- program
-
the program
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
- Self type
Inherited and Abstract types
The names of the product elements
The names of the product elements
Attributes
- Inherited from:
- Mirror
The name of the type
The name of the type
Attributes
- Inherited from:
- Mirror
Value members
Concrete methods
Deserializes a program from a CBOR-encoded byte array.
Deserializes a program from a CBOR-encoded byte array.
cbor must be exactly one CBOR byte string, and the byte string must hold exactly one flat-encoded program, see fromFlatEncoded. A script taken from a transaction can have bytes after its byte string; read it with fromCborPrefix.
Value parameters
- cbor
-
the CBOR-encoded byte array
Attributes
Deserializes a program from a CBOR-encoded hex string.
Deserializes a program from a CBOR-encoded hex string.
Value parameters
- cborHex
-
the CBOR-encoded hex string
Attributes
- Returns
-
the program
Deserializes a program from the CBOR byte string at the start of cbor, returning the bytes after that byte string.
Deserializes a program from the CBOR byte string at the start of cbor, returning the bytes after that byte string.
This is how the ledger reads a Plutus script. It ignores the bytes after the byte string in Plutus V1 and V2 scripts and rejects them in later languages; scalus.cardano.ledger.PlutusScript.isWellFormed applies that rule. As in fromCbor, the byte string must hold exactly one flat-encoded program.
Value parameters
- cbor
-
bytes that start with a definite-length CBOR byte string holding a flat-encoded program
Attributes
- Returns
-
the program and the bytes after the CBOR byte string
Deserializes a program from a CBOR-encoded byte array, returning the bytes after the program inside the CBOR byte string.
Deserializes a program from a CBOR-encoded byte array, returning the bytes after the program inside the CBOR byte string.
cbor must be exactly one CBOR byte string. For the bytes after the byte string, use fromCborPrefix.
Value parameters
- cbor
-
the CBOR-encoded byte array
Attributes
- Returns
-
the program, with the bytes after its padding as the remainder
Deserializes a program from a double CBOR-encoded byte array.
Deserializes a program from a double CBOR-encoded byte array.
Value parameters
- cbor
-
the CBOR-encoded hex string
Attributes
- Returns
-
the program
Deserializes a program from a double-CBOR-encoded hex string.
Deserializes a program from a double-CBOR-encoded hex string.
Value parameters
- doubleCborHex
-
the double-CBOR-encoded hex string
Attributes
- Returns
-
the program
Deserializes a program from a flat-encoded byte array.
Deserializes a program from a flat-encoded byte array.
The bytes must hold the program and its filler and nothing else, see ProgramFlatCodec.decodeFlat. Use fromFlatEncodedWithRemainingBytes when other bytes follow the program.
Value parameters
- flatEncoded
-
the flat-encoded byte array
Attributes
- Returns
-
the program
Deserializes a program from a flat-encoded byte array, returning any remaining bytes.
Deserializes a program from a flat-encoded byte array, returning any remaining bytes.
Value parameters
- flatEncoded
-
the flat-encoded byte array
Attributes
- Returns
-
ProgramFlatCodec.DecodeResult