Copyright | (c) 2023 GYELD GMBH |
---|---|
License | Apache 2.0 |
Maintainer | [email protected] |
Stability | develop |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Synopsis
- data GYTxOutRef
- txOutRefToPlutus ∷ GYTxOutRef → TxOutRef
- txOutRefFromPlutus ∷ TxOutRef → Either PlutusToCardanoError GYTxOutRef
- txOutRefFromApi ∷ TxIn → GYTxOutRef
- txOutRefFromApiTxIdIx ∷ TxId → TxIx → GYTxOutRef
- wordToApiIx ∷ Word → TxIx
- txOutRefToApi ∷ GYTxOutRef → TxIn
- showTxOutRef ∷ GYTxOutRef → Text
- txOutRefToTuple ∷ GYTxOutRef → (GYTxId, Word)
- txOutRefToTuple' ∷ GYTxOutRef → (Text, Word)
- txOutRefFromTuple ∷ (GYTxId, Word) → GYTxOutRef
- newtype GYTxOutRefCbor = GYTxOutRefCbor {}
Documentation
data GYTxOutRef #
Type that represents a reference to a GYTxOut
.
Instances
FromJSON GYTxOutRef # | |
Defined in GeniusYield.Types.TxOutRef | |
ToJSON GYTxOutRef # | |
Defined in GeniusYield.Types.TxOutRef toJSON ∷ GYTxOutRef → Value # toEncoding ∷ GYTxOutRef → Encoding # toJSONList ∷ [GYTxOutRef] → Value # toEncodingList ∷ [GYTxOutRef] → Encoding # omitField ∷ GYTxOutRef → Bool # | |
IsString GYTxOutRef # |
|
Defined in GeniusYield.Types.TxOutRef fromString ∷ String → GYTxOutRef # | |
Show GYTxOutRef # | |
Defined in GeniusYield.Types.TxOutRef | |
PrintfArg GYTxOutRef # | |
Defined in GeniusYield.Types.TxOutRef | |
FromField GYTxOutRef # |
|
Defined in GeniusYield.Types.TxOutRef parseField ∷ Field → Parser GYTxOutRef # | |
ToField GYTxOutRef # |
|
Defined in GeniusYield.Types.TxOutRef toField ∷ GYTxOutRef → Field # | |
Eq GYTxOutRef # | |
Defined in GeniusYield.Types.TxOutRef (==) ∷ GYTxOutRef → GYTxOutRef → Bool # (/=) ∷ GYTxOutRef → GYTxOutRef → Bool # | |
Ord GYTxOutRef # | |
Defined in GeniusYield.Types.TxOutRef compare ∷ GYTxOutRef → GYTxOutRef → Ordering # (<) ∷ GYTxOutRef → GYTxOutRef → Bool # (<=) ∷ GYTxOutRef → GYTxOutRef → Bool # (>) ∷ GYTxOutRef → GYTxOutRef → Bool # (>=) ∷ GYTxOutRef → GYTxOutRef → Bool # max ∷ GYTxOutRef → GYTxOutRef → GYTxOutRef # min ∷ GYTxOutRef → GYTxOutRef → GYTxOutRef # | |
Hashable GYTxOutRef # | |
Defined in GeniusYield.Types.TxOutRef hashWithSalt ∷ Int → GYTxOutRef → Int # hash ∷ GYTxOutRef → Int # | |
FromHttpApiData GYTxOutRef # |
|
Defined in GeniusYield.Types.TxOutRef | |
ToHttpApiData GYTxOutRef # | |
Defined in GeniusYield.Types.TxOutRef | |
ToParamSchema GYTxOutRef # | |
Defined in GeniusYield.Types.TxOutRef toParamSchema ∷ ∀ (t ∷ SwaggerKind Type). Proxy GYTxOutRef → ParamSchema t # | |
ToSchema GYTxOutRef # | |
Defined in GeniusYield.Types.TxOutRef |
txOutRefToPlutus ∷ GYTxOutRef → TxOutRef #
>>>
txOutRefToPlutus "4293386fef391299c9886dc0ef3e8676cbdbc2c9f2773507f1f838e00043a189#1"
TxOutRef {txOutRefId = 4293386fef391299c9886dc0ef3e8676cbdbc2c9f2773507f1f838e00043a189, txOutRefIdx = 1}
txOutRefFromPlutus ∷ TxOutRef → Either PlutusToCardanoError GYTxOutRef #
>>>
txOutRefFromPlutus $ Plutus.TxOutRef "4293386fef391299c9886dc0ef3e8676cbdbc2c9f2773507f1f838e00043a189" 12
Right (GYTxOutRef (TxIn "4293386fef391299c9886dc0ef3e8676cbdbc2c9f2773507f1f838e00043a189" (TxIx 12)))
>>>
txOutRefFromPlutus $ Plutus.TxOutRef "ae" 12
Left (UnknownPlutusToCardanoError {ptceTag = "txOutRefFromPlutus: invalid txOutRefId ae, error: SerialiseAsRawBytesError {unSerialiseAsRawBytesError = \"Unable to deserialise TxId\"}"})
>>>
txOutRefFromPlutus $ Plutus.TxOutRef "4293386fef391299c9886dc0ef3e8676cbdbc2c9f2773507f1f838e00043a189" (-2)
Left (UnknownPlutusToCardanoError {ptceTag = "txOutRefFromPlutus: negative txOutRefIdx -2"})
>>>
txOutRefFromPlutus $ Plutus.TxOutRef "4293386fef391299c9886dc0ef3e8676cbdbc2c9f2773507f1f838e00043a189" 123456789012345678901
Left (UnknownPlutusToCardanoError {ptceTag = "txOutRefFromPlutus: txOutRefIdx 123456789012345678901 too large"})
txOutRefFromApiTxIdIx ∷ TxId → TxIx → GYTxOutRef #
wordToApiIx ∷ Word → TxIx #
txOutRefToApi ∷ GYTxOutRef → TxIn #
Helpers
showTxOutRef ∷ GYTxOutRef → Text #
txOutRefToTuple ∷ GYTxOutRef → (GYTxId, Word) #
txOutRefToTuple' ∷ GYTxOutRef → (Text, Word) #
txOutRefFromTuple ∷ (GYTxId, Word) → GYTxOutRef #
CBOR format
newtype GYTxOutRefCbor #
Instances
FromJSON GYTxOutRefCbor # | |
Defined in GeniusYield.Types.TxOutRef | |
Show GYTxOutRefCbor # | |
Defined in GeniusYield.Types.TxOutRef showsPrec ∷ Int → GYTxOutRefCbor → ShowS # show ∷ GYTxOutRefCbor → String # showList ∷ [GYTxOutRefCbor] → ShowS # | |
PrintfArg GYTxOutRefCbor # | |
Defined in GeniusYield.Types.TxOutRef | |
FromHttpApiData GYTxOutRefCbor # |
|
ToParamSchema GYTxOutRefCbor # | |
Defined in GeniusYield.Types.TxOutRef toParamSchema ∷ ∀ (t ∷ SwaggerKind Type). Proxy GYTxOutRefCbor → ParamSchema t # | |
ToSchema GYTxOutRefCbor # | |
Defined in GeniusYield.Types.TxOutRef |