| Copyright | (c) 2023 GYELD GMBH |
|---|---|
| License | Apache 2.0 |
| Maintainer | [email protected] |
| Stability | develop |
| Safe Haskell | None |
| Language | GHC2021 |
GeniusYield.Test.Privnet.Ctx
Contents
Description
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
- ctxCommittee :: !CtxCommittee
- data CtxCommittee = CtxCommittee {}
- 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
Constructors
| Ctx | |
Fields
| |
data CtxCommittee #
Constructors
| CtxCommittee | |
Fields
| |
Instances
| Show CtxCommittee # | |
Defined in GeniusYield.Test.Privnet.Ctx Methods showsPrec :: Int -> CtxCommittee -> ShowS # show :: CtxCommittee -> String # showList :: [CtxCommittee] -> ShowS # | |
ctxNetworkId :: Ctx -> GYNetworkId #
User
Note: When signing using ToShelleyWitnessSigningKey instance, it only uses the payment signing key.
Constructors
| User | |
Fields | |
Instances
| ToShelleyWitnessSigningKey User # | This only takes the payment signing key, not the stake key. |
Defined in GeniusYield.TxBuilder.User Methods toShelleyWitnessSigningKey :: User -> ShelleyWitnessSigningKey # | |
| Show User # | |
| Eq User # | |
| Ord User # | |
data CreateUserConfig #
Constructors
| CreateUserConfig | |
Fields
| |
Instances
| Default CreateUserConfig # | |
Defined in GeniusYield.Test.Privnet.Ctx Methods def :: CreateUserConfig # | |
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 #
userPaymentPkh :: User -> GYPaymentKeyHash #
userStakePkh :: User -> Maybe GYStakeKeyHash #
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 #
Arguments
| :: 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.
ctxSlotOfCurrentBlock :: Ctx -> IO GYSlot #
ctxWaitNextBlock :: Ctx -> IO () #
ctxWaitUntilSlot :: Ctx -> GYSlot -> IO () #
ctxProviders :: Ctx -> GYProviders #
ctxSlotConfig :: Ctx -> IO GYSlotConfig #
Helpers
Arguments
| :: 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 #