diff --git a/src/pages/additional-features/_meta.json b/src/pages/additional-features/_meta.json index 9f364dc..5a9cc01 100644 --- a/src/pages/additional-features/_meta.json +++ b/src/pages/additional-features/_meta.json @@ -1,3 +1,4 @@ { - "blueprint": "Blueprint" -} + "blueprint": "Blueprint", + "simple-scripts": "Simple Scripts" +} \ No newline at end of file diff --git a/src/pages/additional-features/simple-scripts.mdx b/src/pages/additional-features/simple-scripts.mdx new file mode 100644 index 0000000..96c3143 --- /dev/null +++ b/src/pages/additional-features/simple-scripts.mdx @@ -0,0 +1,7 @@ +# Simple Scripts + +Atlas supports simple scripts, also known as native and timelock scripts. The functionality of simple scripts is explained in the ledger design document of Shelley & Mary era [here](https://github.com/IntersectMBO/cardano-ledger) and also in [cardano-node-wiki](https://github.com/input-output-hk/cardano-node-wiki/blob/main/docs/reference/simple-scripts.md). + +Simple scripts can be specified via exposed constructors of [`GYSimpleScript`](https://haddock.atlas-app.io/GeniusYield-Types-Script-SimpleScript.html#t:GYSimpleScript). They can also be read from their JSON representation as `GYSimpleScript` has a [`FromJSON`](https://hackage.haskell.org/package/aeson-2.2.3.0/docs/Data-Aeson.html#t:FromJSON) instance. We also provide a utility function, [`readSimpleScript`](https://haddock.atlas-app.io/GeniusYield-Types-Script-SimpleScript.html#v:readSimpleScript), to read JSON representation from a file. + +Simple scripts can also be attached to UTxO outputs, allowing them to be used later as reference scripts when building transactions. You can find an example [here](https://github.com/geniusyield/atlas/blob/main/tests-privnet/GeniusYield/Test/Privnet/SimpleScripts.hs), that demonstrates how to interact with simple scripts, both when used as a reference and when given directly for transaction validation. \ No newline at end of file