Copyright | Aleksandr Krupenkin 2016-2024 |
---|---|
License | Apache-2.0 |
Maintainer | mail@akru.me |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Polkadot account types.
Synopsis
- class Ss58Codec a where
- from_ss58check :: ByteString -> Either String a
- to_ss58check :: a -> ByteString
- to_ss58check_with_version :: Word16 -> a -> ByteString
- from_ss58check_with_version :: Word16 -> ByteString -> Either String a
- class IdentifyAccount a where
- type AccountId a
- into_account :: a -> AccountId a
Documentation
class Ss58Codec a where Source #
Key that can be encoded to/from SS58.
See https://github.com/paritytech/substrate/wiki/External-Address-Format-(SS58)#address-type for information on the codec.
from_ss58check :: ByteString -> Either String a Source #
Some if the string is a properly encoded SS58Check address (default prefix).
to_ss58check :: a -> ByteString Source #
Return the ss58-check string for this key (default prefix).
to_ss58check_with_version :: Word16 -> a -> ByteString Source #
Return the ss58-check string for this key.
from_ss58check_with_version :: Word16 -> ByteString -> Either String a Source #
Some if the string is a properly encoded SS58Check address (default prefix).
Instances
Ss58Codec AccountId Source # | |
Defined in Network.Polkadot.Account |
class IdentifyAccount a where Source #
Some type that is able to be collapsed into an account ID.
It is not possible to recreate the original value from the account ID.
into_account :: a -> AccountId a Source #
Transform into an account.
Instances
IdentifyAccount MultiSigner Source # | |
Defined in Network.Polkadot.Account type AccountId MultiSigner Source # |
Orphan instances
Show MultiSigner Source # | |
showsPrec :: Int -> MultiSigner -> ShowS # show :: MultiSigner -> String # showList :: [MultiSigner] -> ShowS # |