Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[FEATURE] - Add a `certificate view` command to decode certificates into human-readable form

Chiusa
#1,487 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@palas ci sta già lavorando.

Dal 27/10/2026.

  • #1488 di @palas — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

leios

Internal/External
Internal

Area
Other: Certificates (stake pool registration, delegation, governance)

Describe the feature you'd like

A command, similar to cardano-cli debug transaction view, that takes a certificate file, decodes its CBOR, and prints the contents in a human-readable format (JSON or YAML). Users could then inspect a certificate before including it in a transaction.

Today a certificate file is a text envelope with a hex-encoded CBOR payload:

{
    "type": "Certificate",
    "description": "Stake Pool Registration Certificate",
    "cborHex": "8a03581c..."
}

The CLI has no way to see what this certificate says without building a transaction around it and running debug transaction view on the result.

Motivating use case: stake pool registration

The pool operator and the pool owners are often different people. The operator creates the certificate with stake-pool registration-certificate, using the pool parameters (pledge, cost, margin, reward account, owners, relays, metadata). Later, the owners witness the transaction that registers the pool. Before that, they should be able to check the certificate's contents directly, without waiting for a transaction to be built. An owner should be able to run:

cardano-cli debug certificate view --certificate-file pool-registration.cert

and see, for example:

{
  "Pool registration": {
    "pool id": "pool1...",
    "vrf key hash": "...",
    "pledge": 100000000000,
    "cost": 170000000,
    "margin": "1/100",
    "reward account": "stake1...",
    "owners": [
      "<stake key hash>"
    ],
    "relays": [
      { "single host name": { "dnsName": "relay1.example.com", "port": 3001 } }
    ],
    "metadata": {
      "url": "https://example.com/pool.json",
      "hash": "..."
    }
  }
}

With this output the owner can check that:

  • the pledge is what they agreed to, and their stake covers it,
  • the reward account, margin and cost are as agreed,
  • the metadata URL and hash point to the expected file.

Proposed interface

Mirror the options of debug transaction view:

Usage: cardano-cli debug certificate view [--output-json | --output-yaml]
                                          [--out-file FILEPATH]
                                          --certificate-file FILEPATH

  Print a certificate.

Available options:
  --output-json              Format certificate view output to JSON (default).
  --output-yaml              Format certificate view output to YAML.
  --out-file FILEPATH        Optional output file. Default is to write to stdout.
  --certificate-file FILEPATH
                             Input filepath of the certificate.
  • JSON is the default output format and YAML is optional, as in debug transaction view.
  • --certificate-file should accept - / pipes (via fileOrPipe) like the tx view input does.
  • The command should support every certificate type the CLI can create: stake address registration/deregistration/delegation, pool registration/retirement, DRep registration/update/retirement, committee hot key authorization/cold key resignation, and the combined registration+delegation certificates.

Acceptance criteria

  • cardano-cli debug certificate view or similar exists with --output-json (default), --output-yaml, --out-file, --certificate-file.
  • All certificate types produced by the CLI in the supported eras decode and render without falling through to "unsupported certificate".
  • Pool registration output shows pool id, VRF key hash, pledge, cost, margin, reward account, owners, relays and metadata (URL + hash) in a readable form.
  • debug transaction view and the new command render a given certificate identically.
  • Golden tests cover each certificate type in JSON and YAML; help goldens updated.
  • Changelog fragment added.

Describe alternatives you've considered

  • Build a transaction and run debug transaction view. This works, but it means building a throwaway transaction (inputs, fee, etc.) only to inspect a certificate. The certificate also ends up next to unrelated transaction fields, and the pool params rendering is still the raw ledger form.
  • Decode the CBOR manually (e.g. with cbor.me or cbor-diag). This needs knowledge of the ledger CDDL, gives no field names, and is error-prone. It isn't a reasonable expectation for pool owners.
  • Put the command under stake-pool (e.g. stake-pool registration-certificate view). This is too narrow; the same need applies to delegation and governance certificate.
Lingua principale
Haskell
Stelle
72
Fork
26
Merge medio
2g 1h
PR unite (30g)
22

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IntersectMBO/cardano-cli

Tutte le issue di IntersectMBO/cardano-cli

Issue simili

Altre issue su Haskell

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.