Safe Haskell | None |
---|---|
Language | Haskell2010 |
Maestro.Types.V1.Common
Description
Common (shared) types used which are not specific to single category of endpoints.
Synopsis
- data PaymentCredentialAddress
- data StakingCredentialAddress
- data RewardAddress
- data PoolId
- newtype TaggedText (description ∷ Symbol) = TaggedText Text
- data NonAdaNativeToken = NonAdaNativeToken !PolicyId !TokenName
- data AssetUnit
- data Asset = Asset {}
- class IsUtxo a where
- getAddress ∷ a → Bech32StringOf Address
- getAssets ∷ a → [Asset]
- getDatum ∷ a → Maybe DatumOption
- getTxHash ∷ a → TxHash
- getIndex ∷ a → TxIndex
- getReferenceScript ∷ a → Maybe Script
- data UtxoWithSlot = UtxoWithSlot {}
- data PaginatedUtxoWithSlot = PaginatedUtxoWithSlot {}
- module Maestro.Types.Common
- module Maestro.Types.V1.Common.Pagination
- module Maestro.Types.V1.Common.Timestamped
Documentation
data PaymentCredentialAddress #
Phantom datatype to be used with, say Bech32StringOf
to represent Bech32 representation of payment credential of an address.
data StakingCredentialAddress #
Phantom datatype to be used with, say Bech32StringOf
to represent Bech32 representation of staking credential of an address.
data RewardAddress #
Phantom datatype to be used with, say Bech32StringOf
to represent Bech32 representation of stake address (See CIP-19 for more details).
Phantom datatype to be used with, say Bech32StringOf
to represent Bech32 representation of a pool id.
newtype TaggedText (description ∷ Symbol) #
Wrapper around Text
type with mentioned description of it.
Constructors
TaggedText Text |
Instances
Eq (TaggedText description) # | |
Defined in Maestro.Types.V1.Common Methods (==) ∷ TaggedText description → TaggedText description → Bool # (/=) ∷ TaggedText description → TaggedText description → Bool # | |
Ord (TaggedText description) # | |
Defined in Maestro.Types.V1.Common Methods compare ∷ TaggedText description → TaggedText description → Ordering # (<) ∷ TaggedText description → TaggedText description → Bool # (<=) ∷ TaggedText description → TaggedText description → Bool # (>) ∷ TaggedText description → TaggedText description → Bool # (>=) ∷ TaggedText description → TaggedText description → Bool # max ∷ TaggedText description → TaggedText description → TaggedText description # min ∷ TaggedText description → TaggedText description → TaggedText description # | |
Show (TaggedText description) # | |
Defined in Maestro.Types.V1.Common Methods showsPrec ∷ Int → TaggedText description → ShowS # show ∷ TaggedText description → String # showList ∷ [TaggedText description] → ShowS # | |
IsString (TaggedText description) # | |
Defined in Maestro.Types.V1.Common Methods fromString ∷ String → TaggedText description # | |
Generic (TaggedText description) # | |
Defined in Maestro.Types.V1.Common Associated Types type Rep (TaggedText description) ∷ Type → Type # Methods from ∷ TaggedText description → Rep (TaggedText description) x # to ∷ Rep (TaggedText description) x → TaggedText description # | |
FromHttpApiData (TaggedText description) # | |
Defined in Maestro.Types.V1.Common Methods parseUrlPiece ∷ Text → Either Text (TaggedText description) parseHeader ∷ ByteString → Either Text (TaggedText description) parseQueryParam ∷ Text → Either Text (TaggedText description) | |
ToHttpApiData (TaggedText description) # | |
Defined in Maestro.Types.V1.Common Methods toUrlPiece ∷ TaggedText description → Text toEncodedUrlPiece ∷ TaggedText description → Builder toHeader ∷ TaggedText description → ByteString toQueryParam ∷ TaggedText description → Text toEncodedQueryParam ∷ TaggedText description → Builder | |
ToJSON (TaggedText description) # | |
Defined in Maestro.Types.V1.Common Methods toJSON ∷ TaggedText description → Value toEncoding ∷ TaggedText description → Encoding toJSONList ∷ [TaggedText description] → Value toEncodingList ∷ [TaggedText description] → Encoding omitField ∷ TaggedText description → Bool | |
FromJSON (TaggedText description) # | |
Defined in Maestro.Types.V1.Common Methods parseJSON ∷ Value → Parser (TaggedText description) parseJSONList ∷ Value → Parser [TaggedText description] omittedField ∷ Maybe (TaggedText description) | |
type Rep (TaggedText description) # | |
Defined in Maestro.Types.V1.Common type Rep (TaggedText description) = D1 ('MetaData "TaggedText" "Maestro.Types.V1.Common" "maestro-sdk-1.7.3-inplace" 'True) (C1 ('MetaCons "TaggedText" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
data NonAdaNativeToken #
Type to denote for native tokens (besides ada).
Constructors
NonAdaNativeToken !PolicyId !TokenName |
Instances
Eq NonAdaNativeToken # | |
Defined in Maestro.Types.V1.Common Methods | |
Ord NonAdaNativeToken # | |
Defined in Maestro.Types.V1.Common Methods compare ∷ NonAdaNativeToken → NonAdaNativeToken → Ordering # (<) ∷ NonAdaNativeToken → NonAdaNativeToken → Bool # (<=) ∷ NonAdaNativeToken → NonAdaNativeToken → Bool # (>) ∷ NonAdaNativeToken → NonAdaNativeToken → Bool # (>=) ∷ NonAdaNativeToken → NonAdaNativeToken → Bool # max ∷ NonAdaNativeToken → NonAdaNativeToken → NonAdaNativeToken # min ∷ NonAdaNativeToken → NonAdaNativeToken → NonAdaNativeToken # | |
Show NonAdaNativeToken # | |
Defined in Maestro.Types.V1.Common Methods showsPrec ∷ Int → NonAdaNativeToken → ShowS # show ∷ NonAdaNativeToken → String # showList ∷ [NonAdaNativeToken] → ShowS # | |
ToHttpApiData NonAdaNativeToken # | |
Given asset name is either lovelace or concatenation of hex encoded policy ID and hex encoded asset name for native asset.
Constructors
Lovelace | Lovelace. |
UserMintedToken !NonAdaNativeToken | For non-ada native-tokens. |
Instances
Eq AssetUnit # | |
Ord AssetUnit # | |
Defined in Maestro.Types.V1.Common | |
Show AssetUnit # | |
ToJSON AssetUnit # | |
Defined in Maestro.Types.V1.Common Methods toEncoding ∷ AssetUnit → Encoding toJSONList ∷ [AssetUnit] → Value toEncodingList ∷ [AssetUnit] → Encoding | |
FromJSON AssetUnit # | |
Defined in Maestro.Types.V1.Common |
Representation of asset in an UTxO.
Constructors
Asset | |
Fields
|
Instances
Eq Asset # | |
Ord Asset # | |
Show Asset # | |
Generic Asset # | |
ToJSON Asset # | |
Defined in Maestro.Types.V1.Common | |
FromJSON Asset # | |
Defined in Maestro.Types.V1.Common | |
type Rep Asset # | |
Defined in Maestro.Types.V1.Common type Rep Asset = D1 ('MetaData "Asset" "Maestro.Types.V1.Common" "maestro-sdk-1.7.3-inplace" 'False) (C1 ('MetaCons "Asset" 'PrefixI 'True) (S1 ('MetaSel ('Just "assetAmount") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Integer) :*: S1 ('MetaSel ('Just "assetUnit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 AssetUnit))) |
To get basic details from an UTxO.
Methods
getAddress ∷ a → Bech32StringOf Address #
getDatum ∷ a → Maybe DatumOption #
getReferenceScript ∷ a → Maybe Script #
Instances
IsUtxo UtxoWithSlot # | |
Defined in Maestro.Types.V1.Common Methods getAddress ∷ UtxoWithSlot → Bech32StringOf Address # getAssets ∷ UtxoWithSlot → [Asset] # getDatum ∷ UtxoWithSlot → Maybe DatumOption # getTxHash ∷ UtxoWithSlot → TxHash # getIndex ∷ UtxoWithSlot → TxIndex # | |
IsUtxo UtxoWithBytes # | |
Defined in Maestro.Types.V1.Transactions Methods getAddress ∷ UtxoWithBytes → Bech32StringOf Address # getAssets ∷ UtxoWithBytes → [Asset] # getDatum ∷ UtxoWithBytes → Maybe DatumOption # getTxHash ∷ UtxoWithBytes → TxHash # |
data UtxoWithSlot #
Transaction output.
Constructors
UtxoWithSlot | |
Fields
|
Instances
data PaginatedUtxoWithSlot #
A paginated response of transaction outputs.
Constructors
PaginatedUtxoWithSlot | |
Fields
|
Instances
module Maestro.Types.Common