Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Synopsis
- data Ctx = Ctx {
- ctxNetworkInfo ∷ !GYNetworkInfo
- ctxInfo ∷ !LocalNodeConnectInfo
- ctxUserF ∷ !User
- ctxUser2 ∷ !User
- ctxUser3 ∷ !User
- ctxUser4 ∷ !User
- ctxUser5 ∷ !User
- ctxUser6 ∷ !User
- ctxUser7 ∷ !User
- ctxUser8 ∷ !User
- ctxUser9 ∷ !User
- ctxGold ∷ !GYAssetClass
- ctxIron ∷ !GYAssetClass
- ctxLog ∷ !GYLogConfiguration
- ctxLookupDatum ∷ !GYLookupDatum
- ctxAwaitTxConfirmed ∷ !GYAwaitTx
- ctxQueryUtxos ∷ !GYQueryUTxO
- ctxGetParams ∷ !GYGetParameters
- ctxNetworkId ∷ Ctx → GYNetworkId
- data User = User {}
- data CreateUserConfig = CreateUserConfig {}
- ctxUsers ∷ Ctx → [User]
- ctxWallets ∷ Ctx → Wallets
- userPkh ∷ User → GYPubKeyHash
- userPaymentPkh ∷ User → GYPaymentKeyHash
- userStakePkh ∷ User → Maybe GYStakeKeyHash
- userVKey ∷ User → GYPaymentVerificationKey
- userPaymentVKey ∷ User → GYPaymentVerificationKey
- userStakeVKey ∷ User → Maybe GYStakeVerificationKey
- ctxRunGame ∷ Ctx → GYTxGameMonadIO a → IO a
- ctxRun ∷ Ctx → User → GYTxMonadIO a → IO a
- ctxRunQuery ∷ Ctx → GYTxQueryMonadIO a → IO a
- ctxRunBuilder ∷ Ctx → User → GYTxBuilderMonadIO a → IO a
- ctxRunBuilderWithCollateral ∷ Ctx → User → GYTxOutRef → Bool → GYTxBuilderMonadIO a → IO a
- ctxSlotOfCurrentBlock ∷ Ctx → IO GYSlot
- ctxWaitNextBlock ∷ Ctx → IO ()
- ctxWaitUntilSlot ∷ Ctx → GYSlot → IO ()
- ctxProviders ∷ Ctx → GYProviders
- ctxSlotConfig ∷ Ctx → IO GYSlotConfig
- newTempUserCtx ∷ Ctx → User → GYValue → CreateUserConfig → IO User
- ctxQueryBalance ∷ Ctx → User → IO GYValue
- findOutput ∷ GYAddress → GYTxBody → IO GYTxOutRef
Context
Ctx | |
|
ctxNetworkId ∷ Ctx → GYNetworkId #
User
Note: When signing using ToShelleyWitnessSigningKey
instance, it only uses the payment signing key.
data CreateUserConfig #
CreateUserConfig | |
|
Instances
Default CreateUserConfig # | |
Defined in GeniusYield.Test.Privnet.Ctx |
List of context sibling users - all of which begin with same balance. FIXME: Some of these users are actually genesis users.
ctxWallets ∷ Ctx → Wallets #
userPkh ∷ User → GYPubKeyHash #
userVKey ∷ User → GYPaymentVerificationKey #
Deprecated: Use userPaymentVKey.
Operations
ctxRunGame ∷ Ctx → GYTxGameMonadIO a → IO a #
ctxRunQuery ∷ Ctx → GYTxQueryMonadIO a → IO a #
ctxRunBuilder ∷ Ctx → User → GYTxBuilderMonadIO a → IO a #
∷ Ctx | |
→ User | |
→ GYTxOutRef | Reference to UTxO to be used as collateral. |
→ Bool | To check whether this given collateral UTxO has value of exact 5 ada? If it doesn't have exact 5 ada, it would be ignored. |
→ GYTxBuilderMonadIO a | |
→ IO a |
Variant of ctxRun
where caller can also give the UTxO to be used as collateral.
ctxWaitNextBlock ∷ Ctx → IO () #
ctxWaitUntilSlot ∷ Ctx → GYSlot → IO () #
ctxProviders ∷ Ctx → GYProviders #
ctxSlotConfig ∷ Ctx → IO GYSlotConfig #
Helpers
∷ Ctx | |
→ User | User which will fund this new user. |
→ GYValue | Describes balance of new user. |
→ CreateUserConfig | |
→ IO User |
Creates a new user with the given balance. Note that the actual balance which this user get's could be more than what is provided to satisfy minimum ada requirement of a UTxO.
findOutput ∷ GYAddress → GYTxBody → IO GYTxOutRef #