| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Marconi.Index.Utxo
Contents
Synopsis
- addressFilteredRows :: AddressAny -> [UtxoEvent] -> [UtxoRow]
- newtype Depth = Depth Int
- eventAtAddress :: AddressAny -> UtxoEvent -> [UtxoEvent]
- getUtxos :: IsCardanoEra era => Maybe TargetAddresses -> Tx era -> [Utxo]
- getUtxoEvents :: IsCardanoEra era => Maybe TargetAddresses -> SlotNo -> BlockNo -> [Tx era] -> Maybe UtxoEvent
- open :: FilePath -> Depth -> IO UtxoIndex
- query :: UtxoIndex -> AddressAny -> [UtxoEvent] -> IO Result
- queryPlusVolatile :: UtxoIndex -> AddressAny -> IO Result
- type Result = Maybe [UtxoRow]
- toRows :: UtxoEvent -> [UtxoRow]
- toAddr :: AddressInEra CurrentEra -> AddressAny
- utxoAddress :: Lens' Utxo AddressAny
- utxoEventSlotNo :: Lens' UtxoEvent SlotNo
- utxoEventUtxos :: Lens' UtxoEvent [Utxo]
- utxoRowUtxo :: Lens' UtxoRow Utxo
- data Utxo = Utxo {}
- data UtxoEvent = UtxoEvent {
- _utxoEventUtxos :: [Utxo]
- _utxoEventInputs :: !(Set TxIn)
- _utxoEventSlotNo :: !SlotNo
- _utxoEventBlockNo :: !BlockNo
- data UtxoRow = UtxoRow {}
- type UtxoIndex = SqliteIndex UtxoEvent Notification AddressAny Result
- newtype BlockNo = BlockNo {}
- newtype SlotNo = SlotNo {}
Documentation
addressFilteredRows :: AddressAny -> [UtxoEvent] -> [UtxoRow] Source #
only store rows in the address list.
eventAtAddress :: AddressAny -> UtxoEvent -> [UtxoEvent] Source #
getUtxos :: IsCardanoEra era => Maybe TargetAddresses -> Tx era -> [Utxo] Source #
Arguments
| :: IsCardanoEra era | |
| => Maybe TargetAddresses | target addresses to filter for |
| -> SlotNo | |
| -> BlockNo | |
| -> [Tx era] | |
| -> Maybe UtxoEvent | UtxoEvents are stored in storage after conversion to UtxoRow |
Arguments
| :: UtxoIndex | in-memory indexer |
| -> AddressAny | Address to filter for |
| -> [UtxoEvent] | volatile events that may be rollbacked |
| -> IO Result | search results |
Query the data stored in the indexer Quries SQL + buffered data, where buffered data is the data that will be batched to SQL
Arguments
| :: UtxoIndex | in-memory indexer |
| -> AddressAny | Address to filter for |
| -> IO Result | search results |
Query the data stored in the indexer as a whole from: + volatile : in-memory, datat that may rollback + diskStore : on-disk + buffered : in-memeoy, data that will flush to storage
Constructors
| Utxo | |
Fields
| |
Instances
Constructors
| UtxoEvent | |
Fields
| |
Constructors
| UtxoRow | |
Fields
| |
Instances
| Eq UtxoRow Source # | |
| Ord UtxoRow Source # | |
Defined in Marconi.Index.Utxo | |
| Show UtxoRow Source # | |
| Generic UtxoRow Source # | |
| FromRow UtxoRow Source # | |
| ToRow UtxoRow Source # | |
| type Rep UtxoRow Source # | |
Defined in Marconi.Index.Utxo type Rep UtxoRow = D1 ('MetaData "UtxoRow" "Marconi.Index.Utxo" "marconi-1.1.0.0-BO2L0UwGwl69Jz9Y6geoz2" 'False) (C1 ('MetaCons "UtxoRow" 'PrefixI 'True) (S1 ('MetaSel ('Just "_utxoRowUtxo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Utxo) :*: (S1 ('MetaSel ('Just "_utxoRowSlotNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SlotNo) :*: S1 ('MetaSel ('Just "_utxoRowBlockNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlockNo)))) | |
type UtxoIndex = SqliteIndex UtxoEvent Notification AddressAny Result Source #
The 0-based index of the block in the blockchain. BlockNo is <= SlotNo and is only equal at slot N if there is a block for every slot where N <= SlotNo.
Instances
| Bounded BlockNo | |
| Enum BlockNo | |
Defined in Cardano.Slotting.Block Methods succ :: BlockNo -> BlockNo Source # pred :: BlockNo -> BlockNo Source # toEnum :: Int -> BlockNo Source # fromEnum :: BlockNo -> Int Source # enumFrom :: BlockNo -> [BlockNo] Source # enumFromThen :: BlockNo -> BlockNo -> [BlockNo] Source # enumFromTo :: BlockNo -> BlockNo -> [BlockNo] Source # enumFromThenTo :: BlockNo -> BlockNo -> BlockNo -> [BlockNo] Source # | |
| Eq BlockNo | |
| Num BlockNo | |
Defined in Cardano.Slotting.Block | |
| Ord BlockNo | |
Defined in Cardano.Slotting.Block | |
| Show BlockNo | |
| Generic BlockNo | |
| NFData BlockNo | |
Defined in Cardano.Slotting.Block | |
| FromCBOR BlockNo | |
| ToCBOR BlockNo | |
| NoThunks BlockNo | |
| Pretty BlockNo Source # | |
| Serialise BlockNo | |
| FromField BlockNo Source # | |
Defined in Marconi.Index.Utxo Methods | |
| ToField BlockNo Source # | |
| type Rep BlockNo | |
Defined in Cardano.Slotting.Block | |
The 0-based index for the Ourboros time slot.
Instances
Orphan instances
| Serialise ScriptData Source # | |
Methods encode :: ScriptData -> Encoding Source # decode :: Decoder s ScriptData Source # encodeList :: [ScriptData] -> Encoding Source # decodeList :: Decoder s [ScriptData] Source # | |
| FromRow TxIn Source # | |
| FromField Value Source # | |
Methods | |
| FromField AddressAny Source # | |
Methods | |
| FromField ScriptHash Source # | |
Methods | |
| FromField ScriptData Source # | |
Methods | |
| FromField TxId Source # | |
Methods | |
| FromField TxIx Source # | |
Methods | |
| FromField SlotNo Source # | |
Methods | |
| FromField BlockNo Source # | |
Methods | |
| ToRow TxIn Source # | |
| ToField Value Source # | |
| ToField AddressAny Source # | |
Methods toField :: AddressAny -> SQLData Source # | |
| ToField ScriptHash Source # | |
Methods toField :: ScriptHash -> SQLData Source # | |
| ToField ScriptData Source # | |
Methods toField :: ScriptData -> SQLData Source # | |
| ToField TxId Source # | |
| ToField TxIx Source # | |
| ToField SlotNo Source # | |
| ToField BlockNo Source # | |
| FromField (Hash ScriptData) Source # | |
Methods | |
| ToField (Hash ScriptData) Source # | |