diff --git a/README.md b/README.md index c67cc866..fe119edf 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,47 @@ -# purescript-bridge +# purescript-bridge (Plutus remix) +This repository contains a fork of `purescript-bridge` which has been modified for compatibility with with Plutus. The top-level `PlutusBridge` module should provide all of the necessary functionality for Plutus-related uses. -[![Build Status](https://travis-ci.org/eskimor/purescript-bridge.svg?branch=master)](https://travis-ci.org/eskimor/purescript-bridge) +To facilitate compatibility with Plutus, the modules in this project provide: +## The `HasConstrIndices` type class (located in `PlutusTx.ConstrIndices`) +``` haskell +class HasConstrIndices (a :: Type) where + getConstrIndices :: [(Int, String)] +``` + +This class is used to record constructor index information. Due to the existence of the `makeIsDataIndexed` function in Plutus, the `PlutusCore.Data.Data` instance generated by `ToData` for a given Haskell type may contain constructors (i.e. `Constr Integer [Data]`) where the index (the `Integer`) may not match the natural order of the constructors. The natural order of the constructors, therefore, cannot be relied upon. `HasConstrIndices` allows us to encode the correct order and use that to generate PureScript `ToData`/`FromData` instances which are compatible with the Haskell instances. + +Users should not ordinarily have to write `HasConstrIndices` instances by hand, and ought to employ the template haskell hooks to generate these instances if possible. + + +## Template Haskell machinery + +The `PlutusTx.Aux` module contains several template Haskell functions which can generate `HasConstrIndices` instances. Most users will simply use `PlutusTx.Aux.unstableMakeIsData` or `PlutusTx.Aux.makeIsDataIndexed`. Each of these functions generates the same Haskell `ToData`/`FromData` instances as the Plutus `unstableMakeIsData`/`makeIsDataIndexed` functions, but also generates a Haskell `HasConstrIndices` instance which can be used to generate compatible PureScript `ToData`/`FromData` instances. + +## `mkSumTypeIndexed` & friends + +Once a Haskell `HasConstrIndices` instance has been provided for a type (again, typically through the template haskell functions), you can use `mkSumTypeIndexed` to produce a `SumType Haskell` which will generate a corresponding _PureScript_ `HasConstrIndices` class when writing the bridge. (The PureScript `HasConstrIndices` class is defined in the `ConstrIndices` module of the [cardano-transaction-lib](https://github.com/Plutonomicon/cardano-transaction-lib/) library.) + +A type with a PureScript `HasConstrIndices` instance can (provided it is otherwise suitable, i.e., does not contain functions/etc) make use of `genericToData` and `genericFromData` from the `cardano-transaction-lib` library. See the `ToData` and `FromData` modules in that library for more details. + +In cases where you are _certain_ that the index information for a type will never change (perhaps because it is a simple newtpe wrapper), or where you are _certain_ that the constructor indices will always conform with the "natural" order, you may use `extremelyUnsafeMkSumType` instead. This is provided as a convenience however, and its use is discouraged. + +## A Plutus.V1.Ledger Type Package + +Because almost anyone using this library will probably want PureScript versions of those `Plutus.V1.Ledger.X` types that have `Lift`/`ToData`/`FromData` instances, functions for generating those types are provided in this project's `PlutusTx.LedgerTypes` module. + +If you want to generate _only_ the Ledger types (and not generate PureScript versions of your own Haskell types), use `writeLedgerTypes :: FilePath -> IO ()`. The Sample directory in this project's root folder provides an example of the output of that function. + +If you wish to generate both PureScript versions of the Ledger types _and_ some of your own Haskell types, use the function `writerLedgerTypesAnd :: FilePath -> [SumType 'Haskell] -> IO ()`. + +## Examples + +The `PlutusTx.LedgerTypes` and `PlutusTx.ConstrIndices` modules should provide sufficient examples of how all of this works together. If you remain confused, please open an issue and I will attempt to clear up the confusion. + + +# Old Readme Translate your Haskell types to PureScript types. It should in theory work for almost all Haskell types, including type constructors! You just have to instantiate it with dummy parameters from e.g. "Language.PureScript.Bridge.TypeParameters". diff --git a/Sample/Plutus/V1/Ledger/Ada.purs b/Sample/Plutus/V1/Ledger/Ada.purs new file mode 100644 index 00000000..a5f8f359 --- /dev/null +++ b/Sample/Plutus/V1/Ledger/Ada.purs @@ -0,0 +1,29 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Ada where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(Proxy)) + +newtype Ada = Lovelace { getLovelace :: BigInt } + +derive instance Generic Ada _ + +derive instance Newtype Ada _ + +instance HasConstrIndices Ada where + constrIndices _ = fromConstr2Index [Tuple "Lovelace" 0] + +-------------------------------------------------------------------------------- + +_Lovelace :: Iso' Ada {getLovelace :: BigInt} +_Lovelace = _Newtype diff --git a/Sample/Plutus/V1/Ledger/Address.purs b/Sample/Plutus/V1/Ledger/Address.purs new file mode 100644 index 00000000..6223f959 --- /dev/null +++ b/Sample/Plutus/V1/Ledger/Address.purs @@ -0,0 +1,32 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Address where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Plutus.V1.Ledger.Credential (Credential, StakingCredential) +import Type.Proxy (Proxy(Proxy)) + +newtype Address = Address + { addressCredential :: Credential + , addressStakingCredential :: Maybe StakingCredential + } + +derive instance Generic Address _ + +derive instance Newtype Address _ + +instance HasConstrIndices Address where + constrIndices _ = fromConstr2Index [Tuple "Address" 0] + +-------------------------------------------------------------------------------- + +_Address :: Iso' Address {addressCredential :: Credential, addressStakingCredential :: Maybe StakingCredential} +_Address = _Newtype diff --git a/Sample/Plutus/V1/Ledger/Bytes.purs b/Sample/Plutus/V1/Ledger/Bytes.purs new file mode 100644 index 00000000..6f4987bf --- /dev/null +++ b/Sample/Plutus/V1/Ledger/Bytes.purs @@ -0,0 +1,29 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Bytes where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(Proxy)) +import Types.ByteArray (ByteArray) + +newtype LedgerBytes = LedgerBytes { getLedgerBytes :: ByteArray } + +derive instance Generic LedgerBytes _ + +derive instance Newtype LedgerBytes _ + +instance HasConstrIndices LedgerBytes where + constrIndices _ = fromConstr2Index [Tuple "LedgerBytes" 0] + +-------------------------------------------------------------------------------- + +_LedgerBytes :: Iso' LedgerBytes {getLedgerBytes :: ByteArray} +_LedgerBytes = _Newtype diff --git a/Sample/Plutus/V1/Ledger/Contexts.purs b/Sample/Plutus/V1/Ledger/Contexts.purs new file mode 100644 index 00000000..5e19fc59 --- /dev/null +++ b/Sample/Plutus/V1/Ledger/Contexts.purs @@ -0,0 +1,122 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Contexts where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Plutus.V1.Ledger.Credential (StakingCredential) +import Plutus.V1.Ledger.Crypto (PubKeyHash) +import Plutus.V1.Ledger.DCert (DCert) +import Plutus.V1.Ledger.Interval (Interval) +import Plutus.V1.Ledger.Scripts (Datum, DatumHash) +import Plutus.V1.Ledger.Time (POSIXTime) +import Plutus.V1.Ledger.Tx (TxOut, TxOutRef) +import Plutus.V1.Ledger.TxId (TxId) +import Plutus.V1.Ledger.Value (CurrencySymbol, Value) +import Type.Proxy (Proxy(Proxy)) + +newtype TxInfo = TxInfo + { txInfoInputs :: Array TxInInfo + , txInfoOutputs :: Array TxOut + , txInfoFee :: Value + , txInfoMint :: Value + , txInfoDCert :: Array DCert + , txInfoWdrl :: Array (Tuple StakingCredential BigInt) + , txInfoValidRange :: Interval POSIXTime + , txInfoSignatories :: Array PubKeyHash + , txInfoData :: Array (Tuple DatumHash Datum) + , txInfoId :: TxId + } + +derive instance Generic TxInfo _ + +derive instance Newtype TxInfo _ + +instance HasConstrIndices TxInfo where + constrIndices _ = fromConstr2Index [Tuple "TxInfo" 0] + +-------------------------------------------------------------------------------- + +_TxInfo :: Iso' TxInfo {txInfoInputs :: Array TxInInfo, txInfoOutputs :: Array TxOut, txInfoFee :: Value, txInfoMint :: Value, txInfoDCert :: Array DCert, txInfoWdrl :: Array (Tuple StakingCredential BigInt), txInfoValidRange :: Interval POSIXTime, txInfoSignatories :: Array PubKeyHash, txInfoData :: Array (Tuple DatumHash Datum), txInfoId :: TxId} +_TxInfo = _Newtype + +-------------------------------------------------------------------------------- + +newtype TxInInfo = TxInInfo + { txInInfoOutRef :: TxOutRef + , txInInfoResolved :: TxOut + } + +derive instance Generic TxInInfo _ + +derive instance Newtype TxInInfo _ + +instance HasConstrIndices TxInInfo where + constrIndices _ = fromConstr2Index [Tuple "TxInInfo" 0] + +-------------------------------------------------------------------------------- + +_TxInInfo :: Iso' TxInInfo {txInInfoOutRef :: TxOutRef, txInInfoResolved :: TxOut} +_TxInInfo = _Newtype + +-------------------------------------------------------------------------------- + +newtype ScriptContext = ScriptContext + { scriptContextTxInfo :: TxInfo + , scriptContextPurpose :: ScriptPurpose + } + +derive instance Generic ScriptContext _ + +derive instance Newtype ScriptContext _ + +instance HasConstrIndices ScriptContext where + constrIndices _ = fromConstr2Index [Tuple "ScriptContext" 0] + +-------------------------------------------------------------------------------- + +_ScriptContext :: Iso' ScriptContext {scriptContextTxInfo :: TxInfo, scriptContextPurpose :: ScriptPurpose} +_ScriptContext = _Newtype + +-------------------------------------------------------------------------------- + +data ScriptPurpose + = Minting CurrencySymbol + | Spending TxOutRef + | Rewarding StakingCredential + | Certifying DCert + +derive instance Generic ScriptPurpose _ + +instance HasConstrIndices ScriptPurpose where + constrIndices _ = fromConstr2Index [Tuple "Minting" 0,Tuple "Spending" 1,Tuple "Rewarding" 2,Tuple "Certifying" 3] + +-------------------------------------------------------------------------------- + +_Minting :: Prism' ScriptPurpose CurrencySymbol +_Minting = prism' Minting case _ of + (Minting a) -> Just a + _ -> Nothing + +_Spending :: Prism' ScriptPurpose TxOutRef +_Spending = prism' Spending case _ of + (Spending a) -> Just a + _ -> Nothing + +_Rewarding :: Prism' ScriptPurpose StakingCredential +_Rewarding = prism' Rewarding case _ of + (Rewarding a) -> Just a + _ -> Nothing + +_Certifying :: Prism' ScriptPurpose DCert +_Certifying = prism' Certifying case _ of + (Certifying a) -> Just a + _ -> Nothing diff --git a/Sample/Plutus/V1/Ledger/Credential.purs b/Sample/Plutus/V1/Ledger/Credential.purs new file mode 100644 index 00000000..cb4ef042 --- /dev/null +++ b/Sample/Plutus/V1/Ledger/Credential.purs @@ -0,0 +1,60 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Credential where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Tuple (Tuple(..)) +import Plutus.V1.Ledger.Crypto (PubKeyHash) +import Plutus.V1.Ledger.Scripts (ValidatorHash) +import Type.Proxy (Proxy(Proxy)) + +data StakingCredential + = StakingHash Credential + | StakingPtr BigInt BigInt BigInt + +derive instance Generic StakingCredential _ + +instance HasConstrIndices StakingCredential where + constrIndices _ = fromConstr2Index [Tuple "StakingHash" 0,Tuple "StakingPtr" 1] + +-------------------------------------------------------------------------------- + +_StakingHash :: Prism' StakingCredential Credential +_StakingHash = prism' StakingHash case _ of + (StakingHash a) -> Just a + _ -> Nothing + +_StakingPtr :: Prism' StakingCredential {a :: BigInt, b :: BigInt, c :: BigInt} +_StakingPtr = prism' (\{a, b, c} -> (StakingPtr a b c)) case _ of + (StakingPtr a b c) -> Just {a, b, c} + _ -> Nothing + +-------------------------------------------------------------------------------- + +data Credential + = PubKeyCredential PubKeyHash + | ScriptCredential ValidatorHash + +derive instance Generic Credential _ + +instance HasConstrIndices Credential where + constrIndices _ = fromConstr2Index [Tuple "PubKeyCredential" 0,Tuple "ScriptCredential" 1] + +-------------------------------------------------------------------------------- + +_PubKeyCredential :: Prism' Credential PubKeyHash +_PubKeyCredential = prism' PubKeyCredential case _ of + (PubKeyCredential a) -> Just a + _ -> Nothing + +_ScriptCredential :: Prism' Credential ValidatorHash +_ScriptCredential = prism' ScriptCredential case _ of + (ScriptCredential a) -> Just a + _ -> Nothing diff --git a/Sample/Plutus/V1/Ledger/Crypto.purs b/Sample/Plutus/V1/Ledger/Crypto.purs new file mode 100644 index 00000000..a0958fb3 --- /dev/null +++ b/Sample/Plutus/V1/Ledger/Crypto.purs @@ -0,0 +1,78 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Crypto where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Plutus.V1.Ledger.Bytes (LedgerBytes) +import Type.Proxy (Proxy(Proxy)) +import Types.ByteArray (ByteArray) + +newtype PubKey = PubKey { getPubKey :: LedgerBytes } + +derive instance Generic PubKey _ + +derive instance Newtype PubKey _ + +instance HasConstrIndices PubKey where + constrIndices _ = fromConstr2Index [Tuple "PubKey" 0] + +-------------------------------------------------------------------------------- + +_PubKey :: Iso' PubKey {getPubKey :: LedgerBytes} +_PubKey = _Newtype + +-------------------------------------------------------------------------------- + +newtype PubKeyHash = PubKeyHash { getPubKeyHash :: ByteArray } + +derive instance Generic PubKeyHash _ + +derive instance Newtype PubKeyHash _ + +instance HasConstrIndices PubKeyHash where + constrIndices _ = fromConstr2Index [Tuple "PubKeyHash" 0] + +-------------------------------------------------------------------------------- + +_PubKeyHash :: Iso' PubKeyHash {getPubKeyHash :: ByteArray} +_PubKeyHash = _Newtype + +-------------------------------------------------------------------------------- + +newtype PrivateKey = PrivateKey { getPrivateKey :: LedgerBytes } + +derive instance Generic PrivateKey _ + +derive instance Newtype PrivateKey _ + +instance HasConstrIndices PrivateKey where + constrIndices _ = fromConstr2Index [Tuple "PrivateKey" 0] + +-------------------------------------------------------------------------------- + +_PrivateKey :: Iso' PrivateKey {getPrivateKey :: LedgerBytes} +_PrivateKey = _Newtype + +-------------------------------------------------------------------------------- + +newtype Signature = Signature { getSignature :: ByteArray } + +derive instance Generic Signature _ + +derive instance Newtype Signature _ + +instance HasConstrIndices Signature where + constrIndices _ = fromConstr2Index [Tuple "Signature" 0] + +-------------------------------------------------------------------------------- + +_Signature :: Iso' Signature {getSignature :: ByteArray} +_Signature = _Newtype diff --git a/Sample/Plutus/V1/Ledger/DCert.purs b/Sample/Plutus/V1/Ledger/DCert.purs new file mode 100644 index 00000000..bde122df --- /dev/null +++ b/Sample/Plutus/V1/Ledger/DCert.purs @@ -0,0 +1,67 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.DCert where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Tuple (Tuple(..)) +import Plutus.V1.Ledger.Credential (StakingCredential) +import Plutus.V1.Ledger.Crypto (PubKeyHash) +import Type.Proxy (Proxy(Proxy)) + +data DCert + = DCertDelegRegKey StakingCredential + | DCertDelegDeRegKey StakingCredential + | DCertDelegDelegate StakingCredential PubKeyHash + | DCertPoolRegister PubKeyHash PubKeyHash + | DCertPoolRetire PubKeyHash BigInt + | DCertGenesis + | DCertMir + +derive instance Generic DCert _ + +instance HasConstrIndices DCert where + constrIndices _ = fromConstr2Index [Tuple "DCertDelegRegKey" 0,Tuple "DCertDelegDeRegKey" 1,Tuple "DCertDelegDelegate" 2,Tuple "DCertPoolRegister" 3,Tuple "DCertPoolRetire" 4,Tuple "DCertGenesis" 5,Tuple "DCertMir" 6] + +-------------------------------------------------------------------------------- + +_DCertDelegRegKey :: Prism' DCert StakingCredential +_DCertDelegRegKey = prism' DCertDelegRegKey case _ of + (DCertDelegRegKey a) -> Just a + _ -> Nothing + +_DCertDelegDeRegKey :: Prism' DCert StakingCredential +_DCertDelegDeRegKey = prism' DCertDelegDeRegKey case _ of + (DCertDelegDeRegKey a) -> Just a + _ -> Nothing + +_DCertDelegDelegate :: Prism' DCert {a :: StakingCredential, b :: PubKeyHash} +_DCertDelegDelegate = prism' (\{a, b} -> (DCertDelegDelegate a b)) case _ of + (DCertDelegDelegate a b) -> Just {a, b} + _ -> Nothing + +_DCertPoolRegister :: Prism' DCert {a :: PubKeyHash, b :: PubKeyHash} +_DCertPoolRegister = prism' (\{a, b} -> (DCertPoolRegister a b)) case _ of + (DCertPoolRegister a b) -> Just {a, b} + _ -> Nothing + +_DCertPoolRetire :: Prism' DCert {a :: PubKeyHash, b :: BigInt} +_DCertPoolRetire = prism' (\{a, b} -> (DCertPoolRetire a b)) case _ of + (DCertPoolRetire a b) -> Just {a, b} + _ -> Nothing + +_DCertGenesis :: Prism' DCert Unit +_DCertGenesis = prism' (const DCertGenesis) case _ of + DCertGenesis -> Just unit + _ -> Nothing + +_DCertMir :: Prism' DCert Unit +_DCertMir = prism' (const DCertMir) case _ of + DCertMir -> Just unit + _ -> Nothing diff --git a/Sample/Plutus/V1/Ledger/Interval.purs b/Sample/Plutus/V1/Ledger/Interval.purs new file mode 100644 index 00000000..5f3d4c85 --- /dev/null +++ b/Sample/Plutus/V1/Ledger/Interval.purs @@ -0,0 +1,88 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Interval where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(Proxy)) + +newtype Interval a = Interval + { ivFrom :: LowerBound a + , ivTo :: UpperBound a + } + +derive instance Generic (Interval a) _ + +derive instance Newtype (Interval a) _ + +instance HasConstrIndices (Interval a) where + constrIndices _ = fromConstr2Index [Tuple "Interval" 0] + +-------------------------------------------------------------------------------- + +_Interval :: forall a. Iso' (Interval a) {ivFrom :: LowerBound a, ivTo :: UpperBound a} +_Interval = _Newtype + +-------------------------------------------------------------------------------- + +data LowerBound a = LowerBound (Extended a) Boolean + +derive instance Generic (LowerBound a) _ + +instance HasConstrIndices (LowerBound a) where + constrIndices _ = fromConstr2Index [Tuple "LowerBound" 0] + +-------------------------------------------------------------------------------- + +_LowerBound :: forall a. Iso' (LowerBound a) {a :: Extended a, b :: Boolean} +_LowerBound = iso (\(LowerBound a b) -> {a, b}) (\{a, b} -> (LowerBound a b)) + +-------------------------------------------------------------------------------- + +data UpperBound a = UpperBound (Extended a) Boolean + +derive instance Generic (UpperBound a) _ + +instance HasConstrIndices (UpperBound a) where + constrIndices _ = fromConstr2Index [Tuple "UpperBound" 0] + +-------------------------------------------------------------------------------- + +_UpperBound :: forall a. Iso' (UpperBound a) {a :: Extended a, b :: Boolean} +_UpperBound = iso (\(UpperBound a b) -> {a, b}) (\{a, b} -> (UpperBound a b)) + +-------------------------------------------------------------------------------- + +data Extended a + = NegInf + | Finite a + | PosInf + +derive instance Generic (Extended a) _ + +instance HasConstrIndices (Extended a) where + constrIndices _ = fromConstr2Index [Tuple "NegInf" 0,Tuple "Finite" 1,Tuple "PosInf" 2] + +-------------------------------------------------------------------------------- + +_NegInf :: forall a. Prism' (Extended a) Unit +_NegInf = prism' (const NegInf) case _ of + NegInf -> Just unit + _ -> Nothing + +_Finite :: forall a. Prism' (Extended a) a +_Finite = prism' Finite case _ of + (Finite a) -> Just a + _ -> Nothing + +_PosInf :: forall a. Prism' (Extended a) Unit +_PosInf = prism' (const PosInf) case _ of + PosInf -> Just unit + _ -> Nothing diff --git a/Sample/Plutus/V1/Ledger/Scripts.purs b/Sample/Plutus/V1/Ledger/Scripts.purs new file mode 100644 index 00000000..6f85ebb7 --- /dev/null +++ b/Sample/Plutus/V1/Ledger/Scripts.purs @@ -0,0 +1,126 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Scripts where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import PlutusTx.Builtins.Internal (BuiltinData) +import Type.Proxy (Proxy(Proxy)) +import Types.ByteArray (ByteArray) + +newtype Redeemer = Redeemer { getRedeemer :: BuiltinData } + +derive instance Generic Redeemer _ + +derive instance Newtype Redeemer _ + +instance HasConstrIndices Redeemer where + constrIndices _ = fromConstr2Index [Tuple "Redeemer" 0] + +-------------------------------------------------------------------------------- + +_Redeemer :: Iso' Redeemer {getRedeemer :: BuiltinData} +_Redeemer = _Newtype + +-------------------------------------------------------------------------------- + +newtype Datum = Datum { getDatum :: BuiltinData } + +derive instance Generic Datum _ + +derive instance Newtype Datum _ + +instance HasConstrIndices Datum where + constrIndices _ = fromConstr2Index [Tuple "Datum" 0] + +-------------------------------------------------------------------------------- + +_Datum :: Iso' Datum {getDatum :: BuiltinData} +_Datum = _Newtype + +-------------------------------------------------------------------------------- + +newtype ScriptHash = ScriptHash { getScriptHash :: ByteArray } + +derive instance Generic ScriptHash _ + +derive instance Newtype ScriptHash _ + +instance HasConstrIndices ScriptHash where + constrIndices _ = fromConstr2Index [Tuple "ScriptHash" 0] + +-------------------------------------------------------------------------------- + +_ScriptHash :: Iso' ScriptHash {getScriptHash :: ByteArray} +_ScriptHash = _Newtype + +-------------------------------------------------------------------------------- + +newtype ValidatorHash = ValidatorHash ByteArray + +derive instance Generic ValidatorHash _ + +derive instance Newtype ValidatorHash _ + +instance HasConstrIndices ValidatorHash where + constrIndices _ = fromConstr2Index [Tuple "ValidatorHash" 0] + +-------------------------------------------------------------------------------- + +_ValidatorHash :: Iso' ValidatorHash ByteArray +_ValidatorHash = _Newtype + +-------------------------------------------------------------------------------- + +newtype DatumHash = DatumHash ByteArray + +derive instance Generic DatumHash _ + +derive instance Newtype DatumHash _ + +instance HasConstrIndices DatumHash where + constrIndices _ = fromConstr2Index [Tuple "DatumHash" 0] + +-------------------------------------------------------------------------------- + +_DatumHash :: Iso' DatumHash ByteArray +_DatumHash = _Newtype + +-------------------------------------------------------------------------------- + +newtype MintingPolicyHash = MintingPolicyHash ByteArray + +derive instance Generic MintingPolicyHash _ + +derive instance Newtype MintingPolicyHash _ + +instance HasConstrIndices MintingPolicyHash where + constrIndices _ = fromConstr2Index [Tuple "MintingPolicyHash" 0] + +-------------------------------------------------------------------------------- + +_MintingPolicyHash :: Iso' MintingPolicyHash ByteArray +_MintingPolicyHash = _Newtype + +-------------------------------------------------------------------------------- + +newtype StakeValidatorHash = StakeValidatorHash ByteArray + +derive instance Generic StakeValidatorHash _ + +derive instance Newtype StakeValidatorHash _ + +instance HasConstrIndices StakeValidatorHash where + constrIndices _ = fromConstr2Index [Tuple "StakeValidatorHash" 0] + +-------------------------------------------------------------------------------- + +_StakeValidatorHash :: Iso' StakeValidatorHash ByteArray +_StakeValidatorHash = _Newtype diff --git a/Sample/Plutus/V1/Ledger/Slot.purs b/Sample/Plutus/V1/Ledger/Slot.purs new file mode 100644 index 00000000..1e6c01e8 --- /dev/null +++ b/Sample/Plutus/V1/Ledger/Slot.purs @@ -0,0 +1,29 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Slot where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(Proxy)) + +newtype Slot = Slot { getSlot :: BigInt } + +derive instance Generic Slot _ + +derive instance Newtype Slot _ + +instance HasConstrIndices Slot where + constrIndices _ = fromConstr2Index [Tuple "Slot" 0] + +-------------------------------------------------------------------------------- + +_Slot :: Iso' Slot {getSlot :: BigInt} +_Slot = _Newtype diff --git a/Sample/Plutus/V1/Ledger/Time.purs b/Sample/Plutus/V1/Ledger/Time.purs new file mode 100644 index 00000000..7fbef027 --- /dev/null +++ b/Sample/Plutus/V1/Ledger/Time.purs @@ -0,0 +1,45 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Time where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(Proxy)) + +newtype DiffMilliSeconds = DiffMilliSeconds BigInt + +derive instance Generic DiffMilliSeconds _ + +derive instance Newtype DiffMilliSeconds _ + +instance HasConstrIndices DiffMilliSeconds where + constrIndices _ = fromConstr2Index [Tuple "DiffMilliSeconds" 0] + +-------------------------------------------------------------------------------- + +_DiffMilliSeconds :: Iso' DiffMilliSeconds BigInt +_DiffMilliSeconds = _Newtype + +-------------------------------------------------------------------------------- + +newtype POSIXTime = POSIXTime { getPOSIXTime :: BigInt } + +derive instance Generic POSIXTime _ + +derive instance Newtype POSIXTime _ + +instance HasConstrIndices POSIXTime where + constrIndices _ = fromConstr2Index [Tuple "POSIXTime" 0] + +-------------------------------------------------------------------------------- + +_POSIXTime :: Iso' POSIXTime {getPOSIXTime :: BigInt} +_POSIXTime = _Newtype diff --git a/Sample/Plutus/V1/Ledger/Tx.purs b/Sample/Plutus/V1/Ledger/Tx.purs new file mode 100644 index 00000000..9105eff0 --- /dev/null +++ b/Sample/Plutus/V1/Ledger/Tx.purs @@ -0,0 +1,56 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Tx where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Plutus.V1.Ledger.Address (Address) +import Plutus.V1.Ledger.Scripts (DatumHash) +import Plutus.V1.Ledger.TxId (TxId) +import Plutus.V1.Ledger.Value (Value) +import Type.Proxy (Proxy(Proxy)) + +newtype TxOut = TxOut + { txOutAddress :: Address + , txOutValue :: Value + , txOutDatumHash :: Maybe DatumHash + } + +derive instance Generic TxOut _ + +derive instance Newtype TxOut _ + +instance HasConstrIndices TxOut where + constrIndices _ = fromConstr2Index [Tuple "TxOut" 0] + +-------------------------------------------------------------------------------- + +_TxOut :: Iso' TxOut {txOutAddress :: Address, txOutValue :: Value, txOutDatumHash :: Maybe DatumHash} +_TxOut = _Newtype + +-------------------------------------------------------------------------------- + +newtype TxOutRef = TxOutRef + { txOutRefId :: TxId + , txOutRefIdx :: BigInt + } + +derive instance Generic TxOutRef _ + +derive instance Newtype TxOutRef _ + +instance HasConstrIndices TxOutRef where + constrIndices _ = fromConstr2Index [Tuple "TxOutRef" 0] + +-------------------------------------------------------------------------------- + +_TxOutRef :: Iso' TxOutRef {txOutRefId :: TxId, txOutRefIdx :: BigInt} +_TxOutRef = _Newtype diff --git a/Sample/Plutus/V1/Ledger/TxId.purs b/Sample/Plutus/V1/Ledger/TxId.purs new file mode 100644 index 00000000..f53a8973 --- /dev/null +++ b/Sample/Plutus/V1/Ledger/TxId.purs @@ -0,0 +1,29 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.TxId where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(Proxy)) +import Types.ByteArray (ByteArray) + +newtype TxId = TxId { getTxId :: ByteArray } + +derive instance Generic TxId _ + +derive instance Newtype TxId _ + +instance HasConstrIndices TxId where + constrIndices _ = fromConstr2Index [Tuple "TxId" 0] + +-------------------------------------------------------------------------------- + +_TxId :: Iso' TxId {getTxId :: ByteArray} +_TxId = _Newtype diff --git a/Sample/Plutus/V1/Ledger/Value.purs b/Sample/Plutus/V1/Ledger/Value.purs new file mode 100644 index 00000000..6361239a --- /dev/null +++ b/Sample/Plutus/V1/Ledger/Value.purs @@ -0,0 +1,79 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Value where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import PlutusTx.AssocMap (Map) +import Type.Proxy (Proxy(Proxy)) +import Types.ByteArray (ByteArray) + +newtype Value = Value { getValue :: Map CurrencySymbol (Map TokenName BigInt) } + +derive instance Generic Value _ + +derive instance Newtype Value _ + +instance HasConstrIndices Value where + constrIndices _ = fromConstr2Index [Tuple "Value" 0] + +-------------------------------------------------------------------------------- + +_Value :: Iso' Value {getValue :: Map CurrencySymbol (Map TokenName BigInt)} +_Value = _Newtype + +-------------------------------------------------------------------------------- + +newtype CurrencySymbol = CurrencySymbol { unCurrencySymbol :: ByteArray } + +derive instance Generic CurrencySymbol _ + +derive instance Newtype CurrencySymbol _ + +instance HasConstrIndices CurrencySymbol where + constrIndices _ = fromConstr2Index [Tuple "CurrencySymbol" 0] + +-------------------------------------------------------------------------------- + +_CurrencySymbol :: Iso' CurrencySymbol {unCurrencySymbol :: ByteArray} +_CurrencySymbol = _Newtype + +-------------------------------------------------------------------------------- + +newtype AssetClass = AssetClass { unAssetClass :: Tuple CurrencySymbol TokenName } + +derive instance Generic AssetClass _ + +derive instance Newtype AssetClass _ + +instance HasConstrIndices AssetClass where + constrIndices _ = fromConstr2Index [Tuple "AssetClass" 0] + +-------------------------------------------------------------------------------- + +_AssetClass :: Iso' AssetClass {unAssetClass :: Tuple CurrencySymbol TokenName} +_AssetClass = _Newtype + +-------------------------------------------------------------------------------- + +newtype TokenName = TokenName { unTokenName :: ByteArray } + +derive instance Generic TokenName _ + +derive instance Newtype TokenName _ + +instance HasConstrIndices TokenName where + constrIndices _ = fromConstr2Index [Tuple "TokenName" 0] + +-------------------------------------------------------------------------------- + +_TokenName :: Iso' TokenName {unTokenName :: ByteArray} +_TokenName = _Newtype diff --git a/cabal.project b/cabal.project new file mode 100644 index 00000000..94a93f52 --- /dev/null +++ b/cabal.project @@ -0,0 +1,8 @@ +-- Keep the index-state in tune with bot-plutus-interface +index-state: 2022-01-22T00:00:00Z + +packages: ./*.cabal + +--tests: true + +write-ghc-environment-files: never diff --git a/flake.lock b/flake.lock index 88ad8b1f..92ec9424 100644 --- a/flake.lock +++ b/flake.lock @@ -16,6 +16,84 @@ "type": "github" } }, + "HTTP_2": { + "flake": false, + "locked": { + "lastModified": 1451647621, + "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", + "owner": "phadej", + "repo": "HTTP", + "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "type": "github" + }, + "original": { + "owner": "phadej", + "repo": "HTTP", + "type": "github" + } + }, + "Win32-network": { + "flake": false, + "locked": { + "lastModified": 1627315969, + "narHash": "sha256-Hesb5GXSx0IwKSIi42ofisVELcQNX6lwHcoZcbaDiqc=", + "owner": "input-output-hk", + "repo": "Win32-network", + "rev": "3825d3abf75f83f406c1f7161883c438dac7277d", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "Win32-network", + "rev": "3825d3abf75f83f406c1f7161883c438dac7277d", + "type": "github" + } + }, + "bot-plutus-interface": { + "inputs": { + "Win32-network": "Win32-network", + "cardano-addresses": "cardano-addresses", + "cardano-base": "cardano-base", + "cardano-config": "cardano-config", + "cardano-crypto": "cardano-crypto", + "cardano-ledger": "cardano-ledger", + "cardano-node": "cardano-node", + "cardano-prelude": "cardano-prelude", + "cardano-wallet": "cardano-wallet", + "flake-compat": "flake-compat", + "flat": "flat", + "goblins": "goblins", + "haskell-nix": "haskell-nix", + "iohk-monitoring-framework": "iohk-monitoring-framework", + "iohk-nix": "iohk-nix", + "nixpkgs": [ + "plutip", + "bot-plutus-interface", + "haskell-nix", + "nixpkgs-unstable" + ], + "optparse-applicative": "optparse-applicative", + "ouroboros-network": "ouroboros-network", + "plutus": "plutus", + "plutus-apps": "plutus-apps", + "purescript-bridge": "purescript-bridge", + "servant-purescript": "servant-purescript" + }, + "locked": { + "lastModified": 1645658503, + "narHash": "sha256-mduSwSnHJSE0P6NF9NDtSdIz8WtniLRW5S88NPBVs7o=", + "owner": "mlabs-haskell", + "repo": "bot-plutus-interface", + "rev": "ca7d096a200a33312484356d9e47e73e1466ce13", + "type": "github" + }, + "original": { + "owner": "mlabs-haskell", + "repo": "bot-plutus-interface", + "rev": "ca7d096a200a33312484356d9e47e73e1466ce13", + "type": "github" + } + }, "cabal-32": { "flake": false, "locked": { @@ -33,6 +111,23 @@ "type": "github" } }, + "cabal-32_2": { + "flake": false, + "locked": { + "lastModified": 1603716527, + "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", + "owner": "haskell", + "repo": "cabal", + "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.2", + "repo": "cabal", + "type": "github" + } + }, "cabal-34": { "flake": false, "locked": { @@ -50,6 +145,171 @@ "type": "github" } }, + "cabal-34_2": { + "flake": false, + "locked": { + "lastModified": 1640353650, + "narHash": "sha256-N1t6M3/wqj90AEdRkeC8i923gQYUpzSr8b40qVOZ1Rk=", + "owner": "haskell", + "repo": "cabal", + "rev": "942639c18c0cd8ec53e0a6f8d120091af35312cd", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.4", + "repo": "cabal", + "type": "github" + } + }, + "cabal-36": { + "flake": false, + "locked": { + "lastModified": 1641652457, + "narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=", + "owner": "haskell", + "repo": "cabal", + "rev": "f27667f8ec360c475027dcaee0138c937477b070", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.6", + "repo": "cabal", + "type": "github" + } + }, + "cardano-addresses": { + "flake": false, + "locked": { + "lastModified": 1639584472, + "narHash": "sha256-Eyu7PVYk1oQLp/Hd43S2PW+PojyAT/Rr48Xng6sbtIU=", + "owner": "input-output-hk", + "repo": "cardano-addresses", + "rev": "71006f9eb956b0004022e80aadd4ad50d837b621", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-addresses", + "rev": "71006f9eb956b0004022e80aadd4ad50d837b621", + "type": "github" + } + }, + "cardano-base": { + "flake": false, + "locked": { + "lastModified": 1635841753, + "narHash": "sha256-OXKsJ1UTj5kJ9xaThM54ZmxFAiFINTPKd4JQa4dPmEU=", + "owner": "input-output-hk", + "repo": "cardano-base", + "rev": "41545ba3ac6b3095966316a99883d678b5ab8da8", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-base", + "rev": "41545ba3ac6b3095966316a99883d678b5ab8da8", + "type": "github" + } + }, + "cardano-config": { + "flake": false, + "locked": { + "lastModified": 1634339627, + "narHash": "sha256-jQbwcfNJ8am7Q3W+hmTFmyo3wp3QItquEH//klNiofI=", + "owner": "input-output-hk", + "repo": "cardano-config", + "rev": "e9de7a2cf70796f6ff26eac9f9540184ded0e4e6", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-config", + "rev": "e9de7a2cf70796f6ff26eac9f9540184ded0e4e6", + "type": "github" + } + }, + "cardano-crypto": { + "flake": false, + "locked": { + "lastModified": 1604244485, + "narHash": "sha256-2Fipex/WjIRMrvx6F3hjJoAeMtFd2wGnZECT0kuIB9k=", + "owner": "input-output-hk", + "repo": "cardano-crypto", + "rev": "f73079303f663e028288f9f4a9e08bcca39a923e", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-crypto", + "rev": "f73079303f663e028288f9f4a9e08bcca39a923e", + "type": "github" + } + }, + "cardano-ledger": { + "flake": false, + "locked": { + "lastModified": 1639498285, + "narHash": "sha256-lRNfkGMHnpPO0T19FZY5BnuRkr0zTRZIkxZVgHH0fys=", + "owner": "input-output-hk", + "repo": "cardano-ledger", + "rev": "1a9ec4ae9e0b09d54e49b2a40c4ead37edadcce5", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-ledger", + "rev": "1a9ec4ae9e0b09d54e49b2a40c4ead37edadcce5", + "type": "github" + } + }, + "cardano-node": { + "inputs": { + "customConfig": "customConfig", + "haskellNix": "haskellNix", + "iohkNix": "iohkNix", + "nixpkgs": [ + "plutip", + "bot-plutus-interface", + "cardano-node", + "haskellNix", + "nixpkgs-2105" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1640022647, + "narHash": "sha256-M+YnF7Zj/7QK2pu0T75xNVaX0eEeijtBH8yz+jEHIMM=", + "owner": "input-output-hk", + "repo": "cardano-node", + "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-node", + "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "type": "github" + } + }, + "cardano-prelude": { + "flake": false, + "locked": { + "lastModified": 1617089317, + "narHash": "sha256-kgX3DKyfjBb8/XcDEd+/adlETsFlp5sCSurHWgsFAQI=", + "owner": "input-output-hk", + "repo": "cardano-prelude", + "rev": "bb4ed71ba8e587f672d06edf9d2e376f4b055555", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-prelude", + "rev": "bb4ed71ba8e587f672d06edf9d2e376f4b055555", + "type": "github" + } + }, "cardano-shell": { "flake": false, "locked": { @@ -66,29 +326,93 @@ "type": "github" } }, - "easy-ps": { + "cardano-shell_2": { + "flake": false, + "locked": { + "lastModified": 1608537748, + "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", + "owner": "input-output-hk", + "repo": "cardano-shell", + "rev": "9392c75087cb9a3d453998f4230930dea3a95725", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-shell", + "type": "github" + } + }, + "cardano-wallet": { + "flake": false, + "locked": { + "lastModified": 1642494510, + "narHash": "sha256-A3im2IkoumUx3NzgPooaXGC18/iYxbEooMa9ho93/6o=", + "owner": "input-output-hk", + "repo": "cardano-wallet", + "rev": "a5085acbd2670c24251cf8d76a4e83c77a2679ba", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-wallet", + "rev": "a5085acbd2670c24251cf8d76a4e83c77a2679ba", + "type": "github" + } + }, + "customConfig": { + "locked": { + "lastModified": 1630400035, + "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", + "owner": "input-output-hk", + "repo": "empty-flake", + "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "empty-flake", + "type": "github" + } + }, + "flake-compat": { "flake": false, "locked": { - "lastModified": 1631961521, - "narHash": "sha256-1yPjUdOYzw1+UGFzBXbyZqEbsM6XZu/6+v8W35qFdLo=", - "owner": "justinwoo", - "repo": "easy-purescript-nix", - "rev": "d9a37c75ed361372e1545f6efbc08d819b3c28c8", + "lastModified": 1641205782, + "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", "type": "github" }, "original": { - "owner": "justinwoo", - "repo": "easy-purescript-nix", + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1641205782, + "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", "type": "github" } }, "flake-utils": { "locked": { - "lastModified": 1631561581, - "narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", "owner": "numtide", "repo": "flake-utils", - "rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", "type": "github" }, "original": { @@ -99,11 +423,11 @@ }, "flake-utils_2": { "locked": { - "lastModified": 1623875721, - "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", "owner": "numtide", "repo": "flake-utils", - "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", "type": "github" }, "original": { @@ -112,6 +436,23 @@ "type": "github" } }, + "flat": { + "flake": false, + "locked": { + "lastModified": 1628771504, + "narHash": "sha256-lRFND+ZnZvAph6ZYkr9wl9VAx41pb3uSFP8Wc7idP9M=", + "owner": "input-output-hk", + "repo": "flat", + "rev": "ee59880f47ab835dbd73bea0847dab7869fc20d8", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "flat", + "rev": "ee59880f47ab835dbd73bea0847dab7869fc20d8", + "type": "github" + } + }, "ghc-8.6.5-iohk": { "flake": false, "locked": { @@ -129,14 +470,64 @@ "type": "github" } }, + "ghc-8.6.5-iohk_2": { + "flake": false, + "locked": { + "lastModified": 1600920045, + "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", + "owner": "input-output-hk", + "repo": "ghc", + "rev": "95713a6ecce4551240da7c96b6176f980af75cae", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "ref": "release/8.6.5-iohk", + "repo": "ghc", + "type": "github" + } + }, + "goblins": { + "flake": false, + "locked": { + "lastModified": 1598362523, + "narHash": "sha256-z9ut0y6umDIjJIRjz9KSvKgotuw06/S8QDwOtVdGiJ0=", + "owner": "input-output-hk", + "repo": "goblins", + "rev": "cde90a2b27f79187ca8310b6549331e59595e7ba", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "goblins", + "rev": "cde90a2b27f79187ca8310b6549331e59595e7ba", + "type": "github" + } + }, "hackage": { "flake": false, "locked": { - "lastModified": 1633396333, - "narHash": "sha256-mq7OoYa7ODDoKzUxR8xuEtQ0F0LO9I5uZG9DTZY+A/U=", + "lastModified": 1639098768, + "narHash": "sha256-DZ4sG8FeDxWvBLixrj0jELXjtebZ0SCCPmQW43HNzIE=", + "owner": "input-output-hk", + "repo": "hackage.nix", + "rev": "c7b123af6b0b9b364cab03363504d42dca16a4b5", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "hackage.nix", + "type": "github" + } + }, + "hackage_2": { + "flake": false, + "locked": { + "lastModified": 1644887696, + "narHash": "sha256-o4gltv4npUl7+1gEQIcrRqZniwqC9kK8QsPaftlrawc=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "0b33cf7ca5f152a6b3acda375433a6bc86f8d3e7", + "rev": "6ff64aa49b88e75dd6e0bbd2823c2a92c9174fa5", "type": "github" }, "original": { @@ -145,34 +536,75 @@ "type": "github" } }, + "haskell-nix": { + "inputs": { + "HTTP": "HTTP_2", + "cabal-32": "cabal-32_2", + "cabal-34": "cabal-34_2", + "cabal-36": "cabal-36", + "cardano-shell": "cardano-shell_2", + "flake-utils": "flake-utils_2", + "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_2", + "hackage": "hackage_2", + "hpc-coveralls": "hpc-coveralls_2", + "nix-tools": "nix-tools_2", + "nixpkgs": [ + "plutip", + "bot-plutus-interface", + "haskell-nix", + "nixpkgs-unstable" + ], + "nixpkgs-2003": "nixpkgs-2003_2", + "nixpkgs-2105": "nixpkgs-2105_2", + "nixpkgs-2111": "nixpkgs-2111_2", + "nixpkgs-unstable": "nixpkgs-unstable_2", + "old-ghc-nix": "old-ghc-nix_2", + "stackage": "stackage_2" + }, + "locked": { + "lastModified": 1644944726, + "narHash": "sha256-jJWdP/3Ne1y1akC3m9rSO5ItRoBc4UTdVQZBCuPmmrM=", + "owner": "L-as", + "repo": "haskell.nix", + "rev": "45c583b5580c130487eb5a342679f0bdbc2b23fc", + "type": "github" + }, + "original": { + "owner": "L-as", + "repo": "haskell.nix", + "type": "github" + } + }, "haskellNix": { "inputs": { "HTTP": "HTTP", "cabal-32": "cabal-32", "cabal-34": "cabal-34", "cardano-shell": "cardano-shell", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", "hackage": "hackage", "hpc-coveralls": "hpc-coveralls", "nix-tools": "nix-tools", "nixpkgs": [ - "haskellNix", - "nixpkgs-2105" + "plutip", + "bot-plutus-interface", + "cardano-node", + "nixpkgs" ], "nixpkgs-2003": "nixpkgs-2003", - "nixpkgs-2009": "nixpkgs-2009", "nixpkgs-2105": "nixpkgs-2105", + "nixpkgs-2111": "nixpkgs-2111", "nixpkgs-unstable": "nixpkgs-unstable", "old-ghc-nix": "old-ghc-nix", "stackage": "stackage" }, "locked": { - "lastModified": 1633435111, - "narHash": "sha256-0wYA9+2BZXFGj241f4W66nbvP2s+bbikOa39CZQP05A=", + "lastModified": 1639098904, + "narHash": "sha256-7VrCNEaKGLm4pTOS11dt1dRL2033oqrNCfal0uONsqA=", "owner": "input-output-hk", "repo": "haskell.nix", - "rev": "56f22053e647efcad0b5ee9c32334d5d4214bcde", + "rev": "b18c6ce0867fee77f12ecf41dc6c67f7a59d9826", "type": "github" }, "original": { @@ -197,14 +629,102 @@ "type": "github" } }, + "hpc-coveralls_2": { + "flake": false, + "locked": { + "lastModified": 1607498076, + "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", + "type": "github" + }, + "original": { + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "type": "github" + } + }, + "iohk-monitoring-framework": { + "flake": false, + "locked": { + "lastModified": 1624367860, + "narHash": "sha256-QE3QRpIHIABm+qCP/wP4epbUx0JmSJ9BMePqWEd3iMY=", + "owner": "input-output-hk", + "repo": "iohk-monitoring-framework", + "rev": "46f994e216a1f8b36fe4669b47b2a7011b0e153c", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "iohk-monitoring-framework", + "rev": "46f994e216a1f8b36fe4669b47b2a7011b0e153c", + "type": "github" + } + }, + "iohk-nix": { + "flake": false, + "locked": { + "lastModified": 1643251385, + "narHash": "sha256-Czbd69lg0ARSZfC18V6h+gtPMioWDAEVPbiHgL2x9LM=", + "owner": "input-output-hk", + "repo": "iohk-nix", + "rev": "9d6ee3dcb3482f791e40ed991ad6fc649b343ad4", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "iohk-nix", + "type": "github" + } + }, + "iohkNix": { + "inputs": { + "nixpkgs": [ + "plutip", + "bot-plutus-interface", + "cardano-node", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1633964277, + "narHash": "sha256-7G/BK514WiMRr90EswNBthe8SmH9tjPaTBba/RW/VA8=", + "owner": "input-output-hk", + "repo": "iohk-nix", + "rev": "1e51437aac8a0e49663cb21e781f34163c81ebfb", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "iohk-nix", + "type": "github" + } + }, "nix-tools": { "flake": false, "locked": { - "lastModified": 1627889534, - "narHash": "sha256-9eEbK2nrRp6rYGQoBv6LO9IA/ANZpofwAkxMuGBD45Y=", + "lastModified": 1636018067, + "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", "owner": "input-output-hk", "repo": "nix-tools", - "rev": "15d2e4b61cb63ff351f3c490c12c4d89eafd31a1", + "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "nix-tools", + "type": "github" + } + }, + "nix-tools_2": { + "flake": false, + "locked": { + "lastModified": 1644395812, + "narHash": "sha256-BVFk/BEsTLq5MMZvdy3ZYHKfaS3dHrsKh4+tb5t5b58=", + "owner": "input-output-hk", + "repo": "nix-tools", + "rev": "d847c63b99bbec78bf83be2a61dc9f09b8a9ccc1", "type": "github" }, "original": { @@ -229,18 +749,18 @@ "type": "github" } }, - "nixpkgs-2009": { + "nixpkgs-2003_2": { "locked": { - "lastModified": 1624271064, - "narHash": "sha256-qns/uRW7MR2EfVf6VEeLgCsCp7pIOjDeR44JzTF09MA=", + "lastModified": 1620055814, + "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "46d1c3f28ca991601a53e9a14fdd53fcd3dd8416", + "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-20.09-darwin", + "ref": "nixpkgs-20.03-darwin", "repo": "nixpkgs", "type": "github" } @@ -261,13 +781,77 @@ "type": "github" } }, + "nixpkgs-2105_2": { + "locked": { + "lastModified": 1642244250, + "narHash": "sha256-vWpUEqQdVP4srj+/YLJRTN9vjpTs4je0cdWKXPbDItc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0fd9ee1aa36ce865ad273f4f07fdc093adeb5c00", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2111": { + "locked": { + "lastModified": 1638410074, + "narHash": "sha256-MQYI4k4XkoTzpeRjq5wl+1NShsl1CKq8MISFuZ81sWs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5b80f23502f8e902612a8c631dfce383e1c56596", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2111_2": { + "locked": { + "lastModified": 1644510859, + "narHash": "sha256-xjpVvL5ecbyi0vxtVl/Fh9bwGlMbw3S06zE5nUzFB8A=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0d1d5d7e3679fec9d07f2eb804d9f9fdb98378d3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-unstable": { "locked": { - "lastModified": 1628785280, - "narHash": "sha256-2B5eMrEr6O8ff2aQNeVxTB+9WrGE80OB4+oM6T7fOcc=", + "lastModified": 1635295995, + "narHash": "sha256-sGYiXjFlxTTMNb4NSkgvX+knOOTipE6gqwPUQpxNF+c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6525bbc06a39f26750ad8ee0d40000ddfdc24acb", + "rev": "22a500a3f87bbce73bd8d777ef920b43a636f018", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable_2": { + "locked": { + "lastModified": 1644486793, + "narHash": "sha256-EeijR4guVHgVv+JpOX3cQO+1XdrkJfGmiJ9XVsVU530=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1882c6b7368fd284ad01b0a5b5601ef136321292", "type": "github" }, "original": { @@ -294,25 +878,198 @@ "type": "github" } }, - "root": { + "old-ghc-nix_2": { + "flake": false, + "locked": { + "lastModified": 1631092763, + "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", + "owner": "angerman", + "repo": "old-ghc-nix", + "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", + "type": "github" + }, + "original": { + "owner": "angerman", + "ref": "master", + "repo": "old-ghc-nix", + "type": "github" + } + }, + "optparse-applicative": { + "flake": false, + "locked": { + "lastModified": 1628901899, + "narHash": "sha256-uQx+SEYsCH7JcG3xAT0eJck9yq3y0cvx49bvItLLer8=", + "owner": "input-output-hk", + "repo": "optparse-applicative", + "rev": "7497a29cb998721a9068d5725d49461f2bba0e7a", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "optparse-applicative", + "rev": "7497a29cb998721a9068d5725d49461f2bba0e7a", + "type": "github" + } + }, + "ouroboros-network": { + "flake": false, + "locked": { + "lastModified": 1639752881, + "narHash": "sha256-fZ6FfG2z6HWDxjIHycLPSQHoYtfUmWZOX7lfAUE+s6M=", + "owner": "input-output-hk", + "repo": "ouroboros-network", + "rev": "d2d219a86cda42787325bb8c20539a75c2667132", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "ouroboros-network", + "rev": "d2d219a86cda42787325bb8c20539a75c2667132", + "type": "github" + } + }, + "plutip": { "inputs": { - "easy-ps": "easy-ps", - "flake-utils": "flake-utils", - "haskellNix": "haskellNix", + "bot-plutus-interface": "bot-plutus-interface", + "flake-compat": "flake-compat_2", + "haskell-nix": [ + "plutip", + "bot-plutus-interface", + "haskell-nix" + ], + "iohk-nix": [ + "plutip", + "bot-plutus-interface", + "iohk-nix" + ], "nixpkgs": [ - "haskellNix", + "plutip", + "bot-plutus-interface", + "haskell-nix", "nixpkgs-unstable" ] + }, + "locked": { + "lastModified": 1645658802, + "narHash": "sha256-8wB1SvLaxmAEUr0aEY+DzpsPzu95b3XcuE5bpzRQG4A=", + "owner": "mlabs-haskell", + "repo": "plutip", + "rev": "88d069d68c41bfd31b2057446a9d4e584a4d2f32", + "type": "github" + }, + "original": { + "owner": "mlabs-haskell", + "repo": "plutip", + "rev": "88d069d68c41bfd31b2057446a9d4e584a4d2f32", + "type": "github" + } + }, + "plutus": { + "flake": false, + "locked": { + "lastModified": 1642505687, + "narHash": "sha256-Pl3M9rMEoiEKRsTdDr4JwNnRo5Xs4uN66uVpOfaMCfE=", + "owner": "input-output-hk", + "repo": "plutus", + "rev": "cc72a56eafb02333c96f662581b57504f8f8992f", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "plutus", + "rev": "cc72a56eafb02333c96f662581b57504f8f8992f", + "type": "github" + } + }, + "plutus-apps": { + "flake": false, + "locked": { + "lastModified": 1644841368, + "narHash": "sha256-OX4+S7fFUqXRz935wQqdcEm1I6aqg0udSdP19XJtSAk=", + "owner": "input-output-hk", + "repo": "plutus-apps", + "rev": "7f543e21d4945a2024e46c572303b9c1684a5832", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "plutus-apps", + "rev": "7f543e21d4945a2024e46c572303b9c1684a5832", + "type": "github" + } + }, + "purescript-bridge": { + "flake": false, + "locked": { + "lastModified": 1642802224, + "narHash": "sha256-/SbnmXrB9Y2rrPd6E79Iu5RDaKAKozIl685HQ4XdQTU=", + "owner": "input-output-hk", + "repo": "purescript-bridge", + "rev": "47a1f11825a0f9445e0f98792f79172efef66c00", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "purescript-bridge", + "rev": "47a1f11825a0f9445e0f98792f79172efef66c00", + "type": "github" + } + }, + "root": { + "inputs": { + "haskell-nix": [ + "plutip", + "haskell-nix" + ], + "nixpkgs": [ + "plutip", + "nixpkgs" + ], + "plutip": "plutip" + } + }, + "servant-purescript": { + "flake": false, + "locked": { + "lastModified": 1642798070, + "narHash": "sha256-DH9ISydu5gxvN4xBuoXVv1OhYCaqGOtzWlACdJ0H64I=", + "owner": "input-output-hk", + "repo": "servant-purescript", + "rev": "44e7cacf109f84984cd99cd3faf185d161826963", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "servant-purescript", + "rev": "44e7cacf109f84984cd99cd3faf185d161826963", + "type": "github" } }, "stackage": { "flake": false, "locked": { - "lastModified": 1633224172, - "narHash": "sha256-Hw2jWJiS6ky0D5BhSyaw5PItzmTpRni4BUcCJmbESWk=", + "lastModified": 1639012797, + "narHash": "sha256-hiLyBa5XFBvxD+BcYPKyYd/0dNMccxAuywFNqYtIIvs=", + "owner": "input-output-hk", + "repo": "stackage.nix", + "rev": "9ea6ea359da91c75a71e334b25aa7dc5ddc4b2c6", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "stackage.nix", + "type": "github" + } + }, + "stackage_2": { + "flake": false, + "locked": { + "lastModified": 1644887829, + "narHash": "sha256-tjUXJpqB7MMnqM4FF5cdtZipfratUcTKRQVA6F77sEQ=", "owner": "input-output-hk", "repo": "stackage.nix", - "rev": "948c9bde3d0b3aa452e0b19c34ae6385ac563160", + "rev": "db8bdef6588cf4f38e6069075ba76f0024381f68", "type": "github" }, "original": { @@ -320,6 +1077,21 @@ "repo": "stackage.nix", "type": "github" } + }, + "utils": { + "locked": { + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.lock.backup b/flake.lock.backup new file mode 100644 index 00000000..6fcb8886 --- /dev/null +++ b/flake.lock.backup @@ -0,0 +1,1770 @@ +{ + "nodes": { + "HTTP": { + "flake": false, + "locked": { + "lastModified": 1451647621, + "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", + "owner": "phadej", + "repo": "HTTP", + "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "type": "github" + }, + "original": { + "owner": "phadej", + "repo": "HTTP", + "type": "github" + } + }, + "HTTP_2": { + "flake": false, + "locked": { + "lastModified": 1451647621, + "narHash": "sha256-oHIyw3x0iKBexEo49YeUDV1k74ZtyYKGR2gNJXXRxts=", + "owner": "phadej", + "repo": "HTTP", + "rev": "9bc0996d412fef1787449d841277ef663ad9a915", + "type": "github" + }, + "original": { + "owner": "phadej", + "repo": "HTTP", + "type": "github" + } + }, + "Shrinker": { + "flake": false, + "locked": { + "lastModified": 1642430208, + "narHash": "sha256-tfWyB7zCLzncwRpyl7eUOzuOBbg9KLu6sxSxRaFlOug=", + "owner": "Plutonomicon", + "repo": "Shrinker", + "rev": "0e60707996b876c7bd23a348f54545217ce2e556", + "type": "github" + }, + "original": { + "owner": "Plutonomicon", + "repo": "Shrinker", + "type": "github" + } + }, + "Win32-network": { + "flake": false, + "locked": { + "lastModified": 1636063162, + "narHash": "sha256-uvYEWalN62ETpH45/O7lNHo4rAIaJtYpLWdIcAkq3dA=", + "owner": "input-output-hk", + "repo": "Win32-network", + "rev": "2d1a01c7cbb9f68a1aefe2934aad6c70644ebfea", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "Win32-network", + "rev": "2d1a01c7cbb9f68a1aefe2934aad6c70644ebfea", + "type": "github" + } + }, + "Win32-network_2": { + "flake": false, + "locked": { + "lastModified": 1627315969, + "narHash": "sha256-Hesb5GXSx0IwKSIi42ofisVELcQNX6lwHcoZcbaDiqc=", + "owner": "input-output-hk", + "repo": "Win32-network", + "rev": "3825d3abf75f83f406c1f7161883c438dac7277d", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "Win32-network", + "rev": "3825d3abf75f83f406c1f7161883c438dac7277d", + "type": "github" + } + }, + "bot-plutus-interface": { + "inputs": { + "Win32-network": "Win32-network_2", + "cardano-addresses": "cardano-addresses", + "cardano-base": "cardano-base_2", + "cardano-config": "cardano-config", + "cardano-crypto": "cardano-crypto_2", + "cardano-ledger": "cardano-ledger", + "cardano-node": "cardano-node", + "cardano-prelude": "cardano-prelude_2", + "cardano-wallet": "cardano-wallet", + "flake-compat": "flake-compat_4", + "flat": "flat_2", + "goblins": "goblins", + "haskell-nix": "haskell-nix_2", + "iohk-monitoring-framework": "iohk-monitoring-framework", + "iohk-nix": "iohk-nix_2", + "nixpkgs": [ + "plutip", + "bot-plutus-interface", + "haskell-nix", + "nixpkgs-unstable" + ], + "optparse-applicative": "optparse-applicative", + "ouroboros-network": "ouroboros-network", + "plutus": "plutus_2", + "plutus-apps": "plutus-apps", + "purescript-bridge": "purescript-bridge", + "servant-purescript": "servant-purescript" + }, + "locked": { + "lastModified": 1645658503, + "narHash": "sha256-mduSwSnHJSE0P6NF9NDtSdIz8WtniLRW5S88NPBVs7o=", + "owner": "mlabs-haskell", + "repo": "bot-plutus-interface", + "rev": "ca7d096a200a33312484356d9e47e73e1466ce13", + "type": "github" + }, + "original": { + "owner": "mlabs-haskell", + "repo": "bot-plutus-interface", + "rev": "ca7d096a200a33312484356d9e47e73e1466ce13", + "type": "github" + } + }, + "cabal-32": { + "flake": false, + "locked": { + "lastModified": 1603716527, + "narHash": "sha256-sDbrmur9Zfp4mPKohCD8IDZfXJ0Tjxpmr2R+kg5PpSY=", + "owner": "haskell", + "repo": "cabal", + "rev": "94aaa8e4720081f9c75497e2735b90f6a819b08e", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.2", + "repo": "cabal", + "type": "github" + } + }, + "cabal-32_2": { + "flake": false, + "locked": { + "lastModified": 1603716527, + "narHash": "sha256-X0TFfdD4KZpwl0Zr6x+PLxUt/VyKQfX7ylXHdmZIL+w=", + "owner": "haskell", + "repo": "cabal", + "rev": "48bf10787e27364730dd37a42b603cee8d6af7ee", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.2", + "repo": "cabal", + "type": "github" + } + }, + "cabal-34": { + "flake": false, + "locked": { + "lastModified": 1622475795, + "narHash": "sha256-chwTL304Cav+7p38d9mcb+egABWmxo2Aq+xgVBgEb/U=", + "owner": "haskell", + "repo": "cabal", + "rev": "b086c1995cdd616fc8d91f46a21e905cc50a1049", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.4", + "repo": "cabal", + "type": "github" + } + }, + "cabal-34_2": { + "flake": false, + "locked": { + "lastModified": 1640353650, + "narHash": "sha256-N1t6M3/wqj90AEdRkeC8i923gQYUpzSr8b40qVOZ1Rk=", + "owner": "haskell", + "repo": "cabal", + "rev": "942639c18c0cd8ec53e0a6f8d120091af35312cd", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.4", + "repo": "cabal", + "type": "github" + } + }, + "cabal-36": { + "flake": false, + "locked": { + "lastModified": 1641652457, + "narHash": "sha256-BlFPKP4C4HRUJeAbdembX1Rms1LD380q9s0qVDeoAak=", + "owner": "haskell", + "repo": "cabal", + "rev": "f27667f8ec360c475027dcaee0138c937477b070", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "3.6", + "repo": "cabal", + "type": "github" + } + }, + "cardano-addresses": { + "flake": false, + "locked": { + "lastModified": 1639584472, + "narHash": "sha256-Eyu7PVYk1oQLp/Hd43S2PW+PojyAT/Rr48Xng6sbtIU=", + "owner": "input-output-hk", + "repo": "cardano-addresses", + "rev": "71006f9eb956b0004022e80aadd4ad50d837b621", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-addresses", + "rev": "71006f9eb956b0004022e80aadd4ad50d837b621", + "type": "github" + } + }, + "cardano-base": { + "flake": false, + "locked": { + "lastModified": 1638456794, + "narHash": "sha256-0KAO6dWqupJzRyjWjAFLZrt0hA6pozeKsDv1Fnysib8=", + "owner": "input-output-hk", + "repo": "cardano-base", + "rev": "4fae3f0149fd8925be94707d3ae0e36c0d67bd58", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-base", + "type": "github" + } + }, + "cardano-base_2": { + "flake": false, + "locked": { + "lastModified": 1635841753, + "narHash": "sha256-OXKsJ1UTj5kJ9xaThM54ZmxFAiFINTPKd4JQa4dPmEU=", + "owner": "input-output-hk", + "repo": "cardano-base", + "rev": "41545ba3ac6b3095966316a99883d678b5ab8da8", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-base", + "rev": "41545ba3ac6b3095966316a99883d678b5ab8da8", + "type": "github" + } + }, + "cardano-config": { + "flake": false, + "locked": { + "lastModified": 1634339627, + "narHash": "sha256-jQbwcfNJ8am7Q3W+hmTFmyo3wp3QItquEH//klNiofI=", + "owner": "input-output-hk", + "repo": "cardano-config", + "rev": "e9de7a2cf70796f6ff26eac9f9540184ded0e4e6", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-config", + "rev": "e9de7a2cf70796f6ff26eac9f9540184ded0e4e6", + "type": "github" + } + }, + "cardano-crypto": { + "flake": false, + "locked": { + "lastModified": 1621376239, + "narHash": "sha256-oxIOVlgm07FAEmgGRF1C2me9TXqVxQulEOcJ22zpTRs=", + "owner": "input-output-hk", + "repo": "cardano-crypto", + "rev": "07397f0e50da97eaa0575d93bee7ac4b2b2576ec", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-crypto", + "rev": "07397f0e50da97eaa0575d93bee7ac4b2b2576ec", + "type": "github" + } + }, + "cardano-crypto_2": { + "flake": false, + "locked": { + "lastModified": 1604244485, + "narHash": "sha256-2Fipex/WjIRMrvx6F3hjJoAeMtFd2wGnZECT0kuIB9k=", + "owner": "input-output-hk", + "repo": "cardano-crypto", + "rev": "f73079303f663e028288f9f4a9e08bcca39a923e", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-crypto", + "rev": "f73079303f663e028288f9f4a9e08bcca39a923e", + "type": "github" + } + }, + "cardano-ledger": { + "flake": false, + "locked": { + "lastModified": 1639498285, + "narHash": "sha256-lRNfkGMHnpPO0T19FZY5BnuRkr0zTRZIkxZVgHH0fys=", + "owner": "input-output-hk", + "repo": "cardano-ledger", + "rev": "1a9ec4ae9e0b09d54e49b2a40c4ead37edadcce5", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-ledger", + "rev": "1a9ec4ae9e0b09d54e49b2a40c4ead37edadcce5", + "type": "github" + } + }, + "cardano-node": { + "inputs": { + "customConfig": "customConfig", + "haskellNix": "haskellNix", + "iohkNix": "iohkNix", + "nixpkgs": [ + "plutip", + "bot-plutus-interface", + "cardano-node", + "haskellNix", + "nixpkgs-2105" + ], + "utils": "utils" + }, + "locked": { + "lastModified": 1640022647, + "narHash": "sha256-M+YnF7Zj/7QK2pu0T75xNVaX0eEeijtBH8yz+jEHIMM=", + "owner": "input-output-hk", + "repo": "cardano-node", + "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-node", + "rev": "814df2c146f5d56f8c35a681fe75e85b905aed5d", + "type": "github" + } + }, + "cardano-prelude": { + "flake": false, + "locked": { + "lastModified": 1641566029, + "narHash": "sha256-CylaHhO4zbZ1dEAv8yWp1swP1xys/s2Sbxg3a2pdnCI=", + "owner": "locallycompact", + "repo": "cardano-prelude", + "rev": "93f95047bb36a055bdd56fb0cafd887c072cdce2", + "type": "github" + }, + "original": { + "owner": "locallycompact", + "repo": "cardano-prelude", + "rev": "93f95047bb36a055bdd56fb0cafd887c072cdce2", + "type": "github" + } + }, + "cardano-prelude_2": { + "flake": false, + "locked": { + "lastModified": 1617089317, + "narHash": "sha256-kgX3DKyfjBb8/XcDEd+/adlETsFlp5sCSurHWgsFAQI=", + "owner": "input-output-hk", + "repo": "cardano-prelude", + "rev": "bb4ed71ba8e587f672d06edf9d2e376f4b055555", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-prelude", + "rev": "bb4ed71ba8e587f672d06edf9d2e376f4b055555", + "type": "github" + } + }, + "cardano-repo-tool": { + "flake": false, + "locked": { + "lastModified": 1624584417, + "narHash": "sha256-YSepT97PagR/1jTYV/Yer8a2GjFe9+tTwaTCHxuK50M=", + "owner": "input-output-hk", + "repo": "cardano-repo-tool", + "rev": "30e826ed8f00e3e154453b122a6f3d779b2f73ec", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-repo-tool", + "type": "github" + } + }, + "cardano-shell": { + "flake": false, + "locked": { + "lastModified": 1608537748, + "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", + "owner": "input-output-hk", + "repo": "cardano-shell", + "rev": "9392c75087cb9a3d453998f4230930dea3a95725", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-shell", + "type": "github" + } + }, + "cardano-shell_2": { + "flake": false, + "locked": { + "lastModified": 1608537748, + "narHash": "sha256-PulY1GfiMgKVnBci3ex4ptk2UNYMXqGjJOxcPy2KYT4=", + "owner": "input-output-hk", + "repo": "cardano-shell", + "rev": "9392c75087cb9a3d453998f4230930dea3a95725", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-shell", + "type": "github" + } + }, + "cardano-wallet": { + "flake": false, + "locked": { + "lastModified": 1642494510, + "narHash": "sha256-A3im2IkoumUx3NzgPooaXGC18/iYxbEooMa9ho93/6o=", + "owner": "input-output-hk", + "repo": "cardano-wallet", + "rev": "a5085acbd2670c24251cf8d76a4e83c77a2679ba", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "cardano-wallet", + "rev": "a5085acbd2670c24251cf8d76a4e83c77a2679ba", + "type": "github" + } + }, + "cryptonite": { + "flake": false, + "locked": { + "lastModified": 1639749289, + "narHash": "sha256-/KS2S0f9r4c/q+IUGwkFOY9jbZkyK3dl0xMpDbULeqc=", + "owner": "haskell-crypto", + "repo": "cryptonite", + "rev": "cec291d988f0f17828384f3358214ab9bf724a13", + "type": "github" + }, + "original": { + "owner": "haskell-crypto", + "repo": "cryptonite", + "rev": "cec291d988f0f17828384f3358214ab9bf724a13", + "type": "github" + } + }, + "customConfig": { + "locked": { + "lastModified": 1630400035, + "narHash": "sha256-MWaVOCzuFwp09wZIW9iHq5wWen5C69I940N1swZLEQ0=", + "owner": "input-output-hk", + "repo": "empty-flake", + "rev": "2040a05b67bf9a669ce17eca56beb14b4206a99a", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "empty-flake", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1641205782, + "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat-ci": { + "locked": { + "lastModified": 1641672839, + "narHash": "sha256-Bdwv+DKeEMlRNPDpZxSz0sSrqQBvdKO5fZ8LmvrgCOU=", + "owner": "hercules-ci", + "repo": "flake-compat-ci", + "rev": "e832114bc18376c0f3fa13c19bf5ff253cc6570a", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-compat-ci", + "type": "github" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1606424373, + "narHash": "sha256-oq8d4//CJOrVj+EcOaSXvMebvuTkmBJuT5tzlfewUnQ=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "99f1c2157fba4bfe6211a321fd0ee43199025dbf", + "type": "github" + }, + "original": { + "owner": "edolstra", + "ref": "master", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1606424373, + "narHash": "sha256-oq8d4//CJOrVj+EcOaSXvMebvuTkmBJuT5tzlfewUnQ=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "99f1c2157fba4bfe6211a321fd0ee43199025dbf", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_4": { + "flake": false, + "locked": { + "lastModified": 1641205782, + "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_5": { + "flake": false, + "locked": { + "lastModified": 1641205782, + "narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1623875721, + "narHash": "sha256-A8BU7bjS5GirpAUv4QA+QnJ4CceLHkcXdRp4xITDB0s=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "f7e004a55b120c02ecb6219596820fcd32ca8772", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flat": { + "flake": false, + "locked": { + "lastModified": 1641898475, + "narHash": "sha256-D7jJ4t0T1ZvXbO61r3HQj77hZ5hWF/P1L8X9+MnfD6c=", + "owner": "Quid2", + "repo": "flat", + "rev": "41a040c413351e021982bb78bd00f750628f8060", + "type": "github" + }, + "original": { + "owner": "Quid2", + "repo": "flat", + "rev": "41a040c413351e021982bb78bd00f750628f8060", + "type": "github" + } + }, + "flat_2": { + "flake": false, + "locked": { + "lastModified": 1628771504, + "narHash": "sha256-lRFND+ZnZvAph6ZYkr9wl9VAx41pb3uSFP8Wc7idP9M=", + "owner": "input-output-hk", + "repo": "flat", + "rev": "ee59880f47ab835dbd73bea0847dab7869fc20d8", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "flat", + "rev": "ee59880f47ab835dbd73bea0847dab7869fc20d8", + "type": "github" + } + }, + "foundation": { + "flake": false, + "locked": { + "lastModified": 1635711016, + "narHash": "sha256-5TRuljpwt50DLjyFjiFj6quFncu8RT0d8/0jlzsenuc=", + "owner": "haskell-foundation", + "repo": "foundation", + "rev": "0bb195e1fea06d144dafc5af9a0ff79af0a5f4a0", + "type": "github" + }, + "original": { + "owner": "haskell-foundation", + "repo": "foundation", + "rev": "0bb195e1fea06d144dafc5af9a0ff79af0a5f4a0", + "type": "github" + } + }, + "ghc-8.6.5-iohk": { + "flake": false, + "locked": { + "lastModified": 1600920045, + "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", + "owner": "input-output-hk", + "repo": "ghc", + "rev": "95713a6ecce4551240da7c96b6176f980af75cae", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "ref": "release/8.6.5-iohk", + "repo": "ghc", + "type": "github" + } + }, + "ghc-8.6.5-iohk_2": { + "flake": false, + "locked": { + "lastModified": 1600920045, + "narHash": "sha256-DO6kxJz248djebZLpSzTGD6s8WRpNI9BTwUeOf5RwY8=", + "owner": "input-output-hk", + "repo": "ghc", + "rev": "95713a6ecce4551240da7c96b6176f980af75cae", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "ref": "release/8.6.5-iohk", + "repo": "ghc", + "type": "github" + } + }, + "gitignore-nix": { + "flake": false, + "locked": { + "lastModified": 1611672876, + "narHash": "sha256-qHu3uZ/o9jBHiA3MEKHJ06k7w4heOhA+4HCSIvflRxo=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "211907489e9f198594c0eb0ca9256a1949c9d412", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, + "goblins": { + "flake": false, + "locked": { + "lastModified": 1598362523, + "narHash": "sha256-z9ut0y6umDIjJIRjz9KSvKgotuw06/S8QDwOtVdGiJ0=", + "owner": "input-output-hk", + "repo": "goblins", + "rev": "cde90a2b27f79187ca8310b6549331e59595e7ba", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "goblins", + "rev": "cde90a2b27f79187ca8310b6549331e59595e7ba", + "type": "github" + } + }, + "hackage": { + "flake": false, + "locked": { + "lastModified": 1639098768, + "narHash": "sha256-DZ4sG8FeDxWvBLixrj0jELXjtebZ0SCCPmQW43HNzIE=", + "owner": "input-output-hk", + "repo": "hackage.nix", + "rev": "c7b123af6b0b9b364cab03363504d42dca16a4b5", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "hackage.nix", + "type": "github" + } + }, + "hackage-nix": { + "flake": false, + "locked": { + "lastModified": 1637291070, + "narHash": "sha256-hTX2Xo36i9MR6PNwA/89C8daKjxmx5ZS5lwR2Cbp8Yo=", + "owner": "input-output-hk", + "repo": "hackage.nix", + "rev": "6ea4ad5f4a5e2303cd64974329ba90ccc410a012", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "hackage.nix", + "type": "github" + } + }, + "hackage_2": { + "flake": false, + "locked": { + "lastModified": 1644887696, + "narHash": "sha256-o4gltv4npUl7+1gEQIcrRqZniwqC9kK8QsPaftlrawc=", + "owner": "input-output-hk", + "repo": "hackage.nix", + "rev": "6ff64aa49b88e75dd6e0bbd2823c2a92c9174fa5", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "hackage.nix", + "type": "github" + } + }, + "haskell-language-server": { + "flake": false, + "locked": { + "lastModified": 1642772345, + "narHash": "sha256-fjdNOcd0S35OAvMZu81/im32B7hSIimjs08VKQA58Mw=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "f0bbc390b995953885506b755f4e4b5c6af618fb", + "type": "github" + }, + "original": { + "owner": "haskell", + "repo": "haskell-language-server", + "type": "github" + } + }, + "haskell-language-server_2": { + "flake": false, + "locked": { + "lastModified": 1638136578, + "narHash": "sha256-Reo9BQ12O+OX7tuRfaDPZPBpJW4jnxZetm63BxYncoM=", + "owner": "haskell", + "repo": "haskell-language-server", + "rev": "745ef26f406dbdd5e4a538585f8519af9f1ccb09", + "type": "github" + }, + "original": { + "owner": "haskell", + "ref": "1.5.1", + "repo": "haskell-language-server", + "type": "github" + } + }, + "haskell-nix": { + "flake": false, + "locked": { + "lastModified": 1629380841, + "narHash": "sha256-gWOWCfX7IgVSvMMYN6rBGK6EA0pk6pmYguXzMvGte+Q=", + "owner": "input-output-hk", + "repo": "haskell.nix", + "rev": "7215f083b37741446aa325b20c8ba9f9f76015eb", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "haskell.nix", + "type": "github" + } + }, + "haskell-nix_2": { + "inputs": { + "HTTP": "HTTP_2", + "cabal-32": "cabal-32_2", + "cabal-34": "cabal-34_2", + "cabal-36": "cabal-36", + "cardano-shell": "cardano-shell_2", + "flake-utils": "flake-utils_2", + "ghc-8.6.5-iohk": "ghc-8.6.5-iohk_2", + "hackage": "hackage_2", + "hpc-coveralls": "hpc-coveralls_2", + "nix-tools": "nix-tools_2", + "nixpkgs": [ + "plutip", + "bot-plutus-interface", + "haskell-nix", + "nixpkgs-unstable" + ], + "nixpkgs-2003": "nixpkgs-2003_2", + "nixpkgs-2105": "nixpkgs-2105_2", + "nixpkgs-2111": "nixpkgs-2111_2", + "nixpkgs-unstable": "nixpkgs-unstable_2", + "old-ghc-nix": "old-ghc-nix_2", + "stackage": "stackage_2" + }, + "locked": { + "lastModified": 1644944726, + "narHash": "sha256-jJWdP/3Ne1y1akC3m9rSO5ItRoBc4UTdVQZBCuPmmrM=", + "owner": "L-as", + "repo": "haskell.nix", + "rev": "45c583b5580c130487eb5a342679f0bdbc2b23fc", + "type": "github" + }, + "original": { + "owner": "L-as", + "repo": "haskell.nix", + "type": "github" + } + }, + "haskellNix": { + "inputs": { + "HTTP": "HTTP", + "cabal-32": "cabal-32", + "cabal-34": "cabal-34", + "cardano-shell": "cardano-shell", + "flake-utils": "flake-utils", + "ghc-8.6.5-iohk": "ghc-8.6.5-iohk", + "hackage": "hackage", + "hpc-coveralls": "hpc-coveralls", + "nix-tools": "nix-tools", + "nixpkgs": [ + "plutip", + "bot-plutus-interface", + "cardano-node", + "nixpkgs" + ], + "nixpkgs-2003": "nixpkgs-2003", + "nixpkgs-2105": "nixpkgs-2105", + "nixpkgs-2111": "nixpkgs-2111", + "nixpkgs-unstable": "nixpkgs-unstable", + "old-ghc-nix": "old-ghc-nix", + "stackage": "stackage" + }, + "locked": { + "lastModified": 1639098904, + "narHash": "sha256-7VrCNEaKGLm4pTOS11dt1dRL2033oqrNCfal0uONsqA=", + "owner": "input-output-hk", + "repo": "haskell.nix", + "rev": "b18c6ce0867fee77f12ecf41dc6c67f7a59d9826", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "haskell.nix", + "type": "github" + } + }, + "hercules-ci-agent": { + "inputs": { + "flake-compat": "flake-compat_3", + "nix-darwin": "nix-darwin", + "nixos-20_09": "nixos-20_09", + "nixos-unstable": "nixos-unstable", + "pre-commit-hooks-nix": "pre-commit-hooks-nix" + }, + "locked": { + "lastModified": 1642766877, + "narHash": "sha256-EXvI+1cKZHWfAaRV1PrSrQe0knc4rg5vMF4qz6/5bkI=", + "owner": "hercules-ci", + "repo": "hercules-ci-agent", + "rev": "0aa916f487be7da03bc2a6dec2ac7149b05499c5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "ref": "master", + "repo": "hercules-ci-agent", + "type": "github" + } + }, + "hercules-ci-effects": { + "inputs": { + "flake-compat": "flake-compat_2", + "hercules-ci-agent": "hercules-ci-agent", + "nixpkgs": "nixpkgs_2", + "nixpkgs-nixops": "nixpkgs-nixops" + }, + "locked": { + "lastModified": 1641914281, + "narHash": "sha256-3qJ6tDPkrsFqm4E74JROZlQbnKKLNTHV7QOD1LdcVqs=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "2e165352d92782e7ae149f4f1a9b3174f718a3af", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, + "hpc-coveralls": { + "flake": false, + "locked": { + "lastModified": 1607498076, + "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", + "type": "github" + }, + "original": { + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "type": "github" + } + }, + "hpc-coveralls_2": { + "flake": false, + "locked": { + "lastModified": 1607498076, + "narHash": "sha256-8uqsEtivphgZWYeUo5RDUhp6bO9j2vaaProQxHBltQk=", + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "rev": "14df0f7d229f4cd2e79f8eabb1a740097fdfa430", + "type": "github" + }, + "original": { + "owner": "sevanspowell", + "repo": "hpc-coveralls", + "type": "github" + } + }, + "hs-memory": { + "flake": false, + "locked": { + "lastModified": 1636757734, + "narHash": "sha256-DIlt0NpFUx8IUeTcgZNBJWWfyNaKv5ZKYw1K9aLvxBs=", + "owner": "vincenthz", + "repo": "hs-memory", + "rev": "3cf661a8a9a8ac028df77daa88e8d65c55a3347a", + "type": "github" + }, + "original": { + "owner": "vincenthz", + "repo": "hs-memory", + "rev": "3cf661a8a9a8ac028df77daa88e8d65c55a3347a", + "type": "github" + } + }, + "iohk-monitoring-framework": { + "flake": false, + "locked": { + "lastModified": 1624367860, + "narHash": "sha256-QE3QRpIHIABm+qCP/wP4epbUx0JmSJ9BMePqWEd3iMY=", + "owner": "input-output-hk", + "repo": "iohk-monitoring-framework", + "rev": "46f994e216a1f8b36fe4669b47b2a7011b0e153c", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "iohk-monitoring-framework", + "rev": "46f994e216a1f8b36fe4669b47b2a7011b0e153c", + "type": "github" + } + }, + "iohk-nix": { + "flake": false, + "locked": { + "lastModified": 1626953580, + "narHash": "sha256-iEI9aTOaZMGsjWzcrctrC0usmiagwKT2v1LSDe9/tMU=", + "owner": "input-output-hk", + "repo": "iohk-nix", + "rev": "cbd497f5844249ef8fe617166337d59f2a6ebe90", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "iohk-nix", + "type": "github" + } + }, + "iohk-nix_2": { + "flake": false, + "locked": { + "lastModified": 1643251385, + "narHash": "sha256-Czbd69lg0ARSZfC18V6h+gtPMioWDAEVPbiHgL2x9LM=", + "owner": "input-output-hk", + "repo": "iohk-nix", + "rev": "9d6ee3dcb3482f791e40ed991ad6fc649b343ad4", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "iohk-nix", + "type": "github" + } + }, + "iohkNix": { + "inputs": { + "nixpkgs": [ + "plutip", + "bot-plutus-interface", + "cardano-node", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1633964277, + "narHash": "sha256-7G/BK514WiMRr90EswNBthe8SmH9tjPaTBba/RW/VA8=", + "owner": "input-output-hk", + "repo": "iohk-nix", + "rev": "1e51437aac8a0e49663cb21e781f34163c81ebfb", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "iohk-nix", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1622060422, + "narHash": "sha256-hPVlvrAyf6zL7tTx0lpK+tMxEfZeMiIZ/A2xaJ41WOY=", + "owner": "LnL7", + "repo": "nix-darwin", + "rev": "007d700e644ac588ad6668e6439950a5b6e2ff64", + "type": "github" + }, + "original": { + "owner": "LnL7", + "repo": "nix-darwin", + "type": "github" + } + }, + "nix-tools": { + "flake": false, + "locked": { + "lastModified": 1636018067, + "narHash": "sha256-ng306fkuwr6V/malWtt3979iAC4yMVDDH2ViwYB6sQE=", + "owner": "input-output-hk", + "repo": "nix-tools", + "rev": "ed5bd7215292deba55d6ab7a4e8c21f8b1564dda", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "nix-tools", + "type": "github" + } + }, + "nix-tools_2": { + "flake": false, + "locked": { + "lastModified": 1644395812, + "narHash": "sha256-BVFk/BEsTLq5MMZvdy3ZYHKfaS3dHrsKh4+tb5t5b58=", + "owner": "input-output-hk", + "repo": "nix-tools", + "rev": "d847c63b99bbec78bf83be2a61dc9f09b8a9ccc1", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "nix-tools", + "type": "github" + } + }, + "nixos-20_09": { + "locked": { + "lastModified": 1623585158, + "narHash": "sha256-AjK7M1/six8IBPOI28nm7yC2k8mZIR2F9QrOwFYHAS0=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "115dbbe82eb4ec8aabf959068286468a68e0b244", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-20.09", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixos-unstable": { + "locked": { + "lastModified": 1630248577, + "narHash": "sha256-9d/yq96TTrnF7qjA6wPYk+rYjWAXwfUmwk3qewezSeg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8d8a28b47b7c41aeb4ad01a2bd8b7d26986c3512", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1602411953, + "narHash": "sha256-gbupmxRpoQZqL5NBQCJN2GI5G7XDEHHHYKhVwEj5+Ps=", + "owner": "LnL7", + "repo": "nixpkgs", + "rev": "f780534ea2d0c12e62607ff254b6b45f46653f7a", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs-2003": { + "locked": { + "lastModified": 1620055814, + "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-20.03-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2003_2": { + "locked": { + "lastModified": 1620055814, + "narHash": "sha256-8LEHoYSJiL901bTMVatq+rf8y7QtWuZhwwpKE2fyaRY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1db42b7fe3878f3f5f7a4f2dc210772fd080e205", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-20.03-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2105": { + "locked": { + "lastModified": 1630481079, + "narHash": "sha256-leWXLchbAbqOlLT6tju631G40SzQWPqaAXQG3zH1Imw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "110a2c9ebbf5d4a94486854f18a37a938cfacbbb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2105_2": { + "locked": { + "lastModified": 1642244250, + "narHash": "sha256-vWpUEqQdVP4srj+/YLJRTN9vjpTs4je0cdWKXPbDItc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0fd9ee1aa36ce865ad273f4f07fdc093adeb5c00", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.05-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2111": { + "locked": { + "lastModified": 1638410074, + "narHash": "sha256-MQYI4k4XkoTzpeRjq5wl+1NShsl1CKq8MISFuZ81sWs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5b80f23502f8e902612a8c631dfce383e1c56596", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-2111_2": { + "locked": { + "lastModified": 1644510859, + "narHash": "sha256-xjpVvL5ecbyi0vxtVl/Fh9bwGlMbw3S06zE5nUzFB8A=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0d1d5d7e3679fec9d07f2eb804d9f9fdb98378d3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-21.11-darwin", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-nixops": { + "locked": { + "lastModified": 1630248577, + "narHash": "sha256-9d/yq96TTrnF7qjA6wPYk+rYjWAXwfUmwk3qewezSeg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8d8a28b47b7c41aeb4ad01a2bd8b7d26986c3512", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8d8a28b47b7c41aeb4ad01a2bd8b7d26986c3512", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1635295995, + "narHash": "sha256-sGYiXjFlxTTMNb4NSkgvX+knOOTipE6gqwPUQpxNF+c=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "22a500a3f87bbce73bd8d777ef920b43a636f018", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable_2": { + "locked": { + "lastModified": 1644486793, + "narHash": "sha256-EeijR4guVHgVv+JpOX3cQO+1XdrkJfGmiJ9XVsVU530=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1882c6b7368fd284ad01b0a5b5601ef136321292", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1633463774, + "narHash": "sha256-y3GjapcRzd42NgebQ4sx5GFJ53dYqNdF3UQu7/t6mUg=", + "owner": "hercules-ci", + "repo": "nixpkgs", + "rev": "c70f908fd1f129aede2744d4385fae57d2e252b1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "ref": "init-nixops-hercules-ci", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "flake": false, + "locked": { + "lastModified": 1628785280, + "narHash": "sha256-2B5eMrEr6O8ff2aQNeVxTB+9WrGE80OB4+oM6T7fOcc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6525bbc06a39f26750ad8ee0d40000ddfdc24acb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "old-ghc-nix": { + "flake": false, + "locked": { + "lastModified": 1631092763, + "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", + "owner": "angerman", + "repo": "old-ghc-nix", + "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", + "type": "github" + }, + "original": { + "owner": "angerman", + "ref": "master", + "repo": "old-ghc-nix", + "type": "github" + } + }, + "old-ghc-nix_2": { + "flake": false, + "locked": { + "lastModified": 1631092763, + "narHash": "sha256-sIKgO+z7tj4lw3u6oBZxqIhDrzSkvpHtv0Kki+lh9Fg=", + "owner": "angerman", + "repo": "old-ghc-nix", + "rev": "af48a7a7353e418119b6dfe3cd1463a657f342b8", + "type": "github" + }, + "original": { + "owner": "angerman", + "ref": "master", + "repo": "old-ghc-nix", + "type": "github" + } + }, + "optparse-applicative": { + "flake": false, + "locked": { + "lastModified": 1628901899, + "narHash": "sha256-uQx+SEYsCH7JcG3xAT0eJck9yq3y0cvx49bvItLLer8=", + "owner": "input-output-hk", + "repo": "optparse-applicative", + "rev": "7497a29cb998721a9068d5725d49461f2bba0e7a", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "optparse-applicative", + "rev": "7497a29cb998721a9068d5725d49461f2bba0e7a", + "type": "github" + } + }, + "ouroboros-network": { + "flake": false, + "locked": { + "lastModified": 1639752881, + "narHash": "sha256-fZ6FfG2z6HWDxjIHycLPSQHoYtfUmWZOX7lfAUE+s6M=", + "owner": "input-output-hk", + "repo": "ouroboros-network", + "rev": "d2d219a86cda42787325bb8c20539a75c2667132", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "ouroboros-network", + "rev": "d2d219a86cda42787325bb8c20539a75c2667132", + "type": "github" + } + }, + "plutarch": { + "inputs": { + "Shrinker": "Shrinker", + "Win32-network": "Win32-network", + "cardano-base": "cardano-base", + "cardano-crypto": "cardano-crypto", + "cardano-prelude": "cardano-prelude", + "cryptonite": "cryptonite", + "flake-compat": "flake-compat", + "flake-compat-ci": "flake-compat-ci", + "flat": "flat", + "foundation": "foundation", + "haskell-language-server": "haskell-language-server", + "haskell-nix": [ + "plutip", + "haskell-nix" + ], + "hercules-ci-effects": "hercules-ci-effects", + "hs-memory": "hs-memory", + "nixpkgs": [ + "plutip", + "nixpkgs" + ], + "plutus": "plutus", + "protolude": "protolude", + "sized-functors": "sized-functors", + "th-extras": "th-extras" + }, + "locked": { + "lastModified": 1649861649, + "narHash": "sha256-Sho/mIKhXK4ZIVvg0FzdoGYkytp760ttj3NQfUxJO9E=", + "owner": "Plutonomicon", + "repo": "plutarch", + "rev": "c68788e67e2904bcad9cbafe49df432e71d261db", + "type": "github" + }, + "original": { + "owner": "Plutonomicon", + "repo": "plutarch", + "type": "github" + } + }, + "plutip": { + "inputs": { + "bot-plutus-interface": "bot-plutus-interface", + "flake-compat": "flake-compat_5", + "haskell-nix": [ + "plutip", + "bot-plutus-interface", + "haskell-nix" + ], + "iohk-nix": [ + "plutip", + "bot-plutus-interface", + "iohk-nix" + ], + "nixpkgs": [ + "plutip", + "bot-plutus-interface", + "haskell-nix", + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1645658802, + "narHash": "sha256-8wB1SvLaxmAEUr0aEY+DzpsPzu95b3XcuE5bpzRQG4A=", + "owner": "mlabs-haskell", + "repo": "plutip", + "rev": "88d069d68c41bfd31b2057446a9d4e584a4d2f32", + "type": "github" + }, + "original": { + "owner": "mlabs-haskell", + "repo": "plutip", + "rev": "88d069d68c41bfd31b2057446a9d4e584a4d2f32", + "type": "github" + } + }, + "plutus": { + "inputs": { + "cardano-repo-tool": "cardano-repo-tool", + "gitignore-nix": "gitignore-nix", + "hackage-nix": "hackage-nix", + "haskell-language-server": "haskell-language-server_2", + "haskell-nix": "haskell-nix", + "iohk-nix": "iohk-nix", + "nixpkgs": "nixpkgs_3", + "pre-commit-hooks-nix": "pre-commit-hooks-nix_2", + "sphinxcontrib-haddock": "sphinxcontrib-haddock", + "stackage-nix": "stackage-nix" + }, + "locked": { + "lastModified": 1642004499, + "narHash": "sha256-LMAMixBJRYZ5wgINjp4rb8hifEGkXptX8Z5e2Ip8HeM=", + "owner": "L-as", + "repo": "plutus", + "rev": "6cceda4793ee125dc700c63ff780593e387696b0", + "type": "github" + }, + "original": { + "owner": "L-as", + "ref": "master", + "repo": "plutus", + "type": "github" + } + }, + "plutus-apps": { + "flake": false, + "locked": { + "lastModified": 1644841368, + "narHash": "sha256-OX4+S7fFUqXRz935wQqdcEm1I6aqg0udSdP19XJtSAk=", + "owner": "input-output-hk", + "repo": "plutus-apps", + "rev": "7f543e21d4945a2024e46c572303b9c1684a5832", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "plutus-apps", + "rev": "7f543e21d4945a2024e46c572303b9c1684a5832", + "type": "github" + } + }, + "plutus_2": { + "flake": false, + "locked": { + "lastModified": 1642505687, + "narHash": "sha256-Pl3M9rMEoiEKRsTdDr4JwNnRo5Xs4uN66uVpOfaMCfE=", + "owner": "input-output-hk", + "repo": "plutus", + "rev": "cc72a56eafb02333c96f662581b57504f8f8992f", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "plutus", + "rev": "cc72a56eafb02333c96f662581b57504f8f8992f", + "type": "github" + } + }, + "pre-commit-hooks-nix": { + "flake": false, + "locked": { + "lastModified": 1622650193, + "narHash": "sha256-qSzUpJDv04ajS9FXoCq6NjVF3qOt9IiGIiGh0P8amyw=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "0398f0649e0a741660ac5e8216760bae5cc78579", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "pre-commit-hooks-nix_2": { + "flake": false, + "locked": { + "lastModified": 1624971177, + "narHash": "sha256-Amf/nBj1E77RmbSSmV+hg6YOpR+rddCbbVgo5C7BS0I=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "397f0713d007250a2c7a745e555fa16c5dc8cadb", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "protolude": { + "flake": false, + "locked": { + "lastModified": 1637276813, + "narHash": "sha256-/mgR1Vyp1WYBjdkbwQycrf6lcmOgUFcYUZIMhVgYhdo=", + "owner": "protolude", + "repo": "protolude", + "rev": "d821ef0ac7552cfa2c3e7a7bdf29539f57e3fae6", + "type": "github" + }, + "original": { + "owner": "protolude", + "repo": "protolude", + "rev": "d821ef0ac7552cfa2c3e7a7bdf29539f57e3fae6", + "type": "github" + } + }, + "purescript-bridge": { + "flake": false, + "locked": { + "lastModified": 1642802224, + "narHash": "sha256-/SbnmXrB9Y2rrPd6E79Iu5RDaKAKozIl685HQ4XdQTU=", + "owner": "input-output-hk", + "repo": "purescript-bridge", + "rev": "47a1f11825a0f9445e0f98792f79172efef66c00", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "purescript-bridge", + "rev": "47a1f11825a0f9445e0f98792f79172efef66c00", + "type": "github" + } + }, + "root": { + "inputs": { + "haskell-nix": [ + "plutip", + "haskell-nix" + ], + "nixpkgs": [ + "plutip", + "nixpkgs" + ], + "plutarch": "plutarch", + "plutip": "plutip" + } + }, + "servant-purescript": { + "flake": false, + "locked": { + "lastModified": 1642798070, + "narHash": "sha256-DH9ISydu5gxvN4xBuoXVv1OhYCaqGOtzWlACdJ0H64I=", + "owner": "input-output-hk", + "repo": "servant-purescript", + "rev": "44e7cacf109f84984cd99cd3faf185d161826963", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "servant-purescript", + "rev": "44e7cacf109f84984cd99cd3faf185d161826963", + "type": "github" + } + }, + "sized-functors": { + "flake": false, + "locked": { + "lastModified": 1620614934, + "narHash": "sha256-pVJbEGF4/lvXmWIypwkMQBYygOx3TQwLJbMpfdYovdY=", + "owner": "JonasDuregard", + "repo": "sized-functors", + "rev": "fe6bf78a1b97ff7429630d0e8974c9bc40945dcf", + "type": "github" + }, + "original": { + "owner": "JonasDuregard", + "repo": "sized-functors", + "rev": "fe6bf78a1b97ff7429630d0e8974c9bc40945dcf", + "type": "github" + } + }, + "sphinxcontrib-haddock": { + "flake": false, + "locked": { + "lastModified": 1594136664, + "narHash": "sha256-O9YT3iCUBHP3CEF88VDLLCO2HSP3HqkNA2q2939RnVY=", + "owner": "michaelpj", + "repo": "sphinxcontrib-haddock", + "rev": "f3956b3256962b2d27d5a4e96edb7951acf5de34", + "type": "github" + }, + "original": { + "owner": "michaelpj", + "repo": "sphinxcontrib-haddock", + "type": "github" + } + }, + "stackage": { + "flake": false, + "locked": { + "lastModified": 1639012797, + "narHash": "sha256-hiLyBa5XFBvxD+BcYPKyYd/0dNMccxAuywFNqYtIIvs=", + "owner": "input-output-hk", + "repo": "stackage.nix", + "rev": "9ea6ea359da91c75a71e334b25aa7dc5ddc4b2c6", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "stackage.nix", + "type": "github" + } + }, + "stackage-nix": { + "flake": false, + "locked": { + "lastModified": 1597712578, + "narHash": "sha256-c/pcfZ6w5Yp//7oC0hErOGVVphBLc5vc4IZlWKZ/t6E=", + "owner": "input-output-hk", + "repo": "stackage.nix", + "rev": "e32c8b06d56954865725514ce0d98d5d1867e43a", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "stackage.nix", + "type": "github" + } + }, + "stackage_2": { + "flake": false, + "locked": { + "lastModified": 1644887829, + "narHash": "sha256-tjUXJpqB7MMnqM4FF5cdtZipfratUcTKRQVA6F77sEQ=", + "owner": "input-output-hk", + "repo": "stackage.nix", + "rev": "db8bdef6588cf4f38e6069075ba76f0024381f68", + "type": "github" + }, + "original": { + "owner": "input-output-hk", + "repo": "stackage.nix", + "type": "github" + } + }, + "th-extras": { + "flake": false, + "locked": { + "lastModified": 1641329261, + "narHash": "sha256-+K91xH/zew66ry0EAV5FaEIAHUZdJ3ngD9GzCJiUq7k=", + "owner": "mokus0", + "repo": "th-extras", + "rev": "787ed752c1e5d41b5903b74e171ed087de38bffa", + "type": "github" + }, + "original": { + "owner": "mokus0", + "repo": "th-extras", + "rev": "787ed752c1e5d41b5903b74e171ed087de38bffa", + "type": "github" + } + }, + "utils": { + "locked": { + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 67527868..e3ecdc56 100644 --- a/flake.nix +++ b/flake.nix @@ -1,50 +1,125 @@ { - description = "Generate PureScript data types from Haskell data types"; - inputs.haskellNix.url = "github:input-output-hk/haskell.nix"; - inputs.nixpkgs.follows = "haskellNix/nixpkgs-unstable"; - inputs.flake-utils.url = "github:numtide/flake-utils"; - inputs.easy-ps = { - url = "github:justinwoo/easy-purescript-nix"; - flake = false; + description = "purescript-bridge"; + nixConfig.bash-prompt = "\\[\\e[0m\\][\\[\\e[0;2m\\]nix-develop \\[\\e[0;1m\\]purescript-bridge \\[\\e[0;93m\\]\\w\\[\\e[0m\\]]\\[\\e[0m\\]$ \\[\\e[0m\\]"; + + inputs = { + nixpkgs.follows = "plutip/nixpkgs"; + haskell-nix.follows = "plutip/haskell-nix"; + + plutip.url = "github:mlabs-haskell/plutip?rev=88d069d68c41bfd31b2057446a9d4e584a4d2f32"; + }; - outputs = { self, nixpkgs, flake-utils, haskellNix, easy-ps }: - flake-utils.lib.eachSystem [ "x86_64-linux" "x86_64-darwin" ] (system: - let - overlays = [ - haskellNix.overlay - (final: prev: { - # This overlay adds our project to pkgs - purescript-bridge = - final.haskell-nix.project' { - src = ./.; - compiler-nix-name = "ghc8107"; + + + outputs = inputs@{ self, nixpkgs, haskell-nix, plutip, ... }: + let + # GENERAL + supportedSystems = with nixpkgs.lib.systems.supported; tier1 ++ tier2 ++ tier3; + perSystem = nixpkgs.lib.genAttrs supportedSystems; + + nixpkgsFor = system: import nixpkgs { + inherit system; + overlays = [ haskell-nix.overlay (import "${plutip.inputs.iohk-nix}/overlays/crypto") ]; + inherit (haskell-nix) config; + }; + nixpkgsFor' = system: import nixpkgs { inherit system; }; + + + deferPluginErrors = true; + + # OFFCHAIN / Testnet, Cardano, ... + + offchain = rec { + ghcVersion = "ghc8107"; + + projectFor = system: + let + pkgs = nixpkgsFor system; + pkgs' = nixpkgsFor' system; + plutipin = inputs.plutip.inputs; + fourmolu = pkgs.haskell-nix.tool "ghc921" "fourmolu" { }; + project = pkgs.haskell-nix.cabalProject' { + src = ./.; + compiler-nix-name = ghcVersion; + inherit (plutip) cabalProjectLocal; + extraSources = plutip.extraSources ++ [ + { + src = "${plutip}"; + subdirs = [ "." ]; + } + ]; + modules = [ + ({ config, ... }: { + packages.purescript-bridge-offchain.components.tests.purescript-bridge-offchain-test.build-tools = [ + project.hsPkgs.cardano-cli.components.exes.cardano-cli + project.hsPkgs.cardano-node.components.exes.cardano-node + ]; + + }) + ] ++ plutip.haskellModules; + + shell = { + withHoogle = true; + + exactDeps = true; + + # We use the ones from Nixpkgs, since they are cached reliably. + # Eventually we will probably want to build these with haskell.nix. + nativeBuildInputs = [ + pkgs'.cabal-install + pkgs'.fd + pkgs'.haskellPackages.apply-refact + pkgs'.haskellPackages.cabal-fmt + pkgs'.hlint + pkgs'.nixpkgs-fmt + + project.hsPkgs.cardano-cli.components.exes.cardano-cli + project.hsPkgs.cardano-node.components.exes.cardano-node + + fourmolu + ]; + + tools.haskell-language-server = { }; + + additional = ps: [ ps.plutip ]; }; - }) - ]; - pkgs = import nixpkgs { inherit system overlays; inherit (haskellNix) config; }; - flake = pkgs.purescript-bridge.flake { }; - in - flake // { - # Built by `nix build .` - defaultPackage = flake.packages."purescript-bridge:test:purescript-bridge"; - devShell = pkgs.purescript-bridge.shellFor { - withHoogle = true; - tools = { - cabal = "latest"; - hlint = "latest"; - haskell-language-server = "latest"; - }; - - exactDeps = true; - - buildInputs = with pkgs; with import easy-ps { inherit pkgs; }; [ - ghcid - nixpkgs-fmt - purs - purescript-language-server - spago - haskellPackages.ormolu - ]; - }; + }; + in + project; + }; + in + { + inherit nixpkgsFor; + + offchain = { + project = perSystem offchain.projectFor; + flake = perSystem (system: (offchain.projectFor system).flake { }); + }; + + packages = perSystem (system: + self.offchain.flake.${system}.packages + ); + checks = perSystem (system: + self.offchain.flake.${system}.checks + ); + check = perSystem (system: + (nixpkgsFor system).runCommand "combined-test" + { + checksss = + builtins.attrValues self.checks.${system} + ++ builtins.attrValues self.packages.${system} + ++ [ + self.devShells.${system}.onchain.inputDerivation + self.devShells.${system}.offchain.inputDerivation + ]; + } '' + echo $checksss + touch $out + '' + ); + + devShells = perSystem (system: { + purescript-bridge = self.offchain.flake.${system}.devShell; }); + }; } diff --git a/purescript-bridge.cabal b/purescript-bridge.cabal index 68429d10..e680416d 100644 --- a/purescript-bridge.cabal +++ b/purescript-bridge.cabal @@ -63,6 +63,10 @@ library , Language.PureScript.Bridge.Tuple , Language.PureScript.Bridge.TypeInfo , Language.PureScript.Bridge.TypeParameters + , PlutusTx.Aux + , PlutusTx.LedgerTypes + , PlutusTx.ConstrIndices + , PlutusBridge -- Modules included in this library but not exported. -- other-modules: @@ -81,6 +85,10 @@ library , transformers , wl-pprint-text , generic-deriving + , template-haskell + , th-abstraction + , plutus-tx + , plutus-ledger-api ghc-options: -Wall -fwarn-incomplete-patterns @@ -92,7 +100,35 @@ library -- Base language which the package is written in. default-language: Haskell2010 - + default-extensions: + AllowAmbiguousTypes + BangPatterns + DataKinds + DeriveTraversable + DerivingStrategies + DerivingVia + ExplicitForAll + FlexibleContexts + FlexibleInstances + GADTs + KindSignatures + LambdaCase + MonoLocalBinds + MultiParamTypeClasses + NumericUnderscores + OverloadedStrings + QuasiQuotes + RankNTypes + RecordWildCards + ScopedTypeVariables + StandaloneDeriving + StandaloneKindSignatures + TemplateHaskell + TupleSections + TypeApplications + TypeFamilies + TypeOperators + TypeSynonymInstances Test-Suite tests type: exitcode-stdio-1.0 main-is: Spec.hs diff --git a/shell.nix b/shell.nix.backup similarity index 100% rename from shell.nix rename to shell.nix.backup diff --git a/src/Language/PureScript/Bridge/SumType.hs b/src/Language/PureScript/Bridge/SumType.hs index 8bd65e90..d9b94fab 100644 --- a/src/Language/PureScript/Bridge/SumType.hs +++ b/src/Language/PureScript/Bridge/SumType.hs @@ -34,6 +34,9 @@ import Generics.Deriving import Language.PureScript.Bridge.TypeInfo import Data.Kind ( Type, Constraint ) +-- For Plutus ToData/FromData generation +import PlutusTx.ConstrIndices + data ImportLine = ImportLine { importModule :: !Text, importTypes :: !(Set Text) @@ -85,17 +88,32 @@ extremelyUnsafeMkSumType = case mkSumType @t of SumType tInfo constructors instances -> SumType tInfo constructors (instances <> [HasConstrIndex]) -- | Variant of @mkSumType@ which constructs a SumType using a Haskell type class that can provide constructor --- index information. -mkSumTypeIndexed :: forall (c :: Type -> Constraint) t. (Generic t, Typeable t, c t, GDataConstructor (Rep t)) +-- index information. This is possibly obsolete due to the PlutusTx.Foo modules now in this project, +-- however I'm leaving this in as a convenience just in case IOHK improves the ergonomics for accessing the indices +mkSumTypeIndexed_ :: forall (c :: Type -> Constraint) t. (Generic t, Typeable t, c t, GDataConstructor (Rep t)) => (forall x. c x => [(Int,String)]) -> SumType 'Haskell -mkSumTypeIndexed f = SumType (mkTypeInfo @t) constructors (Generic : HasConstrIndex : maybeToList (nootype . map snd $ constructors)) +mkSumTypeIndexed_ f = SumType (mkTypeInfo @t) constructors (Generic : HasConstrIndex : maybeToList (nootype . map snd $ constructors)) where ixs = M.fromList . map (\(i,t) -> (T.pack t, i)) $ f @t constructors = foldr (\dcon@(DataConstructor name _) acc -> case M.lookup name ixs of -- we want to error here Nothing -> error . T.unpack $ "Constructor \"" <> name <> "\" does not have a specified index!" Just i -> (i,dcon) : acc) [] $ gToConstructors (from (undefined :: t)) + +-- | Variant of @mkSumType@ which constructs a SumType using the HasConstrIndices class. Meant to be used with the template haskell +-- hooks from the PlutusTx.Aux module in this project. +mkSumTypeIndexed :: + forall (t :: Type). + ( Generic t + , Typeable t + , GDataConstructor (Rep t) + , HasConstrIndices t + ) => + SumType 'Haskell +mkSumTypeIndexed = mkSumTypeIndexed_ @HasConstrIndices @t (getConstrIndices @t) + + -- | Purescript typeclass instances that can be generated for your Haskell types. data Instance (lang :: Language) = Generic diff --git a/src/PlutusBridge.hs b/src/PlutusBridge.hs new file mode 100644 index 00000000..dc049133 --- /dev/null +++ b/src/PlutusBridge.hs @@ -0,0 +1,19 @@ +module PlutusBridge ( + module PlutusTx.Aux, + module PlutusTx.ConstrIndices, + module PlutusTx.LedgerTypes, + module Language.PureScript.Bridge.TypeInfo, + module Language.PureScript.Bridge.SumType, + ) where + +import PlutusTx.Aux +import PlutusTx.ConstrIndices +import PlutusTx.LedgerTypes +import Language.PureScript.Bridge.TypeInfo ( + Language, + PSType,) +import Language.PureScript.Bridge.SumType ( + mkSumTypeIndexed, + mkSumTypeIndexed_, + extremelyUnsafeMkSumType, + ) diff --git a/src/PlutusTx/Aux.hs b/src/PlutusTx/Aux.hs new file mode 100644 index 00000000..55c01d17 --- /dev/null +++ b/src/PlutusTx/Aux.hs @@ -0,0 +1,66 @@ +module PlutusTx.Aux where + +import qualified Language.Haskell.TH as TH +import qualified Language.Haskell.TH.Datatype as TH +import qualified PlutusTx.IsData as P +import Prelude (Show(show),Int, Maybe (Just, Nothing), fromIntegral, map, pure, zip, ($), (.), (<$>), (<>)) + +-- PlutusTx doesn't export this so we need to duplicate it here +defaultIndex :: TH.Name -> TH.Q [(TH.Name, Int)] +defaultIndex name = do + info <- TH.reifyDatatype name + pure $ zip (TH.constructorName <$> TH.datatypeCons info) [0 ..] + +makeHasConstrIndex :: TH.Name -> [(TH.Name, Int)] -> TH.Q [TH.Dec] +makeHasConstrIndex name indices = do + info <- TH.reifyDatatype name + let argTy = TH.datatypeType info + pure [TH.InstanceD Nothing [] (instanceType argTy) [getIndices]] + where + instanceType ty = TH.AppT classType ty + + classType = TH.ConT $ TH.mkName "HasConstrIndices" + + getIndices :: TH.Dec + getIndices = TH.FunD (TH.mkName "getConstrIndices") [methodClause] + + methodClause :: TH.Clause + methodClause = TH.Clause [] methodBody [] + + methodBody :: TH.Body + methodBody = TH.NormalB indicesE + + indicesE :: TH.Exp + indicesE = + TH.ListE $ + map + ( \(n, i) -> + TH.TupE [Just (TH.LitE . TH.IntegerL . fromIntegral $ i), Just (TH.LitE . TH.StringL $ TH.nameBase n)] + ) + indices + +unstableMakeIsData :: TH.Name -> TH.Q [TH.Dec] +unstableMakeIsData name = do + indices <- defaultIndex name + hasConstrIndicesInstance <- makeHasConstrIndex name indices + decs <- P.unstableMakeIsData name + pure (hasConstrIndicesInstance <> decs) + +makeIsDataIndexed :: TH.Name -> [(TH.Name, Int)] -> TH.Q [TH.Dec] +makeIsDataIndexed name indices = do + hasConstrIndicesInstance <- makeHasConstrIndex name indices + decs <- P.makeIsDataIndexed name indices + pure (hasConstrIndicesInstance <> decs) + +mkIndicesDefault :: TH.Name -> TH.Q [TH.Dec] +mkIndicesDefault name = do + indices <- defaultIndex name + makeHasConstrIndex name indices + +-- for testing/debugging + +showInfo :: TH.Name -> TH.Q TH.Exp +showInfo name = (TH.LitE . TH.stringL . show) <$> TH.reifyDatatype name + +showTy :: TH.Name -> TH.Q TH.Exp +showTy name = (TH.LitE . TH.stringL . show . TH.datatypeType) <$> TH.reifyDatatype name diff --git a/src/PlutusTx/ConstrIndices.hs b/src/PlutusTx/ConstrIndices.hs new file mode 100644 index 00000000..20be5234 --- /dev/null +++ b/src/PlutusTx/ConstrIndices.hs @@ -0,0 +1,45 @@ +module PlutusTx.ConstrIndices where + +import Data.Kind (Type) +import Prelude (Int, String) +import PlutusTx.Aux + +import Plutus.V1.Ledger.Interval (Extended(..)) +import Plutus.V1.Ledger.DCert (DCert(..)) +import Plutus.V1.Ledger.Credential (StakingCredential(..), Credential(..)) +import Plutus.V1.Ledger.Contexts (ScriptPurpose(..)) + +-- This module contains the HasConstrIndices class, which is used for generating the corresponding PureScript class of +-- the same name. It also contains instances for Plutus Ledger types with multiple constructors because we cannot hook +-- @makeIsDataIndexed@ in IOHK's Plutus modules + +-- The index information for the ledger types is copy/pasted from the Plutus source. + +-- TODO: In theory we could avoid copy/pasting and use compile-time IO with template Haskell to query/parse the index information +-- from a particular commit on the Plutus gihub repo. That would be annoying to implement but would provide a high +-- degree of assurance that the index information will always be current relative to a specific commit in their repo. +-- (I don't want to do this.) + +class HasConstrIndices (a :: Type) where + getConstrIndices :: [(Int, String)] + +makeHasConstrIndex ''DCert [('DCertDelegRegKey,0) + , ('DCertDelegDeRegKey,1) + , ('DCertDelegDelegate,2) + , ('DCertPoolRegister,3) + , ('DCertPoolRetire,4) + , ('DCertGenesis,5) + , ('DCertMir,6) + ] + +makeHasConstrIndex ''StakingCredential [('StakingHash,0), ('StakingPtr,1)] + +makeHasConstrIndex ''Credential [('PubKeyCredential,0), ('ScriptCredential,1)] + +makeHasConstrIndex ''ScriptPurpose [ ('Minting,0) + , ('Spending,1) + , ('Rewarding,2) + , ('Certifying,3) + ] + +makeHasConstrIndex ''Extended [('NegInf,0),('Finite,1),('PosInf,2)] diff --git a/src/PlutusTx/LedgerTypes.hs b/src/PlutusTx/LedgerTypes.hs new file mode 100644 index 00000000..07000122 --- /dev/null +++ b/src/PlutusTx/LedgerTypes.hs @@ -0,0 +1,127 @@ +{-# LANGUAGE ScopedTypeVariables #-} + +module PlutusTx.LedgerTypes where + +-- local imports +import PlutusTx.ConstrIndices () +import Language.PureScript.Bridge +import Language.PureScript.Bridge.TypeParameters (A) + +-- Ledger type imports +import Plutus.V1.Ledger.Ada (Ada) +import Plutus.V1.Ledger.Address (Address) +import Plutus.V1.Ledger.Bytes (LedgerBytes) +import Plutus.V1.Ledger.Contexts (ScriptContext,ScriptPurpose,TxInfo,TxInInfo) +import Plutus.V1.Ledger.Credential (StakingCredential, Credential) +import Plutus.V1.Ledger.Crypto (PubKey,PubKeyHash,PrivateKey,Signature) +import Plutus.V1.Ledger.DCert (DCert) +import Plutus.V1.Ledger.Interval (Interval, UpperBound, LowerBound, Extended) +import Plutus.V1.Ledger.Value (CurrencySymbol, AssetClass, Value, TokenName) +import Plutus.V1.Ledger.TxId (TxId) +import Plutus.V1.Ledger.Tx (TxOut,TxOutRef) +import Plutus.V1.Ledger.Time (POSIXTime,DiffMilliSeconds) +import Plutus.V1.Ledger.Slot (Slot) +import Plutus.V1.Ledger.Scripts ( + Redeemer, + Datum, + ScriptHash, + ValidatorHash, + DatumHash, + MintingPolicyHash, + StakeValidatorHash, + ) + +-- other imports +import Data.Text + +writeLedgerTypes :: FilePath -> IO () +writeLedgerTypes fp = writeLedgerTypesAnd fp [] + +writeLedgerTypesAnd :: FilePath -> [SumType 'Haskell] -> IO () +writeLedgerTypesAnd fp myTypes = + writePSTypes + fp + (buildBridge (defaultBridge <|> plutusBridge)) + (ledgerTypes <> myTypes) + +ledgerTypes :: [SumType 'Haskell] +ledgerTypes = + [ -- Newtypes or single constructor data types (extremelyUnsafeMkSumType is safe) + extremelyUnsafeMkSumType @Value + , extremelyUnsafeMkSumType @CurrencySymbol + , extremelyUnsafeMkSumType @AssetClass + , extremelyUnsafeMkSumType @TokenName + , extremelyUnsafeMkSumType @TxId + , extremelyUnsafeMkSumType @TxOut + , extremelyUnsafeMkSumType @TxOutRef + , extremelyUnsafeMkSumType @DiffMilliSeconds + , extremelyUnsafeMkSumType @POSIXTime + , extremelyUnsafeMkSumType @Slot + , extremelyUnsafeMkSumType @Redeemer + , extremelyUnsafeMkSumType @Datum + , extremelyUnsafeMkSumType @ScriptHash + , extremelyUnsafeMkSumType @ValidatorHash + , extremelyUnsafeMkSumType @DatumHash + , extremelyUnsafeMkSumType @MintingPolicyHash + , extremelyUnsafeMkSumType @StakeValidatorHash + , extremelyUnsafeMkSumType @PubKey + , extremelyUnsafeMkSumType @PubKeyHash + , extremelyUnsafeMkSumType @PrivateKey + , extremelyUnsafeMkSumType @Signature + , extremelyUnsafeMkSumType @TxInfo + , extremelyUnsafeMkSumType @TxInInfo + , extremelyUnsafeMkSumType @ScriptContext + , extremelyUnsafeMkSumType @LedgerBytes + , extremelyUnsafeMkSumType @Address + , extremelyUnsafeMkSumType @Ada + , extremelyUnsafeMkSumType @(Interval A) + , extremelyUnsafeMkSumType @(LowerBound A) + , extremelyUnsafeMkSumType @(UpperBound A) + + -- True sum types, HasConstrIndices instances generated in the PlutusTx.ConstrIndices module + , mkSumTypeIndexed @DCert + , mkSumTypeIndexed @(Extended A) + , mkSumTypeIndexed @StakingCredential + , mkSumTypeIndexed @Credential + , mkSumTypeIndexed @ScriptPurpose + ] + +-- I'm leaving this commented b/c I'm not sure what the module structure for the ledger types should be. +-- My assumption was that, like Plutarch, we'd just shove everything into it's respective Plutus.V1.Ledger module +plutusBridge :: BridgeBuilder PSType +plutusBridge = + -- cbtxBridge "Plutus.V1.Ledger.Value" "Value" "Types.Value" "Value" + -- <|> cbtxBridge "Plutus.V1.Ledger.Value" "CurrencySymbol" "Types.Value" "CurrencySymbol" + -- <|> cbtxBridge "Plutus.V1.Ledger.Value" "TokenName" "Types.Value" "TokenName" + -- <|> cbtxBridge "Plutus.V1.Ledger.Address" "Address" "Serialization.Address" "Address" + cbtxBridge "PlutusTx.Builtins.Internal" "BuiltinByteString" "Types.ByteArray" "ByteArray" + -- <|> cbtxBridge "Plutus.V1.Ledger.Bytes" "LedgerBytes" "Types.ByteArray" "ByteArray" + -- <|> cbtxBridge "Plutus.V1.Ledger.Time" "POSIXTime" "Types.Interval" "POSIXTime" + <|> cbtxBridge "GHC.Integer.Type" "Integer" "Data.BigInt" "BigInt" + <|> cbtxBridge "PlutusTx.Ratio" "Rational" "Data.Rational" "Rational" + -- <|> assetClassBridge + +cbtxBridge :: Text -> Text -> Text -> Text -> BridgePart +cbtxBridge haskTypeModule haskTypeName psTypeModule psTypeName = do + typeModule ^== haskTypeModule + typeName ^== haskTypeName + return $ + TypeInfo + { _typePackage = "plutonomicon-cardano-browser-tx" + , _typeModule = psTypeModule + , _typeName = psTypeName + , _typeParameters = [] + } +{- +assetClassBridge :: BridgePart +assetClassBridge = do + typeModule ^== "Plutus.V1.Ledger.Value" + typeName ^== "AssetClass" + return $ + TypeInfo + { _typePackage = "plutonomicon-cardano-browser-tx" + , _typeModule = "Data.Tuple" + , _typeName = "Tuple" + , _typeParameters = [TypeInfo "" "Types.Value" "CurrencySymbol" [], TypeInfo "" "Types.Value" "TokenName" []] + } +-} diff --git a/~/Data/Tuple.purs b/~/Data/Tuple.purs new file mode 100644 index 00000000..210c971c --- /dev/null +++ b/~/Data/Tuple.purs @@ -0,0 +1,28 @@ +-- File auto generated by purescript-bridge! -- +module Data.Tuple where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Type.Proxy (Proxy(Proxy)) +import Types.Value (CurrencySymbol, TokenName) + +newtype Tuple CurrencySymbol TokenName = AssetClass { unAssetClass :: Tuple CurrencySymbol TokenName } + +derive instance Generic (Tuple CurrencySymbol TokenName) _ + +derive instance Newtype (Tuple CurrencySymbol TokenName) _ + +instance HasConstrIndices (Tuple CurrencySymbol TokenName) where + constrIndices _ = fromConstr2Index [Tuple "AssetClass" 0] + +-------------------------------------------------------------------------------- + +_AssetClass :: Iso' (Tuple CurrencySymbol TokenName) {unAssetClass :: Tuple CurrencySymbol TokenName} +_AssetClass = _Newtype diff --git a/~/Plutus/V1/Ledger/Ada.purs b/~/Plutus/V1/Ledger/Ada.purs new file mode 100644 index 00000000..a5f8f359 --- /dev/null +++ b/~/Plutus/V1/Ledger/Ada.purs @@ -0,0 +1,29 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Ada where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(Proxy)) + +newtype Ada = Lovelace { getLovelace :: BigInt } + +derive instance Generic Ada _ + +derive instance Newtype Ada _ + +instance HasConstrIndices Ada where + constrIndices _ = fromConstr2Index [Tuple "Lovelace" 0] + +-------------------------------------------------------------------------------- + +_Lovelace :: Iso' Ada {getLovelace :: BigInt} +_Lovelace = _Newtype diff --git a/~/Plutus/V1/Ledger/Contexts.purs b/~/Plutus/V1/Ledger/Contexts.purs new file mode 100644 index 00000000..34c58444 --- /dev/null +++ b/~/Plutus/V1/Ledger/Contexts.purs @@ -0,0 +1,122 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Contexts where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Plutus.V1.Ledger.Credential (StakingCredential) +import Plutus.V1.Ledger.Crypto (PubKeyHash) +import Plutus.V1.Ledger.DCert (DCert) +import Plutus.V1.Ledger.Interval (Interval) +import Plutus.V1.Ledger.Scripts (Datum, DatumHash) +import Plutus.V1.Ledger.Tx (TxOut, TxOutRef) +import Plutus.V1.Ledger.TxId (TxId) +import Type.Proxy (Proxy(Proxy)) +import Types.Interval (POSIXTime) +import Types.Value (CurrencySymbol, Value) + +newtype TxInfo = TxInfo + { txInfoInputs :: Array TxInInfo + , txInfoOutputs :: Array TxOut + , txInfoFee :: Value + , txInfoMint :: Value + , txInfoDCert :: Array DCert + , txInfoWdrl :: Array (Tuple StakingCredential BigInt) + , txInfoValidRange :: Interval POSIXTime + , txInfoSignatories :: Array PubKeyHash + , txInfoData :: Array (Tuple DatumHash Datum) + , txInfoId :: TxId + } + +derive instance Generic TxInfo _ + +derive instance Newtype TxInfo _ + +instance HasConstrIndices TxInfo where + constrIndices _ = fromConstr2Index [Tuple "TxInfo" 0] + +-------------------------------------------------------------------------------- + +_TxInfo :: Iso' TxInfo {txInfoInputs :: Array TxInInfo, txInfoOutputs :: Array TxOut, txInfoFee :: Value, txInfoMint :: Value, txInfoDCert :: Array DCert, txInfoWdrl :: Array (Tuple StakingCredential BigInt), txInfoValidRange :: Interval POSIXTime, txInfoSignatories :: Array PubKeyHash, txInfoData :: Array (Tuple DatumHash Datum), txInfoId :: TxId} +_TxInfo = _Newtype + +-------------------------------------------------------------------------------- + +newtype TxInInfo = TxInInfo + { txInInfoOutRef :: TxOutRef + , txInInfoResolved :: TxOut + } + +derive instance Generic TxInInfo _ + +derive instance Newtype TxInInfo _ + +instance HasConstrIndices TxInInfo where + constrIndices _ = fromConstr2Index [Tuple "TxInInfo" 0] + +-------------------------------------------------------------------------------- + +_TxInInfo :: Iso' TxInInfo {txInInfoOutRef :: TxOutRef, txInInfoResolved :: TxOut} +_TxInInfo = _Newtype + +-------------------------------------------------------------------------------- + +newtype ScriptContext = ScriptContext + { scriptContextTxInfo :: TxInfo + , scriptContextPurpose :: ScriptPurpose + } + +derive instance Generic ScriptContext _ + +derive instance Newtype ScriptContext _ + +instance HasConstrIndices ScriptContext where + constrIndices _ = fromConstr2Index [Tuple "ScriptContext" 0] + +-------------------------------------------------------------------------------- + +_ScriptContext :: Iso' ScriptContext {scriptContextTxInfo :: TxInfo, scriptContextPurpose :: ScriptPurpose} +_ScriptContext = _Newtype + +-------------------------------------------------------------------------------- + +data ScriptPurpose + = Minting CurrencySymbol + | Spending TxOutRef + | Rewarding StakingCredential + | Certifying DCert + +derive instance Generic ScriptPurpose _ + +instance HasConstrIndices ScriptPurpose where + constrIndices _ = fromConstr2Index [Tuple "Minting" 0,Tuple "Spending" 1,Tuple "Rewarding" 2,Tuple "Certifying" 3] + +-------------------------------------------------------------------------------- + +_Minting :: Prism' ScriptPurpose CurrencySymbol +_Minting = prism' Minting case _ of + (Minting a) -> Just a + _ -> Nothing + +_Spending :: Prism' ScriptPurpose TxOutRef +_Spending = prism' Spending case _ of + (Spending a) -> Just a + _ -> Nothing + +_Rewarding :: Prism' ScriptPurpose StakingCredential +_Rewarding = prism' Rewarding case _ of + (Rewarding a) -> Just a + _ -> Nothing + +_Certifying :: Prism' ScriptPurpose DCert +_Certifying = prism' Certifying case _ of + (Certifying a) -> Just a + _ -> Nothing diff --git a/~/Plutus/V1/Ledger/Credential.purs b/~/Plutus/V1/Ledger/Credential.purs new file mode 100644 index 00000000..cb4ef042 --- /dev/null +++ b/~/Plutus/V1/Ledger/Credential.purs @@ -0,0 +1,60 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Credential where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Tuple (Tuple(..)) +import Plutus.V1.Ledger.Crypto (PubKeyHash) +import Plutus.V1.Ledger.Scripts (ValidatorHash) +import Type.Proxy (Proxy(Proxy)) + +data StakingCredential + = StakingHash Credential + | StakingPtr BigInt BigInt BigInt + +derive instance Generic StakingCredential _ + +instance HasConstrIndices StakingCredential where + constrIndices _ = fromConstr2Index [Tuple "StakingHash" 0,Tuple "StakingPtr" 1] + +-------------------------------------------------------------------------------- + +_StakingHash :: Prism' StakingCredential Credential +_StakingHash = prism' StakingHash case _ of + (StakingHash a) -> Just a + _ -> Nothing + +_StakingPtr :: Prism' StakingCredential {a :: BigInt, b :: BigInt, c :: BigInt} +_StakingPtr = prism' (\{a, b, c} -> (StakingPtr a b c)) case _ of + (StakingPtr a b c) -> Just {a, b, c} + _ -> Nothing + +-------------------------------------------------------------------------------- + +data Credential + = PubKeyCredential PubKeyHash + | ScriptCredential ValidatorHash + +derive instance Generic Credential _ + +instance HasConstrIndices Credential where + constrIndices _ = fromConstr2Index [Tuple "PubKeyCredential" 0,Tuple "ScriptCredential" 1] + +-------------------------------------------------------------------------------- + +_PubKeyCredential :: Prism' Credential PubKeyHash +_PubKeyCredential = prism' PubKeyCredential case _ of + (PubKeyCredential a) -> Just a + _ -> Nothing + +_ScriptCredential :: Prism' Credential ValidatorHash +_ScriptCredential = prism' ScriptCredential case _ of + (ScriptCredential a) -> Just a + _ -> Nothing diff --git a/~/Plutus/V1/Ledger/Crypto.purs b/~/Plutus/V1/Ledger/Crypto.purs new file mode 100644 index 00000000..2a1cfcf1 --- /dev/null +++ b/~/Plutus/V1/Ledger/Crypto.purs @@ -0,0 +1,77 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Crypto where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(Proxy)) +import Types.ByteArray (ByteArray) + +newtype PubKey = PubKey { getPubKey :: ByteArray } + +derive instance Generic PubKey _ + +derive instance Newtype PubKey _ + +instance HasConstrIndices PubKey where + constrIndices _ = fromConstr2Index [Tuple "PubKey" 0] + +-------------------------------------------------------------------------------- + +_PubKey :: Iso' PubKey {getPubKey :: ByteArray} +_PubKey = _Newtype + +-------------------------------------------------------------------------------- + +newtype PubKeyHash = PubKeyHash { getPubKeyHash :: ByteArray } + +derive instance Generic PubKeyHash _ + +derive instance Newtype PubKeyHash _ + +instance HasConstrIndices PubKeyHash where + constrIndices _ = fromConstr2Index [Tuple "PubKeyHash" 0] + +-------------------------------------------------------------------------------- + +_PubKeyHash :: Iso' PubKeyHash {getPubKeyHash :: ByteArray} +_PubKeyHash = _Newtype + +-------------------------------------------------------------------------------- + +newtype PrivateKey = PrivateKey { getPrivateKey :: ByteArray } + +derive instance Generic PrivateKey _ + +derive instance Newtype PrivateKey _ + +instance HasConstrIndices PrivateKey where + constrIndices _ = fromConstr2Index [Tuple "PrivateKey" 0] + +-------------------------------------------------------------------------------- + +_PrivateKey :: Iso' PrivateKey {getPrivateKey :: ByteArray} +_PrivateKey = _Newtype + +-------------------------------------------------------------------------------- + +newtype Signature = Signature { getSignature :: ByteArray } + +derive instance Generic Signature _ + +derive instance Newtype Signature _ + +instance HasConstrIndices Signature where + constrIndices _ = fromConstr2Index [Tuple "Signature" 0] + +-------------------------------------------------------------------------------- + +_Signature :: Iso' Signature {getSignature :: ByteArray} +_Signature = _Newtype diff --git a/~/Plutus/V1/Ledger/DCert.purs b/~/Plutus/V1/Ledger/DCert.purs new file mode 100644 index 00000000..bde122df --- /dev/null +++ b/~/Plutus/V1/Ledger/DCert.purs @@ -0,0 +1,67 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.DCert where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Tuple (Tuple(..)) +import Plutus.V1.Ledger.Credential (StakingCredential) +import Plutus.V1.Ledger.Crypto (PubKeyHash) +import Type.Proxy (Proxy(Proxy)) + +data DCert + = DCertDelegRegKey StakingCredential + | DCertDelegDeRegKey StakingCredential + | DCertDelegDelegate StakingCredential PubKeyHash + | DCertPoolRegister PubKeyHash PubKeyHash + | DCertPoolRetire PubKeyHash BigInt + | DCertGenesis + | DCertMir + +derive instance Generic DCert _ + +instance HasConstrIndices DCert where + constrIndices _ = fromConstr2Index [Tuple "DCertDelegRegKey" 0,Tuple "DCertDelegDeRegKey" 1,Tuple "DCertDelegDelegate" 2,Tuple "DCertPoolRegister" 3,Tuple "DCertPoolRetire" 4,Tuple "DCertGenesis" 5,Tuple "DCertMir" 6] + +-------------------------------------------------------------------------------- + +_DCertDelegRegKey :: Prism' DCert StakingCredential +_DCertDelegRegKey = prism' DCertDelegRegKey case _ of + (DCertDelegRegKey a) -> Just a + _ -> Nothing + +_DCertDelegDeRegKey :: Prism' DCert StakingCredential +_DCertDelegDeRegKey = prism' DCertDelegDeRegKey case _ of + (DCertDelegDeRegKey a) -> Just a + _ -> Nothing + +_DCertDelegDelegate :: Prism' DCert {a :: StakingCredential, b :: PubKeyHash} +_DCertDelegDelegate = prism' (\{a, b} -> (DCertDelegDelegate a b)) case _ of + (DCertDelegDelegate a b) -> Just {a, b} + _ -> Nothing + +_DCertPoolRegister :: Prism' DCert {a :: PubKeyHash, b :: PubKeyHash} +_DCertPoolRegister = prism' (\{a, b} -> (DCertPoolRegister a b)) case _ of + (DCertPoolRegister a b) -> Just {a, b} + _ -> Nothing + +_DCertPoolRetire :: Prism' DCert {a :: PubKeyHash, b :: BigInt} +_DCertPoolRetire = prism' (\{a, b} -> (DCertPoolRetire a b)) case _ of + (DCertPoolRetire a b) -> Just {a, b} + _ -> Nothing + +_DCertGenesis :: Prism' DCert Unit +_DCertGenesis = prism' (const DCertGenesis) case _ of + DCertGenesis -> Just unit + _ -> Nothing + +_DCertMir :: Prism' DCert Unit +_DCertMir = prism' (const DCertMir) case _ of + DCertMir -> Just unit + _ -> Nothing diff --git a/~/Plutus/V1/Ledger/Interval.purs b/~/Plutus/V1/Ledger/Interval.purs new file mode 100644 index 00000000..5f3d4c85 --- /dev/null +++ b/~/Plutus/V1/Ledger/Interval.purs @@ -0,0 +1,88 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Interval where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(Proxy)) + +newtype Interval a = Interval + { ivFrom :: LowerBound a + , ivTo :: UpperBound a + } + +derive instance Generic (Interval a) _ + +derive instance Newtype (Interval a) _ + +instance HasConstrIndices (Interval a) where + constrIndices _ = fromConstr2Index [Tuple "Interval" 0] + +-------------------------------------------------------------------------------- + +_Interval :: forall a. Iso' (Interval a) {ivFrom :: LowerBound a, ivTo :: UpperBound a} +_Interval = _Newtype + +-------------------------------------------------------------------------------- + +data LowerBound a = LowerBound (Extended a) Boolean + +derive instance Generic (LowerBound a) _ + +instance HasConstrIndices (LowerBound a) where + constrIndices _ = fromConstr2Index [Tuple "LowerBound" 0] + +-------------------------------------------------------------------------------- + +_LowerBound :: forall a. Iso' (LowerBound a) {a :: Extended a, b :: Boolean} +_LowerBound = iso (\(LowerBound a b) -> {a, b}) (\{a, b} -> (LowerBound a b)) + +-------------------------------------------------------------------------------- + +data UpperBound a = UpperBound (Extended a) Boolean + +derive instance Generic (UpperBound a) _ + +instance HasConstrIndices (UpperBound a) where + constrIndices _ = fromConstr2Index [Tuple "UpperBound" 0] + +-------------------------------------------------------------------------------- + +_UpperBound :: forall a. Iso' (UpperBound a) {a :: Extended a, b :: Boolean} +_UpperBound = iso (\(UpperBound a b) -> {a, b}) (\{a, b} -> (UpperBound a b)) + +-------------------------------------------------------------------------------- + +data Extended a + = NegInf + | Finite a + | PosInf + +derive instance Generic (Extended a) _ + +instance HasConstrIndices (Extended a) where + constrIndices _ = fromConstr2Index [Tuple "NegInf" 0,Tuple "Finite" 1,Tuple "PosInf" 2] + +-------------------------------------------------------------------------------- + +_NegInf :: forall a. Prism' (Extended a) Unit +_NegInf = prism' (const NegInf) case _ of + NegInf -> Just unit + _ -> Nothing + +_Finite :: forall a. Prism' (Extended a) a +_Finite = prism' Finite case _ of + (Finite a) -> Just a + _ -> Nothing + +_PosInf :: forall a. Prism' (Extended a) Unit +_PosInf = prism' (const PosInf) case _ of + PosInf -> Just unit + _ -> Nothing diff --git a/~/Plutus/V1/Ledger/Scripts.purs b/~/Plutus/V1/Ledger/Scripts.purs new file mode 100644 index 00000000..6f85ebb7 --- /dev/null +++ b/~/Plutus/V1/Ledger/Scripts.purs @@ -0,0 +1,126 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Scripts where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import PlutusTx.Builtins.Internal (BuiltinData) +import Type.Proxy (Proxy(Proxy)) +import Types.ByteArray (ByteArray) + +newtype Redeemer = Redeemer { getRedeemer :: BuiltinData } + +derive instance Generic Redeemer _ + +derive instance Newtype Redeemer _ + +instance HasConstrIndices Redeemer where + constrIndices _ = fromConstr2Index [Tuple "Redeemer" 0] + +-------------------------------------------------------------------------------- + +_Redeemer :: Iso' Redeemer {getRedeemer :: BuiltinData} +_Redeemer = _Newtype + +-------------------------------------------------------------------------------- + +newtype Datum = Datum { getDatum :: BuiltinData } + +derive instance Generic Datum _ + +derive instance Newtype Datum _ + +instance HasConstrIndices Datum where + constrIndices _ = fromConstr2Index [Tuple "Datum" 0] + +-------------------------------------------------------------------------------- + +_Datum :: Iso' Datum {getDatum :: BuiltinData} +_Datum = _Newtype + +-------------------------------------------------------------------------------- + +newtype ScriptHash = ScriptHash { getScriptHash :: ByteArray } + +derive instance Generic ScriptHash _ + +derive instance Newtype ScriptHash _ + +instance HasConstrIndices ScriptHash where + constrIndices _ = fromConstr2Index [Tuple "ScriptHash" 0] + +-------------------------------------------------------------------------------- + +_ScriptHash :: Iso' ScriptHash {getScriptHash :: ByteArray} +_ScriptHash = _Newtype + +-------------------------------------------------------------------------------- + +newtype ValidatorHash = ValidatorHash ByteArray + +derive instance Generic ValidatorHash _ + +derive instance Newtype ValidatorHash _ + +instance HasConstrIndices ValidatorHash where + constrIndices _ = fromConstr2Index [Tuple "ValidatorHash" 0] + +-------------------------------------------------------------------------------- + +_ValidatorHash :: Iso' ValidatorHash ByteArray +_ValidatorHash = _Newtype + +-------------------------------------------------------------------------------- + +newtype DatumHash = DatumHash ByteArray + +derive instance Generic DatumHash _ + +derive instance Newtype DatumHash _ + +instance HasConstrIndices DatumHash where + constrIndices _ = fromConstr2Index [Tuple "DatumHash" 0] + +-------------------------------------------------------------------------------- + +_DatumHash :: Iso' DatumHash ByteArray +_DatumHash = _Newtype + +-------------------------------------------------------------------------------- + +newtype MintingPolicyHash = MintingPolicyHash ByteArray + +derive instance Generic MintingPolicyHash _ + +derive instance Newtype MintingPolicyHash _ + +instance HasConstrIndices MintingPolicyHash where + constrIndices _ = fromConstr2Index [Tuple "MintingPolicyHash" 0] + +-------------------------------------------------------------------------------- + +_MintingPolicyHash :: Iso' MintingPolicyHash ByteArray +_MintingPolicyHash = _Newtype + +-------------------------------------------------------------------------------- + +newtype StakeValidatorHash = StakeValidatorHash ByteArray + +derive instance Generic StakeValidatorHash _ + +derive instance Newtype StakeValidatorHash _ + +instance HasConstrIndices StakeValidatorHash where + constrIndices _ = fromConstr2Index [Tuple "StakeValidatorHash" 0] + +-------------------------------------------------------------------------------- + +_StakeValidatorHash :: Iso' StakeValidatorHash ByteArray +_StakeValidatorHash = _Newtype diff --git a/~/Plutus/V1/Ledger/Slot.purs b/~/Plutus/V1/Ledger/Slot.purs new file mode 100644 index 00000000..1e6c01e8 --- /dev/null +++ b/~/Plutus/V1/Ledger/Slot.purs @@ -0,0 +1,29 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Slot where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(Proxy)) + +newtype Slot = Slot { getSlot :: BigInt } + +derive instance Generic Slot _ + +derive instance Newtype Slot _ + +instance HasConstrIndices Slot where + constrIndices _ = fromConstr2Index [Tuple "Slot" 0] + +-------------------------------------------------------------------------------- + +_Slot :: Iso' Slot {getSlot :: BigInt} +_Slot = _Newtype diff --git a/~/Plutus/V1/Ledger/Time.purs b/~/Plutus/V1/Ledger/Time.purs new file mode 100644 index 00000000..6d4ee6ef --- /dev/null +++ b/~/Plutus/V1/Ledger/Time.purs @@ -0,0 +1,29 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Time where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(Proxy)) + +newtype DiffMilliSeconds = DiffMilliSeconds BigInt + +derive instance Generic DiffMilliSeconds _ + +derive instance Newtype DiffMilliSeconds _ + +instance HasConstrIndices DiffMilliSeconds where + constrIndices _ = fromConstr2Index [Tuple "DiffMilliSeconds" 0] + +-------------------------------------------------------------------------------- + +_DiffMilliSeconds :: Iso' DiffMilliSeconds BigInt +_DiffMilliSeconds = _Newtype diff --git a/~/Plutus/V1/Ledger/Tx.purs b/~/Plutus/V1/Ledger/Tx.purs new file mode 100644 index 00000000..bd85f565 --- /dev/null +++ b/~/Plutus/V1/Ledger/Tx.purs @@ -0,0 +1,56 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.Tx where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Plutus.V1.Ledger.Scripts (DatumHash) +import Plutus.V1.Ledger.TxId (TxId) +import Serialization.Address (Address) +import Type.Proxy (Proxy(Proxy)) +import Types.Value (Value) + +newtype TxOut = TxOut + { txOutAddress :: Address + , txOutValue :: Value + , txOutDatumHash :: Maybe DatumHash + } + +derive instance Generic TxOut _ + +derive instance Newtype TxOut _ + +instance HasConstrIndices TxOut where + constrIndices _ = fromConstr2Index [Tuple "TxOut" 0] + +-------------------------------------------------------------------------------- + +_TxOut :: Iso' TxOut {txOutAddress :: Address, txOutValue :: Value, txOutDatumHash :: Maybe DatumHash} +_TxOut = _Newtype + +-------------------------------------------------------------------------------- + +newtype TxOutRef = TxOutRef + { txOutRefId :: TxId + , txOutRefIdx :: BigInt + } + +derive instance Generic TxOutRef _ + +derive instance Newtype TxOutRef _ + +instance HasConstrIndices TxOutRef where + constrIndices _ = fromConstr2Index [Tuple "TxOutRef" 0] + +-------------------------------------------------------------------------------- + +_TxOutRef :: Iso' TxOutRef {txOutRefId :: TxId, txOutRefIdx :: BigInt} +_TxOutRef = _Newtype diff --git a/~/Plutus/V1/Ledger/TxId.purs b/~/Plutus/V1/Ledger/TxId.purs new file mode 100644 index 00000000..f53a8973 --- /dev/null +++ b/~/Plutus/V1/Ledger/TxId.purs @@ -0,0 +1,29 @@ +-- File auto generated by purescript-bridge! -- +module Plutus.V1.Ledger.TxId where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(Proxy)) +import Types.ByteArray (ByteArray) + +newtype TxId = TxId { getTxId :: ByteArray } + +derive instance Generic TxId _ + +derive instance Newtype TxId _ + +instance HasConstrIndices TxId where + constrIndices _ = fromConstr2Index [Tuple "TxId" 0] + +-------------------------------------------------------------------------------- + +_TxId :: Iso' TxId {getTxId :: ByteArray} +_TxId = _Newtype diff --git a/~/Serialization/Address.purs b/~/Serialization/Address.purs new file mode 100644 index 00000000..b32eeae5 --- /dev/null +++ b/~/Serialization/Address.purs @@ -0,0 +1,32 @@ +-- File auto generated by purescript-bridge! -- +module Serialization.Address where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Plutus.V1.Ledger.Credential (Credential, StakingCredential) +import Type.Proxy (Proxy(Proxy)) + +newtype Address = Address + { addressCredential :: Credential + , addressStakingCredential :: Maybe StakingCredential + } + +derive instance Generic Address _ + +derive instance Newtype Address _ + +instance HasConstrIndices Address where + constrIndices _ = fromConstr2Index [Tuple "Address" 0] + +-------------------------------------------------------------------------------- + +_Address :: Iso' Address {addressCredential :: Credential, addressStakingCredential :: Maybe StakingCredential} +_Address = _Newtype diff --git a/~/Types/ByteArray.purs b/~/Types/ByteArray.purs new file mode 100644 index 00000000..5d9a6098 --- /dev/null +++ b/~/Types/ByteArray.purs @@ -0,0 +1,28 @@ +-- File auto generated by purescript-bridge! -- +module Types.ByteArray where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(Proxy)) + +newtype ByteArray = LedgerBytes { getLedgerBytes :: ByteArray } + +derive instance Generic ByteArray _ + +derive instance Newtype ByteArray _ + +instance HasConstrIndices ByteArray where + constrIndices _ = fromConstr2Index [Tuple "LedgerBytes" 0] + +-------------------------------------------------------------------------------- + +_LedgerBytes :: Iso' ByteArray {getLedgerBytes :: ByteArray} +_LedgerBytes = _Newtype diff --git a/~/Types/Interval.purs b/~/Types/Interval.purs new file mode 100644 index 00000000..1471882c --- /dev/null +++ b/~/Types/Interval.purs @@ -0,0 +1,29 @@ +-- File auto generated by purescript-bridge! -- +module Types.Interval where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import Type.Proxy (Proxy(Proxy)) + +newtype POSIXTime = POSIXTime { getPOSIXTime :: BigInt } + +derive instance Generic POSIXTime _ + +derive instance Newtype POSIXTime _ + +instance HasConstrIndices POSIXTime where + constrIndices _ = fromConstr2Index [Tuple "POSIXTime" 0] + +-------------------------------------------------------------------------------- + +_POSIXTime :: Iso' POSIXTime {getPOSIXTime :: BigInt} +_POSIXTime = _Newtype diff --git a/~/Types/Value.purs b/~/Types/Value.purs new file mode 100644 index 00000000..79d36d17 --- /dev/null +++ b/~/Types/Value.purs @@ -0,0 +1,63 @@ +-- File auto generated by purescript-bridge! -- +module Types.Value where + +import Prelude + +import ConstrIndices (class HasConstrIndices, constrIndices, fromConstr2Index) +import Data.BigInt (BigInt) +import Data.Generic.Rep (class Generic) +import Data.Lens (Iso', Lens', Prism', iso, prism') +import Data.Lens.Iso.Newtype (_Newtype) +import Data.Lens.Record (prop) +import Data.Maybe (Maybe(..)) +import Data.Newtype (class Newtype) +import Data.Tuple (Tuple(..)) +import PlutusTx.AssocMap (Map) +import Type.Proxy (Proxy(Proxy)) +import Types.ByteArray (ByteArray) + +newtype Value = Value { getValue :: Map CurrencySymbol (Map TokenName BigInt) } + +derive instance Generic Value _ + +derive instance Newtype Value _ + +instance HasConstrIndices Value where + constrIndices _ = fromConstr2Index [Tuple "Value" 0] + +-------------------------------------------------------------------------------- + +_Value :: Iso' Value {getValue :: Map CurrencySymbol (Map TokenName BigInt)} +_Value = _Newtype + +-------------------------------------------------------------------------------- + +newtype CurrencySymbol = CurrencySymbol { unCurrencySymbol :: ByteArray } + +derive instance Generic CurrencySymbol _ + +derive instance Newtype CurrencySymbol _ + +instance HasConstrIndices CurrencySymbol where + constrIndices _ = fromConstr2Index [Tuple "CurrencySymbol" 0] + +-------------------------------------------------------------------------------- + +_CurrencySymbol :: Iso' CurrencySymbol {unCurrencySymbol :: ByteArray} +_CurrencySymbol = _Newtype + +-------------------------------------------------------------------------------- + +newtype TokenName = TokenName { unTokenName :: ByteArray } + +derive instance Generic TokenName _ + +derive instance Newtype TokenName _ + +instance HasConstrIndices TokenName where + constrIndices _ = fromConstr2Index [Tuple "TokenName" 0] + +-------------------------------------------------------------------------------- + +_TokenName :: Iso' TokenName {unTokenName :: ByteArray} +_TokenName = _Newtype