Scripts

Get Script by Hash

Retrieve the raw script (i.e. full resolved script) associated to a given script hash digest.

<sup><strong>NOTE</strong></sup> <br/>

Raw scripts aren't exact pre-image of their hash digest. Before hashing, scripts are prefixed with a certain discriminator byte depending on the language. For instance, any native script is prefixed with 00 before hashing.

Here's a table summarizing all discriminators:

LanguageDiscriminator Byte
native00
plutus:v101
plutus:v202
get/scripts/{script-hash}

Request

Path parameters

script_hashstring required
Example:3097...9ded

A script blake2b-224 hash digest of a script.

Response

OK

language'native' | 'plutus:v1' | 'plutus:v2' | 'plutus:v3' required

The type of script. native refers to pre-Alonzo scripts made of the native DSL to combine keys.

scriptstring required

A serialized script (native or Plutus).

Example response

{
  "script": "4d01000033222220051200120011"
}

Changes

No recorded changes to this operation across all 1 revision of this API.