Safe Haskell | None |
---|---|
Language | Haskell2010 |
Shelley CLI option data types and functions for cryptographic keys.
Synopsis
- data VerificationKeyOrFile keyrole
- = VerificationKeyValue !(VerificationKey keyrole)
- | VerificationKeyFilePath !(VerificationKeyFile 'In)
- readVerificationKeyOrFile :: forall t (m :: Type -> Type) keyrole. (MonadIOTransError (FileError InputDecodeError) t m, HasTextEnvelope (VerificationKey keyrole), SerialiseAsBech32 (VerificationKey keyrole)) => AsType keyrole -> VerificationKeyOrFile keyrole -> t m (VerificationKey keyrole)
- readVerificationKeyOrTextEnvFile :: forall t (m :: Type -> Type) keyrole. (MonadIOTransError (FileError InputDecodeError) t m, HasTextEnvelope (VerificationKey keyrole)) => AsType keyrole -> VerificationKeyOrFile keyrole -> t m (VerificationKey keyrole)
- data VerificationKeyTextOrFile
- data VerificationKeyTextOrFileError
- readVerificationKeyTextOrFileAnyOf :: VerificationKeyTextOrFile -> IO (Either VerificationKeyTextOrFileError SomeAddressVerificationKey)
- renderVerificationKeyTextOrFileError :: VerificationKeyTextOrFileError -> Doc ann
- data VerificationKeyOrHashOrFile keyrole
- = VerificationKeyOrFile !(VerificationKeyOrFile keyrole)
- | VerificationKeyHash !(Hash keyrole)
- readVerificationKeyOrHashOrFile :: forall t (m :: Type -> Type) keyrole. (MonadIOTransError (FileError InputDecodeError) t m, Key keyrole, SerialiseAsBech32 (VerificationKey keyrole)) => AsType keyrole -> VerificationKeyOrHashOrFile keyrole -> t m (Hash keyrole)
- readVerificationKeyOrHashOrTextEnvFile :: forall t (m :: Type -> Type) keyrole. (MonadIOTransError (FileError InputDecodeError) t m, Key keyrole) => AsType keyrole -> VerificationKeyOrHashOrFile keyrole -> t m (Hash keyrole)
- data VerificationKeyOrHashOrFileOrScript keyrole
- = VkhfsKeyHashFile !(VerificationKeyOrHashOrFile keyrole)
- | VkhfsScript !(File ScriptInAnyLang 'In)
- data VerificationKeyOrHashOrFileOrScriptHash keyrole
- = VkhfshKeyHashFile !(VerificationKeyOrHashOrFile keyrole)
- | VkhfshScriptHash !ScriptHash
- data VerificationKeySource keyrole
- = VksKeyHashFile !(VerificationKeyOrHashOrFile keyrole)
- | VksScript !(File ScriptInAnyLang 'In)
- | VksScriptHash !ScriptHash
- readVerificationKeyOrHashOrFileOrScriptHash :: forall t (m :: Type -> Type) keyrole (kr :: KeyRole). (MonadIOTransError (FileError InputDecodeError) t m, Key keyrole) => AsType keyrole -> (Hash keyrole -> KeyHash kr StandardCrypto) -> VerificationKeyOrHashOrFileOrScriptHash keyrole -> t m (Credential kr StandardCrypto)
- data PaymentVerifier
- data StakeIdentifier
- data StakeVerifier
- generateKeyPair :: (MonadIO m, Key keyrole, HasTypeProxy keyrole) => AsType keyrole -> m (VerificationKey keyrole, SigningKey keyrole)
- data StakePoolRegistrationParserRequirements = StakePoolRegistrationParserRequirements {
- sprStakePoolKey :: VerificationKeyOrFile StakePoolKey
- sprVrfKey :: VerificationKeyOrFile VrfKey
- sprPoolPledge :: Lovelace
- sprPoolCost :: Lovelace
- sprPoolMargin :: Rational
- sprRewardAccountKey :: VerificationKeyOrFile StakeKey
- spoPoolOwnerKeys :: [VerificationKeyOrFile StakeKey]
- sprRelays :: [StakePoolRelay]
- sprMetadata :: Maybe (PotentiallyCheckedAnchor StakePoolMetadataReference StakePoolMetadataReference)
- sprNetworkId :: NetworkId
- data AnyDelegationTarget where
- ShelleyToBabbageDelegTarget :: forall era. ShelleyToBabbageEra era -> VerificationKeyOrHashOrFile StakePoolKey -> AnyDelegationTarget
- ConwayOnwardDelegTarget :: forall era. ConwayEraOnwards era -> StakeTarget era -> AnyDelegationTarget
- data StakeTarget era where
- TargetStakePool :: forall era. ConwayEraOnwards era -> VerificationKeyOrHashOrFile StakePoolKey -> StakeTarget era
- TargetVotingDrep :: forall era. ConwayEraOnwards era -> VerificationKeyOrHashOrFile DRepKey -> StakeTarget era
- TargetVotingDrepAndStakePool :: forall era. ConwayEraOnwards era -> VerificationKeyOrHashOrFile DRepKey -> VerificationKeyOrHashOrFile StakePoolKey -> StakeTarget era
- TargetAlwaysAbstain :: forall era. ConwayEraOnwards era -> StakeTarget era
- TargetAlwaysNoConfidence :: forall era. ConwayEraOnwards era -> StakeTarget era
- TargetVotingDRepScriptHash :: forall era. ConwayEraOnwards era -> ScriptHash -> StakeTarget era
- data ColdVerificationKeyOrFile
- data DRepHashSource
- readDRepCredential :: forall t (m :: Type -> Type). MonadIOTransError (FileError InputDecodeError) t m => DRepHashSource -> t m (Credential 'DRepRole StandardCrypto)
- newtype SPOHashSource = SPOHashSourceVerificationKey (VerificationKeyOrHashOrFile StakePoolKey)
- readSPOCredential :: forall t (m :: Type -> Type). MonadIOTransError (FileError InputDecodeError) t m => SPOHashSource -> t m (KeyHash 'StakePool StandardCrypto)
- data SomeSigningKey
- = AByronSigningKey (SigningKey ByronKey)
- | APaymentSigningKey (SigningKey PaymentKey)
- | APaymentExtendedSigningKey (SigningKey PaymentExtendedKey)
- | AStakeSigningKey (SigningKey StakeKey)
- | AStakeExtendedSigningKey (SigningKey StakeExtendedKey)
- | AStakePoolSigningKey (SigningKey StakePoolKey)
- | AGenesisSigningKey (SigningKey GenesisKey)
- | AGenesisExtendedSigningKey (SigningKey GenesisExtendedKey)
- | AGenesisDelegateSigningKey (SigningKey GenesisDelegateKey)
- | AGenesisDelegateExtendedSigningKey (SigningKey GenesisDelegateExtendedKey)
- | AGenesisUTxOSigningKey (SigningKey GenesisUTxOKey)
- | ADRepSigningKey (SigningKey DRepKey)
- | ADRepExtendedSigningKey (SigningKey DRepExtendedKey)
- | ACommitteeColdSigningKey (SigningKey CommitteeColdKey)
- | ACommitteeColdExtendedSigningKey (SigningKey CommitteeColdExtendedKey)
- | ACommitteeHotSigningKey (SigningKey CommitteeHotKey)
- | ACommitteeHotExtendedSigningKey (SigningKey CommitteeHotExtendedKey)
- | AVrfSigningKey (SigningKey VrfKey)
- | AKesSigningKey (SigningKey KesKey)
- withSomeSigningKey :: SomeSigningKey -> (forall keyrole. (Key keyrole, HasTypeProxy keyrole) => SigningKey keyrole -> a) -> a
- readSigningKeyFile :: SigningKeyFile 'In -> ExceptT (FileError InputDecodeError) IO SomeSigningKey
Documentation
data VerificationKeyOrFile keyrole Source #
Either a verification key or path to a verification key file.
VerificationKeyValue !(VerificationKey keyrole) | A verification key. |
VerificationKeyFilePath !(VerificationKeyFile 'In) | A path to a verification key file. Note that this file hasn't been validated at all (whether it exists, contains a key of the correct type, etc.) |
Instances
Show (VerificationKey keyrole) => Show (VerificationKeyOrFile keyrole) Source # | |
Defined in Cardano.CLI.Types.Key | |
Eq (VerificationKey keyrole) => Eq (VerificationKeyOrFile keyrole) Source # | |
Defined in Cardano.CLI.Types.Key (==) :: VerificationKeyOrFile keyrole -> VerificationKeyOrFile keyrole -> Bool Source # (/=) :: VerificationKeyOrFile keyrole -> VerificationKeyOrFile keyrole -> Bool Source # |
readVerificationKeyOrFile :: forall t (m :: Type -> Type) keyrole. (MonadIOTransError (FileError InputDecodeError) t m, HasTextEnvelope (VerificationKey keyrole), SerialiseAsBech32 (VerificationKey keyrole)) => AsType keyrole -> VerificationKeyOrFile keyrole -> t m (VerificationKey keyrole) Source #
Read a verification key or verification key file and return a verification key.
If a filepath is provided, the file can either be formatted as Bech32, hex, or text envelope.
readVerificationKeyOrTextEnvFile :: forall t (m :: Type -> Type) keyrole. (MonadIOTransError (FileError InputDecodeError) t m, HasTextEnvelope (VerificationKey keyrole)) => AsType keyrole -> VerificationKeyOrFile keyrole -> t m (VerificationKey keyrole) Source #
Read a verification key or verification key file and return a verification key.
If a filepath is provided, it will be interpreted as a text envelope formatted file.
data VerificationKeyTextOrFile Source #
Either an unvalidated text representation of a verification key or a path to a verification key file.
Instances
Show VerificationKeyTextOrFile Source # | |
Defined in Cardano.CLI.Types.Key | |
Eq VerificationKeyTextOrFile Source # | |
Defined in Cardano.CLI.Types.Key |
data VerificationKeyTextOrFileError Source #
An error in deserialising a VerificationKeyTextOrFile
to a
VerificationKey
.
Instances
readVerificationKeyTextOrFileAnyOf :: VerificationKeyTextOrFile -> IO (Either VerificationKeyTextOrFileError SomeAddressVerificationKey) Source #
Deserialise a verification key from text or a verification key file. If a filepath is provided, the file can either be formatted as Bech32, hex, or text envelope.
renderVerificationKeyTextOrFileError :: VerificationKeyTextOrFileError -> Doc ann Source #
Render an error message for a VerificationKeyTextOrFileError
.
data VerificationKeyOrHashOrFile keyrole Source #
Verification key, verification key hash, or path to a verification key file.
VerificationKeyOrFile !(VerificationKeyOrFile keyrole) | Either a verification key or path to a verification key file. |
VerificationKeyHash !(Hash keyrole) | A verification key hash. |
Instances
(Show (VerificationKeyOrFile keyrole), Show (Hash keyrole)) => Show (VerificationKeyOrHashOrFile keyrole) Source # | |
Defined in Cardano.CLI.Types.Key | |
(Eq (VerificationKeyOrFile keyrole), Eq (Hash keyrole)) => Eq (VerificationKeyOrHashOrFile keyrole) Source # | |
Defined in Cardano.CLI.Types.Key (==) :: VerificationKeyOrHashOrFile keyrole -> VerificationKeyOrHashOrFile keyrole -> Bool Source # (/=) :: VerificationKeyOrHashOrFile keyrole -> VerificationKeyOrHashOrFile keyrole -> Bool Source # |
readVerificationKeyOrHashOrFile :: forall t (m :: Type -> Type) keyrole. (MonadIOTransError (FileError InputDecodeError) t m, Key keyrole, SerialiseAsBech32 (VerificationKey keyrole)) => AsType keyrole -> VerificationKeyOrHashOrFile keyrole -> t m (Hash keyrole) Source #
Read a verification key or verification key hash or verification key file and return a verification key hash.
If a filepath is provided, the file can either be formatted as Bech32, hex, or text envelope.
readVerificationKeyOrHashOrTextEnvFile :: forall t (m :: Type -> Type) keyrole. (MonadIOTransError (FileError InputDecodeError) t m, Key keyrole) => AsType keyrole -> VerificationKeyOrHashOrFile keyrole -> t m (Hash keyrole) Source #
Read a verification key or verification key hash or verification key file and return a verification key hash.
If a filepath is provided, it will be interpreted as a text envelope formatted file.
data VerificationKeyOrHashOrFileOrScript keyrole Source #
VkhfsKeyHashFile !(VerificationKeyOrHashOrFile keyrole) | |
VkhfsScript !(File ScriptInAnyLang 'In) |
Instances
Show (VerificationKeyOrHashOrFile keyrole) => Show (VerificationKeyOrHashOrFileOrScript keyrole) Source # | |
Defined in Cardano.CLI.Types.Key | |
Eq (VerificationKeyOrHashOrFile keyrole) => Eq (VerificationKeyOrHashOrFileOrScript keyrole) Source # | |
Defined in Cardano.CLI.Types.Key (==) :: VerificationKeyOrHashOrFileOrScript keyrole -> VerificationKeyOrHashOrFileOrScript keyrole -> Bool Source # (/=) :: VerificationKeyOrHashOrFileOrScript keyrole -> VerificationKeyOrHashOrFileOrScript keyrole -> Bool Source # |
data VerificationKeyOrHashOrFileOrScriptHash keyrole Source #
Instances
Show (VerificationKeyOrHashOrFile keyrole) => Show (VerificationKeyOrHashOrFileOrScriptHash keyrole) Source # | |
Defined in Cardano.CLI.Types.Key | |
Eq (VerificationKeyOrHashOrFile keyrole) => Eq (VerificationKeyOrHashOrFileOrScriptHash keyrole) Source # | |
Defined in Cardano.CLI.Types.Key (==) :: VerificationKeyOrHashOrFileOrScriptHash keyrole -> VerificationKeyOrHashOrFileOrScriptHash keyrole -> Bool Source # (/=) :: VerificationKeyOrHashOrFileOrScriptHash keyrole -> VerificationKeyOrHashOrFileOrScriptHash keyrole -> Bool Source # |
data VerificationKeySource keyrole Source #
VksKeyHashFile !(VerificationKeyOrHashOrFile keyrole) | |
VksScript !(File ScriptInAnyLang 'In) | |
VksScriptHash !ScriptHash |
Instances
Show (VerificationKeyOrHashOrFile keyrole) => Show (VerificationKeySource keyrole) Source # | |
Defined in Cardano.CLI.Types.Key | |
Eq (VerificationKeyOrHashOrFile keyrole) => Eq (VerificationKeySource keyrole) Source # | |
Defined in Cardano.CLI.Types.Key (==) :: VerificationKeySource keyrole -> VerificationKeySource keyrole -> Bool Source # (/=) :: VerificationKeySource keyrole -> VerificationKeySource keyrole -> Bool Source # |
readVerificationKeyOrHashOrFileOrScriptHash :: forall t (m :: Type -> Type) keyrole (kr :: KeyRole). (MonadIOTransError (FileError InputDecodeError) t m, Key keyrole) => AsType keyrole -> (Hash keyrole -> KeyHash kr StandardCrypto) -> VerificationKeyOrHashOrFileOrScriptHash keyrole -> t m (Credential kr StandardCrypto) Source #
data PaymentVerifier Source #
Instances
Show PaymentVerifier Source # | |
Defined in Cardano.CLI.Types.Key | |
Eq PaymentVerifier Source # | |
Defined in Cardano.CLI.Types.Key (==) :: PaymentVerifier -> PaymentVerifier -> Bool Source # (/=) :: PaymentVerifier -> PaymentVerifier -> Bool Source # |
data StakeIdentifier Source #
Instances
Show StakeIdentifier Source # | |
Defined in Cardano.CLI.Types.Key | |
Eq StakeIdentifier Source # | |
Defined in Cardano.CLI.Types.Key (==) :: StakeIdentifier -> StakeIdentifier -> Bool Source # (/=) :: StakeIdentifier -> StakeIdentifier -> Bool Source # |
data StakeVerifier Source #
Instances
Show StakeVerifier Source # | |
Defined in Cardano.CLI.Types.Key | |
Eq StakeVerifier Source # | |
Defined in Cardano.CLI.Types.Key (==) :: StakeVerifier -> StakeVerifier -> Bool Source # (/=) :: StakeVerifier -> StakeVerifier -> Bool Source # |
generateKeyPair :: (MonadIO m, Key keyrole, HasTypeProxy keyrole) => AsType keyrole -> m (VerificationKey keyrole, SigningKey keyrole) Source #
data StakePoolRegistrationParserRequirements Source #
StakePoolRegistrationParserRequirements | |
|
data AnyDelegationTarget where Source #
A resource that identifies the delegation target. We can delegate our stake for two reasons: 1. To gain rewards. This is limited to choosing a stake pool 2. To delegate voting power. We can delegate this to a DRep, always abstain our vote or vote no confidence
ShelleyToBabbageDelegTarget | |
| |
ConwayOnwardDelegTarget :: forall era. ConwayEraOnwards era -> StakeTarget era -> AnyDelegationTarget |
Instances
Show AnyDelegationTarget Source # | |
Defined in Cardano.CLI.Types.Key |
data StakeTarget era where Source #
TargetStakePool :: forall era. ConwayEraOnwards era -> VerificationKeyOrHashOrFile StakePoolKey -> StakeTarget era | |
TargetVotingDrep :: forall era. ConwayEraOnwards era -> VerificationKeyOrHashOrFile DRepKey -> StakeTarget era | |
TargetVotingDrepAndStakePool :: forall era. ConwayEraOnwards era -> VerificationKeyOrHashOrFile DRepKey -> VerificationKeyOrHashOrFile StakePoolKey -> StakeTarget era | |
TargetAlwaysAbstain :: forall era. ConwayEraOnwards era -> StakeTarget era | |
TargetAlwaysNoConfidence :: forall era. ConwayEraOnwards era -> StakeTarget era | |
TargetVotingDRepScriptHash :: forall era. ConwayEraOnwards era -> ScriptHash -> StakeTarget era |
Instances
Show (StakeTarget era) Source # | |
Defined in Cardano.CLI.Types.Key |
data ColdVerificationKeyOrFile Source #
Either a stake pool verification key, genesis delegate verification key, or a path to a cold verification key file.
Note that a "cold verification key" refers to either a stake pool or genesis delegate verification key.
TODO: A genesis delegate extended key should also be valid here.
ColdStakePoolVerificationKey !(VerificationKey StakePoolKey) | |
ColdGenesisDelegateVerificationKey !(VerificationKey GenesisDelegateKey) | |
ColdVerificationKeyFile !(VerificationKeyFile 'In) |
Instances
Show ColdVerificationKeyOrFile Source # | |
Defined in Cardano.CLI.Types.Key |
data DRepHashSource Source #
Instances
Show DRepHashSource Source # | |
Defined in Cardano.CLI.Types.Key | |
Eq DRepHashSource Source # | |
Defined in Cardano.CLI.Types.Key (==) :: DRepHashSource -> DRepHashSource -> Bool Source # (/=) :: DRepHashSource -> DRepHashSource -> Bool Source # |
readDRepCredential :: forall t (m :: Type -> Type). MonadIOTransError (FileError InputDecodeError) t m => DRepHashSource -> t m (Credential 'DRepRole StandardCrypto) Source #
newtype SPOHashSource Source #
Instances
Show SPOHashSource Source # | |
Defined in Cardano.CLI.Types.Key | |
Eq SPOHashSource Source # | |
Defined in Cardano.CLI.Types.Key (==) :: SPOHashSource -> SPOHashSource -> Bool Source # (/=) :: SPOHashSource -> SPOHashSource -> Bool Source # |
readSPOCredential :: forall t (m :: Type -> Type). MonadIOTransError (FileError InputDecodeError) t m => SPOHashSource -> t m (KeyHash 'StakePool StandardCrypto) Source #
data SomeSigningKey Source #
withSomeSigningKey :: SomeSigningKey -> (forall keyrole. (Key keyrole, HasTypeProxy keyrole) => SigningKey keyrole -> a) -> a Source #