Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- signWith :: forall era. IsShelleyBasedEra era => TxId -> SigningKey PaymentKey -> KeyWitness era
- toLedgerKeyWitness :: [KeyWitness era] -> Set (WitVKey 'Witness StandardCrypto)
- toLedgerBootstrapWitness :: [KeyWitness era] -> Set (BootstrapWitness StandardCrypto)
- fromLedgerTxWitness :: forall era. (IsShelleyBasedEra era, UsesStandardCrypto era, Era (ShelleyLedgerEra era)) => AlonzoTxWits (ShelleyLedgerEra era) -> [KeyWitness era]
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.