What resources should you use to learn native script and in what order should you use them in?
1 Answer
You can find fairly extensive documentation on Cardano Native Script (aka Simple Script) here.
In short, you can define a JSON object with a simple set of rules known as scripts to validate operations around:
- Payment (e.g. spending unspent transaction outputs, i.e. UTxOs at a payment address)
- Staking (e.g. withdrawing rewards at a stake/reward address and delegation)
- Minting (e.g. minting and burning of native assets under a policy)
Each script has a type
defining different combinations of scripts required to validate an operation:
- sig a signature witness of a key
- after a point in time
- before a point in time
- atLeast M of N nested scripts
- any of N nested scripts
- all of N nested scripts
Given these script types, you can have fairly complex nested validation rules and order does not make a difference within the nested scripts.
-
1Master branch no longer contain docs on that address. I found it on other branch: github.com/input-output-hk/cardano-node/blob/…– mirelonCommented Nov 29, 2023 at 12:06