Copyright | (c) 2024 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Synopsis
- data GYKeyHash (kr ∷ GYKeyRole)
- keyHashToLedger ∷ GYKeyHash kr → KeyHash (GYKeyRoleToLedger kr) StandardCrypto
- keyHashFromLedger ∷ KeyHash (GYKeyRoleToLedger kr) StandardCrypto → GYKeyHash kr
- keyHashToApi ∷ ∀ kr. SingGYKeyRoleI kr ⇒ GYKeyHash kr → GYHashToApi kr
- keyHashFromApi ∷ ∀ kr. SingGYKeyRoleI kr ⇒ GYHashToApi kr → GYKeyHash kr
- keyHashToRawBytes ∷ GYKeyHash kr → ByteString
- keyHashToRawBytesHex ∷ GYKeyHash kr → ByteString
- keyHashToRawBytesHexText ∷ GYKeyHash kr → Text
- keyHashFromRawBytes ∷ ByteString → Maybe (GYKeyHash kr)
- keyHashFromRawBytesHex ∷ ByteString → Either String (GYKeyHash kr)
- data GYVRFVerKeyHash (kr ∷ GYKeyRoleVRF)
- vrfVerKeyHashToLedger ∷ GYVRFVerKeyHash kr → Hash StandardCrypto (VerKeyVRF StandardCrypto)
- vrfVerKeyHashFromLedger ∷ Hash StandardCrypto (VerKeyVRF StandardCrypto) → GYVRFVerKeyHash kr
- vrfVerKeyHashToRawBytes ∷ GYVRFVerKeyHash kr → ByteString
- vrfVerKeyHashToRawBytesHex ∷ GYVRFVerKeyHash kr → ByteString
- vrfVerKeyHashToRawBytesHexText ∷ GYVRFVerKeyHash kr → Text
- vrfVerKeyHashFromRawBytes ∷ ByteString → Maybe (GYVRFVerKeyHash kr)
- vrfVerKeyHashFromRawBytesHex ∷ ByteString → Either String (GYVRFVerKeyHash kr)
Documentation
data GYKeyHash (kr ∷ GYKeyRole) #
Hash of a public key corresponding to a given GYKeyRole
.
Instances
SingGYKeyRoleI kr ⇒ FromJSON (GYKeyHash kr) # |
Invalid characters:
|
Defined in GeniusYield.Types.KeyHash | |
ToJSON (GYKeyHash kr) # |
|
AsPubKeyHash (GYKeyHash kr) # | |
Defined in GeniusYield.Types.KeyHash toPubKeyHash ∷ GYKeyHash kr → GYPubKeyHash # fromPubKeyHash ∷ GYPubKeyHash → GYKeyHash kr # | |
CanSignTx (GYKeyHash kr) # | |
Defined in GeniusYield.Types.KeyHash | |
IsString (GYKeyHash kr) # | |
Defined in GeniusYield.Types.KeyHash fromString ∷ String → GYKeyHash kr # | |
SingGYKeyRoleI kr ⇒ Show (GYKeyHash kr) # | |
PrintfArg (GYKeyHash kr) # |
|
Defined in GeniusYield.Types.KeyHash formatArg ∷ GYKeyHash kr → FieldFormatter # parseFormat ∷ GYKeyHash kr → ModifierParser # | |
FromField (GYKeyHash kr) # |
|
Defined in GeniusYield.Types.KeyHash parseField ∷ Field → Parser (GYKeyHash kr) # | |
ToField (GYKeyHash kr) # |
|
Defined in GeniusYield.Types.KeyHash | |
Eq (GYKeyHash kr) # | |
Ord (GYKeyHash kr) # | |
Defined in GeniusYield.Types.KeyHash | |
SingGYKeyRoleI kr ⇒ ToSchema (GYKeyHash kr) # |
|
Defined in GeniusYield.Types.KeyHash declareNamedSchema ∷ Proxy (GYKeyHash kr) → Declare (Definitions Schema) NamedSchema # |
keyHashToLedger ∷ GYKeyHash kr → KeyHash (GYKeyRoleToLedger kr) StandardCrypto #
Convert to corresponding ledger representation.
keyHashFromLedger ∷ KeyHash (GYKeyRoleToLedger kr) StandardCrypto → GYKeyHash kr #
Convert from corresponding ledger representation.
keyHashToApi ∷ ∀ kr. SingGYKeyRoleI kr ⇒ GYKeyHash kr → GYHashToApi kr #
>>>
keyHashToApi pkh
"ec91ac77b581ba928db86cd91d11e64032450677c6b80748ce0b9a81"
keyHashFromApi ∷ ∀ kr. SingGYKeyRoleI kr ⇒ GYHashToApi kr → GYKeyHash kr #
>>>
keyHashFromApi @'GYKeyRolePayment "e1cbb80db89e292269aeb93ec15eb963dda5176b66949fe1c2a6a38d"
GYKeyHash (GYKeyRolePayment) "e1cbb80db89e292269aeb93ec15eb963dda5176b66949fe1c2a6a38d"
keyHashToRawBytes ∷ GYKeyHash kr → ByteString #
Get corresponding raw bytes.
keyHashToRawBytesHex ∷ GYKeyHash kr → ByteString #
Get corresponding raw bytes represented as hex.
keyHashToRawBytesHexText ∷ GYKeyHash kr → Text #
Get corresponding raw bytes represented as hex text.
keyHashFromRawBytes ∷ ByteString → Maybe (GYKeyHash kr) #
Decode from raw bytes.
keyHashFromRawBytesHex ∷ ByteString → Either String (GYKeyHash kr) #
Decode from raw bytes represented as hex.
data GYVRFVerKeyHash (kr ∷ GYKeyRoleVRF) #
Hash of a public key corresponding to a given GYKeyRoleVRF
.
Instances
vrfVerKeyHashToRawBytes ∷ GYVRFVerKeyHash kr → ByteString #
Get corresponding raw bytes.
vrfVerKeyHashToRawBytesHex ∷ GYVRFVerKeyHash kr → ByteString #
Get corresponding raw bytes represented as hex.
vrfVerKeyHashToRawBytesHexText ∷ GYVRFVerKeyHash kr → Text #
Get corresponding raw bytes represented as hex text.
vrfVerKeyHashFromRawBytes ∷ ByteString → Maybe (GYVRFVerKeyHash kr) #
Decode from raw bytes.
vrfVerKeyHashFromRawBytesHex ∷ ByteString → Either String (GYVRFVerKeyHash kr) #
Decode from raw bytes represented as hex.