atlas-cardano-0.6.1: Application backend for Plutus smart contracts on Cardano
Copyright(c) 2023 GYELD GMBH
LicenseApache 2.0
Maintainer[email protected]
Stabilitydevelop
Safe HaskellSafe-Inferred
LanguageGHC2021

GeniusYield.Types.Providers

Description

 
Synopsis

Lookup Datum

type GYLookupDatum = GYDatumHashIO (Maybe GYDatum) #

How to query a datum by its hash?

Submit Tx

type GYSubmitTx = GYTxIO GYTxId #

How to submit a transaction?

Await Tx Confirmed

type GYAwaitTx = GYAwaitTxParametersGYTxIdIO () #

How to await for a transaction confirmation?

data GYAwaitTxParameters #

Await transaction parameters.

Constructors

GYAwaitTxParameters 

Fields

  • maxAttempts ∷ !Int

    Max number of attempts before give up.

  • checkInterval ∷ !Int

    Wait time for each attempt (in microseconds).

  • confirmations ∷ !Word64

    Min number of block confirmation. NOTE: We might wait for more blocks than what is mentioned here but certainly not less.

Instances

Instances details
Show GYAwaitTxParameters # 
Instance details

Defined in GeniusYield.Types.Providers

Default GYAwaitTxParameters # 
Instance details

Defined in GeniusYield.Types.Providers

Get current slot

data GYSlotActions #

How to get current slot?

gyWaitForNextBlock_GYProvidersIO () #

gyWaitForNextBlock variant which doesn't return current slot.

gyWaitForNextBlockDefaultIO GYSlotIO GYSlot #

Wait for the next block.

threadDelay until current slot getter returns another value.

gyWaitUntilSlotDefaultIO GYSlotGYSlotIO GYSlot #

Wait until slot.

Returns the new current slot, which might be larger.

makeSlotActions #

Arguments

NominalDiffTime

The time to cache current slots for.

IO GYSlot

Getting current slot directly from the provider

IO GYSlotActions 

Construct efficient GYSlotActions methods by ensuring the supplied getSlotOfCurrentBlock is only made after a given duration of time has passed.

This uses IO to set up some mutable references used for caching.

Get network parameters

data GYGetParameters #

How to get protocol parameters? ... and other data to do balancing.

makeGetParameters #

Arguments

IO ApiProtocolParameters

Getting protocol parameters

IO SystemStart

Getting system start

IO EraHistory

Getting era history

IO (Set PoolId)

Getting stake pools

IO GYGetParameters 

Construct efficient GYGetParameters methods by ensuring the supplied IO queries are only made when necessary.

This uses IO to set up some mutable references used for caching.

Query UTxO

gyQueryUtxosAtAddressWithDatumsDefaultMonad m ⇒ (GYAddressMaybe GYAssetClass → m GYUTxOs) → (GYDatumHash → m (Maybe GYDatum)) → GYAddressMaybe GYAssetClass → m [(GYUTxO, Maybe GYDatum)] #

Lookup UTxOs at given GYAddress with their datums. This is a default implementation using utxosAtAddress and lookupDatum.

gyQueryUtxosAtAddressesWithDatumsDefaultMonad m ⇒ ([GYAddress] → m GYUTxOs) → (GYDatumHash → m (Maybe GYDatum)) → [GYAddress] → m [(GYUTxO, Maybe GYDatum)] #

Lookup UTxOs at zero or more GYAddress with their datums. This is a default implementation using utxosAtAddresses and lookupDatum.

gyQueryUtxosAtPaymentCredsWithDatumsDefaultMonad m ⇒ ([GYPaymentCredential] → m GYUTxOs) → (GYDatumHash → m (Maybe GYDatum)) → [GYPaymentCredential] → m [(GYUTxO, Maybe GYDatum)] #

Lookup UTxOs at zero or more GYPaymentCredential with their datums. This is a default implementation using utxosAtPaymentCredentials and lookupDatum.

gyQueryUtxosAtPaymentCredWithDatumsDefaultMonad m ⇒ (GYPaymentCredentialMaybe GYAssetClass → m GYUTxOs) → (GYDatumHash → m (Maybe GYDatum)) → GYPaymentCredentialMaybe GYAssetClass → m [(GYUTxO, Maybe GYDatum)] #

Lookup UTxOs at given GYPaymentCredential with their datums. This is a default implementation using utxosAtPaymentCredential and lookupDatum.

gyQueryUtxosAtTxOutRefsWithDatumsDefaultMonad m ⇒ ([GYTxOutRef] → m GYUTxOs) → (GYDatumHash → m (Maybe GYDatum)) → [GYTxOutRef] → m [(GYUTxO, Maybe GYDatum)] #

Lookup UTxOs at zero or more GYTxOutRef with their datums. This is a default implementation using utxosAtTxOutRefs and lookupDatum.

data GYQueryUTxO #

How to query utxos?

Constructors

GYQueryUTxO 

Fields

gyQueryUtxoRefsAtAddressDefault ∷ (GYAddressMaybe GYAssetClassIO GYUTxOs) → GYAddressIO [GYTxOutRef] #

Query Utxo Refs at address (default implementation)

gyQueryUtxoAtAddressesDefault ∷ (GYAddressMaybe GYAssetClassIO GYUTxOs) → [GYAddress] → IO GYUTxOs #

Query Utxo for addresses (default implementation)

gyQueryUtxoAtPaymentCredentialsDefault ∷ (GYPaymentCredentialMaybe GYAssetClassIO GYUTxOs) → [GYPaymentCredential] → IO GYUTxOs #

Query Utxo for payment credentials (default implementation)

gyQueryUtxosAtTxOutRefsDefault ∷ (GYTxOutRefIO (Maybe GYUTxO)) → [GYTxOutRef] → IO GYUTxOs #

Query Utxos at output refs (default implementation).

Logging

simpleLoggingGYLogSeverity → (TextIO ()) → GYLogConfiguration #

Logging messages using the given severity filter with given IO action.

Providers

data GYProviders #

Constructors

GYProviders 

Fields