| Copyright | (c) 2023 GYELD GMBH | 
|---|---|
| License | Apache 2.0 | 
| Maintainer | [email protected] | 
| Stability | develop | 
| Safe Haskell | None | 
| Language | GHC2021 | 
GeniusYield.Types.TxOutRef
Contents
Description
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 Methods toJSON :: GYTxOutRef -> Value # toEncoding :: GYTxOutRef -> Encoding # toJSONList :: [GYTxOutRef] -> Value # toEncodingList :: [GYTxOutRef] -> Encoding # omitField :: GYTxOutRef -> Bool # | |
| PrintfArg GYTxOutRef # | |
| Defined in GeniusYield.Types.TxOutRef | |
| FromField GYTxOutRef # | 
 
 | 
| Defined in GeniusYield.Types.TxOutRef Methods parseField :: Field -> Parser GYTxOutRef # | |
| ToField GYTxOutRef # | 
 | 
| Defined in GeniusYield.Types.TxOutRef Methods toField :: GYTxOutRef -> Field # | |
| IsString GYTxOutRef # | 
 
 | 
| Defined in GeniusYield.Types.TxOutRef Methods fromString :: String -> GYTxOutRef # | |
| Show GYTxOutRef # | |
| Defined in GeniusYield.Types.TxOutRef Methods showsPrec :: Int -> GYTxOutRef -> ShowS # show :: GYTxOutRef -> String # showList :: [GYTxOutRef] -> ShowS # | |
| Eq GYTxOutRef # | |
| Defined in GeniusYield.Types.TxOutRef | |
| Ord GYTxOutRef # | |
| Defined in GeniusYield.Types.TxOutRef Methods 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 | |
| FromHttpApiData GYTxOutRef # | 
 | 
| Defined in GeniusYield.Types.TxOutRef Methods parseUrlPiece :: Text -> Either Text GYTxOutRef # parseHeader :: ByteString -> Either Text GYTxOutRef # parseQueryParam :: Text -> Either Text GYTxOutRef # | |
| ToHttpApiData GYTxOutRef # | |
| Defined in GeniusYield.Types.TxOutRef Methods toUrlPiece :: GYTxOutRef -> Text # toEncodedUrlPiece :: GYTxOutRef -> Builder # toHeader :: GYTxOutRef -> ByteString # toQueryParam :: GYTxOutRef -> Text # | |
| ToParamSchema GYTxOutRef # | |
| Defined in GeniusYield.Types.TxOutRef Methods toParamSchema :: forall (t :: SwaggerKind Type). Proxy GYTxOutRef -> ParamSchema t # | |
| ToSchema GYTxOutRef # | |
| Defined in GeniusYield.Types.TxOutRef Methods declareNamedSchema :: Proxy GYTxOutRef -> Declare (Definitions Schema) NamedSchema # | |
txOutRefToPlutus :: GYTxOutRef -> TxOutRef #
>>>txOutRefToPlutus "4293386fef391299c9886dc0ef3e8676cbdbc2c9f2773507f1f838e00043a189#1"TxOutRef {txOutRefId = 4293386fef391299c9886dc0ef3e8676cbdbc2c9f2773507f1f838e00043a189, txOutRefIdx = 1}
txOutRefFromPlutus :: TxOutRef -> Either PlutusToCardanoError GYTxOutRef #
>>>txOutRefFromPlutus $ Plutus.TxOutRef "4293386fef391299c9886dc0ef3e8676cbdbc2c9f2773507f1f838e00043a189" 12Right (GYTxOutRef (TxIn "4293386fef391299c9886dc0ef3e8676cbdbc2c9f2773507f1f838e00043a189" (TxIx 12)))
>>>txOutRefFromPlutus $ Plutus.TxOutRef "ae" 12Left (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" 123456789012345678901Left (UnknownPlutusToCardanoError {ptceTag = "txOutRefFromPlutus: txOutRefIdx 123456789012345678901 too large"})
txOutRefFromApi :: TxIn -> GYTxOutRef #
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 #
Constructors
| GYTxOutRefCbor | |
| Fields | |