Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Synopsis
- data GYPaymentKeyHash
- paymentKeyHashFromPlutus ∷ PubKeyHash → Either PlutusToCardanoError GYPaymentKeyHash
- paymentKeyHashToPlutus ∷ GYPaymentKeyHash → PubKeyHash
- paymentKeyHashToApi ∷ GYPaymentKeyHash → Hash PaymentKey
- paymentKeyHashFromApi ∷ Hash PaymentKey → GYPaymentKeyHash
- paymentKeyHashFromLedger ∷ KeyHash Payment StandardCrypto → GYPaymentKeyHash
- paymentKeyHashToLedger ∷ GYPaymentKeyHash → KeyHash Payment StandardCrypto
Documentation
data GYPaymentKeyHash #
Instances
FromJSON GYPaymentKeyHash # |
Invalid characters:
|
ToJSON GYPaymentKeyHash # |
|
Defined in GeniusYield.Types.PaymentKeyHash | |
AsPubKeyHash GYPaymentKeyHash # | |
CanSignTx GYPaymentKeyHash # | |
Defined in GeniusYield.Types.PaymentKeyHash | |
IsString GYPaymentKeyHash # | |
Defined in GeniusYield.Types.PaymentKeyHash | |
Show GYPaymentKeyHash # | |
Defined in GeniusYield.Types.PaymentKeyHash showsPrec ∷ Int → GYPaymentKeyHash → ShowS # show ∷ GYPaymentKeyHash → String # showList ∷ [GYPaymentKeyHash] → ShowS # | |
PrintfArg GYPaymentKeyHash # |
|
FromField GYPaymentKeyHash # |
|
Defined in GeniusYield.Types.PaymentKeyHash | |
ToField GYPaymentKeyHash # |
|
Defined in GeniusYield.Types.PaymentKeyHash | |
Eq GYPaymentKeyHash # | |
Defined in GeniusYield.Types.PaymentKeyHash | |
Ord GYPaymentKeyHash # | |
Defined in GeniusYield.Types.PaymentKeyHash compare ∷ GYPaymentKeyHash → GYPaymentKeyHash → Ordering # (<) ∷ GYPaymentKeyHash → GYPaymentKeyHash → Bool # (<=) ∷ GYPaymentKeyHash → GYPaymentKeyHash → Bool # (>) ∷ GYPaymentKeyHash → GYPaymentKeyHash → Bool # (>=) ∷ GYPaymentKeyHash → GYPaymentKeyHash → Bool # max ∷ GYPaymentKeyHash → GYPaymentKeyHash → GYPaymentKeyHash # min ∷ GYPaymentKeyHash → GYPaymentKeyHash → GYPaymentKeyHash # | |
ToSchema GYPaymentKeyHash # | |
paymentKeyHashFromPlutus ∷ PubKeyHash → Either PlutusToCardanoError GYPaymentKeyHash #
>>>
paymentKeyHashFromPlutus "e1cbb80db89e292269aeb93ec15eb963dda5176b66949fe1c2a6a38d"
Right (GYPaymentKeyHash "e1cbb80db89e292269aeb93ec15eb963dda5176b66949fe1c2a6a38d")
>>>
paymentKeyHashFromPlutus "abcd"
Left (DeserialiseRawBytesError {ptceTag = "paymentKeyHashFromPlutus \"\\171\\205\", error: SerialiseAsRawBytesError {unSerialiseAsRawBytesError = \"Unable to deserialise Hash PaymentKey\"}"})
paymentKeyHashToPlutus ∷ GYPaymentKeyHash → PubKeyHash #
>>>
let Just pkh = Aeson.decode @GYPaymentKeyHash "\"e1cbb80db89e292269aeb93ec15eb963dda5176b66949fe1c2a6a38d\""
>>>
paymentKeyHashToPlutus pkh
e1cbb80db89e292269aeb93ec15eb963dda5176b66949fe1c2a6a38d
paymentKeyHashToApi ∷ GYPaymentKeyHash → Hash PaymentKey #
>>>
let Just pkh = Aeson.decode @GYPaymentKeyHash "\"e1cbb80db89e292269aeb93ec15eb963dda5176b66949fe1c2a6a38d\""
>>>
paymentKeyHashToApi pkh
"e1cbb80db89e292269aeb93ec15eb963dda5176b66949fe1c2a6a38d"
paymentKeyHashFromApi ∷ Hash PaymentKey → GYPaymentKeyHash #
>>>
paymentKeyHashFromApi "e1cbb80db89e292269aeb93ec15eb963dda5176b66949fe1c2a6a38d"
GYPaymentKeyHash "e1cbb80db89e292269aeb93ec15eb963dda5176b66949fe1c2a6a38d"
paymentKeyHashFromLedger ∷ KeyHash Payment StandardCrypto → GYPaymentKeyHash #
Convert from corresponding ledger representation.
paymentKeyHashToLedger ∷ GYPaymentKeyHash → KeyHash Payment StandardCrypto #
Convert to corresponding ledger representation.