atlas-cardano-0.9.0: Application backend for Plutus smart contracts on Cardano
Copyright(c) 2023 GYELD GMBH
LicenseApache 2.0
Maintainer[email protected]
Stabilitydevelop
Safe HaskellSafe-Inferred
LanguageGHC2021

GeniusYield.Types.Key

Description

 
Synopsis

Documentation

Signing key

data GYSigningKey (kr ∷ GYKeyRole) #

>>> "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290" :: (GYSigningKey 'GYKeyRolePayment)
GYSigningKey (GYKeyRolePayment) "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290"

Instances

Instances details
(SingGYKeyRoleI kr, SerialiseAsCBOR (GYSigningKeyToApi kr)) ⇒ FromJSON (GYSigningKey kr) #
>>> Aeson.eitherDecode @GYPaymentSigningKey "\"58205ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290\""
Right (GYSigningKey (GYKeyRolePayment) "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290")
>>> Aeson.eitherDecode @GYPaymentSigningKey "\"58205ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fceczzz\""
Left "Error in $: invalid character at offset: 65"
Instance details

Defined in GeniusYield.Types.Key

(SingGYKeyRoleI kr, SerialiseAsCBOR (GYSigningKeyToApi kr)) ⇒ ToJSON (GYSigningKey kr) #
>>> LBS8.putStrLn $ Aeson.encode ("5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290" :: GYPaymentSigningKey)
"58205ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290"
Instance details

Defined in GeniusYield.Types.Key

SingGYKeyRoleI kr ⇒ ToShelleyWitnessSigningKey (GYSigningKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

IsString (GYSigningKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

Methods

fromStringStringGYSigningKey kr #

SingGYKeyRoleI kr ⇒ Show (GYSigningKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

Methods

showsPrecIntGYSigningKey kr → ShowS #

showGYSigningKey kr → String #

showList ∷ [GYSigningKey kr] → ShowS #

PrintfArg (GYSigningKey kr) #
>>> Printf.printf "%s\n" ("5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290" :: GYPaymentSigningKey)
5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290
Instance details

Defined in GeniusYield.Types.Key

(SingGYKeyRoleI kr, SerialiseAsCBOR (GYSigningKeyToApi kr)) ⇒ FromField (GYSigningKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

Methods

parseFieldFieldParser (GYSigningKey kr) #

(SingGYKeyRoleI kr, SerialiseAsCBOR (GYSigningKeyToApi kr)) ⇒ ToField (GYSigningKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

Methods

toFieldGYSigningKey kr → Field #

SingGYKeyRoleI kr ⇒ Eq (GYSigningKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

Methods

(==)GYSigningKey kr → GYSigningKey kr → Bool #

(/=)GYSigningKey kr → GYSigningKey kr → Bool #

SingGYKeyRoleI kr ⇒ Ord (GYSigningKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

Methods

compareGYSigningKey kr → GYSigningKey kr → Ordering #

(<)GYSigningKey kr → GYSigningKey kr → Bool #

(<=)GYSigningKey kr → GYSigningKey kr → Bool #

(>)GYSigningKey kr → GYSigningKey kr → Bool #

(>=)GYSigningKey kr → GYSigningKey kr → Bool #

maxGYSigningKey kr → GYSigningKey kr → GYSigningKey kr #

minGYSigningKey kr → GYSigningKey kr → GYSigningKey kr #

signingKeyFromRawBytesByteStringMaybe (GYSigningKey kr) #

Decode from raw bytes.

signingKeyFromRawBytesHexByteStringEither String (GYSigningKey kr) #

Decode from raw bytes represented as hex.

Verification key

data GYVerificationKey (kr ∷ GYKeyRole) #

Instances

Instances details
(SingGYKeyRoleI kr, SerialiseAsCBOR (GYVerificationKeyToApi kr)) ⇒ FromJSON (GYVerificationKey kr) #
>>> Aeson.eitherDecode @GYPaymentVerificationKey "\"58200717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605\""
Right (GYVerificationKey (GYKeyRolePayment) "0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605")
>>> Aeson.eitherDecode @GYPaymentVerificationKey "\"58200717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193zzz\""
Left "Error in $: invalid character at offset: 65"
Instance details

Defined in GeniusYield.Types.Key

(SingGYKeyRoleI kr, SerialiseAsCBOR (GYVerificationKeyToApi kr)) ⇒ ToJSON (GYVerificationKey kr) #
>>> LBS8.putStrLn $ Aeson.encode ("0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605" :: GYPaymentVerificationKey)
"58200717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605"
Instance details

Defined in GeniusYield.Types.Key

IsString (GYVerificationKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

SingGYKeyRoleI kr ⇒ Show (GYVerificationKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

PrintfArg (GYVerificationKey kr) #
>>> Printf.printf "%s\n" ("0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605" :: GYPaymentVerificationKey)
0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605
Instance details

Defined in GeniusYield.Types.Key

Eq (GYVerificationKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

verificationKeyFromRawBytesHexByteStringEither String (GYVerificationKey kr) #

Decode from raw bytes represented as hex.

Extended signing key

data GYExtendedSigningKey (kr ∷ GYKeyRole) #

Extended signing key.

Instances

Instances details
SingGYKeyRoleI kr ⇒ ToShelleyWitnessSigningKey (GYExtendedSigningKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

IsString (GYExtendedSigningKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

SingGYKeyRoleI kr ⇒ Show (GYExtendedSigningKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

SingGYKeyRoleI kr ⇒ Eq (GYExtendedSigningKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

SingGYKeyRoleI kr ⇒ Ord (GYExtendedSigningKey kr) # 
Instance details

Defined in GeniusYield.Types.Key

extendedSigningKeyFromRawBytesHexByteStringEither String (GYExtendedSigningKey kr) #

Decode from raw bytes represented as hex.

Payment verification key

type GYPaymentVerificationKey = GYVerificationKey 'GYKeyRolePayment #

type GYPaymentVerificationKey = GYVerificationKey 'GYKeyRolePayment
>>> "0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605" :: GYPaymentVerificationKey
GYVerificationKey (GYKeyRolePayment) "0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605"

paymentVerificationKeyFromApiVerificationKey PaymentKeyGYPaymentVerificationKey #

>>> paymentVerificationKeyFromApi "0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605"
GYVerificationKey (GYKeyRolePayment) "0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605"

paymentVerificationKeyToApiGYPaymentVerificationKeyVerificationKey PaymentKey #

>>> paymentVerificationKeyToApi "0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605"
"0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605"

Payment signing key

type GYPaymentSigningKey = GYSigningKey 'GYKeyRolePayment #

type GYPaymentSigningKey = GYSigningKey 'GYKeyRolePayment
>>> "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290" :: GYPaymentSigningKey
GYSigningKey (GYKeyRolePayment) "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290"

type GYExtendedPaymentSigningKey = GYExtendedSigningKey 'GYKeyRolePayment #

type GYExtendedPaymentSigningKey = GYExtendedSigningKey 'GYKeyRolePayment

paymentSigningKeyFromApiSigningKey PaymentKeyGYPaymentSigningKey #

>>> paymentSigningKeyFromApi "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290"
GYSigningKey (GYKeyRolePayment) "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290"

paymentSigningKeyToApiGYPaymentSigningKeySigningKey PaymentKey #

>>> paymentSigningKeyToApi "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290"
"5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290"

readPaymentSigningKeyFilePathIO GYPaymentSigningKey #

Reads a payment signing key from a file.

readExtendedPaymentSigningKeyFilePathIO GYExtendedPaymentSigningKey #

Reads extended payment signing key from file

writePaymentSigningKeyFilePathGYPaymentSigningKeyIO () #

Writes a payment signing key to a file.

writeExtendedPaymentSigningKeyFilePathGYExtendedPaymentSigningKeyIO () #

Writes a extended payment signing key to a file.

paymentVerificationKeyGYPaymentSigningKeyGYPaymentVerificationKey #

>>> paymentVerificationKey "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290"
GYVerificationKey (GYKeyRolePayment) "0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605"

generatePaymentSigningKeyIO GYPaymentSigningKey #

Generates a new random payment signing key.

Stake verification key

type GYStakeVerificationKey = GYVerificationKey 'GYKeyRoleStaking #

type GYStakeVerificationKey = GYVerificationKey 'GYKeyRoleStaking
>>> "0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605" :: GYStakeVerificationKey
GYVerificationKey (GYKeyRoleStaking) "0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605"

stakeVerificationKeyFromApiVerificationKey StakeKeyGYStakeVerificationKey #

>>> stakeVerificationKeyFromApi "0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605"
GYVerificationKey (GYKeyRoleStaking) "0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605"

stakeVerificationKeyToApiGYStakeVerificationKeyVerificationKey StakeKey #

>>> stakeVerificationKeyToApi "0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605"
"0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605"

Stake signing key

type GYStakeSigningKey = GYSigningKey 'GYKeyRoleStaking #

type GYStakeSigningKey = GYSigningKey 'GYKeyRoleStaking
>>> "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290" :: GYStakeSigningKey
GYSigningKey (GYKeyRoleStaking) "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290"

type GYExtendedStakeSigningKey = GYExtendedSigningKey 'GYKeyRoleStaking #

type GYExtendedStakeSigningKey = GYEExtendedSigningKey 'GYKeyRoleStaking

stakeSigningKeyFromApiSigningKey StakeKeyGYStakeSigningKey #

>>> stakeSigningKeyFromApi "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290"
GYSigningKey (GYKeyRoleStaking) "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290"

stakeSigningKeyToApiGYStakeSigningKeySigningKey StakeKey #

>>> stakeSigningKeyToApi "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290"
"5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290"

readStakeSigningKeyFilePathIO GYStakeSigningKey #

Reads a stake signing key from a file.

readExtendedStakeSigningKeyFilePathIO GYExtendedStakeSigningKey #

Reads extended stake signing key from file

writeStakeSigningKeyFilePathGYStakeSigningKeyIO () #

Writes a stake signing key to a file.

writeExtendedStakeSigningKeyFilePathGYExtendedStakeSigningKeyIO () #

Writes a extended stake signing key to a file.

stakeVerificationKeyGYStakeSigningKeyGYStakeVerificationKey #

>>> stakeVerificationKey "5ac75cb3435ef38c5bf15d11469b301b13729deb9595133a608fc0881fcec290"
GYVerificationKey (GYKeyRoleStaking) "0717bc56ed4897c3dde0690e3d9ce61e28a55f520fde454f6b5b61305b193605"

generateStakeSigningKeyIO GYStakeSigningKey #

Generates a new random stake signing key.