Module

Contract.Config

Exposes some pre-defined Contract configurations. Re-exports all modules needed to modify ContractParams.

#defaultSynchronizationParams

defaultSynchronizationParams :: ContractSynchronizationParams

Default synchronization parameters with all synchronizations disabled. See doc/query-layers.md for more info.

#strictSynchronizationParams

strictSynchronizationParams :: ContractSynchronizationParams

Synchronization parameters with all synchronization primitives enabled and errorOnTimeout values set to true. See doc/query-layers.md for more info.

#softSynchronizationParams

softSynchronizationParams :: ContractSynchronizationParams

Attempt to synchronize, but do not throw an exception on failure. Used to be the default option in CTL up to and including v8. See doc/query-layers.md for more info.

#defaultTimeParams

defaultTimeParams :: ContractTimeParams
  • syncWallet specifies delay and timeout for syncWalletWithTransaction and syncWalletWithTxInputs synchronization primitives. See doc/query-layers.md for more info.
  • syncBackend specifies delay and timeout for syncBackendWithWallet synchronization primitive. See doc/query-layers.md for more info.
  • awaitTxConfirmed specifies default delay and timeout for awaitTxConfirmed call.

Re-exports from Cardano.Wallet.Key

Re-exports from Ctl.Internal.BalanceTx.Sync

#disabledSynchronizationParams

disabledSynchronizationParams :: ContractSynchronizationParams

Synchronization parameters that make all synchronization primitives a no-op. See doc/query-layers.md for more info.

Re-exports from Ctl.Internal.Contract.Hooks

#Hooks

type Hooks = { beforeInit :: Maybe (Effect Unit), beforeSign :: Maybe (Effect Unit), onClusterStartup :: Maybe (ClusterParameters -> Effect Unit), onError :: Maybe (Error -> Effect Unit), onSubmit :: Maybe (Transaction -> Effect Unit), onSuccess :: Maybe (Effect Unit) }

#emptyHooks

Re-exports from Ctl.Internal.Contract.Monad

#ContractTimeParams

type ContractTimeParams = { awaitTxConfirmed :: { delay :: Milliseconds, timeout :: Seconds }, syncBackend :: { delay :: Milliseconds, timeout :: Seconds }, syncWallet :: { delay :: Milliseconds, timeout :: Seconds }, waitUntilSlot :: { delay :: Milliseconds } }

Delays and timeouts for internal query functions.

  • awaitTxConfirmed.delay - how frequently should we query for Tx in Contract.Transaction.awaitTxConfirmed

  • For info on syncBackend and syncWalletseedoc/query-layers.md`

#ContractSynchronizationParams

type ContractSynchronizationParams = { syncBackendWithWallet :: { beforeBalancing :: Boolean, beforeCip30Methods :: Boolean, errorOnTimeout :: Boolean }, syncWalletWithTransaction :: { beforeTxConfirmed :: Boolean, errorOnTimeout :: Boolean }, syncWalletWithTxInputs :: { beforeCip30Sign :: Boolean, errorOnTimeout :: Boolean } }

#ContractParams

type ContractParams = { backendParams :: QueryBackendParams, customLogger :: Maybe (LogLevel -> Message -> Aff Unit), hooks :: Hooks, logLevel :: LogLevel, networkId :: NetworkId, suppressLogs :: Boolean, synchronizationParams :: ContractSynchronizationParams, timeParams :: ContractTimeParams, walletSpec :: Maybe WalletSpec }

Options to construct an environment for a Contract to run.

See Contract.Config for pre-defined values for testnet and mainnet.

Use runContract to run a Contract within an implicity constructed ContractEnv environment, or use withContractEnv if your application contains multiple contracts that can reuse the same environment.

Re-exports from Ctl.Internal.Contract.QueryBackend

#CtlBackendParams

type CtlBackendParams = { kupoConfig :: ServerConfig, ogmiosConfig :: ServerConfig }

#CtlBackend

type CtlBackend = { kupoConfig :: ServerConfig, ogmios :: { config :: ServerConfig, ws :: OgmiosWebSocket } }

#BlockfrostBackendParams

type BlockfrostBackendParams = { blockfrostApiKey :: Maybe String, blockfrostConfig :: ServerConfig, confirmTxDelay :: Maybe Seconds }

#defaultConfirmTxDelay

Re-exports from Ctl.Internal.ServerConfig

#ServerConfig

type ServerConfig = { host :: Host, path :: Maybe String, port :: UInt, secure :: Boolean }

#Host

type Host = String

#defaultOgmiosWsConfig

#defaultKupoServerConfig

#blockfrostSelfHostedServerConfig

#blockfrostPublicPreviewServerConfig

#blockfrostPublicPreprodServerConfig

#blockfrostPublicMainnetServerConfig

Re-exports from Ctl.Internal.Wallet.Spec

#KnownWallet

#Cip1852DerivationPath

type Cip1852DerivationPath = { accountIndex :: UInt, addressIndex :: UInt }

Contains non-constant parameters for a CIP-1852 derivation path. See https://cips.cardano.org/cips/cip1852/ and doc/key-management.md.

#walletName

Re-exports from Data.Log.Level

#LogLevel

Re-exports from Data.Log.Message

#Message

type Message = { level :: LogLevel, message :: String, tags :: TagSet, timestamp :: JSDate }

Modules