Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.Api.Serialise.Cip129
Synopsis
- class (SerialiseAsRawBytes a, HasTypeProxy a) => Cip129 a where
- data Cip129Header a
- cip129Bech32PrefixFor :: AsType a -> HumanReadablePart
- cip129Bech32PrefixesPermitted :: AsType a -> [Text]
- cip129Header :: Cip129Header a -> Word8
- cip129SerialiseRaw :: a -> ByteString
- cip129DeserialiseRaw :: ByteString -> Either Cip129EncodingError a
- data Cip129EncodingError
- deserialiseFromBech32Cip129 :: Cip129 a => Text -> Either Cip129EncodingError a
- serialiseToBech32Cip129 :: Cip129 a => a -> Text
- serialiseGovActionIdToBech32Cip129 :: GovActionId -> Text
- deserialiseGovActionIdFromBech32Cip129 :: Text -> Either Cip129EncodingError GovActionId
- data family AsType t
Documentation
class (SerialiseAsRawBytes a, HasTypeProxy a) => Cip129 a where Source #
Cip-129 is a typeclass that captures the serialisation requirements of https://cips.cardano.org/cip/CIP-0129 which pertain to governance credentials and governance action ids.
Minimal complete definition
cip129Bech32PrefixFor, cip129Header, cip129SerialiseRaw, cip129DeserialiseRaw
Associated Types
data Cip129Header a Source #
A sum type with all possible headers for CIP-129 identifier
Methods
cip129Bech32PrefixFor :: AsType a -> HumanReadablePart Source #
The human readable part of the Bech32 encoding for the credential.
cip129Bech32PrefixesPermitted :: AsType a -> [Text] Source #
Permitted bech32 prefixes according to CIP-129.
default cip129Bech32PrefixesPermitted :: AsType a -> [Text] Source #
cip129Header :: Cip129Header a -> Word8 Source #
A Word8
value of Cip129 header
cip129SerialiseRaw :: a -> ByteString Source #
Serialise a value to a binary representation used in CIP 129. It's usually distinct from CBOR serialisation.
Internal conversion function. Use serialiseToBech32Cip129
instead of calling this function directly.
cip129DeserialiseRaw :: ByteString -> Either Cip129EncodingError a Source #
Deserialise a value from the bytes representation. Internal conversion function. Use
deserialiseFromBech32Cip129
instead of calling this function directly.
Instances
data Cip129EncodingError Source #
CIP-129 decoding errors
Instances
Error Cip129EncodingError Source # | |
Defined in Cardano.Api.Serialise.Cip129 Methods prettyError :: Cip129EncodingError -> Doc ann Source # | |
Show Cip129EncodingError Source # | |
Defined in Cardano.Api.Serialise.Cip129 | |
Eq Cip129EncodingError Source # | |
Defined in Cardano.Api.Serialise.Cip129 Methods (==) :: Cip129EncodingError -> Cip129EncodingError -> Bool Source # (/=) :: Cip129EncodingError -> Cip129EncodingError -> Bool Source # |
deserialiseFromBech32Cip129 Source #
Arguments
:: Cip129 a | |
=> Text | A Bech32-encoded governance identifier |
-> Either Cip129EncodingError a |
Deserialise a governance identifier from CIP-129 format.
serialiseToBech32Cip129 :: Cip129 a => a -> Text Source #
Serialise a accoding to the serialisation requirements of https://cips.cardano.org/cip/CIP-0129 which currently pertain to governance credentials.
serialiseGovActionIdToBech32Cip129 :: GovActionId -> Text Source #
Deprecated: Use serialiseToBech32Cip129 instead
Governance Action ID According to Cip129 there is no header byte for GovActionId. Instead they append the txid and index to form the payload.
deserialiseGovActionIdFromBech32Cip129 :: Text -> Either Cip129EncodingError GovActionId Source #
Deprecated: Use deserialiseFromBech32Cip129 instead
A family of singleton types used in this API to indicate which type to use where it would otherwise be ambiguous or merely unclear.
Values of this type are passed to deserialisation functions for example.
Instances
data AsType ByteString Source # | |
Defined in Cardano.Api.HasTypeProxy | |
data AsType AddressAny Source # | |
Defined in Cardano.Api.Address | |
data AsType ByronAddr Source # | |
Defined in Cardano.Api.Address | |
data AsType ShelleyAddr Source # | |
Defined in Cardano.Api.Address | |
data AsType StakeAddress Source # | |
Defined in Cardano.Api.Address | |
data AsType BlockHeader Source # | |
Defined in Cardano.Api.Block | |
data AsType ByronKey Source # | |
Defined in Cardano.Api.Byron.Internal.Key | |
data AsType ByronKeyLegacy Source # | |
Defined in Cardano.Api.Byron.Internal.Key | |
data AsType ByronUpdateProposal Source # | |
Defined in Cardano.Api.Byron.Internal.Proposal | |
data AsType ByronVote Source # | |
Defined in Cardano.Api.Byron.Internal.Proposal | |
data AsType DRepMetadata Source # | |
data AsType OperationalCertificate Source # | |
data AsType OperationalCertificateIssueCounter Source # | |
data AsType StakePoolMetadata Source # | |
data AsType AllegraEra Source # | |
Defined in Cardano.Api.Era.Internal.Core | |
data AsType AlonzoEra Source # | |
Defined in Cardano.Api.Era.Internal.Core | |
data AsType BabbageEra Source # | |
Defined in Cardano.Api.Era.Internal.Core | |
data AsType ByronEra Source # | |
Defined in Cardano.Api.Era.Internal.Core | |
data AsType ConwayEra Source # | |
Defined in Cardano.Api.Era.Internal.Core | |
data AsType MaryEra Source # | |
Defined in Cardano.Api.Era.Internal.Core | |
data AsType ShelleyEra Source # | |
Defined in Cardano.Api.Era.Internal.Core | |
data AsType GovernancePoll Source # | |
Defined in Cardano.Api.Governance.Internal.Poll | |
data AsType GovernancePollAnswer Source # | |
Defined in Cardano.Api.Governance.Internal.Poll | |
data AsType CommitteeColdExtendedKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType CommitteeColdKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType CommitteeHotExtendedKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType CommitteeHotKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType DRepExtendedKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType DRepKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType GenesisDelegateExtendedKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType GenesisDelegateKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType GenesisExtendedKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType GenesisKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType GenesisUTxOKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType PaymentExtendedKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType PaymentKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType StakeExtendedKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType StakeKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType StakePoolExtendedKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType StakePoolKey Source # | |
Defined in Cardano.Api.Key.Internal | |
data AsType KesKey Source # | |
Defined in Cardano.Api.Key.Internal.Praos | |
data AsType VrfKey Source # | |
Defined in Cardano.Api.Key.Internal.Praos | |
data AsType PlutusScriptV1 Source # | |
Defined in Cardano.Api.Plutus.Internal.Script | |
data AsType PlutusScriptV2 Source # | |
Defined in Cardano.Api.Plutus.Internal.Script | |
data AsType PlutusScriptV3 Source # | |
Defined in Cardano.Api.Plutus.Internal.Script | |
data AsType ScriptHash Source # | |
Defined in Cardano.Api.Plutus.Internal.Script | |
data AsType ScriptInAnyLang Source # | |
Defined in Cardano.Api.Plutus.Internal.Script | |
data AsType SimpleScript' Source # | |
Defined in Cardano.Api.Plutus.Internal.Script | |
data AsType HashableScriptData Source # | |
Defined in Cardano.Api.Plutus.Internal.ScriptData | |
data AsType ScriptData Source # | |
Defined in Cardano.Api.Plutus.Internal.ScriptData | |
data AsType PraosNonce Source # | |
Defined in Cardano.Api.ProtocolParameters | |
data AsType UpdateProposal Source # | |
Defined in Cardano.Api.ProtocolParameters | |
data AsType EraHistory Source # | |
Defined in Cardano.Api.Query.Internal.Type.QueryInMode | |
data AsType TextEnvelope Source # | |
Defined in Cardano.Api.Serialise.TextEnvelope.Internal | |
data AsType TxId Source # | |
Defined in Cardano.Api.Tx.Internal.TxIn | |
data AsType TxMetadata Source # | |
Defined in Cardano.Api.Tx.Internal.TxMetadata | |
data AsType AssetName Source # | |
Defined in Cardano.Api.Value.Internal | |
data AsType PolicyId Source # | |
Defined in Cardano.Api.Value.Internal | |
data AsType GovActionId Source # | |
Defined in Cardano.Api.Internal.Orphans.Serialisation | |
data AsType GovActionIx Source # | |
Defined in Cardano.Api.Internal.Orphans.Serialisation | |
data AsType Term Source # | |
Defined in Cardano.Api.Serialise.Cbor.Canonical | |
data AsType Word16 Source # | |
Defined in Cardano.Api.HasTypeProxy | |
data AsType Word8 Source # | |
Defined in Cardano.Api.HasTypeProxy | |
data AsType (Address addrtype) Source # | |
Defined in Cardano.Api.Address | |
data AsType (AddressInEra era) Source # | |
Defined in Cardano.Api.Address | |
data AsType (Certificate era) Source # | |
Defined in Cardano.Api.Certificate.Internal | |
data AsType (SignedTx era) Source # | |
Defined in Cardano.Api.Experimental.Tx | |
data AsType (UnsignedTx era) Source # | |
Defined in Cardano.Api.Experimental.Tx | |
data AsType (Proposal era) Source # | |
data AsType (VotingProcedure era) Source # | |
data AsType (VotingProcedures era) Source # | |
data AsType (Hash a) Source # | |
Defined in Cardano.Api.Hash | |
data AsType (SigningKey a) Source # | |
Defined in Cardano.Api.Key.Internal.Class | |
data AsType (VerificationKey a) Source # | |
Defined in Cardano.Api.Key.Internal.Class | |
data AsType (PlutusScript lang) Source # | |
Defined in Cardano.Api.Plutus.Internal.Script | |
data AsType (Script lang) Source # | |
Defined in Cardano.Api.Plutus.Internal.Script | |
data AsType (ScriptInEra era) Source # | |
Defined in Cardano.Api.Plutus.Internal.Script | |
data AsType (KeyWitness era) Source # | |
Defined in Cardano.Api.Tx.Internal.Sign | |
data AsType (Tx era) Source # | |
Defined in Cardano.Api.Tx.Internal.Sign | |
data AsType (TxBody era) Source # | |
Defined in Cardano.Api.Tx.Internal.Sign | |
data AsType (Credential 'ColdCommitteeRole) Source # | |
Defined in Cardano.Api.Internal.Orphans.Serialisation | |
data AsType (Credential 'DRepRole) Source # | |
Defined in Cardano.Api.Internal.Orphans.Serialisation | |
data AsType (Credential 'HotCommitteeRole) Source # | |
Defined in Cardano.Api.Internal.Orphans.Serialisation | |
data AsType (PlutusScriptInEra era lang) Source # | |
Defined in Cardano.Api.Plutus.Internal.Script |