Skip to content

Instantly share code, notes, and snippets.

@scarmuega
Created June 8, 2022 01:46
Show Gist options
  • Save scarmuega/e7a52753ddea144ee6f58e4fca168e39 to your computer and use it in GitHub Desktop.
Save scarmuega/e7a52753ddea144ee6f58e4fca168e39 to your computer and use it in GitHub Desktop.
CIP-057 - On-Chain Script Blueprint - Script Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"$id": "https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0057/v1/schemas/script",
"type": "object",
"$defs": {
"uriReferenceString": {
"type": "string",
"format": "uri-reference"
},
"blueprintInfo": {
"type": "object",
"properties": {
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"version": {
"type": "string"
},
"license": {
"type": "string"
}
}
},
"compiledCode": {
"type": "object",
"properties": {
"arguments": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/plutusData"
}
},
"template": {
"type": "string"
}
}
},
"definition": {
"$ref": "#/$defs/plutusData"
},
"redeemerRef": {
"type": [
"null",
"string"
]
},
"datumRef": {
"type": [
"null",
"string"
]
},
"validatorTransition": {
"type": "object",
"additionalProperties": false,
"properties": {
"from": {
"$ref": "#/$defs/datumRef"
},
"to": {
"$ref": "#/$defs/datumRef"
},
"via": {
"$ref": "#/$defs/redeemerRef"
}
},
"required": [
"from",
"to",
"via"
]
},
"validator": {
"type": "object",
"properties": {
"compiled-code": {
"$ref": "#/$defs/compiledCode"
},
"datum": {
"$ref": "#/$defs/plutusData"
},
"redeemer": {
"$ref": "#/$defs/plutusData"
},
"transitions": {
"type": "array",
"items": {
"$ref": "#/$defs/validatorTransition"
}
},
"required": [
"compiled-code",
"datum",
"redeemer"
]
}
},
"plutusData": {
"$comment": "placeholder for https://raw.githubusercontent.com/cardano-foundation/CIPs/master/CIP-0054/v1/schemas/data",
"type": "object"
}
},
"properties": {
"plutus-blueprint": {
"type": "string"
},
"info": {
"$ref": "#/$defs/blueprintInfo"
},
"validators": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/validator"
},
"minProperties": 1
},
"$defs": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/definition"
}
}
},
"required": [
"plutus-blueprint",
"validators"
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment