Safe Haskell | None |
---|---|
Language | Haskell2010 |
Maestro.Types.Common
Description
Common (shared) types between different versions of Maestro-API.
Synopsis
- data Tx
- data TxOutCbor
- data DatumHash
- data Address
- newtype TxIndex = TxIndex Natural
- newtype PolicyId = PolicyId Text
- newtype TokenName = TokenName Text
- newtype EpochNo = EpochNo {}
- newtype EpochSize = EpochSize {}
- newtype AbsoluteSlot = AbsoluteSlot {}
- newtype SlotNo = SlotNo {}
- newtype BlockHeight = BlockHeight {}
- newtype BlockHash = BlockHash {}
- newtype TxHash = TxHash Text
- newtype Bech32StringOf a = Bech32StringOf Text
- newtype HexStringOf a = HexStringOf Text
- newtype HashStringOf a = HashStringOf Text
- data DatumOptionType
- data DatumOption = DatumOption {
- datumOptionBytes ∷ !(Maybe Text)
- datumOptionHash ∷ !Text
- datumOptionJson ∷ !(Maybe Value)
- datumOptionType ∷ !DatumOptionType
- data ScriptType
- data Script = Script {
- scriptBytes ∷ !(Maybe Text)
- scriptHash ∷ !Text
- scriptJson ∷ !(Maybe Value)
- scriptType ∷ !ScriptType
- data Order
- data CBORStream
- data LowerFirst
- data LowerAll
Documentation
Phantom datatype to be used with constructors like HashStringOf
.
Phantom datatype to be used with HexStringOf
to represent hex encoded CBOR bytes of transaction output.
Phantom datatype to be used with HexStringOf
to represent hex encoded datum hash.
Phantom datatype to be used with, say Bech32StringOf
to represent Bech32 representation of an address.
Index of UTxO in a transaction outputs.
Instances
Enum TxIndex # | |
Defined in Maestro.Types.Common | |
Eq TxIndex # | |
Integral TxIndex # | |
Defined in Maestro.Types.Common | |
Num TxIndex # | |
Ord TxIndex # | |
Real TxIndex # | |
Defined in Maestro.Types.Common Methods toRational ∷ TxIndex → Rational # | |
Show TxIndex # | |
Generic TxIndex # | |
FromHttpApiData TxIndex # | |
Defined in Maestro.Types.Common | |
ToHttpApiData TxIndex # | |
Defined in Maestro.Types.Common Methods toUrlPiece ∷ TxIndex → Text toEncodedUrlPiece ∷ TxIndex → Builder toHeader ∷ TxIndex → ByteString toQueryParam ∷ TxIndex → Text | |
ToJSON TxIndex # | |
Defined in Maestro.Types.Common Methods toEncoding ∷ TxIndex → Encoding toJSONList ∷ [TxIndex] → Value toEncodingList ∷ [TxIndex] → Encoding | |
FromJSON TxIndex # | |
Defined in Maestro.Types.Common | |
type Rep TxIndex # | |
Defined in Maestro.Types.Common |
Hex encoded minting policy ID (for non-ada native asset).
Instances
Eq PolicyId # | |
Ord PolicyId # | |
Show PolicyId # | |
IsString PolicyId # | |
Defined in Maestro.Types.Common Methods fromString ∷ String → PolicyId # | |
Generic PolicyId # | |
FromHttpApiData PolicyId # | |
Defined in Maestro.Types.Common | |
ToHttpApiData PolicyId # | |
Defined in Maestro.Types.Common Methods toUrlPiece ∷ PolicyId → Text toEncodedUrlPiece ∷ PolicyId → Builder toHeader ∷ PolicyId → ByteString toQueryParam ∷ PolicyId → Text | |
ToJSON PolicyId # | |
Defined in Maestro.Types.Common Methods toEncoding ∷ PolicyId → Encoding toJSONList ∷ [PolicyId] → Value toEncodingList ∷ [PolicyId] → Encoding | |
FromJSON PolicyId # | |
Defined in Maestro.Types.Common | |
type Rep PolicyId # | |
Defined in Maestro.Types.Common |
Hex encoded token name (for non-ada native asset).
Instances
Eq TokenName # | |
Ord TokenName # | |
Defined in Maestro.Types.Common | |
Show TokenName # | |
IsString TokenName # | |
Defined in Maestro.Types.Common Methods fromString ∷ String → TokenName # | |
Generic TokenName # | |
FromHttpApiData TokenName # | |
Defined in Maestro.Types.Common | |
ToHttpApiData TokenName # | |
Defined in Maestro.Types.Common Methods toUrlPiece ∷ TokenName → Text toEncodedUrlPiece ∷ TokenName → Builder toHeader ∷ TokenName → ByteString | |
ToJSON TokenName # | |
Defined in Maestro.Types.Common Methods toEncoding ∷ TokenName → Encoding toJSONList ∷ [TokenName] → Value toEncodingList ∷ [TokenName] → Encoding | |
FromJSON TokenName # | |
Defined in Maestro.Types.Common | |
type Rep TokenName # | |
Defined in Maestro.Types.Common |
An epoch, i.e. the number of the epoch.
Instances
Enum EpochNo # | |
Defined in Maestro.Types.Common | |
Eq EpochNo # | |
Integral EpochNo # | |
Defined in Maestro.Types.Common | |
Num EpochNo # | |
Ord EpochNo # | |
Real EpochNo # | |
Defined in Maestro.Types.Common Methods toRational ∷ EpochNo → Rational # | |
Show EpochNo # | |
Generic EpochNo # | |
ToHttpApiData EpochNo # | |
Defined in Maestro.Types.Common Methods toUrlPiece ∷ EpochNo → Text toEncodedUrlPiece ∷ EpochNo → Builder toHeader ∷ EpochNo → ByteString toQueryParam ∷ EpochNo → Text | |
ToJSON EpochNo # | |
Defined in Maestro.Types.Common Methods toEncoding ∷ EpochNo → Encoding toJSONList ∷ [EpochNo] → Value toEncodingList ∷ [EpochNo] → Encoding | |
FromJSON EpochNo # | |
Defined in Maestro.Types.Common | |
type Rep EpochNo # | |
Defined in Maestro.Types.Common |
Length of an epoch, i.e., number of slots in it.
Constructors
EpochSize | |
Fields |
Instances
Enum EpochSize # | |
Defined in Maestro.Types.Common | |
Eq EpochSize # | |
Integral EpochSize # | |
Defined in Maestro.Types.Common | |
Num EpochSize # | |
Ord EpochSize # | |
Defined in Maestro.Types.Common | |
Real EpochSize # | |
Defined in Maestro.Types.Common Methods toRational ∷ EpochSize → Rational # | |
Show EpochSize # | |
Generic EpochSize # | |
ToJSON EpochSize # | |
Defined in Maestro.Types.Common Methods toEncoding ∷ EpochSize → Encoding toJSONList ∷ [EpochSize] → Value toEncodingList ∷ [EpochSize] → Encoding | |
FromJSON EpochSize # | |
Defined in Maestro.Types.Common | |
type Rep EpochSize # | |
Defined in Maestro.Types.Common |
newtype AbsoluteSlot #
Absolute Slot Number
Constructors
AbsoluteSlot | |
Fields |
Instances
Eq AbsoluteSlot # | |
Defined in Maestro.Types.Common | |
Show AbsoluteSlot # | |
Defined in Maestro.Types.Common Methods showsPrec ∷ Int → AbsoluteSlot → ShowS # show ∷ AbsoluteSlot → String # showList ∷ [AbsoluteSlot] → ShowS # | |
Generic AbsoluteSlot # | |
Defined in Maestro.Types.Common Associated Types type Rep AbsoluteSlot ∷ Type → Type # | |
ToJSON AbsoluteSlot # | |
Defined in Maestro.Types.Common Methods toJSON ∷ AbsoluteSlot → Value toEncoding ∷ AbsoluteSlot → Encoding toJSONList ∷ [AbsoluteSlot] → Value toEncodingList ∷ [AbsoluteSlot] → Encoding | |
FromJSON AbsoluteSlot # | |
Defined in Maestro.Types.Common | |
type Rep AbsoluteSlot # | |
Defined in Maestro.Types.Common type Rep AbsoluteSlot = D1 ('MetaData "AbsoluteSlot" "Maestro.Types.Common" "maestro-sdk-1.7.3-inplace" 'True) (C1 ('MetaCons "AbsoluteSlot" 'PrefixI 'True) (S1 ('MetaSel ('Just "unAbsoluteSlot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Natural))) |
The 0-based index for the Ourboros time slot.
Instances
Bounded SlotNo # | |
Enum SlotNo # | |
Defined in Maestro.Types.Common | |
Eq SlotNo # | |
Integral SlotNo # | |
Num SlotNo # | |
Ord SlotNo # | |
Real SlotNo # | |
Defined in Maestro.Types.Common Methods toRational ∷ SlotNo → Rational # | |
Show SlotNo # | |
Generic SlotNo # | |
FromHttpApiData SlotNo # | |
Defined in Maestro.Types.Common | |
ToHttpApiData SlotNo # | |
Defined in Maestro.Types.Common Methods toUrlPiece ∷ SlotNo → Text toEncodedUrlPiece ∷ SlotNo → Builder toHeader ∷ SlotNo → ByteString toQueryParam ∷ SlotNo → Text | |
ToJSON SlotNo # | |
Defined in Maestro.Types.Common Methods toEncoding ∷ SlotNo → Encoding toJSONList ∷ [SlotNo] → Value toEncodingList ∷ [SlotNo] → Encoding | |
FromJSON SlotNo # | |
Defined in Maestro.Types.Common | |
type Rep SlotNo # | |
Defined in Maestro.Types.Common |
newtype BlockHeight #
Block Height
Constructors
BlockHeight | |
Fields |
Instances
Hash of the block.
Constructors
BlockHash | |
Fields |
Instances
Eq BlockHash # | |
Ord BlockHash # | |
Defined in Maestro.Types.Common | |
Show BlockHash # | |
Generic BlockHash # | |
FromHttpApiData BlockHash # | |
Defined in Maestro.Types.Common | |
ToHttpApiData BlockHash # | |
Defined in Maestro.Types.Common Methods toUrlPiece ∷ BlockHash → Text toEncodedUrlPiece ∷ BlockHash → Builder toHeader ∷ BlockHash → ByteString | |
ToJSON BlockHash # | |
Defined in Maestro.Types.Common Methods toEncoding ∷ BlockHash → Encoding toJSONList ∷ [BlockHash] → Value toEncodingList ∷ [BlockHash] → Encoding | |
FromJSON BlockHash # | |
Defined in Maestro.Types.Common | |
type Rep BlockHash # | |
Defined in Maestro.Types.Common |
Hash of the Transaction.
Instances
Eq TxHash # | |
Ord TxHash # | |
Show TxHash # | |
IsString TxHash # | |
Defined in Maestro.Types.Common Methods fromString ∷ String → TxHash # | |
Generic TxHash # | |
FromHttpApiData TxHash # | |
Defined in Maestro.Types.Common | |
ToHttpApiData TxHash # | |
Defined in Maestro.Types.Common Methods toUrlPiece ∷ TxHash → Text toEncodedUrlPiece ∷ TxHash → Builder toHeader ∷ TxHash → ByteString toQueryParam ∷ TxHash → Text | |
ToJSON TxHash # | |
Defined in Maestro.Types.Common Methods toEncoding ∷ TxHash → Encoding toJSONList ∷ [TxHash] → Value toEncodingList ∷ [TxHash] → Encoding | |
FromJSON TxHash # | |
Defined in Maestro.Types.Common | |
type Rep TxHash # | |
Defined in Maestro.Types.Common |
newtype Bech32StringOf a #
Type to label the string is question is a Bech32
representation of the given type a
.
Constructors
Bech32StringOf Text |
Instances
newtype HexStringOf a #
Type to label the string is question is a hexadecimal representation of the given type a
.
Constructors
HexStringOf Text |
Instances
newtype HashStringOf a #
Type to label the string is question is a hash string of the given type a
, like hash of the transaction body.
Constructors
HashStringOf Text |
Instances
data DatumOptionType #
Datum in output is either inlined or not.
Instances
data DatumOption #
Description of datum in an output. If datum is successfully resolved for (when mentioning to resolve for it by giving resolve_datums
flag in query parameters) then fields like datumOptionBytes
would have non Nothing
value even if UTxO just had hash of datum.
Constructors
DatumOption | |
Fields
|
Instances
data ScriptType #
Type of script.
Instances
Type to represent script in an UTxO.
Constructors
Script | |
Fields
|
Instances
Eq Script # | |
Ord Script # | |
Show Script # | |
Generic Script # | |
ToJSON Script # | |
Defined in Maestro.Types.Common Methods toEncoding ∷ Script → Encoding toJSONList ∷ [Script] → Value toEncodingList ∷ [Script] → Encoding | |
FromJSON Script # | |
Defined in Maestro.Types.Common | |
type Rep Script # | |
Defined in Maestro.Types.Common type Rep Script = D1 ('MetaData "Script" "Maestro.Types.Common" "maestro-sdk-1.7.3-inplace" 'False) (C1 ('MetaCons "Script" 'PrefixI 'True) ((S1 ('MetaSel ('Just "scriptBytes") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "scriptHash") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "scriptJson") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Maybe Value)) :*: S1 ('MetaSel ('Just "scriptType") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ScriptType)))) |
Constructors
Ascending | |
Descending |
Instances
Bounded Order # | |
Enum Order # | |
Eq Order # | |
Ord Order # | |
Show Order # | |
FromHttpApiData Order # | |
Defined in Maestro.Types.Common | |
ToHttpApiData Order # | |
Defined in Maestro.Types.Common Methods toUrlPiece ∷ Order → Text toEncodedUrlPiece ∷ Order → Builder toHeader ∷ Order → ByteString toQueryParam ∷ Order → Text | |
ToJSON Order # | |
Defined in Maestro.Types.Common | |
Default Order # | |
Defined in Maestro.Types.Common |
data CBORStream #
Content-Type to represent transaction when submitting for it.
Instances
Accept CBORStream # | |
Defined in Maestro.Types.Common Methods contentType ∷ Proxy CBORStream → MediaType contentTypes ∷ Proxy CBORStream → NonEmpty MediaType | |
MimeRender CBORStream ByteString # | |
Defined in Maestro.Types.Common Methods | |
MimeRender CBORStream ByteString # | |
Defined in Maestro.Types.Common Methods | |
MimeUnrender CBORStream ByteString # | |
Defined in Maestro.Types.Common Methods mimeUnrender ∷ Proxy CBORStream → ByteString → Either String ByteString mimeUnrenderWithType ∷ Proxy CBORStream → MediaType → ByteString → Either String ByteString | |
MimeUnrender CBORStream ByteString # | |
Defined in Maestro.Types.Common Methods mimeUnrender ∷ Proxy CBORStream → ByteString0 → Either String ByteString mimeUnrenderWithType ∷ Proxy CBORStream → MediaType → ByteString0 → Either String ByteString |
data LowerFirst #
Will lower the first character for your type.
Instances
StringModifier LowerFirst # | |
Defined in Maestro.Types.Common Methods |
Will lower all characters for your type.
Instances
StringModifier LowerAll # | |
Defined in Maestro.Types.Common Methods |