Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano addresses: payment and stake addresses.
Synopsis
- data Address addrtype where
- data ByronAddr
- makeByronAddress :: NetworkId -> VerificationKey ByronKey -> Address ByronAddr
- data ShelleyAddr
- makeShelleyAddress :: NetworkId -> PaymentCredential -> StakeAddressReference -> Address ShelleyAddr
- data PaymentCredential
- data StakeAddressReference
- newtype StakeAddressPointer = StakeAddressPointer {}
- data AddressAny
- lexPlausibleAddressString :: Parser Text
- parseAddressAny :: Parser AddressAny
- data AddressInEra era where
- AddressInEra :: forall addrtype era. AddressTypeInEra addrtype era -> Address addrtype -> AddressInEra era
- data AddressTypeInEra addrtype era where
- ByronAddressInAnyEra :: forall era. AddressTypeInEra ByronAddr era
- ShelleyAddressInEra :: forall era. ShelleyBasedEra era -> AddressTypeInEra ShelleyAddr era
- byronAddressInEra :: Address ByronAddr -> AddressInEra era
- shelleyAddressInEra :: ShelleyBasedEra era -> Address ShelleyAddr -> AddressInEra era
- anyAddressInShelleyBasedEra :: ShelleyBasedEra era -> AddressAny -> AddressInEra era
- anyAddressInEra :: CardanoEra era -> AddressAny -> Either String (AddressInEra era)
- toAddressAny :: Address addr -> AddressAny
- makeByronAddressInEra :: NetworkId -> VerificationKey ByronKey -> AddressInEra era
- makeShelleyAddressInEra :: ShelleyBasedEra era -> NetworkId -> PaymentCredential -> StakeAddressReference -> AddressInEra era
- data StakeAddress where
- data StakeCredential
- makeStakeAddress :: NetworkId -> StakeCredential -> StakeAddress
- stakeAddressCredential :: StakeAddress -> StakeCredential
- data StakeKey
- data StakeExtendedKey
- shelleyPayAddrToPlutusPubKHash :: Address ShelleyAddr -> Maybe PubKeyHash
- toShelleyAddr :: AddressInEra era -> Addr StandardCrypto
- toShelleyStakeAddr :: StakeAddress -> RewardAccount StandardCrypto
- toShelleyStakeCredential :: StakeCredential -> StakeCredential StandardCrypto
- fromShelleyAddr :: ShelleyBasedEra era -> Addr StandardCrypto -> AddressInEra era
- fromShelleyAddrIsSbe :: ShelleyBasedEra era -> Addr StandardCrypto -> AddressInEra era
- fromShelleyAddrToAny :: Addr StandardCrypto -> AddressAny
- fromShelleyPaymentCredential :: PaymentCredential StandardCrypto -> PaymentCredential
- fromShelleyStakeAddr :: RewardAccount StandardCrypto -> StakeAddress
- fromShelleyStakeCredential :: StakeCredential StandardCrypto -> StakeCredential
- fromShelleyStakeReference :: StakeReference StandardCrypto -> StakeAddressReference
- class HasTypeProxy addr => SerialiseAddress addr where
- serialiseAddress :: addr -> Text
- deserialiseAddress :: AsType addr -> Text -> Maybe addr
- data family AsType t
- isKeyAddress :: AddressInEra era -> Bool
Payment addresses
Constructing and inspecting normal payment addresses
data Address addrtype where Source #
Addresses are used as locations where assets live. The address determines the rights needed to spend assets at the address: in particular holding some signing key or being able to satisfy the conditions of a script.
There are currently two types of address:
- Byron addresses, which use the type tag
ByronAddr
; and - Shelley addresses, which use the type tag
ShelleyAddr
. Notably, Shelley addresses support scripts and stake delegation.
The address type is subtly from the ledger era in which each
address type is valid: while Byron addresses are the only choice in the
Byron era, the Shelley era and all subsequent eras support both Byron and
Shelley addresses. The Address
type param only says the type of the address
(either Byron or Shelley). The AddressInEra
type connects the address type
with the era in which it is supported.
ByronAddress :: Address -> Address ByronAddr | Byron addresses were the only supported address type in the original Byron era. |
ShelleyAddress :: Network -> PaymentCredential StandardCrypto -> StakeReference StandardCrypto -> Address ShelleyAddr | Shelley addresses allow delegation. Shelley addresses were introduced in Shelley era and are thus supported from the Shelley era onwards |
Instances
Byron addresses
A type used as a tag to distinguish Byron addresses.
Instances
HasTypeProxy ByronAddr Source # | |||||
Defined in Cardano.Api.Address
| |||||
FromJSON (Address ByronAddr) Source # | |||||
Defined in Cardano.Api.Address | |||||
ToJSON (Address ByronAddr) Source # | |||||
SerialiseAddress (Address ByronAddr) Source # | |||||
SerialiseAsRawBytes (Address ByronAddr) Source # | |||||
Defined in Cardano.Api.Address | |||||
data AsType ByronAddr Source # | |||||
Defined in Cardano.Api.Address |
Shelley addresses
data ShelleyAddr Source #
A type used as a tag to distinguish Shelley addresses.
Instances
HasTypeProxy ShelleyAddr Source # | |||||
Defined in Cardano.Api.Address
| |||||
FromJSON (Address ShelleyAddr) Source # | |||||
Defined in Cardano.Api.Address parseJSON :: Value -> Parser (Address ShelleyAddr) # parseJSONList :: Value -> Parser [Address ShelleyAddr] # omittedField :: Maybe (Address ShelleyAddr) # | |||||
ToJSON (Address ShelleyAddr) Source # | |||||
Defined in Cardano.Api.Address toJSON :: Address ShelleyAddr -> Value # toEncoding :: Address ShelleyAddr -> Encoding # toJSONList :: [Address ShelleyAddr] -> Value # toEncodingList :: [Address ShelleyAddr] -> Encoding # omitField :: Address ShelleyAddr -> Bool # | |||||
SerialiseAddress (Address ShelleyAddr) Source # | |||||
Defined in Cardano.Api.Address serialiseAddress :: Address ShelleyAddr -> Text Source # deserialiseAddress :: AsType (Address ShelleyAddr) -> Text -> Maybe (Address ShelleyAddr) Source # | |||||
SerialiseAsBech32 (Address ShelleyAddr) Source # | |||||
Defined in Cardano.Api.Address bech32PrefixFor :: Address ShelleyAddr -> Text Source # bech32PrefixesPermitted :: AsType (Address ShelleyAddr) -> [Text] Source # | |||||
SerialiseAsRawBytes (Address ShelleyAddr) Source # | |||||
data AsType ShelleyAddr Source # | |||||
Defined in Cardano.Api.Address |
makeShelleyAddress :: NetworkId -> PaymentCredential -> StakeAddressReference -> Address ShelleyAddr Source #
data PaymentCredential Source #
Instances
Show PaymentCredential Source # | |
Defined in Cardano.Api.Address | |
Eq PaymentCredential Source # | |
Defined in Cardano.Api.Address (==) :: PaymentCredential -> PaymentCredential -> Bool Source # (/=) :: PaymentCredential -> PaymentCredential -> Bool Source # | |
Ord PaymentCredential Source # | |
Defined in Cardano.Api.Address compare :: PaymentCredential -> PaymentCredential -> Ordering Source # (<) :: PaymentCredential -> PaymentCredential -> Bool Source # (<=) :: PaymentCredential -> PaymentCredential -> Bool Source # (>) :: PaymentCredential -> PaymentCredential -> Bool Source # (>=) :: PaymentCredential -> PaymentCredential -> Bool Source # max :: PaymentCredential -> PaymentCredential -> PaymentCredential Source # min :: PaymentCredential -> PaymentCredential -> PaymentCredential Source # |
data StakeAddressReference Source #
Instances
Show StakeAddressReference Source # | |
Defined in Cardano.Api.Address | |
Eq StakeAddressReference Source # | |
Defined in Cardano.Api.Address |
newtype StakeAddressPointer Source #
Instances
Show StakeAddressPointer Source # | |
Defined in Cardano.Api.Address | |
Eq StakeAddressPointer Source # | |
Defined in Cardano.Api.Address (==) :: StakeAddressPointer -> StakeAddressPointer -> Bool Source # (/=) :: StakeAddressPointer -> StakeAddressPointer -> Bool Source # |
Addresses in any era
data AddressAny Source #
Either a Byron address or a Shelley address.
Sometimes we need to be able to work with either of the two types of address (Byron or Shelley addresses), but without reference to an era in which the address will be used. This type serves that purpose.
Instances
Show AddressAny Source # | |||||
Defined in Cardano.Api.Address | |||||
SerialiseAddress AddressAny Source # | |||||
Defined in Cardano.Api.Address serialiseAddress :: AddressAny -> Text Source # deserialiseAddress :: AsType AddressAny -> Text -> Maybe AddressAny Source # | |||||
HasTypeProxy AddressAny Source # | |||||
Defined in Cardano.Api.Address
| |||||
SerialiseAsRawBytes AddressAny Source # | |||||
Eq AddressAny Source # | |||||
Defined in Cardano.Api.Address (==) :: AddressAny -> AddressAny -> Bool Source # (/=) :: AddressAny -> AddressAny -> Bool Source # | |||||
Ord AddressAny Source # | |||||
Defined in Cardano.Api.Address compare :: AddressAny -> AddressAny -> Ordering Source # (<) :: AddressAny -> AddressAny -> Bool Source # (<=) :: AddressAny -> AddressAny -> Bool Source # (>) :: AddressAny -> AddressAny -> Bool Source # (>=) :: AddressAny -> AddressAny -> Bool Source # max :: AddressAny -> AddressAny -> AddressAny Source # min :: AddressAny -> AddressAny -> AddressAny Source # | |||||
data AsType AddressAny Source # | |||||
Defined in Cardano.Api.Address |
Addresses in specific eras
data AddressInEra era where Source #
An Address
that can be used in a particular ledger era.
All current ledger eras support Byron addresses. Shelley addresses are
supported in the ShelleyEra
and later eras.
AddressInEra :: forall addrtype era. AddressTypeInEra addrtype era -> Address addrtype -> AddressInEra era |
Instances
IsShelleyBasedEra era => FromJSON (AddressInEra era) Source # | |||||
Defined in Cardano.Api.Address parseJSON :: Value -> Parser (AddressInEra era) # parseJSONList :: Value -> Parser [AddressInEra era] # omittedField :: Maybe (AddressInEra era) # | |||||
IsCardanoEra era => ToJSON (AddressInEra era) Source # | |||||
Defined in Cardano.Api.Address toJSON :: AddressInEra era -> Value # toEncoding :: AddressInEra era -> Encoding # toJSONList :: [AddressInEra era] -> Value # toEncodingList :: [AddressInEra era] -> Encoding # omitField :: AddressInEra era -> Bool # | |||||
Show (AddressInEra era) Source # | |||||
Defined in Cardano.Api.Address | |||||
IsCardanoEra era => SerialiseAddress (AddressInEra era) Source # | |||||
Defined in Cardano.Api.Address serialiseAddress :: AddressInEra era -> Text Source # deserialiseAddress :: AsType (AddressInEra era) -> Text -> Maybe (AddressInEra era) Source # | |||||
HasTypeProxy era => HasTypeProxy (AddressInEra era) Source # | |||||
Defined in Cardano.Api.Address
proxyToAsType :: Proxy (AddressInEra era) -> AsType (AddressInEra era) Source # | |||||
IsCardanoEra era => SerialiseAsRawBytes (AddressInEra era) Source # | |||||
Defined in Cardano.Api.Address serialiseToRawBytes :: AddressInEra era -> ByteString Source # deserialiseFromRawBytes :: AsType (AddressInEra era) -> ByteString -> Either SerialiseAsRawBytesError (AddressInEra era) Source # | |||||
NFData (AddressInEra era) Source # | |||||
Defined in Cardano.Api.Address rnf :: AddressInEra era -> () Source # | |||||
Eq (AddressInEra era) Source # | |||||
Defined in Cardano.Api.Address (==) :: AddressInEra era -> AddressInEra era -> Bool Source # (/=) :: AddressInEra era -> AddressInEra era -> Bool Source # | |||||
Ord (AddressInEra era) Source # | |||||
Defined in Cardano.Api.Address compare :: AddressInEra era -> AddressInEra era -> Ordering Source # (<) :: AddressInEra era -> AddressInEra era -> Bool Source # (<=) :: AddressInEra era -> AddressInEra era -> Bool Source # (>) :: AddressInEra era -> AddressInEra era -> Bool Source # (>=) :: AddressInEra era -> AddressInEra era -> Bool Source # max :: AddressInEra era -> AddressInEra era -> AddressInEra era Source # min :: AddressInEra era -> AddressInEra era -> AddressInEra era Source # | |||||
data AsType (AddressInEra era) Source # | |||||
Defined in Cardano.Api.Address |
data AddressTypeInEra addrtype era where Source #
ByronAddressInAnyEra :: forall era. AddressTypeInEra ByronAddr era | |
ShelleyAddressInEra :: forall era. ShelleyBasedEra era -> AddressTypeInEra ShelleyAddr era |
Instances
Show (AddressTypeInEra addrtype era) Source # | |
Defined in Cardano.Api.Address | |
NFData (AddressTypeInEra addrtype era) Source # | |
Defined in Cardano.Api.Address rnf :: AddressTypeInEra addrtype era -> () Source # |
byronAddressInEra :: Address ByronAddr -> AddressInEra era Source #
shelleyAddressInEra :: ShelleyBasedEra era -> Address ShelleyAddr -> AddressInEra era Source #
anyAddressInShelleyBasedEra :: ShelleyBasedEra era -> AddressAny -> AddressInEra era Source #
anyAddressInEra :: CardanoEra era -> AddressAny -> Either String (AddressInEra era) Source #
toAddressAny :: Address addr -> AddressAny Source #
makeByronAddressInEra :: NetworkId -> VerificationKey ByronKey -> AddressInEra era Source #
makeShelleyAddressInEra :: ShelleyBasedEra era -> NetworkId -> PaymentCredential -> StakeAddressReference -> AddressInEra era Source #
Stake addresses
Constructing and inspecting stake addresses
data StakeAddress where Source #
Instances
FromJSON StakeAddress Source # | |||||
Defined in Cardano.Api.Address parseJSON :: Value -> Parser StakeAddress # parseJSONList :: Value -> Parser [StakeAddress] # | |||||
ToJSON StakeAddress Source # | |||||
Defined in Cardano.Api.Address toJSON :: StakeAddress -> Value # toEncoding :: StakeAddress -> Encoding # toJSONList :: [StakeAddress] -> Value # toEncodingList :: [StakeAddress] -> Encoding # omitField :: StakeAddress -> Bool # | |||||
Show StakeAddress Source # | |||||
Defined in Cardano.Api.Address | |||||
SerialiseAddress StakeAddress Source # | |||||
Defined in Cardano.Api.Address serialiseAddress :: StakeAddress -> Text Source # deserialiseAddress :: AsType StakeAddress -> Text -> Maybe StakeAddress Source # | |||||
HasTypeProxy StakeAddress Source # | |||||
Defined in Cardano.Api.Address
| |||||
SerialiseAsBech32 StakeAddress Source # | |||||
Defined in Cardano.Api.Address bech32PrefixFor :: StakeAddress -> Text Source # bech32PrefixesPermitted :: AsType StakeAddress -> [Text] Source # | |||||
SerialiseAsRawBytes StakeAddress Source # | |||||
Eq StakeAddress Source # | |||||
Defined in Cardano.Api.Address (==) :: StakeAddress -> StakeAddress -> Bool Source # (/=) :: StakeAddress -> StakeAddress -> Bool Source # | |||||
Ord StakeAddress Source # | |||||
Defined in Cardano.Api.Address compare :: StakeAddress -> StakeAddress -> Ordering Source # (<) :: StakeAddress -> StakeAddress -> Bool Source # (<=) :: StakeAddress -> StakeAddress -> Bool Source # (>) :: StakeAddress -> StakeAddress -> Bool Source # (>=) :: StakeAddress -> StakeAddress -> Bool Source # max :: StakeAddress -> StakeAddress -> StakeAddress Source # min :: StakeAddress -> StakeAddress -> StakeAddress Source # | |||||
data AsType StakeAddress Source # | |||||
Defined in Cardano.Api.Address |
data StakeCredential Source #
Instances
ToJSON StakeCredential Source # | |
Defined in Cardano.Api.Address toJSON :: StakeCredential -> Value # toEncoding :: StakeCredential -> Encoding # toJSONList :: [StakeCredential] -> Value # toEncodingList :: [StakeCredential] -> Encoding # omitField :: StakeCredential -> Bool # | |
Show StakeCredential Source # | |
Defined in Cardano.Api.Address | |
Eq StakeCredential Source # | |
Defined in Cardano.Api.Address (==) :: StakeCredential -> StakeCredential -> Bool Source # (/=) :: StakeCredential -> StakeCredential -> Bool Source # | |
Ord StakeCredential Source # | |
Defined in Cardano.Api.Address compare :: StakeCredential -> StakeCredential -> Ordering Source # (<) :: StakeCredential -> StakeCredential -> Bool Source # (<=) :: StakeCredential -> StakeCredential -> Bool Source # (>) :: StakeCredential -> StakeCredential -> Bool Source # (>=) :: StakeCredential -> StakeCredential -> Bool Source # max :: StakeCredential -> StakeCredential -> StakeCredential Source # min :: StakeCredential -> StakeCredential -> StakeCredential Source # |
stakeAddressCredential :: StakeAddress -> StakeCredential Source #
Get a stake credential from a stake address. This drops the network information.
Instances
HasTypeProxy StakeKey Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley
| |||||||||
Key StakeKey Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley
getVerificationKey :: SigningKey StakeKey -> VerificationKey StakeKey Source # deterministicSigningKey :: AsType StakeKey -> Seed -> SigningKey StakeKey Source # deterministicSigningKeySeedSize :: AsType StakeKey -> Word Source # verificationKeyHash :: VerificationKey StakeKey -> Hash StakeKey Source # | |||||||||
CastVerificationKeyRole StakeExtendedKey StakeKey Source # | |||||||||
CastVerificationKeyRole StakePoolKey StakeKey Source # | |||||||||
IsString (Hash StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
IsString (SigningKey StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley fromString :: String -> SigningKey StakeKey Source # | |||||||||
IsString (VerificationKey StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
Show (Hash StakeKey) Source # | |||||||||
Show (SigningKey StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
Show (VerificationKey StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
SerialiseAsBech32 (SigningKey StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley bech32PrefixFor :: SigningKey StakeKey -> Text Source # bech32PrefixesPermitted :: AsType (SigningKey StakeKey) -> [Text] Source # | |||||||||
SerialiseAsBech32 (VerificationKey StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
SerialiseAsCBOR (Hash StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley serialiseToCBOR :: Hash StakeKey -> ByteString Source # deserialiseFromCBOR :: AsType (Hash StakeKey) -> ByteString -> Either DecoderError (Hash StakeKey) Source # | |||||||||
SerialiseAsCBOR (SigningKey StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
SerialiseAsCBOR (VerificationKey StakeKey) Source # | |||||||||
SerialiseAsRawBytes (Hash StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
SerialiseAsRawBytes (SigningKey StakeKey) Source # | |||||||||
SerialiseAsRawBytes (VerificationKey StakeKey) Source # | |||||||||
HasTextEnvelope (SigningKey StakeKey) Source # | |||||||||
HasTextEnvelope (VerificationKey StakeKey) Source # | |||||||||
FromCBOR (Hash StakeKey) Source # | |||||||||
FromCBOR (SigningKey StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
FromCBOR (VerificationKey StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
ToCBOR (Hash StakeKey) Source # | |||||||||
ToCBOR (SigningKey StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
ToCBOR (VerificationKey StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
Eq (Hash StakeKey) Source # | |||||||||
Eq (VerificationKey StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley (==) :: VerificationKey StakeKey -> VerificationKey StakeKey -> Bool Source # (/=) :: VerificationKey StakeKey -> VerificationKey StakeKey -> Bool Source # | |||||||||
Ord (Hash StakeKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley compare :: Hash StakeKey -> Hash StakeKey -> Ordering Source # (<) :: Hash StakeKey -> Hash StakeKey -> Bool Source # (<=) :: Hash StakeKey -> Hash StakeKey -> Bool Source # (>) :: Hash StakeKey -> Hash StakeKey -> Bool Source # (>=) :: Hash StakeKey -> Hash StakeKey -> Bool Source # max :: Hash StakeKey -> Hash StakeKey -> Hash StakeKey Source # min :: Hash StakeKey -> Hash StakeKey -> Hash StakeKey Source # | |||||||||
data AsType StakeKey Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
newtype Hash StakeKey Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
newtype SigningKey StakeKey Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
newtype VerificationKey StakeKey Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley |
data StakeExtendedKey Source #
Shelley-era stake keys using extended ed25519 cryptographic keys.
They can be used for Shelley stake addresses and witnessing transactions that use stake addresses.
These extended keys are used by HD wallets. So this type provides interoperability with HD wallets. The ITN CLI also supported this key type.
The extended verification keys can be converted (via castVerificationKey
)
to ordinary keys (i.e. VerificationKey
StakeKey
) but this is not the
case for the signing keys. The signing keys can be used to witness
transactions directly, with verification via their non-extended verification
key (VerificationKey
StakeKey
).
This is a type level tag, used with other interfaces like Key
.
Instances
HasTypeProxy StakeExtendedKey Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley
| |||||||||
Key StakeExtendedKey Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley
getVerificationKey :: SigningKey StakeExtendedKey -> VerificationKey StakeExtendedKey Source # deterministicSigningKey :: AsType StakeExtendedKey -> Seed -> SigningKey StakeExtendedKey Source # deterministicSigningKeySeedSize :: AsType StakeExtendedKey -> Word Source # verificationKeyHash :: VerificationKey StakeExtendedKey -> Hash StakeExtendedKey Source # | |||||||||
CastVerificationKeyRole StakeExtendedKey StakeKey Source # | |||||||||
IsString (Hash StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley fromString :: String -> Hash StakeExtendedKey Source # | |||||||||
IsString (SigningKey StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
IsString (VerificationKey StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
Show (Hash StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
Show (SigningKey StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley showsPrec :: Int -> SigningKey StakeExtendedKey -> ShowS Source # show :: SigningKey StakeExtendedKey -> String Source # showList :: [SigningKey StakeExtendedKey] -> ShowS Source # | |||||||||
Show (VerificationKey StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley showsPrec :: Int -> VerificationKey StakeExtendedKey -> ShowS Source # show :: VerificationKey StakeExtendedKey -> String Source # showList :: [VerificationKey StakeExtendedKey] -> ShowS Source # | |||||||||
SerialiseAsBech32 (SigningKey StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
SerialiseAsBech32 (VerificationKey StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
SerialiseAsCBOR (Hash StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
SerialiseAsCBOR (SigningKey StakeExtendedKey) Source # | |||||||||
SerialiseAsCBOR (VerificationKey StakeExtendedKey) Source # | |||||||||
SerialiseAsRawBytes (Hash StakeExtendedKey) Source # | |||||||||
SerialiseAsRawBytes (SigningKey StakeExtendedKey) Source # | |||||||||
SerialiseAsRawBytes (VerificationKey StakeExtendedKey) Source # | |||||||||
HasTextEnvelope (SigningKey StakeExtendedKey) Source # | |||||||||
HasTextEnvelope (VerificationKey StakeExtendedKey) Source # | |||||||||
FromCBOR (Hash StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
FromCBOR (SigningKey StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley fromCBOR :: Decoder s (SigningKey StakeExtendedKey) Source # label :: Proxy (SigningKey StakeExtendedKey) -> Text Source # | |||||||||
FromCBOR (VerificationKey StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
ToCBOR (Hash StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
ToCBOR (SigningKey StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley toCBOR :: SigningKey StakeExtendedKey -> Encoding Source # encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (SigningKey StakeExtendedKey) -> Size Source # encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [SigningKey StakeExtendedKey] -> Size Source # | |||||||||
ToCBOR (VerificationKey StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley toCBOR :: VerificationKey StakeExtendedKey -> Encoding Source # encodedSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy (VerificationKey StakeExtendedKey) -> Size Source # encodedListSizeExpr :: (forall t. ToCBOR t => Proxy t -> Size) -> Proxy [VerificationKey StakeExtendedKey] -> Size Source # | |||||||||
Eq (Hash StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley (==) :: Hash StakeExtendedKey -> Hash StakeExtendedKey -> Bool Source # (/=) :: Hash StakeExtendedKey -> Hash StakeExtendedKey -> Bool Source # | |||||||||
Eq (VerificationKey StakeExtendedKey) Source # | |||||||||
Ord (Hash StakeExtendedKey) Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley compare :: Hash StakeExtendedKey -> Hash StakeExtendedKey -> Ordering Source # (<) :: Hash StakeExtendedKey -> Hash StakeExtendedKey -> Bool Source # (<=) :: Hash StakeExtendedKey -> Hash StakeExtendedKey -> Bool Source # (>) :: Hash StakeExtendedKey -> Hash StakeExtendedKey -> Bool Source # (>=) :: Hash StakeExtendedKey -> Hash StakeExtendedKey -> Bool Source # max :: Hash StakeExtendedKey -> Hash StakeExtendedKey -> Hash StakeExtendedKey Source # min :: Hash StakeExtendedKey -> Hash StakeExtendedKey -> Hash StakeExtendedKey Source # | |||||||||
data AsType StakeExtendedKey Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
newtype Hash StakeExtendedKey Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
newtype SigningKey StakeExtendedKey Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley | |||||||||
newtype VerificationKey StakeExtendedKey Source # | |||||||||
Defined in Cardano.Api.Keys.Shelley |
Conversion functions
shelleyPayAddrToPlutusPubKHash :: Address ShelleyAddr -> Maybe PubKeyHash Source #
Converts a Shelley payment address to a Plutus public key hash.
Internal conversion functions
toShelleyAddr :: AddressInEra era -> Addr StandardCrypto Source #
fromShelleyAddr :: ShelleyBasedEra era -> Addr StandardCrypto -> AddressInEra era Source #
fromShelleyAddrIsSbe :: ShelleyBasedEra era -> Addr StandardCrypto -> AddressInEra era Source #
Serialising addresses
class HasTypeProxy addr => SerialiseAddress addr where Source #
Address serialisation uses different serialisation formats for different kinds of addresses, so it needs its own class.
In particular, Byron addresses are typically formatted in base 58, while Shelley addresses (payment and stake) are formatted using Bech32.
serialiseAddress :: addr -> Text Source #
deserialiseAddress :: AsType addr -> Text -> Maybe addr Source #
Instances
SerialiseAddress AddressAny Source # | |
Defined in Cardano.Api.Address serialiseAddress :: AddressAny -> Text Source # deserialiseAddress :: AsType AddressAny -> Text -> Maybe AddressAny Source # | |
SerialiseAddress StakeAddress Source # | |
Defined in Cardano.Api.Address serialiseAddress :: StakeAddress -> Text Source # deserialiseAddress :: AsType StakeAddress -> Text -> Maybe StakeAddress Source # | |
SerialiseAddress (Address ByronAddr) Source # | |
SerialiseAddress (Address ShelleyAddr) Source # | |
Defined in Cardano.Api.Address serialiseAddress :: Address ShelleyAddr -> Text Source # deserialiseAddress :: AsType (Address ShelleyAddr) -> Text -> Maybe (Address ShelleyAddr) Source # | |
IsCardanoEra era => SerialiseAddress (AddressInEra era) Source # | |
Defined in Cardano.Api.Address serialiseAddress :: AddressInEra era -> Text Source # deserialiseAddress :: AsType (AddressInEra era) -> Text -> Maybe (AddressInEra era) Source # |
Data family instances
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 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 DRepMetadata Source # | |
Defined in Cardano.Api.DRepMetadata | |
data AsType AllegraEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType AlonzoEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType BabbageEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType ByronEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType ConwayEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType MaryEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType ShelleyEra Source # | |
Defined in Cardano.Api.Eras.Core | |
data AsType GovernancePoll Source # | |
Defined in Cardano.Api.Governance.Poll | |
data AsType GovernancePollAnswer Source # | |
Defined in Cardano.Api.Governance.Poll | |
data AsType ByronKey Source # | |
Defined in Cardano.Api.Keys.Byron | |
data AsType ByronKeyLegacy Source # | |
Defined in Cardano.Api.Keys.Byron | |
data AsType KesKey Source # | |
Defined in Cardano.Api.Keys.Praos | |
data AsType VrfKey Source # | |
Defined in Cardano.Api.Keys.Praos | |
data AsType CommitteeColdExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType CommitteeColdKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType CommitteeHotExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType CommitteeHotKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType DRepExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType DRepKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisDelegateExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisDelegateKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType GenesisUTxOKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType PaymentExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType PaymentKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType StakeExtendedKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType StakeKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType StakePoolKey Source # | |
Defined in Cardano.Api.Keys.Shelley | |
data AsType OperationalCertificate Source # | |
data AsType OperationalCertificateIssueCounter Source # | |
data AsType PraosNonce Source # | |
Defined in Cardano.Api.ProtocolParameters | |
data AsType UpdateProposal Source # | |
Defined in Cardano.Api.ProtocolParameters | |
data AsType PlutusScriptV1 Source # | |
Defined in Cardano.Api.Script | |
data AsType PlutusScriptV2 Source # | |
Defined in Cardano.Api.Script | |
data AsType PlutusScriptV3 Source # | |
Defined in Cardano.Api.Script | |
data AsType ScriptHash Source # | |
Defined in Cardano.Api.Script | |
data AsType ScriptInAnyLang Source # | |
Defined in Cardano.Api.Script | |
data AsType SimpleScript' Source # | |
Defined in Cardano.Api.Script | |
data AsType HashableScriptData Source # | |
Defined in Cardano.Api.ScriptData | |
data AsType ScriptData Source # | |
Defined in Cardano.Api.ScriptData | |
data AsType TextEnvelope Source # | |
Defined in Cardano.Api.SerialiseTextEnvelope | |
data AsType ByronUpdateProposal Source # | |
Defined in Cardano.Api.SpecialByron | |
data AsType ByronVote Source # | |
Defined in Cardano.Api.SpecialByron | |
data AsType StakePoolMetadata Source # | |
Defined in Cardano.Api.StakePoolMetadata | |
data AsType TxId Source # | |
Defined in Cardano.Api.TxIn | |
data AsType TxMetadata Source # | |
Defined in Cardano.Api.TxMetadata | |
data AsType AssetName Source # | |
Defined in Cardano.Api.Value | |
data AsType PolicyId Source # | |
Defined in Cardano.Api.Value | |
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 | |
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.Keys.Class | |
data AsType (VerificationKey a) Source # | |
Defined in Cardano.Api.Keys.Class | |
data AsType (PlutusScript lang) Source # | |
Defined in Cardano.Api.Script | |
data AsType (Script lang) Source # | |
Defined in Cardano.Api.Script | |
data AsType (ScriptInEra era) Source # | |
Defined in Cardano.Api.Script | |
data AsType (KeyWitness era) Source # | |
Defined in Cardano.Api.Tx.Sign | |
data AsType (Tx era) Source # | |
Defined in Cardano.Api.Tx.Sign | |
data AsType (TxBody era) Source # | |
Defined in Cardano.Api.Tx.Sign |
Helpers
isKeyAddress :: AddressInEra era -> Bool Source #
Is the UTxO at the address only spendable via a key witness.