plutus-contract-1.2.0.0
Safe HaskellNone
LanguageHaskell2010

Data.UUID.Extras

Synopsis

Documentation

mockUUIDs :: [UUID] Source #

A pure list of UUIDs that can be used in testing. This is _almost_ a sequence counting up from zero, but we ensure that the version and variant numbers are correctly set so the resulting UUIDs validate.

mockUUIDToSequenceId :: UUID -> Maybe Word32 Source #

Given a UUID from mockUUIDs, returns a simple sequence number. Returns Nothing if your UUID doesn't seem to come from that sequence. As the name suggests, you should really only be using this for mocking/testing.

sequenceIdToMockUUID :: Word32 -> UUID Source #

Create a UUID that can be used in testing, from a simple Word32. Reminder: Use 'fromIntegral i' to call it with an Int.