Hash Command Line Guide
Bursa Command Line Guide for Generating Cryptographic Hashes used in Cardano.
Create Hashes for Metadata Files or Anchor Data
Section titled “Create Hashes for Metadata Files or Anchor Data”We can use Bursa to create hashes for metadata or anchor-data, often used in Cardano Governance or in Stake Pool Operation.
Hash types:
- metadata - Blake2b-256 hash of pool/DRep metadata JSON
- anchor-data - Blake2b-256 hash of anchor data (constitutions, governance proposals)
Metadata
Section titled “Metadata”The hash metadata commands are used for pool and DRep metadata registration. After validating the file as JSON, the command hashes the exact file bytes with Blake2b-256. Whitespace, field ordering, and other formatting changes can produce different hashes for semantically equivalent JSON. If a workflow requires canonical JSON, write that canonical representation to the file before running the command and hosting the file.
Supported metadata types:
- pool: Pool registration metadata
- drep: DRep registration metadata
Pool Metadata Command Example
./bursa hash metadata pool-metadata.jsonAnchor Data
Section titled “Anchor Data”The hash anchor-data commands are used to generate a Blake2b-256 hash of anchor data used in Cardano governance.
For example, you might want to create an anchor data hash for constitutions, governance proposals, and other documents that are anchored to on-chain governance actions.
Anchor-Data Command Example
./bursa hash anchor-data --file-text constitution.txtExplore other Bursa Commands
Bursa Command Categories
- wallet - Commands for generating wallet and the files needed to manage a Cardano wallet
- api - Commands for running API
- kes-agent - Commands for running the KES agent daemon for a Cardano block producer
- cert - Commands for generating various Cardano certificates
- hash - Commands for generating cryptographic hashes used in Cardano
- script - Commands for multi-signature operations
- address - Commands for working with Cardano addresses
- key - Commands for deriving individual keys from a mnemonic
Docs authored by Doc Holiday