cometa-0.1.0.0: Idiomatic Haskell bindings to cardano-c
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cometa.Transaction.Authority

Description

Discover the unique direct key authorities of a top-level transaction. Resolve spending and collateral inputs before requesting hashes, then select the corresponding signing keys in the application's wallet.

import qualified Cometa.Transaction.Authority as Authority

discover transaction resolved = Authority.requiredKeyHashes transaction resolved
Synopsis

Documentation

requiredKeyHashes :: Transaction -> [Utxo] -> IO (Either Error (Set Blake2bHash)) Source #

Unique 28-byte key hashes from top-level key guards, resolved spending and collateral addresses, withdrawals, certificates and voters. The set has no credential-role assignment. Every spending and collateral input must resolve; duplicate resolution entries and missing references return an error. Extra resolved outputs are allowed, and reference inputs need no resolution here.

Native scripts, script credentials, Byron bootstrap authorities and nested transaction levels are excluded. This does not identify every key that could satisfy arbitrary script logic, verify signatures, or validate ledger rules.