Skip to main content

Cardano-CLI acceptance criteria

AC-CLI.001 Obtain constitution hash for verification (HOLDER)

RequirementsAcceptance Criteria
When I provide the off-chain text or file of the Constitution, the cardano-cli calculates and returns the corresponding blake2b-256 hash of the document.The hash generated by the cli is equivalent to running:
$ b2sum -l 256 FILE

AC-CLI.002 Generate hash of the off-chain constitution for a proposal (HOLDER)

RequirementsAcceptance Criteria
When I provide the off-chain text of the Constitution,
the cardano-cli calculates and returns the corresponding blake2b-256 hash of the document.
The hash generated by the cli is equivalent to running:
$ b2sum -l 256 FILE

AC-CLI.003 Generate Committee member cold key pair (CCM)

RequirementsAcceptance Criteria
The feature implementation includes a new command:
`cardano-cli conway governance committee key-gen-cold`
The command generates Ed25519 key pair.
If a parameter or the command format is incorrect an error is raised
The command includes a corresponding CLI usage describing the featureThe command followed by --help, displays command usage page showing how to use it and the types of the inputs and outputs.
The command must include two flags to specify the path and file name of the verification and signing keys.The flags allow to easily distinguish its purpose (signing or verification). Both flags are mandatory. An error is raised if any is missing.
Given that the user specifies a valid path and file name, then the keys are saved on that file and location.Files created on the correct path.
Files are in the text envelope format common across cardano-cli with the fields:
Type
Description
cborHex
The signing key text envelope contains the correct type and description:Type: "ConstitutionalCommitteeColdSigningKey_ed25519"
Description: "Constitutional Committee Cold Signing Key"
The verification key text envelope contains the correct type and description:Type: "ConstitutionalCommitteeColdVerificationKey_ed25519"
Description: "Constitutional Committee Cold Verification Key"

AC-CLI.004 Generate committee member hot key pair (CCM)

RequirementsAcceptance Criteria
The feature implementation includes a new command:
`cardano-cli conway governance committee key-gen-hot`
The command generates Ed25519 key pair.
If a parameter or the command format is incorrect an error is raised.
The command includes a corresponding CLI usage describing the featureThe command followed by --help, displays command usage page showing how to use it and the types of the inputs and outputs.
The command must include two flags to specify the path and file name of the verification and signing keys.The flags allow to easily distinguish its purpose (signing or verification). Both flags are mandatory. An error is raised if any is missing.
Given that the user specifies a valid path and file name, then the keys are saved on that file and location.Files created on the correct path.
Files are in the text envelope format common across cardano-cli with the fields:
Type
Description
cborHex
The signing key text envelope contains the correct type and description:Type: "ConstitutionalCommitteeHotSigningKey_ed25519"
Description: "Constitutional Committee Hot Signing Key"
The verification key text envelope contains the correct type and description:Type: "ConstitutionalCommitteeHotVerificationKey_ed25519"
Description: "Constitutional Committee Hot Verification Key"

AC-CLI.005 Authorization Certificate (CCM)

RequirementsAcceptance Criteria
Implement a command to create a hot key authorization certificate for governance.Running the command with accepted input parameters generates a hot key authorization certificate. If a parameter or the command format is incorrect, an error is raised.
Include necessary options to obtain cold and hot credentials.The command allows passing credentials as follows:
- Cold verification key (string)
- Cold verification key file (file)
- Cold verification key hash (string)
- Cold Script Hash (HASH)
- Hot verification key (string)
- Hot verification key file (file)
- Hot verification key hash (string)
- Hot Script Hash (HASH)
Generate and save a hot key authorization certificate when the command is executed with appropriate options.Given that the user specifies a valid path and file name, the command produces a Cold to Hot authorization certificate at the specified location and name.
Ensure the hot key authorization certificate follows a specified text envelope format.The resulting certificate is in a text envelope format with fields:
```json{"type": "CertificateConway", "description": "Constitutional Committee Hot Key Authorization Certificate", "cborHex": ""}```
The certificate must comply with the specified CDDL.Generates an authorization certificate compliant with the Conway CDDL:
`auth_committee_hot_cert = (14, committee_cold_credential, committee_hot_credential)`
Handle potential errors, such as missing or invalid options, and provide appropriate error messages.The command handles potential errors, such as missing or invalid options, and provides appropriate error messages indicating the missing or required parameters. Failing to provide the right input results in a clear error message that helps the user to identify the problem.
Provide documentation including usage, purpose, expected inputs, and outputs.Running the command with a help option displays usage information, describing the feature, its purpose, and how to use it, along with the expected types of inputs and outputs.

AC-CLI.006 Generate Committee Member Key Hash (CCM)

RequirementsAcceptance Criteria
Implement a command to generate the blake2b 256 hash of a verification key.Running the command with accepted input parameters generates the blake2b 256 hash of the verification key. If a parameter or the command format is incorrect, an error is raised.
Allow passing credentials with cold verification key or cold verification key file.Passing the cold verification key or cold verification key file is mandatory. If the key or file is of a different type, an exception is raised.
Provide an option to save the key hash to a file, with the default behavior printing to stdout.Given that the user specifies a valid path and file name with an output file option, the key hash is saved to that file and location. If the output file option is not used, the hash is printed to stdout.
Handle potential errors, such as missing flags or invalid input, and provide appropriate error messages or exceptions to guide the user.The command handles potential errors, such as missing or invalid flags, and provides appropriate error messages indicating the missing or required parameters. When necessary, the user is directed to the commands usage information.
Provide documentation including usage, purpose, expected inputs, and outputs.Running the command with a help option displays usage information, describing the feature, its purpose, and how to use it, along with the expected types of inputs and outputs.

AC-CLI.007 Committee Member Resignation Certificate (CCM)

RequirementsAcceptance Criteria
Implement a command to create a cold credential resignation certificate for a committee member.Running the command with accepted input parameters generates a cold credential resignation certificate. If a parameter or the command format is incorrect, an error is raised.
Allow passing credentials via verification key, verification key file, verification key hash, and script hash.Passing the cold credential is mandatory, achieved with any of the following inputs:
- Cold verification key
- Cold verification key file
- Cold verification key hash
- Cold script file
If the input has the wrong format or type, an exception is raised.
Allow an optional anchor (URL/hash) to express motives for resignation. The command does not need to check for the validity of the URL, the contents, or that the documents and declared hash match.Passing an anchor is optional and can be done using:
- Resignation metadata URL
- Resignation metadata hash
If the user chooses to pass an anchor, both fields must be provided. Passing only the URL or only the hash is not allowed.
Include a mandatory flag for saving the certificate to a file.Given that a valid path and file name are specified, the certificate is saved at the specified location.
Ensure the resignation certificate follows the text envelope format of other existing certificates, including the type, description, and CBOR hex fields. The certificate type must be `CertificateConway` and the description must be `Constitutional Committee Cold Key Resignation Certificate`.The resulting certificate is in a text envelope format consisting of a JSON object with type, description, and CBOR hex fields.
```json
{ "type": "CertificateConway", "description": "Constitutional Committee Cold Key Resignation Certificate", "cborHex": "" }
```
Generate a resignation certificate compliant with the conway CDDL: `resign_committee_cold_cert = (15, committee_cold_credential, anchor / null)`.The CBOR hex field conforms to the conway CDDL: `resign_committee_cold_cert = (15, committee_cold_credential, anchor / null)`.
Handle potential errors, such as missing or invalid flags or keys, and provide appropriate error messages indicating the missing or required parameters.The command handles potential errors, such as missing or invalid flags or keys, and provides appropriate error messages indicating the missing or required parameters. When necessary, the user is directed to the command usage information.
Provide documentation, including a corresponding CLI usage, describing the feature, its purpose, and how to use it, along with the expected types of inputs and outputs.Running the command with a help option displays usage information, describing the feature, its purpose, and how to use it, along with the expected types of inputs and outputs.

AC-CLI.008 Generate DRep Keys (HOLDER)

RequirementsAcceptance Criteria
Implement a command to generate an Ed25519 key pair for a DRep.Running the command with accepted input parameters generates an Ed25519 key pair. If a parameter or the command format is incorrect, an error is raised.
Support an option to specify the file where the verification key will be saved.When valid paths and file names are specified, the verification key file is saved at the specified location. This option is mandatory; failing to provide it raises an error.
Support an option to specify the file where the signing key will be saved.When valid paths and file names are specified, the signing key file is saved at the specified location. This option is mandatory; failing to provide it raises an error.
Ensure the generated key files adhere to the text envelope format used for other artifacts and contain the fields Type, Description, and cborHex.The signing key text envelope contains the correct type, description, and cborHex values. Type: "DRepVerificationKey_ed25519", Description: "Delegate Representative Verification Key".

AC-CLI.009 Generate DRep ID (DREP)

RequirementsAcceptance Criteria
Implement a command to generate the blake2b-224 hash digest of the serialized DRep credential (verification key).Running the command with accepted input parameters generates a DRep ID: the blake2b-224 hash digest of the verification key. If a parameter or the command format is incorrect, an error is raised.
Support supplying the verification key through various methods, such as directly passing the key or specifying a file containing the key.The command requires the user to provide the verification key in one of the supported formats. If the key is not provided or is in an incorrect format, an error is raised.
Support an optional flag to allow users to save the generated DRep ID to a file. The default is printing to stdout.Given that a valid path and file name are supplied, using the appropriate flag saves the DRep ID to a file at the specified location. If the specified path does not exist or is inaccessible, the command returns an error message. If the flag is not used, the DRep ID is printed to stdout.
Provide an option to specify the output format. Accepted output formats include "hex" and "bech32", with "bech32" as the default format.The command supports an optional flag for specifying the output format. When not used, the output defaults to bech32. When specified, the DRep ID is output in the chosen format.
Handle errors gracefully and provide helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect argument.
Provide documentation, including corresponding CLI usage, describing the feature, its purpose, and how to use it, along with the expected types of inputs and outputs.Running the command with a help flag displays the command usage page.

AC-CLI.010 Generate DRep Registration Certificate (DREP)

RequirementsAcceptance Criteria
Implement a command to generate a DRep registration certificate.Running the command with accepted input parameters generates a DRep registration certificate. If a parameter or the command format is incorrect, an error is raised.
Require the user to provide the DRep key deposit amount.The command requires the user to provide the deposit amount in lovelace. If the deposit amount is not provided, an error is raised.
Support providing the DRep credential through various methods such as direct input of the verification key, specifying a file containing the verification key, using the DRep ID or the Script Hash.The command requires the user to provide the DRep credential in one of the supported formats. The options for providing the DRep credential are mutually exclusive. If the credential is not provided or is in an incorrect format, an error is raised.
Allow adding an optional anchor (URL/hash) to submit any DRep metadata.The command supports optional metadata. If metadata is provided, both the URL and hash must be supplied. If only one is provided, an error is raised. If the metadata is not provided, the field should be null in the certificate.
Support a mandatory option to specify the file where the generated DRep registration certificate will be saved.The command requires the user to specify a file path and name for saving the certificate. If the path is invalid or not provided, an error is raised.
Generate a registration certificate compliant with the Conway CDDL.The certificate’s CBOR hex field complies with the format specified in the Conway CDDL.
reg_drep_cert = (16, drep_credential, coin, anchor / null)
Ensure the certificate is in a text envelope format containing a JSON object with fields for type, description, and cborHex.The saved certificate should be in a text envelope format, consisting of a JSON object with type, description, and cborHex fields.
Provide clear documentation, including usage instructions.Running the command with a help flag displays usage instructions and detailed information about the command.
Handle errors gracefully and provide helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command should raise an error indicating the missing or incorrect parameter.

AC-CLI.011 DRep Retirement Certificate (DREP)

RequirementsAcceptance Criteria
Implement a command to generate a DRep retirement certificate.Running the command successfully generates a DRep retirement certificate with accepted input parameters.
Require the user to provide the DRep credential for retirement, which can be supplied through various methods such as direct input of the verification key, specifying a file containing the verification key, or using the DRep ID.The command accepts credentials provided through different methods. Supplying the credential is mandatory.
Mandatory flag for the user to input the DRep deposited amount to be returned, which must match the deposit originally paid when registering as a DRep.The flag to specify the deposit ammount is mandatory and takes the deposit amount in lovelace as an argument. Failing to use the flag or passing something different to amount in lovelace as argument raises an error.
Support a mandatory flag to specify the file where the generated DRep retirement certificate will be saved.The flag is mandatory and takes the file path and name as an argument. If the path does not exist an error is raised.
Ensure the retirement certificate is in a text envelope format similar to stake pools deregistration certificates.The retirement certificate should be in a text envelope format consisting of a JSON object with type, description, and CBOR hex fields: {"type": "CertificateConway", "description": "DRep Retirement Certificate","cborHex": ""}
Ensure the output certificate complies with the Conway CDDL: `unreg_drep_cert = (17, drep_credential, coin)`.The cborHex field of the certificate should conform to the Conway CDDL: `unreg_drep_cert = (17, drep_credential, coin)`.
Provide clear documentation, including usage instructions.Running the command with a help flag i.e (`--help`) displays usage instructions and detailed information about the command.
Handle errors gracefully and provide helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.

AC-CLI.012 Generate DRep Metadata Hash (HOLDER)

RequirementsAcceptance Criteria
Implement a command to generate the blake2b 256 hash of a DRep metadata file.Running the command successfully generates the blake2b 256 hash of the specified DRep metadata file. If a parameter or the command format is incorrect, an error is raised.
Require the user to specify the DRep metadata file as input.The command requires users to provide the DRep metadata file as an argument or input.
Support an optional flag or option to specify the output file for saving the calculated metadata hash.The command allows users to specify an output file using a flag or option to save the calculated metadata hash. If not specified, the hash is printed to stdout.
Handle errors gracefully and provide helpful error messages when required inputs are missing or invalid.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.
Provide clear documentation, including usage instructions.Running the command with a help flag displays usage instructions and detailed information about the command.

AC-CLI.013 Create Constitution Governance Action (HOLDER)

RequirementsAcceptance Criteria
Implement a command to create a governance action for updating the constitution.Running the command successfully creates a governance action for updating the constitution with accepted input parameters.
Require the user to specify the target network for which the governance action is created.The command requires the user to specify the target network, allowing for either mainnet or testnet configurations.
Prompt the user to provide the deposit amount for submitting governance actions.The command prompts the user to provide the deposit amount for submitting governance actions. The deposit amount must match the relevant protocol parameter but is only checked when submitting the transaction.
Require the user to provide the stake credential that will receive the deposit return when the action is enacted or expired.The command allows the user to provide deposit return stake credential using various options specified by the command verification key, verification key file, verification key hash or script hash
Allow the user to provide the transaction ID and index of the previously enacted action of this type.Optional flags are available. It is not mandatory to support the very first action of this type on the system, which does not require information about previously enacted actions.
Ask the user to provide a mandatory anchor (URL/hash) of the proposal.The command allows the user to supply an anchor (URL/hash) using specified flags. These flags are mandatory for providing the anchor information.
Require the user to provide an anchor of the new constitution.The command allows to pass an anchor (URL/hash) of the new constitution. Flags are mandatory. Failing to use these flags returns an error.
Support a flag to specify the path where the output file will be saved.The command supports a flag to specify the path to the file where the generated governance action (proposal) will be saved. If the path does not exist an error is raised
Ensure the generated governance action complies with the Conway CDDL.The generated governance action complies with the Conway CDDL specification:
proposal_procedure =[ deposit : coin, reward_account, gov_action, anchor]
gov_action = [ parameter_change_action // hard_fork_initiation_action // treasury_withdrawals_action // no_confidence // update_committee // new_constitution // info_action ]
new_constitution = (5, gov_action_id / null, constitution).
Handle errors gracefully and provide helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.
Provide clear documentation, including usage instructions.Running the command with a help flag (`--help`) displays usage instructions and detailed information about the command.

AC-CLI.014 Create Constitutional Committee Governance Action (HOLDER)

RequirementsAcceptance Criteria
Implement a command to create a governance action for updating the constitutional committee.Running the command with accepted input parameters successfully creates a governance action for updating the constitutional committee.
Require the user to specify the target network for which the governance action is created.The command requires the user to specify the target network, allowing for either mainnet or testnet configurations.
Prompt the user to provide the deposit amount for submitting governance actions.The command prompts the user to provide the deposit amount for submitting governance actions via a specific flag.
Require the user to provide the stake credential that will receive the deposit return when the action is enacted or expired.The command allows the user to provide deposit return stake credential using various options specified by the command verification key, verification key file, verification key hash or script hash
Allow the user to provide the transaction ID and index of the previously enacted action of this type.Optional flags are available to support the very first action of this type on the system, which does not require information about previously enacted actions.
Ask the user to provide a mandatory anchor (URL/hash) of the proposal.The command allows the user to supply an anchor (URL/hash) using specified flags. These flags are mandatory for providing the anchor information.
Provide options to remove or add constitutional committee members with associated terms in epochs.The command provides options to remove or add constitutional committee members with associated terms in epochs using specific flags.
Allow proposing a new threshold in various scenarios.The command allows proposing a new threshold in different scenarios, including when adding or removing members or as a standalone action.
Support a flag to specify the path where the output file will be saved.The command supports the `--out-file` flag to specify the file where the generated governance action (proposal) will be saved.
Ensure the generated governance action complies with the Conway CDDL.The generated governance action complies with the Conway CDDL specifications:
`proposal_procedure = [ deposit : coin, reward_account, gov_action, anchor ]`
`update_committee = (4, gov_action_id / null, set<committee_cold_credential>, { committee_cold_credential => epoch }, unit_interval)`
Provide clear documentation, including usage instructions.Running the command with a help flag (`--help`) displays usage instructions and detailed information about the command. If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.

AC-CLI.015 Create Treasury Withdrawal Governance Action (HOLDER)

RequirementsAcceptance Criteria
Implement a command to create a governance action for withdrawing funds from the treasury.Running the command with accepted input parameters successfully creates a governance action for withdrawing funds from the treasury
Require the user to specify the target network for which the governance action is created.The command requires the user to specify the target network, allowing for either mainnet or testnet configurations.
Prompt the user to provide the deposit amount for submitting governance actions.The command prompts the user to provide the deposit amount for submitting governance actions via a specific flag.
Require the user to provide the stake credential that will receive the deposit return when the action is enacted or expired.The command allows the user to provide deposit return stake credential using various options specified by the command verification key, verification key file, verification key hash or script hash
Ask the user to provide a mandatory anchor (URL/hash) of the proposal.The command allows the user to supply an anchor (URL/hash) using specified flags. These flags are mandatory for providing the anchor information.
Require the user to provide the stake credential that will receive the funds if the governance action is ratified.The user provides the stake credential that will receive the funds if the governance action is ratified using specific flags.
Require the user to provide the amount in lovelace that will be transferred from the treasury to the stake credential if the action is ratified.The user specifies the amount in lovelace that will be transferred from the treasury to the stake credential if the action is ratified using the `--transfer` flag.
Support a flag to specify the path where the output file will be saved.The `--out-file` flag is available to specify the file where the generated governance action (proposal) will be saved. This flag is mandatory.
Ensure the generated governance action complies with the Conway CDDL.The generated governance action complies with the Conway CDDL specifications: `proposal_procedure = [ deposit : coin, reward_account, gov_action, anchor ]` `treasury_withdrawals_action = (2, { reward_account => coin })`
Provide clear documentation, including usage instructions.Running the command with a help flag (`--help`) displays usage instructions and detailed information about the command. If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.

AC-CLI.016 Create Info Governance Action (HOLDER)

RequirementsAcceptance Criteria
Implement a command to create an info governance action for updating the constitution.Running the command successfully creates an info governance action for updating the constitution with accepted input parameters.
Require the user to specify the target network for which the governance action is created.The command requires the user to specify the target network, allowing for either mainnet or testnet configurations.
Prompt the user to provide the deposit amount for submitting governance actions.The command prompts the user to provide the deposit amount for submitting governance actions via a specific flag.
Require the user to provide the stake credential that will receive the deposit return when the action is enacted or expired.The command allows the user to provide deposit return stake credential using various options specified by the command verification key, verification key file, verification key hash or script hash
Ask the user to provide a mandatory anchor (URL/hash) of the proposal, a document where the proposer exposes the reasoning behind the proposed change.The command allows the user to supply an anchor (URL/hash) using specified flags. These flags are mandatory for providing the anchor information.
Support a flag to specify the path where the output file will be saved.The `--out-file` flag is available to specify the file where the generated governance action (proposal) will be saved.
Ensure the generated governance action complies with the Conway CDDL.The generated governance action complies with the Conway CDDL specifications: `proposal_procedure = [ deposit : coin, reward_account, gov_action, anchor ]`, `info_action = 6`.
Handle errors gracefully and provide helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.
Provide clear documentation, including usage instructions.Running the command with a help flag (`--help`) displays usage instructions and detailed information about the command. If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.

AC-CLI.017 Create Protocol Parameters Update (HOLDER)

RequirementsAcceptance Criteria
Implement a command to create a protocol parameters update governance action.Running the command successfully creates a protocol parameters update governance action with accepted input parameters.
Require the user to specify the target network for which the governance action is created.The command requires the user to specify the target network, allowing for either mainnet or testnet configurations.
Prompt the user to provide the deposit amount for submitting governance actions.The command prompts the user to provide the deposit amount for submitting governance actions via a specific flag.
Require the user to provide the stake credential that will receive the deposit return when the action is enacted or expired.The command allows the user to provide deposit return stake credential using various options specified by the command verification key, verification key file, verification key hash or script hash
Allow the user to provide the transaction ID and index of the previously enacted action of this type.These flags are optional to support the very first action of this type on the system, which does not require information about previously enacted actions.
Include dedicated flags to reference the protocol parameter that the user is attempting to modify.The command accepts flags for various protocol parameters that the user wants to modify, allowing for flexible parameter updates.
Ask the user to provide a mandatory anchor (URL/hash) of the proposal, a document where the proposer exposes the reasoning behind the proposed change.The command allows the user to supply an anchor (URL/hash) using specified flags. These flags are mandatory for providing the anchor information.
Support a flag to specify the path where the output file will be saved.The `--out-file` flag is available to specify the file where the generated governance action (proposal) will be saved.
Ensure the generated governance action complies with the Conway CDDL.The generated governance action complies with the Conway CDDL specifications: `proposal_procedure = [ deposit : coin, reward_account, gov_action, anchor ]`, `parameter_change_action = (0, gov_action_id / null, protocol_param_update)`.
Handle errors gracefully and provide helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.
Provide clear documentation, including usage instructions.Running the command with a help flag (`--help`) displays usage instructions and detailed information about the command. If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.

AC-CLI.018 Create No Confidence Governance Action (HOLDER)

RequirementsAcceptance Criteria
Implement a command to create a no-confidence governance action with the specified parameters.Executing the command successfully creates a no-confidence governance action.
Specify the target network for which the governance action is created.The command requires the user to specify the target network.
Prompt the user to provide the deposit amount for submitting governance actions.The command prompts the user to provide the deposit amount.
Require the user to provide the stake credential that will receive the deposit return when the action is enacted or expired.The command allows the user to provide deposit return stake credential using various options specified by the command verification key, verification key file, verification key hash or script hash
Allow the user to provide the transaction ID and index of the previously enacted action of this type.Optional flags are available to support the very first action of this type.
Request the user to provide an anchor (URL/hash) of the proposal document.The command allows the user to supply an anchor (URL/hash) using specified flags. These flags are mandatory for providing the anchor information.
Offer a flag to specify the path for saving the output file.The flag allows specifying the file where the generated governance action will be saved.
Ensure compliance with the Conway CDDL for the generated governance action.The generated governance action complies with the Conway CDDL where: `proposal_procedure = [ deposit : coin, reward_account, gov_action, anchor ]`, `no_confidence = (3, gov_action_id / null)`.
Handle errors gracefully and provide helpful error messages.The command raises an error indicating the missing or incorrect parameter if any required input is missing or invalid.
Provide comprehensive documentation for clear usage instructions.Executing the command with a help flag displays the command usage page.

AC-CLI.019 Create Hard-Fork Initiation Governance Action (HOLDER)

RequirementsAcceptance Criteria
The command is implemented to facilitate the creation of a hard-fork initiation governance action.Executing the command successfully creates a hard-fork initiation governance action.
Requires the user to specify the target network for which the governance action is created.The command requires the user to specify the target network for the governance action.
Requires the user to provide the deposit amount for submitting governance actions.The command prompts the user to provide the deposit amount for submitting governance actions.
The command requires the user to provide the stake credential for receiving the deposit return.The command allows the user to provide deposit return stake credential using various options specified by the command verification key, verification key file, verification key hash or script hash
The command allows the user to specify information about previously enacted actions of this type, if applicable.Optional flags support providing information about previously enacted actions of this type.
The command requires the user to provide an anchor (URL/hash) of the proposal document.The user provides an anchor (URL/hash) of the proposal document.
The command requires the user to input the new protocol version number.The user provides the new protocol version number.
The command has a flag to specify the path where the output file will be saved.A flag is available to specify the path where the generated governance action will be saved.
The generated governance action complies with the CDDL specifications.The generated governance action complies with the CDDL specifications.
The command handles errors gracefully and provides helpful error messages when required options are missing or invalid inputs are provided.The command provides clear error messages when required options are missing or invalid inputs are provided.
The feature implementation should be well-documented, providing clear usage instructions.Running the command with `--help` displays the command usage page.

AC-CLI.020 View Governance Action (HOLDER)

RequirementsAcceptance Criteria
A command is implemented to allow the user to inspect the content of a governance action (proposal) file and render it in human-readable format.Running the command successfully shows the content of a governance action file in a humand readable format.
The command has a flag to specify the path where the output file will be saved.The `--out-file` flag is available to specify the file where the generated governance action (proposal) will be saved.
Gives an option to select the output format (json or yaml).The `--output json` and `--output yaml` flags are available to select the output format. By default if no flag is picked, the JSON format will be applied.
The command handles errors gracefully and provides helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.
The feature implementation should be well-documented, providing clear usage instructions.Running `cardano-cli conway governance action view --help` displays the command usage page.

AC-CLI.021 Create Governance Vote (SPO, DREP, CCM)

RequirementsAcceptance Criteria
A command is implemented that allows creating votes on governance actions.Running the command with the accepted parameteres succesfully creates a vote file for it to be included in a transaction.
The command provides a way to vote yes, no abstain.The command supports the mutually exclusive and mandatory flags `–yes`, ` –no` and ` –abstain` to express the direction of the vote.
Requires to specify the governance action ID and index that the vote is about. The cli will not verify on real time the existence of the governance action. It is only at submission time when the node (ledger) validates the existence of the governance action.The command includes mandatory flags to indicate what governance action (ID and INDEX) the vote corresponds to. Failing to provide any of these flags returns an error message.
Requires the user to provide DRep, SPO or CC credential.Drep can pass credentials using ANY of:
-DRep verification key
-DRep verification key file
-DRep key hash (drep-id)
-DRep script hash.
Stake pool operators can pass credentials using ANY of:
-Cold verificaiton key
-Cold verification key file
-Stake pool ID.
Committee members can pass credentials using ANY of:
-Hot verification key
-Hot verification key file
-Hot verification key hash
-Hot script hash.
The command allows the user to provide an anchor (url / hash). A document where the proposer exposes the reasoning behind thir vote.The command offers optional flags that allow the user to add an anchor (URL/hash) to their vote. Providing an anchor is optional, but if one flag is used then the second is mandatory. It is not allowed to only privide a URL or only a HASH.
The command has a flag to specify the path where the output file will be saved.The `--out-file` flag is available to specify the file where the vote for a governance action will be saved.
The resulting vote follows the cddl specification.The resulting vote follows the cddl specification where:
`voting_procedures = { + voter => { + gov_action_id => voting_procedure } }`, `voting_procedure = [ vote, anchor / null ]; no - 0; yes - 1; abstain - 2; vote = 0 .. 2`
The command handles errors gracefully and provides helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.
The feature implementation should be well-documented, providing clear usage instructions.Running `cardano-cli conway governance vote create --help` displays the command usage page.

AC-CLI.022 View Governance Vote (SPO, DREP, CCM)

RequirementsAcceptance Criteria
The command is implemented to facilitate inspecting governance votes before adding them to a transaction.Running the command successfully shows the content of a governance action file.
The command takes a vote file as an input.The input mechanism allows for the passing of a vote file.
Gives an option to select the output format (json or yaml).The output format can be specified to be either YAML or JSON. Providing any other argument results in an error.
The command has an optional flag to specify the path where the output file will be saved.A flag is available to specify the path where the output file will be saved. If flag is not used the output is sent to stdout.
The output shows the information of the proposal based on the voting procedures in a human readable format (english).The output provides human-readable information about the voting procedures, including voter credentials, governance action IDs, anchors, and decisions (yes, no, or abstain).
The command handles errors gracefully and provides helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.
The feature implementation should be well-documented, providing clear usage instructions.Running the command with `--help` displays the command usage page.

AC-CLI.023 Transaction BUILD with Proposal Input (HOLDER)

RequirementsAcceptance Criteria
Transaction build includes a mechanism to incorporate a proposal file into the transaction body.An ADA holder can include a proposal in a transaction by passing the proposal file in the transaction body.
When constructing a transaction body that includes a proposal, the resulting tx body conforms to the conway cddl so that proposal procedures are recorded with the tag 20.The generated transaction body complies with the Conway CDDL where: transaction_body = {
0 : set<transaction_input> ; inputs ,
1 : [* transaction_output] ,
2 : coin ; fee ,
? 3 : uint ; time to live ,
? 4 : certificates ,
? 5 : withdrawals ,
? 7 : auxiliary_data_hash ,
? 8 : uint ; validity interval start ,
? 9 : mint ,
? 11 : script_data_hash ,
? 13 : nonempty_set<transaction_input> ; collateral inputs ,
? 14 : required_signers ,
? 15 : network_id ,
? 16 : transaction_output ; collateral return ,
? 17 : coin ; total collateral ,
? 18 : nonempty_set<transaction_input> ; reference inputs ,
? 19 : voting_procedures ; New; Voting procedures ,
? 20 : proposal_procedures ; New; Proposal procedures ,
? 21 : coin ; New; current treasury value ,
? 22 : positive_coin ; New; donation }

AC-CLI.024 Transaction BUILD with Vote Input (SPO, DREP, CCM)

RequirementsAcceptance Criteria
Transaction build includes a mechanism to incorporate a vote file into the transaction body.A DRep, SPO, or CC member can include their vote in a transaction by passing a vote file in the transaction build command.
When constructing a transaction body that includes a vote, the resulting tx body conforms to the conway cddl so that voting procedures are recorded with the tag 19.When constructing a transaction body that includes a vote, the resulting tx body conforms to the Conway CDDL where: transaction_body = {
0 : set<transaction_input> ; inputs ,
1 : [* transaction_output] ,
2 : coin ; fee ,
? 3 : uint ; time to live ,
? 4 : certificates ,
? 5 : withdrawals ,
? 7 : auxiliary_data_hash ,
? 8 : uint ; validity interval start ,
? 9 : mint ,
? 11 : script_data_hash ,
? 13 : nonempty_set<transaction_input> ; collateral inputs ,
? 14 : required_signers ,
? 15 : network_id ,
? 16 : transaction_output ; collateral return ,
? 17 : coin ; total collateral ,
? 18 : nonempty_set<transaction_input> ; reference inputs ,
? 19 : voting_procedures ; New; Voting procedures ,
? 20 : proposal_procedures ; New; Proposal procedures ,
? 21 : coin ; New; current treasury value ,
? 22 : positive_coin ; New; donation }

AC-CLI.025 Transaction BUILD-RAW with Proposal Input (HOLDER)

RequirementsAcceptance Criteria
Transaction build-raw includes a mechanism to incorporate a proposal file into the transaction body.An ADA Holder can include a proposal in a transaction by passing the proposal file in the transaction body.
When constructing a transaction body that includes a proposal, the resulting tx body conforms to the conway cddl so that voting procedures are recorded with the tag 19..The generated transaction body complies with the Conway CDDL where: transaction_body = {
0 : set<transaction_input> ; inputs ,
1 : [* transaction_output] ,
2 : coin ; fee ,
? 3 : uint ; time to live ,
? 4 : certificates ,
? 5 : withdrawals ,
? 7 : auxiliary_data_hash ,
? 8 : uint ; validity interval start ,
? 9 : mint ,
? 11 : script_data_hash ,
? 13 : nonempty_set<transaction_input> ; collateral inputs ,
? 14 : required_signers ,
? 15 : network_id ,
? 16 : transaction_output ; collateral return ,
? 17 : coin ; total collateral ,
? 18 : nonempty_set<transaction_input> ; reference inputs ,
? 19 : voting_procedures ; New; Voting procedures ,
? 20 : proposal_procedures ; New; Proposal procedures ,
? 21 : coin ; New; current treasury value ,
? 22 : positive_coin ; New; donation }

AC-CLI.026 Transaction BUILD-RAW with Vote Input (SPO, DREP, CCM)

RequirementsAcceptance Criteria
Transaction build-raw includes a mechanism to incorporate a vote file into the transaction body.A DRep, SPO, or CC member can include their vote in a transaction by passing a vote file in the transaction body.
When constructing a transaction body that includes a vote, the resulting tx body conforms to the conway cddl so that voting procedures are recorded with the tag 19.When constructing a transaction body that includes a vote, the resulting tx body conforms to the Conway CDDL where: transaction_body = {
0 : set<transaction_input> ; inputs ,
1 : [* transaction_output] ,
2 : coin ; fee ,
? 3 : uint ; time to live ,
? 4 : certificates ,
? 5 : withdrawals ,
? 7 : auxiliary_data_hash ,
? 8 : uint ; validity interval start ,
? 9 : mint ,
? 11 : script_data_hash ,
? 13 : nonempty_set<transaction_input> ; collateral inputs ,
? 14 : required_signers ,
? 15 : network_id ,
? 16 : transaction_output ; collateral return ,
? 17 : coin ; total collateral ,
? 18 : nonempty_set<transaction_input> ; reference inputs ,
? 19 : voting_procedures ; New; Voting procedures ,
? 20 : proposal_procedures ; New; Proposal procedures ,
? 21 : coin ; New; current treasury value ,
? 22 : positive_coin ; New; donation }

AC-CLI.027 Create stake registration certificate New format (HOLDER)

RequirementsAcceptance Criteria
Allows the user to provide credentials in various forms: Stake verification key, Stake verification key file, Stake address, Stake script file.The command accepts the following and executes with the expected outcome: Stake verification key, Stake verification key file, Stake address, Stake script hash. Using one of these is mandatory.
Requires the user to provide the required key deposit in lovelace.ADA Holder can pass the key deposit in lovelace using the following flag
`--key-reg-deposit-amt` (NATURAL). The argument is a decimal; providing any other type of input will result in an exception (no implicit conversion). Not providing the flag and its argument generates an exception.
The command has a flag to specify the path where the output file will be saved.The `--out-file` flag is available to specify the file where the vote for a governance action will be saved.
The command handles errors gracefully and provides helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.
The certificate should be saved in a text envelope format.Given that the certificate is saved, it is in a text envelope format consisting of a JSON object with type, description, and cbor hex fields, where:
{ "type": "CertificateConway", "description": "Stake Address Registration Certificate", "cborHex": ""}.
The resulting certificate conforms with the conway cddl.The resulting certificate conforms with the conway cddl, where
`reg_cert = (7, stake_credential, coin)`.

AC-CLI.028 Create stake deregistration certificate (HOLDER)

RequirementsAcceptance Criteria
Allows the user to provide credentials in any of the following forms: Stake verification key, Stake verification key file, Stake address, Stake script hash.The command accepts any of Stake verification key, Stake verification key file, Stake address, Stake script hash. Using one of these is mandatory.
Requires the user to provide key deposit (in lovelace) that was paid by the target stake credential when it registered.ADA Holder can pass the key deposit in lovelace using the following flag
`--key-reg-deposit-amt` (NATURAL); the argument is a decimal number, providing any other type (i.e. hex, binary) results in an exception (no implicit conversion). Not providing the flag and its argument generates an exception.
The command has a flag to specify the path where the output file will be saved.The `--out-file` flag is available to specify the file where the vote for a governance action will be saved.
The command handles errors gracefully and provides helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.
The certificate should be saved in a text envelope format.Given that the deregistration certificate is saved, it is in a text envelope format consisting of a JSON object with type, description, and cbor hex fields, where:
{ "type": "CertificateConway", "description": "Stake Address Deregistration Certificate", "cborHex": ""}.
The resulting certificate conforms with the conway cddl.The resulting certificate conforms with the conway cddl, where
`unreg_cert = (8, stake_credential, coin)`.

AC-CLI.029 Delegate vote to DRep (HOLDER)

RequirementsAcceptance Criteria
Allows the user to provide credentials in any of the following forms: Stake verification key, Stake verification key file, Stake address, Stake script file.The command accepts the following and executes with the expected outcome:
Stake verification key (STRING),
Stake verification key file (FILE),
Stake address (ADDRESS),
Stake script file (FILE). Using one of these is mandatory.
When delegating to a registered DRep, the user can provide the target DRep with: DRep script hash, DRep verification key, DRep verification key file, DRep key hash (DRep ID).The command accepts the following and executes with the expected outcome:
DRep script hash (HASH),
DRep verification key (STRING),
DRep verification key file (FILE),
DRep key hash (HASH). Using one of these is mandatory.
When delegating to a default DRep the user can use a flag to select either always-abstain or always-no-confidence, but not both.The command accepts the following and executes with the expected outcome:
Always-abstain flag XOR
Always-no-confidence flag. Using one of these is mandatory.
The command has a flag to specify the path where the output file will be saved.The output file path flag is available to specify the file where the vote for a governance action will be saved.
The command handles errors gracefully and provides helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.
The certificate should be saved in a text envelope format.Given that the deregistration certificate is saved, it is in a text envelope format consisting of a JSON object with type, description, and cbor hex fields, where:
{ "type": "CertificateConway", "description": "Vote Delegation Certificate", "cborHex": ""}.
The resulting certificate conforms with the conway cddl.The resulting certificate conforms with the conway cddl, where
`vote_deleg_cert = (9, stake_credential, drep)`.

AC-CLI.030 Delegate stake to SPO and votes to DRep with a single certificate (HOLDER)

RequirementsAcceptance Criteria
Allows the user to provide credentials in any of the following forms: Stake verification key, Stake verification key file, Stake address, Stake script file.The command accepts the following and executes with the expected outcome:
- Stake verification key (STRING)
- Stake verification key file (FILE)
- Stake address (ADDRESS)
- Stake script file (FILE). At least one of these is mandatory.
The user can provide the target stake pool with: Stake pool cold verification key, Stake pool cold verification key file, Stake pool ID.The command accepts the following and executes with the expected outcome:
- Stake pool cold verification key (STRING)
- Stake pool cold verification key file (FILE)
- Stake pool ID (STAKE_POOL_ID). At least one of these is mandatory.
Allows the user to provide the target DRep credential with: DRep script hash, DRep verification key, DRep verification key file, DRep key hash (Drep ID).The command accepts the following and executes with the expected outcome:
- DRep script hash (HASH)
- DRep verification key (STRING)
- DRep verification key file (FILE)
- DRep key hash (HASH). At least one of these is mandatory.
When delegating to a default DRep the user can use a flag to select either always-abstain or always-no-confidence, but not both.The command accepts the following and executes with the expected outcome:
- Always-abstain flag XOR
- Always-no-confidence flag. Using one of these is mandatory.
The command has a flag to specify the path where the output file will be saved.The output file path flag is available to specify the file where the vote for a governance action will be saved.
The command handles errors gracefully and provides helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.
The certificate should be saved in a text envelope format.The certificate should be saved in a text envelope format:
{ "type": "CertificateConway", "description": "Stake and Vote Delegation Certificate", "cborHex": "" }.
The resulting certificate conforms with the Conway CDDL.The resulting certificate conforms with the Conway CDDL, where
`stake_vote_deleg_cert = (10, stake_credential, pool_keyhash, drep)`.

AC-CLI.031 Query governance state (ANY)

RequirementsAcceptance Criteria
The new command is implemented as `cardano-cli conway query gov-state`.Running `cardano-cli conway query gov-state` dumps the entire governance state.
The command requires the user to specify the network id (mainnet or testnet magic).The flags `--mainnet` and `--testnet-magic` are used to specify the network id.
The command has the flag `--out-file` to specify the file where the output will be saved.The optional `--out-file` flag is available to specify the file where the governance state dump will be saved.
The output is a JSON showing, at least, the following information: Commitee Members, Proposals, Votes, Expired Actions, Enacted Actions.The output is in a JSON format so that it can be further processed programmatically.
The command handles errors gracefully and provides helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter. The command requires a connection to the node, an exception is raised if there is none.

AC-CLI.032 Query committee state (ANY)

RequirementsAcceptance Criteria
The command is implemented as `cardano-cli conway query committee-state`.Running `cardano-cli conway query committee-state` returns the map of committee member key hashes and the current state.
Requires the user to provide the network id.The flags `--mainnet` and `--testnet-magic` are used to specify the network id.
Supports a query for a specific CC credential: CC cold verification key, CC cold verification key file, CC cold verification key hash, CC hot verification key, CC hot verification key file, CC hot verification key hash.The command allows querying the committee state with either cold or hot credentials of a target committee member, so that running `cardano-cli conway query committee-state` with any of the flags: `--cold-verification-key STRING`, `--cold-verification-key-file FILE`, `--cold-verification-key-hash STRING`, `--hot-key STRING`, `--hot-key-file FILE`, `--hot-key-hash STRING` returns the state of the target committee member. The command allows zero to many credentials.
When no CC key is specified, the command outputs information for all committee members.Running `cardano-cli conway query committee-state` without any credential flags returns the state of all committee members.
The command allows filtering by active, expired, and unrecognized members (registered hot keys to an unknown CC cold key).The command supports the flags `--active`, `--expired`, and `--unrecognized` to filter committee members by their current status.
The output is a JSON showing the following information: Cold key hash, Hot credential status (Authorized/NotAuthorized). When Authorized, it shows the hot key hash, Status (Active, Expired, Unrecognized), Expiration epoch, Current epoch, Quorum.The output is in a JSON format so that it can be further processed programmatically. `{"committee": {"keyHash-": {"expiration":, "hotCredsAuthStatus": {"tag": ""},"nextEpochChange": "","status": ""}}, "epoch":,"quorum": }`
The command has a flag to specify the path where the output file will be saved.The `--out-file` flag is available to specify the file where the committee state dump will be saved.
The command handles errors gracefully and provides helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter.

AC-CLI.033 Query DRep state (ANY)

RequirementsAcceptance Criteria
The command is implemented as `cardano-cli conway query drep-state`.Running `cardano-cli conway query drep-state` returns the map of drep key hashes and the current state.
Requires the user to provide the network id.The flags "mainnet" and "testnet-magic" are used to specify the network id.
Supports a query for a specific DRep credential: DRep verification key, DRep verification key file, DRep verification key hash (DRep ID).Running "cardano-cli conway query drep-stake-distribution" with any of the following: DRep verification key, DRep verification key file, or DRep verification key hash (DRep ID) returns the stake delegated to that DRep. The command allows zero to many credentials.
If no DRep credential is specified it returns all DReps.When no DRep credential is supplied, the command returns the state of all DReps.
The command has a flag to specify the path where the output file will be saved.The "out-file" flag is available to specify the file where the vote for a governance action will be saved.
The output is a JSON showing the following information: DRep Key hash, Anchor (DRep metadata), Deposit, Expiry (from DRep activity).The output is in a JSON format so that it can be further processed programmatically. `{ "keyHash": "" }, { "anchor": { "dataHash": "", "url": "" }, "deposit":, "expiry": }`
The command handles errors gracefully and provides helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter. The command requires a connection to the node, an exception is raised if there is none.

AC-CLI.034 Query DRep stake distribution (ANY)

RequirementsAcceptance Criteria
The command is implemented as `cardano-cli conway query drep-stake-distribution`.Running `cardano-cli conway query drep-stake-distribution` returns the map of DRep key hashes and the current voting stake delegated to each, including default DReps.
Requires the user to provide the network id.The flags "mainnet" and "testnet-magic" are used to specify the network id.
Supports a query for a specific DRep credential: DRep verification key, DRep verification key file, DRep verification key hash (DRep ID).Running `cardano-cli conway query drep-stake-distribution` with any of the following: DRep verification key, DRep verification key file, or DRep verification key hash (DRep ID) returns the stake delegated to that DRep. The command allows zero to many credentials.
The command has the flag `--out-file` to specify the file where the output will be saved.The `--out-file` flag is available to specify the file where the stake distribution output will be saved.
The output is a JSON showing the following information: DRep Key hash an total stake delegated to this DRep.The output is in a JSON format so that it can be further processed programmatically.
The command handles errors gracefully and provides helpful error messages when required options are missing or invalid inputs are provided.If any required input parameter is missing or incorrect, the command raises an error indicating the missing or incorrect parameter. The command requires a connection to the node, an exception is raised if there is none.

AC-CLI.035 Expand query stake-address-info to show deposits and vote delegation (HOLDER)

RequirementsAcceptance Criteria
Expand the command "query stake-address-info" to return the DRep id of the DRep that the stake credential is delegated to and the value of the existing deposits.The command returns: Stake-address, Rewards account balance, Stake pool it is delegated to (stakeDelegation, null if it isn’t), DRep it is delegated to (voteDelegation, null if it isn’t), Stake key deposit, Cumulative governance action deposits.

AC-CLI.036

Title: (WIP) Scripts as DRep (HOLDER)

User Story

As an ada holder I want to register a native or a Plutus script as a DRep.

Functional requirements

RequirementsAcceptance Criteria

AC-CLI.0

Column 1 HeaderColumn 2 Header
Row 1, Cell 1Row 1, Cell 2
Row 2, Cell 1Row 2, Cell 2