Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- toPlutusKeyHash :: Hash PaymentKey -> PubKeyHash
- toLedgerKeyHash :: Hash PaymentKey -> KeyHash 'Witness StandardCrypto
- unsafePaymentKeyHashFromBytes :: HasCallStack => ByteString -> Hash PaymentKey
- unsafeScriptHashFromBytes :: HasCallStack => ByteString -> ScriptHash
- unsafeScriptDataHashFromBytes :: HasCallStack => ByteString -> Hash ScriptData
- unsafeCastHash :: (SerialiseAsCBOR (Hash a), SerialiseAsCBOR (Hash b), HasCallStack) => Hash a -> Hash b
Type conversions
toPlutusKeyHash :: Hash PaymentKey -> PubKeyHash Source #
Convert a cardano-api Hash
into a plutus PubKeyHash
toLedgerKeyHash :: Hash PaymentKey -> KeyHash 'Witness StandardCrypto Source #
Convert a cardano-api Hash
into a cardano-ledger KeyHash
unsafePaymentKeyHashFromBytes :: HasCallStack => ByteString -> Hash PaymentKey Source #
Unsafe wrap some bytes as a 'Hash PaymentKey'.
Pre-condition: the input bytestring MUST be of length 28.
unsafeScriptHashFromBytes :: HasCallStack => ByteString -> ScriptHash Source #
Unsafe wrap some bytes as a ScriptHash
, relying on the fact that Plutus
is using Blake2b_224 for hashing data (according to 'cardano-ledger').
Pre-condition: the input bytestring MUST be of length 28.
unsafeScriptDataHashFromBytes :: HasCallStack => ByteString -> Hash ScriptData Source #
Unsafe wrap some bytes as a 'Hash ScriptData', relying on the fact that Plutus is using Blake2b_256 for hashing data (according to 'cardano-ledger').
Pre-condition: the input bytestring MUST be of length 32.
unsafeCastHash :: (SerialiseAsCBOR (Hash a), SerialiseAsCBOR (Hash b), HasCallStack) => Hash a -> Hash b Source #