Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.Api.Byron
Description
This module provides a library interface that is intended to be the complete API for Byron covering everything, including exposing constructors for the lower level types.
Synopsis
- module Cardano.API
- data Byron
- class HasTypeProxy t where
- data AsType t
- proxyToAsType :: Proxy t -> AsType t
- data Address era where
- ByronAddress :: Address -> Address era
- data NetworkId
- data TxBody era where
- ByronTxBody :: Annotated Tx ByteString -> TxBody Byron
- newtype TxId = TxId (Hash StandardCrypto ())
- data TxIn = TxIn TxId TxIx
- data TxOut era = TxOut (Address era) Lovelace
- newtype TxIx = TxIx Word
- newtype Lovelace = Lovelace Integer
- newtype SlotNo = SlotNo Word64
- toByronLovelace :: Lovelace -> Maybe Lovelace
- toByronTxId :: TxId -> TxId
- toByronTxIn :: TxIn -> TxIn
- toByronTxOut :: TxOut Byron -> Maybe TxOut
- data Tx era where
- ByronTx :: ATxAux ByteString -> Tx Byron
- data Witness era where
- data WitnessNetworkIdOrByronAddress
- data FromSomeType (c :: Type -> Constraint) b where
- FromSomeType :: c a => AsType a -> (a -> b) -> FromSomeType c b
- class Show e => Error e where
- displayError :: e -> String
- data FileError e
- data LocalNodeConnectInfo mode block = LocalNodeConnectInfo FilePath NetworkId (NodeConsensusMode mode block)
- data ByronMode
- data CardanoMode
- data NodeConsensusMode mode block where
- data LocalNodeClientProtocols block = LocalNodeClientProtocols (Maybe (ChainSyncClient block (Point block) (Tip block) IO ())) (Maybe (LocalTxSubmissionClient (GenTx block) (ApplyTxErr block) IO ())) (Maybe (LocalStateQueryClient block (Point block) (Query block) IO ()))
- withNodeProtocolClient :: NodeConsensusMode mode block -> ((SerialiseNodeToClientConstraints block, SupportedNetworkProtocolVersion block) => ProtocolClient block (BlockProtocol block) -> a) -> a
- newtype ChainSyncClient header point tip (m :: Type -> Type) a = ChainSyncClient {
- runChainSyncClient :: m (ClientStIdle header point tip m a)
- newtype LocalTxSubmissionClient tx reject (m :: Type -> Type) a = LocalTxSubmissionClient (m (LocalTxClientStIdle tx reject m a))
- newtype LocalStateQueryClient block point (query :: Type -> Type) (m :: Type -> Type) a = LocalStateQueryClient {
- runLocalStateQueryClient :: m (ClientStIdle block point query m a)
- newtype NetworkMagic = NetworkMagic {}
- toByronNetworkMagic :: NetworkId -> NetworkMagic
- toByronProtocolMagicId :: NetworkId -> ProtocolMagicId
- toByronRequiresNetworkMagic :: NetworkId -> RequiresNetworkMagic
- toNetworkMagic :: NetworkId -> NetworkMagic
Documentation
module Cardano.API
Era
A type used as a tag to distinguish the Byron era.
Instances
class HasTypeProxy t where Source #
Associated Types
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
Methods
proxyToAsType :: Proxy t -> AsType t Source #
Instances
Cryptographic key interface
Payment addresses
Constructing and inspecting Byron payment addresses
data Address era where Source #
Constructors
ByronAddress :: Address -> Address era | Byron addresses are valid in both the Byron and Shelley era. |
Instances
Building transactions
Constructing and inspecting transactions
data TxBody era where Source #
Constructors
ByronTxBody :: Annotated Tx ByteString -> TxBody Byron |
Instances
Constructors
TxId (Hash StandardCrypto ()) |
Instances
Eq TxId Source # | |
Ord TxId Source # | |
Show TxId Source # | |
IsString TxId Source # | |
Defined in Cardano.Api.Typed Methods fromString :: String -> TxId # | |
SerialiseAsRawBytes TxId Source # | |
Defined in Cardano.Api.Typed Methods serialiseToRawBytes :: TxId -> ByteString Source # deserialiseFromRawBytes :: AsType TxId -> ByteString -> Maybe TxId Source # | |
HasTypeProxy TxId Source # | |
data AsType TxId Source # | |
Defined in Cardano.Api.Typed |
Instances
Enum Lovelace Source # | |
Defined in Cardano.Api.Typed | |
Eq Lovelace Source # | |
Ord Lovelace Source # | |
Defined in Cardano.Api.Typed | |
Show Lovelace Source # | |
The 0-based index for the Ourboros time slot.
Instances
Bounded SlotNo | |
Enum SlotNo | |
Defined in Cardano.Slotting.Slot | |
Eq SlotNo | |
Num SlotNo | |
Ord SlotNo | |
Show SlotNo | |
Generic SlotNo | |
NFData SlotNo | |
Defined in Cardano.Slotting.Slot | |
ToJSON SlotNo | |
FromJSON SlotNo | |
ToCBOR SlotNo | |
FromCBOR SlotNo | |
NoThunks SlotNo | |
Serialise SlotNo | |
Condense SlotNo | |
HasField "ttl" (TxBody era) SlotNo | |
Defined in Shelley.Spec.Ledger.TxBody | |
Embed (StakeCreds era) (Map (Credential 'Staking era) SlotNo) | |
Defined in Shelley.Spec.Ledger.TxBody Methods toBase :: StakeCreds era -> Map (Credential 'Staking era) SlotNo Source # fromBase :: Map (Credential 'Staking era) SlotNo -> StakeCreds era Source # | |
HasExp (StakeCreds era) (Map (Credential 'Staking era) SlotNo) | |
Defined in Shelley.Spec.Ledger.TxBody Methods toExp :: StakeCreds era -> Exp (Map (Credential 'Staking era) SlotNo) Source # | |
type Rep SlotNo | |
Defined in Cardano.Slotting.Slot |
toByronTxId :: TxId -> TxId Source #
toByronTxIn :: TxIn -> TxIn Source #
Signing transactions
Creating transaction witnesses one by one, or all in one go.
Constructors
ByronTx :: ATxAux ByteString -> Tx Byron |
Instances
Incremental signing and separate witnesses
data Witness era where Source #
Constructors
ByronKeyWitness :: TxInWitness -> Witness Byron |
Instances
data WitnessNetworkIdOrByronAddress Source #
Either a network ID or a Byron address to be used in constructing a Shelley bootstrap witness.
Constructors
WitnessNetworkId !NetworkId | Network ID. If this value is used in the construction of a Shelley bootstrap witness,
the result will not consist of a derivation path. If that is required,
specify a |
WitnessByronAddress !(Address Byron) | Byron address. If this value is used in the construction of a Shelley bootstrap witness, both the network ID and derivation path will be extracted from the address and used in the construction of the witness. |
Reading one of several key types
data FromSomeType (c :: Type -> Constraint) b where Source #
Constructors
FromSomeType :: c a => AsType a -> (a -> b) -> FromSomeType c b |
Errors
class Show e => Error e where Source #
Methods
displayError :: e -> String Source #
Instances
Error () Source # | |
Defined in Cardano.Api.Typed Methods displayError :: () -> String Source # | |
Error TextViewError Source # | |
Defined in Cardano.Api.Typed Methods displayError :: TextViewError -> String Source # | |
Error Bech32DecodeError Source # | |
Defined in Cardano.Api.Typed Methods | |
Error OperationalCertIssueError Source # | |
Defined in Cardano.Api.Typed Methods displayError :: OperationalCertIssueError -> String Source # | |
Error StakePoolMetadataValidationError Source # | |
Defined in Cardano.Api.Typed Methods displayError :: StakePoolMetadataValidationError -> String Source # | |
Error TxMetadataJsonSchemaError Source # | |
Defined in Cardano.Api.MetaData Methods displayError :: TxMetadataJsonSchemaError -> String Source # | |
Error TxMetadataJsonError Source # | |
Defined in Cardano.Api.MetaData Methods | |
Error TxMetadataRangeError Source # | |
Defined in Cardano.Api.MetaData Methods | |
Error e => Error (FileError e) Source # | |
Defined in Cardano.Api.Typed Methods displayError :: FileError e -> String Source # |
Constructors
FileError FilePath e | |
FileIOError FilePath IOException |
Low level protocol interaction with a Cardano node
data LocalNodeConnectInfo mode block Source #
Constructors
LocalNodeConnectInfo FilePath NetworkId (NodeConsensusMode mode block) |
Instances
Show (TxSubmitResultForMode ByronMode) Source # | |
Defined in Cardano.Api.TxSubmit |
data CardanoMode Source #
Instances
Show (TxSubmitResultForMode CardanoMode) Source # | |
Defined in Cardano.Api.TxSubmit Methods showsPrec :: Int -> TxSubmitResultForMode CardanoMode -> ShowS # show :: TxSubmitResultForMode CardanoMode -> String # showList :: [TxSubmitResultForMode CardanoMode] -> ShowS # |
data NodeConsensusMode mode block where Source #
Constructors
ByronMode :: EpochSlots -> NodeConsensusMode ByronMode ByronBlockHFC | |
CardanoMode :: EpochSlots -> NodeConsensusMode CardanoMode (CardanoBlock StandardCrypto) |
data LocalNodeClientProtocols block Source #
Constructors
LocalNodeClientProtocols (Maybe (ChainSyncClient block (Point block) (Tip block) IO ())) (Maybe (LocalTxSubmissionClient (GenTx block) (ApplyTxErr block) IO ())) (Maybe (LocalStateQueryClient block (Point block) (Query block) IO ())) |
withNodeProtocolClient :: NodeConsensusMode mode block -> ((SerialiseNodeToClientConstraints block, SupportedNetworkProtocolVersion block) => ProtocolClient block (BlockProtocol block) -> a) -> a Source #
Chain sync protocol
newtype ChainSyncClient header point tip (m :: Type -> Type) a #
Constructors
ChainSyncClient | |
Fields
|
Local tx submission
newtype LocalTxSubmissionClient tx reject (m :: Type -> Type) a #
Constructors
LocalTxSubmissionClient (m (LocalTxClientStIdle tx reject m a)) |
Local state query
newtype LocalStateQueryClient block point (query :: Type -> Type) (m :: Type -> Type) a #
Constructors
LocalStateQueryClient | |
Fields
|
Address
newtype NetworkMagic #
Constructors
NetworkMagic | |
Fields |
Instances
Eq NetworkMagic | |
Defined in Ouroboros.Network.Magic | |
Show NetworkMagic | |
Defined in Ouroboros.Network.Magic Methods showsPrec :: Int -> NetworkMagic -> ShowS # show :: NetworkMagic -> String # showList :: [NetworkMagic] -> ShowS # | |
Generic NetworkMagic | |
Defined in Ouroboros.Network.Magic Associated Types type Rep NetworkMagic :: Type -> Type # | |
NoThunks NetworkMagic | |
Defined in Ouroboros.Network.Magic | |
type Rep NetworkMagic | |
Defined in Ouroboros.Network.Magic type Rep NetworkMagic = D1 ('MetaData "NetworkMagic" "Ouroboros.Network.Magic" "ouroboros-network-0.1.0.0-DgIBwCUrGXaLitNwqCfIcM" 'True) (C1 ('MetaCons "NetworkMagic" 'PrefixI 'True) (S1 ('MetaSel ('Just "unNetworkMagic") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32))) |