hydra-cardano-api-0.19.0: A Haskell API for Cardano, tailored to the Hydra project.
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.Cardano.Api.KeyWitness

Synopsis

Extras

signWith :: forall era. IsShelleyBasedEra era => TxId -> SigningKey PaymentKey -> KeyWitness era Source #

Construct a KeyWitness from a transaction id and credentials.

Type Conversions

toLedgerKeyWitness :: [KeyWitness era] -> Set (WitVKey 'Witness StandardCrypto) Source #

Convert a List of cardano-api's KeyWitness into a Set of cardano-ledger's WitVKey.

NOTE: KeyWitness is a bigger type than WitVKey witness, this function does not only the type conversion but also the selection of the right underlying constructors. That means the size of the resulting set may be smaller than the size of the list (but never bigger).

toLedgerBootstrapWitness :: [KeyWitness era] -> Set (BootstrapWitness StandardCrypto) Source #

Convert a List of cardano-api's KeyWitness into a Set of cardano-ledger's BootstrapWitness.

NOTE: See note on toLedgerKeyWitness.

fromLedgerTxWitness :: forall era. (IsShelleyBasedEra era, UsesStandardCrypto era, Era (ShelleyLedgerEra era)) => AlonzoTxWits (ShelleyLedgerEra era) -> [KeyWitness era] Source #

Convert a cardano-ledger's TxWitness object into a list of cardano-api's KeyWitness.

NOTE: this only concerns key and bootstrap witnesses. Scripts and auxiliary data are obviously not part of the resulting list.