<p>I looked at the constructors in the Haddock files of the Certificates in the <code>Plutus.V1.Ledger</code> module. There the datatype <code>DCert</code> is defined as</p>
<p><a href="https://i.sstatic.net/HaHPq.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/HaHPq.png" alt="enter image description here" /></a></p>
<p>I am not sure but answering my own question, currently only the above certificates are possible. It is still not clear to me what the <code>--certificate-script-file</code> flag does exactly.</p>

CC BY-SA 4.0
2022-03-31T11:17:44.143Z
2022-03-31T11:17:44.143Z
Fermat
<p>While looking through the options of the <code>cardano-cli transaction build</code> options I saw the options,</p>
<pre><code>  --certificate-file CERTIFICATEFILE
                           Filepath of the certificate. This encompasses all
                           types of certificates (stake pool certificates, stake
                           key certificates etc). Optionally specify a script
                           witness.
  --certificate-script-file FILE
                           The file containing the script to witness the use of
                           the certificate.
  --certificate-redeemer-cbor-file CBOR FILE
                           The script redeemer, in the given JSON file. The file
                           must follow the special JSON schema for script data.
  --certificate-redeemer-file JSON FILE
                           The script redeemer, in the given JSON file. The file
                           must follow the special JSON schema for script data.
  --certificate-redeemer-value JSON VALUE
                           The script redeemer, in JSON syntax. There is no
                           schema: (almost) any JSON value is supported,
                           including top-level strings and numbers
</code></pre>
<p>I was wondering how and what type of scripts are allowed for these certificates? Can we also generate our own type of certificates with plutus? As stated after the <code>--certificate-file</code> flag these entail atleast stake pool certificates and stake key certificates. This would be a good lightweight option for on-chain voting.</p>

<plutus><cardano-cli>
What can certificate scripts do?
# What can certificate scripts do?

(Asked by: username_0 on 2022-03-31)

While looking through the options of the cardano-cli transaction build options I saw the options,
  --certificate-file CERTIFICATEFILE
                           Filepath of the certificate. This encompasses all
                           types of certificates (stake pool certificates, stake
                           key certificates etc). Optionally specify a script
                           witness.
  --certificate-script-file FILE
                           The file containing the script to witness the use of
                           the certificate.
  --certificate-redeemer-cbor-file CBOR FILE
                           The script redeemer, in the given JSON file. The file
                           must follow the special JSON schema for script data.
  --certificate-redeemer-file JSON FILE
                           The script redeemer, in the given JSON file. The file
                           must follow the special JSON schema for script data.
  --certificate-redeemer-value JSON VALUE
                           The script redeemer, in JSON syntax. There is no
                           schema: (almost) any JSON value is supported,
                           including top-level strings and numbers

I was wondering how and what type of scripts are allowed for these certificates? Can we also generate our own type of certificates with plutus? As stated after the --certificate-file flag these entail atleast stake pool certificates and stake key certificates. This would be a good lightweight option for on-chain voting.

**Tags:** plutus, cardano-cli

---

## 1 answers

### Answer by username_0 on 2022-03-31. Score: 1 | Accepted answer

I looked at the constructors in the Haddock files of the Certificates in the `Plutus.V1.Ledger` module. There the datatype `DCert` is defined as

[![enter image description here](https://i.sstatic.net/HaHPq.png)](https://i.sstatic.net/HaHPq.png)

I am not sure but answering my own question, currently only the above certificates are possible. It is still not clear to me what the `--certificate-script-file` flag does exactly.


---

